rift-ds 1.22.0 → 1.24.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 (118) hide show
  1. package/README.md +3 -3
  2. package/behaviors/chat-card.css +135 -0
  3. package/behaviors/shell.css +119 -0
  4. package/bin/templates/blocks/components/blocks/AppShell.module.css +69 -15
  5. package/bin/templates/blocks/components/blocks/AppShell.tsx +45 -30
  6. package/bin/templates/blocks/registry.json +1 -1
  7. package/chat/AssistantTurn.js +9 -3
  8. package/chat/ChatAgentPane.css +6 -6
  9. package/chat/ChatLauncher.d.ts +3 -3
  10. package/chat/ChatLauncher.js +3 -5
  11. package/chat/ChatProvider.d.ts +10 -1
  12. package/chat/ChatProvider.js +3 -2
  13. package/chat/ChatWidget.css +272 -8
  14. package/chat/ChatWidget.d.ts +63 -9
  15. package/chat/ChatWidget.js +110 -38
  16. package/chat/DemoWelcome.js +2 -2
  17. package/chat/actions.d.ts +105 -0
  18. package/chat/actions.js +47 -0
  19. package/chat/demo-card-components.d.ts +3 -4
  20. package/chat/demo-script.js +15 -15
  21. package/chat/generatedStarters.d.ts +19 -0
  22. package/chat/generatedStarters.js +49 -0
  23. package/chat/index.d.ts +7 -3
  24. package/chat/index.js +25 -2
  25. package/chat/placement.d.ts +9 -0
  26. package/chat/placement.js +7 -0
  27. package/chat/queries.d.ts +6 -0
  28. package/chat/queries.js +25 -0
  29. package/chat/questions.d.ts +1 -1
  30. package/chat/questions.js +1 -1
  31. package/chat/registry.json.d.ts +5 -3
  32. package/chat/registry.json.js +1 -1
  33. package/chat/selection.css +8 -0
  34. package/chat/selection.d.ts +40 -0
  35. package/chat/selection.js +140 -0
  36. package/chat/selectionContext.d.ts +70 -0
  37. package/chat/selectionContext.js +60 -0
  38. package/chat/server.d.ts +54 -1
  39. package/chat/server.js +101 -5
  40. package/chat/suggestions.d.ts +12 -8
  41. package/chat/suggestions.js +1 -1
  42. package/chat/types.d.ts +2 -0
  43. package/chat/useChat.js +5 -3
  44. package/components/ActionCard/ActionCard.css +147 -0
  45. package/components/ActionCard/ActionCard.d.ts +54 -0
  46. package/components/ActionCard/ActionCard.js +75 -0
  47. package/components/ActionReadout/ActionReadout.css +47 -0
  48. package/components/ActionReadout/ActionReadout.d.ts +29 -0
  49. package/components/ActionReadout/ActionReadout.js +22 -0
  50. package/components/AgentPlan/AgentPlan.css +18 -8
  51. package/components/AgentPlan/AgentPlan.js +1 -0
  52. package/components/AppLayout/AppLayout.css +17 -4
  53. package/components/AppLayout/AppLayout.d.ts +8 -5
  54. package/components/AppLayout/AppLayout.js +2 -0
  55. package/components/AppSidebar/AppSidebar.css +119 -28
  56. package/components/AppSidebar/AppSidebar.d.ts +10 -5
  57. package/components/AppSidebar/AppSidebar.js +19 -4
  58. package/components/ArtifactCard/ArtifactCard.css +11 -10
  59. package/components/ArtifactCard/ArtifactCard.js +3 -1
  60. package/components/ChatThread/ChatThread.css +6 -3
  61. package/components/Chip/Chip.css +9 -1
  62. package/components/CodeBlock/CodeBlock.css +2 -0
  63. package/components/CodeDiff/CodeDiff.css +18 -8
  64. package/components/CodeDiff/CodeDiff.js +1 -0
  65. package/components/Composer/Composer.css +52 -13
  66. package/components/Composer/Composer.d.ts +9 -1
  67. package/components/Composer/Composer.js +19 -1
  68. package/components/DataTable/FilterEditor.js +4 -2
  69. package/components/DataTable/filterModel.d.ts +8 -0
  70. package/components/DataTable/filterModel.js +4 -0
  71. package/components/DataTable/views.js +2 -2
  72. package/components/DocumentChip/DocumentChip.css +27 -3
  73. package/components/EntitySwitcher/EntitySwitcher.css +333 -0
  74. package/components/EntitySwitcher/EntitySwitcher.d.ts +74 -0
  75. package/components/EntitySwitcher/EntitySwitcher.js +291 -0
  76. package/components/InterruptCard/InterruptCard.css +96 -34
  77. package/components/InterruptCard/InterruptCard.d.ts +20 -3
  78. package/components/InterruptCard/InterruptCard.js +23 -8
  79. package/components/MessageCard/MessageCard.css +27 -18
  80. package/components/MessageCard/MessageCard.js +1 -0
  81. package/components/PromptSuggestions/PromptSuggestions.css +3 -0
  82. package/components/Prose/Prose.css +2 -0
  83. package/components/QuestionCard/QuestionCard.css +9 -5
  84. package/components/QuestionCard/QuestionCard.js +1 -0
  85. package/components/SourceTrail/SourceTrail.css +33 -11
  86. package/components/SourceTrail/SourceTrail.js +3 -2
  87. package/components/TableToolbar/TableToolbar.css +4 -1
  88. package/components/TableToolbar/TableToolbar.js +1 -1
  89. package/components/ThemePicker/ThemePicker.css +6 -0
  90. package/components/ThemePicker/ThemePicker.js +20 -11
  91. package/components/ThreadPanel/ThreadPanel.css +65 -36
  92. package/components/ThreadPanel/ThreadPanel.d.ts +5 -5
  93. package/components/ThreadPanel/ThreadPanel.js +1 -1
  94. package/components/ToolCall/ToolCall.css +89 -22
  95. package/components/ToolCall/ToolCall.js +2 -1
  96. package/components/UsageCard/UsageCard.css +29 -2
  97. package/components/UsageCard/UsageCard.js +1 -0
  98. package/components/registry.json +25 -1
  99. package/components/registry.json.d.ts +25 -1
  100. package/components/registry.json.js +1 -1
  101. package/fonts/presets/bricolage-grotesque-300-800-latin-ext.woff2 +0 -0
  102. package/fonts/presets/bricolage-grotesque-300-800-latin.woff2 +0 -0
  103. package/fonts/presets/figtree-300-800-latin-ext.woff2 +0 -0
  104. package/fonts/presets/figtree-300-800-latin.woff2 +0 -0
  105. package/index.d.ts +3 -0
  106. package/index.js +6 -0
  107. package/package.json +5 -1
  108. package/tokens/motion.d.ts +2 -0
  109. package/tokens/motion.js +2 -0
  110. package/tokens/presets/plum.css +413 -0
  111. package/tokens/presets/presets.css +1 -0
  112. package/tokens/registry.json +2 -0
  113. package/tokens/registry.json.d.ts +2 -0
  114. package/tokens/registry.json.js +1 -1
  115. package/tokens/tokens-dark.css +6 -2
  116. package/tokens/tokens-light.css +6 -2
  117. package/tokens/tokens-typography.css +8 -2
  118. package/tokens/values.json.js +1 -1
