@k2b/ui 0.57.1 → 0.59.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 (266) hide show
  1. package/dist/base.css +1 -0
  2. package/dist/browser/actions/ContextMenu.js +5 -2
  3. package/dist/browser/actions/ContextMenu.js.map +1 -1
  4. package/dist/browser/actions/Dropdown.js +4 -3
  5. package/dist/browser/actions/Dropdown.js.map +1 -1
  6. package/dist/browser/actions/Tabs.js +58 -19
  7. package/dist/browser/actions/Tabs.js.map +1 -1
  8. package/dist/browser/actions/Toolbar.js +66 -60
  9. package/dist/browser/actions/Toolbar.js.map +1 -1
  10. package/dist/browser/actions/ViewTabs.js +89 -73
  11. package/dist/browser/actions/ViewTabs.js.map +1 -1
  12. package/dist/browser/actions/drag-and-drop.js +2 -1
  13. package/dist/browser/actions/drag-and-drop.js.map +1 -1
  14. package/dist/browser/actions/menu-rows.js +1 -1
  15. package/dist/browser/actions/menu-rows.js.map +1 -1
  16. package/dist/browser/charts/core/snapshot.js +3 -1
  17. package/dist/browser/charts/core/snapshot.js.map +1 -1
  18. package/dist/browser/chat/ChatComposer.js +832 -679
  19. package/dist/browser/chat/ChatComposer.js.map +1 -1
  20. package/dist/browser/chat/ChatContextPopup.js +34 -4
  21. package/dist/browser/chat/ChatContextPopup.js.map +1 -1
  22. package/dist/browser/chat/ChatPrimitives.js +471 -284
  23. package/dist/browser/chat/ChatPrimitives.js.map +1 -1
  24. package/dist/browser/chat/ChatTasks.js +218 -80
  25. package/dist/browser/chat/ChatTasks.js.map +1 -1
  26. package/dist/browser/chat/ChatTimeline.js +5 -3
  27. package/dist/browser/chat/ChatTimeline.js.map +1 -1
  28. package/dist/browser/chat/chat-behavior.js +12 -0
  29. package/dist/browser/chat/chat-behavior.js.map +1 -1
  30. package/dist/browser/chat/chat-messages.js +50 -2
  31. package/dist/browser/chat/chat-messages.js.map +1 -1
  32. package/dist/browser/chat/index.js +2 -1
  33. package/dist/browser/chat/index.js.map +1 -1
  34. package/dist/browser/chat/types.js.map +1 -1
  35. package/dist/browser/content/Calendar.js +2 -2
  36. package/dist/browser/content/Calendar.js.map +1 -1
  37. package/dist/browser/content/CalendarWeekView.js +9 -2
  38. package/dist/browser/content/CalendarWeekView.js.map +1 -1
  39. package/dist/browser/content/ChartRoot.js +4 -1
  40. package/dist/browser/content/ChartRoot.js.map +1 -1
  41. package/dist/browser/content/DataTable.js +9 -0
  42. package/dist/browser/content/DataTable.js.map +1 -1
  43. package/dist/browser/content/Lightbox.js +2 -2
  44. package/dist/browser/content/Lightbox.js.map +1 -1
  45. package/dist/browser/content/PdfPages.js +160 -44
  46. package/dist/browser/content/PdfPages.js.map +1 -1
  47. package/dist/browser/content/PdfViewer.js +59 -21
  48. package/dist/browser/content/PdfViewer.js.map +1 -1
  49. package/dist/browser/content/ProgressPath.js +101 -0
  50. package/dist/browser/content/ProgressPath.js.map +1 -0
  51. package/dist/browser/content/Timeline.js +1 -1
  52. package/dist/browser/content/Timeline.js.map +1 -1
  53. package/dist/browser/content/chart-tick-room.js +59 -0
  54. package/dist/browser/content/chart-tick-room.js.map +1 -0
  55. package/dist/browser/content/index.js +1 -0
  56. package/dist/browser/content/index.js.map +1 -1
  57. package/dist/browser/content/pdf-viewer-engine.js +1 -1
  58. package/dist/browser/feedback/HoverCard.js +535 -0
  59. package/dist/browser/feedback/HoverCard.js.map +1 -0
  60. package/dist/browser/feedback/Tooltip.js +5 -2
  61. package/dist/browser/feedback/Tooltip.js.map +1 -1
  62. package/dist/browser/feedback/dialog-core.js +12 -8
  63. package/dist/browser/feedback/dialog-core.js.map +1 -1
  64. package/dist/browser/feedback/index.js +1 -0
  65. package/dist/browser/feedback/index.js.map +1 -1
  66. package/dist/browser/feedback/prompt-confirm.js +3 -17
  67. package/dist/browser/feedback/prompt-confirm.js.map +1 -1
  68. package/dist/browser/feedback/prompt-sheet-view.js +95 -0
  69. package/dist/browser/feedback/prompt-sheet-view.js.map +1 -0
  70. package/dist/browser/feedback/prompt-sheet.js +36 -0
  71. package/dist/browser/feedback/prompt-sheet.js.map +1 -0
  72. package/dist/browser/feedback/prompts.js +14 -38
  73. package/dist/browser/feedback/prompts.js.map +1 -1
  74. package/dist/browser/feedback/toast.js +17 -12
  75. package/dist/browser/feedback/toast.js.map +1 -1
  76. package/dist/browser/internal/anchor-placement.js +38 -0
  77. package/dist/browser/internal/anchor-placement.js.map +1 -0
  78. package/dist/browser/internal/portal-scope.js +36 -0
  79. package/dist/browser/internal/portal-scope.js.map +1 -0
  80. package/dist/browser/internal/portal.js +13 -10
  81. package/dist/browser/internal/portal.js.map +1 -1
  82. package/dist/browser/intl/messages.js +10 -0
  83. package/dist/browser/intl/messages.js.map +1 -1
  84. package/dist/browser/layout/AnchoredPopover.js +10 -25
  85. package/dist/browser/layout/AnchoredPopover.js.map +1 -1
  86. package/dist/browser/layout/BottomSheet.js +1 -12
  87. package/dist/browser/layout/BottomSheet.js.map +1 -1
  88. package/dist/browser/layout/Discussion.js +298 -3
  89. package/dist/browser/layout/Discussion.js.map +1 -1
  90. package/dist/browser/layout/FloatingWindow.js +124 -75
  91. package/dist/browser/layout/FloatingWindow.js.map +1 -1
  92. package/dist/browser/layout/Panes.js +643 -212
  93. package/dist/browser/layout/Panes.js.map +1 -1
  94. package/dist/browser/layout/index.js +1 -1
  95. package/dist/browser/layout/index.js.map +1 -1
  96. package/dist/browser/layout/panes-layout.js +169 -0
  97. package/dist/browser/layout/panes-layout.js.map +1 -1
  98. package/dist/browser/layout/panes-messages.js +108 -2
  99. package/dist/browser/layout/panes-messages.js.map +1 -1
  100. package/dist/browser/layout/panes-preview-scope.js +9 -0
  101. package/dist/browser/layout/panes-preview-scope.js.map +1 -0
  102. package/dist/browser/layout/sheet-handle.js +173 -37
  103. package/dist/browser/layout/sheet-handle.js.map +1 -1
  104. package/dist/browser/layout/sheet-motion.js +38 -5
  105. package/dist/browser/layout/sheet-motion.js.map +1 -1
  106. package/dist/browser/panes.js +3 -0
  107. package/dist/browser/panes.js.map +1 -0
  108. package/dist/browser/surfaces/ChangeList.js +78 -16
  109. package/dist/browser/surfaces/ChangeList.js.map +1 -1
  110. package/dist/browser/surfaces/DotStrip.js +126 -41
  111. package/dist/browser/surfaces/DotStrip.js.map +1 -1
  112. package/dist/browser/surfaces/LinkCard.js +69 -16
  113. package/dist/browser/surfaces/LinkCard.js.map +1 -1
  114. package/dist/ssr/actions/ContextMenu.js +1 -0
  115. package/dist/ssr/actions/ContextMenu.js.map +1 -1
  116. package/dist/ssr/actions/Dropdown.js +4 -4
  117. package/dist/ssr/actions/Dropdown.js.map +1 -1
  118. package/dist/ssr/actions/Tabs.js +21 -6
  119. package/dist/ssr/actions/Tabs.js.map +1 -1
  120. package/dist/ssr/actions/Toolbar.js +24 -18
  121. package/dist/ssr/actions/Toolbar.js.map +1 -1
  122. package/dist/ssr/actions/ViewTabs.js +27 -20
  123. package/dist/ssr/actions/ViewTabs.js.map +1 -1
  124. package/dist/ssr/actions/drag-and-drop.js +2 -1
  125. package/dist/ssr/actions/drag-and-drop.js.map +1 -1
  126. package/dist/ssr/actions/menu-rows.js +1 -1
  127. package/dist/ssr/actions/menu-rows.js.map +1 -1
  128. package/dist/ssr/charts/core/snapshot.js +3 -1
  129. package/dist/ssr/charts/core/snapshot.js.map +1 -1
  130. package/dist/ssr/chat/ChatComposer.js +250 -142
  131. package/dist/ssr/chat/ChatComposer.js.map +1 -1
  132. package/dist/ssr/chat/ChatContextPopup.js +17 -1
  133. package/dist/ssr/chat/ChatContextPopup.js.map +1 -1
  134. package/dist/ssr/chat/ChatPrimitives.js +179 -51
  135. package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
  136. package/dist/ssr/chat/ChatTasks.js +117 -27
  137. package/dist/ssr/chat/ChatTasks.js.map +1 -1
  138. package/dist/ssr/chat/ChatTimeline.js +5 -3
  139. package/dist/ssr/chat/ChatTimeline.js.map +1 -1
  140. package/dist/ssr/chat/chat-behavior.js +12 -0
  141. package/dist/ssr/chat/chat-behavior.js.map +1 -1
  142. package/dist/ssr/chat/chat-messages.js +50 -2
  143. package/dist/ssr/chat/chat-messages.js.map +1 -1
  144. package/dist/ssr/chat/index.js +2 -1
  145. package/dist/ssr/chat/index.js.map +1 -1
  146. package/dist/ssr/chat/types.js.map +1 -1
  147. package/dist/ssr/content/Calendar.js +2 -2
  148. package/dist/ssr/content/Calendar.js.map +1 -1
  149. package/dist/ssr/content/CalendarWeekView.js +9 -2
  150. package/dist/ssr/content/CalendarWeekView.js.map +1 -1
  151. package/dist/ssr/content/ChartRoot.js +4 -1
  152. package/dist/ssr/content/ChartRoot.js.map +1 -1
  153. package/dist/ssr/content/DataTable.js +9 -0
  154. package/dist/ssr/content/DataTable.js.map +1 -1
  155. package/dist/ssr/content/Lightbox.js +2 -2
  156. package/dist/ssr/content/Lightbox.js.map +1 -1
  157. package/dist/ssr/content/PdfPages.js +160 -44
  158. package/dist/ssr/content/PdfPages.js.map +1 -1
  159. package/dist/ssr/content/PdfViewer.js +40 -8
  160. package/dist/ssr/content/PdfViewer.js.map +1 -1
  161. package/dist/ssr/content/ProgressPath.js +51 -0
  162. package/dist/ssr/content/ProgressPath.js.map +1 -0
  163. package/dist/ssr/content/Timeline.js +1 -1
  164. package/dist/ssr/content/Timeline.js.map +1 -1
  165. package/dist/ssr/content/chart-tick-room.js +59 -0
  166. package/dist/ssr/content/chart-tick-room.js.map +1 -0
  167. package/dist/ssr/content/index.js +1 -0
  168. package/dist/ssr/content/index.js.map +1 -1
  169. package/dist/ssr/feedback/HoverCard.js +473 -0
  170. package/dist/ssr/feedback/HoverCard.js.map +1 -0
  171. package/dist/ssr/feedback/Tooltip.js +5 -2
  172. package/dist/ssr/feedback/Tooltip.js.map +1 -1
  173. package/dist/ssr/feedback/dialog-core.js +12 -8
  174. package/dist/ssr/feedback/dialog-core.js.map +1 -1
  175. package/dist/ssr/feedback/index.js +1 -0
  176. package/dist/ssr/feedback/index.js.map +1 -1
  177. package/dist/ssr/feedback/prompt-confirm.js +3 -17
  178. package/dist/ssr/feedback/prompt-confirm.js.map +1 -1
  179. package/dist/ssr/feedback/prompt-sheet-view.js +61 -0
  180. package/dist/ssr/feedback/prompt-sheet-view.js.map +1 -0
  181. package/dist/ssr/feedback/prompt-sheet.js +36 -0
  182. package/dist/ssr/feedback/prompt-sheet.js.map +1 -0
  183. package/dist/ssr/feedback/prompts.js +14 -38
  184. package/dist/ssr/feedback/prompts.js.map +1 -1
  185. package/dist/ssr/feedback/toast.js +17 -12
  186. package/dist/ssr/feedback/toast.js.map +1 -1
  187. package/dist/ssr/internal/anchor-placement.js +38 -0
  188. package/dist/ssr/internal/anchor-placement.js.map +1 -0
  189. package/dist/ssr/internal/portal-scope.js +36 -0
  190. package/dist/ssr/internal/portal-scope.js.map +1 -0
  191. package/dist/ssr/internal/portal.js +13 -10
  192. package/dist/ssr/internal/portal.js.map +1 -1
  193. package/dist/ssr/intl/messages.js +10 -0
  194. package/dist/ssr/intl/messages.js.map +1 -1
  195. package/dist/ssr/layout/AnchoredPopover.js +10 -25
  196. package/dist/ssr/layout/AnchoredPopover.js.map +1 -1
  197. package/dist/ssr/layout/BottomSheet.js +1 -12
  198. package/dist/ssr/layout/BottomSheet.js.map +1 -1
  199. package/dist/ssr/layout/Discussion.js +168 -2
  200. package/dist/ssr/layout/Discussion.js.map +1 -1
  201. package/dist/ssr/layout/FloatingWindow.js +39 -15
  202. package/dist/ssr/layout/FloatingWindow.js.map +1 -1
  203. package/dist/ssr/layout/Panes.js +399 -41
  204. package/dist/ssr/layout/Panes.js.map +1 -1
  205. package/dist/ssr/layout/index.js +1 -1
  206. package/dist/ssr/layout/index.js.map +1 -1
  207. package/dist/ssr/layout/panes-layout.js +169 -0
  208. package/dist/ssr/layout/panes-layout.js.map +1 -1
  209. package/dist/ssr/layout/panes-messages.js +108 -2
  210. package/dist/ssr/layout/panes-messages.js.map +1 -1
  211. package/dist/ssr/layout/panes-preview-scope.js +9 -0
  212. package/dist/ssr/layout/panes-preview-scope.js.map +1 -0
  213. package/dist/ssr/layout/sheet-handle.js +173 -37
  214. package/dist/ssr/layout/sheet-handle.js.map +1 -1
  215. package/dist/ssr/layout/sheet-motion.js +38 -5
  216. package/dist/ssr/layout/sheet-motion.js.map +1 -1
  217. package/dist/ssr/panes.js +3 -0
  218. package/dist/ssr/panes.js.map +1 -0
  219. package/dist/ssr/surfaces/ChangeList.js +37 -5
  220. package/dist/ssr/surfaces/ChangeList.js.map +1 -1
  221. package/dist/ssr/surfaces/DotStrip.js +75 -12
  222. package/dist/ssr/surfaces/DotStrip.js.map +1 -1
  223. package/dist/ssr/surfaces/LinkCard.js +46 -7
  224. package/dist/ssr/surfaces/LinkCard.js.map +1 -1
  225. package/dist/styles.css +1 -1
  226. package/dist/types/actions/Dropdown.d.ts +4 -3
  227. package/dist/types/actions/Tabs.d.ts +9 -0
  228. package/dist/types/actions/ViewTabs.d.ts +2 -0
  229. package/dist/types/chat/ChatComposer.d.ts +24 -2
  230. package/dist/types/chat/ChatPrimitives.d.ts +6 -1
  231. package/dist/types/chat/ChatTasks.d.ts +14 -1
  232. package/dist/types/chat/chat-behavior.d.ts +14 -0
  233. package/dist/types/chat/chat-messages.d.ts +24 -0
  234. package/dist/types/chat/index.d.ts +5 -4
  235. package/dist/types/chat/types.d.ts +27 -0
  236. package/dist/types/content/PdfPages.d.ts +8 -3
  237. package/dist/types/content/PdfViewer.d.ts +12 -4
  238. package/dist/types/content/ProgressPath.d.ts +25 -0
  239. package/dist/types/content/chart-tick-room.d.ts +15 -0
  240. package/dist/types/content/index.d.ts +1 -0
  241. package/dist/types/feedback/HoverCard.d.ts +44 -0
  242. package/dist/types/feedback/Tooltip.d.ts +5 -0
  243. package/dist/types/feedback/index.d.ts +2 -0
  244. package/dist/types/feedback/prompt-confirm.d.ts +0 -2
  245. package/dist/types/feedback/prompt-sheet-view.d.ts +3 -0
  246. package/dist/types/feedback/prompt-sheet.d.ts +20 -0
  247. package/dist/types/feedback/toast.d.ts +5 -1
  248. package/dist/types/internal/anchor-placement.d.ts +23 -0
  249. package/dist/types/internal/portal-scope.d.ts +11 -0
  250. package/dist/types/internal/portal.d.ts +1 -1
  251. package/dist/types/intl/messages.d.ts +5 -0
  252. package/dist/types/layout/BottomSheet.d.ts +1 -5
  253. package/dist/types/layout/Discussion.d.ts +25 -0
  254. package/dist/types/layout/FloatingWindow.d.ts +6 -0
  255. package/dist/types/layout/Panes.d.ts +21 -0
  256. package/dist/types/layout/index.d.ts +3 -3
  257. package/dist/types/layout/panes-layout.d.ts +51 -0
  258. package/dist/types/layout/panes-messages.d.ts +55 -0
  259. package/dist/types/layout/panes-preview-scope.d.ts +2 -0
  260. package/dist/types/layout/sheet-handle.d.ts +17 -8
  261. package/dist/types/layout/sheet-motion.d.ts +5 -0
  262. package/dist/types/panes.d.ts +2 -0
  263. package/dist/types/surfaces/ChangeList.d.ts +23 -4
  264. package/dist/types/surfaces/DotStrip.d.ts +25 -5
  265. package/dist/types/surfaces/LinkCard.d.ts +13 -0
  266. package/package.json +8 -2
