@k2b/ui 0.33.0 → 0.35.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 (310) hide show
  1. package/dist/base.css +14 -1
  2. package/dist/browser/actions/ContextMenu.js +13 -0
  3. package/dist/browser/actions/ContextMenu.js.map +1 -1
  4. package/dist/browser/actions/Dropdown.js +16 -4
  5. package/dist/browser/actions/Dropdown.js.map +1 -1
  6. package/dist/browser/actions/SelectionToolbar.js +129 -0
  7. package/dist/browser/actions/SelectionToolbar.js.map +1 -0
  8. package/dist/browser/actions/index.js +1 -0
  9. package/dist/browser/actions/index.js.map +1 -1
  10. package/dist/browser/charts.js +6 -0
  11. package/dist/browser/charts.js.map +1 -0
  12. package/dist/browser/chat/ChatComposer.js +525 -407
  13. package/dist/browser/chat/ChatComposer.js.map +1 -1
  14. package/dist/browser/chat/chat-messages.js +4 -0
  15. package/dist/browser/chat/chat-messages.js.map +1 -1
  16. package/dist/browser/chat/composer-document.js +19 -0
  17. package/dist/browser/chat/composer-document.js.map +1 -1
  18. package/dist/browser/chat/index.js.map +1 -1
  19. package/dist/browser/content/Chart.js +8 -0
  20. package/dist/browser/content/Chart.js.map +1 -1
  21. package/dist/browser/content/FileGrid.js +231 -9
  22. package/dist/browser/content/FileGrid.js.map +1 -1
  23. package/dist/browser/content/FileTypeIcon.js +15 -0
  24. package/dist/browser/content/FileTypeIcon.js.map +1 -1
  25. package/dist/browser/content/FileView.js +11 -4
  26. package/dist/browser/content/FileView.js.map +1 -1
  27. package/dist/browser/content/MatchText.js +61 -0
  28. package/dist/browser/content/MatchText.js.map +1 -0
  29. package/dist/browser/content/MessageRow.js +73 -53
  30. package/dist/browser/content/MessageRow.js.map +1 -1
  31. package/dist/browser/content/ReactionBar.js +3 -1
  32. package/dist/browser/content/ReactionBar.js.map +1 -1
  33. package/dist/browser/content/calendar-day-scroll.js +4 -3
  34. package/dist/browser/content/calendar-day-scroll.js.map +1 -1
  35. package/dist/browser/content/chart-bar.js +476 -0
  36. package/dist/browser/content/chart-bar.js.map +1 -0
  37. package/dist/browser/content/file-list-messages.js +52 -0
  38. package/dist/browser/content/file-list-messages.js.map +1 -0
  39. package/dist/browser/content/index.js +2 -1
  40. package/dist/browser/content/index.js.map +1 -1
  41. package/dist/browser/feedback/Tooltip.js +31 -14
  42. package/dist/browser/feedback/Tooltip.js.map +1 -1
  43. package/dist/browser/inputs/ChoiceList.js +178 -0
  44. package/dist/browser/inputs/ChoiceList.js.map +1 -0
  45. package/dist/browser/inputs/ChoiceSlider.js +314 -0
  46. package/dist/browser/inputs/ChoiceSlider.js.map +1 -0
  47. package/dist/browser/inputs/ChoiceTiles.js +135 -0
  48. package/dist/browser/inputs/ChoiceTiles.js.map +1 -0
  49. package/dist/browser/inputs/ColorChoices.js +120 -0
  50. package/dist/browser/inputs/ColorChoices.js.map +1 -0
  51. package/dist/browser/inputs/QrScanner.js +95 -13
  52. package/dist/browser/inputs/QrScanner.js.map +1 -1
  53. package/dist/browser/inputs/TextInput.js +15 -13
  54. package/dist/browser/inputs/TextInput.js.map +1 -1
  55. package/dist/browser/inputs/index.js +4 -0
  56. package/dist/browser/inputs/index.js.map +1 -1
  57. package/dist/browser/inputs/qr-messages.js +2 -0
  58. package/dist/browser/inputs/qr-messages.js.map +1 -1
  59. package/dist/browser/internal/radio-keys.js +13 -0
  60. package/dist/browser/internal/radio-keys.js.map +1 -0
  61. package/dist/browser/layout/AnchoredPopover.js +180 -0
  62. package/dist/browser/layout/AnchoredPopover.js.map +1 -0
  63. package/dist/browser/layout/AppWorkspace.js +155 -20
  64. package/dist/browser/layout/AppWorkspace.js.map +1 -1
  65. package/dist/browser/layout/DetailPanel.js +443 -333
  66. package/dist/browser/layout/DetailPanel.js.map +1 -1
  67. package/dist/browser/layout/MobileShell.js +21 -7
  68. package/dist/browser/layout/MobileShell.js.map +1 -1
  69. package/dist/browser/layout/Settings.js +283 -175
  70. package/dist/browser/layout/Settings.js.map +1 -1
  71. package/dist/browser/layout/SidebarRailHint.js +79 -0
  72. package/dist/browser/layout/SidebarRailHint.js.map +1 -0
  73. package/dist/browser/layout/SidebarSwitcher.js +79 -66
  74. package/dist/browser/layout/SidebarSwitcher.js.map +1 -1
  75. package/dist/browser/layout/TabBar.js +18 -4
  76. package/dist/browser/layout/TabBar.js.map +1 -1
  77. package/dist/browser/layout/app-workspace-controller.js +11 -4
  78. package/dist/browser/layout/app-workspace-controller.js.map +1 -1
  79. package/dist/browser/layout/detail-panel-messages.js +4 -2
  80. package/dist/browser/layout/detail-panel-messages.js.map +1 -1
  81. package/dist/browser/layout/index.js +2 -1
  82. package/dist/browser/layout/index.js.map +1 -1
  83. package/dist/browser/layout/settings-messages.js +26 -2
  84. package/dist/browser/layout/settings-messages.js.map +1 -1
  85. package/dist/browser/surfaces/Avatar.js +2 -14
  86. package/dist/browser/surfaces/Avatar.js.map +1 -1
  87. package/dist/browser/surfaces/DotStrip.js +70 -0
  88. package/dist/browser/surfaces/DotStrip.js.map +1 -0
  89. package/dist/browser/surfaces/ProgressRing.js +3 -0
  90. package/dist/browser/surfaces/ProgressRing.js.map +1 -1
  91. package/dist/browser/surfaces/ResourceCard.js +125 -68
  92. package/dist/browser/surfaces/ResourceCard.js.map +1 -1
  93. package/dist/browser/surfaces/index.js +2 -0
  94. package/dist/browser/surfaces/index.js.map +1 -1
  95. package/dist/browser/surfaces/person-color.js +18 -0
  96. package/dist/browser/surfaces/person-color.js.map +1 -0
  97. package/dist/browser/surfaces/resource-messages.js +6 -2
  98. package/dist/browser/surfaces/resource-messages.js.map +1 -1
  99. package/dist/browser/text-editor/TextEditor.js +1358 -0
  100. package/dist/browser/text-editor/TextEditor.js.map +1 -0
  101. package/dist/browser/text-editor/clipboard-html.js +152 -0
  102. package/dist/browser/text-editor/clipboard-html.js.map +1 -0
  103. package/dist/browser/text-editor/clipboard-loading.js +68 -0
  104. package/dist/browser/text-editor/clipboard-loading.js.map +1 -0
  105. package/dist/browser/text-editor/clipboard.js +51 -0
  106. package/dist/browser/text-editor/clipboard.js.map +1 -0
  107. package/dist/browser/text-editor/engine.js +125 -0
  108. package/dist/browser/text-editor/engine.js.map +1 -0
  109. package/dist/browser/text-editor/format.js +218 -0
  110. package/dist/browser/text-editor/format.js.map +1 -0
  111. package/dist/browser/text-editor/formatted.js +164 -0
  112. package/dist/browser/text-editor/formatted.js.map +1 -0
  113. package/dist/browser/text-editor/language.js +19 -0
  114. package/dist/browser/text-editor/language.js.map +1 -0
  115. package/dist/browser/text-editor/markdown-table.js +563 -0
  116. package/dist/browser/text-editor/markdown-table.js.map +1 -0
  117. package/dist/browser/text-editor/messages.js +233 -0
  118. package/dist/browser/text-editor/messages.js.map +1 -0
  119. package/dist/browser/text-editor/paste.js +115 -0
  120. package/dist/browser/text-editor/paste.js.map +1 -0
  121. package/dist/browser/text-editor/table.js +1760 -0
  122. package/dist/browser/text-editor/table.js.map +1 -0
  123. package/dist/browser/text-editor.js +5 -0
  124. package/dist/browser/text-editor.js.map +1 -0
  125. package/dist/browser/widgets/Widget.js +3 -2
  126. package/dist/browser/widgets/Widget.js.map +1 -1
  127. package/dist/ssr/actions/ContextMenu.js +9 -0
  128. package/dist/ssr/actions/ContextMenu.js.map +1 -1
  129. package/dist/ssr/actions/Dropdown.js +15 -4
  130. package/dist/ssr/actions/Dropdown.js.map +1 -1
  131. package/dist/ssr/actions/SelectionToolbar.js +104 -0
  132. package/dist/ssr/actions/SelectionToolbar.js.map +1 -0
  133. package/dist/ssr/actions/index.js +1 -0
  134. package/dist/ssr/actions/index.js.map +1 -1
  135. package/dist/ssr/charts.js +6 -0
  136. package/dist/ssr/charts.js.map +1 -0
  137. package/dist/ssr/chat/ChatComposer.js +132 -53
  138. package/dist/ssr/chat/ChatComposer.js.map +1 -1
  139. package/dist/ssr/chat/chat-messages.js +4 -0
  140. package/dist/ssr/chat/chat-messages.js.map +1 -1
  141. package/dist/ssr/chat/composer-document.js +19 -0
  142. package/dist/ssr/chat/composer-document.js.map +1 -1
  143. package/dist/ssr/chat/index.js.map +1 -1
  144. package/dist/ssr/content/Chart.js +8 -0
  145. package/dist/ssr/content/Chart.js.map +1 -1
  146. package/dist/ssr/content/FileGrid.js +132 -5
  147. package/dist/ssr/content/FileGrid.js.map +1 -1
  148. package/dist/ssr/content/FileTypeIcon.js +15 -0
  149. package/dist/ssr/content/FileTypeIcon.js.map +1 -1
  150. package/dist/ssr/content/FileView.js +11 -4
  151. package/dist/ssr/content/FileView.js.map +1 -1
  152. package/dist/ssr/content/MatchText.js +56 -0
  153. package/dist/ssr/content/MatchText.js.map +1 -0
  154. package/dist/ssr/content/MessageRow.js +16 -6
  155. package/dist/ssr/content/MessageRow.js.map +1 -1
  156. package/dist/ssr/content/ReactionBar.js +3 -1
  157. package/dist/ssr/content/ReactionBar.js.map +1 -1
  158. package/dist/ssr/content/calendar-day-scroll.js +4 -3
  159. package/dist/ssr/content/calendar-day-scroll.js.map +1 -1
  160. package/dist/ssr/content/chart-bar.js +476 -0
  161. package/dist/ssr/content/chart-bar.js.map +1 -0
  162. package/dist/ssr/content/file-list-messages.js +52 -0
  163. package/dist/ssr/content/file-list-messages.js.map +1 -0
  164. package/dist/ssr/content/index.js +2 -1
  165. package/dist/ssr/content/index.js.map +1 -1
  166. package/dist/ssr/feedback/Tooltip.js +31 -14
  167. package/dist/ssr/feedback/Tooltip.js.map +1 -1
  168. package/dist/ssr/inputs/ChoiceList.js +95 -0
  169. package/dist/ssr/inputs/ChoiceList.js.map +1 -0
  170. package/dist/ssr/inputs/ChoiceSlider.js +191 -0
  171. package/dist/ssr/inputs/ChoiceSlider.js.map +1 -0
  172. package/dist/ssr/inputs/ChoiceTiles.js +61 -0
  173. package/dist/ssr/inputs/ChoiceTiles.js.map +1 -0
  174. package/dist/ssr/inputs/ColorChoices.js +60 -0
  175. package/dist/ssr/inputs/ColorChoices.js.map +1 -0
  176. package/dist/ssr/inputs/QrScanner.js +89 -10
  177. package/dist/ssr/inputs/QrScanner.js.map +1 -1
  178. package/dist/ssr/inputs/TextInput.js +13 -1
  179. package/dist/ssr/inputs/TextInput.js.map +1 -1
  180. package/dist/ssr/inputs/index.js +4 -0
  181. package/dist/ssr/inputs/index.js.map +1 -1
  182. package/dist/ssr/inputs/qr-messages.js +2 -0
  183. package/dist/ssr/inputs/qr-messages.js.map +1 -1
  184. package/dist/ssr/internal/radio-keys.js +13 -0
  185. package/dist/ssr/internal/radio-keys.js.map +1 -0
  186. package/dist/ssr/layout/AnchoredPopover.js +142 -0
  187. package/dist/ssr/layout/AnchoredPopover.js.map +1 -0
  188. package/dist/ssr/layout/AppWorkspace.js +154 -20
  189. package/dist/ssr/layout/AppWorkspace.js.map +1 -1
  190. package/dist/ssr/layout/DetailPanel.js +181 -108
  191. package/dist/ssr/layout/DetailPanel.js.map +1 -1
  192. package/dist/ssr/layout/MobileShell.js +20 -6
  193. package/dist/ssr/layout/MobileShell.js.map +1 -1
  194. package/dist/ssr/layout/Settings.js +122 -45
  195. package/dist/ssr/layout/Settings.js.map +1 -1
  196. package/dist/ssr/layout/SidebarRailHint.js +79 -0
  197. package/dist/ssr/layout/SidebarRailHint.js.map +1 -0
  198. package/dist/ssr/layout/SidebarSwitcher.js +13 -3
  199. package/dist/ssr/layout/SidebarSwitcher.js.map +1 -1
  200. package/dist/ssr/layout/TabBar.js +11 -3
  201. package/dist/ssr/layout/TabBar.js.map +1 -1
  202. package/dist/ssr/layout/app-workspace-controller.js +11 -4
  203. package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
  204. package/dist/ssr/layout/detail-panel-messages.js +4 -2
  205. package/dist/ssr/layout/detail-panel-messages.js.map +1 -1
  206. package/dist/ssr/layout/index.js +2 -1
  207. package/dist/ssr/layout/index.js.map +1 -1
  208. package/dist/ssr/layout/settings-messages.js +26 -2
  209. package/dist/ssr/layout/settings-messages.js.map +1 -1
  210. package/dist/ssr/surfaces/Avatar.js +2 -14
  211. package/dist/ssr/surfaces/Avatar.js.map +1 -1
  212. package/dist/ssr/surfaces/DotStrip.js +31 -0
  213. package/dist/ssr/surfaces/DotStrip.js.map +1 -0
  214. package/dist/ssr/surfaces/ProgressRing.js +3 -0
  215. package/dist/ssr/surfaces/ProgressRing.js.map +1 -1
  216. package/dist/ssr/surfaces/ResourceCard.js +40 -15
  217. package/dist/ssr/surfaces/ResourceCard.js.map +1 -1
  218. package/dist/ssr/surfaces/index.js +2 -0
  219. package/dist/ssr/surfaces/index.js.map +1 -1
  220. package/dist/ssr/surfaces/person-color.js +18 -0
  221. package/dist/ssr/surfaces/person-color.js.map +1 -0
  222. package/dist/ssr/surfaces/resource-messages.js +6 -2
  223. package/dist/ssr/surfaces/resource-messages.js.map +1 -1
  224. package/dist/ssr/text-editor/TextEditor.js +1155 -0
  225. package/dist/ssr/text-editor/TextEditor.js.map +1 -0
  226. package/dist/ssr/text-editor/clipboard-html.js +152 -0
  227. package/dist/ssr/text-editor/clipboard-html.js.map +1 -0
  228. package/dist/ssr/text-editor/clipboard-loading.js +68 -0
  229. package/dist/ssr/text-editor/clipboard-loading.js.map +1 -0
  230. package/dist/ssr/text-editor/clipboard.js +51 -0
  231. package/dist/ssr/text-editor/clipboard.js.map +1 -0
  232. package/dist/ssr/text-editor/engine.js +125 -0
  233. package/dist/ssr/text-editor/engine.js.map +1 -0
  234. package/dist/ssr/text-editor/format.js +218 -0
  235. package/dist/ssr/text-editor/format.js.map +1 -0
  236. package/dist/ssr/text-editor/formatted.js +164 -0
  237. package/dist/ssr/text-editor/formatted.js.map +1 -0
  238. package/dist/ssr/text-editor/language.js +19 -0
  239. package/dist/ssr/text-editor/language.js.map +1 -0
  240. package/dist/ssr/text-editor/markdown-table.js +563 -0
  241. package/dist/ssr/text-editor/markdown-table.js.map +1 -0
  242. package/dist/ssr/text-editor/messages.js +233 -0
  243. package/dist/ssr/text-editor/messages.js.map +1 -0
  244. package/dist/ssr/text-editor/paste.js +115 -0
  245. package/dist/ssr/text-editor/paste.js.map +1 -0
  246. package/dist/ssr/text-editor/table.js +1760 -0
  247. package/dist/ssr/text-editor/table.js.map +1 -0
  248. package/dist/ssr/text-editor.js +5 -0
  249. package/dist/ssr/text-editor.js.map +1 -0
  250. package/dist/ssr/widgets/Widget.js +3 -2
  251. package/dist/ssr/widgets/Widget.js.map +1 -1
  252. package/dist/styles.css +1 -1
  253. package/dist/types/actions/ContextMenu.d.ts +5 -0
  254. package/dist/types/actions/Dropdown.d.ts +7 -0
  255. package/dist/types/actions/SelectionToolbar.d.ts +38 -0
  256. package/dist/types/actions/index.d.ts +2 -0
  257. package/dist/types/charts.d.ts +5 -0
  258. package/dist/types/chat/ChatComposer.d.ts +15 -0
  259. package/dist/types/chat/chat-messages.d.ts +2 -0
  260. package/dist/types/chat/composer-document.d.ts +5 -0
  261. package/dist/types/chat/index.d.ts +1 -1
  262. package/dist/types/content/Chart.d.ts +2 -1
  263. package/dist/types/content/FileGrid.d.ts +43 -3
  264. package/dist/types/content/FileTypeIcon.d.ts +10 -0
  265. package/dist/types/content/FileView.d.ts +5 -1
  266. package/dist/types/content/MatchText.d.ts +21 -0
  267. package/dist/types/content/MessageRow.d.ts +2 -0
  268. package/dist/types/content/calendar-day-scroll.d.ts +2 -1
  269. package/dist/types/content/chart-bar.d.ts +60 -0
  270. package/dist/types/content/file-list-messages.d.ts +24 -0
  271. package/dist/types/content/index.d.ts +3 -2
  272. package/dist/types/feedback/Tooltip.d.ts +8 -2
  273. package/dist/types/inputs/ChoiceList.d.ts +28 -0
  274. package/dist/types/inputs/ChoiceSlider.d.ts +36 -0
  275. package/dist/types/inputs/ChoiceTiles.d.ts +25 -0
  276. package/dist/types/inputs/ColorChoices.d.ts +19 -0
  277. package/dist/types/inputs/index.d.ts +8 -0
  278. package/dist/types/inputs/qr-messages.d.ts +1 -0
  279. package/dist/types/internal/radio-keys.d.ts +5 -0
  280. package/dist/types/layout/AnchoredPopover.d.ts +31 -0
  281. package/dist/types/layout/AppWorkspace.d.ts +10 -0
  282. package/dist/types/layout/DetailPanel.d.ts +17 -0
  283. package/dist/types/layout/MobileShell.d.ts +5 -2
  284. package/dist/types/layout/Settings.d.ts +22 -0
  285. package/dist/types/layout/SidebarRailHint.d.ts +26 -0
  286. package/dist/types/layout/TabBar.d.ts +5 -0
  287. package/dist/types/layout/detail-panel-messages.d.ts +1 -0
  288. package/dist/types/layout/index.d.ts +3 -2
  289. package/dist/types/layout/settings-messages.d.ts +12 -0
  290. package/dist/types/surfaces/DotStrip.d.ts +22 -0
  291. package/dist/types/surfaces/ProgressRing.d.ts +2 -1
  292. package/dist/types/surfaces/ResourceCard.d.ts +9 -0
  293. package/dist/types/surfaces/index.d.ts +4 -1
  294. package/dist/types/surfaces/person-color.d.ts +10 -0
  295. package/dist/types/surfaces/resource-messages.d.ts +2 -0
  296. package/dist/types/text-editor/TextEditor.d.ts +69 -0
  297. package/dist/types/text-editor/clipboard-html.d.ts +9 -0
  298. package/dist/types/text-editor/clipboard-loading.d.ts +8 -0
  299. package/dist/types/text-editor/clipboard.d.ts +20 -0
  300. package/dist/types/text-editor/engine.d.ts +34 -0
  301. package/dist/types/text-editor/format.d.ts +34 -0
  302. package/dist/types/text-editor/formatted.d.ts +1 -0
  303. package/dist/types/text-editor/language.d.ts +8 -0
  304. package/dist/types/text-editor/markdown-table.d.ts +105 -0
  305. package/dist/types/text-editor/messages.d.ts +113 -0
  306. package/dist/types/text-editor/paste.d.ts +6 -0
  307. package/dist/types/text-editor/table.d.ts +81 -0
  308. package/dist/types/text-editor.d.ts +4 -0
  309. package/dist/types/widgets/Widget.d.ts +3 -2
  310. package/package.json +28 -3