@@ -2,6 +2,7 @@
2
2
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
3
  import React, { useState, useRef, useId, useEffect } from "react";
4
4
  import { ChosenMark } from "../Dropdown/Dropdown.js";
5
+ import { Tooltip } from "../Tooltip/Tooltip.js";
5
6
  import { useAnchoredPosition } from "../../behaviors/useAnchoredPosition.js";
6
7
  import { useLayer } from "../../behaviors/useLayer.js";
7
8
  import "./ThemePicker.css";
@@ -101,18 +102,26 @@ const ThemePicker = React.forwardRef(
101
102
  className: [baseClass, `${baseClass}--${size}`, isOpen && `${baseClass}--open`, className].filter(Boolean).join(" "),
102
103
  children: [
103
104
  /* @__PURE__ */ jsx(
104
- "button",
105
+ Tooltip,
105
106
  {
106
- ref: triggerRef,
107
- type: "button",
108
- className: `${baseClass}__trigger`,
109
- "aria-label": active ? triggerLabel(active.label) : menuLabel,
110
- "aria-haspopup": "menu",
111
- "aria-expanded": isOpen,
112
- "aria-controls": isOpen ? menuId : void 0,
113
- disabled,
114
- onClick: () => setOpen(!isOpen),
115
- children: swatch(active, "swatch")
107
+ content: active ? triggerLabel(active.label) : menuLabel,
108
+ position: placement,
109
+ className: `${baseClass}__trigger-tip`,
110
+ children: /* @__PURE__ */ jsx(
111
+ "button",
112
+ {
113
+ ref: triggerRef,
114
+ type: "button",
115
+ className: `${baseClass}__trigger`,
116
+ "aria-label": active ? triggerLabel(active.label) : menuLabel,
117
+ "aria-haspopup": "menu",
118
+ "aria-expanded": isOpen,
119
+ "aria-controls": isOpen ? menuId : void 0,
120
+ disabled,
121
+ onClick: () => setOpen(!isOpen),
122
+ children: swatch(active, "swatch")
123
+ }
124
+ )
116
125
  }
117
126
  ),
118
127
  isOpen && !disabled && /* @__PURE__ */ jsxs(
@@ -61,7 +61,9 @@
61
61
  align-items: center;
62
62
  flex: none;
63
63
  min-width: 0;
64
- padding: var(--padding-150) var(--padding-200);
64
+ /* The top inset seats the logo and the toggle 20px down, AppSidebar's
65
+ top line. */
66
+ padding: var(--padding-100) var(--padding-200) var(--padding-150);
65
67
  margin-bottom: var(--gap-300);
66
68
  }
67
69
 
@@ -190,12 +192,11 @@
190
192
  display: none;
191
193
  }
192
194
 
193
- /* The glyph's ink stops a bearing short of its 24px box, so the box is
194
- pulled out by that much: the mark's right edge lands on the rail the
195
- rows' meta captions and the profile's caption end on. */
195
+ /* The toggle's box sits on the rail's trailing line, where AppSidebar's
196
+ does, 20px in; the rows' trailing items keep a step more room, inside
197
+ their pills. */
196
198
  .ds-thread-panel--expanded .ds-thread-panel__toggle {
197
199
  width: 24px;
198
- margin-inline-end: calc(-1 * var(--gap-100));
199
200
  opacity: 1;
200
201
  }
201
202
 
@@ -346,7 +347,7 @@
346
347
  }
