@k2b/ui 0.58.0 → 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 (237) 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/Tabs.js +58 -19
  5. package/dist/browser/actions/Tabs.js.map +1 -1
  6. package/dist/browser/actions/Toolbar.js +66 -60
  7. package/dist/browser/actions/Toolbar.js.map +1 -1
  8. package/dist/browser/actions/ViewTabs.js +89 -73
  9. package/dist/browser/actions/ViewTabs.js.map +1 -1
  10. package/dist/browser/actions/drag-and-drop.js +2 -1
  11. package/dist/browser/actions/drag-and-drop.js.map +1 -1
  12. package/dist/browser/charts/core/snapshot.js +3 -1
  13. package/dist/browser/charts/core/snapshot.js.map +1 -1
  14. package/dist/browser/chat/ChatComposer.js +832 -679
  15. package/dist/browser/chat/ChatComposer.js.map +1 -1
  16. package/dist/browser/chat/ChatContextPopup.js +34 -4
  17. package/dist/browser/chat/ChatContextPopup.js.map +1 -1
  18. package/dist/browser/chat/ChatPrimitives.js +471 -284
  19. package/dist/browser/chat/ChatPrimitives.js.map +1 -1
  20. package/dist/browser/chat/ChatTasks.js +218 -80
  21. package/dist/browser/chat/ChatTasks.js.map +1 -1
  22. package/dist/browser/chat/ChatTimeline.js +5 -3
  23. package/dist/browser/chat/ChatTimeline.js.map +1 -1
  24. package/dist/browser/chat/chat-behavior.js +12 -0
  25. package/dist/browser/chat/chat-behavior.js.map +1 -1
  26. package/dist/browser/chat/chat-messages.js +50 -2
  27. package/dist/browser/chat/chat-messages.js.map +1 -1
  28. package/dist/browser/chat/index.js +2 -1
  29. package/dist/browser/chat/index.js.map +1 -1
  30. package/dist/browser/chat/types.js.map +1 -1
  31. package/dist/browser/content/Calendar.js +2 -2
  32. package/dist/browser/content/Calendar.js.map +1 -1
  33. package/dist/browser/content/CalendarWeekView.js +9 -2
  34. package/dist/browser/content/CalendarWeekView.js.map +1 -1
  35. package/dist/browser/content/ChartRoot.js +4 -1
  36. package/dist/browser/content/ChartRoot.js.map +1 -1
  37. package/dist/browser/content/DataTable.js +9 -0
  38. package/dist/browser/content/DataTable.js.map +1 -1
  39. package/dist/browser/content/Lightbox.js +2 -2
  40. package/dist/browser/content/Lightbox.js.map +1 -1
  41. package/dist/browser/content/PdfPages.js +1 -0
  42. package/dist/browser/content/PdfPages.js.map +1 -1
  43. package/dist/browser/content/ProgressPath.js +101 -0
  44. package/dist/browser/content/ProgressPath.js.map +1 -0
  45. package/dist/browser/content/Timeline.js +1 -1
  46. package/dist/browser/content/Timeline.js.map +1 -1
  47. package/dist/browser/content/chart-tick-room.js +59 -0
  48. package/dist/browser/content/chart-tick-room.js.map +1 -0
  49. package/dist/browser/content/index.js +1 -0
  50. package/dist/browser/content/index.js.map +1 -1
  51. package/dist/browser/feedback/HoverCard.js +535 -0
  52. package/dist/browser/feedback/HoverCard.js.map +1 -0
  53. package/dist/browser/feedback/Tooltip.js +5 -2
  54. package/dist/browser/feedback/Tooltip.js.map +1 -1
  55. package/dist/browser/feedback/dialog-core.js +12 -8
  56. package/dist/browser/feedback/dialog-core.js.map +1 -1
  57. package/dist/browser/feedback/index.js +1 -0
  58. package/dist/browser/feedback/index.js.map +1 -1
  59. package/dist/browser/feedback/prompt-confirm.js +3 -17
  60. package/dist/browser/feedback/prompt-confirm.js.map +1 -1
  61. package/dist/browser/feedback/prompt-sheet-view.js +95 -0
  62. package/dist/browser/feedback/prompt-sheet-view.js.map +1 -0
  63. package/dist/browser/feedback/prompt-sheet.js +36 -0
  64. package/dist/browser/feedback/prompt-sheet.js.map +1 -0
  65. package/dist/browser/feedback/prompts.js +14 -38
  66. package/dist/browser/feedback/prompts.js.map +1 -1
  67. package/dist/browser/feedback/toast.js +17 -12
  68. package/dist/browser/feedback/toast.js.map +1 -1
  69. package/dist/browser/internal/anchor-placement.js +38 -0
  70. package/dist/browser/internal/anchor-placement.js.map +1 -0
  71. package/dist/browser/internal/portal-scope.js +36 -0
  72. package/dist/browser/internal/portal-scope.js.map +1 -0
  73. package/dist/browser/internal/portal.js +13 -10
  74. package/dist/browser/internal/portal.js.map +1 -1
  75. package/dist/browser/intl/messages.js +10 -0
  76. package/dist/browser/intl/messages.js.map +1 -1
  77. package/dist/browser/layout/AnchoredPopover.js +10 -25
  78. package/dist/browser/layout/AnchoredPopover.js.map +1 -1
  79. package/dist/browser/layout/BottomSheet.js +1 -12
  80. package/dist/browser/layout/BottomSheet.js.map +1 -1
  81. package/dist/browser/layout/Discussion.js +298 -3
  82. package/dist/browser/layout/Discussion.js.map +1 -1
  83. package/dist/browser/layout/FloatingWindow.js +2 -0
  84. package/dist/browser/layout/FloatingWindow.js.map +1 -1
  85. package/dist/browser/layout/Panes.js +3 -0
  86. package/dist/browser/layout/Panes.js.map +1 -1
  87. package/dist/browser/layout/index.js.map +1 -1
  88. package/dist/browser/layout/panes-preview-scope.js +9 -0
  89. package/dist/browser/layout/panes-preview-scope.js.map +1 -0
  90. package/dist/browser/layout/sheet-handle.js +173 -37
  91. package/dist/browser/layout/sheet-handle.js.map +1 -1
  92. package/dist/browser/layout/sheet-motion.js +38 -5
  93. package/dist/browser/layout/sheet-motion.js.map +1 -1
  94. package/dist/browser/panes.js +3 -0
  95. package/dist/browser/panes.js.map +1 -0
  96. package/dist/browser/surfaces/ChangeList.js +78 -16
  97. package/dist/browser/surfaces/ChangeList.js.map +1 -1
  98. package/dist/browser/surfaces/DotStrip.js +126 -41
  99. package/dist/browser/surfaces/DotStrip.js.map +1 -1
  100. package/dist/browser/surfaces/LinkCard.js +69 -16
  101. package/dist/browser/surfaces/LinkCard.js.map +1 -1
  102. package/dist/ssr/actions/ContextMenu.js +1 -0
  103. package/dist/ssr/actions/ContextMenu.js.map +1 -1
  104. package/dist/ssr/actions/Tabs.js +21 -6
  105. package/dist/ssr/actions/Tabs.js.map +1 -1
  106. package/dist/ssr/actions/Toolbar.js +24 -18
  107. package/dist/ssr/actions/Toolbar.js.map +1 -1
  108. package/dist/ssr/actions/ViewTabs.js +27 -20
  109. package/dist/ssr/actions/ViewTabs.js.map +1 -1
  110. package/dist/ssr/actions/drag-and-drop.js +2 -1
  111. package/dist/ssr/actions/drag-and-drop.js.map +1 -1
  112. package/dist/ssr/charts/core/snapshot.js +3 -1
  113. package/dist/ssr/charts/core/snapshot.js.map +1 -1
  114. package/dist/ssr/chat/ChatComposer.js +250 -142
  115. package/dist/ssr/chat/ChatComposer.js.map +1 -1
  116. package/dist/ssr/chat/ChatContextPopup.js +17 -1
  117. package/dist/ssr/chat/ChatContextPopup.js.map +1 -1
  118. package/dist/ssr/chat/ChatPrimitives.js +179 -51
  119. package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
  120. package/dist/ssr/chat/ChatTasks.js +117 -27
  121. package/dist/ssr/chat/ChatTasks.js.map +1 -1
  122. package/dist/ssr/chat/ChatTimeline.js +5 -3
  123. package/dist/ssr/chat/ChatTimeline.js.map +1 -1
  124. package/dist/ssr/chat/chat-behavior.js +12 -0
  125. package/dist/ssr/chat/chat-behavior.js.map +1 -1
  126. package/dist/ssr/chat/chat-messages.js +50 -2
  127. package/dist/ssr/chat/chat-messages.js.map +1 -1
  128. package/dist/ssr/chat/index.js +2 -1
  129. package/dist/ssr/chat/index.js.map +1 -1
  130. package/dist/ssr/chat/types.js.map +1 -1
  131. package/dist/ssr/content/Calendar.js +2 -2
  132. package/dist/ssr/content/Calendar.js.map +1 -1
  133. package/dist/ssr/content/CalendarWeekView.js +9 -2
  134. package/dist/ssr/content/CalendarWeekView.js.map +1 -1
  135. package/dist/ssr/content/ChartRoot.js +4 -1
  136. package/dist/ssr/content/ChartRoot.js.map +1 -1
  137. package/dist/ssr/content/DataTable.js +9 -0
  138. package/dist/ssr/content/DataTable.js.map +1 -1
  139. package/dist/ssr/content/Lightbox.js +2 -2
  140. package/dist/ssr/content/Lightbox.js.map +1 -1
  141. package/dist/ssr/content/PdfPages.js +1 -0
  142. package/dist/ssr/content/PdfPages.js.map +1 -1
  143. package/dist/ssr/content/ProgressPath.js +51 -0
  144. package/dist/ssr/content/ProgressPath.js.map +1 -0
  145. package/dist/ssr/content/Timeline.js +1 -1
  146. package/dist/ssr/content/Timeline.js.map +1 -1
  147. package/dist/ssr/content/chart-tick-room.js +59 -0
  148. package/dist/ssr/content/chart-tick-room.js.map +1 -0
  149. package/dist/ssr/content/index.js +1 -0
  150. package/dist/ssr/content/index.js.map +1 -1
  151. package/dist/ssr/feedback/HoverCard.js +473 -0
  152. package/dist/ssr/feedback/HoverCard.js.map +1 -0
  153. package/dist/ssr/feedback/Tooltip.js +5 -2
  154. package/dist/ssr/feedback/Tooltip.js.map +1 -1
  155. package/dist/ssr/feedback/dialog-core.js +12 -8
  156. package/dist/ssr/feedback/dialog-core.js.map +1 -1
  157. package/dist/ssr/feedback/index.js +1 -0
  158. package/dist/ssr/feedback/index.js.map +1 -1
  159. package/dist/ssr/feedback/prompt-confirm.js +3 -17
  160. package/dist/ssr/feedback/prompt-confirm.js.map +1 -1
  161. package/dist/ssr/feedback/prompt-sheet-view.js +61 -0
  162. package/dist/ssr/feedback/prompt-sheet-view.js.map +1 -0
  163. package/dist/ssr/feedback/prompt-sheet.js +36 -0
  164. package/dist/ssr/feedback/prompt-sheet.js.map +1 -0
  165. package/dist/ssr/feedback/prompts.js +14 -38
  166. package/dist/ssr/feedback/prompts.js.map +1 -1
  167. package/dist/ssr/feedback/toast.js +17 -12
  168. package/dist/ssr/feedback/toast.js.map +1 -1
  169. package/dist/ssr/internal/anchor-placement.js +38 -0
  170. package/dist/ssr/internal/anchor-placement.js.map +1 -0
  171. package/dist/ssr/internal/portal-scope.js +36 -0
  172. package/dist/ssr/internal/portal-scope.js.map +1 -0
  173. package/dist/ssr/internal/portal.js +13 -10
  174. package/dist/ssr/internal/portal.js.map +1 -1
  175. package/dist/ssr/intl/messages.js +10 -0
  176. package/dist/ssr/intl/messages.js.map +1 -1
  177. package/dist/ssr/layout/AnchoredPopover.js +10 -25
  178. package/dist/ssr/layout/AnchoredPopover.js.map +1 -1
  179. package/dist/ssr/layout/BottomSheet.js +1 -12
  180. package/dist/ssr/layout/BottomSheet.js.map +1 -1
  181. package/dist/ssr/layout/Discussion.js +168 -2
  182. package/dist/ssr/layout/Discussion.js.map +1 -1
  183. package/dist/ssr/layout/FloatingWindow.js +2 -0
  184. package/dist/ssr/layout/FloatingWindow.js.map +1 -1
  185. package/dist/ssr/layout/Panes.js +3 -0
  186. package/dist/ssr/layout/Panes.js.map +1 -1
  187. package/dist/ssr/layout/index.js.map +1 -1
  188. package/dist/ssr/layout/panes-preview-scope.js +9 -0
  189. package/dist/ssr/layout/panes-preview-scope.js.map +1 -0
  190. package/dist/ssr/layout/sheet-handle.js +173 -37
  191. package/dist/ssr/layout/sheet-handle.js.map +1 -1
  192. package/dist/ssr/layout/sheet-motion.js +38 -5
  193. package/dist/ssr/layout/sheet-motion.js.map +1 -1
  194. package/dist/ssr/panes.js +3 -0
  195. package/dist/ssr/panes.js.map +1 -0
  196. package/dist/ssr/surfaces/ChangeList.js +37 -5
  197. package/dist/ssr/surfaces/ChangeList.js.map +1 -1
  198. package/dist/ssr/surfaces/DotStrip.js +75 -12
  199. package/dist/ssr/surfaces/DotStrip.js.map +1 -1
  200. package/dist/ssr/surfaces/LinkCard.js +46 -7
  201. package/dist/ssr/surfaces/LinkCard.js.map +1 -1
  202. package/dist/styles.css +1 -1
  203. package/dist/types/actions/Tabs.d.ts +9 -0
  204. package/dist/types/actions/ViewTabs.d.ts +2 -0
  205. package/dist/types/chat/ChatComposer.d.ts +24 -2
  206. package/dist/types/chat/ChatPrimitives.d.ts +6 -1
  207. package/dist/types/chat/ChatTasks.d.ts +14 -1
  208. package/dist/types/chat/chat-behavior.d.ts +14 -0
  209. package/dist/types/chat/chat-messages.d.ts +24 -0
  210. package/dist/types/chat/index.d.ts +5 -4
  211. package/dist/types/chat/types.d.ts +27 -0
  212. package/dist/types/content/ProgressPath.d.ts +25 -0
  213. package/dist/types/content/chart-tick-room.d.ts +15 -0
  214. package/dist/types/content/index.d.ts +1 -0
  215. package/dist/types/feedback/HoverCard.d.ts +44 -0
  216. package/dist/types/feedback/Tooltip.d.ts +5 -0
  217. package/dist/types/feedback/index.d.ts +2 -0
  218. package/dist/types/feedback/prompt-confirm.d.ts +0 -2
  219. package/dist/types/feedback/prompt-sheet-view.d.ts +3 -0
  220. package/dist/types/feedback/prompt-sheet.d.ts +20 -0
  221. package/dist/types/feedback/toast.d.ts +5 -1
  222. package/dist/types/internal/anchor-placement.d.ts +23 -0
  223. package/dist/types/internal/portal-scope.d.ts +11 -0
  224. package/dist/types/internal/portal.d.ts +1 -1
  225. package/dist/types/intl/messages.d.ts +5 -0
  226. package/dist/types/layout/BottomSheet.d.ts +1 -5
  227. package/dist/types/layout/Discussion.d.ts +25 -0
  228. package/dist/types/layout/Panes.d.ts +6 -0
  229. package/dist/types/layout/index.d.ts +1 -1
  230. package/dist/types/layout/panes-preview-scope.d.ts +2 -0
  231. package/dist/types/layout/sheet-handle.d.ts +17 -8
  232. package/dist/types/layout/sheet-motion.d.ts +5 -0
  233. package/dist/types/panes.d.ts +2 -0
  234. package/dist/types/surfaces/ChangeList.d.ts +23 -4
  235. package/dist/types/surfaces/DotStrip.d.ts +25 -5
  236. package/dist/types/surfaces/LinkCard.d.ts +13 -0
  237. package/package.json +8 -2
