@thewhatmatters/wmds 0.3.0 → 0.4.1

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 (243) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/CONSUMING.md +9 -4
  3. package/dist/collapse.css +9 -1
  4. package/dist/colors.css +7 -0
  5. package/dist/components/atoms/Badge/Badge.d.ts +16 -4
  6. package/dist/components/atoms/Badge/Badge.d.ts.map +1 -1
  7. package/dist/components/atoms/Badge/Badge.js +54 -42
  8. package/dist/components/atoms/Badge/badgeStyles.d.ts +12 -2
  9. package/dist/components/atoms/Badge/badgeStyles.d.ts.map +1 -1
  10. package/dist/components/atoms/Badge/badgeStyles.js +24 -13
  11. package/dist/components/atoms/Button/Button.d.ts +11 -3
  12. package/dist/components/atoms/Button/Button.d.ts.map +1 -1
  13. package/dist/components/atoms/Button/Button.js +118 -98
  14. package/dist/components/atoms/Button/ButtonStatusButton.d.ts +3 -1
  15. package/dist/components/atoms/Button/ButtonStatusButton.d.ts.map +1 -1
  16. package/dist/components/atoms/Button/ButtonStatusButton.js +19 -18
  17. package/dist/components/atoms/Button/ButtonStatusContent.d.ts +7 -1
  18. package/dist/components/atoms/Button/ButtonStatusContent.d.ts.map +1 -1
  19. package/dist/components/atoms/Button/ButtonStatusContent.js +9 -6
  20. package/dist/components/atoms/Button/buttonStatusStyles.d.ts +5 -0
  21. package/dist/components/atoms/Button/buttonStatusStyles.d.ts.map +1 -1
  22. package/dist/components/atoms/Button/buttonStatusStyles.js +10 -10
  23. package/dist/components/atoms/Button/buttonStyles.d.ts +2 -0
  24. package/dist/components/atoms/Button/buttonStyles.d.ts.map +1 -1
  25. package/dist/components/atoms/Button/buttonStyles.js +12 -12
  26. package/dist/components/atoms/Checkbox/Checkbox.d.ts +7 -0
  27. package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
  28. package/dist/components/atoms/Checkbox/Checkbox.js +86 -69
  29. package/dist/components/atoms/Checkbox/checkboxStyles.d.ts +6 -0
  30. package/dist/components/atoms/Checkbox/checkboxStyles.d.ts.map +1 -1
  31. package/dist/components/atoms/Checkbox/checkboxStyles.js +11 -11
  32. package/dist/components/atoms/IconButton/IconButton.d.ts +5 -0
  33. package/dist/components/atoms/IconButton/IconButton.d.ts.map +1 -1
  34. package/dist/components/atoms/IconButton/IconButton.js +73 -68
  35. package/dist/components/atoms/IconButton/iconButtonStyles.d.ts +5 -0
  36. package/dist/components/atoms/IconButton/iconButtonStyles.d.ts.map +1 -1
  37. package/dist/components/atoms/IconButton/iconButtonStyles.js +4 -4
  38. package/dist/components/atoms/Kbd/useKbdChoiceKeys.d.ts +13 -4
  39. package/dist/components/atoms/Kbd/useKbdChoiceKeys.d.ts.map +1 -1
  40. package/dist/components/atoms/Kbd/useKbdChoiceKeys.js +32 -13
  41. package/dist/components/atoms/Prose/Prose.d.ts +23 -0
  42. package/dist/components/atoms/Prose/Prose.d.ts.map +1 -0
  43. package/dist/components/atoms/Prose/Prose.js +15 -0
  44. package/dist/components/atoms/Prose/proseStyles.d.ts +17 -0
  45. package/dist/components/atoms/Prose/proseStyles.d.ts.map +1 -0
  46. package/dist/components/atoms/Prose/proseStyles.js +16 -0
  47. package/dist/components/atoms/SectionCaption/SectionCaption.d.ts +26 -0
  48. package/dist/components/atoms/SectionCaption/SectionCaption.d.ts.map +1 -0
  49. package/dist/components/atoms/SectionCaption/SectionCaption.js +25 -0
  50. package/dist/components/atoms/SectionCaption/sectionCaptionStyles.d.ts +11 -0
  51. package/dist/components/atoms/SectionCaption/sectionCaptionStyles.d.ts.map +1 -0
  52. package/dist/components/atoms/SectionCaption/sectionCaptionStyles.js +12 -0
  53. package/dist/components/atoms/TextLink/TextLink.d.ts +10 -2
  54. package/dist/components/atoms/TextLink/TextLink.d.ts.map +1 -1
  55. package/dist/components/atoms/TextLink/TextLink.js +15 -15
  56. package/dist/components/atoms/TextLink/textLinkStyles.d.ts +13 -0
  57. package/dist/components/atoms/TextLink/textLinkStyles.d.ts.map +1 -1
  58. package/dist/components/atoms/TextLink/textLinkStyles.js +7 -3
  59. package/dist/components/molecules/Accordion/Accordion.d.ts +6 -1
  60. package/dist/components/molecules/Accordion/Accordion.d.ts.map +1 -1
  61. package/dist/components/molecules/Accordion/Accordion.js +57 -50
  62. package/dist/components/molecules/Accordion/accordionStyles.d.ts +9 -0
  63. package/dist/components/molecules/Accordion/accordionStyles.d.ts.map +1 -1
  64. package/dist/components/molecules/Accordion/accordionStyles.js +2 -2
  65. package/dist/components/molecules/CheckboxGroup/CheckboxGroupItem.d.ts +5 -1
  66. package/dist/components/molecules/CheckboxGroup/CheckboxGroupItem.d.ts.map +1 -1
  67. package/dist/components/molecules/CheckboxGroup/CheckboxGroupItem.js +12 -10
  68. package/dist/components/molecules/DescriptionList/DescriptionList.d.ts +37 -0
  69. package/dist/components/molecules/DescriptionList/DescriptionList.d.ts.map +1 -0
  70. package/dist/components/molecules/DescriptionList/DescriptionList.js +50 -0
  71. package/dist/components/molecules/DescriptionList/descriptionListStyles.d.ts +21 -0
  72. package/dist/components/molecules/DescriptionList/descriptionListStyles.d.ts.map +1 -0
  73. package/dist/components/molecules/DescriptionList/descriptionListStyles.js +27 -0
  74. package/dist/components/molecules/IndexList/IndexList.d.ts +58 -0
  75. package/dist/components/molecules/IndexList/IndexList.d.ts.map +1 -0
  76. package/dist/components/molecules/IndexList/IndexList.js +96 -0
  77. package/dist/components/molecules/IndexList/indexListStyles.d.ts +29 -0
  78. package/dist/components/molecules/IndexList/indexListStyles.d.ts.map +1 -0
  79. package/dist/components/molecules/IndexList/indexListStyles.js +24 -0
  80. package/dist/components/molecules/PromptBar/PromptBar.d.ts +11 -1
  81. package/dist/components/molecules/PromptBar/PromptBar.d.ts.map +1 -1
  82. package/dist/components/molecules/PromptBar/PromptBar.js +54 -43
  83. package/dist/components/molecules/PromptBar/promptBarStyles.d.ts +16 -0
  84. package/dist/components/molecules/PromptBar/promptBarStyles.d.ts.map +1 -1
  85. package/dist/components/molecules/PromptBar/promptBarStyles.js +5 -2
  86. package/dist/components/organisms/ChatDock/ChatDock.d.ts +203 -0
  87. package/dist/components/organisms/ChatDock/ChatDock.d.ts.map +1 -0
  88. package/dist/components/organisms/ChatDock/ChatDock.js +697 -0
  89. package/dist/components/organisms/ChatDock/ChatDockGate.d.ts +52 -0
  90. package/dist/components/organisms/ChatDock/ChatDockGate.d.ts.map +1 -0
  91. package/dist/components/organisms/ChatDock/ChatDockGate.js +161 -0
  92. package/dist/components/organisms/ChatDock/chatDockGateStyles.d.ts +16 -0
  93. package/dist/components/organisms/ChatDock/chatDockGateStyles.d.ts.map +1 -0
  94. package/dist/components/organisms/ChatDock/chatDockGateStyles.js +8 -0
  95. package/dist/components/organisms/ChatDock/chatDockStyles.d.ts +98 -0
  96. package/dist/components/organisms/ChatDock/chatDockStyles.d.ts.map +1 -0
  97. package/dist/components/organisms/ChatDock/chatDockStyles.js +21 -0
  98. package/dist/components/organisms/ChatDock/chatDockViewport.d.ts +21 -0
  99. package/dist/components/organisms/ChatDock/chatDockViewport.d.ts.map +1 -0
  100. package/dist/components/organisms/ChatDock/chatDockViewport.js +46 -0
  101. package/dist/components/organisms/Dialog/AlertDialog.js +11 -11
  102. package/dist/components/organisms/Dialog/Dialog.js +44 -44
  103. package/dist/components/organisms/Sheet/Sheet.js +38 -38
  104. package/dist/components/organisms/Toast/Toast.js +5 -5
  105. package/dist/index.d.ts +7 -2
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +122 -110
  108. package/dist/lib/compositionAudit.d.ts.map +1 -1
  109. package/dist/lib/typography.d.ts +2 -2
  110. package/dist/lib/typography.d.ts.map +1 -1
  111. package/dist/lib/typography.js +27 -1
  112. package/dist/styles.css +1 -1
  113. package/dist/theme.css +1 -0
  114. package/dist/typography.css +34 -0
  115. package/docs/README.md +1 -1
  116. package/docs/component-contracts.md +16 -1
  117. package/docs/components.md +16 -11
  118. package/docs/exports.json +81 -4
  119. package/docs/patterns/components-accordion--flush.tsx +29 -0
  120. package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
  121. package/docs/patterns/components-badge--outline-tags.tsx +25 -0
  122. package/docs/patterns/components-badge--with-avatar.tsx +1 -1
  123. package/docs/patterns/components-button-button--copy-button.tsx +39 -0
  124. package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
  125. package/docs/patterns/components-button-button--external-link.tsx +30 -0
  126. package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
  127. package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
  128. package/docs/patterns/components-button-button--link-render.tsx +1 -1
  129. package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
  130. package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
  131. package/docs/patterns/components-button-button--primary-action.tsx +1 -1
  132. package/docs/patterns/components-button-button--row-hug.tsx +1 -1
  133. package/docs/patterns/components-button-button--row-layout.tsx +1 -1
  134. package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
  135. package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
  136. package/docs/patterns/components-button-button--with-count.tsx +1 -1
  137. package/docs/patterns/components-button-button--with-icon.tsx +1 -1
  138. package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
  139. package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
  140. package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
  141. package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
  142. package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
  143. package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
  144. package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
  145. package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
  146. package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
  147. package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
  148. package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
  149. package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
  150. package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
  151. package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
  152. package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +158 -0
  153. package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +180 -0
  154. package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
  155. package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
  156. package/docs/patterns/components-checkbox-checkbox--with-count.tsx +19 -0
  157. package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
  158. package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
  159. package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +17 -0
  160. package/docs/patterns/components-descriptionlist--details.tsx +21 -0
  161. package/docs/patterns/components-descriptionlist--post-metadata.tsx +52 -0
  162. package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
  163. package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
  164. package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
  165. package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
  166. package/docs/patterns/components-field--horizontal-input.tsx +1 -1
  167. package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
  168. package/docs/patterns/components-field--multi-control.tsx +1 -1
  169. package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
  170. package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
  171. package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
  172. package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
  173. package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
  174. package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
  175. package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
  176. package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
  177. package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
  178. package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
  179. package/docs/patterns/components-indexlist--post-index.tsx +36 -0
  180. package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
  181. package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
  182. package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
  183. package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
  184. package/docs/patterns/components-kbd--command-row.tsx +1 -1
  185. package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
  186. package/docs/patterns/components-kbd--shortcut.tsx +1 -1
  187. package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
  188. package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
  189. package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
  190. package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
  191. package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
  192. package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
  193. package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
  194. package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
  195. package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
  196. package/docs/patterns/components-prose--article-body.tsx +11 -0
  197. package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
  198. package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
  199. package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
  200. package/docs/patterns/components-sectioncaption--column-caption.tsx +16 -0
  201. package/docs/patterns/components-sectioncaption--with-action.tsx +19 -0
  202. package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
  203. package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
  204. package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
  205. package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
  206. package/docs/patterns/components-sitenav--compact.tsx +1 -1
  207. package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
  208. package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
  209. package/docs/patterns/components-stat--insights-row.tsx +1 -1
  210. package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
  211. package/docs/patterns/components-switch--default.tsx +1 -1
  212. package/docs/patterns/components-switch--settings-row.tsx +1 -1
  213. package/docs/patterns/components-tab--settings-pages.tsx +1 -1
  214. package/docs/patterns/components-taskrows--action-details.tsx +1 -1
  215. package/docs/patterns/components-taskrows--capsules.tsx +1 -1
  216. package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
  217. package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
  218. package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
  219. package/docs/patterns/components-taskrows--status-list.tsx +1 -1
  220. package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
  221. package/docs/patterns/components-textlink--external-destination.tsx +1 -1
  222. package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
  223. package/docs/patterns/components-textlink--quiet-title.tsx +15 -0
  224. package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
  225. package/docs/patterns/components-textsequence--default.tsx +1 -1
  226. package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
  227. package/docs/patterns/components-textsequence--shapes.tsx +1 -1
  228. package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
  229. package/docs/patterns/components-tooltip--controlled.tsx +1 -1
  230. package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
  231. package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
  232. package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
  233. package/docs/patterns/components-tooltip--placement.tsx +1 -1
  234. package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
  235. package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
  236. package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
  237. package/docs/patterns/guides-filter-panel--filtered-index.tsx +174 -0
  238. package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
  239. package/docs/patterns/guides-post-page--post-page.tsx +143 -0
  240. package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
  241. package/docs/patterns/index.json +137 -9
  242. package/package.json +1 -1
  243. package/docs/patterns/components-promptbar--pattern-marketing-composer.tsx +0 -37