347
348
 
348
349
  /* ============================================
349
- PROJECTS — standing rows under their own overline header
350
+ PROJECTS — standing rows under their own group heading
350
351
  Rows share the controls' anatomy (icon circles while collapsed, labels
351
352
  fading with the sweep); the header carries the section's name and the
352
353
  quiet new-project button, and fades out whole while collapsed — the
@@ -387,12 +388,10 @@
387
388
  min-width: 0;
388
389
  overflow: hidden;
389
390
  white-space: nowrap;
390
- font-family: var(--font-overline-family);
391
- font-size: var(--font-caption-size);
392
- font-weight: var(--font-overline-weight);
393
- line-height: var(--font-overline-line-height);
394
- letter-spacing: var(--font-overline-letter-spacing);
395
- text-transform: uppercase;
391
+ font-family: var(--font-paragraph-sm-family);
392
+ font-size: var(--font-paragraph-sm-size);
393
+ font-weight: var(--font-paragraph-sm-weight);
394
+ line-height: var(--font-paragraph-sm-line-height);
396
395
  color: var(--color-text-tertiary);
397
396
  }
398
397
 
@@ -509,23 +508,21 @@
509
508
  gap: var(--gap-050);
510
509
  }
511
510
 
512
- /* The overline face set one step down, at the caption's size: the labels
513
- sit among caption-sized meta and second lines, and the full overline
514
- outweighed the thread titles it files. The overline's own line-height
515
- stays, so the rhythm below is unchanged. Aligned with the text seat. The vertical padding
511
+ /* The rails' one group heading, AppSidebar's category and SidebarPanel's
512
+ group label: paragraph small in the tertiary text, mixed case. Its
513
+ 20px line is the overline's it replaced, so the rhythm below is
514
+ unchanged. On the rail's leading line, the logo's. The vertical padding
516
515
  is the rows' own inset restated — as if the label sat inside a row —
517
- so the overline keeps the pills' rhythm instead of hugging the
516
+ so the heading keeps the pills' rhythm instead of hugging the
518
517
  new-thread row above and the first thread below. */
519
518
  .ds-thread-panel__group-label {
520
519
  padding: var(--padding-200);
521
520
  overflow: hidden;
522
521
  white-space: nowrap;
523
- font-family: var(--font-overline-family);
524
- font-size: var(--font-caption-size);
525
- font-weight: var(--font-overline-weight);
526
- line-height: var(--font-overline-line-height);
527
- letter-spacing: var(--font-overline-letter-spacing);
528
- text-transform: uppercase;
522
+ font-family: var(--font-paragraph-sm-family);
523
+ font-size: var(--font-paragraph-sm-size);
524
+ font-weight: var(--font-paragraph-sm-weight);
525
+ line-height: var(--font-paragraph-sm-line-height);
529
526
  color: var(--color-text-tertiary);
530
527
  }
531
528
 
@@ -861,28 +858,45 @@
861
858
  pointer-events: auto;
862
859
  }
863
860
 