@@ -100,6 +100,11 @@ export type AppWorkspaceMainPaneProps = {
100
100
  resizable?: boolean;
101
101
  resizeShadow?: boolean;
102
102
  defaultSize?: number | AppWorkspaceWidthShare;
103
+ /**
104
+ * The narrowest width in px, also for a person resizing it. Levels mode: the level needs it to be shown; when the
105
+ * deepest levels do not fit side by side at their minimum widths, the shallowest of them gives way, so a wide list
106
+ * pushes earlier columns aside.
107
+ */
103
108
  minSize?: number;
104
109
  maxSize?: number;
105
110
  class?: string;
@@ -398,6 +403,11 @@ export type AppWorkspaceNavTreeItemProps = {
398
403
  class?: string;
399
404
  /** With the tree's `onMove`, the item can change its place among its siblings. Other items keep theirs, and no item moves past them. */
400
405
  movable?: boolean;
406
+ /**
407
+ * Shows the item as a branch before its children are rendered, for a tree that loads a branch when it opens. The
408
+ * application renders the children, or a row that says they load, once the item is expanded.
409
+ */
410
+ hasChildren?: boolean;
401
411
  onDragEnter?: JSX.EventHandlerUnion<HTMLDivElement, DragEvent>;
402
412
  onDragOver?: JSX.EventHandlerUnion<HTMLDivElement, DragEvent>;
403
413
  onDragLeave?: JSX.EventHandlerUnion<HTMLDivElement, DragEvent>;
@@ -8,9 +8,18 @@ export type DetailPanelProps = {
8
8
  class?: string;
9
9
  };
10
10
  type DetailPanelHeaderBaseProps = {
11
+ /** A short line above the title that names what is shown, such as "Conversation", followed by its state. */
12
+ kind?: JSX.Element;
11
13
  title: JSX.Element;
12
14
  subtitle?: JSX.Element;
13
15
  meta?: JSX.Element;
16
+ /**
17
+ * The resource's "…" menu, shown before `actions`. Pass every less frequent command on the shown resource here,
18
+ * so each panel opens its menu from the same place; an empty list shows no button.
19
+ */
20
+ menu?: readonly DropdownItem[];
21
+ /** Accessible name of the "…" button. Defaults to "More actions". */
22
+ menuLabel?: string;
14
23
  actions?: JSX.Element;
15
24
  primaryActions?: JSX.Element;
16
25
  class?: string;
@@ -37,6 +46,11 @@ export type DetailPanelSummaryProps = {
37
46
  export type DetailPanelGroupProps = {
38
47
  children: JSX.Element;
39
48
  label?: string;
49
+ /**
50
+ * A visible quiet title, such as "More about this conversation". Its sections then stand flush as rows below
51
+ * it, which suits collapsed secondary sections with a `summary`.
52
+ */
53
+ title?: JSX.Element;
40
54
  class?: string;
41
55
  };
42
56
  export type DetailPanelTone = "accent" | "neutral" | "success" | "warning" | "danger";
@@ -90,6 +104,7 @@ export type DetailPanelSectionProps = DetailPanelSectionBaseProps & ({
90
104
  children?: JSX.Element;
91
105
  actions?: JSX.Element;
92
106
  collapsible?: false;
107
+ summary?: never;
93
108
  defaultOpen?: never;
94
109
  open?: never;
95
110
  onOpenChange?: never;
@@ -98,6 +113,8 @@ export type DetailPanelSectionProps = DetailPanelSectionBaseProps & ({
98
113
  children: JSX.Element;
99
114
  actions?: never;
100
115
  collapsible: true;
116
+ /** One line that says what the closed section holds, such as its newest entry; hidden while open. */
117
+ summary?: JSX.Element;
101
118
  defaultOpen?: boolean;
102
119
  open?: boolean;
103
120
  onOpenChange?: (open: boolean) => void;
@@ -48,8 +48,11 @@ export declare function observeMobileShell(root: HTMLElement): () => void;
48
48
  declare function MobileShellRoot(props: MobileShellProps): JSX.Element;
49
49
  declare function MobileShellHeader(props: MobileShellHeaderProps): JSX.Element;
50
50
  export type MobileShellSidebarItem = TabBarItem & {
51
- /** A count after the label, such as unread messages; 0 shows nothing. */
52
- count?: number;
51
+ /**
52
+ * A quiet count after the label, such as open tasks: a number (0 shows nothing) or an element that renders one. The
53
+ * item's `badge`, which calls for attention, takes its place.
54
+ */
55
+ count?: number | JSX.Element;
53
56
  };
54
57
  export type MobileShellSidebarProps = {
55
58
  /** Accessible name of the navigation landmark; usually the tab bar's. */
@@ -3,6 +3,8 @@ import { type ButtonVariant } from "../actions/Button";
3
3
  import type { MaybeAccessor } from "../inputs/field-contract";
4
4
  export type SettingsPageProps = {
5
5
  title: JSX.Element;
6
+ /** False when a surrounding head already shows the title, such as a workspace level; the actions move to the footer. */
7
+ header?: boolean;
6
8
  subtitle?: JSX.Element;
7
9
  icon?: string;
8
10
  actions?: JSX.Element;
@@ -69,4 +71,24 @@ export type SettingsSaveBarProps = {
69
71
  export declare function SettingsSaveBar(props: SettingsSaveBarProps): JSX.Element;
70
72
  export type SettingsPanelFooterProps = SettingsSaveBarProps;
71
73
  export declare function SettingsPanelFooter(props: SettingsPanelFooterProps): JSX.Element;
74
+ export type SaveStatusState = "saved" | "draft" | "saving" | "failed" | "invalid" | "unknown" | "readonly";
75
+ export type SaveStatusProps = {
76
+ /** What the person's values are now: saved, a draft with changes, being saved, or a problem that kept them unsaved. */
77
+ state: MaybeAccessor<SaveStatusState>;
78
+ /** Formatted time of the last save, shown with `saved`. */
79
+ savedAt?: MaybeAccessor<string | undefined>;
80
+ /** Fields to check, shown with `invalid`. Default 1. */
81
+ invalidCount?: MaybeAccessor<number>;
82
+ /** With both handlers, Discard and Save follow the status while there is something to save. */
83
+ onDiscard?: () => void;
84
+ onSave?: () => void;
85
+ saveLabel?: string;
86
+ saveDisabled?: MaybeAccessor<boolean>;
87
+ class?: string;
88
+ };
89
+ /**
90
+ * The save status of a settings form at one fixed place, usually the head of its column. It reserves its width, so
91
+ * a change of state never moves the title or the buttons beside it. Problems with one field stay at that field.
92
+ */
93
+ export declare function SaveStatus(props: SaveStatusProps): JSX.Element;
72
94
  export {};
@@ -0,0 +1,26 @@
1
+ import { type JSX } from "solid-js";
2
+ /**
3
+ * True while `element` sits in the collapsed sidebar rail, which shows icons
4
+ * without labels. The stylesheet sets `--k2b-sidebar-rail` exactly where it
5
+ * collapses the sidebar, so this follows the same container width and state.
6
+ */
7
+ export declare const inSidebarRail: (element: Element | undefined) => boolean;
8
+ /**
9
+ * A sidebar entry's name, or its `title`, in the hint the Cloud app rail uses.
10
+ * In the collapsed rail it names the icon beside it at once. Elsewhere it
11
+ * shows above the entry with the usual delay, and only when it says more than
12
+ * the visible label: a label cut off, or a title with details. A native
13
+ * `title` on `target` gives way to it, so no hint shows twice.
14
+ */
15
+ export declare function SidebarRailHint(props: {
16
+ target: () => HTMLElement | undefined;
17
+ label: string | undefined;
18
+ /** The element that holds keyboard focus for the entry, when that is not `target`. */
19
+ focusTarget?: () => HTMLElement | undefined;
20
+ /** The visible label text inside `target`. */
21
+ labelSelector: string;
22
+ /** The entry renders a native `title`, which the hint replaces from the first hover or focus. */
23
+ titled?: boolean;
24
+ /** Called once the hint takes over; the entry stops rendering its native `title`. */
25
+ onArm?: () => void;
26
+ }): JSX.Element;
@@ -9,6 +9,11 @@ export type TabBarItem = {
9
9
  title?: string;
10
10
  /** The page this item leads to is open. */
11
11
  current?: boolean;
12
+ /**
13
+ * A mark at the icon's corner that calls for attention, such as an unread count. Its element names the count for
14
+ * screen readers; an empty one takes no space.
15
+ */
16
+ badge?: JSX.Element;
12
17
  };
13
18
  export type TabBarProps = {
14
19
  /** Accessible name of the navigation landmark. */
@@ -8,6 +8,7 @@ declare const detailPanelMessages: import("@k2b/stdlib").Catalog<{
8
8
  count: number;
9
9
  }) => string;
10
10
  showLess: string;
11
+ moreActions: string;
11
12
  }>;
12
13
  export type DetailPanelMessages = ReturnType<(typeof detailPanelMessages)["resolve"]>["t"];
13
14
  export declare const useDetailPanelMessages: () => (() => DetailPanelMessages);
@@ -1,3 +1,4 @@
1
+ export { AnchoredPopover, type AnchoredPopoverProps } from "./AnchoredPopover";
1
2
  export type { AppOverviewCardsProps, AppOverviewEmptyStateProps, AppOverviewPanelProps, AppOverviewProps, } from "./AppOverview";
2
3
  export { default as AppOverview } from "./AppOverview";
3
4
  export type { AppWorkspaceBottomDrawerHeight, AppWorkspaceBottomDrawerProps, AppWorkspaceContentProps, AppWorkspaceDetailProps, AppWorkspaceDetailWidth, AppWorkspaceHeadProps, AppWorkspaceMainPaneProps, AppWorkspaceMainProps, AppWorkspaceNavTreeItemProps, AppWorkspaceNavTreeMove, AppWorkspaceNavTreeProps, AppWorkspaceProps, AppWorkspaceSidebarAccessoryVisibility, AppWorkspaceSidebarBodyProps, AppWorkspaceSidebarIconActionProps, AppWorkspaceSidebarIconActionTone, AppWorkspaceSidebarIconGridProps, AppWorkspaceSidebarItemActionProps, AppWorkspaceSidebarItemActionsProps, AppWorkspaceSidebarItemIconProps, AppWorkspaceSidebarItemLabelProps, AppWorkspaceSidebarItemMetaProps, AppWorkspaceSidebarItemProps, AppWorkspaceSidebarItemStatusProps, AppWorkspaceSidebarItemTone, AppWorkspaceSidebarProps, AppWorkspaceSidebarSectionProps, AppWorkspaceSidebarVisibility, AppWorkspaceWidthShare, } from "./AppWorkspace";
@@ -37,8 +38,8 @@ export { default as ResizeSeparator, type ResizeSeparatorProps } from "./ResizeS
37
38
  export { attachResizeSeparator, type ResizeSeparatorOptions } from "./resize-separator";
38
39
  export type { ScrollAreaProps } from "./ScrollArea";
39
40
  export { default as ScrollArea } from "./ScrollArea";
40
- export type { SettingsFieldControlProps, SettingsFieldProps, SettingsGroupActionProps, SettingsGroupProps, SettingsPageProps, SettingsPanelFooterProps, SettingsSaveBarProps, SettingsSectionProps, } from "./Settings";
41
- export { readSettingsError, SettingsField, SettingsGroup, SettingsPage, SettingsPanelFooter, SettingsSaveBar, SettingsSection, sameSettingValue, } from "./Settings";
41
+ export type { SaveStatusProps, SaveStatusState, SettingsFieldControlProps, SettingsFieldProps, SettingsGroupActionProps, SettingsGroupProps, SettingsPageProps, SettingsPanelFooterProps, SettingsSaveBarProps, SettingsSectionProps, } from "./Settings";
42
+ export { readSettingsError, SaveStatus, SettingsField, SettingsGroup, SettingsPage, SettingsPanelFooter, SettingsSaveBar, SettingsSection, sameSettingValue, } from "./Settings";
42
43
  export type { SettingsCollectionActionProps, SettingsCollectionItemActionsProps, SettingsCollectionItemProps, SettingsCollectionItemReorderProps, SettingsCollectionItemStatusProps, SettingsCollectionProps, } from "./SettingsCollection";
43
44
  export { default as SettingsCollection } from "./SettingsCollection";
44
45
  export type { SettingsModalFooterProps, SettingsModalGroupProps, SettingsModalProps, SettingsModalTabProps, SettingsModalTabTone, } from "./SettingsModal";
@@ -11,12 +11,24 @@ declare const settingsMessages: import("@k2b/stdlib").Catalog<{
11
11
  label: string;
12
12
  }) => string;
13
13
  saveChanges: string;
14
+ save: string;
14
15
  saving: string;
15
16
  unsaved: string;
16
17
  unsavedChangeLabel: ({ count }: {
17
18
  count: number;
18
19
  }) => string;
19
20
  noUnsavedChanges: string;
21
+ statusSaved: string;
22
+ statusSavedAt: ({ time }: {
23
+ time: string;
24
+ }) => string;
25
+ statusDraft: string;
26
+ statusFailed: string;
27
+ statusInvalid: ({ count }: {
28
+ count: number;
29
+ }) => string;
30
+ statusUnknown: string;
31
+ statusReadOnly: string;
20
32
  }>;
21
33
  export type SettingsMessages = ReturnType<(typeof settingsMessages)["resolve"]>["t"];
22
34
  /** Resolved from the inherited render locale. */
@@ -0,0 +1,22 @@
1
+ import { type JSX } from "solid-js";
2
+ /** `accent` = the app colour (it worked), `ai` = came from AI, `muted` = nothing happened. */
3
+ export type DotStripTone = "accent" | "warning" | "danger" | "ai" | "muted";
4
+ export type DotStripProps = {
5
+ /** Outcomes in order, left to right. */
6
+ dots: readonly DotStripTone[];
7
+ /** Total slots. Slots after `dots` show as empty rings, so a growing strip keeps its size. Defaults to `dots.length`. */
8
+ length?: number;
9
+ /** Shows every slot as a quiet placeholder, for "nothing checked yet". */
10
+ waiting?: boolean;
11
+ /** Index of the dot that belongs to the item shown next to the strip. */
12
+ selected?: number | null;
13
+ size?: "md" | "lg";
14
+ /** Dots per row; more wrap into further rows of the same width. Defaults to one row. */
15
+ columns?: number;
16
+ /** Names the strip and its counts, for example "Last 50 mails: 17 matched, 6 skipped, 27 not". */
17
+ label: string;
18
+ class?: string;
19
+ };
20
+ /** A fixed-size row of outcome dots: the last runs, checks or mails at a glance. */
21
+ export declare function DotStrip(props: DotStripProps): JSX.Element;
22
+ export default DotStrip;
@@ -1,6 +1,7 @@
1
1
  import { type JSX } from "solid-js";
2
2
  import type { IntentTone } from "../semantics";
3
- export type ProgressRingTone = Extract<IntentTone, "info" | "warning" | "danger">;
3
+ /** `accent` draws the ring in the app's own colour, for progress that belongs to the app rather than to a state. */
4
+ export type ProgressRingTone = Extract<IntentTone, "info" | "warning" | "danger"> | "accent";
4
5
  export type ProgressRingProps = {
5
6
  value: number;
6
7
  tone?: ProgressRingTone;
@@ -1,9 +1,12 @@
1
1
  import { type JSX } from "solid-js";
2
+ import type { LinkCardColor } from "./LinkCard";
2
3
  /**
3
4
  * What a card can show of the element it stands for: the element itself, a placeholder while it is being looked up, or
4
5
  * why it cannot be shown.
5
6
  */
6
7
  export type ResourceCardState = "ok" | "loading" | "no_access" | "deleted" | "unavailable";
8
+ /** The icon chip's colour, from the same palette as `LinkCard`. */
9
+ export type ResourceCardColor = LinkCardColor;
7
10
  export type ResourceCardProps = {
8
11
  /** Defaults to `"ok"`. Every state has the same size, so a card that changes state moves nothing around it. */
9
12
  state?: ResourceCardState;
@@ -11,6 +14,12 @@ export type ResourceCardProps = {
11
14
  title?: string;
12
15
  /** Icon class of the element's kind, for example `ti ti-notebook`. Shown only in state `"ok"`. */
13
16
  icon?: string;
17
+ /** Colour of the icon chip, usually one per kind of element. Without it the chip stays neutral. Only in state `"ok"`. */
18
+ color?: ResourceCardColor;
19
+ /** One line above the title: what and where the element is, for example "Task in IT planning · due 30 Oct". Only in state `"ok"`. */
20
+ context?: string;
21
+ /** The element's current state as a short label, for example "Open", shown at the end. Only in state `"ok"`. */
22
+ status?: string;
14
23
  /** What the element belongs to, for example the application or service. Shown only in state `"ok"`. */
15
24
  source?: string;
16
25
  /** Where the element lives within its source, for example a folder or a project. Shown only in state `"ok"`. */
@@ -4,6 +4,8 @@ export type { AvatarStackPerson, AvatarStackProps } from "./AvatarStack";
4
4
  export { AvatarStack } from "./AvatarStack";
5
5
  export type { DescriptionListItem, DescriptionListProps } from "./DescriptionList";
6
6
  export { DescriptionList } from "./DescriptionList";
7
+ export type { DotStripProps, DotStripTone } from "./DotStrip";
8
+ export { DotStrip } from "./DotStrip";
7
9
  export type { LinkCardColor, LinkCardProps } from "./LinkCard";
8
10
  export { LinkCard } from "./LinkCard";
9
11
  export type { NotFoundStateAction, NotFoundStateProps } from "./NotFoundState";
@@ -18,7 +20,8 @@ export type { ProgressBarProps, ProgressBarTone } from "./ProgressBar";
18
20
  export { ProgressBar } from "./ProgressBar";
19
21
  export type { ProgressRingProps, ProgressRingTone } from "./ProgressRing";
20
22
  export { ProgressRing } from "./ProgressRing";
21
- export type { ResourceCardProps, ResourceCardState } from "./ResourceCard";
23
+ export { PERSON_COLORS, personColor } from "./person-color";
24
+ export type { ResourceCardColor, ResourceCardProps, ResourceCardState } from "./ResourceCard";
22
25
  export { ResourceCard } from "./ResourceCard";
23
26
  export { Skeleton, type SkeletonProps } from "./Skeleton";
24
27
  export type { StatCellAccent, StatCellProps, StatCellTone } from "./StatCell";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The colors that stand for a person: the tint behind avatar initials, a collaborator's cursor, and the marks and
3
+ * comments a person leaves. The palette leaves out cyan, which means AI, and yellow, which reads as a text highlight.
4
+ * Several people can share a color, so a person's name always appears next to it.
5
+ */
6
+ export declare const PERSON_COLORS: readonly ["#3b82f6", "#6366f1", "#8b5cf6", "#c026d3", "#ec4899", "#e11d48", "#f97316", "#16a34a"];
7
+ /** The palette index for a name, the order of the `.k2b-avatar[data-tint]` rules. Surrounding spaces do not count. */
8
+ export declare const personTint: (name: string) => number;
9
+ /** A person's color from their display name, the same wherever Cloud shows that person. */
10
+ export declare const personColor: (name: string) => string;
@@ -3,6 +3,8 @@ declare const resourceMessages: import("@k2b/stdlib").Catalog<{
3
3
  resourceNoAccess: string;
4
4
  resourceDeleted: string;
5
5
  resourceUnavailable: string;
6
+ resourceKind: string;
7
+ resourceNoAccessHint: string;
6
8
  }>;
7
9
  export type ResourceMessages = ReturnType<(typeof resourceMessages)["resolve"]>["t"];
8
10
  /** Resolved from the inherited render locale. */
@@ -0,0 +1,69 @@
1
+ import type { Extension } from "@codemirror/state";
2
+ import { type JSX } from "solid-js";
3
+ import { type DropdownPosition } from "../actions/Dropdown";
4
+ import { type TextEditorController, type TextEditorMode, type TextEditorOptions } from "./engine";
5
+ import { type InlineFormat } from "./format";
6
+ import { type TableHost } from "./table";
7
+ export type TextEditorProps = {
8
+ label: string;
9
+ initialValue?: string;
10
+ mode?: TextEditorMode;
11
+ onModeChange?: (mode: TextEditorMode) => void;
12
+ readOnly?: boolean;
13
+ loading?: boolean;
14
+ placeholder?: string;
15
+ extensions?: Extension;
16
+ /** Host-owned Markdown presentation; see `createTextEditor`. The host then also styles the editor surface. */
17
+ presentation?: TextEditorOptions["presentation"];
18
+ /** `false` when the host renders its own formatting toolbar and mode control; place `controls.TableMenu` in it. */
19
+ toolbar?: boolean;
20
+ /** Collaboration supplies history and server-owned structure here. */
21
+ host?: Pick<TableHost, "structure" | "renderCell" | "onCellSelection" | "tabMovesFocus"> & Partial<Pick<TableHost, "undo" | "redo" | "boundary">>;
22
+ maxLength: number;
23
+ maxPasteCells?: number;
24
+ onChange?: (text: string) => void;
25
+ onReady?: (editor: TextEditorController, controls: TextEditorControls) => void;
26
+ /** Return `true` when the host attached the images itself; otherwise the editor shows its attachment hint. */
27
+ onDroppedImages?: (count: number, files: File[]) => boolean | void;
28
+ /** Opens the host's attachment picker when clipboard images cannot be inserted. */
29
+ onAttachImages?: () => void;
30
+ onTableCheck?: (needsCheck: boolean) => void;
31
+ /** Host-owned sync status; its place is reserved across transitions. */
32
+ status?: JSX.Element;
33
+ class?: string;
34
+ };
35
+ export type TableSizePickerProps = {
36
+ maxRows: number;
37
+ maxColumns: number;
38
+ onPick: (size: {
39
+ rows: number;
40
+ columns: number;
41
+ }) => void;
42
+ /** Share this picker with slash commands or secondary menus. */
43
+ onReady?: (open: () => void) => void;
44
+ disabled?: boolean;
45
+ class?: string;
46
+ size?: "xs" | "sm";
47
+ };
48
+ /** Shared table-size control: pointer grid on desktop, large fields in a phone sheet. */
49
+ export declare function TableSizePicker(props: TableSizePickerProps): JSX.Element;
50
+ type TableMenuTrigger = {
51
+ text?: string;
52
+ class?: string;
53
+ size?: "xs" | "sm";
54
+ position?: DropdownPosition;
55
+ };
56
+ /** Shared table controls for a host-owned toolbar (`toolbar={false}`). */
57
+ export type TextEditorControls = {
58
+ /** A table cell has focus in the formatted view. */
59
+ tableActive: () => boolean;
60
+ /** The shared cell menu behind a host-styled trigger; on phones it opens as a sheet. */
61
+ TableMenu: (props: TableMenuTrigger) => JSX.Element;
62
+ /** Formats the focused cell's selection; `false` when no cell has focus. */
63
+ formatCell: (format: InlineFormat) => boolean;
64
+ /** Shows a host message, such as a server's reason for a rejected table action, in the editor's notice. */
65
+ notify: (message: string) => void;
66
+ };
67
+ /** A Markdown text field with app-injected collaboration and a directly editable table view. */
68
+ export declare function TextEditor(props: TextEditorProps): JSX.Element;
69
+ export {};
@@ -0,0 +1,9 @@
1
+ /** Parse only the HTML vocabulary that the Markdown converter consumes.
2
+ * Resource attributes and active elements never reach a clipboard consumer.
3
+ * The returned detached body is read as data and never mounted in the editor.
4
+ */
5
+ export declare const parseClipboardHtml: (html: string) => HTMLElement;
6
+ export declare const convertHtml: (html: string, code: boolean) => {
7
+ markdown: string;
8
+ droppedImages: number;
9
+ } | null;
@@ -0,0 +1,8 @@
1
+ import { type EditorView, ViewPlugin } from "@codemirror/view";
2
+ import type { TableHost } from "./table";
3
+ /** Load the HTML sanitizer only when needed, before either paste consumer runs.
4
+ * A delayed paste never overwrites edits made while its parser was loading.
5
+ */
6
+ export declare const clipboardLoading: (getHost: (view: EditorView) => TableHost | null, syncSelection?: (view: EditorView) => void) => ViewPlugin<{
7
+ destroy(): void;
8
+ }, undefined>;
@@ -0,0 +1,20 @@
1
+ export declare const htmlClipboardReady: () => boolean;
2
+ export declare const loadHtmlClipboard: () => Promise<void>;
3
+ export declare const parseClipboardHtml: (html: string) => HTMLElement;
4
+ export declare const convertClipboardHtml: (html: string, code: boolean) => {
5
+ markdown: string;
6
+ droppedImages: number;
7
+ } | null;
8
+ /** All clipboard entry paths share one preflight, before insertion or conversion. */
9
+ export declare function inspectClipboard(data: DataTransfer, limits: {
10
+ maxLength: number;
11
+ maxPasteCells: number;
12
+ }): {
13
+ error: "textTooLarge" | "pasteTooLarge";
14
+ } | {
15
+ text: string;
16
+ html: string;
17
+ images: number;
18
+ files: File[];
19
+ tsv: string[][] | null;
20
+ };
@@ -0,0 +1,34 @@
1
+ import { type Extension } from "@codemirror/state";
2
+ import { EditorView } from "@codemirror/view";
3
+ import { type TableHost } from "./table";
4
+ export type TextEditorMode = "formatted" | "source" | "plain";
5
+ export type TextEditorOptions = {
6
+ parent: HTMLElement;
7
+ /** Initial Markdown. Subsequent collaborative changes arrive through extensions. */
8
+ doc?: string;
9
+ mode?: TextEditorMode;
10
+ readOnly?: boolean;
11
+ placeholder?: string;
12
+ label: string;
13
+ extensions?: Extension;
14
+ /**
15
+ * Replaces the built-in Markdown language, highlighting, formatted markers and
16
+ * formatting keys of the formatted and source modes. The engine keeps the
17
+ * table grid, clean paste, limits and history routing in every mode.
18
+ */
19
+ presentation?: (mode: Exclude<TextEditorMode, "plain">) => Extension;
20
+ /** The host owns history; collaboration bindings supply theirs. */
21
+ host: TableHost;
22
+ onChange?: (text: string) => void;
23
+ onDroppedImages?: (count: number, files: File[]) => void;
24
+ };
25
+ /** Shared engine; application extensions own transport, awareness and domain features. */
26
+ export declare function createTextEditor(options: TextEditorOptions): {
27
+ view: EditorView;
28
+ /** Also re-reads `presentation`, so a host can refresh it, e.g. after a theme change. */
29
+ setMode: (mode: TextEditorMode) => void;
30
+ setLabel: (label: string) => void;
31
+ setReadOnly: (readOnly: boolean) => void;
32
+ destroy: () => void;
33
+ };
34
+ export type TextEditorController = ReturnType<typeof createTextEditor>;
@@ -0,0 +1,34 @@
1
+ /** Toolbar and keyboard commands. Each one is a plain Markdown edit of the selection. */
2
+ import { type EditorState, Facet, type TransactionSpec } from "@codemirror/state";
3
+ import type { EditorView } from "@codemirror/view";
4
+ /** Insertion text follows the editor's inherited locale, including keyboard commands. */
5
+ export declare const formatLabels: Facet<{
6
+ link: string;
7
+ column: (column: number) => string;
8
+ }, {
9
+ link: string;
10
+ column: (column: number) => string;
11
+ }>;
12
+ /** Named Markdown marks or an app's single-line paired delimiter (for example Notebook's `==`). */
13
+ export type InlineFormat = "bold" | "italic" | "code" | "strike" | "link" | {
14
+ marker: string;
15
+ };
16
+ /** Pure transaction spec, also used when a missing table cell must be materialized atomically. */
17
+ export declare const inlineFormat: (state: EditorState, name: InlineFormat) => TransactionSpec;
18
+ export declare const commands: {
19
+ bold: (view: EditorView) => boolean;
20
+ italic: (view: EditorView) => boolean;
21
+ code: (view: EditorView) => boolean;
22
+ strike: (view: EditorView) => boolean;
23
+ heading: (view: EditorView) => boolean;
24
+ heading1: (view: EditorView) => boolean;
25
+ heading2: (view: EditorView) => boolean;
26
+ heading3: (view: EditorView) => boolean;
27
+ codeBlock: (view: EditorView) => boolean;
28
+ bulletList: (view: EditorView) => boolean;
29
+ orderedList: (view: EditorView) => boolean;
30
+ quote: (view: EditorView) => boolean;
31
+ link: (view: EditorView) => boolean;
32
+ table: (view: EditorView) => boolean;
33
+ rule: (view: EditorView) => boolean;
34
+ };
@@ -0,0 +1 @@
1
+ export declare const formattedView: import("@codemirror/state").Extension[];
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Markdown language without `@codemirror/lang-markdown`: that package pulls in
3
+ * `@codemirror/lang-html` (and with it CSS and JavaScript) for HTML blocks.
4
+ * The shared editor needs only the GFM tree, so it wraps `@lezer/markdown`.
5
+ */
6
+ import { Language, LanguageSupport } from "@codemirror/language";
7
+ export declare const markdownLanguage: Language;
8
+ export declare const markdown: () => LanguageSupport;
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Pure GFM table edits in original Markdown coordinates. Markdown is the only
3
+ * model; callers reparse after applying a transaction. No repair of damaged
4
+ * tables or prose is attempted. Extra and missing body cells remain inspectable.
5
+ */
6
+ import type { ChangeDesc } from "@codemirror/state";
7
+ export type Align = "left" | "center" | "right" | null;
8
+ export type Change = {
9
+ from: number;
10
+ to: number;
11
+ insert: string;
12
+ };
13
+ /** Trimmed raw content, with absolute UTF-16 source offsets. */
14
+ export type Cell = {
15
+ from: number;
16
+ to: number;
17
+ text: string;
18
+ };
19
+ export type Line = {
20
+ from: number;
21
+ to: number;
22
+ pipes: number[];
23
+ leadingPipe: boolean;
24
+ trailingPipe: boolean;
25
+ cells: Cell[];
26
+ /** Original terminator, used when inserting rows. */
27
+ lineBreak?: string;
28
+ };
29
+ export type Table = {
30
+ from: number;
31
+ to: number;
32
+ /** Header, delimiter, then body rows. */
33
+ lines: Line[];
34
+ align: Align[];
35
+ columns: number;
36
+ };
37
+ /** Only top-level Lezer GFM tables: never code, block quotes, or list items. */
38
+ export declare const findTables: (doc: string) => Table[];
39
+ export declare const tableAt: (doc: string, pos: number) => Table | null;
40
+ /**
41
+ * Problems that must stay visible before formatted output is sent. A damaged
42
+ * separator makes GFM fall back to a paragraph: two adjacent pipe-framed rows
43
+ * there still need review. This only inspects top-level paragraph nodes, never
44
+ * code, quotations or lists, and does not repair or rewrite any text.
45
+ */
46
+ export declare const inspectTableStructure: (doc: string) => {
47
+ extraCells: boolean;
48
+ missingSeparator: boolean;
49
+ };
50
+ export declare const gridLine: (table: Table, row: number) => Line | undefined;
51
+ export declare const rowCount: (table: Table) => number;
52
+ /** Literal displayed text → safe raw content. Call once, never on existing raw Markdown. */
53
+ export declare const escapeCell: (value: string) => string;
54
+ /** Display text and a raw offset for every displayed UTF-16 boundary. */
55
+ export declare const cellDisplayMap: (raw: string) => {
56
+ text: string;
57
+ offsets: number[];
58
+ };
59
+ /** Decode only table pipes and backslashes; leave inline Markdown source editable. */
60
+ export declare const displayCell: (raw: string) => string;
61
+ /**
62
+ * One minimal contiguous source edit from literal displayed input. Unchanged
63
+ * escapes keep their exact bytes, including noncanonical lone backslashes.
64
+ * `from` is the old cell's absolute start; input must NOT be pre-escaped.
65
+ */
66
+ export declare const cellChanges: (raw: string, nextDisplayed: string, from: number) => Change[];
67
+ /**
68
+ * Map an edit based on an old cell through intervening document changes.
69
+ * Deletes only surviving old-source spans (iterGaps), preserving remote inserts
70
+ * and excluding replaced/deleted identities. Returns current-document offsets.
71
+ * The caller must first verify that the mapped range is still the same cell;
72
+ * concurrent structural/escape edits require resyncing its displayed snapshot.
73
+ */
74
+ export declare const mappedCellChanges: (raw: string, nextDisplayed: string, from: number, changes: ChangeDesc) => Change[];
75
+ /** Spike-compatible escaped RAW input; fills ragged cells within the existing grid width. */
76
+ export declare const setCellText: (table: Table, row: number, col: number, next: string) => Change[];
77
+ export declare const insertRow: (table: Table, after: number) => Change[];
78
+ export declare const deleteRow: (table: Table, row: number) => Change[];
79
+ /** Move a body row, retaining every untouched row's original source and identities. */
80
+ export declare const moveRow: (source: string, table: Table, row: number, to: number) => Change[];
81
+ /** Swap adjacent columns, including their alignment, without rewriting other cells. */
82
+ export declare const moveColumn: (table: Table, column: number, to: number) => Change[];
83
+ /** A hidden header is an empty GFM header; its former values become the first body row. */
84
+ export declare const toggleHeader: (source: string, table: Table) => Change[];
85
+ /** Delete only the selected table; surrounding prose remains byte-for-byte intact. */
86
+ export declare const deleteTable: (table: Table) => Change[];
87
+ /** Insert before `at`, including at the widest row's end; pad ragged rows without dropping cells. */
88
+ export declare const insertColumn: (table: Table, at: number) => Change[];
89
+ /** Complete a ragged grid without changing or removing any existing cell. */
90
+ export declare const completeColumns: (table: Table) => Change[];
91
+ export declare const deleteColumn: (table: Table, col: number) => Change[];
92
+ export declare const setAlign: (table: Table, col: number, align: Align) => Change[];
93
+ /** First grid row is the header; pad short rows, preserve every extra cell. */
94
+ export declare const tableFromGrid: (grid: string[][]) => string;
95
+ /** Quoted TSV (including doubled quotes and embedded newlines). Invalid quotes stay raw. */
96
+ export declare const parseTsv: (text: string) => string[][] | null;
97
+ /** Apply sorted or unsorted, non-overlapping edits in old-document coordinates. */
98
+ export declare const applyChanges: (doc: string, changes: Change[]) => string;
99
+ /**
100
+ * Settle recognized ragged GFM tables without deleting or rewriting source.
101
+ * Extra cells become named-grid positions with empty headers, never discarded.
102
+ * Unrecognizable tables remain raw text for the application's check state;
103
+ * code, quotes and lists are not repair candidates.
104
+ */
105
+ export declare const repairTables: (doc: string, maxLength: number) => Change[];