@@ -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;
@@ -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;
@@ -11,6 +11,12 @@ export type PanesItem = {
11
11
  export type PanesProps = {
12
12
  layout: PanesLayout;
13
13
  onLayoutChange: (layout: PanesLayout) => void;
14
+ /**
15
+ * The person chose an item: a click, focus, or work in its pane. Below `PANES_NARROW_WIDTH` this is the only report,
16
+ * because the narrow row of tabs never changes the stored layout; an application that names the front item in its
17
+ * URL or keeps it across devices listens here.
18
+ */
19
+ onActivate?: (itemId: string) => void;
14
20
  items: readonly PanesItem[];
15
21
  movable?: boolean;
16
22
  resizable?: boolean;
@@ -18,7 +18,7 @@ export { default as DetailPanel } from "./DetailPanel";
18
18
  export type { DetailAccessEntry, DetailAccessProps, DetailLinkItem, DetailLinksProps, DetailPresencePerson, DetailPresenceProps, DetailPresenceState, DetailPropertiesProps, DetailProperty, DetailTag, DetailTagsProps, } from "./DetailSections";
19
19
  export { DetailAccess, DetailLinks, DetailPresence, DetailPresenceSlot, DetailProperties, DetailTags } from "./DetailSections";
20
20
  export { DETAILS_ICON, DetailsToggle, type DetailsToggleProps } from "./DetailsToggle";
21
- export type { DiscussionComposerProps, DiscussionItemProps, DiscussionListProps, DiscussionProps } from "./Discussion";
21
+ export type { DiscussionComposerProps, DiscussionItemProps, DiscussionListProps, DiscussionProps, DiscussionThreadProps, } from "./Discussion";
22
22
  export { default as Discussion } from "./Discussion";
23
23
  export type { FloatingWindowClose, FloatingWindowProps, FloatingWindowState, OpenFloatingWindowOptions, } from "./FloatingWindow";
24
24
  export { default as FloatingWindow, type FloatingWindowBounds, type FloatingWindowRect, fitFloatingWindowRect, openFloatingWindow, } from "./FloatingWindow";
@@ -0,0 +1,2 @@
1
+ /** stdlib clones the preview into the body before onDragStart runs. */
2
+ export declare const preservePanesPreviewScope: (source: HTMLElement) => void;
@@ -1,21 +1,30 @@
1
1
  export type SheetHandleOptions = {
2
- /** The sheet the handle sits on. It carries the current detent in `data-sheet-detent`. */
2
+ /**
3
+ * The sheet the handle sits on, anchored at its bottom edge. It carries the current detent in `data-sheet-detent`.
4
+ * Its container clips with `overflow: clip`, so the part that slides below the edge never scrolls into view.
5
+ */
3
6
  sheet: HTMLElement;
4
7
  /** The detents' names, lowest first. The stylesheet gives each `[data-sheet-detent="…"]` its height. */
5
8
  detents: readonly string[];
6
9
  /** The detent the stylesheet draws while the sheet has no `data-sheet-detent`, such as in the server's markup. */
7
10
  initial: string;
8
- /** After a drag or a press moved the sheet to another detent, for example to rename the handle. */
11
+ /** When a drag or a press sends the sheet to another detent, as it starts to glide, for example to rename the handle. */
9
12
  onChange?: (detent: string) => void;
10
- /** Without it, a drag stops at the lowest detent; with it, a drag well below that detent asks to close. */
13
+ /**
14
+ * Without it, a drag stops at the lowest detent; with it, a drag well below that detent slides the sheet out and
15
+ * then asks to close. When the sheet is still shown afterwards, as when the owner asks first, it returns.
16
+ */
11
17
  onDismiss?: () => void;
12
18
  };
13
19
  /**
14
20
  * Lets a sheet's handle drag it between detents. The handle stays a button: a press, by pointer, Enter or Space,
15
- * moves the sheet to the next detent up, and from the highest back to the lowest. A drag follows the pointer with an
16
- * inline height and, on release, snaps to the detent nearest to where the pointer's speed would carry it. The snap
17
- * animates with the sheet's own height transition, so reduced motion makes it instant. The stylesheet owns every
18
- * resting height, which keeps the server's first frame and a rotation correct without script; the handle measures
19
- * them when a drag starts.
21
+ * moves the sheet to the next detent up, and from the highest back to the lowest.
22
+ *
23
+ * The sheet moves by transform only, like `BottomSheet`. When a drag or a glide starts, its layout height is pinned
24
+ * at the highest detent and a transform shows the visible part; the content inside does not lay out again on every
25
+ * frame. A release glides to the detent nearest to where the pointer's speed would carry it; then the stylesheet's
26
+ * height for that detent takes over in one step that looks the same. Reduced motion makes every glide instant. The
27
+ * stylesheet owns every resting height, which keeps the server's first frame and a rotation correct without script;
28
+ * it must not transition `height`.
20
29
  */
21
30
  export declare function attachSheetHandle(handle: HTMLElement, options: SheetHandleOptions): () => void;
@@ -22,6 +22,11 @@ export type SheetMotion = {
22
22
  step: (direction: "up" | "down") => void;
23
23
  dispose: () => void;
24
24
  };
25
+ /** Initial focus goes to the first input of the top sheet, otherwise to the
26
+ * dialog element itself. Native `showModal()` focuses the first focusable
27
+ * descendant, which is the drag handle; iOS shows a ring for that programmatic
28
+ * focus, so the sheet moves it to the ring-less dialog before the next paint. */
29
+ export declare const sheetInitialFocus: (dialog: HTMLDialogElement) => HTMLElement;
25
30
  /**
26
31
  * Moves a bottom sheet with transform and opacity only. Its layout height is fixed when it opens (the content's height,
27
32
  * or the full height with detents) and never animates; the sheet slides by `--k2b-sheet-y`, the footer stays on the