864
- /* --padding-100 centres the 32px avatar on the rail's axis (12 + 4) in
865
- both states, so it holds still like the header's mark; expanded, only
866
- the trailing inset deepens, landing the caption on the rows' meta rail. */
861
+ /* The footer's controls start on the rail's leading line, over the avatar,
862
+ where AppSidebar's do. */
863
+ .ds-thread-panel__footer-slot {
864
+ padding-inline-start: var(--padding-200);
865
+ }
866
+
867
+ /* The rails' one profile block, AppSidebar's: a 40px avatar, the name over
868
+ the meta line in paragraph type, AppSidebar's avatar-to-name gap.
869
+ Collapsed, the avatar sits on the rail's axis (12 + 40 + 12 = 64);
870
+ expanded, it glides to the rail's leading line, 20px in, as AppSidebar's
871
+ does. Only the inline padding moves, so the row's height never snaps. */
867
872
  .ds-thread-panel__profile {
868
- display: flex;
873
+ display: grid;
874
+ grid-template-columns: auto minmax(0, 1fr);
875
+ grid-template-areas: 'avatar name' 'avatar meta';
869
876
  align-items: center;
870
- gap: var(--gap-200);
877
+ column-gap: 10px; /* ds-allow(spacing): AppSidebar's avatar-to-name gap, between the 8px and 12px steps */
871
878
  min-width: 0;
872
- padding: var(--padding-100);
879
+ padding: var(--padding-200) 0 0;
873
880
  transition: padding var(--motion-duration-slow) var(--motion-ease-emphasized);
874
881
  }
875
882
 
876
883
  .ds-thread-panel--expanded .ds-thread-panel__profile {
877
- padding: var(--padding-100) var(--padding-200) var(--padding-100)
878
- var(--padding-100);
884
+ padding: var(--padding-200) var(--padding-200) 0;
879
885
  }
880
886
 
887
+ .ds-thread-panel__profile > :first-child {
888
+ grid-area: avatar;
889
+ }
890
+
891
+ /* The profile pairs its lines as EntitySwitcher does: the name in
892
+ paragraph-sm emphasis, the second line in caption, secondary. */
881
893
  .ds-thread-panel__profile-name {
882
- flex: 1;
894
+ grid-area: name;
895
+ align-self: end;
883
896
  min-width: 0;
884
897
  overflow: hidden;
885
898
  white-space: nowrap;
899
+ text-overflow: ellipsis;
886
900
  font-family: var(--font-paragraph-sm-emphasis-family);
887
901
  font-size: var(--font-paragraph-sm-emphasis-size);
888
902
  font-weight: var(--font-paragraph-sm-emphasis-weight);
@@ -897,14 +911,17 @@
897
911
  }
898
912
 
899
913
  .ds-thread-panel__profile-meta {
900
- flex: none;
914
+ grid-area: meta;
915
+ align-self: start;
916
+ min-width: 0;
901
917
  overflow: hidden;
902
918
  white-space: nowrap;
919
+ text-overflow: ellipsis;
903
920
  font-family: var(--font-caption-family);
904
921
  font-size: var(--font-caption-size);
905
922
  font-weight: var(--font-caption-weight);
906
923
  line-height: var(--font-caption-line-height);
907
- color: var(--color-text-tertiary);
924
+ color: var(--color-text-secondary);
908
925
  opacity: 0;
909
926
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
910
927
  }
@@ -923,9 +940,21 @@
923
940
  dots under the pen's visible edge while the glyph itself stays centred
924
941
  under the logo. None of it shows collapsed, so nothing moves. */
925
942
  .ds-thread-panel__thread,
926
- .ds-thread-panel__group-label,
927
- .ds-thread-panel__projects-header,
928
943
  .ds-thread-panel__more,
929
944
  .ds-thread-panel__rename {
930
945
  padding-inline-start: var(--padding-300);
931
946
  }
947
+
948
+ /* Group headings sit on the rail's leading line, the logo's and the row
949
+ icons', where AppSidebar's category does. */
950
+ .ds-thread-panel__group-label,
951
+ .ds-thread-panel__projects-header {
952
+ padding-inline-start: var(--padding-200);
953
+ }
954
+
955
+ /* A row's trailing item (the meta caption) keeps AppSidebar's badge room
956
+ from its pill's end, a step more than the pill's own inset. */
957
+ .ds-thread-panel__thread,
958
+ .ds-thread-panel__project {
959
+ padding-inline-end: var(--padding-300);
960
+ }
@@ -44,7 +44,7 @@ export interface ThreadPanelThread {
44
44
  pinned?: boolean;
45
45
  }