@@ -76,10 +76,11 @@ export type DropdownChoice = DropdownActionBase & {
76
76
  export type DropdownSection = {
77
77
  sectionLabel?: string;
78
78
  /**
79
- * `row` sets a few short radio choices, such as a sort direction, side by side as one segmented row. Give it a
80
- * `sectionLabel`: the label names the choice above the row and for screen readers.
79
+ * `row` sets a few short radio choices, such as a sort direction, side by side as one segmented row. `tiles` sets
80
+ * a few choices that a picture tells apart, such as arrangements, side by side as tiles with the icon above the
81
+ * label. Give either a `sectionLabel`: the label names the choice above the row and for screen readers.
81
82
  */
82
- layout?: "row";
83
+ layout?: "row" | "tiles";
83
84
  /** A quiet action at the end of the section label, such as "All"; it needs a `sectionLabel` and keeps the menu open. */
84
85
  labelAction?: DropdownSecondaryAction;
85
86
  items: readonly (DropdownAction | DropdownChoice)[];
@@ -6,6 +6,15 @@ export type TabOption<T extends string = string> = {
6
6
  icon?: string;
7
7
  disabled?: boolean;
8
8
  panel?: JSX.Element;
9
+ /** A small count after the label, such as "3" or "+2 −1", in tabular figures. */
10
+ count?: JSX.Element;
11
+ /**
12
+ * The widest the count gets, such as "99" or "+99 −99": the count keeps this width, so the tab and its neighbours
13
+ * never move when the number changes.
14
+ */
15
+ countReserve?: string;
16
+ /** What the count says for assistive technology, such as "3 comments" or "2 lines added, 1 removed". */
17
+ countLabel?: string;
9
18
  onClose?: () => void;
10
19
  closeLabel?: string;
11
20
  };
@@ -5,6 +5,8 @@ export type ViewTab = {
5
5
  href: string;
6
6
  icon?: string;
7
7
  count?: number | string;
8
+ /** The widest the count gets, such as "99": the count keeps this width, so no tab moves when the number changes. */
9
+ countReserve?: string;
8
10
  /** A short quiet label after the count, such as "New" for a view people have not opened yet. */
9
11
  badge?: string;
10
12
  /** Stays in the strip after More at every width, for a view of another kind than the ones that overflow. */
@@ -1,6 +1,6 @@
1
1
  import { type JSX } from "solid-js";
2
2
  import type { DictationAlternative, DictationSource } from "../inputs/dictation/types";
3
- import type { ChatAction, ChatAttachment, ChatComposerEmoji, ChatComposerMicrophone, ChatComposerState, ChatContextUsageData, ChatMention, ChatModelOption, ChatSubmitInput } from "./types";
3
+ import type { ChatAction, ChatAttachment, ChatComposerEmoji, ChatComposerMicrophone, ChatComposerState, ChatContextUsageData, ChatMention, ChatModelOption, ChatSubmitInput, ChatUsageSection } from "./types";
4
4
  export type ChatCommandContext = {
5
5
  setValue: (value: string) => void;
6
6
  submit: () => void;
@@ -153,6 +153,20 @@ export type ChatComposerReply = {
153
153
  onCancel: () => void;
154
154
  onSelect?: () => void;
155
155
  };
156
+ /**
157
+ * A suggested next message. It stands in the empty field instead of the placeholder, wraps and grows the field like
158
+ * typed text, and ends in a hint: "Tab accept" with a keyboard, an Accept button on touch-only devices. Tab or the hint
159
+ * puts the text into the field as an edit that undo takes back; nothing is sent. Typing replaces it, and an empty field
160
+ * shows it again. Escape dismisses it, and so does sending. The application owns where it comes from and drops it when
161
+ * a new response starts.
162
+ */
163
+ export type ChatComposerSuggestion = {
164
+ text: string;
165
+ /** The text is now in the field. */
166
+ onAccept: () => void;
167
+ /** Escape dismissed it; the field shows the placeholder again. */
168
+ onDismiss: () => void;
169
+ };
156
170
  export type ChatComposerProps = {
157
171
  value: string;
158
172
  onValueChange: (value: string) => void;
@@ -201,8 +215,14 @@ export type ChatComposerProps = {
201
215
  /** Shared surface above the editor; suggestions temporarily replace this content. */
202
216
  accessory?: JSX.Element;
203
217
  contextUsage?: ChatContextUsageData;
218
+ /**
219
+ * Application parts of the usage control, such as a budget. The control keeps one ring right of "+" for the context
220
+ * and these parts; it shows the highest share.
221
+ */
222
+ contextSections?: readonly ChatUsageSection[];
223
+ /** Small icon controls right after the usage control, such as showing finished tasks again. */
204
224
  contextActions?: readonly ChatAction[];
205
- /** Optional action inside the context details popup. */
225
+ /** Optional icon action next to the context share in the usage details, such as summarizing the chat now. */
206
226
  contextPopupAction?: ChatAction;
207
227
  /** Additional compact controls rendered with the add/model controls. */
208
228
  footerTools?: JSX.Element;
@@ -254,5 +274,7 @@ export type ChatComposerProps = {
254
274
  * button that cancels the reply. `onSelect` makes the quote a button, for example to jump to the original.
255
275
  */
256
276
  reply?: ChatComposerReply;
277
+ /** A suggested next message in the empty field; see `ChatComposerSuggestion`. */
278
+ suggestion?: ChatComposerSuggestion;
257
279
  };
258
280
  export declare function ChatComposer(props: ChatComposerProps): JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { type JSX } from "solid-js";
2
- import type { ChatAction, ChatActivityTone, ChatAttachment, ChatContextUsageData, ChatMessageStatus, ChatRole } from "./types";
2
+ import type { ChatAction, ChatActivityTone, ChatAttachment, ChatContextUsageData, ChatMessageStatus, ChatRole, ChatUsageSection } from "./types";
3
3
  export type ChatMessageProps = {
4
4
  role: ChatRole;
5
5
  children?: JSX.Element;
@@ -45,6 +45,11 @@ export type ChatActivityProps = {
45
45
  class?: string;
46
46
  };
47
47
  export type ChatContextUsageProps = ChatContextUsageData & {
48
+ /** Application parts after the context, such as a budget. */
49
+ sections?: readonly ChatUsageSection[];
50
+ /** Set to false to show only `sections`, for example before a chat has context to report. */
51
+ context?: boolean;
52
+ /** A small icon action next to the context share, such as summarizing the chat now. */
48
53
  action?: ChatAction;
49
54
  onActionError?: (error: unknown) => void;
50
55
  /** Host-owned number formatting. The default groups whole numbers in the inherited render locale. */
@@ -10,6 +10,19 @@ export type ChatTasksProps = {
10
10
  label: string;
11
11
  progressLabel: string;
12
12
  statusLabels: Record<ChatTask["status"], string>;
13
+ /** The work is interrupted: the current step keeps its place and weight, but its ring stands still. */
14
+ paused?: boolean;
13
15
  };
14
- /** Presentation only. The host owns the plan and execution state. */
16
+ export type ChatTaskListProps = {
17
+ items: readonly ChatTask[];
18
+ statusLabels: Record<ChatTask["status"], string>;
19
+ "aria-label"?: string;
20
+ "aria-labelledby"?: string;
21
+ };
22
+ /**
23
+ * The working plan above the composer. Presentation only: the host owns the plan, its execution state, and every
24
+ * label. The header stays at the composer; the list opens upwards, and only its height moves.
25
+ */
15
26
  export declare function ChatTasks(props: ChatTasksProps): import("solid-js").JSX.Element;
27
+ /** A finished or stopped plan as a still list: the same marks on the same axis, without header, ring, or fold. */
28
+ export declare function ChatTaskList(props: ChatTaskListProps): import("solid-js").JSX.Element;
@@ -40,6 +40,20 @@ export declare const conversationEnterAction: (key: ChatEnterKey, context: {
40
40
  touchOnly: boolean;
41
41
  inCodeBlock: boolean;
42
42
  }) => "send" | "newline";
43
+ export type ChatSuggestionKey = ChatEnterKey & {
44
+ key: string;
45
+ isComposing: boolean;
46
+ keyCode: number;
47
+ };
48
+ /**
49
+ * What a key does to a suggested next message that stands in the empty field: a plain Tab accepts it and a plain
50
+ * Escape dismisses it. Tab with a modifier, a key that confirms an input method's composition, and any key while a
51
+ * command, emoji or people list is open keep their usual meaning.
52
+ */
53
+ export declare const chatSuggestionKeyAction: (key: ChatSuggestionKey, context: {
54
+ composing: boolean;
55
+ listOpen: boolean;
56
+ }) => "accept" | "dismiss" | undefined;
43
57
  /** Case- and accent-insensitive text for command discovery. */
44
58
  export declare const foldChatSearchText: (text: string) => string;
45
59
  export declare const chatCommandKey: (command: ChatCommand) => string;
@@ -76,6 +76,7 @@ export declare const chatMessages: import("@k2b/stdlib").Catalog<{
76
76
  couldNotLoadEarlierMessages: string;
77
77
  couldNotPostMessage: string;
78
78
  messageActions: string;
79
+ moreActions: string;
79
80
  cancelReply: string;
80
81
  replyingTo: string;
81
82
  messageMenu: ({ author, time }: {
@@ -108,6 +109,18 @@ export declare const chatMessages: import("@k2b/stdlib").Catalog<{
108
109
  total: string;
109
110
  percent: number;
110
111
  }) => string;
112
+ usage: string;
113
+ usageSummary: ({ parts }: {
114
+ parts: string;
115
+ }) => string;
116
+ thisChat: string;
117
+ contextInUse: string;
118
+ contextFull: ({ percent }: {
119
+ percent: string;
120
+ }) => string;
121
+ contextSummaryPercent: ({ percent }: {
122
+ percent: string;
123
+ }) => string;
111
124
  postMessage: string;
112
125
  queueMessage: string;
113
126
  queueing: string;
@@ -143,6 +156,17 @@ export declare const chatMessages: import("@k2b/stdlib").Catalog<{
143
156
  steerResponse: string;
144
157
  stopResponse: string;
145
158
  stopping: string;
159
+ suggestionKeyHint: string;
160
+ suggestionAccept: string;
161
+ suggestionAcceptLabel: ({ text }: {
162
+ text: string;
163
+ }) => string;
164
+ suggestionAnnouncement: ({ text }: {
165
+ text: string;
166
+ }) => string;
167
+ suggestionAnnouncementTouch: ({ text }: {
168
+ text: string;
169
+ }) => string;
146
170
  }>;
147
171
  export type ChatMessages = ReturnType<(typeof chatMessages)["resolve"]>["t"];
148
172
  /** Resolved from the inherited render locale. */
@@ -1,25 +1,26 @@
1
1
  export type { ChatContextPanelProps, ChatContextPopupProps } from "./ChatContextPopup";
2
2
  import { ChatContextPanel, ChatContextPopup } from "./ChatContextPopup";
3
- import { ChatTasks } from "./ChatTasks";
4
- export type { ChatTask, ChatTasksProps } from "./ChatTasks";
3
+ import { ChatTaskList, ChatTasks } from "./ChatTasks";
4
+ export type { ChatTask, ChatTaskListProps, ChatTasksProps } from "./ChatTasks";
5
5
  import { ChatComposer } from "./ChatComposer";
6
6
  import { ChatDecision, ChatMark, ChatOutcome } from "./ChatDecision";
7
7
  import { ChatActivity, ChatActivityToggle, ChatContextUsage, ChatMessage } from "./ChatPrimitives";
8
8
  import { ChatRoot } from "./ChatRoot";
9
9
  import { ChatTimeline } from "./ChatTimeline";
10
- export type { ChatCommand, ChatCommandContext, ChatCommandDraft, ChatCommandOpenResult, ChatCommandResult, ChatCommandScope, ChatCommandSearch, ChatCommandSection, ChatComposerPeople, ChatComposerProps, ChatComposerReply, ChatFileSelection, ChatPasteHandler, ChatPersonSuggestion, } from "./ChatComposer";
10
+ export type { ChatCommand, ChatCommandContext, ChatCommandDraft, ChatCommandOpenResult, ChatCommandResult, ChatCommandScope, ChatCommandSearch, ChatCommandSection, ChatComposerPeople, ChatComposerProps, ChatComposerReply, ChatComposerSuggestion, ChatFileSelection, ChatPasteHandler, ChatPersonSuggestion, } from "./ChatComposer";
11
11
  export type { ChatDecisionProps, ChatMarkProps, ChatOutcomeProps, ChatPreviewExcerptProps, ChatPreviewHeaderProps, ChatPreviewLineProps, ChatPreviewPeopleProps, ChatPreviewProps, ChatPreviewReadMoreProps, ChatPreviewShowAllProps, ChatPreviewTitleProps, } from "./ChatDecision";
12
12
  export type { ChatActivityProps, ChatActivityToggleProps, ChatContextUsageProps, ChatMessageProps } from "./ChatPrimitives";
13
13
  export { formatChatTokens } from "./ChatPrimitives";
14
14
  export type { ChatRootProps } from "./ChatRoot";
15
15
  export type { ChatActivityItem, ChatMessageItem, ChatTimelineItem, ChatTimelineProps } from "./ChatTimeline";
16
- export type { ChatAction, ChatActivityTone, ChatAttachment, ChatComposerEmoji, ChatComposerMicrophone, ChatComposerState, ChatContextUsageData, ChatDecisionAnswer, ChatDecisionReason, ChatDecisionState, ChatDictationState, ChatMention, ChatMessageStatus, ChatModelOption, ChatOutcomeLine, ChatOutcomeTone, ChatPreviewHeaderRow, ChatPreviewPerson, ChatRole, ChatSubmitInput, ChatSubmitIntent, ChatUsage, } from "./types";
16
+ export type { ChatAction, ChatActivityTone, ChatAttachment, ChatComposerEmoji, ChatComposerMicrophone, ChatComposerState, ChatContextUsageData, ChatDecisionAnswer, ChatDecisionReason, ChatDecisionState, ChatDictationState, ChatMention, ChatMessageStatus, ChatModelOption, ChatOutcomeLine, ChatOutcomeTone, ChatPreviewHeaderRow, ChatPreviewPerson, ChatRole, ChatSubmitInput, ChatSubmitIntent, ChatUsage, ChatUsageSection, } from "./types";
17
17
  /**
18
18
  * Portable, controlled chat surface. Applications own storage, streaming,
19
19
  * authorization, rich message rendering, and domain actions.
20
20
  */
21
21
  export declare const Chat: typeof ChatRoot & {
22
22
  Tasks: typeof ChatTasks;
23
+ TaskList: typeof ChatTaskList;
23
24
  Timeline: typeof ChatTimeline;
24
25
  Message: typeof ChatMessage;
25
26
  Activity: typeof ChatActivity & {
@@ -61,10 +61,14 @@ type ChatActionBase = {
61
61
  icon?: string;
62
62
  variant?: "danger";
63
63
  disabled?: boolean;
64
+ /** Why the action is off. An icon-only action shows it as its tooltip while `disabled`. */
65
+ disabledReason?: string;
64
66
  /** Toggle state for persistent message actions such as feedback. */
65
67
  pressed?: boolean;
66
68
  /** Semantic foreground for selected feedback actions, without a persistent background. */
67
69
  pressedTone?: "success" | "danger";
70
+ /** With inline actions, listed in the trailing "More" menu instead of as its own icon button. */
71
+ overflow?: boolean;
68
72
  };
69
73
  /** Exactly one executable behavior for every chat action. */
70
74
  export type ChatAction = ChatActionBase & ({
@@ -104,6 +108,29 @@ export type ChatContextUsageData = {
104
108
  loopUsage?: ChatUsage | null;
105
109
  contextWindow?: number;
106
110
  modelLabel?: string;
111
+ /** One short line under the context bar, such as what happens when the context is full. */
112
+ note?: JSX.Element;
113
+ };
114
+ /**
115
+ * One application-owned part of the usage control, such as a budget. The control keeps one ring: it shows the highest
116
+ * share of all parts and turns to the warning colour once a part reaches its `warnAt`.
117
+ */
118
+ export type ChatUsageSection = {
119
+ id: string;
120
+ /** Heading in the details, such as "Your budget". */
121
+ title: string;
122
+ /** Used share in percent, or null while it is not known. */
123
+ percent?: number | null;
124
+ /** Share from which this part warns. Defaults to 80. */
125
+ warnAt?: number;
126
+ /** Short text after the heading, such as "86% used". */
127
+ value?: string;
128
+ /** This part in the trigger's accessible label, such as "Budget 86% used". */
129
+ summary: string;
130
+ /** Details below the heading: bars, `dl` rows, `p` notes, and `.k2b-chat-usage__row` lines with a small action. */
131
+ content?: JSX.Element;
132
+ /** Runs each time the details open, for example to refresh this part. */
133
+ onOpen?: () => void;
107
134
  };
108
135
  export type ChatModelOption = {
109
136
  id: string;
@@ -24,7 +24,10 @@ export type PdfPagesProps = {
24
24
  fit?: "width" | "page";
25
25
  /** Shows only this page (zero-based) instead of all pages one below the other. */
26
26
  page?: number;
27
- /** The first visible page is drawn; a host can drop its loading state. */
27
+ /**
28
+ * The first visible page of a document is drawn; a host can drop its loading state. A new `data` calls it again once
29
+ * its pages have replaced the previous document's.
30
+ */
28
31
  onReady?: (document: {
29
32
  pages: number;
30
33
  }) => void;
@@ -57,7 +60,9 @@ export declare const fittedPageWidth: (fit: "width" | "page", area: {
57
60
  export declare const commonPageWidth: (pages: readonly PdfPageSize[]) => number;
58
61
  /**
59
62
  * The pages behind `PdfViewer`, loaded only once a document shows. A PDF drawn by pdf.js in every browser: pages as
60
- * images in one scroll area, an invisible text layer over each page to select, copy, and find text, and a small pill. Only pages near the view are drawn and carry text; the others
61
- * keep their size, so the scroll bar is right from the start. Printing and forms stay with the browser's own viewer.
63
+ * images in one scroll area, an invisible text layer over each page to select, copy, and find text, and a small pill.
64
+ * Only pages near the view are drawn; the others keep their size, so the scroll bar is right from the start. Every page
65
+ * gets its text, near pages first, so the browser's find reaches the whole document. Printing and forms stay with the
66
+ * browser's own viewer.
62
67
  */
63
68
  export default function PdfPages(props: PdfPagesProps): JSX.Element;
@@ -6,10 +6,13 @@ export type PdfViewerProps = {
6
6
  title: string;
7
7
  /**
8
8
  * The PDF to show: its bytes, or the address of one on this site, which the viewer fetches. A new value shows that
9
- * document. Pass either `data` or `request`.
9
+ * document; the shown pages stay until its first pages are drawn. Pass either `data` or `request`.
10
10
  */
11
11
  data?: Blob | ArrayBuffer | string;
12
- /** Requests the PDF: at once with `autoLoad`, otherwise from the action in the empty state. */
12
+ /**
13
+ * Requests the PDF: at once with `autoLoad`, otherwise from the action in the empty state. A new request replaces a
14
+ * running one, and the shown pages stay while it loads.
15
+ */
13
16
  request?: PdfViewerRequest;
14
17
  /** Runs `request` as soon as the viewer shows. Without it, the person starts it. */
15
18
  autoLoad?: boolean;
@@ -39,7 +42,10 @@ export type PdfViewerProps = {
39
42
  fit?: "width" | "page";
40
43
  /** Shows only this page (zero-based) instead of all pages one below the other. */
41
44
  page?: number;
42
- /** The first visible page is drawn; `pages` counts the document's pages, such as for a host's "4 pages". */
45
+ /**
46
+ * The first visible page is drawn, again for each new document; `pages` counts the document's pages, such as for a
47
+ * host's "4 pages".
48
+ */
43
49
  onReady?: (document: {
44
50
  pages: number;
45
51
  }) => void;
@@ -52,6 +58,8 @@ export type PdfViewerProps = {
52
58
  /**
53
59
  * Shows a PDF with pdf.js on a grey, rounded ground: pages as images with selectable text and a small pill for the
54
60
  * page, zoom, and fit. Pass the document as `data`, or a `request` that loads it; the viewer shows the empty, loading,
55
- * and error states in the same area, so nothing around it moves.
61
+ * and error states in the same area, so nothing around it moves. A new document loads behind the shown pages, which
62
+ * keep their zoom and, for the same pages under the same title, their scroll position; a thin line on the top edge
63
+ * shows a longer wait, and a failed load replaces the pages with its error.
56
64
  */
57
65
  export default function PdfViewer(props: PdfViewerProps): JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { type JSX } from "solid-js";
2
+ export type ProgressPathStep = {
3
+ /** What happens at this step, such as "Received". */
4
+ label: string;
5
+ /** A quiet second line, such as the day it happened or "not yet". */
6
+ detail?: JSX.Element;
7
+ /** Whether the step happened. Done steps show a check and a colored line to the next step. */
8
+ done?: boolean;
9
+ /** Tabler icon class an open step shows in its circle, such as `ti ti-truck`. */
10
+ icon?: string;
11
+ };
12
+ export type ProgressPathProps = {
13
+ steps: readonly ProgressPathStep[];
14
+ /** Accessible name of the list, such as "Path of the item". */
15
+ label?: string;
16
+ class?: string;
17
+ };
18
+ /**
19
+ * The stages of one thing in order, each with a word and a quiet line, such as where an item is on its way. Done steps
20
+ * carry a check; the words say the state, so color is never the only signal. Wide containers lay the steps out side
21
+ * by side, narrow ones, such as a phone, one below the other.
22
+ * @example <ProgressPath steps={[{ label: "Received", detail: "Nov 7", done: true }, { label: "Shipped", detail: "not yet", icon: "ti ti-truck" }]} />
23
+ */
24
+ export declare function ProgressPath(props: ProgressPathProps): JSX.Element;
25
+ export default ProgressPath;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A chart is drawn once at its drawing width and CSS stretches it to its box; labels keep their pixel size. On a box
3
+ * narrower than the drawing, neighbouring date labels would meet. Each label therefore names the box width it needs:
4
+ * every second label gives way first, then every fourth, and the first label always stays. The width a label needs is
5
+ * where the labels that remain at its level have the room of the widest label between them.
6
+ */
7
+ export declare const tickRooms: (positions: readonly number[], texts: readonly string[], drawWidth: number) => number[];
8
+ /** The style that lets CSS hide a time label (`data-time-tick`) in a box narrower than it needs (`tickRooms`). */
9
+ export declare const tickRoomStyle: (room: number) => string;
10
+ /**
11
+ * Marks the X tick labels of a line drawing that its host stretches (`data-stretch`) with the box width each needs.
12
+ * The X labels are the bottom row of tick labels, the lowest `y` that several labels share; Y labels each have their
13
+ * own. The drawing itself stays as the renderer made it, so only stretching hosts carry the marks.
14
+ */
15
+ export declare const stretchedTickRoomsSvg: (svg: string) => string;
@@ -67,6 +67,7 @@ export { Pagination, type PaginationProps } from "./Pagination";
67
67
  export { PdfThumbnails, type PdfThumbnailsProps } from "./PdfThumbnails";
68
68
  export type { PdfViewerProps, PdfViewerRequest } from "./PdfViewer";
69
69
  export { default as PdfViewer } from "./PdfViewer";
70
+ export { ProgressPath, type ProgressPathProps, type ProgressPathStep } from "./ProgressPath";
70
71
  export type { RangeOption, RangePickerProps } from "./RangePicker";
71
72
  export { default as RangePicker } from "./RangePicker";
72
73
  export { ReactionBar, type ReactionBarItem, type ReactionBarProps } from "./ReactionBar";
@@ -0,0 +1,44 @@
1
+ import { type JSX } from "solid-js";
2
+ export type HoverCardOptions = {
3
+ /** The card's content: a small graphic, a `ProgressPath`, a `DescriptionList`, or a few lines. Information only. */
4
+ content: JSX.Element;
5
+ /** A bold first line, such as the name of what the control shows. */
6
+ title?: JSX.Element;
7
+ /** A quiet line under the title, such as where the thing belongs. */
8
+ detail?: JSX.Element;
9
+ /** A quiet last line, such as what a click on the control does. */
10
+ hint?: JSX.Element;
11
+ /** The side tried first; the card flips only when the other side has more room. Defaults to `below`. */
12
+ side?: "below" | "above";
13
+ /** Which edge of the card lines up with the control. Defaults to `start`. */
14
+ align?: "start" | "end";
15
+ /** Width of the card, such as `32rem`. Defaults to `20rem`; it never gets wider than the screen. */
16
+ width?: string;
17
+ /** Milliseconds a resting pointer waits before the card opens. Defaults to 400. */
18
+ delay?: number;
19
+ /** Keeps the card closed; an open card closes. */
20
+ disabled?: boolean;
21
+ /** Extra class on the card. */
22
+ class?: string;
23
+ };
24
+ export type HoverCardProps = HoverCardOptions & Omit<JSX.HTMLAttributes<HTMLSpanElement>, "content" | "title">;
25
+ export type HoverCardTriggerProps = HoverCardOptions & Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "content" | "title" | "class"> & {
26
+ /** Class of the trigger button; `class` styles the card. */
27
+ triggerClass?: string;
28
+ /**
29
+ * Links or buttons of the card, at the start of its last line, with `hint` at the end. A card with actions is a
30
+ * non-modal dialog: only a press or Enter opens it, the focus moves into it, and Escape returns the focus to the
31
+ * trigger. Its body may then hold controls too, such as "Try again". Resting the pointer opens nothing.
32
+ */
33
+ actions?: JSX.Element;
34
+ };
35
+ type HoverCardComponent = ((props: HoverCardProps) => JSX.Element) & {
36
+ Trigger: (props: HoverCardTriggerProps) => JSX.Element;
37
+ };
38
+ /**
39
+ * A card with rich details beside its control: a title, a small graphic, steps with labels, or rows of facts. It is
40
+ * the large sibling of `Tooltip`. Wrap a control with its own action in `HoverCard`; use `HoverCard.Trigger` when the
41
+ * content has no control of its own.
42
+ */
43
+ export declare const HoverCard: HoverCardComponent;
44
+ export default HoverCard;
@@ -15,6 +15,11 @@ export type TooltipProps = {
15
15
  };
16
16
  export type TooltipAnchorProps = Omit<JSX.HTMLAttributes<HTMLSpanElement>, "content"> & Omit<TooltipProps, "target" | "focusTarget">;
17
17
  export type TooltipTriggerProps = Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "content"> & Omit<TooltipProps, "target" | "focusTarget">;
18
+ /**
19
+ * True below a Tooltip.Anchor or a HoverCard, whose hint already covers the controls inside it. Not part of the public
20
+ * index.
21
+ */
22
+ export declare const AnchorContext: import("solid-js").Context<boolean>;
18
23
  /**
19
24
  * The hint an icon-only control shows by default: its label, unless the caller
20
25
  * passes its own `tooltip` (or `false`) or an enclosing Tooltip.Anchor already
@@ -3,6 +3,8 @@ export { announce } from "./announce";
3
3
  export type { DialogClose, DialogCore, DialogRender, OpenDialogOptions } from "./dialog-core";
4
4
  export { dialogCore } from "./dialog-core";
5
5
  export type { DialogTone } from "./dialog-tone";
6
+ export type { HoverCardOptions, HoverCardProps, HoverCardTriggerProps } from "./HoverCard";
7
+ export { HoverCard } from "./HoverCard";
6
8
  export type { HoverPreviewController, HoverPreviewOptions, HoverPreviewPlacement, HoverPreviewProps } from "./HoverPreview";
7
9
  export { createHoverPreview, HoverPreview } from "./HoverPreview";
8
10
  export type { InlineGuidanceProps } from "./InlineGuidance";
@@ -14,8 +14,6 @@ export declare const DialogHeader: (props: {
14
14
  /** A success tone draws its check once when the header appears; see `prompts.success`. */
15
15
  celebrate?: boolean;
16
16
  }) => JSX.Element;
17
- export declare const panelClass: (options?: Pick<DialogOptions, "size" | "surface" | "variant">) => string;
18
- export declare const contentClass: (surface?: DialogOptions["surface"]) => string;
19
17
  export declare const confirmPrompt: (content: PromptContent, options?: ConfirmOptions) => Promise<boolean | undefined>;
20
18
  /** `prompts` starts as this object; `PanelDialog` asks through it, so it reaches a replaced `prompts.confirm` too. */
21
19
  export declare const sharedPrompts: {
@@ -0,0 +1,3 @@
1
+ import { type DialogRender, type OpenDialogOptions } from "./dialog-core";
2
+ /** Opens the prompt as a bottom sheet; dismissing it, by its handle or a drag, takes the prompt's own dismiss path. */
3
+ export declare const openPromptSheet: <T>(render: DialogRender<T>, options: OpenDialogOptions) => Promise<T | undefined>;
@@ -0,0 +1,20 @@
1
+ import { type DialogRender, type OpenDialogOptions } from "./dialog-core";
2
+ /** The prompt options that shape its dialog, as in `DialogOptions`. */
3
+ type PromptFrame = {
4
+ size?: string;
5
+ surface?: string;
6
+ variant?: string;
7
+ signal?: AbortSignal;
8
+ cancelBehavior?: OpenDialogOptions["cancelBehavior"];
9
+ history?: boolean;
10
+ ariaLabel?: string;
11
+ title?: string;
12
+ };
13
+ export declare const panelClass: (options?: PromptFrame) => string;
14
+ export declare const contentClass: (surface?: string) => string;
15
+ /**
16
+ * Opens a prompt with the frame, cancellation, history, and name every prompt shares: the dialog in the middle, or on
17
+ * a phone the same content as a bottom sheet. `label` names it when it has no title; `sheet: false` keeps the dialog.
18
+ */
19
+ export declare const openPrompt: <T>(render: DialogRender<T>, options: PromptFrame | undefined, label: string, sheet?: boolean, initialFocus?: OpenDialogOptions["initialFocus"]) => Promise<T | undefined>;
20
+ export {};
@@ -41,7 +41,11 @@ export type ToastOptions = {
41
41
  };
42
42
  export type ToastHandle = {
43
43
  dismiss: () => void;
44
- update: (description: string, options?: ToastOptions) => void;
44
+ /**
45
+ * Changes the toast in place. Returns `false` when the toast is already gone, closed by the person or a timer, so the
46
+ * caller can still report a result, such as a failure, with a new toast. (`void` keeps existing test doubles valid.)
47
+ */
48
+ update: (description: string, options?: ToastOptions) => boolean | void;
45
49
  };
46
50
  export type ToastSlotOptions = {
47
51
  /** Names the slot's close button: "Close: {label}". */
@@ -0,0 +1,23 @@
1
+ /** Distance between a surface and its anchor. */
2
+ export declare const ANCHOR_GAP = 6;
3
+ /** Where a surface at a control becomes a bottom sheet across the screen. */
4
+ export declare const SHEET_QUERY = "(max-width: 47.999rem)";
5
+ export type AnchorPlacementOptions = {
6
+ /** The side tried first. Defaults to `below`. */
7
+ side?: "below" | "above";
8
+ /** Which edge lines up with the anchor. */
9
+ align: "start" | "end";
10
+ /** The side chosen earlier, kept so a surface that grows never flips while open. */
11
+ above?: boolean;
12
+ /** The tallest the surface gets while open; the side is chosen for this height. */
13
+ plannedHeight?: number;
14
+ };
15
+ /**
16
+ * Places a fixed surface below or above its anchor, lined up with the anchor's start or end edge, and clamps it into
17
+ * the visible viewport with a margin. The surface flips to the other side only when that side has more room. Returns
18
+ * the chosen side, to keep it while the surface stays open, and the room on that side.
19
+ */
20
+ export declare const placeAtAnchor: (surface: HTMLElement, anchor: HTMLElement, options: AnchorPlacementOptions) => {
21
+ above: boolean;
22
+ room: number;
23
+ };
@@ -0,0 +1,11 @@
1
+ type UiScope = {
2
+ primary: string | null;
3
+ theme: "light" | "dark";
4
+ };
5
+ export declare const PRIMARY_ATTRIBUTE = "data-k2b-primary";
6
+ export declare const currentUiSource: () => Element | undefined;
7
+ /** A trigger owns the palette during dispatch; programmatic opens use focused UI. */
8
+ export declare const readUiScope: (source?: Element | null) => UiScope;
9
+ export declare const applyUiScope: (target: HTMLElement, scope: UiScope) => void;
10
+ export declare const inheritUiScope: (target: HTMLElement, source?: Element) => void;
11
+ export {};
@@ -1 +1 @@
1
- export declare const getK2bPortalRoot: (scope?: HTMLElement | null) => HTMLElement;
1
+ export declare const getK2bPortalRoot: (scope?: HTMLElement | null, trigger?: Element | null, doc?: Document) => HTMLElement;
@@ -21,6 +21,9 @@ declare const uiMessages: import("@k2b/stdlib").Catalog<{
21
21
  loading: string;
22
22
  noData: string;
23
23
  noResults: string;
24
+ changeAdded: string;
25
+ changeRemoved: string;
26
+ changeSame: string;
24
27
  nothingHere: string;
25
28
  nothingToShow: string;
26
29
  no: string;
@@ -35,6 +38,8 @@ declare const uiMessages: import("@k2b/stdlib").Catalog<{
35
38
  retry: string;
36
39
  tryAgain: string;
37
40
  movedHintDismiss: string;
41
+ progressDone: string;
42
+ progressOpen: string;
38
43
  reset: string;
39
44
  required: string;
40
45
  delete: string;
@@ -1,10 +1,6 @@
1
1
  import { type JSX } from "solid-js";
2
2
  import type { DialogTone } from "../feedback/dialog-tone";
3
- /** Initial focus goes to the first input of the top sheet, otherwise to the
4
- * dialog element itself. Native `showModal()` focuses the first focusable
5
- * descendant, which is the drag handle; iOS shows a ring for that programmatic
6
- * focus, so the sheet moves it to the ring-less dialog before the next paint. */
7
- declare const sheetInitialFocus: (dialog: HTMLDialogElement) => HTMLElement;
3
+ import { sheetInitialFocus } from "./sheet-motion";
8
4
  export declare const bottomSheetOptions: {
9
5
  panelClassName: string;
10
6
  contentClassName: string;
@@ -51,10 +51,35 @@ export type DiscussionItemProps = Omit<JSX.LiHTMLAttributes<HTMLLIElement>, "chi
51
51
  actionVisibility?: "always" | "progressive";
52
52
  class?: string;
53
53
  };
54
+ export type DiscussionThreadProps = {
55
+ /** Accessible name of the thread, such as "Comments on line 3". */
56
+ label: string;
57
+ /** The entries, as `Discussion.Item`s. In a thread every entry is flush, with a small avatar, name and time in one line, and the text below. */
58
+ children?: JSX.Element;
59
+ /** Without it the thread is read only: no reply field and no writing. */
60
+ onSubmit?: (message: string) => boolean | void | Promise<boolean | void>;
61
+ /** The reply field's placeholder and both fields' name, such as "Reply …" or "Comment on line 5 …". */
62
+ placeholder: string;
63
+ /** A quiet line beside the buttons while writing, such as who will see the comment and when. */
64
+ hint?: JSX.Element;
65
+ /** Label of the button that posts, such as "Comment". */
66
+ submitLabel: string;
67
+ cancelLabel?: string;
68
+ /** Whether the writing field is open; omit to let the thread manage it. */
69
+ writing?: boolean;
70
+ onWritingChange?: (writing: boolean) => void;
71
+ /** Opens with the writing field, such as a new thread on a line. */
72
+ defaultWriting?: boolean;
73
+ /** Older entries exist: "Load earlier" above the first entry calls `onLoadMore`. */
74
+ hasMore?: boolean;
75
+ onLoadMore?: () => boolean | void | Promise<boolean | void>;
76
+ loadMoreLabel?: string;
77
+ };
54
78
  type DiscussionComponent = ((props: DiscussionProps) => JSX.Element) & {
55
79
  Composer: (props: DiscussionComposerProps) => JSX.Element;
56
80
  List: (props: DiscussionListProps) => JSX.Element;
57
81
  Item: (props: DiscussionItemProps) => JSX.Element;
82
+ Thread: (props: DiscussionThreadProps) => JSX.Element;
58
83
  };
59
84
  declare const Discussion: DiscussionComponent;
60
85
  export default Discussion;