@motifx-community/ui 0.1.0-beta.12 → 0.1.0-beta.14

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 (468) hide show
  1. package/CHANGELOG.md +414 -0
  2. package/README.md +2 -0
  3. package/dist/components/chart/Chart.d.ts +6 -4
  4. package/dist/components/chart/ChartPlot.d.ts +2 -1
  5. package/dist/components/chart/plot-view.d.ts +10 -2
  6. package/dist/components/chat/Chat.d.ts +276 -0
  7. package/dist/components/chat/ChatComposer.d.ts +172 -0
  8. package/dist/components/chat/ChatReply.d.ts +53 -0
  9. package/dist/components/chat/ChatWriter.d.ts +119 -0
  10. package/dist/components/chat/chat-ask-form.d.ts +64 -0
  11. package/dist/components/chat/chat-asked-entry.d.ts +21 -0
  12. package/dist/components/chat/chat-attachment-entry.d.ts +18 -0
  13. package/dist/components/chat/chat-choices-view.d.ts +40 -0
  14. package/dist/components/chat/chat-command.d.ts +7 -0
  15. package/dist/components/chat/chat-compaction-entry.d.ts +19 -0
  16. package/dist/components/chat/chat-composer-props.d.ts +63 -0
  17. package/dist/components/chat/chat-context-changed-event-args.d.ts +8 -0
  18. package/dist/components/chat/chat-context-item.d.ts +14 -0
  19. package/dist/components/chat/chat-copy-button.d.ts +11 -0
  20. package/dist/components/chat/chat-entry.d.ts +20 -0
  21. package/dist/components/chat/chat-flow-view.d.ts +32 -0
  22. package/dist/components/chat/chat-form-entry.d.ts +24 -0
  23. package/dist/components/chat/chat-form-view.d.ts +48 -0
  24. package/dist/components/chat/chat-history-event-args.d.ts +31 -0
  25. package/dist/components/chat/chat-load-older-event-args.d.ts +17 -0
  26. package/dist/components/chat/chat-look.d.ts +33 -0
  27. package/dist/components/chat/chat-mention.d.ts +21 -0
  28. package/dist/components/chat/chat-message-status.d.ts +2 -0
  29. package/dist/components/chat/chat-message.d.ts +23 -0
  30. package/dist/components/chat/chat-notice-entry.d.ts +20 -0
  31. package/dist/components/chat/chat-option.d.ts +7 -0
  32. package/dist/components/chat/chat-part.d.ts +110 -0
  33. package/dist/components/chat/chat-plan-entry.d.ts +25 -0
  34. package/dist/components/chat/chat-props.d.ts +70 -0
  35. package/dist/components/chat/chat-question-view.d.ts +41 -0
  36. package/dist/components/chat/chat-request.d.ts +173 -0
  37. package/dist/components/chat/chat-role.d.ts +2 -0
  38. package/dist/components/chat/chat-search-bar.d.ts +27 -0
  39. package/dist/components/chat/chat-search.d.ts +33 -0
  40. package/dist/components/chat/chat-send-event-args.d.ts +12 -0
  41. package/dist/components/chat/chat-sources-entry.d.ts +22 -0
  42. package/dist/components/chat/chat-text-entry.d.ts +20 -0
  43. package/dist/components/chat/chat-text-part.d.ts +5 -0
  44. package/dist/components/chat/chat-thinking-entry.d.ts +32 -0
  45. package/dist/components/chat/chat-todo-entry.d.ts +15 -0
  46. package/dist/components/chat/chat-tool-entry.d.ts +66 -0
  47. package/dist/components/chat/chat-tool-init.d.ts +18 -0
  48. package/dist/components/chat/chat-turn-view.d.ts +53 -0
  49. package/dist/components/chat/chat-turn.d.ts +8 -0
  50. package/dist/components/chat/chat-value-changed-event-args.d.ts +6 -0
  51. package/dist/components/chat/index.d.ts +22 -0
  52. package/dist/components/contextmenu/ContextMenu.d.ts +4 -0
  53. package/dist/components/contextmenu/context-menu-props.d.ts +6 -0
  54. package/dist/components/datagrid/DataGrid.d.ts +0 -12
  55. package/dist/components/datagrid/column-type.d.ts +2 -1
  56. package/dist/components/datagrid/grid-column.d.ts +4 -1
  57. package/dist/components/datagrid/grid-date-interval.d.ts +2 -1
  58. package/dist/components/datagrid/grid-filter-value.d.ts +2 -7
  59. package/dist/components/datagrid/grid-header-filter-interval.d.ts +2 -2
  60. package/dist/components/datagrid/grid-settings.d.ts +6 -3
  61. package/dist/components/datagrid/grid-sheet-cell.d.ts +3 -6
  62. package/dist/components/datagrid/grid-sheet-column.d.ts +2 -9
  63. package/dist/components/datagrid/grid-sheet-merge.d.ts +2 -7
  64. package/dist/components/datagrid/grid-sheet-row.d.ts +2 -5
  65. package/dist/components/datagrid/grid-sheet.d.ts +3 -2
  66. package/dist/components/datagrid/grid-summary-item.d.ts +5 -2
  67. package/dist/components/datagrid/grid-summary-texts.d.ts +2 -0
  68. package/dist/components/datagrid/grid-summary-type.d.ts +5 -2
  69. package/dist/components/datagrid/grid-summary.d.ts +3 -2
  70. package/dist/components/datagrid/list-option.d.ts +2 -4
  71. package/dist/components/datagrid/model/ColumnModel.d.ts +21 -3
  72. package/dist/components/datagrid/model/FilterValues.d.ts +15 -7
  73. package/dist/components/datagrid/model/GridExport.d.ts +1 -1
  74. package/dist/components/datagrid/model/GridModel.d.ts +2 -2
  75. package/dist/components/datagrid/model/LookupTexts.d.ts +1 -1
  76. package/dist/components/datagrid/view/CellEditor.d.ts +1 -1
  77. package/dist/components/datagrid/view/ColumnStyles.d.ts +4 -2
  78. package/dist/components/datagrid/view/GridBody.d.ts +1 -1
  79. package/dist/components/datagrid/view/HeaderRow.d.ts +3 -1
  80. package/dist/components/draggable/Draggable.d.ts +14 -3
  81. package/dist/components/dropdown/drop-down-props.d.ts +5 -2
  82. package/dist/components/form/MxForm.d.ts +1 -1
  83. package/dist/components/listbox/item-template.d.ts +4 -0
  84. package/dist/components/markdown/Markdown.d.ts +87 -0
  85. package/dist/components/markdown/code-block.d.ts +57 -0
  86. package/dist/components/markdown/code-colorer.d.ts +11 -0
  87. package/dist/components/markdown/code-highlighter.d.ts +9 -0
  88. package/dist/components/markdown/code-run.d.ts +6 -0
  89. package/dist/components/markdown/diagram-renderer.d.ts +21 -0
  90. package/dist/components/markdown/entities.d.ts +2 -0
  91. package/dist/components/markdown/index.d.ts +8 -0
  92. package/dist/components/markdown/inline-writer.d.ts +85 -0
  93. package/dist/components/markdown/markdown-context.d.ts +53 -0
  94. package/dist/components/markdown/markdown-link-click-event-args.d.ts +9 -0
  95. package/dist/components/markdown/markdown-props.d.ts +40 -0
  96. package/dist/components/markdown/markdown-writer.d.ts +95 -0
  97. package/dist/components/markdown/math-block.d.ts +22 -0
  98. package/dist/components/markdown/math-renderer.d.ts +18 -0
  99. package/dist/components/markdown/safe-href.d.ts +5 -0
  100. package/dist/components/markdown/text-run.d.ts +7 -0
  101. package/dist/components/menubar/MenuBar.d.ts +4 -0
  102. package/dist/components/menubar/menu-bar-props.d.ts +6 -0
  103. package/dist/components/pivotgrid/PivotGrid.d.ts +415 -0
  104. package/dist/components/pivotgrid/index.d.ts +44 -0
  105. package/dist/components/pivotgrid/model/PivotArrangement.d.ts +29 -0
  106. package/dist/components/pivotgrid/model/PivotAxisWindow.d.ts +169 -0
  107. package/dist/components/pivotgrid/model/PivotCellRanges.d.ts +63 -0
  108. package/dist/components/pivotgrid/model/PivotCellWindow.d.ts +47 -0
  109. package/dist/components/pivotgrid/model/PivotChart.d.ts +49 -0
  110. package/dist/components/pivotgrid/model/PivotDisplay.d.ts +61 -0
  111. package/dist/components/pivotgrid/model/PivotDrill.d.ts +19 -0
  112. package/dist/components/pivotgrid/model/PivotExpansion.d.ts +44 -0
  113. package/dist/components/pivotgrid/model/PivotFields.d.ts +55 -0
  114. package/dist/components/pivotgrid/model/PivotFilterValues.d.ts +36 -0
  115. package/dist/components/pivotgrid/model/PivotLayout.d.ts +75 -0
  116. package/dist/components/pivotgrid/model/PivotLoader.d.ts +29 -0
  117. package/dist/components/pivotgrid/model/PivotSheet.d.ts +44 -0
  118. package/dist/components/pivotgrid/model/PivotStateStore.d.ts +19 -0
  119. package/dist/components/pivotgrid/model/PivotTable.d.ts +78 -0
  120. package/dist/components/pivotgrid/model/PivotTexts.d.ts +47 -0
  121. package/dist/components/pivotgrid/model/PivotWindows.d.ts +120 -0
  122. package/dist/components/pivotgrid/model/pivot-copy.d.ts +26 -0
  123. package/dist/components/pivotgrid/model/pivot-csv.d.ts +9 -0
  124. package/dist/components/pivotgrid/model/pivot-header-cell.d.ts +19 -0
  125. package/dist/components/pivotgrid/model/pivot-line-key.d.ts +17 -0
  126. package/dist/components/pivotgrid/model/pivot-line.d.ts +14 -0
  127. package/dist/components/pivotgrid/pivot-grid-area.d.ts +2 -0
  128. package/dist/components/pivotgrid/pivot-grid-cell-click-event-args.d.ts +5 -0
  129. package/dist/components/pivotgrid/pivot-grid-cell-context.d.ts +19 -0
  130. package/dist/components/pivotgrid/pivot-grid-cell-dbl-click-event-args.d.ts +5 -0
  131. package/dist/components/pivotgrid/pivot-grid-cell-range.d.ts +16 -0
  132. package/dist/components/pivotgrid/pivot-grid-cell-selection-changed-event-args.d.ts +6 -0
  133. package/dist/components/pivotgrid/pivot-grid-chart-data.d.ts +15 -0
  134. package/dist/components/pivotgrid/pivot-grid-chart-options.d.ts +19 -0
  135. package/dist/components/pivotgrid/pivot-grid-column-resized-event-args.d.ts +8 -0
  136. package/dist/components/pivotgrid/pivot-grid-column-resizing.d.ts +15 -0
  137. package/dist/components/pivotgrid/pivot-grid-column.d.ts +19 -0
  138. package/dist/components/pivotgrid/pivot-grid-content-ready-event-args.d.ts +6 -0
  139. package/dist/components/pivotgrid/pivot-grid-context-menu-preparing-event-args.d.ts +22 -0
  140. package/dist/components/pivotgrid/pivot-grid-copying-event-args.d.ts +10 -0
  141. package/dist/components/pivotgrid/pivot-grid-custom-summary-info.d.ts +15 -0
  142. package/dist/components/pivotgrid/pivot-grid-data-error-event-args.d.ts +5 -0
  143. package/dist/components/pivotgrid/pivot-grid-drill-down.d.ts +14 -0
  144. package/dist/components/pivotgrid/pivot-grid-expanded-event-args.d.ts +6 -0
  145. package/dist/components/pivotgrid/pivot-grid-expanding-event-args.d.ts +9 -0
  146. package/dist/components/pivotgrid/pivot-grid-export-cell.d.ts +21 -0
  147. package/dist/components/pivotgrid/pivot-grid-export-options.d.ts +16 -0
  148. package/dist/components/pivotgrid/pivot-grid-export.d.ts +17 -0
  149. package/dist/components/pivotgrid/pivot-grid-exported-event-args.d.ts +9 -0
  150. package/dist/components/pivotgrid/pivot-grid-exporting-event-args.d.ts +17 -0
  151. package/dist/components/pivotgrid/pivot-grid-field-chooser.d.ts +20 -0
  152. package/dist/components/pivotgrid/pivot-grid-field-panel.d.ts +16 -0
  153. package/dist/components/pivotgrid/pivot-grid-field.d.ts +110 -0
  154. package/dist/components/pivotgrid/pivot-grid-fields-changed-event-args.d.ts +8 -0
  155. package/dist/components/pivotgrid/pivot-grid-filter-value.d.ts +4 -0
  156. package/dist/components/pivotgrid/pivot-grid-group-interval.d.ts +7 -0
  157. package/dist/components/pivotgrid/pivot-grid-header-filter-items-request.d.ts +9 -0
  158. package/dist/components/pivotgrid/pivot-grid-header-filter-items.d.ts +7 -0
  159. package/dist/components/pivotgrid/pivot-grid-load-panel.d.ts +11 -0
  160. package/dist/components/pivotgrid/pivot-grid-props.d.ts +121 -0
  161. package/dist/components/pivotgrid/pivot-grid-sheet-options.d.ts +14 -0
  162. package/dist/components/pivotgrid/pivot-grid-sheet.d.ts +19 -0
  163. package/dist/components/pivotgrid/pivot-grid-state.d.ts +54 -0
  164. package/dist/components/pivotgrid/pivot-grid-summary-cell.d.ts +29 -0
  165. package/dist/components/pivotgrid/pivot-grid-summary-display-mode.d.ts +5 -0
  166. package/dist/components/pivotgrid/pivot-grid-summary-type.d.ts +5 -0
  167. package/dist/components/pivotgrid/view/PivotFieldChooser.d.ts +71 -0
  168. package/dist/components/pivotgrid/view/PivotFieldPanel.d.ts +92 -0
  169. package/dist/components/pivotgrid/view/PivotView.d.ts +263 -0
  170. package/dist/components/resizable/Resizable.d.ts +2 -0
  171. package/dist/components/ribbonmenu/RibbonKeyHints.d.ts +4 -0
  172. package/dist/components/ribbonmenu/RibbonMenu.d.ts +4 -1
  173. package/dist/components/ribbonmenu/ribbon-menu-custom-menu-opening-event-args.d.ts +8 -4
  174. package/dist/components/ribbonmenu/ribbon-menu-props.d.ts +6 -0
  175. package/dist/components/scheduler/view/TimeView.d.ts +2 -0
  176. package/dist/components/scrollview/ScrollView.d.ts +48 -1
  177. package/dist/components/scrollview/index.d.ts +1 -0
  178. package/dist/components/scrollview/scroll-end-changed-event-args.d.ts +7 -0
  179. package/dist/components/scrollview/scroll-view-props.d.ts +9 -0
  180. package/dist/components/splitter/Splitter.d.ts +1 -3
  181. package/dist/components/tabdocs/DocumentTab.d.ts +0 -1
  182. package/dist/components/tabdocs/PhoneBar.d.ts +0 -1
  183. package/dist/components/tabdocs/TabDocumentManager.d.ts +3 -2
  184. package/dist/components/textarea/TextArea.d.ts +11 -0
  185. package/dist/components/textarea/text-area-props.d.ts +12 -1
  186. package/dist/components/textbox/TextBox.d.ts +3 -0
  187. package/dist/components/textbox/text-box-props.d.ts +3 -0
  188. package/dist/components/toolbar/Toolbar.d.ts +70 -1
  189. package/dist/components/toolbar/index.d.ts +5 -0
  190. package/dist/components/toolbar/toolbar-added-item.d.ts +9 -0
  191. package/dist/components/toolbar/toolbar-custom-menu-opening-event-args.d.ts +23 -0
  192. package/dist/components/toolbar/toolbar-customization.d.ts +18 -0
  193. package/dist/components/toolbar/toolbar-customized-event-args.d.ts +7 -0
  194. package/dist/components/toolbar/toolbar-item-display.d.ts +2 -0
  195. package/dist/components/toolbar/toolbar-item.d.ts +11 -1
  196. package/dist/components/toolbar/toolbar-props.d.ts +26 -0
  197. package/dist/components/toolbar/toolbar-targets.d.ts +22 -0
  198. package/dist/components/treeview/TreeView.d.ts +8 -4
  199. package/dist/components/treeview/tree-view-item-template.d.ts +4 -0
  200. package/dist/core/clipboard.d.ts +11 -0
  201. package/dist/core/enter-key-hint.d.ts +2 -0
  202. package/dist/core/look-watch.d.ts +2 -2
  203. package/dist/core/measure/look.d.ts +1 -1
  204. package/dist/core/measure/on-layout.d.ts +1 -1
  205. package/dist/core/measure/scroll.d.ts +3 -1
  206. package/dist/core/save-text.d.ts +2 -0
  207. package/dist/core/show-icon.d.ts +3 -3
  208. package/dist/core/ui-strings.d.ts +190 -0
  209. package/dist/excel/excel-pivot-customize-cell-args.d.ts +8 -0
  210. package/dist/excel/excel-pivot-export-options.d.ts +44 -0
  211. package/dist/excel/excel-pivot-export-result.d.ts +6 -0
  212. package/dist/excel/export-pivot-grid.d.ts +35 -0
  213. package/dist/excel/index.d.ts +4 -0
  214. package/dist/excel/index.js +190 -56
  215. package/dist/excel/index.js.map +1 -1
  216. package/dist/excel/write-sheet.d.ts +16 -0
  217. package/dist/{formula-guard-NYlpoA-t.js → formula-guard-Bx48S0u3.js} +2 -2
  218. package/dist/formula-guard-Bx48S0u3.js.map +1 -0
  219. package/dist/generated/tokens.d.ts +7527 -4097
  220. package/dist/index.d.ts +6 -0
  221. package/dist/index.js +66924 -50915
  222. package/dist/index.js.map +1 -1
  223. package/dist/locales/en.json +179 -1
  224. package/dist/locales/tr.json +179 -1
  225. package/dist/parts/customizer/Customizer.d.ts +12 -6
  226. package/dist/parts/customizer/customizer-display.d.ts +2 -0
  227. package/dist/parts/customizer/customizer-node.d.ts +5 -0
  228. package/dist/parts/customizer/customizer-source.d.ts +15 -3
  229. package/dist/parts/item-layout/layout-added-item.d.ts +2 -2
  230. package/dist/parts/list/OptionList.d.ts +4 -3
  231. package/dist/parts/list/option-parts.d.ts +1 -1
  232. package/dist/parts/menu/MenuList.d.ts +5 -0
  233. package/dist/parts/popup/Popup.d.ts +2 -0
  234. package/dist/{components/datagrid/model → parts/table}/CellFormatter.d.ts +8 -8
  235. package/dist/{components/datagrid/view → parts/table}/HeaderFilter.d.ts +16 -11
  236. package/dist/parts/table/OffsetList.d.ts +21 -0
  237. package/dist/parts/table/ScaledOffsets.d.ts +32 -0
  238. package/dist/{components/datagrid/model → parts/table}/ValueIntervals.d.ts +12 -5
  239. package/dist/{components/datagrid/model → parts/table}/ValueListAdapter.d.ts +4 -4
  240. package/dist/parts/table/date-interval.d.ts +2 -0
  241. package/dist/parts/table/date-type.d.ts +3 -0
  242. package/dist/{components/datagrid/model → parts/table}/filter-tree-node.d.ts +3 -1
  243. package/dist/parts/table/filter-value.d.ts +9 -0
  244. package/dist/parts/table/format-column.d.ts +14 -0
  245. package/dist/parts/table/header-filter-host.d.ts +27 -0
  246. package/dist/parts/table/option-of.d.ts +6 -0
  247. package/dist/parts/table/slice-sheet.d.ts +8 -0
  248. package/dist/parts/table/table-sheet-cell.d.ts +13 -0
  249. package/dist/parts/table/table-sheet-column.d.ts +11 -0
  250. package/dist/parts/table/table-sheet-merge.d.ts +9 -0
  251. package/dist/parts/table/table-sheet-row.d.ts +8 -0
  252. package/dist/parts/table/table-sheet.d.ts +24 -0
  253. package/dist/parts/table/value-interval.d.ts +6 -0
  254. package/dist/{components/datagrid/model → parts/table}/value-list.d.ts +7 -2
  255. package/dist/parts/table/value-loader.d.ts +8 -0
  256. package/dist/parts/table/value-option.d.ts +5 -0
  257. package/dist/parts/table/value-type.d.ts +5 -0
  258. package/dist/parts/table/values-result.d.ts +6 -0
  259. package/dist/parts/window/follow-pointer.d.ts +9 -3
  260. package/dist/parts/window-list/WindowList.d.ts +105 -0
  261. package/dist/parts/window-list/window-list-source.d.ts +10 -0
  262. package/dist/pdf/export-pivot-grid.d.ts +21 -0
  263. package/dist/pdf/index.d.ts +3 -0
  264. package/dist/pdf/index.js +143 -16
  265. package/dist/pdf/index.js.map +1 -1
  266. package/dist/pdf/pdf-customize-cell-args.d.ts +1 -1
  267. package/dist/pdf/pdf-pivot-cell-args.d.ts +25 -0
  268. package/dist/pdf/pdf-pivot-export-options.d.ts +61 -0
  269. package/dist/pdf/pdf-table.d.ts +38 -6
  270. package/dist/slice-sheet-C116M42H.js +43 -0
  271. package/dist/slice-sheet-C116M42H.js.map +1 -0
  272. package/dist/styles.css +4527 -201
  273. package/dist/tokens/index.d.ts +7527 -4097
  274. package/dist/tokens/index.js +7527 -4097
  275. package/dist/tokens/index.js.map +1 -1
  276. package/dist/{tr-BvKE8jSF.js → tr-BGbF9uCs.js} +359 -3
  277. package/dist/tr-BGbF9uCs.js.map +1 -0
  278. package/docs/accordion.md +1 -1
  279. package/docs/actionsheet.md +1 -1
  280. package/docs/appbar.md +1 -1
  281. package/docs/appmenu-api.md +1 -1
  282. package/docs/appmenu-programmatic.md +1 -1
  283. package/docs/appmenu-search.md +1 -1
  284. package/docs/appmenu.md +1 -1
  285. package/docs/avatar.md +1 -1
  286. package/docs/badge.md +1 -1
  287. package/docs/bar-gauge-angles.md +1 -1
  288. package/docs/bar-gauge-data.md +1 -1
  289. package/docs/bar-gauge-labels.md +1 -1
  290. package/docs/bar-gauge.md +1 -1
  291. package/docs/barcode.md +1 -1
  292. package/docs/bottomnavigation.md +1 -1
  293. package/docs/bottomsheet.md +1 -1
  294. package/docs/breadcrumb.md +1 -1
  295. package/docs/button.md +1 -1
  296. package/docs/buttongroup.md +1 -1
  297. package/docs/buttons.md +1 -1
  298. package/docs/calendar.md +1 -1
  299. package/docs/card.md +1 -1
  300. package/docs/chart-bars.md +1 -1
  301. package/docs/chart-candles.md +1 -1
  302. package/docs/chart-funnel.md +1 -1
  303. package/docs/chart-heatmap.md +1 -1
  304. package/docs/chart-lines.md +1 -1
  305. package/docs/chart-live.md +1 -1
  306. package/docs/chart-pie.md +1 -1
  307. package/docs/chart-radar.md +1 -1
  308. package/docs/chart-ranges.md +1 -1
  309. package/docs/chart-references.md +1 -1
  310. package/docs/chart-scatter.md +1 -1
  311. package/docs/chart-waterfall.md +1 -1
  312. package/docs/chart-zoom.md +1 -1
  313. package/docs/chart.md +1 -1
  314. package/docs/chat.md +1512 -0
  315. package/docs/checkbox.md +1 -1
  316. package/docs/chip.md +2 -2
  317. package/docs/choice.md +1 -1
  318. package/docs/colorbox.md +1 -1
  319. package/docs/combobox.md +2 -1
  320. package/docs/commands.md +1 -1
  321. package/docs/control.md +1 -1
  322. package/docs/data.md +1 -1
  323. package/docs/datagrid-api.md +3 -3
  324. package/docs/datagrid-bands.md +1 -1
  325. package/docs/datagrid-drag-select.md +1 -1
  326. package/docs/datagrid-drag.md +1 -1
  327. package/docs/datagrid-editing.md +1 -1
  328. package/docs/datagrid-filtering.md +2 -2
  329. package/docs/datagrid-forms.md +1 -1
  330. package/docs/datagrid-grouping.md +7 -7
  331. package/docs/datagrid-layout.md +2 -2
  332. package/docs/datagrid-lookups.md +4 -1
  333. package/docs/datagrid-master-detail.md +1 -1
  334. package/docs/datagrid-scrolling.md +1 -1
  335. package/docs/datagrid-selection.md +1 -1
  336. package/docs/datagrid.md +1 -1
  337. package/docs/datebox.md +1 -1
  338. package/docs/daterangebox.md +1 -1
  339. package/docs/display.md +1 -1
  340. package/docs/draggable.md +2 -2
  341. package/docs/drawer.md +1 -1
  342. package/docs/dropdown.md +4 -3
  343. package/docs/editors.md +1 -1
  344. package/docs/feedback.md +1 -1
  345. package/docs/fileuploader.md +1 -1
  346. package/docs/filterbuilder.md +1 -1
  347. package/docs/formlayout.md +1 -1
  348. package/docs/foundations.md +1 -1
  349. package/docs/gallery.md +1 -1
  350. package/docs/gauge-base.md +1 -1
  351. package/docs/gauge-circular.md +1 -1
  352. package/docs/gauge-dashboards.md +1 -1
  353. package/docs/gauge-linear.md +1 -1
  354. package/docs/gauge-markers.md +1 -1
  355. package/docs/gauge-marks.md +1 -1
  356. package/docs/gauge-ranges.md +1 -1
  357. package/docs/gauge-scales.md +1 -1
  358. package/docs/gauge.md +1 -1
  359. package/docs/home.md +1 -1
  360. package/docs/keyboard.md +1 -1
  361. package/docs/language.md +1 -1
  362. package/docs/layout.md +1 -1
  363. package/docs/listbox.md +4 -3
  364. package/docs/loadpanel.md +1 -1
  365. package/docs/lookup.md +1 -1
  366. package/docs/markdown.md +343 -0
  367. package/docs/menus-api.md +3 -1
  368. package/docs/menus-context.md +2 -1
  369. package/docs/menus-customization.md +5 -1
  370. package/docs/menus-merging.md +1 -1
  371. package/docs/menus-programmatic.md +1 -1
  372. package/docs/menus.md +1 -1
  373. package/docs/multiview.md +1 -1
  374. package/docs/navigation.md +1 -1
  375. package/docs/numberbox.md +1 -1
  376. package/docs/otpinput.md +1 -1
  377. package/docs/pagination.md +1 -1
  378. package/docs/pivotgrid-api.md +180 -0
  379. package/docs/pivotgrid-chart.md +132 -0
  380. package/docs/pivotgrid-drilldown.md +142 -0
  381. package/docs/pivotgrid-export.md +207 -0
  382. package/docs/pivotgrid-fields.md +245 -0
  383. package/docs/pivotgrid-keyboard.md +223 -0
  384. package/docs/pivotgrid-layout.md +663 -0
  385. package/docs/pivotgrid-panel.md +223 -0
  386. package/docs/pivotgrid-remote.md +397 -0
  387. package/docs/pivotgrid-sorting.md +379 -0
  388. package/docs/pivotgrid-state.md +245 -0
  389. package/docs/pivotgrid-summaries.md +330 -0
  390. package/docs/pivotgrid.md +295 -0
  391. package/docs/popover.md +1 -1
  392. package/docs/progress.md +1 -1
  393. package/docs/qrcode.md +1 -1
  394. package/docs/radiogroup.md +1 -1
  395. package/docs/rating.md +1 -1
  396. package/docs/resizable.md +1 -1
  397. package/docs/ribbonmenu-api.md +2 -1
  398. package/docs/ribbonmenu-commands.md +1 -1
  399. package/docs/ribbonmenu-customization.md +3 -2
  400. package/docs/ribbonmenu-display.md +3 -3
  401. package/docs/ribbonmenu-layouts.md +1 -1
  402. package/docs/ribbonmenu-programmatic.md +1 -1
  403. package/docs/ribbonmenu.md +3 -1
  404. package/docs/scheduler-agenda.md +1 -1
  405. package/docs/scheduler-big-data.md +1 -1
  406. package/docs/scheduler-editing.md +1 -1
  407. package/docs/scheduler-form.md +1 -1
  408. package/docs/scheduler-icalendar.md +1 -1
  409. package/docs/scheduler-mobile.md +1 -1
  410. package/docs/scheduler-recurrence.md +1 -1
  411. package/docs/scheduler-resources.md +1 -1
  412. package/docs/scheduler-timeline.md +1 -1
  413. package/docs/scheduler.md +1 -1
  414. package/docs/scrollview.md +1 -1
  415. package/docs/shortcuteditor.md +1 -1
  416. package/docs/showcase-home.md +1 -1
  417. package/docs/showcase-mail.md +39 -0
  418. package/docs/showcase.md +1 -1
  419. package/docs/signature.md +1 -1
  420. package/docs/skeleton.md +1 -1
  421. package/docs/slider.md +1 -1
  422. package/docs/sortable.md +3 -6
  423. package/docs/sparkline.md +1 -1
  424. package/docs/speeddial.md +1 -1
  425. package/docs/splitter.md +1 -1
  426. package/docs/stepper.md +1 -1
  427. package/docs/switch.md +1 -1
  428. package/docs/tabdocs-dock.md +1 -1
  429. package/docs/tabdocs-drag.md +1 -1
  430. package/docs/tabdocs-menus.md +1 -1
  431. package/docs/tabdocs-mobile.md +1 -1
  432. package/docs/tabdocs-tabs.md +1 -1
  433. package/docs/tabdocs-windows.md +1 -1
  434. package/docs/tabdocs-workspace.md +1 -1
  435. package/docs/tabdocs.md +1 -1
  436. package/docs/tabs.md +1 -1
  437. package/docs/tagbox.md +4 -3
  438. package/docs/textarea.md +4 -1
  439. package/docs/textbox.md +2 -1
  440. package/docs/tileview.md +1 -1
  441. package/docs/timeline.md +1 -1
  442. package/docs/toast.md +1 -1
  443. package/docs/tokens.md +687 -1
  444. package/docs/toolbar-api.md +80 -0
  445. package/docs/toolbar-customization.md +261 -0
  446. package/docs/toolbar.md +4 -52
  447. package/docs/tooltip.md +1 -1
  448. package/docs/treeview.md +3 -3
  449. package/docs/validationsummary.md +1 -1
  450. package/docs/window.md +1 -1
  451. package/docs/wizard.md +1 -1
  452. package/llms-full.txt +19005 -12353
  453. package/llms.txt +29 -2
  454. package/package.json +5 -5
  455. package/dist/components/datagrid/model/date-type.d.ts +0 -3
  456. package/dist/components/datagrid/model/option-of.d.ts +0 -6
  457. package/dist/components/datagrid/model/value-loader.d.ts +0 -8
  458. package/dist/formula-guard-NYlpoA-t.js.map +0 -1
  459. package/dist/tr-BvKE8jSF.js.map +0 -1
  460. /package/dist/{components/datagrid/model → core}/text-ranges.d.ts +0 -0
  461. /package/dist/{components/datagrid/model → parts/table}/ExtraHeights.d.ts +0 -0
  462. /package/dist/{components/datagrid/model → parts/table}/ScrollGeometry.d.ts +0 -0
  463. /package/dist/{components/datagrid/model → parts/table}/cell-list.d.ts +0 -0
  464. /package/dist/{components/datagrid/model → parts/table}/date-like.d.ts +0 -0
  465. /package/dist/{components/datagrid/view → parts/table}/editor-value.d.ts +0 -0
  466. /package/dist/{components/datagrid/model → parts/table}/formula-guard.d.ts +0 -0
  467. /package/dist/{components/datagrid/model → parts/table}/parse-date-text.d.ts +0 -0
  468. /package/dist/{components/datagrid/model → parts/table}/same-value.d.ts +0 -0