46
46
  export interface ThreadPanelGroup {
47
- /** Group heading in the overline face, e.g. a project or repo name. Omit for an unlabelled run of threads. */
47
+ /** Group heading in the rails' shared mixed-case style, e.g. a project or repo name. Omit for an unlabelled run of threads. */
48
48
  label?: string;
49
49
  /** The group's threads, in display order. */
50
50
  threads: ThreadPanelThread[];
@@ -76,9 +76,9 @@ export interface ThreadPanelProject {
76
76
  export interface ThreadPanelProfile {
77
77
  /** The signed-in person's display name; also seeds the Avatar's initials. */
78
78
  name: string;
79
- /** Quiet caption beside the name, e.g. the plan or workspace. */
79
+ /** The quiet second line under the name, e.g. the person's email, plan or workspace (AppSidebar's profile block carries the email there). */
80
80
  meta?: string;
81
- /** Replace the initials Avatar with a custom element, e.g. an `<Avatar src>`. */
81
+ /** Replace the initials Avatar with a custom element, e.g. an `<Avatar src>`; the row seats a 40px mark (Avatar at `md`). */
82
82
  avatar?: React.ReactNode;
83
83
  }
84
84
  /** Props owned by ThreadPanel itself — everything else falls through to the root `<div>`. */
@@ -134,9 +134,9 @@ type ThreadPanelOwnProps = {
134
134
  controls?: ThreadPanelControl[];
135
135
  /** Fires with the clicked control's id. Rows with an `href` navigate as well. */
136
136
  onControlSelect?: (id: string) => void;
137
- /** Project rows between the standing controls and the history, under their own overline header. The section renders only when non-empty; collapsed, the rows fold to icon circles like the controls. */
137
+ /** Project rows between the standing controls and the history, under their own group heading. The section renders only when non-empty; collapsed, the rows fold to icon circles like the controls. */
138
138
  projects?: ThreadPanelProject[];
139
- /** The projects section's overline header text. */
139
+ /** The projects section's group heading text. */
140
140
  projectsLabel?: string;
141
141
  /** Id of the open project. Its row renders filled and carries `aria-current`. */
142
142
  activeProjectId?: string;
@@ -515,7 +515,7 @@ const ThreadPanel = React.forwardRef(
515
515
  className: `${baseClass}__profile`,
516
516
  title: expanded ? void 0 : profile.name,
517
517
  children: [
518
- profile.avatar ?? /* @__PURE__ */ jsx(Avatar, { name: profile.name, size: "sm" }),
518
+ profile.avatar ?? /* @__PURE__ */ jsx(Avatar, { name: profile.name, size: "md" }),
519
519
  /* @__PURE__ */ jsx("span", { className: `${baseClass}__profile-name`, children: profile.name }),
520
520
  profile.meta && /* @__PURE__ */ jsx("span", { className: `${baseClass}__profile-meta`, children: profile.meta })
521
521
  ]
@@ -22,12 +22,12 @@
22
22
  display: flex;
23
23
  flex-direction: column;
24
24
  width: 100%;
25
- background-color: var(--color-bg-container-primary);
26
- border: var(--border-025) solid var(--color-bg-container-border);
25
+ background-color: var(--ds-chat-card-bg);
26
+ border: var(--ds-chat-card-border);
27
27
  /* The chat furniture shares one 24px shell with MessageCard and the
28
28
  bubbles; a closed row rounds to a capsule the way a one-line bubble
29
29
  does, echoing the system's pill buttons. */
30
- border-radius: var(--radius-600);
30
+ border-radius: var(--ds-chat-card-radius);
31
31
  overflow: hidden;
32
32
  }
33
33
 
@@ -40,8 +40,11 @@
40
40
  align-items: center;
41
41
  gap: var(--gap-200);
42
42
  width: 100%;
43
- /* 20px sides — the card family's shared content inset. */
44
- padding: var(--padding-200) var(--padding-500);
43
+ /* The chat cards' one-row height: a compact control and 4px above and
44
+ below, so a label row and a row holding a button are the same height. */
45
+ box-sizing: border-box;
46
+ min-height: var(--ds-chat-card-row-height);
47
+ padding: var(--ds-chat-card-row-pad) var(--ds-chat-card-inset);
45
48
  background: none;
46
49
  border: none;
47
50
  /* Buttons default to the UA's buttontext, not the inherited colour, so
@@ -75,26 +78,39 @@
75
78
  align-items: center;
76
79
  justify-content: center;
77
80
  flex: none;
81
+ /* Fixed box: the running spinner (16px) is smaller than the status
82
+ icons (20px), so without it the text beside it shifts as the state
83
+ changes. AgentPlan's step indicator does the same. */
84
+ width: var(--icon-size-500);
85
+ height: var(--icon-size-500);
78
86
  color: var(--ds-tool-call-icon-color);
87
+ /* The status glyph trails, beside the status word it stands for, so the
88
+ tool name starts on the card's inset edge like every chat card's text.
89
+ The auto margin pushes the status group right when no summary fills
90
+ the row. */
91
+ order: 1;
92
+ margin-inline-start: auto;
79
93
  }
80
94
 
81
95
  .ds-tool-call__indicator .material-symbols-rounded {
82
96
  --icon-size: var(--icon-size-500);
83
97
  }
84
98
 
85
- /* The tool name is an identifier, so it takes the code stack —
86
- the one place the system leaves Nunito Sans. It yields to the status
87
- when the row is short of room, ending in an ellipsis, so a long name
88
- never pushes the status out of the card. */
99
+ /* The tool name is the row's label, set like every chat card's one-row
100
+ label so the headers read as one set; the code stack stays for the
101
+ code inside. It yields to the status when the row is short of room,
102
+ ending in an ellipsis, so a long name never pushes the status out. */
89
103
  .ds-tool-call__name {
90
104
  flex: 0 1 auto;
91
105
  min-width: 0;
92
106
  overflow: hidden;
93
107
  text-overflow: ellipsis;
94
108
  white-space: nowrap;
95
- font-family: var(--font-family-code);
96
- font-size: var(--font-paragraph-sm-size);
97
- line-height: var(--font-paragraph-sm-line-height);
109
+ font-family: var(--font-paragraph-sm-emphasis-family);
110
+ font-size: var(--font-paragraph-sm-emphasis-size);
111
+ font-weight: var(--font-paragraph-sm-emphasis-weight);
112
+ line-height: var(--font-paragraph-sm-emphasis-line-height);
113
+ letter-spacing: var(--font-paragraph-sm-emphasis-letter-spacing);
98
114
  color: var(--color-text-primary);
99
115
  }
100
116
 
@@ -115,8 +131,8 @@
115
131
  }
116
132
 
117
133
  .ds-tool-call__status {
134
+ order: 2;
118
135
  flex: none;
119
- margin-inline-start: auto;
120
136
  color: var(--ds-tool-call-color);
121
137
  font-family: var(--font-paragraph-sm-emphasis-family);
122
138
  font-size: var(--font-paragraph-sm-emphasis-size);
@@ -126,13 +142,9 @@
126
142
  white-space: nowrap;
127
143
  }
128
144
 
129
- /* A summary already claims the free space; without one the status still
130
- needs pushing to the right, which the auto margin above handles */
131
- .ds-tool-call__summary ~ .ds-tool-call__status {
132
- margin-inline-start: 0;
133
- }
134
145
 
135
146
  .ds-tool-call__duration {
147
+ order: 3;
136
148
  flex: none;
137
149
  color: var(--color-text-tertiary);
138
150
  font-family: var(--font-paragraph-sm-family);
@@ -146,6 +158,7 @@
146
158
 
147
159
  .ds-tool-call__chevron {
148
160
  --icon-size: var(--icon-size-500);
161
+ order: 4;
149
162
 
150
163
  flex: none;
151
164
  color: var(--color-icon-secondary);
@@ -198,13 +211,17 @@
198
211
  visibility: visible;
199
212
  }
200
213
 
201
- .ds-tool-call__content {
214
+ /* The grid row animates the clip, which has no box of its own, so it can
215
+ shrink to nothing. Padding and the divider live on the content inside it
216
+ in both states: toggled with the open class they would snap in on the
217
+ first frame and out before the row had closed. */
218
+ .ds-tool-call__clip {
202
219
  overflow: hidden;
203
220
  min-height: 0;
204
221
  }
205
222
 
206
- .ds-tool-call--open .ds-tool-call__content {
207
- padding: var(--padding-400) var(--padding-500);
223
+ .ds-tool-call__content {
224
+ padding: var(--ds-chat-card-edge) var(--ds-chat-card-inset);
208
225
  border-top: var(--border-025) solid var(--color-divider);
209
226
  }
210
227
 
@@ -227,7 +244,7 @@
227
244
  align-items: center;
228
245
  justify-content: flex-start;
229
246
  gap: var(--gap-200);
230
- padding: var(--padding-200) var(--padding-500) var(--padding-400);
247
+ padding: var(--padding-200) var(--ds-chat-card-inset) var(--ds-chat-card-edge);
231
248
  }
232
249
 
233
250
  /* Icons take the colour of the text around them. Explicit, not just
@@ -240,3 +257,53 @@
240
257
  .ds-tool-call .material-symbols-rounded:not(.ds-tool-call__chevron) {
241
258
  color: inherit;
242
259
  }
260
+
261
+ /* ============================================
262
+ NO CARD IN A CARD
263
+ A code block in the panel is the panel's
264
+ content, not a second card: it sheds its frame
265
+ and its header bar, the code sits on the card's
266
+ inset, and Copy moves to the footer's place at
267
+ the bottom left, drawn as the compact secondary
268
+ button the card's other actions are. A code
269
+ block standing on its own keeps its header.
270
+ ============================================ */
271
+
272
+ .ds-tool-call__content > .ds-code-block {
273
+ border: none;
274
+ border-radius: 0;
275
+ background-color: transparent;
276
+ }
277
+
278
+ .ds-tool-call__content > .ds-code-block .ds-code-block__header {
279
+ order: 1;
280
+ justify-content: flex-start;
281
+ /* 16px off the code, the chat cards' block seam. */
282
+ margin-block-start: var(--gap-400);
283
+ padding: 0;
284
+ border-bottom: none;
285
+ }
286
+
287
+ /* The language is the reader's to see in the code; the label goes. */
288
+ .ds-tool-call__content > .ds-code-block .ds-code-block__language {
289
+ display: none;
290
+ }
291
+
292
+ /* With the label gone the group around it has nothing to hold, so it
293
+ leaves the row rather than push Copy off the inset edge. */
294
+ .ds-tool-call__content > .ds-code-block .ds-code-block__meta {
295
+ display: contents;
296
+ }
297
+
298
+ .ds-tool-call__content > .ds-code-block .ds-code-block__copy {
299
+ box-sizing: border-box;
300
+ gap: var(--gap-200);
301
+ height: var(--control-height-compact);
302
+ padding: 0 var(--padding-300);
303
+ border: var(--border-025) solid var(--color-action-primary-border);
304
+ color: var(--color-text-primary);
305
+ }
306
+
307
+ .ds-tool-call__content > .ds-code-block .ds-code-block__pre {
308
+ padding: 0;
309
+ }
@@ -3,6 +3,7 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
3
  import React, { useId, useState, useCallback } from "react";
4
4
  import { Spinner } from "../Spinner/Spinner.js";
5
5
  import "./ToolCall.css";
6
+ import "../../behaviors/chat-card.css";
6
7
  import "../../fonts/material-symbols.css";
7
8
  const DEFAULT_STATUS_LABELS = {
8
9
  pending: "Needs approval",
@@ -77,7 +78,7 @@ const ToolCall = React.forwardRef(
77
78
  id: panelId,
78
79
  role: "region",
79
80
  "aria-labelledby": triggerId,
80
- children: /* @__PURE__ */ jsx("div", { className: `${baseClass}__content`, children })
81
+ children: /* @__PURE__ */ jsx("div", { className: `${baseClass}__clip`, children: /* @__PURE__ */ jsx("div", { className: `${baseClass}__content`, children }) })
81
82
  }
82
83
  ),
83
84
  actions && /* @__PURE__ */ jsx("div", { className: `${baseClass}__actions`, children: actions })
@@ -4,12 +4,39 @@
4
4
  with reset captions, in the chart card chrome
5
5
  ============================================ */
6
6
 
7
- /* Base — the card chrome itself comes from ds-chart */
7
+ /* Base — the card chrome itself comes from ds-chart. In a chat it is one
8
+ of the chat cards, so it takes their padding, title and rhythm: 12px
9
+ above and below inside 20px sides, a title-body title with its subtitle
10
+ 8px under it, and 16px between blocks. */
11
+ .ds-usage-card.ds-chart:not(.ds-chart--bare) {
12
+ padding: var(--ds-chat-card-edge) var(--ds-chat-card-inset);
13
+ border: var(--ds-chat-card-border);
14
+ border-radius: var(--ds-chat-card-radius);
15
+ background-color: var(--ds-chat-card-bg);
16
+ }
17
+
18
+ .ds-usage-card.ds-chart {
19
+ gap: var(--ds-chat-card-gap-block);
20
+ }
21
+
22
+ .ds-usage-card .ds-chart__header-text {
23
+ gap: var(--ds-chat-card-gap-subline);
24
+ }
25
+
26
+ .ds-usage-card .ds-chart__title {
27
+ font-family: var(--font-title-body-family);
28
+ font-size: var(--font-title-body-size);
29
+ font-weight: var(--font-title-body-weight);
30
+ line-height: var(--font-title-body-line-height);
31
+ letter-spacing: var(--font-title-body-letter-spacing);
32
+ color: var(--color-text-primary);
33
+ }
34
+
8
35
 
9
36
  .ds-usage-card__items {
10
37
  display: flex;
11
38
  flex-direction: column;
12
- gap: var(--gap-500);
39
+ gap: var(--gap-400);
13
40
  }
14
41
 
15
42
  .ds-usage-card__item {
@@ -3,6 +3,7 @@ import React from "react";
3
3
  import { Meter } from "../Meter/Meter.js";
4
4
  import "../Chart/Chart.css";
5
5
  import "./UsageCard.css";
6
+ import "../../behaviors/chat-card.css";
6
7
  import { DEFAULT_LOCALE } from "../../behaviors/locale.js";
7
8
  const DEFAULT_THRESHOLDS = { warning: 0.8, error: 0.95 };
8
9
  const UsageCard = React.forwardRef(
@@ -71,6 +71,22 @@
71
71
  "category": "data-display",
72
72
  "client": true
73
73
  },
74
+ {
75
+ "name": "ActionCard",
76
+ "label": "Action card",
77
+ "slug": "action-card",
78
+ "description": "A change an assistant proposes and the reader confirms, then the record of what happened, with Undo while it can be reversed.",
79
+ "category": "ai",
80
+ "client": false
81
+ },
82
+ {
83
+ "name": "ActionReadout",
84
+ "label": "Action readout",
85
+ "slug": "action-readout",
86
+ "description": "What a confirmed change did: a title over a list of facts, worked out from the records as they were just before it.",
87
+ "category": "ai",
88
+ "client": false
89
+ },
74
90
  {
75
91
  "name": "AgentPlan",
76
92
  "label": "Agent plan",
@@ -139,7 +155,7 @@
139
155
  "name": "AppLayout",
140
156
  "label": "App layout",
141
157
  "slug": "app-layout",
142
- "description": "Full-page template pairing the collapsible App sidebar with a content area, centred or set in an inset surface.",
158
+ "description": "Full-page template pairing the collapsible App sidebar with a content area, in one of the three app shell modes: flush, floating or inset.",
143
159
  "category": "layout",
144
160
  "client": true
145
161
  },
@@ -562,6 +578,14 @@
562
578
  "category": "data-display",
563
579
  "client": false
564
580
  },
581
+ {
582
+ "name": "EntitySwitcher",
583
+ "label": "Entity switcher",
584
+ "slug": "entity-switcher",
585
+ "description": "Switcher for the company, team, or account a screen is scoped to, with a logo, icon, or initials mark and levels that drill in.",
586
+ "category": "navigation",
587
+ "client": true
588
+ },
565
589
  {
566
590
  "name": "EventCalendar",
567
591
  "label": "Event calendar",
@@ -71,6 +71,22 @@ declare const _default: {
71
71
  "category": "data-display",
72
72
  "client": true
73
73
  },
74
+ {
75
+ "name": "ActionCard",
76
+ "label": "Action card",
77
+ "slug": "action-card",
78
+ "description": "A change an assistant proposes and the reader confirms, then the record of what happened, with Undo while it can be reversed.",
79
+ "category": "ai",
80
+ "client": false
81
+ },
82
+ {
83
+ "name": "ActionReadout",
84
+ "label": "Action readout",
85
+ "slug": "action-readout",
86
+ "description": "What a confirmed change did: a title over a list of facts, worked out from the records as they were just before it.",
87
+ "category": "ai",
88
+ "client": false
89
+ },
74
90
  {
75
91
  "name": "AgentPlan",
76
92
  "label": "Agent plan",
@@ -139,7 +155,7 @@ declare const _default: {
139
155
  "name": "AppLayout",
140
156
  "label": "App layout",
141
157
  "slug": "app-layout",
142
- "description": "Full-page template pairing the collapsible App sidebar with a content area, centred or set in an inset surface.",
158
+ "description": "Full-page template pairing the collapsible App sidebar with a content area, in one of the three app shell modes: flush, floating or inset.",
143
159
  "category": "layout",
144
160
  "client": true
145
161
  },
@@ -562,6 +578,14 @@ declare const _default: {
562
578
  "category": "data-display",
563
579
  "client": false
564
580
  },
581
+ {
582
+ "name": "EntitySwitcher",
583
+ "label": "Entity switcher",
584
+ "slug": "entity-switcher",
585
+ "description": "Switcher for the company, team, or account a screen is scoped to, with a logo, icon, or initials mark and levels that drill in.",
586
+ "category": "navigation",
587
+ "client": true
588
+ },
565
589
  {
566
590
  "name": "EventCalendar",
567
591
  "label": "Event calendar",