@osdk/react-components 0.2.0-beta.9 → 0.2.1-main-20260407074313

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 (1105) hide show
  1. package/AGENTS.md +26 -0
  2. package/CHANGELOG.md +356 -0
  3. package/README.md +166 -7
  4. package/build/browser/action-form/ActionForm.js +117 -0
  5. package/build/browser/action-form/ActionForm.js.map +1 -0
  6. package/build/browser/action-form/ActionFormApi.js.map +1 -1
  7. package/build/browser/action-form/BaseForm.js +83 -0
  8. package/build/browser/action-form/BaseForm.js.map +1 -0
  9. package/build/browser/action-form/BaseForm.module.css +38 -0
  10. package/build/browser/action-form/BaseForm.module.css.js +8 -0
  11. package/build/browser/action-form/FormField.js +42 -0
  12. package/build/browser/action-form/FormField.js.map +1 -0
  13. package/build/browser/action-form/FormField.module.css +41 -0
  14. package/build/browser/action-form/FormField.module.css.js +10 -0
  15. package/build/browser/action-form/FormFieldApi.js.map +1 -1
  16. package/build/browser/action-form/FormHeader.js +26 -0
  17. package/build/browser/action-form/FormHeader.js.map +1 -0
  18. package/build/browser/action-form/FormHeader.module.css +26 -0
  19. package/build/browser/action-form/FormHeader.module.css.js +6 -0
  20. package/build/browser/action-form/fields/BaseInput.module.css +56 -0
  21. package/build/browser/action-form/fields/BaseInput.module.css.js +6 -0
  22. package/build/browser/action-form/fields/CustomField.js +30 -0
  23. package/build/browser/action-form/fields/CustomField.js.map +1 -0
  24. package/build/browser/action-form/fields/DateCalendar.js +70 -0
  25. package/build/browser/action-form/fields/DateCalendar.js.map +1 -0
  26. package/build/browser/action-form/fields/DateCalendar.module.css +136 -0
  27. package/build/browser/action-form/fields/DateCalendar.module.css.js +22 -0
  28. package/build/browser/action-form/fields/DatetimePickerField.js +98 -0
  29. package/build/browser/action-form/fields/DatetimePickerField.js.map +1 -0
  30. package/build/browser/action-form/fields/DatetimePickerField.module.css +66 -0
  31. package/build/browser/action-form/fields/DatetimePickerField.module.css.js +10 -0
  32. package/build/browser/action-form/fields/DropdownField.js +104 -0
  33. package/build/browser/action-form/fields/DropdownField.js.map +1 -0
  34. package/build/browser/action-form/fields/FieldBridge.js +45 -0
  35. package/build/browser/action-form/fields/FieldBridge.js.map +1 -0
  36. package/build/browser/action-form/fields/FilePickerField.js +119 -0
  37. package/build/browser/action-form/fields/FilePickerField.js.map +1 -0
  38. package/build/browser/action-form/fields/FilePickerField.module.css +132 -0
  39. package/build/browser/action-form/fields/FilePickerField.module.css.js +11 -0
  40. package/build/browser/action-form/fields/FormFieldRenderer.js +128 -0
  41. package/build/browser/action-form/fields/FormFieldRenderer.js.map +1 -0
  42. package/build/browser/action-form/fields/LazyDateCalendar.js +27 -0
  43. package/build/browser/action-form/fields/LazyDateCalendar.js.map +1 -0
  44. package/build/browser/action-form/fields/NumberInputField.js +130 -0
  45. package/build/browser/action-form/fields/NumberInputField.js.map +1 -0
  46. package/build/browser/action-form/fields/NumberInputField.module.css +96 -0
  47. package/build/browser/action-form/fields/NumberInputField.module.css.js +9 -0
  48. package/build/browser/action-form/fields/RadioButtonsField.js +57 -0
  49. package/build/browser/action-form/fields/RadioButtonsField.js.map +1 -0
  50. package/build/browser/action-form/fields/RadioButtonsField.module.css +83 -0
  51. package/build/browser/action-form/fields/RadioButtonsField.module.css.js +10 -0
  52. package/build/browser/action-form/fields/TextAreaField.js +50 -0
  53. package/build/browser/action-form/fields/TextAreaField.js.map +1 -0
  54. package/build/browser/action-form/fields/TextInputField.js +39 -0
  55. package/build/browser/action-form/fields/TextInputField.js.map +1 -0
  56. package/build/browser/action-form/utils/coerceFieldValue.js +93 -0
  57. package/build/browser/action-form/utils/coerceFieldValue.js.map +1 -0
  58. package/build/browser/action-form/utils/getDefaultFieldDefinitions.js +120 -0
  59. package/build/browser/action-form/utils/getDefaultFieldDefinitions.js.map +1 -0
  60. package/build/browser/base-components/action-button/ActionButton.module.css +0 -4
  61. package/build/browser/base-components/checkbox/Checkbox.js +8 -4
  62. package/build/browser/base-components/checkbox/Checkbox.js.map +1 -1
  63. package/build/browser/base-components/checkbox/Checkbox.module.css +13 -8
  64. package/build/browser/base-components/combobox/Combobox.js +154 -0
  65. package/build/browser/base-components/combobox/Combobox.js.map +1 -0
  66. package/build/browser/base-components/combobox/Combobox.module.css +364 -0
  67. package/build/browser/base-components/combobox/Combobox.module.css.js +18 -0
  68. package/build/browser/base-components/dialog/Dialog.js +4 -2
  69. package/build/browser/base-components/dialog/Dialog.js.map +1 -1
  70. package/build/browser/base-components/dialog/Dialog.module.css +0 -8
  71. package/build/browser/base-components/draggable-list/DraggableList.module.css +2 -10
  72. package/build/browser/base-components/search-bar/SearchBar.module.css +2 -2
  73. package/build/browser/base-components/searchable-menu/SearchableMenu.js +86 -0
  74. package/build/browser/base-components/searchable-menu/SearchableMenu.js.map +1 -0
  75. package/build/browser/base-components/searchable-menu/SearchableMenu.module.css +80 -0
  76. package/build/browser/base-components/searchable-menu/SearchableMenu.module.css.js +10 -0
  77. package/build/browser/base-components/select/Select.js +93 -0
  78. package/build/browser/base-components/select/Select.js.map +1 -0
  79. package/build/browser/base-components/select/Select.module.css +233 -0
  80. package/build/browser/base-components/select/Select.module.css.js +13 -0
  81. package/build/browser/base-components/skeleton/SkeletonBar.js +36 -0
  82. package/build/browser/base-components/skeleton/SkeletonBar.js.map +1 -0
  83. package/build/browser/base-components/skeleton/SkeletonBar.module.css +39 -0
  84. package/build/browser/base-components/skeleton/SkeletonBar.module.css.js +7 -0
  85. package/build/browser/base-components/switch/Switch.module.css +14 -15
  86. package/build/browser/base-components/tooltip/Tooltip.js +91 -0
  87. package/build/browser/base-components/tooltip/Tooltip.js.map +1 -0
  88. package/build/browser/base-components/tooltip/Tooltip.module.css +70 -0
  89. package/build/browser/base-components/tooltip/Tooltip.module.css.js +11 -0
  90. package/build/browser/base-components/tooltip/index.js +18 -0
  91. package/build/browser/base-components/tooltip/index.js.map +1 -0
  92. package/build/browser/filter-list/FilterInput.js +141 -0
  93. package/build/browser/filter-list/FilterInput.js.map +1 -0
  94. package/build/browser/filter-list/FilterList.js +142 -0
  95. package/build/browser/filter-list/FilterList.js.map +1 -0
  96. package/build/browser/filter-list/FilterListApi.js.map +1 -1
  97. package/build/browser/filter-list/FilterListItemApi.js.map +1 -1
  98. package/build/browser/filter-list/base/AddFilterPopover.js +35 -0
  99. package/build/browser/filter-list/base/AddFilterPopover.js.map +1 -0
  100. package/build/browser/filter-list/base/AddFilterPopover.module.css +49 -0
  101. package/build/browser/filter-list/base/AddFilterPopover.module.css.js +6 -0
  102. package/build/browser/filter-list/base/BaseFilterList.js +94 -0
  103. package/build/browser/filter-list/base/BaseFilterList.js.map +1 -0
  104. package/build/browser/filter-list/base/BaseFilterListApi.js +2 -0
  105. package/build/browser/filter-list/base/BaseFilterListApi.js.map +1 -0
  106. package/build/browser/filter-list/base/DragHandleIcon.js +51 -0
  107. package/build/browser/filter-list/base/DragHandleIcon.js.map +1 -0
  108. package/build/browser/filter-list/base/ExcludeDropdown.js +62 -0
  109. package/build/browser/filter-list/base/ExcludeDropdown.js.map +1 -0
  110. package/build/browser/filter-list/base/ExcludeDropdown.module.css +96 -0
  111. package/build/browser/filter-list/base/ExcludeDropdown.module.css.js +12 -0
  112. package/build/browser/filter-list/base/FilterIcons.js +65 -0
  113. package/build/browser/filter-list/base/FilterIcons.js.map +1 -0
  114. package/build/browser/filter-list/base/FilterInputExcludeRow.js +67 -0
  115. package/build/browser/filter-list/base/FilterInputExcludeRow.js.map +1 -0
  116. package/build/browser/filter-list/base/FilterList.module.css +84 -6
  117. package/build/browser/filter-list/base/FilterList.module.css.js +6 -0
  118. package/build/browser/filter-list/base/FilterListContent.js +172 -6
  119. package/build/browser/filter-list/base/FilterListContent.js.map +1 -1
  120. package/build/browser/filter-list/base/FilterListContent.module.css +6 -0
  121. package/build/browser/filter-list/base/FilterListContent.module.css.js +2 -1
  122. package/build/browser/filter-list/base/FilterListHeader.js +14 -13
  123. package/build/browser/filter-list/base/FilterListHeader.js.map +1 -1
  124. package/build/browser/filter-list/base/FilterListHeader.module.css +22 -21
  125. package/build/browser/filter-list/base/FilterListHeader.module.css.js +1 -1
  126. package/build/browser/filter-list/base/FilterListItem.js +124 -27
  127. package/build/browser/filter-list/base/FilterListItem.js.map +1 -1
  128. package/build/browser/filter-list/base/FilterListItem.module.css +173 -0
  129. package/build/browser/filter-list/base/FilterListItem.module.css.js +11 -1
  130. package/build/browser/filter-list/base/SortableFilterListItem.js +64 -0
  131. package/build/browser/filter-list/base/SortableFilterListItem.js.map +1 -0
  132. package/build/browser/filter-list/base/index.js +1 -2
  133. package/build/browser/filter-list/base/index.js.map +1 -1
  134. package/build/browser/filter-list/base/inputs/ContainsTextInput.js +5 -7
  135. package/build/browser/filter-list/base/inputs/ContainsTextInput.js.map +1 -1
  136. package/build/browser/filter-list/base/inputs/DateRangeInput.js +37 -0
  137. package/build/browser/filter-list/base/inputs/DateRangeInput.js.map +1 -0
  138. package/build/browser/filter-list/base/inputs/LinkedPropertyInput.module.css +20 -0
  139. package/build/browser/filter-list/base/inputs/LinkedPropertyInput.module.css.js +6 -0
  140. package/build/browser/filter-list/base/inputs/ListogramInput.js +118 -0
  141. package/build/browser/filter-list/base/inputs/ListogramInput.js.map +1 -0
  142. package/build/browser/filter-list/base/inputs/ListogramInput.module.css +137 -0
  143. package/build/browser/filter-list/base/inputs/ListogramInput.module.css.js +14 -0
  144. package/build/browser/filter-list/base/inputs/ListogramSkeleton.js +45 -0
  145. package/build/browser/filter-list/base/inputs/ListogramSkeleton.js.map +1 -0
  146. package/build/browser/filter-list/base/inputs/ListogramSkeleton.module.css +32 -0
  147. package/build/browser/filter-list/base/inputs/ListogramSkeleton.module.css.js +8 -0
  148. package/build/browser/filter-list/base/inputs/MultiDateInput.js +1 -1
  149. package/build/browser/filter-list/base/inputs/MultiDateInput.js.map +1 -1
  150. package/build/browser/filter-list/base/inputs/MultiDateInput.module.css +6 -6
  151. package/build/browser/filter-list/base/inputs/MultiSelectInput.js +76 -0
  152. package/build/browser/filter-list/base/inputs/MultiSelectInput.js.map +1 -0
  153. package/build/browser/filter-list/base/inputs/MultiSelectInput.module.css +37 -0
  154. package/build/browser/filter-list/base/inputs/MultiSelectInput.module.css.js +8 -0
  155. package/build/browser/filter-list/base/inputs/NullValueWrapper.js +57 -0
  156. package/build/browser/filter-list/base/inputs/NullValueWrapper.js.map +1 -0
  157. package/build/browser/filter-list/base/inputs/NullValueWrapper.module.css +50 -0
  158. package/build/browser/filter-list/base/inputs/NullValueWrapper.module.css.js +10 -0
  159. package/build/browser/filter-list/base/inputs/NumberRangeInput.js +48 -0
  160. package/build/browser/filter-list/base/inputs/NumberRangeInput.js.map +1 -0
  161. package/build/browser/filter-list/base/inputs/RangeInput.js +159 -0
  162. package/build/browser/filter-list/base/inputs/RangeInput.js.map +1 -0
  163. package/build/browser/filter-list/base/inputs/RangeInput.module.css +106 -0
  164. package/build/browser/filter-list/base/inputs/RangeInput.module.css.js +13 -0
  165. package/build/browser/filter-list/base/inputs/SingleDateInput.js +1 -1
  166. package/build/browser/filter-list/base/inputs/SingleDateInput.js.map +1 -1
  167. package/build/browser/filter-list/base/inputs/SingleDateInput.module.css +2 -2
  168. package/build/browser/filter-list/base/inputs/SingleSelectInput.js +77 -0
  169. package/build/browser/filter-list/base/inputs/SingleSelectInput.js.map +1 -0
  170. package/build/browser/filter-list/base/inputs/SingleSelectInput.module.css +45 -0
  171. package/build/browser/filter-list/base/inputs/SingleSelectInput.module.css.js +10 -0
  172. package/build/browser/filter-list/base/inputs/TextTagsInput.js +133 -0
  173. package/build/browser/filter-list/base/inputs/TextTagsInput.js.map +1 -0
  174. package/build/browser/filter-list/base/inputs/TextTagsInput.module.css +25 -0
  175. package/build/browser/filter-list/base/inputs/TextTagsInput.module.css.js +7 -0
  176. package/build/browser/filter-list/base/inputs/TimelineInput.js +74 -0
  177. package/build/browser/filter-list/base/inputs/TimelineInput.js.map +1 -0
  178. package/build/browser/filter-list/base/inputs/TimelineInput.module.css +75 -0
  179. package/build/browser/filter-list/base/inputs/TimelineInput.module.css.js +10 -0
  180. package/build/browser/filter-list/base/inputs/createHistogramBuckets.js +53 -0
  181. package/build/browser/filter-list/base/inputs/createHistogramBuckets.js.map +1 -0
  182. package/build/browser/filter-list/base/inputs/index.js +5 -1
  183. package/build/browser/filter-list/base/inputs/index.js.map +1 -1
  184. package/build/browser/filter-list/base/inputs/shared.module.css +5 -5
  185. package/build/browser/filter-list/base/inputs/useStableData.js +29 -0
  186. package/build/browser/filter-list/base/inputs/useStableData.js.map +1 -0
  187. package/build/browser/filter-list/hooks/useFilterListState.js +56 -10
  188. package/build/browser/filter-list/hooks/useFilterListState.js.map +1 -1
  189. package/build/browser/filter-list/hooks/useFilterVisibility.js +74 -0
  190. package/build/browser/filter-list/hooks/useFilterVisibility.js.map +1 -0
  191. package/build/browser/filter-list/hooks/usePropertyAggregation.js +98 -0
  192. package/build/browser/filter-list/hooks/usePropertyAggregation.js.map +1 -0
  193. package/build/browser/filter-list/inputs/ContainsTextFilterInput.js +38 -0
  194. package/build/browser/filter-list/inputs/ContainsTextFilterInput.js.map +1 -0
  195. package/build/browser/filter-list/inputs/DateRangeFilterInput.js +109 -0
  196. package/build/browser/filter-list/inputs/DateRangeFilterInput.js.map +1 -0
  197. package/build/browser/filter-list/inputs/LinkedPropertyInput.js +496 -0
  198. package/build/browser/filter-list/inputs/LinkedPropertyInput.js.map +1 -0
  199. package/build/browser/filter-list/inputs/ListogramFilterInput.js +83 -0
  200. package/build/browser/filter-list/inputs/ListogramFilterInput.js.map +1 -0
  201. package/build/browser/filter-list/inputs/MultiDateFilterInput.js +38 -0
  202. package/build/browser/filter-list/inputs/MultiDateFilterInput.js.map +1 -0
  203. package/build/browser/filter-list/inputs/MultiSelectFilterInput.js +71 -0
  204. package/build/browser/filter-list/inputs/MultiSelectFilterInput.js.map +1 -0
  205. package/build/browser/filter-list/inputs/NumberRangeFilterInput.js +109 -0
  206. package/build/browser/filter-list/inputs/NumberRangeFilterInput.js.map +1 -0
  207. package/build/browser/filter-list/inputs/PropertyFilterInput.js +142 -0
  208. package/build/browser/filter-list/inputs/PropertyFilterInput.js.map +1 -0
  209. package/build/browser/filter-list/inputs/SingleDateFilterInput.js +38 -0
  210. package/build/browser/filter-list/inputs/SingleDateFilterInput.js.map +1 -0
  211. package/build/browser/filter-list/inputs/SingleSelectFilterInput.js +71 -0
  212. package/build/browser/filter-list/inputs/SingleSelectFilterInput.js.map +1 -0
  213. package/build/browser/filter-list/inputs/TextTagsFilterInput.js +70 -0
  214. package/build/browser/filter-list/inputs/TextTagsFilterInput.js.map +1 -0
  215. package/build/browser/filter-list/inputs/TimelineFilterInput.js +49 -0
  216. package/build/browser/filter-list/inputs/TimelineFilterInput.js.map +1 -0
  217. package/build/browser/filter-list/inputs/ToggleFilterInput.js +36 -0
  218. package/build/browser/filter-list/inputs/ToggleFilterInput.js.map +1 -0
  219. package/build/browser/filter-list/types/AggregationTypes.js +2 -0
  220. package/build/browser/filter-list/types/AggregationTypes.js.map +1 -0
  221. package/build/browser/filter-list/types/CustomRendererTypes.js.map +1 -1
  222. package/build/browser/filter-list/types/LinkedFilterTypes.js.map +1 -1
  223. package/build/browser/filter-list/types/index.js +0 -2
  224. package/build/browser/filter-list/types/index.js.map +1 -1
  225. package/build/browser/filter-list/utils/aggregationHelpers.js +44 -0
  226. package/build/browser/filter-list/utils/aggregationHelpers.js.map +1 -0
  227. package/build/browser/filter-list/utils/filterStateSerialization.js +42 -0
  228. package/build/browser/filter-list/utils/filterStateSerialization.js.map +1 -0
  229. package/build/browser/filter-list/utils/filterStateToWhereClause.js +124 -91
  230. package/build/browser/filter-list/utils/filterStateToWhereClause.js.map +1 -1
  231. package/build/browser/filter-list/utils/filterValues.js +55 -1
  232. package/build/browser/filter-list/utils/filterValues.js.map +1 -1
  233. package/build/browser/filter-list/utils/getFilterKey.js +1 -1
  234. package/build/browser/filter-list/utils/getFilterKey.js.map +1 -1
  235. package/build/browser/filter-list/utils/getFilterLabel.js +36 -0
  236. package/build/browser/filter-list/utils/getFilterLabel.js.map +1 -0
  237. package/build/browser/object-table/ColumnConfigDialog.module.css +1 -11
  238. package/build/browser/object-table/DefaultCellRenderer.js +23 -5
  239. package/build/browser/object-table/DefaultCellRenderer.js.map +1 -1
  240. package/build/browser/object-table/EditableCell.js +87 -10
  241. package/build/browser/object-table/EditableCell.js.map +1 -1
  242. package/build/browser/object-table/EditableCell.module.css +69 -2
  243. package/build/browser/object-table/EditableCell.module.css.js +6 -1
  244. package/build/browser/object-table/LoadingCell.js +7 -3
  245. package/build/browser/object-table/LoadingCell.js.map +1 -1
  246. package/build/browser/object-table/LoadingCell.module.css +3 -21
  247. package/build/browser/object-table/LoadingCell.module.css.js +1 -2
  248. package/build/browser/object-table/LoadingRow.js +2 -1
  249. package/build/browser/object-table/LoadingRow.js.map +1 -1
  250. package/build/browser/object-table/LoadingStateTable.js +2 -1
  251. package/build/browser/object-table/LoadingStateTable.js.map +1 -1
  252. package/build/browser/object-table/MultiColumnSortDialog.js +22 -58
  253. package/build/browser/object-table/MultiColumnSortDialog.js.map +1 -1
  254. package/build/browser/object-table/MultiColumnSortDialog.module.css +0 -69
  255. package/build/browser/object-table/MultiColumnSortDialog.module.css.js +0 -5
  256. package/build/browser/object-table/ObjectTable.js +16 -23
  257. package/build/browser/object-table/ObjectTable.js.map +1 -1
  258. package/build/browser/object-table/ObjectTableApi.js.map +1 -1
  259. package/build/browser/object-table/SelectionCells.js +1 -0
  260. package/build/browser/object-table/SelectionCells.js.map +1 -1
  261. package/build/browser/object-table/Table.js +23 -15
  262. package/build/browser/object-table/Table.js.map +1 -1
  263. package/build/browser/object-table/Table.module.css +0 -8
  264. package/build/browser/object-table/Table.module.css.js +1 -2
  265. package/build/browser/object-table/TableBody.js +8 -2
  266. package/build/browser/object-table/TableBody.js.map +1 -1
  267. package/build/browser/object-table/TableCell.module.css +2 -9
  268. package/build/browser/object-table/TableEditContainer.js +90 -0
  269. package/build/browser/object-table/TableEditContainer.js.map +1 -0
  270. package/build/browser/object-table/TableEditContainer.module.css +71 -0
  271. package/build/browser/object-table/TableEditContainer.module.css.js +13 -0
  272. package/build/browser/object-table/TableHeader.js +4 -1
  273. package/build/browser/object-table/TableHeader.js.map +1 -1
  274. package/build/browser/object-table/TableHeader.module.css +4 -3
  275. package/build/browser/object-table/TableHeader.module.css.js +1 -0
  276. package/build/browser/object-table/TableHeaderWithPopover.js +2 -4
  277. package/build/browser/object-table/TableHeaderWithPopover.js.map +1 -1
  278. package/build/browser/object-table/TableHeaderWithPopover.module.css +1 -12
  279. package/build/browser/object-table/TableRow.js +10 -3
  280. package/build/browser/object-table/TableRow.js.map +1 -1
  281. package/build/browser/object-table/TableRow.module.css +2 -1
  282. package/build/browser/object-table/components/AsyncValueCell.js +35 -0
  283. package/build/browser/object-table/components/AsyncValueCell.js.map +1 -0
  284. package/build/browser/object-table/hooks/useColumnDefs.js +5 -2
  285. package/build/browser/object-table/hooks/useColumnDefs.js.map +1 -1
  286. package/build/browser/object-table/hooks/useEditableTable.js +39 -11
  287. package/build/browser/object-table/hooks/useEditableTable.js.map +1 -1
  288. package/build/browser/object-table/hooks/useFunctionColumnsData.js +135 -0
  289. package/build/browser/object-table/hooks/useFunctionColumnsData.js.map +1 -0
  290. package/build/browser/object-table/hooks/useObjectTableData.js +33 -17
  291. package/build/browser/object-table/hooks/useObjectTableData.js.map +1 -1
  292. package/build/browser/object-table/hooks/useRowSelection.js +11 -8
  293. package/build/browser/object-table/hooks/useRowSelection.js.map +1 -1
  294. package/build/browser/object-table/utils/AsyncCellData.js +30 -0
  295. package/build/browser/object-table/utils/AsyncCellData.js.map +1 -0
  296. package/build/browser/object-table/utils/constants.js +1 -0
  297. package/build/browser/object-table/utils/constants.js.map +1 -1
  298. package/build/browser/object-table/utils/getCellId.js +0 -7
  299. package/build/browser/object-table/utils/getCellId.js.map +1 -1
  300. package/build/browser/object-table/utils/types.js.map +1 -1
  301. package/build/browser/pdf-viewer/PdfRenderer.js +88 -0
  302. package/build/browser/pdf-viewer/PdfRenderer.js.map +1 -0
  303. package/build/browser/pdf-viewer/PdfViewer.js +179 -0
  304. package/build/browser/pdf-viewer/PdfViewer.js.map +1 -0
  305. package/build/browser/pdf-viewer/PdfViewer.module.css +95 -0
  306. package/build/browser/pdf-viewer/PdfViewer.module.css.js +16 -0
  307. package/build/browser/pdf-viewer/PdfViewerContext.js +108 -0
  308. package/build/browser/pdf-viewer/PdfViewerContext.js.map +1 -0
  309. package/build/browser/pdf-viewer/components/PdfViewerAnnotationLayer.js +141 -0
  310. package/build/browser/pdf-viewer/components/PdfViewerAnnotationLayer.js.map +1 -0
  311. package/build/browser/pdf-viewer/components/PdfViewerAnnotationLayer.module.css +82 -0
  312. package/build/browser/pdf-viewer/components/PdfViewerAnnotationLayer.module.css.js +12 -0
  313. package/build/browser/pdf-viewer/components/PdfViewerContent.js +125 -0
  314. package/build/browser/pdf-viewer/components/PdfViewerContent.js.map +1 -0
  315. package/build/browser/pdf-viewer/components/PdfViewerOutlineSidebar.js +98 -0
  316. package/build/browser/pdf-viewer/components/PdfViewerOutlineSidebar.js.map +1 -0
  317. package/build/browser/pdf-viewer/components/PdfViewerOutlineSidebar.module.css +89 -0
  318. package/build/browser/pdf-viewer/components/PdfViewerOutlineSidebar.module.css.js +15 -0
  319. package/build/browser/pdf-viewer/components/PdfViewerSearchBar.js +84 -0
  320. package/build/browser/pdf-viewer/components/PdfViewerSearchBar.js.map +1 -0
  321. package/build/browser/pdf-viewer/components/PdfViewerSearchBar.module.css +65 -0
  322. package/build/browser/pdf-viewer/components/PdfViewerSearchBar.module.css.js +10 -0
  323. package/build/browser/pdf-viewer/components/PdfViewerSidebar.js +78 -0
  324. package/build/browser/pdf-viewer/components/PdfViewerSidebar.js.map +1 -0
  325. package/build/browser/pdf-viewer/components/PdfViewerSidebar.module.css +37 -0
  326. package/build/browser/pdf-viewer/components/PdfViewerSidebar.module.css.js +10 -0
  327. package/build/browser/pdf-viewer/components/PdfViewerSidebarHeader.js +54 -0
  328. package/build/browser/pdf-viewer/components/PdfViewerSidebarHeader.js.map +1 -0
  329. package/build/browser/pdf-viewer/components/PdfViewerSidebarHeader.module.css +70 -0
  330. package/build/browser/pdf-viewer/components/PdfViewerSidebarHeader.module.css.js +8 -0
  331. package/build/browser/pdf-viewer/components/PdfViewerThumbnail.js +100 -0
  332. package/build/browser/pdf-viewer/components/PdfViewerThumbnail.js.map +1 -0
  333. package/build/browser/pdf-viewer/components/PdfViewerThumbnail.module.css +26 -0
  334. package/build/browser/pdf-viewer/components/PdfViewerThumbnail.module.css.js +8 -0
  335. package/build/browser/pdf-viewer/components/PdfViewerToolbar.js +221 -0
  336. package/build/browser/pdf-viewer/components/PdfViewerToolbar.js.map +1 -0
  337. package/build/browser/pdf-viewer/components/PdfViewerToolbar.module.css +91 -0
  338. package/build/browser/pdf-viewer/components/PdfViewerToolbar.module.css.js +13 -0
  339. package/build/browser/pdf-viewer/constants.js +46 -0
  340. package/build/browser/pdf-viewer/constants.js.map +1 -0
  341. package/build/browser/pdf-viewer/hooks/usePdfAnnotationPortals.js +54 -0
  342. package/build/browser/pdf-viewer/hooks/usePdfAnnotationPortals.js.map +1 -0
  343. package/build/browser/pdf-viewer/hooks/usePdfAnnotationsByPage.js +30 -0
  344. package/build/browser/pdf-viewer/hooks/usePdfAnnotationsByPage.js.map +1 -0
  345. package/build/browser/pdf-viewer/hooks/usePdfDocument.js +66 -0
  346. package/build/browser/pdf-viewer/hooks/usePdfDocument.js.map +1 -0
  347. package/build/browser/pdf-viewer/hooks/usePdfFormFields.js +341 -0
  348. package/build/browser/pdf-viewer/hooks/usePdfFormFields.js.map +1 -0
  349. package/build/browser/pdf-viewer/hooks/usePdfHighlightMode.js +227 -0
  350. package/build/browser/pdf-viewer/hooks/usePdfHighlightMode.js.map +1 -0
  351. package/build/browser/pdf-viewer/hooks/usePdfOutline.js +268 -0
  352. package/build/browser/pdf-viewer/hooks/usePdfOutline.js.map +1 -0
  353. package/build/browser/pdf-viewer/hooks/usePdfViewer.js +86 -0
  354. package/build/browser/pdf-viewer/hooks/usePdfViewer.js.map +1 -0
  355. package/build/browser/pdf-viewer/hooks/usePdfViewerCore.js +80 -0
  356. package/build/browser/pdf-viewer/hooks/usePdfViewerCore.js.map +1 -0
  357. package/build/browser/pdf-viewer/hooks/usePdfViewerSearch.js +106 -0
  358. package/build/browser/pdf-viewer/hooks/usePdfViewerSearch.js.map +1 -0
  359. package/build/browser/pdf-viewer/hooks/usePdfViewerState.js +135 -0
  360. package/build/browser/pdf-viewer/hooks/usePdfViewerState.js.map +1 -0
  361. package/build/browser/pdf-viewer/hooks/usePdfViewerSync.js +71 -0
  362. package/build/browser/pdf-viewer/hooks/usePdfViewerSync.js.map +1 -0
  363. package/build/browser/pdf-viewer/types.js +2 -0
  364. package/build/browser/pdf-viewer/types.js.map +1 -0
  365. package/build/browser/public/experimental.js +34 -0
  366. package/build/browser/public/experimental.js.map +1 -1
  367. package/build/browser/public/primitives.js +20 -0
  368. package/build/browser/public/primitives.js.map +1 -0
  369. package/build/browser/shared/ErrorBoundary.module.css +14 -14
  370. package/build/browser/{filter-list/utils → shared}/assertUnreachable.js +1 -1
  371. package/build/browser/{filter-list/utils → shared}/assertUnreachable.js.map +1 -1
  372. package/build/{esm/filter-list/base/inputs → browser/shared}/dateUtils.js +38 -2
  373. package/build/browser/shared/dateUtils.js.map +1 -0
  374. package/build/browser/shared/typedMemo.js +25 -0
  375. package/build/browser/shared/typedMemo.js.map +1 -0
  376. package/build/browser/styles.css +4452 -1405
  377. package/build/cjs/DateCalendar-QWGFKD6J.css +113 -0
  378. package/build/cjs/DateCalendar-QWGFKD6J.css.map +1 -0
  379. package/build/cjs/DateCalendar-R44GMN3O.cjs +67 -0
  380. package/build/cjs/DateCalendar-R44GMN3O.cjs.map +1 -0
  381. package/build/cjs/chunk-HMQTYQEX.cjs +9 -0
  382. package/build/cjs/chunk-HMQTYQEX.cjs.map +1 -0
  383. package/build/cjs/chunk-MRRRZN44.cjs +165 -0
  384. package/build/cjs/chunk-MRRRZN44.cjs.map +1 -0
  385. package/build/cjs/chunk-UZ2E5NRX.cjs +8 -0
  386. package/build/cjs/chunk-UZ2E5NRX.cjs.map +1 -0
  387. package/build/cjs/index.cjs +2 -0
  388. package/build/cjs/public/experimental.cjs +9514 -2011
  389. package/build/cjs/public/experimental.cjs.map +1 -1
  390. package/build/cjs/public/experimental.css +3230 -736
  391. package/build/cjs/public/experimental.css.map +1 -1
  392. package/build/cjs/public/experimental.d.cts +1182 -125
  393. package/build/cjs/public/primitives.cjs +25 -0
  394. package/build/cjs/public/primitives.cjs.map +1 -0
  395. package/build/cjs/public/primitives.css +154 -0
  396. package/build/cjs/public/primitives.css.map +1 -0
  397. package/build/cjs/public/primitives.d.cts +50 -0
  398. package/build/esm/action-form/ActionForm.js +117 -0
  399. package/build/esm/action-form/ActionForm.js.map +1 -0
  400. package/build/esm/action-form/ActionFormApi.js.map +1 -1
  401. package/build/esm/action-form/BaseForm.js +83 -0
  402. package/build/esm/action-form/BaseForm.js.map +1 -0
  403. package/build/esm/action-form/BaseForm.module.css +38 -0
  404. package/build/esm/action-form/FormField.js +42 -0
  405. package/build/esm/action-form/FormField.js.map +1 -0
  406. package/build/esm/action-form/FormField.module.css +41 -0
  407. package/build/esm/action-form/FormFieldApi.js.map +1 -1
  408. package/build/esm/action-form/FormHeader.js +26 -0
  409. package/build/esm/action-form/FormHeader.js.map +1 -0
  410. package/build/esm/action-form/FormHeader.module.css +26 -0
  411. package/build/esm/action-form/fields/BaseInput.module.css +56 -0
  412. package/build/esm/action-form/fields/CustomField.js +30 -0
  413. package/build/esm/action-form/fields/CustomField.js.map +1 -0
  414. package/build/esm/action-form/fields/DateCalendar.js +70 -0
  415. package/build/esm/action-form/fields/DateCalendar.js.map +1 -0
  416. package/build/esm/action-form/fields/DateCalendar.module.css +136 -0
  417. package/build/esm/action-form/fields/DatetimePickerField.js +98 -0
  418. package/build/esm/action-form/fields/DatetimePickerField.js.map +1 -0
  419. package/build/esm/action-form/fields/DatetimePickerField.module.css +66 -0
  420. package/build/esm/action-form/fields/DropdownField.js +104 -0
  421. package/build/esm/action-form/fields/DropdownField.js.map +1 -0
  422. package/build/esm/action-form/fields/FieldBridge.js +45 -0
  423. package/build/esm/action-form/fields/FieldBridge.js.map +1 -0
  424. package/build/esm/action-form/fields/FilePickerField.js +119 -0
  425. package/build/esm/action-form/fields/FilePickerField.js.map +1 -0
  426. package/build/esm/action-form/fields/FilePickerField.module.css +132 -0
  427. package/build/esm/action-form/fields/FormFieldRenderer.js +128 -0
  428. package/build/esm/action-form/fields/FormFieldRenderer.js.map +1 -0
  429. package/build/esm/action-form/fields/LazyDateCalendar.js +27 -0
  430. package/build/esm/action-form/fields/LazyDateCalendar.js.map +1 -0
  431. package/build/esm/action-form/fields/NumberInputField.js +130 -0
  432. package/build/esm/action-form/fields/NumberInputField.js.map +1 -0
  433. package/build/esm/action-form/fields/NumberInputField.module.css +96 -0
  434. package/build/esm/action-form/fields/RadioButtonsField.js +57 -0
  435. package/build/esm/action-form/fields/RadioButtonsField.js.map +1 -0
  436. package/build/esm/action-form/fields/RadioButtonsField.module.css +83 -0
  437. package/build/esm/action-form/fields/TextAreaField.js +50 -0
  438. package/build/esm/action-form/fields/TextAreaField.js.map +1 -0
  439. package/build/esm/action-form/fields/TextInputField.js +39 -0
  440. package/build/esm/action-form/fields/TextInputField.js.map +1 -0
  441. package/build/esm/action-form/utils/coerceFieldValue.js +93 -0
  442. package/build/esm/action-form/utils/coerceFieldValue.js.map +1 -0
  443. package/build/esm/action-form/utils/getDefaultFieldDefinitions.js +120 -0
  444. package/build/esm/action-form/utils/getDefaultFieldDefinitions.js.map +1 -0
  445. package/build/esm/base-components/action-button/ActionButton.module.css +0 -4
  446. package/build/esm/base-components/checkbox/Checkbox.js +8 -4
  447. package/build/esm/base-components/checkbox/Checkbox.js.map +1 -1
  448. package/build/esm/base-components/checkbox/Checkbox.module.css +13 -8
  449. package/build/esm/base-components/combobox/Combobox.js +154 -0
  450. package/build/esm/base-components/combobox/Combobox.js.map +1 -0
  451. package/build/esm/base-components/combobox/Combobox.module.css +364 -0
  452. package/build/esm/base-components/dialog/Dialog.js +4 -2
  453. package/build/esm/base-components/dialog/Dialog.js.map +1 -1
  454. package/build/esm/base-components/dialog/Dialog.module.css +0 -8
  455. package/build/esm/base-components/draggable-list/DraggableList.module.css +2 -10
  456. package/build/esm/base-components/search-bar/SearchBar.module.css +2 -2
  457. package/build/esm/base-components/searchable-menu/SearchableMenu.js +86 -0
  458. package/build/esm/base-components/searchable-menu/SearchableMenu.js.map +1 -0
  459. package/build/esm/base-components/searchable-menu/SearchableMenu.module.css +80 -0
  460. package/build/esm/base-components/select/Select.js +93 -0
  461. package/build/esm/base-components/select/Select.js.map +1 -0
  462. package/build/esm/base-components/select/Select.module.css +233 -0
  463. package/build/esm/base-components/skeleton/SkeletonBar.js +36 -0
  464. package/build/esm/base-components/skeleton/SkeletonBar.js.map +1 -0
  465. package/build/esm/base-components/skeleton/SkeletonBar.module.css +39 -0
  466. package/build/esm/base-components/switch/Switch.module.css +14 -15
  467. package/build/esm/base-components/tooltip/Tooltip.js +91 -0
  468. package/build/esm/base-components/tooltip/Tooltip.js.map +1 -0
  469. package/build/esm/base-components/tooltip/Tooltip.module.css +70 -0
  470. package/build/esm/base-components/tooltip/index.js +18 -0
  471. package/build/esm/base-components/tooltip/index.js.map +1 -0
  472. package/build/esm/filter-list/FilterInput.js +141 -0
  473. package/build/esm/filter-list/FilterInput.js.map +1 -0
  474. package/build/esm/filter-list/FilterList.js +142 -0
  475. package/build/esm/filter-list/FilterList.js.map +1 -0
  476. package/build/esm/filter-list/FilterListApi.js.map +1 -1
  477. package/build/esm/filter-list/FilterListItemApi.js.map +1 -1
  478. package/build/esm/filter-list/base/AddFilterPopover.js +35 -0
  479. package/build/esm/filter-list/base/AddFilterPopover.js.map +1 -0
  480. package/build/esm/filter-list/base/AddFilterPopover.module.css +49 -0
  481. package/build/esm/filter-list/base/BaseFilterList.js +94 -0
  482. package/build/esm/filter-list/base/BaseFilterList.js.map +1 -0
  483. package/build/esm/filter-list/base/BaseFilterListApi.js +2 -0
  484. package/build/esm/filter-list/base/BaseFilterListApi.js.map +1 -0
  485. package/build/esm/filter-list/base/DragHandleIcon.js +51 -0
  486. package/build/esm/filter-list/base/DragHandleIcon.js.map +1 -0
  487. package/build/esm/filter-list/base/ExcludeDropdown.js +62 -0
  488. package/build/esm/filter-list/base/ExcludeDropdown.js.map +1 -0
  489. package/build/esm/filter-list/base/ExcludeDropdown.module.css +96 -0
  490. package/build/esm/filter-list/base/FilterIcons.js +65 -0
  491. package/build/esm/filter-list/base/FilterIcons.js.map +1 -0
  492. package/build/esm/filter-list/base/FilterInputExcludeRow.js +67 -0
  493. package/build/esm/filter-list/base/FilterInputExcludeRow.js.map +1 -0
  494. package/build/esm/filter-list/base/FilterList.module.css +84 -6
  495. package/build/esm/filter-list/base/FilterListContent.js +172 -6
  496. package/build/esm/filter-list/base/FilterListContent.js.map +1 -1
  497. package/build/esm/filter-list/base/FilterListContent.module.css +6 -0
  498. package/build/esm/filter-list/base/FilterListHeader.js +14 -13
  499. package/build/esm/filter-list/base/FilterListHeader.js.map +1 -1
  500. package/build/esm/filter-list/base/FilterListHeader.module.css +22 -21
  501. package/build/esm/filter-list/base/FilterListItem.js +124 -27
  502. package/build/esm/filter-list/base/FilterListItem.js.map +1 -1
  503. package/build/esm/filter-list/base/FilterListItem.module.css +173 -0
  504. package/build/esm/filter-list/base/SortableFilterListItem.js +64 -0
  505. package/build/esm/filter-list/base/SortableFilterListItem.js.map +1 -0
  506. package/build/esm/filter-list/base/index.js +1 -2
  507. package/build/esm/filter-list/base/index.js.map +1 -1
  508. package/build/esm/filter-list/base/inputs/ContainsTextInput.js +5 -7
  509. package/build/esm/filter-list/base/inputs/ContainsTextInput.js.map +1 -1
  510. package/build/esm/filter-list/base/inputs/DateRangeInput.js +37 -0
  511. package/build/esm/filter-list/base/inputs/DateRangeInput.js.map +1 -0
  512. package/build/esm/filter-list/base/inputs/LinkedPropertyInput.module.css +20 -0
  513. package/build/esm/filter-list/base/inputs/ListogramInput.js +118 -0
  514. package/build/esm/filter-list/base/inputs/ListogramInput.js.map +1 -0
  515. package/build/esm/filter-list/base/inputs/ListogramInput.module.css +137 -0
  516. package/build/esm/filter-list/base/inputs/ListogramSkeleton.js +45 -0
  517. package/build/esm/filter-list/base/inputs/ListogramSkeleton.js.map +1 -0
  518. package/build/esm/filter-list/base/inputs/ListogramSkeleton.module.css +32 -0
  519. package/build/esm/filter-list/base/inputs/MultiDateInput.js +1 -1
  520. package/build/esm/filter-list/base/inputs/MultiDateInput.js.map +1 -1
  521. package/build/esm/filter-list/base/inputs/MultiDateInput.module.css +6 -6
  522. package/build/esm/filter-list/base/inputs/MultiSelectInput.js +76 -0
  523. package/build/esm/filter-list/base/inputs/MultiSelectInput.js.map +1 -0
  524. package/build/esm/filter-list/base/inputs/MultiSelectInput.module.css +37 -0
  525. package/build/esm/filter-list/base/inputs/NullValueWrapper.js +57 -0
  526. package/build/esm/filter-list/base/inputs/NullValueWrapper.js.map +1 -0
  527. package/build/esm/filter-list/base/inputs/NullValueWrapper.module.css +50 -0
  528. package/build/esm/filter-list/base/inputs/NumberRangeInput.js +48 -0
  529. package/build/esm/filter-list/base/inputs/NumberRangeInput.js.map +1 -0
  530. package/build/esm/filter-list/base/inputs/RangeInput.js +159 -0
  531. package/build/esm/filter-list/base/inputs/RangeInput.js.map +1 -0
  532. package/build/esm/filter-list/base/inputs/RangeInput.module.css +106 -0
  533. package/build/esm/filter-list/base/inputs/SingleDateInput.js +1 -1
  534. package/build/esm/filter-list/base/inputs/SingleDateInput.js.map +1 -1
  535. package/build/esm/filter-list/base/inputs/SingleDateInput.module.css +2 -2
  536. package/build/esm/filter-list/base/inputs/SingleSelectInput.js +77 -0
  537. package/build/esm/filter-list/base/inputs/SingleSelectInput.js.map +1 -0
  538. package/build/esm/filter-list/base/inputs/SingleSelectInput.module.css +45 -0
  539. package/build/esm/filter-list/base/inputs/TextTagsInput.js +133 -0
  540. package/build/esm/filter-list/base/inputs/TextTagsInput.js.map +1 -0
  541. package/build/esm/filter-list/base/inputs/TextTagsInput.module.css +25 -0
  542. package/build/esm/filter-list/base/inputs/TimelineInput.js +74 -0
  543. package/build/esm/filter-list/base/inputs/TimelineInput.js.map +1 -0
  544. package/build/esm/filter-list/base/inputs/TimelineInput.module.css +75 -0
  545. package/build/esm/filter-list/base/inputs/createHistogramBuckets.js +53 -0
  546. package/build/esm/filter-list/base/inputs/createHistogramBuckets.js.map +1 -0
  547. package/build/esm/filter-list/base/inputs/index.js +5 -1
  548. package/build/esm/filter-list/base/inputs/index.js.map +1 -1
  549. package/build/esm/filter-list/base/inputs/shared.module.css +5 -5
  550. package/build/esm/filter-list/base/inputs/useStableData.js +29 -0
  551. package/build/esm/filter-list/base/inputs/useStableData.js.map +1 -0
  552. package/build/esm/filter-list/hooks/useFilterListState.js +56 -10
  553. package/build/esm/filter-list/hooks/useFilterListState.js.map +1 -1
  554. package/build/esm/filter-list/hooks/useFilterVisibility.js +74 -0
  555. package/build/esm/filter-list/hooks/useFilterVisibility.js.map +1 -0
  556. package/build/esm/filter-list/hooks/usePropertyAggregation.js +98 -0
  557. package/build/esm/filter-list/hooks/usePropertyAggregation.js.map +1 -0
  558. package/build/esm/filter-list/inputs/ContainsTextFilterInput.js +38 -0
  559. package/build/esm/filter-list/inputs/ContainsTextFilterInput.js.map +1 -0
  560. package/build/esm/filter-list/inputs/DateRangeFilterInput.js +109 -0
  561. package/build/esm/filter-list/inputs/DateRangeFilterInput.js.map +1 -0
  562. package/build/esm/filter-list/inputs/LinkedPropertyInput.js +496 -0
  563. package/build/esm/filter-list/inputs/LinkedPropertyInput.js.map +1 -0
  564. package/build/esm/filter-list/inputs/ListogramFilterInput.js +83 -0
  565. package/build/esm/filter-list/inputs/ListogramFilterInput.js.map +1 -0
  566. package/build/esm/filter-list/inputs/MultiDateFilterInput.js +38 -0
  567. package/build/esm/filter-list/inputs/MultiDateFilterInput.js.map +1 -0
  568. package/build/esm/filter-list/inputs/MultiSelectFilterInput.js +71 -0
  569. package/build/esm/filter-list/inputs/MultiSelectFilterInput.js.map +1 -0
  570. package/build/esm/filter-list/inputs/NumberRangeFilterInput.js +109 -0
  571. package/build/esm/filter-list/inputs/NumberRangeFilterInput.js.map +1 -0
  572. package/build/esm/filter-list/inputs/PropertyFilterInput.js +142 -0
  573. package/build/esm/filter-list/inputs/PropertyFilterInput.js.map +1 -0
  574. package/build/esm/filter-list/inputs/SingleDateFilterInput.js +38 -0
  575. package/build/esm/filter-list/inputs/SingleDateFilterInput.js.map +1 -0
  576. package/build/esm/filter-list/inputs/SingleSelectFilterInput.js +71 -0
  577. package/build/esm/filter-list/inputs/SingleSelectFilterInput.js.map +1 -0
  578. package/build/esm/filter-list/inputs/TextTagsFilterInput.js +70 -0
  579. package/build/esm/filter-list/inputs/TextTagsFilterInput.js.map +1 -0
  580. package/build/esm/filter-list/inputs/TimelineFilterInput.js +49 -0
  581. package/build/esm/filter-list/inputs/TimelineFilterInput.js.map +1 -0
  582. package/build/esm/filter-list/inputs/ToggleFilterInput.js +36 -0
  583. package/build/esm/filter-list/inputs/ToggleFilterInput.js.map +1 -0
  584. package/build/esm/filter-list/types/AggregationTypes.js +2 -0
  585. package/build/esm/filter-list/types/AggregationTypes.js.map +1 -0
  586. package/build/esm/filter-list/types/CustomRendererTypes.js.map +1 -1
  587. package/build/esm/filter-list/types/LinkedFilterTypes.js.map +1 -1
  588. package/build/esm/filter-list/types/index.js +0 -2
  589. package/build/esm/filter-list/types/index.js.map +1 -1
  590. package/build/esm/filter-list/utils/aggregationHelpers.js +44 -0
  591. package/build/esm/filter-list/utils/aggregationHelpers.js.map +1 -0
  592. package/build/esm/filter-list/utils/filterStateSerialization.js +42 -0
  593. package/build/esm/filter-list/utils/filterStateSerialization.js.map +1 -0
  594. package/build/esm/filter-list/utils/filterStateToWhereClause.js +124 -91
  595. package/build/esm/filter-list/utils/filterStateToWhereClause.js.map +1 -1
  596. package/build/esm/filter-list/utils/filterValues.js +55 -1
  597. package/build/esm/filter-list/utils/filterValues.js.map +1 -1
  598. package/build/esm/filter-list/utils/getFilterKey.js +1 -1
  599. package/build/esm/filter-list/utils/getFilterKey.js.map +1 -1
  600. package/build/esm/filter-list/utils/getFilterLabel.js +36 -0
  601. package/build/esm/filter-list/utils/getFilterLabel.js.map +1 -0
  602. package/build/esm/object-table/ColumnConfigDialog.module.css +1 -11
  603. package/build/esm/object-table/DefaultCellRenderer.js +23 -5
  604. package/build/esm/object-table/DefaultCellRenderer.js.map +1 -1
  605. package/build/esm/object-table/EditableCell.js +87 -10
  606. package/build/esm/object-table/EditableCell.js.map +1 -1
  607. package/build/esm/object-table/EditableCell.module.css +69 -2
  608. package/build/esm/object-table/LoadingCell.js +7 -3
  609. package/build/esm/object-table/LoadingCell.js.map +1 -1
  610. package/build/esm/object-table/LoadingCell.module.css +3 -21
  611. package/build/esm/object-table/LoadingRow.js +2 -1
  612. package/build/esm/object-table/LoadingRow.js.map +1 -1
  613. package/build/esm/object-table/LoadingStateTable.js +2 -1
  614. package/build/esm/object-table/LoadingStateTable.js.map +1 -1
  615. package/build/esm/object-table/MultiColumnSortDialog.js +22 -58
  616. package/build/esm/object-table/MultiColumnSortDialog.js.map +1 -1
  617. package/build/esm/object-table/MultiColumnSortDialog.module.css +0 -69
  618. package/build/esm/object-table/ObjectTable.js +16 -23
  619. package/build/esm/object-table/ObjectTable.js.map +1 -1
  620. package/build/esm/object-table/ObjectTableApi.js.map +1 -1
  621. package/build/esm/object-table/SelectionCells.js +1 -0
  622. package/build/esm/object-table/SelectionCells.js.map +1 -1
  623. package/build/esm/object-table/Table.js +23 -15
  624. package/build/esm/object-table/Table.js.map +1 -1
  625. package/build/esm/object-table/Table.module.css +0 -8
  626. package/build/esm/object-table/TableBody.js +8 -2
  627. package/build/esm/object-table/TableBody.js.map +1 -1
  628. package/build/esm/object-table/TableCell.module.css +2 -9
  629. package/build/esm/object-table/TableEditContainer.js +90 -0
  630. package/build/esm/object-table/TableEditContainer.js.map +1 -0
  631. package/build/esm/object-table/TableEditContainer.module.css +71 -0
  632. package/build/esm/object-table/TableHeader.js +4 -1
  633. package/build/esm/object-table/TableHeader.js.map +1 -1
  634. package/build/esm/object-table/TableHeader.module.css +4 -3
  635. package/build/esm/object-table/TableHeaderWithPopover.js +2 -4
  636. package/build/esm/object-table/TableHeaderWithPopover.js.map +1 -1
  637. package/build/esm/object-table/TableHeaderWithPopover.module.css +1 -12
  638. package/build/esm/object-table/TableRow.js +10 -3
  639. package/build/esm/object-table/TableRow.js.map +1 -1
  640. package/build/esm/object-table/TableRow.module.css +2 -1
  641. package/build/esm/object-table/components/AsyncValueCell.js +35 -0
  642. package/build/esm/object-table/components/AsyncValueCell.js.map +1 -0
  643. package/build/esm/object-table/hooks/useColumnDefs.js +5 -2
  644. package/build/esm/object-table/hooks/useColumnDefs.js.map +1 -1
  645. package/build/esm/object-table/hooks/useEditableTable.js +39 -11
  646. package/build/esm/object-table/hooks/useEditableTable.js.map +1 -1
  647. package/build/esm/object-table/hooks/useFunctionColumnsData.js +135 -0
  648. package/build/esm/object-table/hooks/useFunctionColumnsData.js.map +1 -0
  649. package/build/esm/object-table/hooks/useObjectTableData.js +33 -17
  650. package/build/esm/object-table/hooks/useObjectTableData.js.map +1 -1
  651. package/build/esm/object-table/hooks/useRowSelection.js +11 -8
  652. package/build/esm/object-table/hooks/useRowSelection.js.map +1 -1
  653. package/build/esm/object-table/utils/AsyncCellData.js +30 -0
  654. package/build/esm/object-table/utils/AsyncCellData.js.map +1 -0
  655. package/build/esm/object-table/utils/constants.js +1 -0
  656. package/build/esm/object-table/utils/constants.js.map +1 -1
  657. package/build/esm/object-table/utils/getCellId.js +0 -7
  658. package/build/esm/object-table/utils/getCellId.js.map +1 -1
  659. package/build/esm/object-table/utils/types.js.map +1 -1
  660. package/build/esm/pdf-viewer/PdfRenderer.js +88 -0
  661. package/build/esm/pdf-viewer/PdfRenderer.js.map +1 -0
  662. package/build/esm/pdf-viewer/PdfViewer.js +179 -0
  663. package/build/esm/pdf-viewer/PdfViewer.js.map +1 -0
  664. package/build/esm/pdf-viewer/PdfViewer.module.css +95 -0
  665. package/build/esm/pdf-viewer/PdfViewerContext.js +108 -0
  666. package/build/esm/pdf-viewer/PdfViewerContext.js.map +1 -0
  667. package/build/esm/pdf-viewer/components/PdfViewerAnnotationLayer.js +141 -0
  668. package/build/esm/pdf-viewer/components/PdfViewerAnnotationLayer.js.map +1 -0
  669. package/build/esm/pdf-viewer/components/PdfViewerAnnotationLayer.module.css +82 -0
  670. package/build/esm/pdf-viewer/components/PdfViewerContent.js +125 -0
  671. package/build/esm/pdf-viewer/components/PdfViewerContent.js.map +1 -0
  672. package/build/esm/pdf-viewer/components/PdfViewerOutlineSidebar.js +98 -0
  673. package/build/esm/pdf-viewer/components/PdfViewerOutlineSidebar.js.map +1 -0
  674. package/build/esm/pdf-viewer/components/PdfViewerOutlineSidebar.module.css +89 -0
  675. package/build/esm/pdf-viewer/components/PdfViewerSearchBar.js +84 -0
  676. package/build/esm/pdf-viewer/components/PdfViewerSearchBar.js.map +1 -0
  677. package/build/esm/pdf-viewer/components/PdfViewerSearchBar.module.css +65 -0
  678. package/build/esm/pdf-viewer/components/PdfViewerSidebar.js +78 -0
  679. package/build/esm/pdf-viewer/components/PdfViewerSidebar.js.map +1 -0
  680. package/build/esm/pdf-viewer/components/PdfViewerSidebar.module.css +37 -0
  681. package/build/esm/pdf-viewer/components/PdfViewerSidebarHeader.js +54 -0
  682. package/build/esm/pdf-viewer/components/PdfViewerSidebarHeader.js.map +1 -0
  683. package/build/esm/pdf-viewer/components/PdfViewerSidebarHeader.module.css +70 -0
  684. package/build/esm/pdf-viewer/components/PdfViewerThumbnail.js +100 -0
  685. package/build/esm/pdf-viewer/components/PdfViewerThumbnail.js.map +1 -0
  686. package/build/esm/pdf-viewer/components/PdfViewerThumbnail.module.css +26 -0
  687. package/build/esm/pdf-viewer/components/PdfViewerToolbar.js +221 -0
  688. package/build/esm/pdf-viewer/components/PdfViewerToolbar.js.map +1 -0
  689. package/build/esm/pdf-viewer/components/PdfViewerToolbar.module.css +91 -0
  690. package/build/esm/pdf-viewer/constants.js +46 -0
  691. package/build/esm/pdf-viewer/constants.js.map +1 -0
  692. package/build/esm/pdf-viewer/hooks/usePdfAnnotationPortals.js +54 -0
  693. package/build/esm/pdf-viewer/hooks/usePdfAnnotationPortals.js.map +1 -0
  694. package/build/esm/pdf-viewer/hooks/usePdfAnnotationsByPage.js +30 -0
  695. package/build/esm/pdf-viewer/hooks/usePdfAnnotationsByPage.js.map +1 -0
  696. package/build/esm/pdf-viewer/hooks/usePdfDocument.js +66 -0
  697. package/build/esm/pdf-viewer/hooks/usePdfDocument.js.map +1 -0
  698. package/build/esm/pdf-viewer/hooks/usePdfFormFields.js +341 -0
  699. package/build/esm/pdf-viewer/hooks/usePdfFormFields.js.map +1 -0
  700. package/build/esm/pdf-viewer/hooks/usePdfHighlightMode.js +227 -0
  701. package/build/esm/pdf-viewer/hooks/usePdfHighlightMode.js.map +1 -0
  702. package/build/esm/pdf-viewer/hooks/usePdfOutline.js +268 -0
  703. package/build/esm/pdf-viewer/hooks/usePdfOutline.js.map +1 -0
  704. package/build/esm/pdf-viewer/hooks/usePdfViewer.js +86 -0
  705. package/build/esm/pdf-viewer/hooks/usePdfViewer.js.map +1 -0
  706. package/build/esm/pdf-viewer/hooks/usePdfViewerCore.js +80 -0
  707. package/build/esm/pdf-viewer/hooks/usePdfViewerCore.js.map +1 -0
  708. package/build/esm/pdf-viewer/hooks/usePdfViewerSearch.js +106 -0
  709. package/build/esm/pdf-viewer/hooks/usePdfViewerSearch.js.map +1 -0
  710. package/build/esm/pdf-viewer/hooks/usePdfViewerState.js +135 -0
  711. package/build/esm/pdf-viewer/hooks/usePdfViewerState.js.map +1 -0
  712. package/build/esm/pdf-viewer/hooks/usePdfViewerSync.js +71 -0
  713. package/build/esm/pdf-viewer/hooks/usePdfViewerSync.js.map +1 -0
  714. package/build/esm/pdf-viewer/types.js +2 -0
  715. package/build/esm/pdf-viewer/types.js.map +1 -0
  716. package/build/esm/public/experimental.js +34 -0
  717. package/build/esm/public/experimental.js.map +1 -1
  718. package/build/esm/public/primitives.js +20 -0
  719. package/build/esm/public/primitives.js.map +1 -0
  720. package/build/esm/shared/ErrorBoundary.module.css +14 -14
  721. package/build/esm/{filter-list/utils → shared}/assertUnreachable.js +1 -1
  722. package/build/esm/{filter-list/utils → shared}/assertUnreachable.js.map +1 -1
  723. package/build/{browser/filter-list/base/inputs → esm/shared}/dateUtils.js +38 -2
  724. package/build/esm/shared/dateUtils.js.map +1 -0
  725. package/build/esm/shared/typedMemo.js +25 -0
  726. package/build/esm/shared/typedMemo.js.map +1 -0
  727. package/build/types/action-form/ActionForm.d.ts +4 -0
  728. package/build/types/action-form/ActionForm.d.ts.map +1 -0
  729. package/build/types/action-form/ActionFormApi.d.ts +49 -32
  730. package/build/types/action-form/ActionFormApi.d.ts.map +1 -1
  731. package/build/types/action-form/BaseForm.d.ts +3 -0
  732. package/build/types/action-form/BaseForm.d.ts.map +1 -0
  733. package/build/types/action-form/FormField.d.ts +11 -0
  734. package/build/types/action-form/FormField.d.ts.map +1 -0
  735. package/build/types/action-form/FormFieldApi.d.ts +152 -51
  736. package/build/types/action-form/FormFieldApi.d.ts.map +1 -1
  737. package/build/types/action-form/FormHeader.d.ts +6 -0
  738. package/build/types/action-form/FormHeader.d.ts.map +1 -0
  739. package/build/types/action-form/fields/CustomField.d.ts +9 -0
  740. package/build/types/action-form/fields/CustomField.d.ts.map +1 -0
  741. package/build/types/action-form/fields/DateCalendar.d.ts +9 -0
  742. package/build/types/action-form/fields/DateCalendar.d.ts.map +1 -0
  743. package/build/types/action-form/fields/DatetimePickerField.d.ts +3 -0
  744. package/build/types/action-form/fields/DatetimePickerField.d.ts.map +1 -0
  745. package/build/types/action-form/fields/DropdownField.d.ts +6 -0
  746. package/build/types/action-form/fields/DropdownField.d.ts.map +1 -0
  747. package/build/types/action-form/fields/FieldBridge.d.ts +9 -0
  748. package/build/types/action-form/fields/FieldBridge.d.ts.map +1 -0
  749. package/build/types/action-form/fields/FilePickerField.d.ts +3 -0
  750. package/build/types/action-form/fields/FilePickerField.d.ts.map +1 -0
  751. package/build/types/action-form/fields/FormFieldRenderer.d.ts +8 -0
  752. package/build/types/action-form/fields/FormFieldRenderer.d.ts.map +1 -0
  753. package/build/types/action-form/fields/LazyDateCalendar.d.ts +3 -0
  754. package/build/types/action-form/fields/LazyDateCalendar.d.ts.map +1 -0
  755. package/build/types/action-form/fields/NumberInputField.d.ts +3 -0
  756. package/build/types/action-form/fields/NumberInputField.d.ts.map +1 -0
  757. package/build/types/action-form/fields/RadioButtonsField.d.ts +3 -0
  758. package/build/types/action-form/fields/RadioButtonsField.d.ts.map +1 -0
  759. package/build/types/action-form/fields/TextAreaField.d.ts +3 -0
  760. package/build/types/action-form/fields/TextAreaField.d.ts.map +1 -0
  761. package/build/types/action-form/fields/TextInputField.d.ts +5 -0
  762. package/build/types/action-form/fields/TextInputField.d.ts.map +1 -0
  763. package/build/types/action-form/utils/coerceFieldValue.d.ts +10 -0
  764. package/build/types/action-form/utils/coerceFieldValue.d.ts.map +1 -0
  765. package/build/types/action-form/utils/getDefaultFieldDefinitions.d.ts +9 -0
  766. package/build/types/action-form/utils/getDefaultFieldDefinitions.d.ts.map +1 -0
  767. package/build/types/base-components/checkbox/Checkbox.d.ts +2 -1
  768. package/build/types/base-components/checkbox/Checkbox.d.ts.map +1 -1
  769. package/build/types/base-components/combobox/Combobox.d.ts +65 -0
  770. package/build/types/base-components/combobox/Combobox.d.ts.map +1 -0
  771. package/build/types/base-components/dialog/Dialog.d.ts +3 -2
  772. package/build/types/base-components/dialog/Dialog.d.ts.map +1 -1
  773. package/build/types/base-components/searchable-menu/SearchableMenu.d.ts +18 -0
  774. package/build/types/base-components/searchable-menu/SearchableMenu.d.ts.map +1 -0
  775. package/build/types/base-components/select/Select.d.ts +40 -0
  776. package/build/types/base-components/select/Select.d.ts.map +1 -0
  777. package/build/types/base-components/skeleton/SkeletonBar.d.ts +9 -0
  778. package/build/types/base-components/skeleton/SkeletonBar.d.ts.map +1 -0
  779. package/build/types/base-components/tooltip/Tooltip.d.ts +31 -0
  780. package/build/types/base-components/tooltip/Tooltip.d.ts.map +1 -0
  781. package/build/types/base-components/tooltip/index.d.ts +1 -0
  782. package/build/types/base-components/tooltip/index.d.ts.map +1 -0
  783. package/build/types/filter-list/FilterInput.d.ts +17 -0
  784. package/build/types/filter-list/FilterInput.d.ts.map +1 -0
  785. package/build/types/filter-list/{base/FilterList.d.ts → FilterList.d.ts} +1 -1
  786. package/build/types/filter-list/FilterList.d.ts.map +1 -0
  787. package/build/types/filter-list/FilterListApi.d.ts +49 -33
  788. package/build/types/filter-list/FilterListApi.d.ts.map +1 -1
  789. package/build/types/filter-list/FilterListItemApi.d.ts +22 -6
  790. package/build/types/filter-list/FilterListItemApi.d.ts.map +1 -1
  791. package/build/types/filter-list/base/AddFilterPopover.d.ts +13 -0
  792. package/build/types/filter-list/base/AddFilterPopover.d.ts.map +1 -0
  793. package/build/types/filter-list/base/BaseFilterList.d.ts +3 -0
  794. package/build/types/filter-list/base/BaseFilterList.d.ts.map +1 -0
  795. package/build/types/filter-list/base/BaseFilterListApi.d.ts +32 -0
  796. package/build/types/filter-list/base/BaseFilterListApi.d.ts.map +1 -0
  797. package/build/types/filter-list/base/DragHandleIcon.d.ts +2 -0
  798. package/build/types/filter-list/base/DragHandleIcon.d.ts.map +1 -0
  799. package/build/types/filter-list/base/ExcludeDropdown.d.ts +8 -0
  800. package/build/types/filter-list/base/ExcludeDropdown.d.ts.map +1 -0
  801. package/build/types/filter-list/base/FilterIcons.d.ts +10 -0
  802. package/build/types/filter-list/base/FilterIcons.d.ts.map +1 -0
  803. package/build/types/filter-list/base/FilterInputExcludeRow.d.ts +13 -0
  804. package/build/types/filter-list/base/FilterInputExcludeRow.d.ts.map +1 -0
  805. package/build/types/filter-list/base/FilterListContent.d.ts +9 -6
  806. package/build/types/filter-list/base/FilterListContent.d.ts.map +1 -1
  807. package/build/types/filter-list/base/FilterListHeader.d.ts +3 -2
  808. package/build/types/filter-list/base/FilterListHeader.d.ts.map +1 -1
  809. package/build/types/filter-list/base/FilterListItem.d.ts +10 -6
  810. package/build/types/filter-list/base/FilterListItem.d.ts.map +1 -1
  811. package/build/types/filter-list/base/SortableFilterListItem.d.ts +16 -0
  812. package/build/types/filter-list/base/SortableFilterListItem.d.ts.map +1 -0
  813. package/build/types/filter-list/base/index.d.ts +2 -2
  814. package/build/types/filter-list/base/index.d.ts.map +1 -1
  815. package/build/types/filter-list/base/inputs/ContainsTextInput.d.ts.map +1 -1
  816. package/build/types/filter-list/base/inputs/DateRangeInput.d.ts +17 -0
  817. package/build/types/filter-list/base/inputs/DateRangeInput.d.ts.map +1 -0
  818. package/build/types/filter-list/base/inputs/ListogramInput.d.ts +21 -0
  819. package/build/types/filter-list/base/inputs/ListogramInput.d.ts.map +1 -0
  820. package/build/types/filter-list/base/inputs/ListogramSkeleton.d.ts +2 -0
  821. package/build/types/filter-list/base/inputs/ListogramSkeleton.d.ts.map +1 -0
  822. package/build/types/filter-list/base/inputs/MultiSelectInput.d.ts +16 -0
  823. package/build/types/filter-list/base/inputs/MultiSelectInput.d.ts.map +1 -0
  824. package/build/types/filter-list/base/inputs/NullValueWrapper.d.ts +15 -0
  825. package/build/types/filter-list/base/inputs/NullValueWrapper.d.ts.map +1 -0
  826. package/build/types/filter-list/base/inputs/NumberRangeInput.d.ts +17 -0
  827. package/build/types/filter-list/base/inputs/NumberRangeInput.d.ts.map +1 -0
  828. package/build/types/filter-list/base/inputs/RangeInput.d.ts +30 -0
  829. package/build/types/filter-list/base/inputs/RangeInput.d.ts.map +1 -0
  830. package/build/types/filter-list/base/inputs/SingleDateInput.d.ts.map +1 -1
  831. package/build/types/filter-list/base/inputs/SingleSelectInput.d.ts +18 -0
  832. package/build/types/filter-list/base/inputs/SingleSelectInput.d.ts.map +1 -0
  833. package/build/types/filter-list/base/inputs/TextTagsInput.d.ts +18 -0
  834. package/build/types/filter-list/base/inputs/TextTagsInput.d.ts.map +1 -0
  835. package/build/types/filter-list/base/inputs/TimelineInput.d.ts +11 -0
  836. package/build/types/filter-list/base/inputs/TimelineInput.d.ts.map +1 -0
  837. package/build/types/filter-list/base/inputs/createHistogramBuckets.d.ts +16 -0
  838. package/build/types/filter-list/base/inputs/createHistogramBuckets.d.ts.map +1 -0
  839. package/build/types/filter-list/base/inputs/index.d.ts +5 -1
  840. package/build/types/filter-list/base/inputs/index.d.ts.map +1 -1
  841. package/build/types/filter-list/base/inputs/useStableData.d.ts +1 -0
  842. package/build/types/filter-list/base/inputs/useStableData.d.ts.map +1 -0
  843. package/build/types/filter-list/hooks/useFilterListState.d.ts +2 -0
  844. package/build/types/filter-list/hooks/useFilterListState.d.ts.map +1 -1
  845. package/build/types/filter-list/hooks/useFilterVisibility.d.ts +10 -0
  846. package/build/types/filter-list/hooks/useFilterVisibility.d.ts.map +1 -0
  847. package/build/types/filter-list/hooks/usePropertyAggregation.d.ts +18 -0
  848. package/build/types/filter-list/hooks/usePropertyAggregation.d.ts.map +1 -0
  849. package/build/types/filter-list/inputs/ContainsTextFilterInput.d.ts +10 -0
  850. package/build/types/filter-list/inputs/ContainsTextFilterInput.d.ts.map +1 -0
  851. package/build/types/filter-list/inputs/DateRangeFilterInput.d.ts +13 -0
  852. package/build/types/filter-list/inputs/DateRangeFilterInput.d.ts.map +1 -0
  853. package/build/types/filter-list/inputs/LinkedPropertyInput.d.ts +22 -0
  854. package/build/types/filter-list/inputs/LinkedPropertyInput.d.ts.map +1 -0
  855. package/build/types/filter-list/inputs/ListogramFilterInput.d.ts +19 -0
  856. package/build/types/filter-list/inputs/ListogramFilterInput.d.ts.map +1 -0
  857. package/build/types/filter-list/inputs/MultiDateFilterInput.d.ts +9 -0
  858. package/build/types/filter-list/inputs/MultiDateFilterInput.d.ts.map +1 -0
  859. package/build/types/filter-list/inputs/MultiSelectFilterInput.d.ts +15 -0
  860. package/build/types/filter-list/inputs/MultiSelectFilterInput.d.ts.map +1 -0
  861. package/build/types/filter-list/inputs/NumberRangeFilterInput.d.ts +13 -0
  862. package/build/types/filter-list/inputs/NumberRangeFilterInput.d.ts.map +1 -0
  863. package/build/types/filter-list/inputs/PropertyFilterInput.d.ts +19 -0
  864. package/build/types/filter-list/inputs/PropertyFilterInput.d.ts.map +1 -0
  865. package/build/types/filter-list/inputs/SingleDateFilterInput.d.ts +9 -0
  866. package/build/types/filter-list/inputs/SingleDateFilterInput.d.ts.map +1 -0
  867. package/build/types/filter-list/inputs/SingleSelectFilterInput.d.ts +15 -0
  868. package/build/types/filter-list/inputs/SingleSelectFilterInput.d.ts.map +1 -0
  869. package/build/types/filter-list/inputs/TextTagsFilterInput.d.ts +15 -0
  870. package/build/types/filter-list/inputs/TextTagsFilterInput.d.ts.map +1 -0
  871. package/build/types/filter-list/inputs/TimelineFilterInput.d.ts +9 -0
  872. package/build/types/filter-list/inputs/TimelineFilterInput.d.ts.map +1 -0
  873. package/build/types/filter-list/inputs/ToggleFilterInput.d.ts +9 -0
  874. package/build/types/filter-list/inputs/ToggleFilterInput.d.ts.map +1 -0
  875. package/build/types/filter-list/types/AggregationTypes.d.ts +5 -0
  876. package/build/types/filter-list/types/AggregationTypes.d.ts.map +1 -0
  877. package/build/types/filter-list/types/CustomRendererTypes.d.ts +2 -1
  878. package/build/types/filter-list/types/CustomRendererTypes.d.ts.map +1 -1
  879. package/build/types/filter-list/types/LinkedFilterTypes.d.ts +0 -19
  880. package/build/types/filter-list/types/LinkedFilterTypes.d.ts.map +1 -1
  881. package/build/types/filter-list/types/index.d.ts +0 -2
  882. package/build/types/filter-list/types/index.d.ts.map +1 -1
  883. package/build/types/filter-list/utils/aggregationHelpers.d.ts +9 -0
  884. package/build/types/filter-list/utils/aggregationHelpers.d.ts.map +1 -0
  885. package/build/types/filter-list/utils/filterStateSerialization.d.ts +3 -0
  886. package/build/types/filter-list/utils/filterStateSerialization.d.ts.map +1 -0
  887. package/build/types/filter-list/utils/filterStateToWhereClause.d.ts +5 -1
  888. package/build/types/filter-list/utils/filterStateToWhereClause.d.ts.map +1 -1
  889. package/build/types/filter-list/utils/filterValues.d.ts +4 -0
  890. package/build/types/filter-list/utils/filterValues.d.ts.map +1 -1
  891. package/build/types/filter-list/utils/getFilterKey.d.ts.map +1 -1
  892. package/build/types/filter-list/utils/getFilterLabel.d.ts +3 -0
  893. package/build/types/filter-list/utils/getFilterLabel.d.ts.map +1 -0
  894. package/build/types/object-table/DefaultCellRenderer.d.ts +2 -2
  895. package/build/types/object-table/DefaultCellRenderer.d.ts.map +1 -1
  896. package/build/types/object-table/EditableCell.d.ts +22 -6
  897. package/build/types/object-table/EditableCell.d.ts.map +1 -1
  898. package/build/types/object-table/LoadingCell.d.ts +1 -0
  899. package/build/types/object-table/LoadingCell.d.ts.map +1 -1
  900. package/build/types/object-table/LoadingRow.d.ts.map +1 -1
  901. package/build/types/object-table/LoadingStateTable.d.ts.map +1 -1
  902. package/build/types/object-table/MultiColumnSortDialog.d.ts.map +1 -1
  903. package/build/types/object-table/ObjectTable.d.ts +1 -9
  904. package/build/types/object-table/ObjectTable.d.ts.map +1 -1
  905. package/build/types/object-table/ObjectTableApi.d.ts +82 -22
  906. package/build/types/object-table/ObjectTableApi.d.ts.map +1 -1
  907. package/build/types/object-table/Table.d.ts +10 -10
  908. package/build/types/object-table/Table.d.ts.map +1 -1
  909. package/build/types/object-table/TableBody.d.ts +4 -1
  910. package/build/types/object-table/TableBody.d.ts.map +1 -1
  911. package/build/types/object-table/TableEditContainer.d.ts +9 -0
  912. package/build/types/object-table/TableEditContainer.d.ts.map +1 -0
  913. package/build/types/object-table/TableHeader.d.ts.map +1 -1
  914. package/build/types/object-table/TableRow.d.ts +4 -1
  915. package/build/types/object-table/TableRow.d.ts.map +1 -1
  916. package/build/types/object-table/components/AsyncValueCell.d.ts +5 -0
  917. package/build/types/object-table/components/AsyncValueCell.d.ts.map +1 -0
  918. package/build/types/object-table/hooks/useEditableTable.d.ts +4 -9
  919. package/build/types/object-table/hooks/useEditableTable.d.ts.map +1 -1
  920. package/build/types/object-table/hooks/useFunctionColumnsData.d.ts +13 -0
  921. package/build/types/object-table/hooks/useFunctionColumnsData.d.ts.map +1 -0
  922. package/build/types/object-table/hooks/useObjectTableData.d.ts +6 -1
  923. package/build/types/object-table/hooks/useObjectTableData.d.ts.map +1 -1
  924. package/build/types/object-table/hooks/useRowSelection.d.ts +3 -2
  925. package/build/types/object-table/hooks/useRowSelection.d.ts.map +1 -1
  926. package/build/types/object-table/utils/AsyncCellData.d.ts +8 -0
  927. package/build/types/object-table/utils/AsyncCellData.d.ts.map +1 -0
  928. package/build/types/object-table/utils/constants.d.ts +1 -0
  929. package/build/types/object-table/utils/constants.d.ts.map +1 -1
  930. package/build/types/object-table/utils/getCellId.d.ts +0 -1
  931. package/build/types/object-table/utils/getCellId.d.ts.map +1 -1
  932. package/build/types/object-table/utils/types.d.ts +28 -3
  933. package/build/types/object-table/utils/types.d.ts.map +1 -1
  934. package/build/types/pdf-viewer/PdfRenderer.d.ts +8 -0
  935. package/build/types/pdf-viewer/PdfRenderer.d.ts.map +1 -0
  936. package/build/types/pdf-viewer/PdfViewer.d.ts +4 -0
  937. package/build/types/pdf-viewer/PdfViewer.d.ts.map +1 -0
  938. package/build/types/pdf-viewer/PdfViewerContext.d.ts +64 -0
  939. package/build/types/pdf-viewer/PdfViewerContext.d.ts.map +1 -0
  940. package/build/types/pdf-viewer/components/PdfViewerAnnotationLayer.d.ts +9 -0
  941. package/build/types/pdf-viewer/components/PdfViewerAnnotationLayer.d.ts.map +1 -0
  942. package/build/types/pdf-viewer/components/PdfViewerContent.d.ts +26 -0
  943. package/build/types/pdf-viewer/components/PdfViewerContent.d.ts.map +1 -0
  944. package/build/types/pdf-viewer/components/PdfViewerOutlineSidebar.d.ts +11 -0
  945. package/build/types/pdf-viewer/components/PdfViewerOutlineSidebar.d.ts.map +1 -0
  946. package/build/types/pdf-viewer/components/PdfViewerSearchBar.d.ts +11 -0
  947. package/build/types/pdf-viewer/components/PdfViewerSearchBar.d.ts.map +1 -0
  948. package/build/types/pdf-viewer/components/PdfViewerSidebar.d.ts +12 -0
  949. package/build/types/pdf-viewer/components/PdfViewerSidebar.d.ts.map +1 -0
  950. package/build/types/pdf-viewer/components/PdfViewerSidebarHeader.d.ts +7 -0
  951. package/build/types/pdf-viewer/components/PdfViewerSidebarHeader.d.ts.map +1 -0
  952. package/build/types/pdf-viewer/components/PdfViewerThumbnail.d.ts +10 -0
  953. package/build/types/pdf-viewer/components/PdfViewerThumbnail.d.ts.map +1 -0
  954. package/build/types/pdf-viewer/components/PdfViewerToolbar.d.ts +21 -0
  955. package/build/types/pdf-viewer/components/PdfViewerToolbar.d.ts.map +1 -0
  956. package/build/types/pdf-viewer/constants.d.ts +22 -0
  957. package/build/types/pdf-viewer/constants.d.ts.map +1 -0
  958. package/build/types/pdf-viewer/hooks/usePdfAnnotationPortals.d.ts +10 -0
  959. package/build/types/pdf-viewer/hooks/usePdfAnnotationPortals.d.ts.map +1 -0
  960. package/build/types/pdf-viewer/hooks/usePdfAnnotationsByPage.d.ts +5 -0
  961. package/build/types/pdf-viewer/hooks/usePdfAnnotationsByPage.d.ts.map +1 -0
  962. package/build/types/pdf-viewer/hooks/usePdfDocument.d.ts +9 -0
  963. package/build/types/pdf-viewer/hooks/usePdfDocument.d.ts.map +1 -0
  964. package/build/types/pdf-viewer/hooks/usePdfFormFields.d.ts +24 -0
  965. package/build/types/pdf-viewer/hooks/usePdfFormFields.d.ts.map +1 -0
  966. package/build/types/pdf-viewer/hooks/usePdfHighlightMode.d.ts +36 -0
  967. package/build/types/pdf-viewer/hooks/usePdfHighlightMode.d.ts.map +1 -0
  968. package/build/types/pdf-viewer/hooks/usePdfOutline.d.ts +3 -0
  969. package/build/types/pdf-viewer/hooks/usePdfOutline.d.ts.map +1 -0
  970. package/build/types/pdf-viewer/hooks/usePdfViewer.d.ts +9 -0
  971. package/build/types/pdf-viewer/hooks/usePdfViewer.d.ts.map +1 -0
  972. package/build/types/pdf-viewer/hooks/usePdfViewerCore.d.ts +43 -0
  973. package/build/types/pdf-viewer/hooks/usePdfViewerCore.d.ts.map +1 -0
  974. package/build/types/pdf-viewer/hooks/usePdfViewerSearch.d.ts +15 -0
  975. package/build/types/pdf-viewer/hooks/usePdfViewerSearch.d.ts.map +1 -0
  976. package/build/types/pdf-viewer/hooks/usePdfViewerState.d.ts +39 -0
  977. package/build/types/pdf-viewer/hooks/usePdfViewerState.d.ts.map +1 -0
  978. package/build/types/pdf-viewer/hooks/usePdfViewerSync.d.ts +15 -0
  979. package/build/types/pdf-viewer/hooks/usePdfViewerSync.d.ts.map +1 -0
  980. package/build/types/pdf-viewer/types.d.ts +210 -0
  981. package/build/types/pdf-viewer/types.d.ts.map +1 -0
  982. package/build/types/public/experimental.d.ts +33 -2
  983. package/build/types/public/experimental.d.ts.map +1 -1
  984. package/build/types/public/primitives.d.ts +3 -0
  985. package/build/types/public/primitives.d.ts.map +1 -0
  986. package/build/types/shared/assertUnreachable.d.ts.map +1 -0
  987. package/build/types/shared/dateUtils.d.ts +31 -0
  988. package/build/types/shared/dateUtils.d.ts.map +1 -0
  989. package/build/types/shared/typedMemo.d.ts +6 -0
  990. package/build/types/shared/typedMemo.d.ts.map +1 -0
  991. package/package.json +23 -10
  992. package/primitives.d.ts +17 -0
  993. package/build/browser/filter-list/__tests__/dateUtils.test.js +0 -55
  994. package/build/browser/filter-list/__tests__/dateUtils.test.js.map +0 -1
  995. package/build/browser/filter-list/__tests__/filterStateToWhereClause.test.js +0 -296
  996. package/build/browser/filter-list/__tests__/filterStateToWhereClause.test.js.map +0 -1
  997. package/build/browser/filter-list/__tests__/getFilterKey.test.js +0 -53
  998. package/build/browser/filter-list/__tests__/getFilterKey.test.js.map +0 -1
  999. package/build/browser/filter-list/__tests__/testUtils.js +0 -203
  1000. package/build/browser/filter-list/__tests__/testUtils.js.map +0 -1
  1001. package/build/browser/filter-list/base/FilterInput.js +0 -225
  1002. package/build/browser/filter-list/base/FilterInput.js.map +0 -1
  1003. package/build/browser/filter-list/base/FilterList.js +0 -73
  1004. package/build/browser/filter-list/base/FilterList.js.map +0 -1
  1005. package/build/browser/filter-list/base/inputs/dateUtils.js.map +0 -1
  1006. package/build/browser/filter-list/hooks/__tests__/useFilterListState.test.js +0 -128
  1007. package/build/browser/filter-list/hooks/__tests__/useFilterListState.test.js.map +0 -1
  1008. package/build/browser/filter-list/types/AddFilterMenuTypes.js +0 -2
  1009. package/build/browser/filter-list/types/AddFilterMenuTypes.js.map +0 -1
  1010. package/build/browser/filter-list/types/FilterPanelTypes.js +0 -2
  1011. package/build/browser/filter-list/types/FilterPanelTypes.js.map +0 -1
  1012. package/build/browser/object-table/__tests__/useEditableTable.test.js +0 -197
  1013. package/build/browser/object-table/__tests__/useEditableTable.test.js.map +0 -1
  1014. package/build/browser/object-table/hooks/__tests__/useCellContextMenu.test.js +0 -147
  1015. package/build/browser/object-table/hooks/__tests__/useCellContextMenu.test.js.map +0 -1
  1016. package/build/browser/object-table/hooks/__tests__/useColumnDefs.test.js +0 -520
  1017. package/build/browser/object-table/hooks/__tests__/useColumnDefs.test.js.map +0 -1
  1018. package/build/browser/object-table/hooks/__tests__/useColumnPinning.test.js +0 -266
  1019. package/build/browser/object-table/hooks/__tests__/useColumnPinning.test.js.map +0 -1
  1020. package/build/browser/object-table/hooks/__tests__/useColumnVisibility.test.js +0 -200
  1021. package/build/browser/object-table/hooks/__tests__/useColumnVisibility.test.js.map +0 -1
  1022. package/build/browser/object-table/hooks/__tests__/useObjectTableData.test.js +0 -315
  1023. package/build/browser/object-table/hooks/__tests__/useObjectTableData.test.js.map +0 -1
  1024. package/build/browser/object-table/hooks/__tests__/useRowSelection.test.js +0 -596
  1025. package/build/browser/object-table/hooks/__tests__/useRowSelection.test.js.map +0 -1
  1026. package/build/browser/object-table/hooks/__tests__/useSelectionColumn.test.js +0 -220
  1027. package/build/browser/object-table/hooks/__tests__/useSelectionColumn.test.js.map +0 -1
  1028. package/build/browser/object-table/hooks/__tests__/useTableSorting.test.js +0 -501
  1029. package/build/browser/object-table/hooks/__tests__/useTableSorting.test.js.map +0 -1
  1030. package/build/esm/filter-list/__tests__/dateUtils.test.js +0 -55
  1031. package/build/esm/filter-list/__tests__/dateUtils.test.js.map +0 -1
  1032. package/build/esm/filter-list/__tests__/filterStateToWhereClause.test.js +0 -296
  1033. package/build/esm/filter-list/__tests__/filterStateToWhereClause.test.js.map +0 -1
  1034. package/build/esm/filter-list/__tests__/getFilterKey.test.js +0 -53
  1035. package/build/esm/filter-list/__tests__/getFilterKey.test.js.map +0 -1
  1036. package/build/esm/filter-list/__tests__/testUtils.js +0 -203
  1037. package/build/esm/filter-list/__tests__/testUtils.js.map +0 -1
  1038. package/build/esm/filter-list/base/FilterInput.js +0 -225
  1039. package/build/esm/filter-list/base/FilterInput.js.map +0 -1
  1040. package/build/esm/filter-list/base/FilterList.js +0 -73
  1041. package/build/esm/filter-list/base/FilterList.js.map +0 -1
  1042. package/build/esm/filter-list/base/inputs/dateUtils.js.map +0 -1
  1043. package/build/esm/filter-list/hooks/__tests__/useFilterListState.test.js +0 -128
  1044. package/build/esm/filter-list/hooks/__tests__/useFilterListState.test.js.map +0 -1
  1045. package/build/esm/filter-list/types/AddFilterMenuTypes.js +0 -2
  1046. package/build/esm/filter-list/types/AddFilterMenuTypes.js.map +0 -1
  1047. package/build/esm/filter-list/types/FilterPanelTypes.js +0 -2
  1048. package/build/esm/filter-list/types/FilterPanelTypes.js.map +0 -1
  1049. package/build/esm/object-table/__tests__/useEditableTable.test.js +0 -197
  1050. package/build/esm/object-table/__tests__/useEditableTable.test.js.map +0 -1
  1051. package/build/esm/object-table/hooks/__tests__/useCellContextMenu.test.js +0 -147
  1052. package/build/esm/object-table/hooks/__tests__/useCellContextMenu.test.js.map +0 -1
  1053. package/build/esm/object-table/hooks/__tests__/useColumnDefs.test.js +0 -520
  1054. package/build/esm/object-table/hooks/__tests__/useColumnDefs.test.js.map +0 -1
  1055. package/build/esm/object-table/hooks/__tests__/useColumnPinning.test.js +0 -266
  1056. package/build/esm/object-table/hooks/__tests__/useColumnPinning.test.js.map +0 -1
  1057. package/build/esm/object-table/hooks/__tests__/useColumnVisibility.test.js +0 -200
  1058. package/build/esm/object-table/hooks/__tests__/useColumnVisibility.test.js.map +0 -1
  1059. package/build/esm/object-table/hooks/__tests__/useObjectTableData.test.js +0 -315
  1060. package/build/esm/object-table/hooks/__tests__/useObjectTableData.test.js.map +0 -1
  1061. package/build/esm/object-table/hooks/__tests__/useRowSelection.test.js +0 -596
  1062. package/build/esm/object-table/hooks/__tests__/useRowSelection.test.js.map +0 -1
  1063. package/build/esm/object-table/hooks/__tests__/useSelectionColumn.test.js +0 -220
  1064. package/build/esm/object-table/hooks/__tests__/useSelectionColumn.test.js.map +0 -1
  1065. package/build/esm/object-table/hooks/__tests__/useTableSorting.test.js +0 -501
  1066. package/build/esm/object-table/hooks/__tests__/useTableSorting.test.js.map +0 -1
  1067. package/build/types/filter-list/__tests__/dateUtils.test.d.ts +0 -1
  1068. package/build/types/filter-list/__tests__/dateUtils.test.d.ts.map +0 -1
  1069. package/build/types/filter-list/__tests__/filterStateToWhereClause.test.d.ts +0 -1
  1070. package/build/types/filter-list/__tests__/filterStateToWhereClause.test.d.ts.map +0 -1
  1071. package/build/types/filter-list/__tests__/getFilterKey.test.d.ts +0 -1
  1072. package/build/types/filter-list/__tests__/getFilterKey.test.d.ts.map +0 -1
  1073. package/build/types/filter-list/__tests__/testUtils.d.ts +0 -65
  1074. package/build/types/filter-list/__tests__/testUtils.d.ts.map +0 -1
  1075. package/build/types/filter-list/base/FilterInput.d.ts +0 -13
  1076. package/build/types/filter-list/base/FilterInput.d.ts.map +0 -1
  1077. package/build/types/filter-list/base/FilterList.d.ts.map +0 -1
  1078. package/build/types/filter-list/base/inputs/dateUtils.d.ts +0 -17
  1079. package/build/types/filter-list/base/inputs/dateUtils.d.ts.map +0 -1
  1080. package/build/types/filter-list/hooks/__tests__/useFilterListState.test.d.ts +0 -1
  1081. package/build/types/filter-list/hooks/__tests__/useFilterListState.test.d.ts.map +0 -1
  1082. package/build/types/filter-list/types/AddFilterMenuTypes.d.ts +0 -77
  1083. package/build/types/filter-list/types/AddFilterMenuTypes.d.ts.map +0 -1
  1084. package/build/types/filter-list/types/FilterPanelTypes.d.ts +0 -18
  1085. package/build/types/filter-list/types/FilterPanelTypes.d.ts.map +0 -1
  1086. package/build/types/filter-list/utils/assertUnreachable.d.ts.map +0 -1
  1087. package/build/types/object-table/__tests__/useEditableTable.test.d.ts +0 -1
  1088. package/build/types/object-table/__tests__/useEditableTable.test.d.ts.map +0 -1
  1089. package/build/types/object-table/hooks/__tests__/useCellContextMenu.test.d.ts +0 -1
  1090. package/build/types/object-table/hooks/__tests__/useCellContextMenu.test.d.ts.map +0 -1
  1091. package/build/types/object-table/hooks/__tests__/useColumnDefs.test.d.ts +0 -1
  1092. package/build/types/object-table/hooks/__tests__/useColumnDefs.test.d.ts.map +0 -1
  1093. package/build/types/object-table/hooks/__tests__/useColumnPinning.test.d.ts +0 -1
  1094. package/build/types/object-table/hooks/__tests__/useColumnPinning.test.d.ts.map +0 -1
  1095. package/build/types/object-table/hooks/__tests__/useColumnVisibility.test.d.ts +0 -1
  1096. package/build/types/object-table/hooks/__tests__/useColumnVisibility.test.d.ts.map +0 -1
  1097. package/build/types/object-table/hooks/__tests__/useObjectTableData.test.d.ts +0 -1
  1098. package/build/types/object-table/hooks/__tests__/useObjectTableData.test.d.ts.map +0 -1
  1099. package/build/types/object-table/hooks/__tests__/useRowSelection.test.d.ts +0 -1
  1100. package/build/types/object-table/hooks/__tests__/useRowSelection.test.d.ts.map +0 -1
  1101. package/build/types/object-table/hooks/__tests__/useSelectionColumn.test.d.ts +0 -1
  1102. package/build/types/object-table/hooks/__tests__/useSelectionColumn.test.d.ts.map +0 -1
  1103. package/build/types/object-table/hooks/__tests__/useTableSorting.test.d.ts +0 -1
  1104. package/build/types/object-table/hooks/__tests__/useTableSorting.test.d.ts.map +0 -1
  1105. /package/build/types/{filter-list/utils → shared}/assertUnreachable.d.ts +0 -0
