@dcs-tech/ui 0.2.0 → 0.4.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 (445) hide show
  1. package/README.md +32 -6
  2. package/dist/ChartImageMenu-HILSfn5A.js +1115 -0
  3. package/dist/ChartView-Cehrcr05.js +1703 -0
  4. package/dist/SummaryChart-y27q_BBN.js +29 -0
  5. package/dist/SummaryImage-DDNEEu_K.js +18 -0
  6. package/dist/SummarySeeAll-0dX-_LFe.js +101 -0
  7. package/dist/defaults-DL745PK1.js +708 -0
  8. package/dist/exportContext-CdpsOzE8.js +235 -0
  9. package/dist/exportEngine-DL-jEXFU.js +890 -0
  10. package/dist/geometry-CG2nOEnw.js +1796 -0
  11. package/dist/index.js +23238 -15993
  12. package/dist/scrollArea-CkPGDYH2.js +210 -0
  13. package/dist/style.css +1 -1
  14. package/dist/summaryChartData-Djo73zb8.js +81 -0
  15. package/dist/types/components/AppBar/AppBar.d.ts +16 -0
  16. package/dist/types/components/ArrowKeyFocus/useArrowKeyFocus.d.ts +10 -0
  17. package/dist/types/components/Avatar/Avatar.d.ts +22 -0
  18. package/dist/types/{shared-web-ui/src → components}/Badge/Badge.d.ts +0 -11
  19. package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +18 -0
  20. package/dist/types/{shared-web-ui/src → components}/Button/Button.d.ts +1 -1
  21. package/dist/types/{shared-web-ui/src → components}/Button/ButtonGroup.d.ts +1 -1
  22. package/dist/types/{shared-web-ui/src → components}/Button/ButtonGroupContext.d.ts +1 -1
  23. package/dist/types/{shared-web-ui/src → components}/Button/index.d.ts +1 -1
  24. package/dist/types/components/Card/Card.d.ts +17 -0
  25. package/dist/types/components/Charts/AnchoredMenu.d.ts +17 -0
  26. package/dist/types/components/Charts/BarList.d.ts +12 -0
  27. package/dist/types/components/Charts/CalendarHeatmap.d.ts +17 -0
  28. package/dist/types/components/Charts/Chart.d.ts +20 -0
  29. package/dist/types/components/Charts/ChartIcon.d.ts +5 -0
  30. package/dist/types/components/Charts/ChartImageMenu.d.ts +4 -0
  31. package/dist/types/components/Charts/ChartTable.d.ts +8 -0
  32. package/dist/types/components/Charts/ChartTooltip.d.ts +58 -0
  33. package/dist/types/components/Charts/ChartView.d.ts +15 -0
  34. package/dist/types/components/Charts/ColumnChart.d.ts +15 -0
  35. package/dist/types/components/Charts/Donut.d.ts +14 -0
  36. package/dist/types/components/Charts/Funnel.d.ts +10 -0
  37. package/dist/types/components/Charts/Gauge.d.ts +15 -0
  38. package/dist/types/components/Charts/Legend.d.ts +6 -0
  39. package/dist/types/components/Charts/LineChart.d.ts +13 -0
  40. package/dist/types/components/Charts/NumberTrend.d.ts +21 -0
  41. package/dist/types/components/Charts/Progress.d.ts +12 -0
  42. package/dist/types/components/Charts/StackedBar.d.ts +11 -0
  43. package/dist/types/components/Charts/Treemap.d.ts +12 -0
  44. package/dist/types/components/Charts/chartData.d.ts +69 -0
  45. package/dist/types/components/Charts/chartImage.d.ts +121 -0
  46. package/dist/types/components/Charts/geometry.d.ts +180 -0
  47. package/dist/types/components/Charts/index.d.ts +32 -0
  48. package/dist/types/components/Charts/labels.d.ts +46 -0
  49. package/dist/types/components/Charts/menuPlacement.d.ts +25 -0
  50. package/dist/types/components/Charts/palette.d.ts +81 -0
  51. package/dist/types/components/Charts/parts.d.ts +25 -0
  52. package/dist/types/components/Charts/pointer.d.ts +41 -0
  53. package/dist/types/components/Charts/types.d.ts +51 -0
  54. package/dist/types/components/Charts/ui.d.ts +3 -0
  55. package/dist/types/components/Charts/useBoxSize.d.ts +6 -0
  56. package/dist/types/components/Charts/useLegendFit.d.ts +1 -0
  57. package/dist/types/components/Charts/useUiScale.d.ts +1 -0
  58. package/dist/types/{shared-web-ui/src → components}/Checkbox/Checkbox.d.ts +1 -1
  59. package/dist/types/{shared-web-ui/src → components}/Checkbox/CheckboxGroup.d.ts +1 -1
  60. package/dist/types/{shared-web-ui/src → components}/Checkbox/CheckboxGroupContext.d.ts +1 -1
  61. package/dist/types/{shared-web-ui/src → components}/Checkbox/index.d.ts +1 -1
  62. package/dist/types/{shared-web-ui/src → components}/ChipInput/ChipInput.d.ts +1 -1
  63. package/dist/types/{shared-web-ui/src → components}/ChipInput/index.d.ts +2 -2
  64. package/dist/types/{shared-web-ui/src → components}/ChipInput/useChipSuggestions.d.ts +1 -1
  65. package/dist/types/{shared-web-ui/src → components}/Collapsible/Collapsible.d.ts +1 -1
  66. package/dist/types/{shared-web-ui/src → components}/Collapsible/CollapsibleContext.d.ts +1 -1
  67. package/dist/types/{shared-web-ui/src → components}/Collapsible/CollapsibleItem.d.ts +1 -3
  68. package/dist/types/{shared-web-ui/src → components}/Collapsible/index.d.ts +1 -1
  69. package/dist/types/components/ColorSchemeSelect/ColorSchemeSelect.d.ts +11 -0
  70. package/dist/types/components/CommandPalette/CommandPalette.d.ts +25 -0
  71. package/dist/types/components/DataTable/DataTable.d.ts +16 -0
  72. package/dist/types/components/DataTable/DataTable.storyData.d.ts +23 -0
  73. package/dist/types/components/DataTable/DisplayPopover.d.ts +22 -0
  74. package/dist/types/components/DataTable/HeaderMenu.d.ts +31 -0
  75. package/dist/types/components/DataTable/ManageModal.d.ts +31 -0
  76. package/dist/types/components/DataTable/PressButton.d.ts +2 -0
  77. package/dist/types/components/DataTable/SingleRowView.d.ts +9 -0
  78. package/dist/types/components/DataTable/SortModal.d.ts +16 -0
  79. package/dist/types/components/DataTable/StatusRow.d.ts +49 -0
  80. package/dist/types/components/DataTable/TableColumnModal.d.ts +18 -0
  81. package/dist/types/components/DataTable/TableControls.d.ts +48 -0
  82. package/dist/types/components/DataTable/TablePagination.d.ts +38 -0
  83. package/dist/types/components/DataTable/TableScrollStrip.d.ts +2 -0
  84. package/dist/types/components/DataTable/TableToolbar.d.ts +69 -0
  85. package/dist/types/components/DataTable/TableView.d.ts +61 -0
  86. package/dist/types/components/DataTable/bulk/BulkConfirmDialog.d.ts +13 -0
  87. package/dist/types/components/DataTable/bulk/TableToast.d.ts +13 -0
  88. package/dist/types/components/DataTable/bulk/bulkActions.d.ts +23 -0
  89. package/dist/types/components/DataTable/cards/CardFieldsEditor.d.ts +16 -0
  90. package/dist/types/components/DataTable/cards/CardView.d.ts +50 -0
  91. package/dist/types/components/DataTable/cards/cardFields.d.ts +32 -0
  92. package/dist/types/components/DataTable/cards/rowParts.d.ts +38 -0
  93. package/dist/types/components/DataTable/data/useServerData.d.ts +28 -0
  94. package/dist/types/components/DataTable/defaults.d.ts +18 -0
  95. package/dist/types/components/DataTable/detail/BuiltInDetail.d.ts +10 -0
  96. package/dist/types/components/DataTable/detail/DetailHost.d.ts +13 -0
  97. package/dist/types/components/DataTable/export/ExportPopover.d.ts +18 -0
  98. package/dist/types/components/DataTable/export/ExportPreviewModal.d.ts +11 -0
  99. package/dist/types/components/DataTable/export/ExportSettingsModal.d.ts +31 -0
  100. package/dist/types/components/DataTable/export/ExportTemplateCards.d.ts +19 -0
  101. package/dist/types/components/DataTable/export/exportContext.d.ts +10 -0
  102. package/dist/types/components/DataTable/export/exportEngine.d.ts +77 -0
  103. package/dist/types/components/DataTable/export/exportRows.d.ts +10 -0
  104. package/dist/types/components/DataTable/export/templateDisplay.d.ts +7 -0
  105. package/dist/types/components/DataTable/export/templateOptions.d.ts +6 -0
  106. package/dist/types/components/DataTable/export/useTableExport.d.ts +53 -0
  107. package/dist/types/components/DataTable/filters/ColumnFilterPopover.d.ts +14 -0
  108. package/dist/types/components/DataTable/filters/FilterChips.d.ts +9 -0
  109. package/dist/types/components/DataTable/filters/FilterConditionRow.d.ts +11 -0
  110. package/dist/types/components/DataTable/filters/FilterGroup.d.ts +12 -0
  111. package/dist/types/components/DataTable/filters/FilterModal.d.ts +14 -0
  112. package/dist/types/components/DataTable/filters/FilterRow.d.ts +20 -0
  113. package/dist/types/components/DataTable/filters/columnFilterModel.d.ts +29 -0
  114. package/dist/types/components/DataTable/filters/filterEngine.d.ts +16 -0
  115. package/dist/types/components/DataTable/filters/filterRowModel.d.ts +28 -0
  116. package/dist/types/components/DataTable/filters/quickFilterMatch.d.ts +3 -0
  117. package/dist/types/components/DataTable/grouping/GroupUi.d.ts +36 -0
  118. package/dist/types/components/DataTable/grouping/groupModel.d.ts +82 -0
  119. package/dist/types/components/DataTable/grouping/useGrouping.d.ts +39 -0
  120. package/dist/types/components/DataTable/host.d.ts +14 -0
  121. package/dist/types/components/DataTable/index.d.ts +18 -0
  122. package/dist/types/components/DataTable/keyboard/ShortcutsDialog.d.ts +14 -0
  123. package/dist/types/components/DataTable/keyboard/shortcuts.d.ts +22 -0
  124. package/dist/types/components/DataTable/keyboard/useGridKeyboard.d.ts +48 -0
  125. package/dist/types/components/DataTable/labels.d.ts +618 -0
  126. package/dist/types/components/DataTable/layout/LayoutSwitcher.d.ts +9 -0
  127. package/dist/types/components/DataTable/layout/layouts.d.ts +20 -0
  128. package/dist/types/components/DataTable/layout/scrollArea.d.ts +2 -0
  129. package/dist/types/components/DataTable/layout/useFillHeight.d.ts +11 -0
  130. package/dist/types/components/DataTable/menu/RowMenu.d.ts +56 -0
  131. package/dist/types/components/DataTable/menu/buildRowMenu.d.ts +35 -0
  132. package/dist/types/components/DataTable/menu/clipboard.d.ts +4 -0
  133. package/dist/types/components/DataTable/menu/layers.d.ts +1 -0
  134. package/dist/types/components/DataTable/menu/valueFilter.d.ts +15 -0
  135. package/dist/types/components/DataTable/motion/useRowMotion.d.ts +32 -0
  136. package/dist/types/components/DataTable/persistence/adapters.d.ts +6 -0
  137. package/dist/types/components/DataTable/persistence/reconcile.d.ts +64 -0
  138. package/dist/types/components/DataTable/persistence/useColumnPersistence.d.ts +51 -0
  139. package/dist/types/components/DataTable/persistence/useManagePrefs.d.ts +23 -0
  140. package/dist/types/components/DataTable/persistence/useOrphanPrefs.d.ts +3 -0
  141. package/dist/types/components/DataTable/pinning.d.ts +10 -0
  142. package/dist/types/components/DataTable/rows/PressRow.d.ts +7 -0
  143. package/dist/types/components/DataTable/rows/RowActions.d.ts +15 -0
  144. package/dist/types/components/DataTable/rows/rowPress.d.ts +35 -0
  145. package/dist/types/components/DataTable/sharing/Sharing.d.ts +21 -0
  146. package/dist/types/components/DataTable/split/SplitView.d.ts +29 -0
  147. package/dist/types/components/DataTable/summary/ManageSummaryCards.d.ts +18 -0
  148. package/dist/types/components/DataTable/summary/SummaryChart.d.ts +11 -0
  149. package/dist/types/components/DataTable/summary/SummaryControls.d.ts +33 -0
  150. package/dist/types/components/DataTable/summary/SummaryImage.d.ts +12 -0
  151. package/dist/types/components/DataTable/summary/SummarySeeAll.d.ts +17 -0
  152. package/dist/types/components/DataTable/summary/TableSummary.d.ts +34 -0
  153. package/dist/types/components/DataTable/summary/summaryCatalogue.d.ts +64 -0
  154. package/dist/types/components/DataTable/summary/summaryChartData.d.ts +9 -0
  155. package/dist/types/components/DataTable/summary/summaryModel.d.ts +152 -0
  156. package/dist/types/components/DataTable/summary/summaryWidth.d.ts +22 -0
  157. package/dist/types/components/DataTable/summary/useTableSummary.d.ts +18 -0
  158. package/dist/types/components/DataTable/types.d.ts +1145 -0
  159. package/dist/types/components/DataTable/ui-local/AutoHeight.d.ts +9 -0
  160. package/dist/types/components/DataTable/ui-local/DateRangePicker.d.ts +16 -0
  161. package/dist/types/components/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +4 -0
  162. package/dist/types/components/DataTable/ui-local/DragAndDropList/index.d.ts +3 -0
  163. package/dist/types/components/DataTable/ui-local/DragAndDropList/types.d.ts +70 -0
  164. package/dist/types/components/DataTable/ui-local/ReactModal.d.ts +20 -0
  165. package/dist/types/components/DataTable/ui-local/scrollLock.d.ts +1 -0
  166. package/dist/types/components/DataTable/ui.d.ts +13 -0
  167. package/dist/types/components/DataTable/useDataChangeTracker.d.ts +11 -0
  168. package/dist/types/components/DataTable/useTable.d.ts +12 -0
  169. package/dist/types/components/DataTable/vendor/columnOrder.d.ts +1 -0
  170. package/dist/types/components/DataTable/vendor/diff.d.ts +5 -0
  171. package/dist/types/components/DataTable/vendor/fileActions.d.ts +19 -0
  172. package/dist/types/components/DataTable/vendor/index.d.ts +3 -0
  173. package/dist/types/components/DataTable/virtual/useVirtualLines.d.ts +27 -0
  174. package/dist/types/components/DatePicker/Calendar.d.ts +14 -0
  175. package/dist/types/components/DatePicker/DatePicker.d.ts +5 -0
  176. package/dist/types/components/DatePicker/TimeField.d.ts +16 -0
  177. package/dist/types/components/DatePicker/index.d.ts +4 -0
  178. package/dist/types/components/DatePicker/useOneMonthPane.d.ts +2 -0
  179. package/dist/types/components/Dialog/Dialog.d.ts +56 -0
  180. package/dist/types/components/Dialog/DialogHost.d.ts +44 -0
  181. package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +49 -0
  182. package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTable.d.ts +1 -6
  183. package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTableActions.d.ts +1 -1
  184. package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTableCell.d.ts +2 -20
  185. package/dist/types/components/EditableTable/EditableTableRow.d.ts +14 -0
  186. package/dist/types/components/EditableTable/EditableTableSummary.d.ts +11 -0
  187. package/dist/types/{shared-web-ui/src → components}/EditableTable/index.d.ts +1 -1
  188. package/dist/types/{shared-web-ui/src → components}/EditableTable/useEditableTable.d.ts +3 -3
  189. package/dist/types/components/EditableTable/useRowAnimation.d.ts +12 -0
  190. package/dist/types/components/FieldContext/FieldContext.d.ts +3 -0
  191. package/dist/types/components/FieldContext/FieldProvider.d.ts +4 -0
  192. package/dist/types/{shared-web-ui/src → components}/FieldContext/index.d.ts +1 -1
  193. package/dist/types/{shared-web-ui/src → components}/FieldContext/useField.d.ts +2 -29
  194. package/dist/types/components/FieldContext/useFieldSurface.d.ts +34 -0
  195. package/dist/types/{shared-web-ui/src → components}/FieldContext/useFormKeyboard.d.ts +1 -4
  196. package/dist/types/{shared-web-ui/src → components}/FieldWrapper/FieldWrapper.d.ts +1 -1
  197. package/dist/types/{shared-web-ui/src → components}/FieldWrapper/index.d.ts +1 -1
  198. package/dist/types/{shared-web-ui/src → components}/Fields/Field.d.ts +1 -1
  199. package/dist/types/components/Fields/FieldButton.d.ts +17 -0
  200. package/dist/types/{shared-web-ui/src → components}/Fields/Fields.d.ts +1 -1
  201. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldBlur.d.ts +1 -1
  202. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldChange.d.ts +1 -1
  203. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldCondition.d.ts +1 -1
  204. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldDisabled.d.ts +1 -1
  205. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldRender.d.ts +1 -1
  206. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldSelect.d.ts +1 -1
  207. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldValidation.d.ts +1 -1
  208. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldValue.d.ts +1 -1
  209. package/dist/types/{shared-web-ui/src → components}/Fields/index.d.ts +1 -1
  210. package/dist/types/components/Floating/index.d.ts +3 -0
  211. package/dist/types/components/Floating/layers.d.ts +4 -0
  212. package/dist/types/components/Floating/scrollLock.d.ts +2 -0
  213. package/dist/types/components/Floating/useFloatingLayer.d.ts +20 -0
  214. package/dist/types/{shared-web-ui/src → components}/Form/Form.d.ts +1 -1
  215. package/dist/types/{shared-web-ui/src → components}/Form/index.d.ts +1 -1
  216. package/dist/types/components/Image/ImagePicker.d.ts +23 -0
  217. package/dist/types/components/Image/ImageStrip.d.ts +13 -0
  218. package/dist/types/components/Image/ImageViewer.d.ts +16 -0
  219. package/dist/types/components/Image/index.d.ts +8 -0
  220. package/dist/types/components/Image/prepareImage.d.ts +19 -0
  221. package/dist/types/{shared-web-ui/src → components}/Input/Input.d.ts +1 -1
  222. package/dist/types/{shared-web-ui/src → components}/Input/index.d.ts +1 -1
  223. package/dist/types/components/Popover/Popover.d.ts +25 -0
  224. package/dist/types/components/Popover/floatingPosition.d.ts +17 -0
  225. package/dist/types/components/Press/index.d.ts +2 -0
  226. package/dist/types/components/Press/usePress.d.ts +9 -0
  227. package/dist/types/{shared-web-ui/src → components}/Radio/Radio.d.ts +1 -1
  228. package/dist/types/{shared-web-ui/src → components}/Radio/RadioGroup.d.ts +1 -1
  229. package/dist/types/{shared-web-ui/src → components}/Radio/RadioGroupContext.d.ts +1 -1
  230. package/dist/types/{shared-web-ui/src → components}/Radio/index.d.ts +1 -1
  231. package/dist/types/components/Scroll/ScrollRule.d.ts +2 -0
  232. package/dist/types/components/Scroll/ScrollStrip.d.ts +9 -0
  233. package/dist/types/components/Scroll/index.d.ts +4 -0
  234. package/dist/types/components/Scroll/labels.d.ts +5 -0
  235. package/dist/types/components/Scroll/scrollActivity.d.ts +14 -0
  236. package/dist/types/components/Scroll/ui.d.ts +1 -0
  237. package/dist/types/{shared-web-ui/src → components}/Select/Select.d.ts +1 -1
  238. package/dist/types/{shared-web-ui/src → components}/Select/index.d.ts +1 -1
  239. package/dist/types/components/Select/useSelect.d.ts +2 -0
  240. package/dist/types/components/Sidebar/Sidebar.d.ts +24 -0
  241. package/dist/types/components/Skeleton/Skeleton.d.ts +18 -0
  242. package/dist/types/components/Stepper/Stepper.d.ts +17 -0
  243. package/dist/types/components/Stepper/index.d.ts +2 -0
  244. package/dist/types/{shared-web-ui/src → components}/Suggest/Suggest.d.ts +1 -1
  245. package/dist/types/{shared-web-ui/src → components}/Suggest/SuggestionList.d.ts +1 -1
  246. package/dist/types/{shared-web-ui/src → components}/Suggest/index.d.ts +2 -2
  247. package/dist/types/{shared-web-ui/src → components}/Suggest/searchFilters.d.ts +1 -1
  248. package/dist/types/{shared-web-ui/src → components}/Suggest/useSuggest.d.ts +1 -1
  249. package/dist/types/{shared-web-ui/src → components}/Switch/Switch.d.ts +1 -1
  250. package/dist/types/{shared-web-ui/src → components}/Switch/index.d.ts +1 -1
  251. package/dist/types/components/Tabs/Tabs.d.ts +36 -0
  252. package/dist/types/components/Toast/ToastHost.d.ts +8 -0
  253. package/dist/types/components/Toast/ToastItem.d.ts +10 -0
  254. package/dist/types/{shared-web-ui/src → components}/Toast/toast.types.d.ts +0 -13
  255. package/dist/types/components/Tooltip/Tooltip.d.ts +9 -0
  256. package/dist/types/components/Tooltip/useTooltip.d.ts +15 -0
  257. package/dist/types/{shared-web-ui/src → components}/Typography/Typography.d.ts +1 -1
  258. package/dist/types/{shared-web-ui/src → components}/Typography/index.d.ts +1 -1
  259. package/dist/types/components/UIProvider/UIPortalContext.d.ts +2 -0
  260. package/dist/types/components/UIProvider/UIProvider.d.ts +13 -0
  261. package/dist/types/components/UIProvider/UIThemeContext.d.ts +9 -0
  262. package/dist/types/core/hooks/index.d.ts +3 -0
  263. package/dist/types/core/hooks/useDebounced.d.ts +7 -0
  264. package/dist/types/core/hooks/usePresence.d.ts +5 -0
  265. package/dist/types/{shared-logic/src/ui → core/logic}/button.logic.d.ts +1 -1
  266. package/dist/types/core/logic/cellRules.logic.d.ts +32 -0
  267. package/dist/types/{shared-logic/src/ui → core/logic}/chipinput.logic.d.ts +1 -13
  268. package/dist/types/{shared-logic/src/ui → core/logic}/collapsible.logic.d.ts +1 -8
  269. package/dist/types/{shared-logic/src/ui → core/logic}/colorScheme.d.ts +0 -14
  270. package/dist/types/core/logic/columnOrder.logic.d.ts +1 -0
  271. package/dist/types/core/logic/datePicker.logic.d.ts +136 -0
  272. package/dist/types/core/logic/displayOrder.logic.d.ts +4 -0
  273. package/dist/types/{shared-logic/src/ui → core/logic}/editableTable.logic.d.ts +5 -28
  274. package/dist/types/core/logic/fieldControl.logic.d.ts +12 -0
  275. package/dist/types/{shared-logic/src/ui → core/logic}/fieldWrapper.logic.d.ts +1 -1
  276. package/dist/types/{shared-logic/src/ui → core/logic}/fields.logic.d.ts +1 -1
  277. package/dist/types/{shared-logic/src/ui → core/logic}/form.logic.d.ts +0 -8
  278. package/dist/types/core/logic/index.d.ts +33 -0
  279. package/dist/types/core/logic/keyboard.logic.d.ts +12 -0
  280. package/dist/types/core/logic/motion.logic.d.ts +1 -0
  281. package/dist/types/core/logic/navigation.logic.d.ts +6 -0
  282. package/dist/types/core/logic/popover.logic.d.ts +59 -0
  283. package/dist/types/core/logic/popupList.logic.d.ts +19 -0
  284. package/dist/types/core/logic/press.logic.d.ts +14 -0
  285. package/dist/types/core/logic/quickAddGrid.logic.d.ts +183 -0
  286. package/dist/types/core/logic/select.logic.d.ts +17 -0
  287. package/dist/types/core/logic/stepper.logic.d.ts +6 -0
  288. package/dist/types/{shared-logic/src/ui → core/logic}/suggest.logic.d.ts +1 -1
  289. package/dist/types/core/logic/tableLayout.logic.d.ts +13 -0
  290. package/dist/types/{shared-logic/src/ui → core/logic}/tableSummary.logic.d.ts +1 -20
  291. package/dist/types/core/logic/timeField.logic.d.ts +26 -0
  292. package/dist/types/core/logic/tooltip.logic.d.ts +11 -0
  293. package/dist/types/{shared-logic/src/ui → core/logic}/typography.logic.d.ts +1 -1
  294. package/dist/types/core/logic/uiScale.logic.d.ts +1 -0
  295. package/dist/types/core/logic/useMergeRefs.d.ts +2 -0
  296. package/dist/types/{shared-types/src/ui → core/types}/button.types.d.ts +1 -11
  297. package/dist/types/{shared-types/src/ui → core/types}/checkbox.types.d.ts +0 -4
  298. package/dist/types/{shared-types/src/ui → core/types}/chipinput.types.d.ts +0 -10
  299. package/dist/types/{shared-types/src/ui → core/types}/collapsible.types.d.ts +0 -18
  300. package/dist/types/core/types/common.types.d.ts +3 -0
  301. package/dist/types/core/types/control.types.d.ts +36 -0
  302. package/dist/types/core/types/datePicker.types.d.ts +46 -0
  303. package/dist/types/{shared-types/src/ui → core/types}/editableTable.types.d.ts +0 -79
  304. package/dist/types/core/types/field.types.d.ts +80 -0
  305. package/dist/types/{shared-types/src/ui → core/types}/fieldWrapper.types.d.ts +0 -10
  306. package/dist/types/{shared-types/src/ui → core/types}/fields.types.d.ts +0 -45
  307. package/dist/types/{shared-types/src/ui → core/types}/form.types.d.ts +0 -30
  308. package/dist/types/core/types/index.d.ts +22 -0
  309. package/dist/types/{shared-types/src/ui → core/types}/input.types.d.ts +0 -4
  310. package/dist/types/core/types/keyboard.types.d.ts +48 -0
  311. package/dist/types/core/types/navigation.types.d.ts +13 -0
  312. package/dist/types/{shared-types/src/ui → core/types}/radio.types.d.ts +0 -6
  313. package/dist/types/{shared-types/src/ui → core/types}/select.types.d.ts +0 -41
  314. package/dist/types/{shared-types/src/ui → core/types}/suggest.types.d.ts +1 -10
  315. package/dist/types/{shared-types/src/ui → core/types}/switch.types.d.ts +0 -4
  316. package/dist/types/{shared-types/src/ui → core/types}/table.types.d.ts +0 -59
  317. package/dist/types/core/types/tooltip.types.d.ts +43 -0
  318. package/dist/types/{shared-types/src/ui → core/types}/typography.types.d.ts +0 -4
  319. package/dist/types/index.d.ts +86 -0
  320. package/package.json +27 -26
  321. package/dist/types/published/dcs-ui/src/index.d.ts +0 -32
  322. package/dist/types/published/dcs-ui/src/publicLogic.d.ts +0 -35
  323. package/dist/types/published/dcs-ui/src/publicTypes.d.ts +0 -14
  324. package/dist/types/shared-logic/src/report/aggregate.d.ts +0 -29
  325. package/dist/types/shared-logic/src/report/canvas.d.ts +0 -106
  326. package/dist/types/shared-logic/src/report/conditions.d.ts +0 -18
  327. package/dist/types/shared-logic/src/report/constants.d.ts +0 -46
  328. package/dist/types/shared-logic/src/report/dataset.d.ts +0 -49
  329. package/dist/types/shared-logic/src/report/edit.d.ts +0 -188
  330. package/dist/types/shared-logic/src/report/fields.d.ts +0 -80
  331. package/dist/types/shared-logic/src/report/format.d.ts +0 -27
  332. package/dist/types/shared-logic/src/report/fromColumns.d.ts +0 -61
  333. package/dist/types/shared-logic/src/report/index.d.ts +0 -19
  334. package/dist/types/shared-logic/src/report/layout.d.ts +0 -85
  335. package/dist/types/shared-logic/src/report/metrics.d.ts +0 -62
  336. package/dist/types/shared-logic/src/report/migrate.d.ts +0 -77
  337. package/dist/types/shared-logic/src/report/paginate.d.ts +0 -40
  338. package/dist/types/shared-logic/src/report/renderers/html.d.ts +0 -29
  339. package/dist/types/shared-logic/src/report/renderers/pdfmake.d.ts +0 -45
  340. package/dist/types/shared-logic/src/report/resolve.d.ts +0 -40
  341. package/dist/types/shared-logic/src/report/scope.d.ts +0 -52
  342. package/dist/types/shared-logic/src/report/storage.d.ts +0 -112
  343. package/dist/types/shared-logic/src/report/validate.d.ts +0 -28
  344. package/dist/types/shared-logic/src/ui/cellRules.logic.d.ts +0 -67
  345. package/dist/types/shared-logic/src/ui/columnOrder.logic.d.ts +0 -12
  346. package/dist/types/shared-logic/src/ui/fieldControl.logic.d.ts +0 -24
  347. package/dist/types/shared-logic/src/ui/index.d.ts +0 -55
  348. package/dist/types/shared-logic/src/ui/keyboard.logic.d.ts +0 -72
  349. package/dist/types/shared-logic/src/ui/navigation.logic.d.ts +0 -30
  350. package/dist/types/shared-logic/src/ui/popover.logic.d.ts +0 -57
  351. package/dist/types/shared-logic/src/ui/popupList.logic.d.ts +0 -54
  352. package/dist/types/shared-logic/src/ui/select.logic.d.ts +0 -31
  353. package/dist/types/shared-logic/src/ui/tableLayout.logic.d.ts +0 -47
  354. package/dist/types/shared-logic/src/ui/tooltip.logic.d.ts +0 -35
  355. package/dist/types/shared-logic/src/ui/useMergeRefs.d.ts +0 -10
  356. package/dist/types/shared-types/src/report/bands.d.ts +0 -32
  357. package/dist/types/shared-types/src/report/blocks.d.ts +0 -181
  358. package/dist/types/shared-types/src/report/conditions.d.ts +0 -24
  359. package/dist/types/shared-types/src/report/dataset.d.ts +0 -106
  360. package/dist/types/shared-types/src/report/document.d.ts +0 -201
  361. package/dist/types/shared-types/src/report/index.d.ts +0 -9
  362. package/dist/types/shared-types/src/report/primitives.d.ts +0 -109
  363. package/dist/types/shared-types/src/report/registry.d.ts +0 -85
  364. package/dist/types/shared-types/src/report/storage.d.ts +0 -41
  365. package/dist/types/shared-types/src/report/template.d.ts +0 -92
  366. package/dist/types/shared-types/src/ui/common.types.d.ts +0 -14
  367. package/dist/types/shared-types/src/ui/control.types.d.ts +0 -133
  368. package/dist/types/shared-types/src/ui/field.types.d.ts +0 -200
  369. package/dist/types/shared-types/src/ui/index.d.ts +0 -37
  370. package/dist/types/shared-types/src/ui/keyboard.types.d.ts +0 -155
  371. package/dist/types/shared-types/src/ui/navigation.types.d.ts +0 -35
  372. package/dist/types/shared-types/src/ui/tooltip.types.d.ts +0 -68
  373. package/dist/types/shared-web-ui/src/AppBar/AppBar.d.ts +0 -25
  374. package/dist/types/shared-web-ui/src/ArrowKeyFocus/useArrowKeyFocus.d.ts +0 -29
  375. package/dist/types/shared-web-ui/src/Avatar/Avatar.d.ts +0 -36
  376. package/dist/types/shared-web-ui/src/Breadcrumbs/Breadcrumbs.d.ts +0 -70
  377. package/dist/types/shared-web-ui/src/Card/Card.d.ts +0 -33
  378. package/dist/types/shared-web-ui/src/ColorSchemeSelect/ColorSchemeSelect.d.ts +0 -26
  379. package/dist/types/shared-web-ui/src/CommandPalette/CommandPalette.d.ts +0 -52
  380. package/dist/types/shared-web-ui/src/Dialog/Dialog.d.ts +0 -101
  381. package/dist/types/shared-web-ui/src/Dialog/DialogHost.d.ts +0 -80
  382. package/dist/types/shared-web-ui/src/DropdownMenu/DropdownMenu.d.ts +0 -49
  383. package/dist/types/shared-web-ui/src/EditableTable/EditableTableRow.d.ts +0 -25
  384. package/dist/types/shared-web-ui/src/EditableTable/EditableTableSummary.d.ts +0 -22
  385. package/dist/types/shared-web-ui/src/EditableTable/useRowAnimation.d.ts +0 -44
  386. package/dist/types/shared-web-ui/src/FieldContext/FieldContext.d.ts +0 -18
  387. package/dist/types/shared-web-ui/src/FieldContext/FieldProvider.d.ts +0 -13
  388. package/dist/types/shared-web-ui/src/FieldContext/useFieldSurface.d.ts +0 -57
  389. package/dist/types/shared-web-ui/src/Fields/FieldButton.d.ts +0 -32
  390. package/dist/types/shared-web-ui/src/Popover/Popover.d.ts +0 -44
  391. package/dist/types/shared-web-ui/src/ReportDesigner/AlignedRowsEditor.d.ts +0 -4
  392. package/dist/types/shared-web-ui/src/ReportDesigner/BandList.d.ts +0 -26
  393. package/dist/types/shared-web-ui/src/ReportDesigner/BlockEditor.d.ts +0 -44
  394. package/dist/types/shared-web-ui/src/ReportDesigner/ColumnEditor.d.ts +0 -2
  395. package/dist/types/shared-web-ui/src/ReportDesigner/ConditionEditor.d.ts +0 -7
  396. package/dist/types/shared-web-ui/src/ReportDesigner/FieldPicker.d.ts +0 -25
  397. package/dist/types/shared-web-ui/src/ReportDesigner/FieldSelect.d.ts +0 -2
  398. package/dist/types/shared-web-ui/src/ReportDesigner/FormatEditor.d.ts +0 -2
  399. package/dist/types/shared-web-ui/src/ReportDesigner/Inspector.d.ts +0 -14
  400. package/dist/types/shared-web-ui/src/ReportDesigner/OptionsEditor.d.ts +0 -2
  401. package/dist/types/shared-web-ui/src/ReportDesigner/ReportDesigner.d.ts +0 -34
  402. package/dist/types/shared-web-ui/src/ReportDesigner/StyleEditor.d.ts +0 -2
  403. package/dist/types/shared-web-ui/src/ReportDesigner/TableEditor.d.ts +0 -10
  404. package/dist/types/shared-web-ui/src/ReportDesigner/WatermarkEditor.d.ts +0 -2
  405. package/dist/types/shared-web-ui/src/ReportDesigner/chipSources.d.ts +0 -6
  406. package/dist/types/shared-web-ui/src/ReportDesigner/icons.d.ts +0 -21
  407. package/dist/types/shared-web-ui/src/ReportDesigner/index.d.ts +0 -16
  408. package/dist/types/shared-web-ui/src/ReportDesigner/labels.d.ts +0 -34
  409. package/dist/types/shared-web-ui/src/ReportDesigner/parts.d.ts +0 -63
  410. package/dist/types/shared-web-ui/src/ReportDesigner/types.d.ts +0 -106
  411. package/dist/types/shared-web-ui/src/ReportPreview/ReportPreview.d.ts +0 -44
  412. package/dist/types/shared-web-ui/src/ReportPreview/index.d.ts +0 -1
  413. package/dist/types/shared-web-ui/src/Select/useSelect.d.ts +0 -2
  414. package/dist/types/shared-web-ui/src/Sidebar/Sidebar.d.ts +0 -55
  415. package/dist/types/shared-web-ui/src/Skeleton/Skeleton.d.ts +0 -33
  416. package/dist/types/shared-web-ui/src/Tabs/Tabs.d.ts +0 -79
  417. package/dist/types/shared-web-ui/src/Toast/ToastHost.d.ts +0 -22
  418. package/dist/types/shared-web-ui/src/Toast/ToastItem.d.ts +0 -19
  419. package/dist/types/shared-web-ui/src/Tooltip/Tooltip.d.ts +0 -25
  420. package/dist/types/shared-web-ui/src/Tooltip/useTooltip.d.ts +0 -24
  421. package/dist/types/shared-web-ui/src/UIProvider/UIPortalContext.d.ts +0 -16
  422. package/dist/types/shared-web-ui/src/UIProvider/UIProvider.d.ts +0 -54
  423. package/dist/types/shared-web-ui/src/UIProvider/UIThemeContext.d.ts +0 -17
  424. package/dist/types/shared-web-ui/src/index.d.ts +0 -78
  425. /package/dist/types/{shared-web-ui/src → components}/AppBar/index.d.ts +0 -0
  426. /package/dist/types/{shared-web-ui/src → components}/Avatar/index.d.ts +0 -0
  427. /package/dist/types/{shared-web-ui/src → components}/Badge/index.d.ts +0 -0
  428. /package/dist/types/{shared-web-ui/src → components}/Breadcrumbs/index.d.ts +0 -0
  429. /package/dist/types/{shared-web-ui/src → components}/Card/index.d.ts +0 -0
  430. /package/dist/types/{shared-web-ui/src → components}/ColorSchemeSelect/index.d.ts +0 -0
  431. /package/dist/types/{shared-web-ui/src → components}/CommandPalette/index.d.ts +0 -0
  432. /package/dist/types/{shared-web-ui/src → components}/Dialog/index.d.ts +0 -0
  433. /package/dist/types/{shared-web-ui/src → components}/DropdownMenu/index.d.ts +0 -0
  434. /package/dist/types/{shared-web-ui/src → components}/Popover/index.d.ts +0 -0
  435. /package/dist/types/{shared-web-ui/src → components}/Sidebar/index.d.ts +0 -0
  436. /package/dist/types/{shared-web-ui/src → components}/Skeleton/index.d.ts +0 -0
  437. /package/dist/types/{shared-web-ui/src → components}/Suggest/fuseSearch.d.ts +0 -0
  438. /package/dist/types/{shared-web-ui/src → components}/Tabs/index.d.ts +0 -0
  439. /package/dist/types/{shared-web-ui/src → components}/Toast/index.d.ts +0 -0
  440. /package/dist/types/{shared-web-ui/src → components}/Tooltip/index.d.ts +0 -0
  441. /package/dist/types/{shared-web-ui/src → components}/UIProvider/index.d.ts +0 -0
  442. /package/dist/types/{shared-logic/src/ui → core/logic}/checkbox.logic.d.ts +0 -0
  443. /package/dist/types/{shared-logic/src/ui → core/logic}/input.logic.d.ts +0 -0
  444. /package/dist/types/{shared-logic/src/ui → core/logic}/radio.logic.d.ts +0 -0
  445. /package/dist/types/{shared-logic/src/ui → core/logic}/switch.logic.d.ts +0 -0