@@ -0,0 +1,203 @@
1
+ import { type ReactElement, type ReactNode } from "react";
2
+ import { type ChatDockPlacement } from "./chatDockStyles";
3
+ export { chatDockPlacements, type ChatDockPlacement } from "./chatDockStyles";
4
+ export { ChatDockGate, chatDockGateDefaultLabels, type ChatDockGateLabels, type ChatDockGateProps, } from "./ChatDockGate";
5
+ /** Layout-only — margin and placement. Not for colors or type. */
6
+ export type ChatDockLayoutClassName = string;
7
+ export interface ChatDockSuggestion {
8
+ id: string;
9
+ label: string;
10
+ /** Leading Lucide icon element, for example `<DollarSign />`. */
11
+ icon?: ReactElement;
12
+ /**
13
+ * Sent as the visitor's message when chosen. Suggestions with a prompt also show as pills
14
+ * above the resting composer. Omit it for an action such as **Get started** — then only
15
+ * `onSuggestionSelect` runs.
16
+ */
17
+ prompt?: string;
18
+ }
19
+ /** The visitor's vote on a reply. `null` is no vote. */
20
+ export type ChatDockFeedback = "up" | "down" | null;
21
+ /** A short note under a reply — for example how sure the assistant was of its match. */
22
+ export interface ChatDockMessageMeta {
23
+ /** The note itself, short — for example "Match 99%". */
24
+ label: string;
25
+ /** What the note means, for screen readers — for example "How sure the assistant is that it matched your question." */
26
+ description?: string;
27
+ }
28
+ export interface ChatDockMessage {
29
+ id: string;
30
+ role: "user" | "assistant";
31
+ /** Text, or Markdown the app has already rendered. ChatDock does not parse Markdown. */
32
+ content: ReactNode;
33
+ /** Replies only: the text **Copy** writes to the clipboard. Shows Copy under the reply. */
34
+ copyText?: string;
35
+ /** Replies only: a short muted note under the reply, such as the match score. */
36
+ meta?: ChatDockMessageMeta;
37
+ /**
38
+ * Replies only: the visitor's vote — `null` until they vote. The thumbs show on replies that carry
39
+ * it, when `onMessageFeedback` is passed. Leave it out on replies that take no vote, such as a
40
+ * summary of a form.
41
+ */
42
+ feedback?: ChatDockFeedback;
43
+ }
44
+ export interface ChatDockLabels {
45
+ /** Close control. Default: "Close chat". */
46
+ close: string;
47
+ /** Shown while `thinking`. Default: "Thinking…". */
48
+ thinking: string;
49
+ /** Accessible name for the message list. Default: "Conversation". */
50
+ conversation: string;
51
+ /** Accessible name for the suggestion groups. Default: "Suggested questions". */
52
+ suggestions: string;
53
+ /** Accessible name for the follow-ups under the latest reply. Default: "Suggested follow-ups". */
54
+ followUps: string;
55
+ /** Accessible name for the field. Default: "Ask anything". */
56
+ field: string;
57
+ /** Send control. Default: "Send". */
58
+ send: string;
59
+ /** Copy under a reply. Default: "Copy reply". */
60
+ copy: string;
61
+ /** Copy, once the reply is on the clipboard; also announced. Default: "Copied". */
62
+ copied: string;
63
+ /** Thumbs up under a reply. Default: "Mark this reply helpful". */
64
+ helpful: string;
65
+ /** Thumbs down under a reply. Default: "Mark this reply not helpful". */
66
+ notHelpful: string;
67
+ }
68
+ export declare const chatDockDefaultLabels: ChatDockLabels;
69
+ export declare const chatDockFollowUpsPlacements: readonly ["inline", "composer"];
70
+ /**
71
+ * `inline` — rows in the conversation, directly under the reply they belong to.
72
+ * `composer` — pills pinned between the conversation and the composer.
73
+ */
74
+ export type ChatDockFollowUpsPlacement = (typeof chatDockFollowUpsPlacements)[number];
75
+ export interface ChatDockProps {
76
+ /** Window title — usually the product or brand name. */
77
+ title: string;
78
+ /** Line under the title. */
79
+ subtitle?: string;
80
+ /**
81
+ * Brand mark — **Avatar** `size="md"` (2.25rem). Shown at the start of the composer and in
82
+ * the window header.
83
+ */
84
+ mark?: ReactNode;
85
+ /** First assistant message, always at the top of the window. */
86
+ greeting?: ReactNode;
87
+ /** The conversation, oldest first. The app owns it and appends replies as they stream. */
88
+ messages?: ChatDockMessage[];
89
+ /** Shows the thinking row after the last message while a reply is on its way. */
90
+ thinking?: boolean;
91
+ /** Pills above the resting composer (those with a `prompt`) and rows in the window. */
92
+ suggestions?: ChatDockSuggestion[];
93
+ /** Receives the visitor's message — typed, or a suggestion's `prompt`. */
94
+ onSend: (prompt: string) => void;
95
+ /** Every suggestion and follow-up choice, including actions without a `prompt`. */
96
+ onSuggestionSelect?: (suggestion: ChatDockSuggestion) => void;
97
+ /**
98
+ * Follow-ups for the latest reply — one to three short items, the same shape and handlers as
99
+ * `suggestions`. Their `icon` is not shown: inline rows all lead with a corner-down-right arrow,
100
+ * and pills above the composer are text only. They show while the last message is an assistant
101
+ * reply and `thinking` is off, and disappear the moment the visitor sends. The app decides which
102
+ * replies get follow-ups and replaces or clears them with each reply.
103
+ */
104
+ followUps?: ChatDockSuggestion[];
105
+ /** Where follow-ups sit. Default: `inline`. */
106
+ followUpsPlacement?: ChatDockFollowUpsPlacement;
107
+ /**
108
+ * The visitor voted on a reply, or cleared their vote (`null`). Pass it to show thumbs up and down
109
+ * under finished replies that carry `feedback`; the app stores the vote and passes it back there.
110
+ */
111
+ onMessageFeedback?: (message: ChatDockMessage, value: ChatDockFeedback) => void;
112
+ /**
113
+ * A form in the composer's place — usually **ChatDock.Gate** with the steps of Start a project.
114
+ * While it is set and the window is open, it replaces the composer, and the suggestion rows,
115
+ * follow-ups, and disclaimer step aside; the conversation stays above it. Setting it opens the
116
+ * window and moves focus into it; clearing it brings the composer back with focus. Escape belongs
117
+ * to the gate (**ChatDock.Gate** closes on Escape); the window's close still folds the window, and
118
+ * the gate is there again when it reopens.
119
+ */
120
+ gate?: ReactNode;
121
+ /** Controlled open state. */
122
+ open?: boolean;
123
+ defaultOpen?: boolean;
124
+ onOpenChange?: (open: boolean) => void;
125
+ /** Field placeholder. Default: "Ask anything…". */
126
+ placeholder?: string;
127
+ /** One line under the window's composer — for example what the assistant can't do. */
128
+ disclaimer?: ReactNode;
129
+ labels?: Partial<ChatDockLabels>;
130
+ /** `fixed` (default) pins the dock to the viewport; `inline` keeps it in flow for specimens. */
131
+ placement?: ChatDockPlacement;
132
+ className?: ChatDockLayoutClassName;
133
+ }
134
+ /** Pills above the resting composer: suggestions that send a prompt. */
135
+ export declare function chatDockPillSuggestions(suggestions: readonly ChatDockSuggestion[]): ChatDockSuggestion[];
136
+ /** Suggestion rows show until the conversation starts. */
137
+ export declare function chatDockShowsSuggestionRows(suggestions: readonly ChatDockSuggestion[], messages: readonly ChatDockMessage[]): boolean;
138
+ /**
139
+ * Follow-ups belong to the latest reply: it is the last message, no reply is pending, and the
140
+ * visitor has not sent anything since it arrived (`sentAfterId` is the last message id at send).
141
+ */
142
+ export declare function chatDockShowsFollowUps({ followUps, messages, thinking, sentAfterId, }: {
143
+ followUps: readonly ChatDockSuggestion[];
144
+ messages: readonly ChatDockMessage[];
145
+ thinking: boolean;
146
+ sentAfterId: string | null;
147
+ }): boolean;
148
+ /** What shows under a reply. `ready` is false while the reply is still arriving. */
149
+ export interface ChatDockReplyRow {
150
+ copy: boolean;
151
+ vote: boolean;
152
+ meta: boolean;
153
+ ready: boolean;
154
+ }
155
+ /**
156
+ * The row under a reply: Copy with `copyText`, the score with `meta`, and the thumbs when the app
157
+ * takes votes and the reply carries `feedback`. `null` for the visitor's turns and for replies with none of these. The latest reply
158
+ * is still arriving while `thinking` is on, so its row keeps its place but shows nothing yet.
159
+ */
160
+ export declare function chatDockReplyRow({ message, isLatest, thinking, takesVotes, }: {
161
+ message: ChatDockMessage;
162
+ isLatest: boolean;
163
+ thinking: boolean;
164
+ takesVotes: boolean;
165
+ }): ChatDockReplyRow | null;
166
+ /**
167
+ * Height of the open window where it grows out of the composer, in px: 40rem, or the viewport less
168
+ * 7rem when that is shorter. Inline specimens are 32rem.
169
+ */
170
+ export declare function chatDockOpenHeight(placement: ChatDockPlacement, viewportHeight: number, remPx: number): number;
171
+ /**
172
+ * The tallest a gate may be, in px: the window less its top padding, the header, the conversation
173
+ * kept in view above the gate (7rem), the gaps between them, and the space under the gate. Never
174
+ * below 12rem, so a gate stays usable when a phone keyboard leaves little room.
175
+ */
176
+ export declare function chatDockGateMaxHeight({ windowHeight, headerHeight, bottomInset, remPx, }: {
177
+ windowHeight: number;
178
+ headerHeight: number;
179
+ bottomInset: number;
180
+ remPx: number;
181
+ }): number;
182
+ /**
183
+ * How the window moves. `grow` (from `md`, and inline): it sits on the composer's bottom edge and
184
+ * grows up and out of it. `rise`: on phones it fills the screen and rises from the bottom edge.
185
+ */
186
+ export type ChatDockWindowMotion = "grow" | "rise";
187
+ /**
188
+ * Pinned prompt that opens into a chat window. At rest it is a **PromptBar** with the brand
189
+ * mark; hovering shows suggestion pills above it. Focusing or typing opens a non-modal window
190
+ * around the same composer — header, conversation, suggestion rows, and an optional disclaimer.
191
+ * Escape or Close folds it back into the bar. The page behind stays usable.
192
+ */
193
+ declare function ChatDockRoot({ title, subtitle, mark, greeting, messages, thinking, suggestions, onSend, onSuggestionSelect, followUps, followUpsPlacement, onMessageFeedback, gate, open: openProp, defaultOpen, onOpenChange, placeholder, disclaimer, labels: labelsProp, placement, className, }: ChatDockProps): import("react").JSX.Element;
194
+ /**
195
+ * Pinned prompt that opens into a chat window. At rest it is a **PromptBar** with the brand
196
+ * mark; hovering shows suggestion pills above it. Focusing or typing opens a non-modal window
197
+ * around the same composer. **ChatDock.Gate** is the multi-step form a `gate` puts in the
198
+ * composer's place.
199
+ */
200
+ export declare const ChatDock: typeof ChatDockRoot & {
201
+ Gate: import("react").ForwardRefExoticComponent<import("./ChatDockGate").ChatDockGateProps & import("react").RefAttributes<HTMLDivElement>>;
202
+ };
203
+ //# sourceMappingURL=ChatDock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatDock.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/ChatDock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM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