@@ -0,0 +1,268 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { useEffect, useState } from "react";
18
+ import { OUTLINE_HEADING_SIZE_RATIO, OUTLINE_MAX_HEADING_LENGTH } from "../constants.js";
19
+ const EMPTY_OUTLINE = [];
20
+ export function usePdfOutline(document) {
21
+ const [outlineItems, setOutlineItems] = useState(EMPTY_OUTLINE);
22
+ useEffect(function () {
23
+ if (document == null) {
24
+ setOutlineItems(EMPTY_OUTLINE);
25
+ return;
26
+ }
27
+ let cancelled = false;
28
+ void (async () => {
29
+ try {
30
+ // Try embedded bookmarks first
31
+ const outline = await document.getOutline();
32
+ if (cancelled) return;
33
+ if (outline != null && outline.length > 0) {
34
+ const items = await resolveBookmarkOutline(document, outline);
35
+ if (!cancelled) {
36
+ setOutlineItems(items);
37
+ }
38
+ return;
39
+ }
40
+
41
+ // Fall back to extracting headings from text content
42
+ const items = await extractHeadingsFromText(document);
43
+ if (!cancelled) {
44
+ setOutlineItems(items.length > 0 ? items : EMPTY_OUTLINE);
45
+ }
46
+ } catch {
47
+ // If extraction fails entirely, leave outline empty
48
+ if (!cancelled) {
49
+ setOutlineItems(EMPTY_OUTLINE);
50
+ }
51
+ }
52
+ })();
53
+ return () => {
54
+ cancelled = true;
55
+ };
56
+ }, [document]);
57
+ return outlineItems;
58
+ }
59
+ async function resolveBookmarkOutline(document, outline) {
60
+ const items = [];
61
+ const resolveItems = async (nodes, depth) => {
62
+ for (const node of nodes) {
63
+ let pageNumber = 1;
64
+ try {
65
+ if (typeof node.dest === "string") {
66
+ const dest = await document.getDestination(node.dest);
67
+ if (dest != null) {
68
+ const pageIndex = await document.getPageIndex(dest[0]);
69
+ pageNumber = pageIndex + 1;
70
+ }
71
+ } else if (Array.isArray(node.dest) && node.dest.length > 0) {
72
+ const pageIndex = await document.getPageIndex(node.dest[0]);
73
+ pageNumber = pageIndex + 1;
74
+ }
75
+ } catch {
76
+ // If destination resolution fails, default to page 1
77
+ }
78
+ items.push({
79
+ title: node.title,
80
+ depth,
81
+ pageNumber,
82
+ bold: node.bold,
83
+ italic: node.italic
84
+ });
85
+ if (node.items.length > 0) {
86
+ await resolveItems(node.items, depth + 1);
87
+ }
88
+ }
89
+ };
90
+ await resolveItems(outline, 0);
91
+ return items;
92
+ }
93
+ function isTextItem(item) {
94
+ return "str" in item && "transform" in item;
95
+ }
96
+ function roundFontSize(size) {
97
+ return Math.round(size * 10) / 10;
98
+ }
99
+
100
+ /**
101
+ * Extract the font size from a pdfjs TextItem.
102
+ * Prefer `height` when available, otherwise derive from the transform matrix.
103
+ * The transform is [scaleX, skewY, skewX, scaleY, translateX, translateY].
104
+ * Font size = sqrt(skewX² + scaleY²), which handles rotated text too.
105
+ */
106
+ function getFontSize(item) {
107
+ if (item.height > 0) {
108
+ return item.height;
109
+ }
110
+ const transform = item.transform;
111
+ if (Array.isArray(transform) && transform.length >= 4) {
112
+ return Math.sqrt(transform[2] * transform[2] + transform[3] * transform[3]);
113
+ }
114
+ return 0;
115
+ }
116
+ async function extractHeadingsFromText(document) {
117
+ const numPages = document.numPages;
118
+
119
+ // Fetch all pages' text content in parallel
120
+ const pageContents = await Promise.all(Array.from({
121
+ length: numPages
122
+ }, (_, i) => document.getPage(i + 1).then(page => page.getTextContent())));
123
+
124
+ // Collect font size frequencies across all pages
125
+ const sizeCounts = new Map();
126
+ for (const textContent of pageContents) {
127
+ for (const rawItem of textContent.items) {
128
+ const item = rawItem;
129
+ if (!isTextItem(item) || item.str.trim().length === 0) {
130
+ continue;
131
+ }
132
+ const fontSize = getFontSize(item);
133
+ if (fontSize > 0) {
134
+ const rounded = roundFontSize(fontSize);
135
+ sizeCounts.set(rounded, (sizeCounts.get(rounded) ?? 0) + 1);
136
+ }
137
+ }
138
+ }
139
+
140
+ // Find the most common font size (body text)
141
+ let bodySize = 0;
142
+ let maxCount = 0;
143
+ for (const [size, count] of sizeCounts) {
144
+ if (count > maxCount) {
145
+ maxCount = count;
146
+ bodySize = size;
147
+ }
148
+ }
149
+ if (bodySize === 0) {
150
+ return [];
151
+ }
152
+
153
+ // Heading threshold: text significantly larger than body text
154
+ const headingThreshold = bodySize * OUTLINE_HEADING_SIZE_RATIO;
155
+
156
+ // Collect all unique heading sizes above threshold
157
+ const headingSizes = new Set();
158
+ for (const [size] of sizeCounts) {
159
+ if (size >= headingThreshold) {
160
+ headingSizes.add(size);
161
+ }
162
+ }
163
+ if (headingSizes.size === 0) {
164
+ return [];
165
+ }
166
+
167
+ // Sort heading sizes descending (largest = depth 0)
168
+ const sortedSizes = [...headingSizes].sort((a, b) => b - a);
169
+ const sizeToDepth = new Map();
170
+ for (let i = 0; i < sortedSizes.length; i++) {
171
+ sizeToDepth.set(sortedSizes[i], i);
172
+ }
173
+
174
+ // Extract headings with page numbers.
175
+ // pdfjs splits visual lines into multiple TextItems (e.g. "1." and
176
+ // "Introduction" are separate items). We accumulate all items on the
177
+ // same visual line and treat the line as a heading if most of its
178
+ // content is at a heading font size.
179
+ const candidateHeadings = [];
180
+ for (let pageIdx = 0; pageIdx < pageContents.length; pageIdx++) {
181
+ const textContent = pageContents[pageIdx];
182
+ const pageNumber = pageIdx + 1;
183
+ let lineItems = [];
184
+ let linePageNumber = pageNumber;
185
+ let lineFontName = "";
186
+ let lineHeadingFontSize = 0;
187
+ let lastFlushWasHeading = false;
188
+ const flushLine = () => {
189
+ if (lineItems.length === 0) return;
190
+
191
+ // Check if the majority of the line's non-whitespace content is heading-sized
192
+ let headingChars = 0;
193
+ let totalChars = 0;
194
+ for (const li of lineItems) {
195
+ const len = li.text.trim().length;
196
+ totalChars += len;
197
+ if (sizeToDepth.has(roundFontSize(li.fontSize))) {
198
+ headingChars += len;
199
+ }
200
+ }
201
+ if (totalChars > 0 && headingChars / totalChars > 0.5) {
202
+ const fullText = lineItems.map(li => li.text).join("").trim();
203
+ if (fullText.length > 0) {
204
+ candidateHeadings.push({
205
+ text: fullText,
206
+ fontSize: lineHeadingFontSize,
207
+ pageNumber: linePageNumber,
208
+ fontName: lineFontName,
209
+ contiguous: lastFlushWasHeading
210
+ });
211
+ }
212
+ lastFlushWasHeading = true;
213
+ } else {
214
+ lastFlushWasHeading = false;
215
+ }
216
+ lineItems = [];
217
+ lineHeadingFontSize = 0;
218
+ };
219
+ for (const rawItem of textContent.items) {
220
+ const item = rawItem;
221
+ if (!isTextItem(item)) {
222
+ continue;
223
+ }
224
+ const fontSize = getFontSize(item);
225
+ const rounded = roundFontSize(fontSize);
226
+ const isHeadingSized = sizeToDepth.has(rounded);
227
+ if (isHeadingSized && lineHeadingFontSize === 0) {
228
+ lineHeadingFontSize = rounded;
229
+ linePageNumber = pageNumber;
230
+ lineFontName = item.fontName;
231
+ }
232
+ if (lineHeadingFontSize > 0) {
233
+ lineItems.push({
234
+ text: item.str,
235
+ fontSize
236
+ });
237
+ }
238
+ if (item.hasEOL) {
239
+ flushLine();
240
+ }
241
+ }
242
+
243
+ // Flush remaining items at end of page
244
+ flushLine();
245
+ }
246
+
247
+ // Merge consecutive heading lines that were contiguous (no body text between them)
248
+ // and at the same font size. This joins multi-line titles that wrap in the PDF.
249
+ const mergedHeadings = [];
250
+ for (const heading of candidateHeadings) {
251
+ const prev = mergedHeadings[mergedHeadings.length - 1];
252
+ if (prev != null && heading.contiguous && Math.abs(prev.fontSize - heading.fontSize) < 0.1) {
253
+ prev.text += " " + heading.text;
254
+ } else {
255
+ mergedHeadings.push({
256
+ ...heading
257
+ });
258
+ }
259
+ }
260
+ return mergedHeadings.filter(heading => heading.text.trim().length <= OUTLINE_MAX_HEADING_LENGTH).map(heading => ({
261
+ title: heading.text.trim(),
262
+ depth: sizeToDepth.get(heading.fontSize) ?? 0,
263
+ pageNumber: heading.pageNumber,
264
+ bold: false,
265
+ italic: false
266
+ }));
267
+ }
268
+ //# sourceMappingURL=usePdfOutline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePdfOutline.js","names":["useEffect","useState","OUTLINE_HEADING_SIZE_RATIO","OUTLINE_MAX_HEADING_LENGTH","EMPTY_OUTLINE","usePdfOutline","document","outlineItems","setOutlineItems","cancelled","outline","getOutline","length","items","resolveBookmarkOutline","extractHeadingsFromText","resolveItems","nodes","depth","node","pageNumber","dest","getDestination","pageIndex","getPageIndex","Array","isArray","push","title","bold","italic","isTextItem","item","roundFontSize","size","Math","round","getFontSize","height","transform","sqrt","numPages","pageContents","Promise","all","from","_","i","getPage","then","page","getTextContent","sizeCounts","Map","textContent","rawItem","str","trim","fontSize","rounded","set","get","bodySize","maxCount","count","headingThreshold","headingSizes","Set","add","sortedSizes","sort","a","b","sizeToDepth","candidateHeadings","pageIdx","lineItems","linePageNumber","lineFontName","lineHeadingFontSize","lastFlushWasHeading","flushLine","headingChars","totalChars","li","len","text","has","fullText","map","join","fontName","contiguous","isHeadingSized","hasEOL","mergedHeadings","heading","prev","abs","filter"],"sources":["usePdfOutline.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PDFDocumentProxy } from \"pdfjs-dist\";\nimport { useEffect, useState } from \"react\";\nimport {\n OUTLINE_HEADING_SIZE_RATIO,\n OUTLINE_MAX_HEADING_LENGTH,\n} from \"../constants.js\";\nimport type { OutlineItem } from \"../types.js\";\n\nconst EMPTY_OUTLINE: OutlineItem[] = [];\n\nexport function usePdfOutline(\n document: PDFDocumentProxy | undefined,\n): OutlineItem[] {\n const [outlineItems, setOutlineItems] = useState<OutlineItem[]>(\n EMPTY_OUTLINE,\n );\n\n useEffect(\n function loadOutline() {\n if (document == null) {\n setOutlineItems(EMPTY_OUTLINE);\n return;\n }\n\n let cancelled = false;\n\n void (async () => {\n try {\n // Try embedded bookmarks first\n const outline = await document.getOutline();\n if (cancelled) return;\n\n if (outline != null && outline.length > 0) {\n const items = await resolveBookmarkOutline(document, outline);\n if (!cancelled) {\n setOutlineItems(items);\n }\n return;\n }\n\n // Fall back to extracting headings from text content\n const items = await extractHeadingsFromText(document);\n if (!cancelled) {\n setOutlineItems(items.length > 0 ? items : EMPTY_OUTLINE);\n }\n } catch {\n // If extraction fails entirely, leave outline empty\n if (!cancelled) {\n setOutlineItems(EMPTY_OUTLINE);\n }\n }\n })();\n\n return () => {\n cancelled = true;\n };\n },\n [document],\n );\n\n return outlineItems;\n}\n\ntype BookmarkNode = Awaited<ReturnType<PDFDocumentProxy[\"getOutline\"]>>[number];\n\nasync function resolveBookmarkOutline(\n document: PDFDocumentProxy,\n outline: BookmarkNode[],\n): Promise<OutlineItem[]> {\n const items: OutlineItem[] = [];\n\n const resolveItems = async (\n nodes: BookmarkNode[],\n depth: number,\n ): Promise<void> => {\n for (const node of nodes) {\n let pageNumber = 1;\n try {\n if (typeof node.dest === \"string\") {\n const dest = await document.getDestination(node.dest);\n if (dest != null) {\n const pageIndex = await document.getPageIndex(dest[0]);\n pageNumber = pageIndex + 1;\n }\n } else if (Array.isArray(node.dest) && node.dest.length > 0) {\n const pageIndex = await document.getPageIndex(node.dest[0]);\n pageNumber = pageIndex + 1;\n }\n } catch {\n // If destination resolution fails, default to page 1\n }\n\n items.push({\n title: node.title,\n depth,\n pageNumber,\n bold: node.bold,\n italic: node.italic,\n });\n\n if (node.items.length > 0) {\n await resolveItems(node.items, depth + 1);\n }\n }\n };\n\n await resolveItems(outline, 0);\n return items;\n}\n\ninterface RawHeading {\n text: string;\n fontSize: number;\n pageNumber: number;\n fontName: string;\n /** True if this heading line immediately followed another heading line (no body text in between). */\n contiguous: boolean;\n}\n\ninterface TextItemLike {\n str: string;\n height: number;\n fontName: string;\n transform: number[];\n hasEOL: boolean;\n}\n\nfunction isTextItem(\n item: Record<string, unknown>,\n): item is Record<string, unknown> & TextItemLike {\n return \"str\" in item && \"transform\" in item;\n}\n\nfunction roundFontSize(size: number): number {\n return Math.round(size * 10) / 10;\n}\n\n/**\n * Extract the font size from a pdfjs TextItem.\n * Prefer `height` when available, otherwise derive from the transform matrix.\n * The transform is [scaleX, skewY, skewX, scaleY, translateX, translateY].\n * Font size = sqrt(skewX² + scaleY²), which handles rotated text too.\n */\nfunction getFontSize(item: TextItemLike): number {\n if (item.height > 0) {\n return item.height;\n }\n const transform = item.transform;\n if (Array.isArray(transform) && transform.length >= 4) {\n return Math.sqrt(\n (transform[2]) * (transform[2])\n + (transform[3]) * (transform[3]),\n );\n }\n return 0;\n}\n\nasync function extractHeadingsFromText(\n document: PDFDocumentProxy,\n): Promise<OutlineItem[]> {\n const numPages = document.numPages;\n\n // Fetch all pages' text content in parallel\n const pageContents = await Promise.all(\n Array.from(\n { length: numPages },\n (_, i) => document.getPage(i + 1).then(page => page.getTextContent()),\n ),\n );\n\n // Collect font size frequencies across all pages\n const sizeCounts = new Map<number, number>();\n for (const textContent of pageContents) {\n for (const rawItem of textContent.items) {\n const item = rawItem as Record<string, unknown>;\n if (!isTextItem(item) || item.str.trim().length === 0) {\n continue;\n }\n const fontSize = getFontSize(item);\n if (fontSize > 0) {\n const rounded = roundFontSize(fontSize);\n sizeCounts.set(rounded, (sizeCounts.get(rounded) ?? 0) + 1);\n }\n }\n }\n\n // Find the most common font size (body text)\n let bodySize = 0;\n let maxCount = 0;\n for (const [size, count] of sizeCounts) {\n if (count > maxCount) {\n maxCount = count;\n bodySize = size;\n }\n }\n\n if (bodySize === 0) {\n return [];\n }\n\n // Heading threshold: text significantly larger than body text\n const headingThreshold = bodySize * OUTLINE_HEADING_SIZE_RATIO;\n\n // Collect all unique heading sizes above threshold\n const headingSizes = new Set<number>();\n for (const [size] of sizeCounts) {\n if (size >= headingThreshold) {\n headingSizes.add(size);\n }\n }\n\n if (headingSizes.size === 0) {\n return [];\n }\n\n // Sort heading sizes descending (largest = depth 0)\n const sortedSizes = [...headingSizes].sort((a, b) => b - a);\n const sizeToDepth = new Map<number, number>();\n for (let i = 0; i < sortedSizes.length; i++) {\n sizeToDepth.set(sortedSizes[i], i);\n }\n\n // Extract headings with page numbers.\n // pdfjs splits visual lines into multiple TextItems (e.g. \"1.\" and\n // \"Introduction\" are separate items). We accumulate all items on the\n // same visual line and treat the line as a heading if most of its\n // content is at a heading font size.\n const candidateHeadings: RawHeading[] = [];\n\n for (let pageIdx = 0; pageIdx < pageContents.length; pageIdx++) {\n const textContent = pageContents[pageIdx];\n const pageNumber = pageIdx + 1;\n\n let lineItems: Array<{ text: string; fontSize: number }> = [];\n let linePageNumber = pageNumber;\n let lineFontName = \"\";\n let lineHeadingFontSize = 0;\n let lastFlushWasHeading = false;\n\n const flushLine = (): void => {\n if (lineItems.length === 0) return;\n\n // Check if the majority of the line's non-whitespace content is heading-sized\n let headingChars = 0;\n let totalChars = 0;\n for (const li of lineItems) {\n const len = li.text.trim().length;\n totalChars += len;\n if (sizeToDepth.has(roundFontSize(li.fontSize))) {\n headingChars += len;\n }\n }\n\n if (totalChars > 0 && headingChars / totalChars > 0.5) {\n const fullText = lineItems.map((li) => li.text).join(\"\").trim();\n if (fullText.length > 0) {\n candidateHeadings.push({\n text: fullText,\n fontSize: lineHeadingFontSize,\n pageNumber: linePageNumber,\n fontName: lineFontName,\n contiguous: lastFlushWasHeading,\n });\n }\n lastFlushWasHeading = true;\n } else {\n lastFlushWasHeading = false;\n }\n\n lineItems = [];\n lineHeadingFontSize = 0;\n };\n\n for (const rawItem of textContent.items) {\n const item = rawItem as Record<string, unknown>;\n if (!isTextItem(item)) {\n continue;\n }\n\n const fontSize = getFontSize(item);\n const rounded = roundFontSize(fontSize);\n const isHeadingSized = sizeToDepth.has(rounded);\n\n if (isHeadingSized && lineHeadingFontSize === 0) {\n lineHeadingFontSize = rounded;\n linePageNumber = pageNumber;\n lineFontName = item.fontName;\n }\n\n if (lineHeadingFontSize > 0) {\n lineItems.push({ text: item.str, fontSize });\n }\n\n if (item.hasEOL) {\n flushLine();\n }\n }\n\n // Flush remaining items at end of page\n flushLine();\n }\n\n // Merge consecutive heading lines that were contiguous (no body text between them)\n // and at the same font size. This joins multi-line titles that wrap in the PDF.\n const mergedHeadings: RawHeading[] = [];\n for (const heading of candidateHeadings) {\n const prev = mergedHeadings[mergedHeadings.length - 1];\n if (\n prev != null\n && heading.contiguous\n && Math.abs(prev.fontSize - heading.fontSize) < 0.1\n ) {\n prev.text += \" \" + heading.text;\n } else {\n mergedHeadings.push({ ...heading });\n }\n }\n\n return mergedHeadings\n .filter((heading) =>\n heading.text.trim().length <= OUTLINE_MAX_HEADING_LENGTH\n )\n .map((heading) => ({\n title: heading.text.trim(),\n depth: sizeToDepth.get(heading.fontSize) ?? 0,\n pageNumber: heading.pageNumber,\n bold: false,\n italic: false,\n }));\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SACEC,0BAA0B,EAC1BC,0BAA0B,QACrB,iBAAiB;AAGxB,MAAMC,aAA4B,GAAG,EAAE;AAEvC,OAAO,SAASC,aAAaA,CAC3BC,QAA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B,EAAE;IACvC,MAAMuB,IAAI,GAAGF,cAAc,CAACA,cAAc,CAACnF,MAAM,GAAG,CAAC,CAAC;IACtD,IACEqF,IAAI,IAAI,IAAI,IACTD,OAAO,CAACJ,UAAU,IAClBzD,IAAI,CAAC+D,GAAG,CAACD,IAAI,CAACvC,QAAQ,GAAGsC,OAAO,CAACtC,QAAQ,CAAC,GAAG,GAAG,EACnD;MACAuC,IAAI,CAACX,IAAI,IAAI,GAAG,GAAGU,OAAO,CAACV,IAAI;IACjC,CAAC,MAAM;MACLS,cAAc,CAACpE,IAAI,CAAC;QAAE,GAAGqE;MAAQ,CAAC,CAAC;IACrC;EACF;EAEA,OAAOD,cAAc,CAClBI,MAAM,CAAEH,OAAO,IACdA,OAAO,CAACV,IAAI,CAAC7B,IAAI,CAAC,CAAC,CAAC7C,MAAM,IAAIT,0BAChC,CAAC,CACAsF,GAAG,CAAEO,OAAO,KAAM;IACjBpE,KAAK,EAAEoE,OAAO,CAACV,IAAI,CAAC7B,IAAI,CAAC,CAAC;IAC1BvC,KAAK,EAAEuD,WAAW,CAACZ,GAAG,CAACmC,OAAO,CAACtC,QAAQ,CAAC,IAAI,CAAC;IAC7CtC,UAAU,EAAE4E,OAAO,CAAC5E,UAAU;IAC9BS,IAAI,EAAE,KAAK;IACXC,MAAM,EAAE;EACV,CAAC,CAAC,CAAC;AACP","ignoreList":[]}
@@ -0,0 +1,86 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { AnnotationEditorType } from "pdfjs-dist";
18
+ import { EventBus, PDFFindController, PDFLinkService, PDFViewer } from "pdfjs-dist/web/pdf_viewer.mjs";
19
+ import { useEffect, useRef } from "react";
20
+ import { PAGES_LOADED_EVENT } from "../constants.js";
21
+ export function usePdfViewer(containerRef, viewerRef, document, initialScale, initialPage) {
22
+ const pdfViewerRef = useRef(null);
23
+ const eventBusRef = useRef(null);
24
+ const findControllerRef = useRef(null);
25
+ useEffect(function () {
26
+ const container = containerRef.current;
27
+ const viewer = viewerRef.current;
28
+ if (container == null || viewer == null || document == null) {
29
+ return;
30
+ }
31
+ const eventBus = new EventBus();
32
+ const linkService = new PDFLinkService({
33
+ eventBus
34
+ });
35
+ const findController = new PDFFindController({
36
+ linkService,
37
+ eventBus,
38
+ updateMatchesCountOnProgress: true
39
+ });
40
+ const pdfViewer = new PDFViewer({
41
+ container,
42
+ viewer,
43
+ eventBus,
44
+ linkService,
45
+ findController,
46
+ removePageBorders: true,
47
+ annotationEditorMode: AnnotationEditorType.NONE,
48
+ annotationEditorHighlightColors: "yellow=#FFFF98,green=#53FFBC,blue=#80EBFF,pink=#FFCBE6,red=#FF4F5F"
49
+ });
50
+ linkService.setViewer(pdfViewer);
51
+ linkService.setDocument(document);
52
+ findController.setDocument(document);
53
+ pdfViewer.setDocument(document);
54
+
55
+ // Apply initial scale and page after pages are loaded to avoid
56
+ // "scrollPageIntoView: not a valid pageNumber" console errors.
57
+ const onPagesLoaded = () => {
58
+ if (initialScale != null) {
59
+ pdfViewer.currentScale = initialScale;
60
+ }
61
+ if (initialPage != null && initialPage > 1) {
62
+ pdfViewer.currentPageNumber = initialPage;
63
+ pdfViewer.scrollPageIntoView({
64
+ pageNumber: initialPage
65
+ });
66
+ }
67
+ eventBus.off(PAGES_LOADED_EVENT, onPagesLoaded);
68
+ };
69
+ eventBus.on(PAGES_LOADED_EVENT, onPagesLoaded);
70
+ eventBusRef.current = eventBus;
71
+ findControllerRef.current = findController;
72
+ pdfViewerRef.current = pdfViewer;
73
+ return () => {
74
+ pdfViewerRef.current = null;
75
+ eventBusRef.current = null;
76
+ findControllerRef.current = null;
77
+ pdfViewer.cleanup();
78
+ };
79
+ }, [containerRef, viewerRef, document]);
80
+ return {
81
+ pdfViewerRef,
82
+ eventBusRef,
83
+ findControllerRef
84
+ };
85
+ }
86
+ //# sourceMappingURL=usePdfViewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePdfViewer.js","names":["AnnotationEditorType","EventBus","PDFFindController","PDFLinkService","PDFViewer","useEffect","useRef","PAGES_LOADED_EVENT","usePdfViewer","containerRef","viewerRef","document","initialScale","initialPage","pdfViewerRef","eventBusRef","findControllerRef","container","current","viewer","eventBus","linkService","findController","updateMatchesCountOnProgress","pdfViewer","removePageBorders","annotationEditorMode","NONE","annotationEditorHighlightColors","setViewer","setDocument","onPagesLoaded","currentScale","currentPageNumber","scrollPageIntoView","pageNumber","off","on","cleanup"],"sources":["usePdfViewer.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AnnotationEditorType } from \"pdfjs-dist\";\nimport type { PDFDocumentProxy } from \"pdfjs-dist\";\nimport {\n EventBus,\n PDFFindController,\n PDFLinkService,\n PDFViewer,\n} from \"pdfjs-dist/web/pdf_viewer.mjs\";\nimport type { RefObject } from \"react\";\nimport { useEffect, useRef } from \"react\";\nimport { PAGES_LOADED_EVENT } from \"../constants.js\";\n\nexport interface UsePdfViewerResult {\n pdfViewerRef: RefObject<PDFViewer | null>;\n eventBusRef: RefObject<EventBus | null>;\n findControllerRef: RefObject<PDFFindController | null>;\n}\n\nexport function usePdfViewer(\n containerRef: RefObject<HTMLDivElement | null>,\n viewerRef: RefObject<HTMLDivElement | null>,\n document: PDFDocumentProxy | undefined,\n initialScale?: number,\n initialPage?: number,\n): UsePdfViewerResult {\n const pdfViewerRef = useRef<PDFViewer | null>(null);\n const eventBusRef = useRef<EventBus | null>(null);\n const findControllerRef = useRef<PDFFindController | null>(null);\n\n useEffect(function initializePdfViewer() {\n const container = containerRef.current;\n const viewer = viewerRef.current;\n if (container == null || viewer == null || document == null) {\n return;\n }\n\n const eventBus = new EventBus();\n const linkService = new PDFLinkService({ eventBus });\n const findController = new PDFFindController({\n linkService,\n eventBus,\n updateMatchesCountOnProgress: true,\n });\n\n const pdfViewer = new PDFViewer({\n container,\n viewer,\n eventBus,\n linkService,\n findController,\n removePageBorders: true,\n annotationEditorMode: AnnotationEditorType.NONE,\n annotationEditorHighlightColors:\n \"yellow=#FFFF98,green=#53FFBC,blue=#80EBFF,pink=#FFCBE6,red=#FF4F5F\",\n });\n\n linkService.setViewer(pdfViewer);\n linkService.setDocument(document);\n findController.setDocument(document);\n pdfViewer.setDocument(document);\n\n // Apply initial scale and page after pages are loaded to avoid\n // \"scrollPageIntoView: not a valid pageNumber\" console errors.\n const onPagesLoaded = () => {\n if (initialScale != null) {\n pdfViewer.currentScale = initialScale;\n }\n if (initialPage != null && initialPage > 1) {\n pdfViewer.currentPageNumber = initialPage;\n pdfViewer.scrollPageIntoView({ pageNumber: initialPage });\n }\n eventBus.off(PAGES_LOADED_EVENT, onPagesLoaded);\n };\n eventBus.on(PAGES_LOADED_EVENT, onPagesLoaded);\n\n eventBusRef.current = eventBus;\n findControllerRef.current = findController;\n pdfViewerRef.current = pdfViewer;\n\n return () => {\n pdfViewerRef.current = null;\n eventBusRef.current = null;\n findControllerRef.current = null;\n pdfViewer.cleanup();\n };\n }, [containerRef, viewerRef, document]);\n\n return { pdfViewerRef, eventBusRef, findControllerRef };\n}\n"],"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,CAACQ,SAAS,CAACL,SAAS,CAAC;IAChCH,WAAW,CAACS,WAAW,CAACnB,QAAQ,CAAC;IACjCW,cAAc,CAACQ,WAAW,CAACnB,QAAQ,CAAC;IACpCa,SAAS,CAACM,WAAW,CAACnB,QAAQ,CAAC;;IAE/B;IACA;IACA,MAAMoB,aAAa,GAAGA,CAAA,KAAM;MAC1B,IAAInB,YAAY,IAAI,IAAI,EAAE;QACxBY,SAAS,CAACQ,YAAY,GAAGpB,YAAY;MACvC;MACA,IAAIC,WAAW,IAAI,IAAI,IAAIA,WAAW,GAAG,CAAC,EAAE;QAC1CW,SAAS,CAACS,iBAAiB,GAAGpB,WAAW;QACzCW,SAAS,CAACU,kBAAkB,CAAC;UAAEC,UAAU,EAAEtB;QAAY,CAAC,CAAC;MAC3D;MACAO,QAAQ,CAACgB,GAAG,CAAC7B,kBAAkB,EAAEwB,aAAa,CAAC;IACjD,CAAC;IACDX,QAAQ,CAACiB,EAAE,CAAC9B,kBAAkB,EAAEwB,aAAa,CAAC;IAE9ChB,WAAW,CAACG,OAAO,GAAGE,QAAQ;IAC9BJ,iBAAiB,CAACE,OAAO,GAAGI,cAAc;IAC1CR,YAAY,CAACI,OAAO,GAAGM,SAAS;IAEhC,OAAO,MAAM;MACXV,YAAY,CAACI,OAAO,GAAG,IAAI;MAC3BH,WAAW,CAACG,OAAO,GAAG,IAAI;MAC1BF,iBAAiB,CAACE,OAAO,GAAG,IAAI;MAChCM,SAAS,CAACc,OAAO,CAAC,CAAC;IACrB,CAAC;EACH,CAAC,EAAE,CAAC7B,YAAY,EAAEC,SAAS,EAAEC,QAAQ,CAAC,CAAC;EAEvC,OAAO;IAAEG,YAAY;IAAEC,WAAW;IAAEC;EAAkB,CAAC;AACzD","ignoreList":[]}
@@ -0,0 +1,80 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { useCallback, useMemo, useRef, useState } from "react";
18
+ import { usePdfAnnotationPortals } from "./usePdfAnnotationPortals.js";
19
+ import { usePdfDocument } from "./usePdfDocument.js";
20
+ import { usePdfViewer } from "./usePdfViewer.js";
21
+ import { usePdfViewerSync } from "./usePdfViewerSync.js";
22
+ export function usePdfViewerCore({
23
+ src,
24
+ initialPage = 1,
25
+ initialScale = 1.0
26
+ }) {
27
+ const {
28
+ document,
29
+ numPages,
30
+ loading,
31
+ error
32
+ } = usePdfDocument(src);
33
+ const [scale, setScale] = useState(initialScale);
34
+ const [currentPage, setCurrentPage] = useState(initialPage);
35
+ const containerRef = useRef(null);
36
+ const viewerRef = useRef(null);
37
+ const {
38
+ pdfViewerRef,
39
+ eventBusRef,
40
+ findControllerRef
41
+ } = usePdfViewer(containerRef, viewerRef, document, initialScale, initialPage);
42
+ const handleScaleChange = useCallback(newScale => {
43
+ setScale(newScale);
44
+ }, []);
45
+ const handlePageChange = useCallback(page => {
46
+ setCurrentPage(page);
47
+ }, []);
48
+ const {
49
+ scrollToPage: syncScrollToPage
50
+ } = usePdfViewerSync({
51
+ pdfViewerRef,
52
+ eventBusRef,
53
+ document,
54
+ scale,
55
+ onScaleChange: handleScaleChange,
56
+ onPageChange: handlePageChange
57
+ });
58
+ const scrollToPage = useCallback(page => {
59
+ setCurrentPage(page);
60
+ syncScrollToPage(page);
61
+ }, [syncScrollToPage]);
62
+ const portalTargets = usePdfAnnotationPortals(pdfViewerRef, eventBusRef, document);
63
+ return useMemo(() => ({
64
+ document,
65
+ numPages,
66
+ loading,
67
+ error,
68
+ containerRef,
69
+ viewerRef,
70
+ currentPage,
71
+ scrollToPage,
72
+ scale,
73
+ setScale,
74
+ portalTargets,
75
+ pdfViewerRef,
76
+ eventBusRef,
77
+ findControllerRef
78
+ }), [document, numPages, loading, error, currentPage, scrollToPage, scale, setScale, portalTargets]);
79
+ }
80
+ //# sourceMappingURL=usePdfViewerCore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePdfViewerCore.js","names":["useCallback","useMemo","useRef","useState","usePdfAnnotationPortals","usePdfDocument","usePdfViewer","usePdfViewerSync","usePdfViewerCore","src","initialPage","initialScale","document","numPages","loading","error","scale","setScale","currentPage","setCurrentPage","containerRef","viewerRef","pdfViewerRef","eventBusRef","findControllerRef","handleScaleChange","newScale","handlePageChange","page","scrollToPage","syncScrollToPage","onScaleChange","onPageChange","portalTargets"],"sources":["usePdfViewerCore.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PDFDocumentProxy } from \"pdfjs-dist\";\nimport type {\n EventBus,\n PDFFindController,\n PDFViewer,\n} from \"pdfjs-dist/web/pdf_viewer.mjs\";\nimport type { RefObject } from \"react\";\nimport { useCallback, useMemo, useRef, useState } from \"react\";\nimport type { AnnotationPortalTarget } from \"./usePdfAnnotationPortals.js\";\nimport { usePdfAnnotationPortals } from \"./usePdfAnnotationPortals.js\";\nimport { usePdfDocument } from \"./usePdfDocument.js\";\nimport { usePdfViewer } from \"./usePdfViewer.js\";\nimport { usePdfViewerSync } from \"./usePdfViewerSync.js\";\n\nexport interface UsePdfViewerCoreOptions {\n /** PDF source — URL string or ArrayBuffer */\n src: string | ArrayBuffer;\n /** Initial page number (1-indexed, default 1) */\n initialPage?: number;\n /** Initial zoom scale (default 1.0) */\n initialScale?: number;\n}\n\nexport interface UsePdfViewerCoreResult {\n /** The loaded PDF document, or undefined while loading */\n document: PDFDocumentProxy | undefined;\n /** Total number of pages in the document */\n numPages: number;\n /** Whether the document is currently loading */\n loading: boolean;\n /** Error encountered while loading the document */\n error: Error | undefined;\n\n /** Ref to attach to the scroll-container div */\n containerRef: RefObject<HTMLDivElement>;\n /** Ref to attach to the inner viewer div (className=\"pdfViewer\") */\n viewerRef: RefObject<HTMLDivElement>;\n\n /** Current page number (1-indexed) */\n currentPage: number;\n /** Navigate to a specific page (updates state and scrolls the viewer) */\n scrollToPage: (page: number) => void;\n\n /** Current zoom scale */\n scale: number;\n /** Set the zoom scale directly */\n setScale: (scale: number) => void;\n\n /** Portal targets for rendering annotation overlays on each page */\n portalTargets: AnnotationPortalTarget[];\n\n /** Ref to the internal pdfjs PDFViewer instance */\n pdfViewerRef: RefObject<PDFViewer | null>;\n /** Ref to the internal pdfjs EventBus instance */\n eventBusRef: RefObject<EventBus | null>;\n /** Ref to the internal pdfjs PDFFindController instance */\n findControllerRef: RefObject<PDFFindController | null>;\n}\n\nexport function usePdfViewerCore({\n src,\n initialPage = 1,\n initialScale = 1.0,\n}: UsePdfViewerCoreOptions): UsePdfViewerCoreResult {\n const { document, numPages, loading, error } = usePdfDocument(src);\n const [scale, setScale] = useState(initialScale);\n const [currentPage, setCurrentPage] = useState(initialPage);\n const containerRef = useRef<HTMLDivElement>(null);\n const viewerRef = useRef<HTMLDivElement>(null);\n\n const { pdfViewerRef, eventBusRef, findControllerRef } = usePdfViewer(\n containerRef,\n viewerRef,\n document,\n initialScale,\n initialPage,\n );\n\n const handleScaleChange = useCallback((newScale: number) => {\n setScale(newScale);\n }, []);\n\n const handlePageChange = useCallback((page: number) => {\n setCurrentPage(page);\n }, []);\n\n const { scrollToPage: syncScrollToPage } = usePdfViewerSync({\n pdfViewerRef,\n eventBusRef,\n document,\n scale,\n onScaleChange: handleScaleChange,\n onPageChange: handlePageChange,\n });\n\n const scrollToPage = useCallback(\n (page: number) => {\n setCurrentPage(page);\n syncScrollToPage(page);\n },\n [syncScrollToPage],\n );\n\n const portalTargets = usePdfAnnotationPortals(\n pdfViewerRef,\n eventBusRef,\n document,\n );\n\n return useMemo((): UsePdfViewerCoreResult => ({\n document,\n numPages,\n loading,\n error,\n containerRef,\n viewerRef,\n currentPage,\n scrollToPage,\n scale,\n setScale,\n portalTargets,\n pdfViewerRef,\n eventBusRef,\n findControllerRef,\n }), [\n document,\n numPages,\n loading,\n error,\n currentPage,\n scrollToPage,\n scale,\n setScale,\n portalTargets,\n ]);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,SAASA,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAE9D,SAASC,uBAAuB,QAAQ,8BAA8B;AACtE,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,gBAAgB,QAAQ,uBAAuB;AA+CxD,OAAO,SAASC,gBAAgBA,CAAC;EAC/BC,GAAG;EACHC,WAAW,GAAG,CAAC;EACfC,YAAY,GAAG;AACQ,CAAC,EAA0B;EAClD,MAAM;IAAEC,QAAQ;IAAEC,QAAQ;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGV,cAAc,CAACI,GAAG,CAAC;EAClE,MAAM,CAACO,KAAK,EAAEC,QAAQ,CAAC,GAAGd,QAAQ,CAACQ,YAAY,CAAC;EAChD,MAAM,CAACO,WAAW,EAAEC,cAAc,CAAC,GAAGhB,QAAQ,CAACO,WAAW,CAAC;EAC3D,MAAMU,YAAY,GAAGlB,MAAM,CAAiB,IAAI,CAAC;EACjD,MAAMmB,SAAS,GAAGnB,MAAM,CAAiB,IAAI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Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { useCallback, useEffect, useMemo, useState } from "react";
18
+ import { EMPTY_STRING, FIND_EVENT, UPDATE_FIND_CONTROL_STATE_EVENT, UPDATE_FIND_MATCHES_COUNT_EVENT } from "../constants.js";
19
+ export function usePdfViewerSearch(eventBusRef, findControllerRef, document) {
20
+ const [query, setQueryState] = useState(EMPTY_STRING);
21
+ const [totalMatches, setTotalMatches] = useState(0);
22
+ const [currentMatchIndex, setCurrentMatchIndex] = useState(0);
23
+ const [isSearchOpen, setIsSearchOpen] = useState(false);
24
+ const dispatchFind = useCallback((queryString, findPrevious) => {
25
+ eventBusRef.current?.dispatch(FIND_EVENT, {
26
+ source: undefined,
27
+ type: "",
28
+ query: queryString,
29
+ caseSensitive: false,
30
+ highlightAll: true,
31
+ phraseSearch: true,
32
+ findPrevious
33
+ });
34
+ }, [eventBusRef]);
35
+ const dispatchFindAgain = useCallback(findPrevious => {
36
+ eventBusRef.current?.dispatch(FIND_EVENT, {
37
+ source: undefined,
38
+ type: "again",
39
+ query,
40
+ caseSensitive: false,
41
+ highlightAll: true,
42
+ phraseSearch: true,
43
+ findPrevious
44
+ });
45
+ }, [eventBusRef, query]);
46
+ const setQuery = useCallback(input => {
47
+ setQueryState(input);
48
+ if (input === EMPTY_STRING) {
49
+ setTotalMatches(0);
50
+ setCurrentMatchIndex(0);
51
+ // Dispatch empty query to clear highlights
52
+ dispatchFind(EMPTY_STRING, false);
53
+ return;
54
+ }
55
+ dispatchFind(input, false);
56
+ }, [dispatchFind]);
57
+ const nextMatch = useCallback(() => {
58
+ dispatchFindAgain(false);
59
+ }, [dispatchFindAgain]);
60
+ const prevMatch = useCallback(() => {
61
+ dispatchFindAgain(true);
62
+ }, [dispatchFindAgain]);
63
+ const openSearch = useCallback(() => {
64
+ setIsSearchOpen(true);
65
+ }, []);
66
+ const closeSearch = useCallback(() => {
67
+ setIsSearchOpen(false);
68
+ setQueryState(EMPTY_STRING);
69
+ setTotalMatches(0);
70
+ setCurrentMatchIndex(0);
71
+ // Clear highlights
72
+ dispatchFind(EMPTY_STRING, false);
73
+ }, [dispatchFind]);
74
+ useEffect(function () {
75
+ const eventBus = eventBusRef.current;
76
+ if (eventBus == null) {
77
+ return;
78
+ }
79
+ const handleMatchesCount = evt => {
80
+ setTotalMatches(evt.matchesCount.total);
81
+ setCurrentMatchIndex(evt.matchesCount.current > 0 ? evt.matchesCount.current - 1 : 0);
82
+ };
83
+ const handleControlState = evt => {
84
+ setTotalMatches(evt.matchesCount.total);
85
+ setCurrentMatchIndex(evt.matchesCount.current > 0 ? evt.matchesCount.current - 1 : 0);
86
+ };
87
+ eventBus.on(UPDATE_FIND_MATCHES_COUNT_EVENT, handleMatchesCount);
88
+ eventBus.on(UPDATE_FIND_CONTROL_STATE_EVENT, handleControlState);
89
+ return () => {
90
+ eventBus.off(UPDATE_FIND_MATCHES_COUNT_EVENT, handleMatchesCount);
91
+ eventBus.off(UPDATE_FIND_CONTROL_STATE_EVENT, handleControlState);
92
+ };
93
+ }, [eventBusRef, findControllerRef, document]);
94
+ return useMemo(() => ({
95
+ query,
96
+ totalMatches,
97
+ currentMatchIndex,
98
+ isSearchOpen,
99
+ setQuery,
100
+ nextMatch,
101
+ prevMatch,
102
+ openSearch,
103
+ closeSearch
104
+ }), [query, totalMatches, currentMatchIndex, isSearchOpen, setQuery, nextMatch, prevMatch, openSearch, closeSearch]);
105
+ }
106
+ //# sourceMappingURL=usePdfViewerSearch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePdfViewerSearch.js","names":["useCallback","useEffect","useMemo","useState","EMPTY_STRING","FIND_EVENT","UPDATE_FIND_CONTROL_STATE_EVENT","UPDATE_FIND_MATCHES_COUNT_EVENT","usePdfViewerSearch","eventBusRef","findControllerRef","document","query","setQueryState","totalMatches","setTotalMatches","currentMatchIndex","setCurrentMatchIndex","isSearchOpen","setIsSearchOpen","dispatchFind","queryString","findPrevious","current","dispatch","source","undefined","type","caseSensitive","highlightAll","phraseSearch","dispatchFindAgain","setQuery","input","nextMatch","prevMatch","openSearch","closeSearch","eventBus","handleMatchesCount","evt","matchesCount","total","handleControlState","on","off"],"sources":["usePdfViewerSearch.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PDFDocumentProxy } from \"pdfjs-dist\";\nimport type {\n EventBus,\n PDFFindController,\n} from \"pdfjs-dist/web/pdf_viewer.mjs\";\nimport type { RefObject } from \"react\";\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\nimport {\n EMPTY_STRING,\n FIND_EVENT,\n UPDATE_FIND_CONTROL_STATE_EVENT,\n UPDATE_FIND_MATCHES_COUNT_EVENT,\n} from \"../constants.js\";\n\nexport interface UsePdfViewerSearchResult {\n query: string;\n totalMatches: number;\n currentMatchIndex: number;\n isSearchOpen: boolean;\n setQuery: (query: string) => void;\n nextMatch: () => void;\n prevMatch: () => void;\n openSearch: () => void;\n closeSearch: () => void;\n}\n\nexport function usePdfViewerSearch(\n eventBusRef: RefObject<EventBus | null>,\n findControllerRef: RefObject<PDFFindController | null>,\n document: PDFDocumentProxy | undefined,\n): UsePdfViewerSearchResult {\n const [query, setQueryState] = useState(EMPTY_STRING);\n const [totalMatches, setTotalMatches] = useState(0);\n const [currentMatchIndex, setCurrentMatchIndex] = useState(0);\n const [isSearchOpen, setIsSearchOpen] = useState(false);\n\n const dispatchFind = useCallback(\n (queryString: string, findPrevious: boolean) => {\n eventBusRef.current?.dispatch(FIND_EVENT, {\n source: undefined,\n type: \"\",\n query: queryString,\n caseSensitive: false,\n highlightAll: true,\n phraseSearch: true,\n findPrevious,\n });\n },\n [eventBusRef],\n );\n\n const dispatchFindAgain = useCallback(\n (findPrevious: boolean) => {\n eventBusRef.current?.dispatch(FIND_EVENT, {\n source: undefined,\n type: \"again\",\n query,\n caseSensitive: false,\n highlightAll: true,\n phraseSearch: true,\n findPrevious,\n });\n },\n [eventBusRef, query],\n );\n\n const setQuery = useCallback(\n (input: string) => {\n setQueryState(input);\n\n if (input === EMPTY_STRING) {\n setTotalMatches(0);\n setCurrentMatchIndex(0);\n // Dispatch empty query to clear highlights\n dispatchFind(EMPTY_STRING, false);\n return;\n }\n\n dispatchFind(input, false);\n },\n [dispatchFind],\n );\n\n const nextMatch = useCallback(() => {\n dispatchFindAgain(false);\n }, [dispatchFindAgain]);\n\n const prevMatch = useCallback(() => {\n dispatchFindAgain(true);\n }, [dispatchFindAgain]);\n\n const openSearch = useCallback(() => {\n setIsSearchOpen(true);\n }, []);\n\n const closeSearch = useCallback(() => {\n setIsSearchOpen(false);\n setQueryState(EMPTY_STRING);\n setTotalMatches(0);\n setCurrentMatchIndex(0);\n // Clear highlights\n dispatchFind(EMPTY_STRING, false);\n }, [dispatchFind]);\n\n useEffect(function subscribeSearchEvents() {\n const eventBus = eventBusRef.current;\n if (eventBus == null) {\n return;\n }\n\n const handleMatchesCount = (evt: {\n matchesCount: { current: number; total: number };\n }) => {\n setTotalMatches(evt.matchesCount.total);\n setCurrentMatchIndex(\n evt.matchesCount.current > 0 ? evt.matchesCount.current - 1 : 0,\n );\n };\n\n const handleControlState = (evt: {\n state: number;\n matchesCount: { current: number; total: number };\n }) => {\n setTotalMatches(evt.matchesCount.total);\n setCurrentMatchIndex(\n evt.matchesCount.current > 0 ? evt.matchesCount.current - 1 : 0,\n );\n };\n\n eventBus.on(UPDATE_FIND_MATCHES_COUNT_EVENT, handleMatchesCount);\n eventBus.on(UPDATE_FIND_CONTROL_STATE_EVENT, handleControlState);\n\n return () => {\n eventBus.off(UPDATE_FIND_MATCHES_COUNT_EVENT, handleMatchesCount);\n eventBus.off(UPDATE_FIND_CONTROL_STATE_EVENT, handleControlState);\n };\n }, [eventBusRef, findControllerRef, document]);\n\n return useMemo((): UsePdfViewerSearchResult => ({\n query,\n totalMatches,\n currentMatchIndex,\n isSearchOpen,\n setQuery,\n nextMatch,\n prevMatch,\n openSearch,\n closeSearch,\n }), [\n query,\n totalMatches,\n currentMatchIndex,\n isSearchOpen,\n setQuery,\n nextMatch,\n prevMatch,\n openSearch,\n closeSearch,\n ]);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACjE,SACEC,YAAY,EACZC,UAAU,EACVC,+BAA+B,EAC/BC,+BAA+B,QAC1B,iBAAiB;AAcxB,OAAO,SAASC,kBAAkBA,CAChCC,WAAuC,EACvCC,iBAAsD,EACtDC,QAAsC,EACZ;EAC1B,MAAM,CAACC,KAAK,EAAEC,aAAa,CAAC,GAAGV,QAAQ,CAACC,YAAY,CAAC;EACrD,MAAM,CAACU,YAAY,EAAEC,eAAe,CAAC,GAAGZ,QAAQ,CAAC,CAAC,CAAC;EACnD,MAAM,CAACa,iBAAiB,EAAEC,oBAAoB,CAAC,GAAGd,QAAQ,CAAC,CAAC,CAAC;EAC7D,MAAM,CAACe,YAAY,EAAEC,eAAe,CAAC,GAAGhB,QAAQ,CA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