@@ -1,85 +0,0 @@
1
- /**
2
- * Report engine — template + data → a measured, unpaged document.
3
- *
4
- * Every table is expanded here (a flowing table becomes its heading, one band per row, its section
5
- * rows and its closing rows), every placeholder substituted, every cell wrapped to its column width,
6
- * and every height measured. What comes out is flat: a list of things with a `heightPt`. Pagination
7
- * then has no decisions left to make except where to break.
8
- *
9
- * THE ENGINE OWNS THE COLUMN WIDTHS. It resolves them once and hands them to the renderer. That
10
- * is the whole reason this can be trusted where the old generators could not: they guessed at
11
- * what pdfmake would do with `'auto'` and `'*'`, pdfmake disagreed, and the page overflowed.
12
- * A renderer given explicit point widths has nothing to disagree about.
13
- */
14
- import type { ColumnSpec, LayoutBand, LayoutDocument, PageConfig, ReportContext, ReportRegistry, ReportTemplate, TextStyle } from '../../../published/dcs-ui/src/publicTypes';
15
- import { type GroupKey, type TableRow } from './dataset';
16
- import { type FormatLookup } from './resolve';
17
- import type { ResolveScope } from './scope';
18
- /** Cell padding, points. Matches what the existing PDF formats use, so converted output lines up. */
19
- export declare const CELL_PAD_X = 8;
20
- export declare const CELL_PAD_Y = 4;
21
- /**
22
- * Added to an `auto` column's measured width.
23
- *
24
- * An auto column is sized to exactly its widest value, so that value sits ON the boundary — and
25
- * the engine's width table and pdfmake's font disagree by thousandths of a point (measured: 0.0009pt
26
- * for `52051110`, 0.036pt for bold digits). When pdfmake's number is the larger one it breaks the
27
- * word: `12617%` printed as `12617` over `%`, a whole extra line the plan never saw. One point is
28
- * thirty times the largest error measured and invisible on paper.
29
- */
30
- export declare const AUTO_COLUMN_SLACK_PT = 1;
31
- export declare const pageContentSize: (page: PageConfig) => {
32
- widthPt: number;
33
- heightPt: number;
34
- };
35
- /**
36
- * A column as it prints. An ordinary column is itself; a `groupColumns` column becomes one of these
37
- * per group value, sharing the spec and carrying the value it prints.
38
- */
39
- export interface PlacedColumn {
40
- /** Unique among the printed columns: the spec's id, or `specId:groupKey`. */
41
- id: string;
42
- /** The template column it came from — what closing rows and heading groups name. */
43
- sourceId: string;
44
- spec: ColumnSpec;
45
- group?: GroupKey;
46
- }
47
- export declare const expandColumns: (columns: ColumnSpec[], groupKeys: GroupKey[]) => PlacedColumn[];
48
- /**
49
- * Resolves declared widths to points: numbers as given, `auto` to the widest content it must
50
- * hold, `*` sharing what is left. When the total overruns, `auto` and `*` columns shrink
51
- * proportionally rather than the table running off the paper.
52
- */
53
- export declare const resolveColumnWidths: (columns: PlacedColumn[], rows: TableRow[], available: number, scope: ResolveScope, lookup: FormatLookup, tableHeaderStyle?: TextStyle,
54
- /** Widest text anything else prints in each column — the rows closing a table. */
55
- alsoFits?: Array<number | undefined>) => number[];
56
- export interface LayoutOptions {
57
- /**
58
- * Room left unused at the foot of every page.
59
- *
60
- * The measurements here are close but not exact — pdfmake's own row height carries a ~0.02pt
61
- * rounding, and text outside ASCII is shaped by a font no character table can predict. Packed
62
- * to the very last point, a page that the engine believes fits by half a point spills, and the
63
- * renderer silently adds a page. Reserving a line absorbs that.
64
- *
65
- * Defaults to one line, or three when the document contains non-ASCII text.
66
- */
67
- safetyGapPt?: number;
68
- }
69
- export interface LayoutResult {
70
- document: LayoutDocument;
71
- /** Re-resolves the page bands for a given page, so `%page.number%` can be filled in late. */
72
- pageBandsFor: (number: number, count: number) => {
73
- header: LayoutBand[];
74
- footer: LayoutBand[];
75
- };
76
- }
77
- /** Print options with the template's defaults under whatever the app passed. */
78
- export declare const resolveOptions: (template: ReportTemplate, given?: Record<string, unknown>) => Record<string, unknown>;
79
- /**
80
- * `%page.count%` cannot be known before pagination, and pagination cannot start without knowing
81
- * how tall the page bands are. The way out is that a page number never changes a band's HEIGHT —
82
- * so the page bands are measured once with placeholder values and re-resolved per page for
83
- * content. `pageBandsFor` is that second pass.
84
- */
85
- export declare const layoutDocument: (template: ReportTemplate, context: ReportContext, registry: ReportRegistry, options?: LayoutOptions) => LayoutResult;
@@ -1,62 +0,0 @@
1
- /**
2
- * Report engine — text metrics.
3
- *
4
- * Page layout is impossible without knowing how tall a paragraph will be, and that cannot be
5
- * guessed from a characters-per-line constant: an item description that wraps to three lines
6
- * costs one row in a count and three times the height on paper. Every hand-written PDF format in
7
- * this codebase got that wrong at least once.
8
- *
9
- * DUPLICATION, ON PURPOSE. `apps/web/client/.../PDF/pdfMeasure.ts` carries the same character
10
- * table and line-height constants and is LIVE — it powers the A4 format-1 pagination fix. It is
11
- * deliberately left alone rather than re-pointed here, so a change to the engine can never move
12
- * a shipped invoice. What is shared is ~15 lines of measured font data; the rest of that file
13
- * walks pdfmake nodes, which this engine never sees. If the numbers below are ever recalibrated,
14
- * recalibrate both and re-run `npm run pagination`.
15
- */
16
- export declare const PT_PER_MM: number;
17
- export declare const mmToPt: (mm: number) => number;
18
- /** Paper sizes in points, portrait. */
19
- export declare const PAPER_SIZES_PT: Record<string, {
20
- width: number;
21
- height: number;
22
- }>;
23
- export declare const containsNonAscii: (text: string) => boolean;
24
- /** Height of one printed line. A line holding any CODE2000 glyph takes that font's taller box. */
25
- export declare const lineHeight: (fontSize?: number, uni?: boolean) => number;
26
- export declare const textWidth: (text: string, fontSize?: number, bold?: boolean) => number;
27
- /**
28
- * Wraps the way a PDF renderer does.
29
- *
30
- * Two rules, both verified against rendered output:
31
- *
32
- * 1. A chunk that cannot fit on a line of its own IS broken, character by character. This is easy
33
- * to get wrong in the safe-looking direction: `240.625` in a 32pt quantity column really does
34
- * become two lines, and assuming it bled past the cell edge under-measured every numeric
35
- * column narrow enough to matter.
36
- * 2. A line's trailing space does not count towards the limit, so a word that exactly fills the
37
- * column still fits.
38
- */
39
- export interface WrapResult {
40
- lines: string[];
41
- /**
42
- * True when shaped (non-ASCII) text had to be force-broken.
43
- *
44
- * It marks the one case a character-width model cannot predict: where a renderer may put its
45
- * break is decided by the shaper, not by advance widths, and it is reliably LESS efficient
46
- * than the theoretical minimum this computes. Callers measuring height add a line back.
47
- */
48
- forcedShapedBreak: boolean;
49
- }
50
- export declare const wrapToWidthDetailed: (text: string, maxWidth: number, fontSize?: number, bold?: boolean) => WrapResult;
51
- export declare const wrapToWidth: (text: string, maxWidth: number, fontSize?: number, bold?: boolean) => string[];
52
- /** Narrowest the text can be laid out without a chunk bleeding out. */
53
- export declare const minTextWidth: (text: string, fontSize?: number, bold?: boolean) => number;
54
- /**
55
- * Height of `text` wrapped to `maxWidth`, line by line, so a Tamil line costs its true box.
56
- *
57
- * One line is added back when shaped text had to be force-broken. That is not a fudge factor
58
- * sprayed over the page — it is attached to the single construct whose line count cannot be
59
- * derived from advance widths, and measured against rendered output it is what the renderer
60
- * actually costs. Without it a twelve-column Tamil report planned 38 pages and printed 47.
61
- */
62
- export declare const textHeight: (text: string, maxWidth: number, fontSize?: number, bold?: boolean) => number;
@@ -1,77 +0,0 @@
1
- /**
2
- * Quoin — bringing a stored template up to the current schema.
3
- *
4
- * The ladder is empty today, and that is exactly why it exists now. The moment a customer saves a
5
- * template, its shape is frozen for every customer: any later change to a field name, a default,
6
- * or the meaning of a value has to be applied to documents already stored. Adding
7
- * the mechanism afterwards means writing it while also writing the first migration, against data
8
- * that is already in production.
9
- *
10
- * HOW TO ADD A STEP
11
- * 1. Change the types in `@pdfinvoice/shared-types`.
12
- * 2. Bump `REPORT_SCHEMA_VERSION`.
13
- * 3. Append a `{ to, describe, apply }` entry below whose `apply` takes the previous shape and
14
- * returns the new one. It must be pure and total — it will run on documents you cannot see.
15
- * 4. Add a fixture of the OLD shape to the migration test. Never edit an existing fixture: it is
16
- * the only remaining evidence of what that version looked like.
17
- *
18
- * `apply` MUST TOLERATE A PARTIAL TEMPLATE — a key it wants may be absent, and it must then leave
19
- * it absent rather than inventing one. This is not defensive coding: a stored customer template is
20
- * a DIFF against a shipped seed (§8), and the ladder runs on that diff ALONE, before it meets the
21
- * seed. Migrating after the merge would re-apply the step to seed keys that are already current.
22
- */
23
- import type { ReportTemplate } from '../../../published/dcs-ui/src/publicTypes';
24
- export interface MigrationStep {
25
- /** The version this step produces. Steps run in ascending order of `to`. */
26
- to: number;
27
- /** One line, shown in logs so an upgrade is traceable. */
28
- describe: string;
29
- apply: (template: any) => any;
30
- }
31
- /**
32
- * Ordered oldest → newest. Empty while version 1 is the only version there has ever been.
33
- *
34
- * Example of what one looks like:
35
- *
36
- * ```ts
37
- * {
38
- * to: 2,
39
- * describe: 'columns.value may be a string or CellLine[]; wrap bare strings',
40
- * apply: (t) => ({ ...t, columns: t.columns.map((c: any) =>
41
- * typeof c.value === 'string' ? { ...c, value: [{ id: `${c.id}:l1`, content: c.value }] } : c) }),
42
- * }
43
- * ```
44
- */
45
- export declare const MIGRATIONS: MigrationStep[];
46
- /**
47
- * The version to assume when a stored diff carries none.
48
- *
49
- * Every write stamps one, so this only covers a document hand-edited in the console or written by
50
- * a build from before stamping existed. 1 is the only version there has ever been, and guessing
51
- * "current" instead would silently skip the whole ladder.
52
- */
53
- export declare const ASSUMED_SCHEMA_VERSION = 1;
54
- export interface MigrationResult {
55
- template: ReportTemplate;
56
- /** `describe` of each step applied, in order. Empty when the template was already current. */
57
- applied: string[];
58
- }
59
- /**
60
- * Runs every step between the template's version and the current one.
61
- *
62
- * A template from the FUTURE — saved by a newer build — is refused rather than guessed at.
63
- * Silently downgrading it would quietly discard whatever the newer version added, and the
64
- * customer would have no way to tell.
65
- */
66
- export declare const migrateTemplate: (raw: unknown) => MigrationResult;
67
- /**
68
- * The same ladder, run over a stored DIFF rather than a whole template.
69
- *
70
- * `raw` is a `Partial<ReportTemplate>` with no `schemaVersion` of its own — the version lives on
71
- * the entry around it, so it is passed in. See the contract at the top of this file for why every
72
- * step has to survive the missing keys.
73
- */
74
- export declare const migrateTemplatePart: (raw: Partial<ReportTemplate>, from: number) => {
75
- part: Partial<ReportTemplate>;
76
- applied: string[];
77
- };
@@ -1,40 +0,0 @@
1
- /**
2
- * Report engine — dealing measured bands onto pages.
3
- *
4
- * By the time anything gets here every band has a height, so this makes exactly one kind of
5
- * decision: does the next band fit on this page. That is the whole of the bug the hand-written
6
- * formats kept having — they decided it from a row count, which cannot see a description that
7
- * wraps to three lines.
8
- *
9
- * Two rules beyond "does it fit":
10
- *
11
- * - `keepTogether` moves a band whole to the next page rather than splitting it. A totals block
12
- * split across a page break is worse than a short page.
13
- * - A band taller than an entire page cannot be moved anywhere better, so it is SPLIT at a row
14
- * boundary and continued. Without that, one 300-line description would loop forever or run off
15
- * the paper — which is precisely what the old generators did before they were given
16
- * continuation rows.
17
- *
18
- * Every flowing table gets, per page, what v1 gave only its one main grid:
19
- *
20
- * - its HEADING before its first row on the page (on later pages only when the table repeats it),
21
- * and never a heading left alone at the foot of a page;
22
- * - its box CLOSED under its last row on the page — room for that line is reserved while dealing,
23
- * so closing can never push a page over;
24
- * - empty rows FILLING the space under it, so the box runs down to what follows.
25
- *
26
- * And the page footer is ANCHORED to the foot of the page by a spacer, rather than floating up
27
- * under the last line of content.
28
- */
29
- import type { LayoutBand, LayoutDocument, PagedDocument } from '../../../published/dcs-ui/src/publicTypes';
30
- export interface PaginateOptions {
31
- /**
32
- * Re-resolves page header/footer for a given page, so `%page.number%` and `%page.count%` can
33
- * be filled in once the count is known. `layoutDocument` returns exactly this function.
34
- */
35
- pageBandsFor?: (number: number, count: number) => {
36
- header: LayoutBand[];
37
- footer: LayoutBand[];
38
- };
39
- }
40
- export declare const paginate: (doc: LayoutDocument, opts?: PaginateOptions) => PagedDocument;
@@ -1,29 +0,0 @@
1
- /**
2
- * Quoin — paged document → HTML.
3
- *
4
- * Two jobs, and they are the same job: it is what the designer previews, and it is what a browser
5
- * prints. Building the preview on this rather than on pdfmake means the designer needs no PDF
6
- * toolchain, redraws instantly on every keystroke, and shows the reader exactly the geometry the
7
- * engine computed — the same page boxes, the same column widths, the same wrapped lines.
8
- *
9
- * Pure, and returns a string: no DOM, no React, so it runs in a test and on a server.
10
- *
11
- * Everything is positioned from the numbers already in the document. Nothing here decides a width
12
- * or re-wraps a line — if the preview and the PDF ever disagree, the renderer is at fault, not
13
- * the engine.
14
- */
15
- import type { PagedDocument } from '../../../../published/dcs-ui/src/publicTypes';
16
- export interface HtmlRenderOptions {
17
- /**
18
- * Draw the page edges and a shadow. On for a designer preview, off when the output is going
19
- * to a printer, which supplies its own paper.
20
- */
21
- pageChrome?: boolean;
22
- /** Space between pages in a preview, in points. Ignored when `pageChrome` is false. */
23
- pageGapPt?: number;
24
- /** Wrap the pages in a full HTML document rather than a fragment. */
25
- standalone?: boolean;
26
- /** Extra CSS, appended last. */
27
- css?: string;
28
- }
29
- export declare const renderToHtml: (doc: PagedDocument, options?: HtmlRenderOptions) => string;
@@ -1,45 +0,0 @@
1
- /**
2
- * Report engine — paged document → pdfmake docDefinition.
3
- *
4
- * Pure: a docDefinition is data, so this needs no pdfmake at build time and none at test time.
5
- * The app hands the result to the FileEngine, which owns the fonts and the blob.
6
- *
7
- * THE RENDERER MAKES NO LAYOUT DECISIONS. Widths arrive in points, text arrives already wrapped,
8
- * page breaks are already chosen. That is the point: every historic overflow in this codebase
9
- * came from a planner guessing what pdfmake would do with `'auto'` and `'*'` and pdfmake deciding
10
- * otherwise. Give pdfmake numbers and there is nothing left to disagree about.
11
- *
12
- * LINES ARE DRAWN ONLY WHERE THE LAYOUT PUT THEM. A table border adds height and width the planner
13
- * must count, and invisible height is the whole bug class this engine exists to remove. So nothing
14
- * here decides a line: a ruled row arrives with its `border` already in its measured height and its
15
- * cells' widths, and becomes a one-row table drawing exactly those lines. Every other table is drawn
16
- * with no lines at all.
17
- */
18
- import type { PagedDocument } from '../../../../published/dcs-ui/src/publicTypes';
19
- /** What pdfmake can and cannot do with this document, so callers can warn rather than discover. */
20
- export declare const PDFMAKE_CAPABILITIES: {
21
- readonly italic: true;
22
- readonly strike: true;
23
- readonly colour: true;
24
- /** pdfmake draws QR natively but has no barcode symbology — the value prints as text. */
25
- readonly barcode: false;
26
- readonly qr: true;
27
- readonly image: true;
28
- };
29
- export interface PdfMakeRenderOptions {
30
- /** Used only when the template draws no watermark of its own. */
31
- watermark?: {
32
- text: string;
33
- opacity?: number;
34
- color?: string;
35
- };
36
- defaultFontSize?: number;
37
- }
38
- /**
39
- * Turns a paged document into a docDefinition.
40
- *
41
- * Page bands are emitted INLINE, not through pdfmake's `header`/`footer` callbacks: the planner
42
- * already reserved their height in the content area, and pdfmake's callbacks draw into the page
43
- * margin, which would put them in a different place than the one that was measured.
44
- */
45
- export declare const renderToPdfMake: (doc: PagedDocument, opts?: PdfMakeRenderOptions) => any;
@@ -1,40 +0,0 @@
1
- /**
2
- * Report engine — turning template text into printed text.
3
- *
4
- * `%source.key%` substitution, per-placeholder formatting, and the `%agg.*%` calls. This is the
5
- * whole of the "language": there is no arithmetic, no conditionals inside text, no functions
6
- * beyond the fixed aggregates.
7
- */
8
- import type { PlaceholderFormat, PlaceholderFormats, ReportRegistry } from '../../../published/dcs-ui/src/publicTypes';
9
- import { type ResolveScope } from './scope';
10
- /**
11
- * A placeholder is `%<source>.<field>%` — the leading identifier and the dot are REQUIRED.
12
- *
13
- * Matching any `%...%` looked simpler and is wrong for a product non-developers author: "50% off,
14
- * GST% included" would be read as a placeholder called `off, GST` and reported as an error. Every
15
- * real placeholder has a dot (`row.x`, `page.x`, `agg.sum(row.x)`), so requiring one costs nothing
16
- * and makes a literal percent sign safe to type.
17
- */
18
- export declare const PLACEHOLDER: RegExp;
19
- /**
20
- * Field defaults from the registry, so a template that says nothing about formatting still gets
21
- * two decimals on money and `dd-mm-yyyy` on a date. Built once per table, not per placeholder.
22
- */
23
- export type FormatLookup = (path: string) => PlaceholderFormat | undefined;
24
- export declare const buildFormatLookup: (registry: ReportRegistry, rowSet?: string) => FormatLookup;
25
- export interface ResolveOptions {
26
- /** Per-placeholder overrides authored on the segment or cell line. */
27
- formats?: PlaceholderFormats;
28
- /** Registry defaults. */
29
- lookup?: FormatLookup;
30
- /** A format for every placeholder with none of its own — a column's, a cell's. Beats the registry. */
31
- format?: PlaceholderFormat;
32
- }
33
- /**
34
- * Substitutes every placeholder in `content`.
35
- *
36
- * An unresolvable placeholder renders as empty, not as the literal `%foo.bar%`. Printing the
37
- * token on a customer's invoice is worse than printing nothing, and validation is where a bad
38
- * path is supposed to be caught.
39
- */
40
- export declare const resolveText: (content: string, scope: ResolveScope, opts?: ResolveOptions) => string;
@@ -1,52 +0,0 @@
1
- /**
2
- * Report engine — what a placeholder can see.
3
- *
4
- * Every `%a.b%` in a template, and every condition rule, is resolved against one of these. Keeping
5
- * the lookup in a single function is what makes the addressable surface knowable — and therefore
6
- * what makes a field picker and a validator possible at all.
7
- */
8
- export type ScopeRow = Record<string, unknown>;
9
- /** One gathered value of a grouping row — a colour of an item — as a placeholder sees it. */
10
- export interface GroupScope {
11
- key: string;
12
- label: string;
13
- order: number;
14
- /** The fields of the rows it gathered: summed where the table said so, otherwise first-seen. */
15
- values: ScopeRow;
16
- /** The lookup row that named it, when the table has a lookup. */
17
- lookup?: ScopeRow;
18
- }
19
- export interface ResolveScope {
20
- /** Scalar bags declared as `SourceDef`s: `%business.name%`. */
21
- sources: Record<string, Record<string, unknown>>;
22
- /** The current table row: `%row.total%`. */
23
- row?: ScopeRow;
24
- /** The current group value: `%group.label%`, `%group.qty%`, `%group.lookup.name%`. */
25
- group?: GroupScope;
26
- /** Filled by the layout engine: `%page.number%`, `%page.count%`. */
27
- page?: {
28
- number: number;
29
- count: number;
30
- };
31
- /** Registry `computed` values, already evaluated: `%computed.isIgst%`. */
32
- computed?: Record<string, unknown>;
33
- /** Print options, defaults already applied: `%option.taxTable%`. */
34
- options?: Record<string, unknown>;
35
- /** Rows `agg.fn(row.x)` covers — a table's, or one section's. The layout engine narrows this. */
36
- aggRows?: ScopeRow[];
37
- /** Group values `agg.fn(group.x)` covers — one generated column's, across the table's rows. */
38
- aggGroups?: ScopeRow[];
39
- /** Every row set as passed, for `agg.fn(items.x)`. */
40
- rowSets?: Record<string, ScopeRow[]>;
41
- }
42
- /** The rows an aggregate call covers in this scope. */
43
- export declare const aggregateRows: (over: string, scope: ResolveScope) => ScopeRow[];
44
- /**
45
- * `a.b` → value.
46
- *
47
- * Returns `undefined` for an unknown path rather than throwing: a template may legitimately name
48
- * a field the current context has no value for (a shipping address on an invoice with none), and
49
- * *formatting* decides what that prints as. Validation is what catches paths that can never
50
- * resolve — that is a different job, done once, not per render.
51
- */
52
- export declare const readPath: (path: string, scope: ResolveScope) => unknown;
@@ -1,112 +0,0 @@
1
- /**
2
- * Quoin — seeds, diffs, and the settings document.
3
- *
4
- * A shipped format is a SEED: a `ReportTemplate` that lives in code. What a customer saves is the
5
- * DIFFERENCE from that seed, keyed by template id in one settings document, the way every settings
6
- * document here is written. Two things follow, and they are the whole point (`docs/REPORT_ENGINE.md` §8):
7
- *
8
- * - A seed can be improved and the improvement reaches every customer who did not touch that
9
- * part of it. Ship a better totals block; a shop that only moved its logo gets the better one.
10
- * - "this customer wants the lorry number under the address" is a field in the database, not a file in the
11
- * repository. No format is ever forked again.
12
- *
13
- * GRANULARITY IS THE WHOLE TOP-LEVEL KEY, and that is a decision rather than a shortcut. `bands`
14
- * and `columns` are arrays: an element-wise diff would have to answer "the seed grew a band at
15
- * index 2 — where does the customer's edit at index 2 go?", and every answer is a guess. So a
16
- * customer who edits one band owns `bands` from then on and stops receiving seed changes to it,
17
- * while `page`, `dataset` and the rest keep flowing. Coarse and predictable beats clever and
18
- * occasionally wrong, for data nobody can inspect once it is out there.
19
- *
20
- * Pure: this decides what to write, the app writes it. `buildTemplateEntry` is handed a `clear()`
21
- * factory so a removed key can be a delete sentinel without this file ever
22
- * knowing what the database is.
23
- */
24
- import type { ReportTemplate, ReportTemplatesStoredMap, StoredReportTemplate } from '../../../published/dcs-ui/src/publicTypes';
25
- /** Where the templates document lives, relative to the business root. */
26
- export declare const REPORT_TEMPLATES_SETTINGS_DOC = "REPORTTEMPLATES";
27
- /**
28
- * The template keys a diff may carry.
29
- *
30
- * `id` is the map key and `schemaVersion` is the entry's, so neither is diffable — a second copy
31
- * of either is free to disagree with the first. `registry` is excluded on purpose: pointing a
32
- * customer's diff at a different data source is not a tweak of the shipped format, it is a
33
- * different report, and it would leave every band reading fields that no longer exist.
34
- */
35
- export declare const DIFFABLE_TEMPLATE_KEYS: readonly ["name", "description", "page", "options", "bands"];
36
- export type DiffableTemplateKey = typeof DIFFABLE_TEMPLATE_KEYS[number];
37
- export interface TemplateDiff {
38
- /** Keys that differ from the seed, with the customer's value. */
39
- set: Partial<ReportTemplate>;
40
- /**
41
- * Keys the customer has put back to the seed's value. Only meaningful against what is already
42
- * stored — a merge write leaves a reverted value in place forever unless it is cleared.
43
- */
44
- clear: DiffableTemplateKey[];
45
- }
46
- /**
47
- * What differs between a template and its seed.
48
- *
49
- * With no seed there is nothing to compare against, so everything diffable is `set` — a standalone
50
- * template is stored whole. `previous` is what the document already holds, and decides which
51
- * reverted keys are worth clearing: clearing a key that was never stored writes a delete sentinel
52
- * for nothing.
53
- */
54
- export declare const diffTemplate: (current: ReportTemplate, seed: ReportTemplate | null | undefined, previous?: Partial<ReportTemplate>) => TemplateDiff;
55
- export interface EntryOptions {
56
- /**
57
- * Produces the value that removes a field. The app passes its database's field-delete sentinel; a test
58
- * passes anything it likes. This is how a pure module writes a delete.
59
- */
60
- clear: () => unknown;
61
- /** Merged into the entry — `updatedts`, `createdts`, whatever the app stamps. */
62
- stamp?: Record<string, unknown>;
63
- /** Defaults to the previous entry's value, then to true. */
64
- active?: boolean;
65
- }
66
- /**
67
- * The entry to merge into the settings document under this template's id.
68
- *
69
- * Nested rather than flattened: `name` is both a template key and the obvious name for a piece of
70
- * entry metadata, and one of those collisions is all it takes to lose a customer's title.
71
- */
72
- export declare const buildTemplateEntry: (current: ReportTemplate, seed: ReportTemplate | null | undefined, previous: StoredReportTemplate | undefined, options: EntryOptions) => Record<string, unknown>;
73
- export interface TemplateLoadProblem {
74
- templateId: string;
75
- message: string;
76
- /** true when the seed was rendered instead, false when the template is unusable. */
77
- usedSeed: boolean;
78
- }
79
- export interface LoadedTemplate {
80
- id: string;
81
- template: ReportTemplate;
82
- /** The seed it follows, if any. */
83
- seed?: string;
84
- active: boolean;
85
- /** false for a shipped seed nobody has edited. */
86
- customised: boolean;
87
- }
88
- /**
89
- * One stored entry resolved against its seed.
90
- *
91
- * NEVER THROWS. A settings document is customer data that no build ever sees; one entry written by
92
- * a newer app, or hand-edited in the console, must not take the whole picker down. A seeded entry
93
- * that cannot be resolved falls back to its seed — a shop that has just upgraded should get the
94
- * shipped format, not a blank page — and a standalone one is reported and dropped.
95
- */
96
- export declare const resolveStoredTemplate: (id: string, entry: StoredReportTemplate | undefined, seed: ReportTemplate | null | undefined) => {
97
- template: ReportTemplate | null;
98
- problem?: TemplateLoadProblem;
99
- };
100
- /**
101
- * Every template the app can offer: the shipped seeds, plus whatever the customer has stored.
102
- *
103
- * The union, not one or the other. A seed with no entry is offered as shipped; an entry with no
104
- * seed is a template the customer authored; an entry naming a seed that no longer exists is
105
- * reported rather than dropped silently, because that is a format someone is still printing.
106
- */
107
- export declare const loadReportTemplates: (stored: ReportTemplatesStoredMap | undefined, seeds: Record<string, ReportTemplate>) => {
108
- templates: LoadedTemplate[];
109
- problems: TemplateLoadProblem[];
110
- };
111
- /** Active templates only, in name order — what a picker should show. */
112
- export declare const activeReportTemplates: (loaded: LoadedTemplate[]) => LoadedTemplate[];
@@ -1,28 +0,0 @@
1
- /**
2
- * Quoin — is this template coherent?
3
- *
4
- * Templates are edited by people who are not developers, so a mistake must arrive as a sentence,
5
- * not as a blank cell on a customer's invoice. That is the whole reason this exists: without it,
6
- * `%party.mobil%` is indistinguishable from a party with no mobile number — both print nothing.
7
- *
8
- * It runs in two places, and both matter:
9
- * - in the designer, so a template cannot be SAVED broken;
10
- * - before rendering, because a template that was valid can be invalidated later by the
11
- * registry changing underneath it — a field renamed, a row set dropped.
12
- *
13
- * Errors mean the document will be wrong. Warnings mean it will probably look wrong. Nothing here
14
- * throws: a caller decides whether to refuse, to warn, or to render anyway.
15
- */
16
- import type { ReportRegistry, ReportTemplate } from '../../../published/dcs-ui/src/publicTypes';
17
- export type IssueSeverity = 'error' | 'warning';
18
- export interface ValidationIssue {
19
- severity: IssueSeverity;
20
- /** Dotted path to the offending part, e.g. `bands[2].blocks[0].columns[3].value`. */
21
- at: string;
22
- message: string;
23
- }
24
- export declare const validateTemplate: (template: ReportTemplate, registry: ReportRegistry) => ValidationIssue[];
25
- /** True when nothing would render wrong. Warnings do not block. */
26
- export declare const isTemplateValid: (issues: ValidationIssue[]) => boolean;
27
- /** One-per-line summary, for a console or a toast. */
28
- export declare const formatIssues: (issues: ValidationIssue[]) => string;
@@ -1,67 +0,0 @@
1
- import type { CellRule, ConditionContext, EditableTableColumnDefinition } from '../../../published/dcs-ui/src/publicTypes';
2
- /**
3
- * Cell validation, decided purely.
4
- *
5
- * The table asks three questions and this answers all three without touching the DOM:
6
- * is THIS cell valid, is this ROW valid, and may a new row be created? Keeping it here is
7
- * what lets the same rules run in a test, in the API, or in a future mobile port — and it
8
- * is the reason a rule is `Condition`-shaped rather than a bespoke callback: a consumer
9
- * who already writes `disabled: { key: 'x', equals: 1 }` writes a rule the same way.
10
- */
11
- export interface ResolvedRule {
12
- valid: boolean;
13
- /** The first failing rule's message. */
14
- message?: string;
15
- severity: 'block' | 'warn';
16
- }
17
- /**
18
- * A cell's rules, in order; the first failure wins.
19
- *
20
- * `when` decides whether a rule APPLIES before `valid` decides whether it PASSES — that
21
- * split is what makes "min qty, but only when the item is stocked" expressible without a
22
- * second rule list.
23
- */
24
- export declare function resolveCellRules<T>(rules: Array<CellRule<T>> | undefined, rowData: T, defaultData: T, context?: ConditionContext): ResolvedRule;
25
- /** One column's rules, resolved for one row. */
26
- export declare function resolveColumnRules<T>(column: EditableTableColumnDefinition<T> | undefined, rowData: T, defaultData: T, rowIndex: number, cellindex: number, tableDataKey?: string): ResolvedRule;
27
- export interface RowRuleFailure {
28
- cellindex: number;
29
- message: string;
30
- severity: 'block' | 'warn';
31
- }
32
- /** Every failing cell in a row, so a caller can report or jump to the first one. */
33
- export declare function resolveRowRules<T>(columns: Array<EditableTableColumnDefinition<T>>, rowData: T, defaultData: T, rowIndex: number, tableDataKey?: string): {
34
- valid: boolean;
35
- blocked: boolean;
36
- failures: RowRuleFailure[];
37
- };
38
- /**
39
- * Is this row still empty?
40
- *
41
- * Compared against `defaultData`, not against "falsy": a Qty that defaults to 0 and a
42
- * checkbox that defaults to false are BLANK, while a 0 typed into a field whose default is
43
- * `''` is not. The row's own key is ignored — it is generated, never typed.
44
- */
45
- export declare function isRowBlank<T extends Record<string, any>>(row: T | undefined, defaultData: T, rowKey?: string): boolean;
46
- export interface CreateRowPolicy {
47
- fixedRows?: boolean;
48
- allowWhenBlankRow?: boolean;
49
- allowWhenInvalid?: boolean;
50
- }
51
- export interface CreateRowDecision {
52
- allowed: boolean;
53
- /** Why not — for a message, and for tests that assert the REASON, not just the refusal. */
54
- reason?: 'fixedRows' | 'blankRow' | 'invalidRow' | 'consumer';
55
- /** The row a blocked caller should go to instead: the blank one, or the invalid one. */
56
- focusRowIndex?: number;
57
- }
58
- /**
59
- * May a row be created right now?
60
- *
61
- * The default answers "not while a blank row is waiting" — holding Enter at the end of a
62
- * table used to append one empty row per press. Each half is a prop, because a table that
63
- * is a scratchpad may genuinely want the blanks.
64
- */
65
- export declare function canCreateRow<T extends Record<string, any>>(rows: T[], defaultData: T, policy: CreateRowPolicy, rowRules?: (rowIndex: number) => {
66
- blocked: boolean;
67
- }, rowKey?: string): CreateRowDecision;
@@ -1,12 +0,0 @@
1
- /**
2
- * Merges a user's saved column order with the current config order.
3
- *
4
- * A column added to a report after the user saved their order is not in `saved`. It must
5
- * land where the config puts it — right after its nearest preceding config neighbour that
6
- * the user still has — not at the far right. Appending was the old behaviour, and it left
7
- * every new column stranded at the end until the user reordered or reset.
8
- *
9
- * Saved keys are kept in the user's order, including keys the config no longer has (the
10
- * table ignores them; dropping them here would silently rewrite the user's saved state).
11
- */
12
- export declare function mergeColumnOrder(saved: readonly string[], config: readonly string[]): string[];