@@ -209,7 +209,7 @@ export declare class MxForm extends FocusContainer<HTMLDialogElement, FormProps>
209
209
  private barPointerDown;
210
210
  /** A press on the handle of `edge`: the form follows the pointer from that side or corner. */
211
211
  private resizePointerDown;
212
- /** Follows the pointer from `e` until it is released, then keeps the new place and size. */
212
+ /** Follows the pointer from `e` until it is released, then keeps the new place and size; a press that moved nothing keeps nothing. */
213
213
  private drag;
214
214
  /** After a move or a resize, the props say where the form is and how big. */
215
215
  private readonly keepGeometry;
@@ -2,6 +2,10 @@ import type { ComponentBase } from '@motifx/core';
2
2
  /**
3
3
  * Draws an item instead of its text. It can return a cleanup function.
4
4
  *
5
+ * The host is the drawing's own: it goes when the item is drawn again or its list goes, with what was added to it,
6
+ * so a template that only adds components needs no cleanup. The cleanup is for what lives outside the host (a
7
+ * subscription, a timer); it is given to the host and runs once as the host goes, after what the host held.
8
+ *
5
9
  * @param host The place the item goes in: add your components to its `controls`, or give it a text.
6
10
  */
7
11
  export type ItemTemplate<T> = (item: T, host: ComponentBase<HTMLElement>) => (() => void) | void;
@@ -0,0 +1,87 @@
1
+ import { type Bind, type Component, type ComponentBase, type Event as MotifEvent, type IBaseProp } from '@motifx/core';
2
+ import { Control } from '../../core/control';
3
+ import type { CodeHighlighter } from './code-highlighter';
4
+ import type { DiagramRenderer } from './diagram-renderer';
5
+ import { type MarkdownSettings } from './markdown-context';
6
+ import type { MarkdownLinkClickEventArgs } from './markdown-link-click-event-args';
7
+ import type { MarkdownProps } from './markdown-props';
8
+ import type { MathRenderer } from './math-renderer';
9
+ /**
10
+ * Draws markdown, all of it at once or as it arrives. Every character is on screen the moment it is written: a mark
11
+ * whose meaning is not known yet (`**`, `#`, `|`) shows as text at the end until it is, then its element is made and
12
+ * the text goes on into it. Nothing drawn is ever drawn again, neither while the text grows nor when it ends; what a
13
+ * door draws (math, a diagram) takes the place of its text once the text is complete. Footnotes (`[^1]`) are numbered
14
+ * links to their notes, and back. A very long text given at once is drawn a piece a frame, from its start, so the page
15
+ * never stops for it; a long code block can show its first lines alone (`codeLines`).
16
+ *
17
+ * @example
18
+ * <Markdown text={() => this.answer.text} streaming={() => this.answer.busy} />
19
+ *
20
+ * const view = new Markdown();
21
+ * for await (const delta of stream) view.append(delta);
22
+ * view.end();
23
+ */
24
+ export declare class Markdown extends Control<HTMLDivElement, MarkdownProps> implements MarkdownSettings {
25
+ private readonly drawing;
26
+ private writer;
27
+ /** The text drawn so far. */
28
+ private written;
29
+ /** The text given and not drawn yet: it is drawn a piece a frame. */
30
+ private waiting;
31
+ /** Takes back the next piece. */
32
+ private stopPiece;
33
+ private ended;
34
+ /** `append` is handing its text to the property: it is drawn already. */
35
+ private appending;
36
+ private readonly linkClicked;
37
+ constructor(props?: IBaseProp<MarkdownProps>);
38
+ get streaming(): boolean;
39
+ set streaming(value: Bind<boolean>);
40
+ get highlighter(): CodeHighlighter | null;
41
+ set highlighter(value: Bind<CodeHighlighter | null>);
42
+ get mathRenderer(): MathRenderer | null;
43
+ set mathRenderer(value: Bind<MathRenderer | null>);
44
+ get diagramRenderer(): DiagramRenderer | null;
45
+ set diagramRenderer(value: Bind<DiagramRenderer | null>);
46
+ get images(): boolean;
47
+ set images(value: Bind<boolean>);
48
+ get allowImage(): ((src: string) => boolean) | null;
49
+ set allowImage(value: Bind<((src: string) => boolean) | null>);
50
+ get linkTarget(): string;
51
+ set linkTarget(value: Bind<string>);
52
+ get copyButton(): boolean;
53
+ set copyButton(value: Bind<boolean>);
54
+ get codeLines(): number;
55
+ set codeLines(value: Bind<number>);
56
+ /** `true` once the text is complete: `end()` was called, or a text was given while not streaming. */
57
+ get isEnded(): boolean;
58
+ /** `true` while a long text given at once is still being drawn, a piece a frame. */
59
+ get isDrawing(): boolean;
60
+ /** Occurs when a link is clicked. Set `e.cancel` to handle it yourself. */
61
+ get onLinkClick(): MotifEvent<MarkdownLinkClickEventArgs>;
62
+ /** The component the writer draws for: this one. */
63
+ get owner(): this;
64
+ /** Adds `delta` to the text: what it completes takes its form, the rest is on screen as text at once. */
65
+ append(delta: string): void;
66
+ /**
67
+ * The text is complete. What waits at the end is decided as at the end of a line, once every piece is drawn; nothing
68
+ * drawn is drawn again.
69
+ */
70
+ end(): void;
71
+ /**
72
+ * The block drawn for the character at `index` of the text (a paragraph, heading, code block, rule or table row): the
73
+ * last one that starts at or before it. `null` before the first, or while the text has not reached it.
74
+ */
75
+ blockAt(index: number): ComponentBase | null;
76
+ /** Removes everything, to start a new text. */
77
+ clear(): void;
78
+ imageAllowed(src: string): boolean;
79
+ linkMade(link: Component<HTMLAnchorElement>, href: string | null, title: string): void;
80
+ /** A text that goes on from the one given adds what is new; another text is a new one. */
81
+ private drawText;
82
+ /** Draws `s` after what is given: at once, or a piece a frame when it is long or pieces still wait. */
83
+ private write;
84
+ /** Writes what waits for a moment, then lets the frame lay it out; the text ends after its last piece when it ended. */
85
+ private readonly drawPiece;
86
+ private restart;
87
+ }
@@ -0,0 +1,57 @@
1
+ import { Component, type ComponentBase } from '@motifx/core';
2
+ import type { MarkdownContext } from './markdown-context';
3
+ /**
4
+ * A fenced code block: a header with the language and a copy button, and the code. Its lines are written as they
5
+ * arrive; a line that ends takes the colours of the highlighter, when there is one, and is not written again. Past the
6
+ * markdown's `codeLines`, the block shows that many lines and a button under it shows them all, and folds them again.
7
+ * Once it is complete, `math` is drawn by the math door in the block's place, and a language the diagram door draws by
8
+ * that door in the code's place.
9
+ */
10
+ export declare class CodeBlock {
11
+ private readonly context;
12
+ /** The block's frame: its header and its code. */
13
+ readonly frame: Component<HTMLDivElement>;
14
+ private readonly header;
15
+ private readonly pre;
16
+ private readonly label;
17
+ private readonly code;
18
+ private readonly copyButton;
19
+ /** The button under a long block that shows all its lines, made when the block grows past the limit. */
20
+ private moreButton;
21
+ private unfolded;
22
+ private lines;
23
+ private line;
24
+ private lineText;
25
+ private source;
26
+ private infoText;
27
+ private colorer;
28
+ private isCopied;
29
+ /** Starts the time the button says "Copied"; set with the button. */
30
+ private copied;
31
+ constructor(context: MarkdownContext, host: ComponentBase);
32
+ /** The info string written so far: the language is its first word. */
33
+ get info(): string;
34
+ /** The code written so far, the line being written included. */
35
+ get text(): string;
36
+ infoChar(c: string): void;
37
+ /** The info string is complete: the label keeps the language, and the highlighter is asked for the block. */
38
+ infoEnd(): void;
39
+ write(s: string): void;
40
+ /** The line ends: it takes its colours, or its line break. */
41
+ lineEnd(): void;
42
+ /** The line being written is a closing fence of `ch`, at least `count` long. */
43
+ closes(ch: string, count: number): boolean;
44
+ /** Takes the line being written away: it was the closing fence. */
45
+ dropLine(): void;
46
+ close(): void;
47
+ /** The code is complete: math, or a language the diagram door draws, is drawn by its door. */
48
+ private draw;
49
+ /** What a door drew takes the code's place; math takes the whole block's, its header too. */
50
+ private show;
51
+ /** Past the limit, the block shows its first lines and the button under it the count of all; open, it shows them all. */
52
+ private drawFold;
53
+ private drawMore;
54
+ private colors;
55
+ private copy;
56
+ private drawCopy;
57
+ }
@@ -0,0 +1,11 @@
1
+ import type { CodeRun } from './code-run';
2
+ /** Colours the lines of one code block, in order, so a highlighter that keeps state between lines works too. */
3
+ export interface CodeColorer {
4
+ /**
5
+ * Splits a finished line into runs. Their texts joined must be the line exactly; otherwise the line stays plain.
6
+ * Called once per line, when the line ends.
7
+ */
8
+ line(text: string): readonly CodeRun[];
9
+ /** The block ended. */
10
+ close?(): void;
11
+ }
@@ -0,0 +1,9 @@
1
+ import type { CodeColorer } from './code-colorer';
2
+ /**
3
+ * The door for any highlighter. `open` is called when a code block starts, with the language its fence names
4
+ * (`''` for none); `null` keeps the block plain. A highlighter that loads later colours the blocks that open after
5
+ * it is ready: lines already drawn are never coloured again.
6
+ */
7
+ export interface CodeHighlighter {
8
+ open(language: string): CodeColorer | null;
9
+ }
@@ -0,0 +1,6 @@
1
+ /** A piece of a line of code in one colour: a class of the app's stylesheet, or a colour. */
2
+ export interface CodeRun {
3
+ text: string;
4
+ className?: string;
5
+ color?: string;
6
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The door for diagrams: a fenced code block in a language the door draws (`mermaid`) shows its code as it arrives,
3
+ * and once the code is complete the element the door gives, or promises, takes the code's place. The block keeps its
4
+ * language and its copy button, which copies the code. `null`, or a promise that gives `null` or fails, keeps the code.
5
+ *
6
+ * @example
7
+ * const diagrams: DiagramRenderer = {
8
+ * draws: (language) => language === 'mermaid',
9
+ * async render(code) {
10
+ * const { svg } = await mermaid.render(`diagram-${++count}`, code);
11
+ * const host = document.createElement('div');
12
+ * host.innerHTML = svg;
13
+ * return host;
14
+ * }
15
+ * };
16
+ */
17
+ export interface DiagramRenderer {
18
+ /** Whether it draws code fenced as `language`. */
19
+ draws(language: string): boolean;
20
+ render(code: string, language: string): Element | Promise<Element | null> | null;
21
+ }
@@ -0,0 +1,2 @@
1
+ /** The character of an entity written without its `;` (`&amp`, `&#39`, `&#x27`); null when it is not one. */
2
+ export declare function decodeEntity(entity: string): string | null;
@@ -0,0 +1,8 @@
1
+ export { Markdown } from './Markdown';
2
+ export type { CodeColorer } from './code-colorer';
3
+ export type { CodeHighlighter } from './code-highlighter';
4
+ export type { CodeRun } from './code-run';
5
+ export type { DiagramRenderer } from './diagram-renderer';
6
+ export type { MathRenderer } from './math-renderer';
7
+ export type { MarkdownLinkClickEventArgs } from './markdown-link-click-event-args';
8
+ export type { MarkdownProps } from './markdown-props';
@@ -0,0 +1,85 @@
1
+ import type { ComponentBase } from '@motifx/core';
2
+ import type { MarkdownContext } from './markdown-context';
3
+ /**
4
+ * Writes the inline content of one block (a paragraph, a heading, a table cell) as it arrives. Every character is on
5
+ * screen when it is taken. A character whose meaning is not known yet (`*`, `` ` ``, `[`, `\`, `&`) stays as text at
6
+ * the end of the run; once the next one decides, the marker leaves the run and the element is made, or it simply
7
+ * stays text. An element, once made, is never made again: what follows goes into it until it closes. With a math
8
+ * door, `$` followed by text opens math: its TeX shows as it is written, and the closing `$` has the door draw it in
9
+ * its place; math still open at the line's end stays text. `[^label]` refers to a footnote.
10
+ */
11
+ export declare class InlineWriter {
12
+ private readonly context;
13
+ private readonly frames;
14
+ private run;
15
+ private pending;
16
+ private brackets;
17
+ private link;
18
+ /** The character before the next one: what flanks a delimiter run; `''` at the start. */
19
+ private prev;
20
+ /** The word being written, for an address written bare. */
21
+ private word;
22
+ /** Characters of the block writer are at the end of the run, to be taken back or made inline. */
23
+ private raw;
24
+ constructor(context: MarkdownContext, host: ComponentBase);
25
+ /** The element the content is written into. */
26
+ get host(): ComponentBase;
27
+ /** A `\` is waiting for the next character. */
28
+ get isEscaping(): boolean;
29
+ private get top();
30
+ char(c: string): void;
31
+ /** A line of the block ends: a soft break, or a hard one after two spaces or a `\`. */
32
+ lineEnd(): void;
33
+ /** The block ends: what is waiting is decided with nothing after it. Elements left open stay as they are. */
34
+ close(): void;
35
+ /** Characters shown at the end as they are, until the block writer knows what they are. */
36
+ appendRaw(s: string): void;
37
+ /** Takes back the last `count` characters given with `appendRaw`. */
38
+ trimRaw(count: number): void;
39
+ /** The closing `#`s of a heading (`## Title ##`), known at the line's end. */
40
+ trimClosingHashes(): void;
41
+ private extend;
42
+ /** Decides what is waiting, with `after` the character that came next; returns whether `after` was used up. */
43
+ private resolve;
44
+ private take;
45
+ /** Text that means nothing more: an escaped character, a decoded entity, what a delimiter run left over. */
46
+ private literal;
47
+ /**
48
+ * A run of `*`, `_` or `~` closes the element of its kind it can close, or opens one when text follows it
49
+ * (CommonMark's flanking rules); what it cannot use stays text.
50
+ */
51
+ private closeOrOpen;
52
+ /**
53
+ * A `$` opens math when text follows it; the math keeps the `$` on screen until it is drawn. In math, a `$` closes it
54
+ * unless a digit follows (`$5`), and the door draws the TeX in its place; with nothing drawn the text stays as written.
55
+ */
56
+ private dollar;
57
+ /**
58
+ * `[^label]` with no `(` after it refers to a footnote: it leaves the text and the footnote's number takes its place,
59
+ * raised, a link to the note.
60
+ */
61
+ private footnoteRef;
62
+ /** Backticks open a code span when something follows them, and close the one they match in length. */
63
+ private codeTicks;
64
+ private openBracket;
65
+ /** A `]` in the element its `[` was typed in waits for a `(`. */
66
+ private closeBracket;
67
+ /**
68
+ * `](` makes the link: what was written since the `[` goes into it as it is (the parts move, nothing is made again),
69
+ * the `[` and the `]` leave. Its address and title come next and are not shown. An image is a link while images
70
+ * are off.
71
+ */
72
+ private openLink;
73
+ private linkChar;
74
+ /** The address is complete: the link takes it, or an allowed image replaces its alternative text. */
75
+ private closeLink;
76
+ /** `https://`, `http://` or `www.` was typed at a word's start: the word becomes a link that grows with it. */
77
+ private startAutolink;
78
+ /** The address ends at a space: punctuation at its end is the sentence's, and leaves the link. */
79
+ private endAutolink;
80
+ private push;
81
+ private pop;
82
+ private hardBreak;
83
+ private append;
84
+ private trim;
85
+ }
@@ -0,0 +1,53 @@
1
+ import { Component, type ComponentBase } from '@motifx/core';
2
+ import type { CodeHighlighter } from './code-highlighter';
3
+ import type { DiagramRenderer } from './diagram-renderer';
4
+ import type { MathRenderer } from './math-renderer';
5
+ import { TextRun } from './text-run';
6
+ /** What the writer asks of the component it draws for; read when a part is made, so a change reaches what comes next. */
7
+ export interface MarkdownSettings {
8
+ readonly owner: ComponentBase;
9
+ readonly highlighter: CodeHighlighter | null;
10
+ readonly mathRenderer: MathRenderer | null;
11
+ readonly diagramRenderer: DiagramRenderer | null;
12
+ readonly images: boolean;
13
+ readonly copyButton: boolean;
14
+ /** A code block longer than this many lines is folded to them; `0` folds none. */
15
+ readonly codeLines: number;
16
+ imageAllowed(src: string): boolean;
17
+ /** A link was made: its address (null when it is not a safe one), target and listener are the component's. */
18
+ linkMade(link: Component<HTMLAnchorElement>, href: string | null, title: string): void;
19
+ }
20
+ /** A footnote: its number, by the order of the first references, the ids of its note and its first reference. */
21
+ export interface Footnote {
22
+ number: number;
23
+ id: string;
24
+ refId: string;
25
+ /** The first reference, which the note's back link goes to. */
26
+ ref: ComponentBase | null;
27
+ /** The note, once it is written. */
28
+ note: ComponentBase | null;
29
+ }
30
+ /** The writers' shared state: the settings, the footnotes, and the text runs to write at the end of the current write. */
31
+ export declare class MarkdownContext {
32
+ readonly settings: MarkdownSettings;
33
+ private readonly dirty;
34
+ private readonly notes;
35
+ /** Makes the ids of this markdown's footnotes its own. */
36
+ private readonly prefix;
37
+ constructor(settings: MarkdownSettings);
38
+ /** The footnote `label` names; the first time, it takes the next number. */
39
+ footnote(label: string): Footnote;
40
+ /** The note of a footnote is written: it is the place its references go to, and it takes the focus there. */
41
+ footnoteNote(note: Footnote, item: ComponentBase): void;
42
+ /** A link of a footnote: a reference goes to its note, and a note's back link to its first reference. */
43
+ footnoteLink(link: Component<HTMLAnchorElement>, note: Footnote, back: boolean): void;
44
+ /** Draws TeX through the math door: the element it gives, as a component, or null to keep the TeX. */
45
+ math(tex: string, display: boolean): ComponentBase | null;
46
+ /** Another text starts: its footnotes count from one again. */
47
+ reset(): void;
48
+ /** A new text node at the end of `host`. Core builds it with the run's value of that moment, not of its making. */
49
+ run(host: ComponentBase): TextRun;
50
+ touch(run: TextRun): void;
51
+ /** Writes every run that grew since the last flush: one text write per node per write call. */
52
+ flush(): void;
53
+ }
@@ -0,0 +1,9 @@
1
+ import type { Markdown } from './Markdown';
2
+ /** The arguments of `onLinkClick`. Set `cancel` to keep the browser from following the link. */
3
+ export interface MarkdownLinkClickEventArgs {
4
+ /** The link's address, as safe addresses are written; `''` for a link whose address was not safe. */
5
+ href: string;
6
+ event: MouseEvent;
7
+ cancel: boolean;
8
+ source: Markdown;
9
+ }
@@ -0,0 +1,40 @@
1
+ import type { Bind } from '@motifx/core';
2
+ import type { ControlProps } from '../../core/control';
3
+ import type { CodeHighlighter } from './code-highlighter';
4
+ import type { DiagramRenderer } from './diagram-renderer';
5
+ import type { MathRenderer } from './math-renderer';
6
+ import type { MarkdownLinkClickEventArgs } from './markdown-link-click-event-args';
7
+ /**
8
+ * Props of `Markdown`. `text` (from `ControlProps`) is the markdown. Each prop is also a settable property, and a
9
+ * function is tracked. A setting reaches the parts drawn after it changes; what is drawn stays as it is.
10
+ */
11
+ export interface MarkdownProps extends ControlProps {
12
+ /**
13
+ * While `true`, `text` is still arriving: each new value that goes on from the last one adds only what is new, and
14
+ * what is not understood yet stays at the end as text. `false` ends it. The default is `false`.
15
+ */
16
+ streaming?: Bind<boolean>;
17
+ /** Colours code blocks; any highlighter fits through this door. The default is none: code stays plain. */
18
+ highlighter?: Bind<CodeHighlighter | null>;
19
+ /** Draws math (`$…$`, `$$…$$`, ```` ```math ````) once its TeX is complete. The default is none: `$` is text. */
20
+ mathRenderer?: Bind<MathRenderer | null>;
21
+ /** Draws a fenced block in a language it draws (`mermaid`) once its code is complete. The default is none. */
22
+ diagramRenderer?: Bind<DiagramRenderer | null>;
23
+ /**
24
+ * Shows images. The default is `false`: an image address in a model's answer can carry data away, so an image is
25
+ * shown as a link to it until images are allowed.
26
+ */
27
+ images?: Bind<boolean>;
28
+ /** With `images`, decides which addresses may be shown; the others stay links. The default allows every safe one. */
29
+ allowImage?: Bind<((src: string) => boolean) | null>;
30
+ /** Where links open. The default is `'_blank'`; `''` opens them in the same tab. */
31
+ linkTarget?: Bind<string>;
32
+ /** Shows a copy button on code blocks. The default is `true`. */
33
+ copyButton?: Bind<boolean>;
34
+ /**
35
+ * A code block longer than this many lines shows that many, folded, and a button under it shows them all. The
36
+ * default is `0`: every line shows.
37
+ */
38
+ codeLines?: Bind<number>;
39
+ onLinkClick?: (e: MarkdownLinkClickEventArgs) => void;
40
+ }
@@ -0,0 +1,95 @@
1
+ import type { ComponentBase } from '@motifx/core';
2
+ import type { MarkdownContext } from './markdown-context';
3
+ /**
4
+ * Writes markdown into `root` as it arrives, one character at a time, and never draws a part again. A line's
5
+ * containers (quotes, list items) are matched first; then its first characters say which block it starts. While they
6
+ * do not say it yet, they are on screen as text; once they do, they leave and the block is made, and the line goes on
7
+ * into it. Inline content goes to an `InlineWriter` per paragraph, heading and cell.
8
+ */
9
+ export declare class MarkdownWriter {
10
+ private readonly context;
11
+ private readonly containers;
12
+ private leaf;
13
+ private phase;
14
+ /** The deepest container the line has matched. */
15
+ private matched;
16
+ private matching;
17
+ private indent;
18
+ /** A `>` takes one space after it. */
19
+ private quoteSpace;
20
+ private skipSpaces;
21
+ private lineUsed;
22
+ private tail;
23
+ private header;
24
+ private fence;
25
+ private itemIndent;
26
+ private itemSpaces;
27
+ /** Where the text written so far ends, and where the line being written starts. */
28
+ private at;
29
+ private lineAt;
30
+ private readonly blocks;
31
+ /** The list of the footnotes written last: a note right after it goes on in it. */
32
+ private notes;
33
+ constructor(context: MarkdownContext, root: ComponentBase);
34
+ /** Writes `text`; the text nodes it grew are written once, at the end. */
35
+ write(text: string): void;
36
+ /** The block drawn for the character at `index` of the text: the last one that starts at or before it. */
37
+ blockAt(index: number): ComponentBase | null;
38
+ /** The text is complete: the last line ends, and what waits is decided as at any line's end. */
39
+ end(): void;
40
+ private char;
41
+ private lineEnd;
42
+ private prefixChar;
43
+ /** Indentation that reaches an open item's content goes on into it. */
44
+ private matchItem;
45
+ /** The first character of the line after its containers: it goes on in the open block, or starts one. */
46
+ private blockStart;
47
+ private startTail;
48
+ private tailChar;
49
+ /** The line ends while its start is not decided: the line's end decides it. */
50
+ private tailEnd;
51
+ /** The tail is decided: its characters leave the screen, for the block to show them as it shows them. */
52
+ private takeTail;
53
+ private shownAt;
54
+ private grow;
55
+ private reveal;
56
+ private hide;
57
+ /** The host for a new block: the deepest container the line matched, which then holds something. */
58
+ private place;
59
+ /** Text: it goes on in the open paragraph (a lazy line too), or starts one. */
60
+ private toParagraph;
61
+ private openHeading;
62
+ private openCode;
63
+ /** `$$` at a line's start opens display math, up to a line that ends with `$$`. */
64
+ private openMath;
65
+ /**
66
+ * `[^label]:` writes a footnote's note: an item of the list of footnotes (the one right before it, or a new one) that
67
+ * opens with a link back to the first reference; its paragraph goes on in lines indented under it.
68
+ */
69
+ private openFootnote;
70
+ private openRule;
71
+ private openQuote;
72
+ /** The list right after the matched container is of this kind: an item goes on in it. */
73
+ private continuesList;
74
+ /** A list item: in the list of its kind right after the matched container, else in a new list. */
75
+ private openItem;
76
+ /** The spaces after an item's marker say where its content starts; the first character starts its first block. */
77
+ private itemChar;
78
+ private openTask;
79
+ /** The line under a `|` line: valid, the two lines leave and the table is made; not, they are a paragraph. */
80
+ private delimiterEnd;
81
+ /** A character that no delimiter line has: the `|` line and this one are a paragraph. */
82
+ private delimiterFailed;
83
+ /** The line under a `|` line starts no delimiter line: the `|` line is a paragraph line. */
84
+ private headerFailed;
85
+ private rowStart;
86
+ /** A `|` closes the cell (an empty one too); the first other character opens the next. */
87
+ private cellChar;
88
+ private openCell;
89
+ /** The cells of a table line, without its outer `|`s; an escaped `\|` stays in its cell. */
90
+ private cells;
91
+ /** A blank line: it closes the paragraph and what it ends; list items go on, code keeps it as an empty line. */
92
+ private blankLine;
93
+ private closeLeaf;
94
+ private popTo;
95
+ }
@@ -0,0 +1,22 @@
1
+ import type { Component, ComponentBase } from '@motifx/core';
2
+ import type { MarkdownContext } from './markdown-context';
3
+ /**
4
+ * A block of display math, from `$$` at a line's start to a line that ends with `$$`: its TeX shows as it arrives, and
5
+ * once it is complete the math door draws it in its place.
6
+ */
7
+ export declare class MathBlock {
8
+ private readonly context;
9
+ readonly frame: Component<HTMLDivElement>;
10
+ private readonly code;
11
+ private readonly run;
12
+ private tex;
13
+ private line;
14
+ private closed;
15
+ constructor(context: MarkdownContext, host: ComponentBase);
16
+ write(c: string): void;
17
+ /** The line being written ends with `$$`: it leaves the text, and the block ends with the line. */
18
+ ends(): boolean;
19
+ lineEnd(): void;
20
+ /** The TeX is complete: the door draws it in its place, or it stays as written. */
21
+ close(): void;
22
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The door for math: `$…$` in a line, and `$$…$$` and ```` ```math ```` blocks. The TeX shows as it arrives; once it
3
+ * is complete the door draws it, and the element it gives (KaTeX's, MathJax's) takes its place as it is. `null` keeps
4
+ * the TeX as written. Without a door, `$` is text.
5
+ *
6
+ * @example
7
+ * const math: MathRenderer = {
8
+ * render(tex, display) {
9
+ * const host = document.createElement('span');
10
+ * katex.render(tex, host, { displayMode: display, throwOnError: false });
11
+ * return host;
12
+ * }
13
+ * };
14
+ */
15
+ export interface MathRenderer {
16
+ /** Draws `tex`: a block of its own when `display`, in the line otherwise. */
17
+ render(tex: string, display: boolean): Element | null;
18
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The address a link or an image may take: a relative one, `#…`, or one of `http:`, `https:`, `mailto:`, `tel:`.
3
+ * Anything else (`javascript:`, `data:`, `vbscript:` …) gives `null`, and the link stays text.
4
+ */
5
+ export declare function safeHref(url: string): string | null;
@@ -0,0 +1,7 @@
1
+ import type { ComponentBase } from '@motifx/core';
2
+ /** A text node of the markdown that grows: its value is written to the node once per write, not once per character. */
3
+ export declare class TextRun {
4
+ value: string;
5
+ readonly node: ComponentBase;
6
+ constructor(make: (run: TextRun) => ComponentBase);
7
+ }
@@ -44,6 +44,8 @@ export declare class MenuBar extends Control<HTMLDivElement, MenuBarProps> {
44
44
  set customizerKeyboard(value: Bind<boolean>);
45
45
  get customizer(): boolean;
46
46
  set customizer(value: Bind<boolean>);
47
+ get toolbarTargets(): boolean;
48
+ set toolbarTargets(value: Bind<boolean>);
47
49
  get mergeHost(): boolean;
48
50
  set mergeHost(value: Bind<boolean>);
49
51
  get mergeName(): string;
@@ -159,6 +161,8 @@ export declare class MenuBar extends Control<HTMLDivElement, MenuBarProps> {
159
161
  private takeCustomization;
160
162
  private remember;
161
163
  private customMenuOpening;
164
+ /** For an item that names a command: a line for each toolbar of the page that takes commands, to add it there or take it away. */
165
+ private sendCommands;
162
166
  private customCommands;
163
167
  /** Applies a change made from the menu, and puts focus back on its item, else on the first item of the open menu. */
164
168
  private changeByUser;
@@ -35,6 +35,12 @@ export interface MenuBarProps extends ControlProps {
35
35
  customizerKeyboard?: Bind<boolean>;
36
36
  /** The menu of the right button offers the customizer when `customizable` is on. The default is `true`. */
37
37
  customizer?: Bind<boolean>;
38
+ /**
39
+ * On an item that names a command, the menu of the right button offers to add the command to each toolbar of the page
40
+ * that takes commands (`Toolbar.customizable` and `acceptCommands`), or to take it away from one that shows it; also
41
+ * when `customizable` is off. The default is `true`.
42
+ */
43
+ toolbarTargets?: Bind<boolean>;
38
44
  /** The main bar of the page: other bars merge their items into it (`mergeInto`). The default is `false`. */
39
45
  mergeHost?: Bind<boolean>;
40
46
  /** The name of the main bar, when there are several. The default is `'main'`. */