@riboseinc/paneron-registry-kit 2.2.58 → 2.2.60

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 (735) hide show
  1. package/LICENSE +21 -0
  2. package/README.adoc +67 -0
  3. package/compiled/common.js +2 -0
  4. package/compiled/index.js +42 -0
  5. package/compiled/item-classes/Tree.js +61 -0
  6. package/compiled/item-classes/treeNodes.js +56 -0
  7. package/compiled/migrations/initial.js +28 -0
  8. package/compiled/proposals/ChangeRequestContext.js +121 -0
  9. package/compiled/proposals/HistoryDrawer.js +55 -0
  10. package/compiled/proposals/ListItem.js +22 -0
  11. package/compiled/proposals/MetaProperties.js +98 -0
  12. package/compiled/proposals/NewProposalMenu.js +53 -0
  13. package/compiled/proposals/ProposalBrowser.js +141 -0
  14. package/compiled/proposals/ProposalDetail.js +27 -0
  15. package/compiled/proposals/ProposalItem.js +24 -0
  16. package/compiled/proposals/ProposalSummary.js +28 -0
  17. package/compiled/proposals/ProposalTab.js +89 -0
  18. package/compiled/proposals/ProposalType.js +62 -0
  19. package/compiled/proposals/ProposalWorkspace.js +70 -0
  20. package/compiled/proposals/Search.js +106 -0
  21. package/compiled/proposals/TransitionHistory.js +271 -0
  22. package/compiled/proposals/TransitionOptions.js +432 -0
  23. package/compiled/proposals/actionableGroups/Tree.js +170 -0
  24. package/compiled/proposals/actionableGroups/queries.js +78 -0
  25. package/compiled/proposals/actionableGroups/treeNodes.js +90 -0
  26. package/compiled/proposals/actionableGroups/types.js +2 -0
  27. package/compiled/proposals/index.js +7 -0
  28. package/compiled/proposals/objectChangeset.js +331 -0
  29. package/compiled/proposals/queries.js +5 -0
  30. package/compiled/proposals/types.js +229 -0
  31. package/compiled/types/index.js +7 -0
  32. package/compiled/types/item.js +28 -0
  33. package/compiled/types/register.js +25 -0
  34. package/compiled/types/registry.js +10 -0
  35. package/compiled/types/stakeholder.js +81 -0
  36. package/compiled/types/util.js +3 -0
  37. package/compiled/types/views.js +2 -0
  38. package/compiled/views/AnnotatedChange.js +62 -0
  39. package/compiled/views/BrowserCtx.js +20 -0
  40. package/compiled/views/FilterCriteria/CRITERIA_CONFIGURATION.js +121 -0
  41. package/compiled/views/FilterCriteria/criteriaGroupToQueryExpression.js +45 -0
  42. package/compiled/views/FilterCriteria/criteriaGroupToSummary.js +47 -0
  43. package/compiled/views/FilterCriteria/criteriaToNodes.js +92 -0
  44. package/compiled/views/FilterCriteria/index.js +75 -0
  45. package/compiled/views/FilterCriteria/models.js +45 -0
  46. package/compiled/views/FilterCriteria/mutateGroup.js +74 -0
  47. package/compiled/views/GenericRelatedItemView.js +179 -0
  48. package/compiled/views/ItemDetailsDrawer.js +21 -0
  49. package/compiled/views/ItemSearchDrawer.js +29 -0
  50. package/compiled/views/Party.js +156 -0
  51. package/compiled/views/RegisterStakeholder.js +22 -0
  52. package/compiled/views/RegisterVersion.js +20 -0
  53. package/compiled/views/SearchQuery.js +90 -0
  54. package/compiled/views/StatefulTree.js +95 -0
  55. package/compiled/views/detail/AllItems.js +31 -0
  56. package/compiled/views/detail/ChangeRequest/index.js +49 -0
  57. package/compiled/views/detail/CustomView/index.js +34 -0
  58. package/compiled/views/detail/ProposalWork.js +167 -0
  59. package/compiled/views/detail/RegisterHome/ActiveProposalDetails.js +64 -0
  60. package/compiled/views/detail/RegisterHome/Block.js +39 -0
  61. package/compiled/views/detail/RegisterHome/MetaSummary.js +27 -0
  62. package/compiled/views/detail/RegisterHome/Proposal.js +105 -0
  63. package/compiled/views/detail/RegisterHome/index.js +381 -0
  64. package/compiled/views/detail/RegisterHome2/index.js +36 -0
  65. package/compiled/views/detail/RegisterItem/RelatedItems.js +28 -0
  66. package/compiled/views/detail/RegisterItem/SupersedingItemMenu.js +27 -0
  67. package/compiled/views/detail/RegisterItem/index.js +576 -0
  68. package/compiled/views/detail/RegisterItem/index.js.map +1 -0
  69. package/compiled/views/detail/RegisterItemClass.js +59 -0
  70. package/compiled/views/detail/RegisterMeta/RegisterMetaForm.js +176 -0
  71. package/compiled/views/detail/RegisterMeta/index.js +73 -0
  72. package/compiled/views/detail/index.js +12 -0
  73. package/compiled/views/diffing/InlineDiff.js +117 -0
  74. package/compiled/views/diffing/StructuredDiff.js +38 -0
  75. package/compiled/views/hooks/useCustomView.js +14 -0
  76. package/compiled/views/hooks/useItemClassConfig.js +8 -0
  77. package/compiled/views/hooks/useItemRef.js +27 -0
  78. package/compiled/views/hooks/useLatestAcceptedProposal.js +39 -0
  79. package/compiled/views/hooks/useRegisterVersion.js +35 -0
  80. package/compiled/views/hooks/useSingleRegisterItemData.js +22 -0
  81. package/compiled/views/hooks/useStakeholder.js +2 -0
  82. package/compiled/views/index.js +247 -0
  83. package/compiled/views/itemPathUtils.js +139 -0
  84. package/compiled/views/itemQueryUtils.js +49 -0
  85. package/compiled/views/protocolRegistry.js +30 -0
  86. package/compiled/views/sidebar/Browse/index.js +291 -0
  87. package/compiled/views/sidebar/ExportImport/ExportOptions.js +56 -0
  88. package/compiled/views/sidebar/ExportImport/ImportOptions.js +9 -0
  89. package/compiled/views/sidebar/ExportImport/index.js +4 -0
  90. package/compiled/views/sidebar/ListItem.js +31 -0
  91. package/compiled/views/sidebar/Registration/index.js +89 -0
  92. package/compiled/views/sidebar/Search/index.js +129 -0
  93. package/{views → compiled/views}/sidebar/Search/index.js.map +1 -1
  94. package/compiled/views/sidebar/index.js +115 -0
  95. package/compiled/views/util.js +278 -0
  96. package/compiled/views/util.js.map +1 -0
  97. package/dependencies-local/extension-kit/SettingsContext.d.ts +8 -0
  98. package/dependencies-local/extension-kit/SettingsContext.js +19 -0
  99. package/dependencies-local/extension-kit/SettingsContext.js.map +1 -0
  100. package/dependencies-local/extension-kit/build_site.d.ts +1 -0
  101. package/dependencies-local/extension-kit/build_site.js +4 -0
  102. package/dependencies-local/extension-kit/build_site.js.map +1 -0
  103. package/dependencies-local/extension-kit/context.d.ts +18 -0
  104. package/dependencies-local/extension-kit/context.js +143 -0
  105. package/dependencies-local/extension-kit/context.js.map +1 -0
  106. package/dependencies-local/extension-kit/i18n/ContextProvider.d.ts +9 -0
  107. package/dependencies-local/extension-kit/i18n/ContextProvider.js +33 -0
  108. package/dependencies-local/extension-kit/i18n/ContextProvider.js.map +1 -0
  109. package/dependencies-local/extension-kit/i18n/context.d.ts +9 -0
  110. package/dependencies-local/extension-kit/i18n/context.js +23 -0
  111. package/dependencies-local/extension-kit/i18n/context.js.map +1 -0
  112. package/dependencies-local/extension-kit/i18n/types.d.ts +10 -0
  113. package/dependencies-local/extension-kit/i18n/types.js.map +1 -0
  114. package/dependencies-local/extension-kit/i18n/widgets.d.ts +16 -0
  115. package/dependencies-local/extension-kit/i18n/widgets.js +59 -0
  116. package/dependencies-local/extension-kit/i18n/widgets.js.map +1 -0
  117. package/dependencies-local/extension-kit/index.d.ts +16 -0
  118. package/dependencies-local/extension-kit/index.js +149 -0
  119. package/dependencies-local/extension-kit/index.js.map +1 -0
  120. package/dependencies-local/extension-kit/object-specs/index.d.ts +2 -0
  121. package/dependencies-local/extension-kit/object-specs/index.js +22 -0
  122. package/dependencies-local/extension-kit/object-specs/index.js.map +1 -0
  123. package/dependencies-local/extension-kit/object-specs/paneron-object.d.ts +7 -0
  124. package/dependencies-local/extension-kit/object-specs/paneron-object.js +159 -0
  125. package/dependencies-local/extension-kit/object-specs/paneron-object.js.map +1 -0
  126. package/dependencies-local/extension-kit/object-specs/ser-des.d.ts +32 -0
  127. package/dependencies-local/extension-kit/object-specs/ser-des.js +232 -0
  128. package/dependencies-local/extension-kit/object-specs/ser-des.js.map +1 -0
  129. package/dependencies-local/extension-kit/object-specs/yaml/custom-bool.d.ts +3 -0
  130. package/dependencies-local/extension-kit/object-specs/yaml/custom-bool.js +42 -0
  131. package/dependencies-local/extension-kit/object-specs/yaml/custom-bool.js.map +1 -0
  132. package/dependencies-local/extension-kit/object-specs/yaml/custom-timestamp.d.ts +3 -0
  133. package/dependencies-local/extension-kit/object-specs/yaml/custom-timestamp.js +110 -0
  134. package/dependencies-local/extension-kit/object-specs/yaml/custom-timestamp.js.map +1 -0
  135. package/dependencies-local/extension-kit/object-specs/yaml/index.d.ts +9 -0
  136. package/dependencies-local/extension-kit/object-specs/yaml/index.js +36 -0
  137. package/dependencies-local/extension-kit/object-specs/yaml/index.js.map +1 -0
  138. package/dependencies-local/extension-kit/object-specs/yaml/schema.d.ts +4 -0
  139. package/dependencies-local/extension-kit/object-specs/yaml/schema.js +26 -0
  140. package/dependencies-local/extension-kit/object-specs/yaml/schema.js.map +1 -0
  141. package/dependencies-local/extension-kit/settings.d.ts +9 -0
  142. package/dependencies-local/extension-kit/settings.js +17 -0
  143. package/dependencies-local/extension-kit/settings.js.map +1 -0
  144. package/dependencies-local/extension-kit/types/binary-invocation.d.ts +31 -0
  145. package/dependencies-local/extension-kit/types/binary-invocation.js.map +1 -0
  146. package/dependencies-local/extension-kit/types/buffers.d.ts +19 -0
  147. package/dependencies-local/extension-kit/types/buffers.js.map +1 -0
  148. package/dependencies-local/extension-kit/types/changes.d.ts +37 -0
  149. package/dependencies-local/extension-kit/types/changes.js +5 -0
  150. package/dependencies-local/extension-kit/types/changes.js.map +1 -0
  151. package/dependencies-local/extension-kit/types/data.d.ts +54 -0
  152. package/dependencies-local/extension-kit/types/data.js +5 -0
  153. package/dependencies-local/extension-kit/types/data.js.map +1 -0
  154. package/dependencies-local/extension-kit/types/dialogs.d.ts +21 -0
  155. package/dependencies-local/extension-kit/types/dialogs.js +5 -0
  156. package/dependencies-local/extension-kit/types/dialogs.js.map +1 -0
  157. package/dependencies-local/extension-kit/types/export-formats.d.ts +23 -0
  158. package/dependencies-local/extension-kit/types/export-formats.js +5 -0
  159. package/dependencies-local/extension-kit/types/export-formats.js.map +1 -0
  160. package/dependencies-local/extension-kit/types/extension-maker.d.ts +17 -0
  161. package/dependencies-local/extension-kit/types/extension-maker.js +5 -0
  162. package/dependencies-local/extension-kit/types/extension-maker.js.map +1 -0
  163. package/dependencies-local/extension-kit/types/extension.d.ts +40 -0
  164. package/dependencies-local/extension-kit/types/extension.js +5 -0
  165. package/dependencies-local/extension-kit/types/extension.js.map +1 -0
  166. package/dependencies-local/extension-kit/types/index.d.ts +3 -0
  167. package/dependencies-local/extension-kit/types/index.js +41 -0
  168. package/dependencies-local/extension-kit/types/index.js.map +1 -0
  169. package/dependencies-local/extension-kit/types/indexes.d.ts +6 -0
  170. package/dependencies-local/extension-kit/types/indexes.js +15 -0
  171. package/dependencies-local/extension-kit/types/indexes.js.map +1 -0
  172. package/dependencies-local/extension-kit/types/migrations.d.ts +35 -0
  173. package/dependencies-local/extension-kit/types/migrations.js +5 -0
  174. package/dependencies-local/extension-kit/types/migrations.js.map +1 -0
  175. package/dependencies-local/extension-kit/types/object-spec.d.ts +109 -0
  176. package/dependencies-local/extension-kit/types/object-spec.js +24 -0
  177. package/dependencies-local/extension-kit/types/object-spec.js.map +1 -0
  178. package/dependencies-local/extension-kit/types/objects.d.ts +18 -0
  179. package/dependencies-local/extension-kit/types/objects.js +5 -0
  180. package/dependencies-local/extension-kit/types/objects.js.map +1 -0
  181. package/dependencies-local/extension-kit/types/progress.d.ts +5 -0
  182. package/dependencies-local/extension-kit/types/progress.js +5 -0
  183. package/dependencies-local/extension-kit/types/progress.js.map +1 -0
  184. package/dependencies-local/extension-kit/types/renderer.d.ts +505 -0
  185. package/dependencies-local/extension-kit/types/renderer.js +16 -0
  186. package/dependencies-local/extension-kit/types/renderer.js.map +1 -0
  187. package/dependencies-local/extension-kit/useDebounce.d.ts +5 -0
  188. package/dependencies-local/extension-kit/useDebounce.js +25 -0
  189. package/dependencies-local/extension-kit/useDebounce.js.map +1 -0
  190. package/dependencies-local/extension-kit/usePersistentStateReducer.d.ts +39 -0
  191. package/dependencies-local/extension-kit/usePersistentStateReducer.js +133 -0
  192. package/dependencies-local/extension-kit/usePersistentStateReducer.js.map +1 -0
  193. package/dependencies-local/extension-kit/useTimeTravelingPersistentStateReducer.d.ts +71 -0
  194. package/dependencies-local/extension-kit/useTimeTravelingPersistentStateReducer.js +107 -0
  195. package/dependencies-local/extension-kit/useTimeTravelingPersistentStateReducer.js.map +1 -0
  196. package/dependencies-local/extension-kit/util.d.ts +37 -0
  197. package/dependencies-local/extension-kit/util.js +179 -0
  198. package/dependencies-local/extension-kit/util.js.map +1 -0
  199. package/dependencies-local/extension-kit/widgets/DL.d.ts +44 -0
  200. package/dependencies-local/extension-kit/widgets/DL.js +89 -0
  201. package/dependencies-local/extension-kit/widgets/DL.js.map +1 -0
  202. package/dependencies-local/extension-kit/widgets/ErrorBoundary.d.ts +17 -0
  203. package/dependencies-local/extension-kit/widgets/ErrorBoundary.js +49 -0
  204. package/dependencies-local/extension-kit/widgets/ErrorBoundary.js.map +1 -0
  205. package/dependencies-local/extension-kit/widgets/ErrorState.d.ts +10 -0
  206. package/dependencies-local/extension-kit/widgets/ErrorState.js +54 -0
  207. package/dependencies-local/extension-kit/widgets/ErrorState.js.map +1 -0
  208. package/dependencies-local/extension-kit/widgets/Grid.d.ts +41 -0
  209. package/dependencies-local/extension-kit/widgets/Grid.js +213 -0
  210. package/dependencies-local/extension-kit/widgets/Grid.js.map +1 -0
  211. package/dependencies-local/extension-kit/widgets/HelpTooltip.d.ts +18 -0
  212. package/dependencies-local/extension-kit/widgets/HelpTooltip.js +72 -0
  213. package/dependencies-local/extension-kit/widgets/HelpTooltip.js.map +1 -0
  214. package/dependencies-local/extension-kit/widgets/ItemCount.d.ts +19 -0
  215. package/dependencies-local/extension-kit/widgets/ItemCount.js +79 -0
  216. package/dependencies-local/extension-kit/widgets/ItemCount.js.map +1 -0
  217. package/dependencies-local/extension-kit/widgets/List.d.ts +41 -0
  218. package/dependencies-local/extension-kit/widgets/List.js +210 -0
  219. package/dependencies-local/extension-kit/widgets/List.js.map +1 -0
  220. package/dependencies-local/extension-kit/widgets/Navbar.d.ts +20 -0
  221. package/dependencies-local/extension-kit/widgets/Navbar.js +76 -0
  222. package/dependencies-local/extension-kit/widgets/Navbar.js.map +1 -0
  223. package/dependencies-local/extension-kit/widgets/Navbar2.d.ts +17 -0
  224. package/dependencies-local/extension-kit/widgets/Navbar2.js +95 -0
  225. package/dependencies-local/extension-kit/widgets/Navbar2.js.map +1 -0
  226. package/dependencies-local/extension-kit/widgets/OperationQueue/context.d.ts +17 -0
  227. package/dependencies-local/extension-kit/widgets/OperationQueue/context.js +21 -0
  228. package/dependencies-local/extension-kit/widgets/OperationQueue/context.js.map +1 -0
  229. package/dependencies-local/extension-kit/widgets/OperationQueue/index.d.ts +8 -0
  230. package/dependencies-local/extension-kit/widgets/OperationQueue/index.js +159 -0
  231. package/dependencies-local/extension-kit/widgets/OperationQueue/index.js.map +1 -0
  232. package/dependencies-local/extension-kit/widgets/OperationQueue/types.d.ts +19 -0
  233. package/dependencies-local/extension-kit/widgets/OperationQueue/types.js +5 -0
  234. package/dependencies-local/extension-kit/widgets/OperationQueue/types.js.map +1 -0
  235. package/dependencies-local/extension-kit/widgets/SearchResultList.d.ts +31 -0
  236. package/dependencies-local/extension-kit/widgets/SearchResultList.js +203 -0
  237. package/dependencies-local/extension-kit/widgets/SearchResultList.js.map +1 -0
  238. package/dependencies-local/extension-kit/widgets/Sidebar/Block.d.ts +24 -0
  239. package/dependencies-local/extension-kit/widgets/Sidebar/Block.js +109 -0
  240. package/dependencies-local/extension-kit/widgets/Sidebar/Block.js.map +1 -0
  241. package/dependencies-local/extension-kit/widgets/Sidebar/BlockStateButtonGroup.d.ts +6 -0
  242. package/dependencies-local/extension-kit/widgets/Sidebar/BlockStateButtonGroup.js +23 -0
  243. package/dependencies-local/extension-kit/widgets/Sidebar/BlockStateButtonGroup.js.map +1 -0
  244. package/dependencies-local/extension-kit/widgets/Sidebar/PropertyView.d.ts +29 -0
  245. package/dependencies-local/extension-kit/widgets/Sidebar/PropertyView.js +157 -0
  246. package/dependencies-local/extension-kit/widgets/Sidebar/PropertyView.js.map +1 -0
  247. package/dependencies-local/extension-kit/widgets/Sidebar/index.d.ts +27 -0
  248. package/dependencies-local/extension-kit/widgets/Sidebar/index.js +197 -0
  249. package/dependencies-local/extension-kit/widgets/Sidebar/index.js.map +1 -0
  250. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/SuperSidebar.d.ts +29 -0
  251. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/SuperSidebar.js +135 -0
  252. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/SuperSidebar.js.map +1 -0
  253. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/context.d.ts +10 -0
  254. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/context.js +205 -0
  255. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/context.js.map +1 -0
  256. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/detail.d.ts +9 -0
  257. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/detail.js +69 -0
  258. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/detail.js.map +1 -0
  259. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/index.d.ts +54 -0
  260. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/index.js +301 -0
  261. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/index.js.map +1 -0
  262. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/types.d.ts +102 -0
  263. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/types.js +5 -0
  264. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/types.js.map +1 -0
  265. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/util.d.ts +1 -0
  266. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/util.js +14 -0
  267. package/dependencies-local/extension-kit/widgets/TabbedWorkspace/util.js.map +1 -0
  268. package/dependencies-local/extension-kit/widgets/Workspace.d.ts +40 -0
  269. package/dependencies-local/extension-kit/widgets/Workspace.js +96 -0
  270. package/dependencies-local/extension-kit/widgets/Workspace.js.map +1 -0
  271. package/dependencies-local/extension-kit/widgets/panels/PanelSeparator.d.ts +12 -0
  272. package/dependencies-local/extension-kit/widgets/panels/PanelSeparator.js +60 -0
  273. package/dependencies-local/extension-kit/widgets/panels/PanelSeparator.js.map +1 -0
  274. package/dependencies-local/extension-kit/widgets/panels/index.d.ts +28 -0
  275. package/dependencies-local/extension-kit/widgets/panels/index.js +169 -0
  276. package/dependencies-local/extension-kit/widgets/panels/index.js.map +1 -0
  277. package/dist/common.d.ts +1 -0
  278. package/dist/common.js.map +1 -0
  279. package/dist/index.d.ts +18 -0
  280. package/dist/index.js.map +1 -0
  281. package/dist/item-classes/Tree.d.ts +5 -0
  282. package/dist/item-classes/Tree.js.map +1 -0
  283. package/dist/item-classes/treeNodes.d.ts +12 -0
  284. package/dist/item-classes/treeNodes.js.map +1 -0
  285. package/dist/migrations/initial.d.ts +3 -0
  286. package/dist/migrations/initial.js.map +1 -0
  287. package/dist/proposals/ChangeRequestContext.d.ts +44 -0
  288. package/dist/proposals/ChangeRequestContext.js.map +1 -0
  289. package/dist/proposals/HistoryDrawer.d.ts +12 -0
  290. package/dist/proposals/HistoryDrawer.js.map +1 -0
  291. package/dist/proposals/ListItem.d.ts +9 -0
  292. package/dist/proposals/ListItem.js.map +1 -0
  293. package/dist/proposals/MetaProperties.d.ts +14 -0
  294. package/dist/proposals/MetaProperties.js.map +1 -0
  295. package/dist/proposals/NewProposalMenu.d.ts +10 -0
  296. package/dist/proposals/NewProposalMenu.js.map +1 -0
  297. package/dist/proposals/ProposalBrowser.d.ts +29 -0
  298. package/dist/proposals/ProposalBrowser.js.map +1 -0
  299. package/dist/proposals/ProposalDetail.d.ts +6 -0
  300. package/dist/proposals/ProposalDetail.js.map +1 -0
  301. package/dist/proposals/ProposalItem.d.ts +16 -0
  302. package/dist/proposals/ProposalItem.js.map +1 -0
  303. package/dist/proposals/ProposalSummary.d.ts +6 -0
  304. package/dist/proposals/ProposalSummary.js.map +1 -0
  305. package/dist/proposals/ProposalTab.d.ts +14 -0
  306. package/dist/proposals/ProposalTab.js.map +1 -0
  307. package/dist/proposals/ProposalType.d.ts +11 -0
  308. package/dist/proposals/ProposalType.js.map +1 -0
  309. package/dist/proposals/ProposalWorkspace.d.ts +15 -0
  310. package/dist/proposals/ProposalWorkspace.js.map +1 -0
  311. package/dist/proposals/Search.d.ts +26 -0
  312. package/dist/proposals/Search.js.map +1 -0
  313. package/dist/proposals/TransitionHistory.d.ts +31 -0
  314. package/dist/proposals/TransitionHistory.js.map +1 -0
  315. package/dist/proposals/TransitionOptions.d.ts +38 -0
  316. package/dist/proposals/TransitionOptions.js.map +1 -0
  317. package/dist/proposals/actionableGroups/Tree.d.ts +7 -0
  318. package/dist/proposals/actionableGroups/Tree.js.map +1 -0
  319. package/dist/proposals/actionableGroups/queries.d.ts +4 -0
  320. package/dist/proposals/actionableGroups/queries.js.map +1 -0
  321. package/dist/proposals/actionableGroups/treeNodes.d.ts +27 -0
  322. package/dist/proposals/actionableGroups/treeNodes.js.map +1 -0
  323. package/dist/proposals/actionableGroups/types.d.ts +6 -0
  324. package/dist/proposals/actionableGroups/types.js +5 -0
  325. package/dist/proposals/actionableGroups/types.js.map +1 -0
  326. package/dist/proposals/index.d.ts +6 -0
  327. package/dist/proposals/index.js.map +1 -0
  328. package/dist/proposals/objectChangeset.d.ts +72 -0
  329. package/dist/proposals/objectChangeset.js.map +1 -0
  330. package/dist/proposals/queries.d.ts +4 -0
  331. package/dist/proposals/queries.js.map +1 -0
  332. package/dist/proposals/types.d.ts +332 -0
  333. package/dist/proposals/types.js.map +1 -0
  334. package/dist/types/index.d.ts +6 -0
  335. package/dist/types/index.js.map +1 -0
  336. package/dist/types/item.d.ts +55 -0
  337. package/dist/types/item.js.map +1 -0
  338. package/dist/types/register.d.ts +21 -0
  339. package/dist/types/register.js.map +1 -0
  340. package/dist/types/registry.d.ts +15 -0
  341. package/dist/types/registry.js.map +1 -0
  342. package/dist/types/stakeholder.d.ts +43 -0
  343. package/dist/types/stakeholder.js.map +1 -0
  344. package/dist/types/util.d.ts +28 -0
  345. package/dist/types/util.js +5 -0
  346. package/dist/types/util.js.map +1 -0
  347. package/dist/types/views.d.ts +228 -0
  348. package/dist/types/views.js +5 -0
  349. package/dist/types/views.js.map +1 -0
  350. package/dist/views/AnnotatedChange.d.ts +7 -0
  351. package/dist/views/AnnotatedChange.js.map +1 -0
  352. package/dist/views/BrowserCtx.d.ts +69 -0
  353. package/dist/views/BrowserCtx.js.map +1 -0
  354. package/dist/views/FilterCriteria/CRITERIA_CONFIGURATION.d.ts +17 -0
  355. package/dist/views/FilterCriteria/CRITERIA_CONFIGURATION.js.map +1 -0
  356. package/dist/views/FilterCriteria/criteriaGroupToQueryExpression.d.ts +6 -0
  357. package/dist/views/FilterCriteria/criteriaGroupToQueryExpression.js.map +1 -0
  358. package/dist/views/FilterCriteria/criteriaGroupToSummary.d.ts +5 -0
  359. package/dist/views/FilterCriteria/criteriaGroupToSummary.js.map +1 -0
  360. package/dist/views/FilterCriteria/criteriaToNodes.d.ts +24 -0
  361. package/dist/views/FilterCriteria/criteriaToNodes.js.map +1 -0
  362. package/dist/views/FilterCriteria/index.d.ts +23 -0
  363. package/dist/views/FilterCriteria/index.js.map +1 -0
  364. package/dist/views/FilterCriteria/models.d.ts +70 -0
  365. package/dist/views/FilterCriteria/models.js.map +1 -0
  366. package/dist/views/FilterCriteria/mutateGroup.d.ts +24 -0
  367. package/dist/views/FilterCriteria/mutateGroup.js.map +1 -0
  368. package/dist/views/GenericRelatedItemView.d.ts +9 -0
  369. package/dist/views/GenericRelatedItemView.js.map +1 -0
  370. package/dist/views/ItemDetailsDrawer.d.ts +12 -0
  371. package/dist/views/ItemDetailsDrawer.js.map +1 -0
  372. package/dist/views/ItemSearchDrawer.d.ts +11 -0
  373. package/dist/views/ItemSearchDrawer.js.map +1 -0
  374. package/dist/views/Party.d.ts +0 -0
  375. package/dist/views/Party.js.map +1 -0
  376. package/dist/views/RegisterStakeholder.d.ts +12 -0
  377. package/dist/views/RegisterStakeholder.js.map +1 -0
  378. package/dist/views/RegisterVersion.d.ts +9 -0
  379. package/dist/views/RegisterVersion.js.map +1 -0
  380. package/dist/views/SearchQuery.d.ts +19 -0
  381. package/dist/views/SearchQuery.js.map +1 -0
  382. package/dist/views/StatefulTree.d.ts +28 -0
  383. package/dist/views/StatefulTree.js.map +1 -0
  384. package/dist/views/detail/AllItems.d.ts +8 -0
  385. package/dist/views/detail/AllItems.js.map +1 -0
  386. package/dist/views/detail/ChangeRequest/index.d.ts +12 -0
  387. package/dist/views/detail/ChangeRequest/index.js.map +1 -0
  388. package/dist/views/detail/CustomView/index.d.ts +13 -0
  389. package/dist/views/detail/CustomView/index.js.map +1 -0
  390. package/dist/views/detail/ProposalWork.d.ts +8 -0
  391. package/dist/views/detail/ProposalWork.js.map +1 -0
  392. package/dist/views/detail/RegisterHome/ActiveProposalDetails.d.ts +15 -0
  393. package/dist/views/detail/RegisterHome/ActiveProposalDetails.js.map +1 -0
  394. package/dist/views/detail/RegisterHome/Block.d.ts +29 -0
  395. package/dist/views/detail/RegisterHome/Block.js.map +1 -0
  396. package/dist/views/detail/RegisterHome/MetaSummary.d.ts +9 -0
  397. package/dist/views/detail/RegisterHome/MetaSummary.js.map +1 -0
  398. package/dist/views/detail/RegisterHome/Proposal.d.ts +14 -0
  399. package/dist/views/detail/RegisterHome/Proposal.js.map +1 -0
  400. package/dist/views/detail/RegisterHome/index.d.ts +5 -0
  401. package/dist/views/detail/RegisterHome/index.js.map +1 -0
  402. package/dist/views/detail/RegisterHome2/index.d.ts +5 -0
  403. package/dist/views/detail/RegisterHome2/index.js.map +1 -0
  404. package/dist/views/detail/RegisterItem/RelatedItems.d.ts +14 -0
  405. package/dist/views/detail/RegisterItem/RelatedItems.js.map +1 -0
  406. package/dist/views/detail/RegisterItem/SupersedingItemMenu.d.ts +13 -0
  407. package/dist/views/detail/RegisterItem/SupersedingItemMenu.js.map +1 -0
  408. package/dist/views/detail/RegisterItem/index.d.ts +21 -0
  409. package/{views → dist/views}/detail/RegisterItem/index.js +1 -1
  410. package/dist/views/detail/RegisterItem/index.js.map +1 -0
  411. package/dist/views/detail/RegisterItemClass.d.ts +12 -0
  412. package/dist/views/detail/RegisterItemClass.js.map +1 -0
  413. package/dist/views/detail/RegisterMeta/RegisterMetaForm.d.ts +10 -0
  414. package/dist/views/detail/RegisterMeta/RegisterMetaForm.js.map +1 -0
  415. package/dist/views/detail/RegisterMeta/index.d.ts +10 -0
  416. package/dist/views/detail/RegisterMeta/index.js.map +1 -0
  417. package/dist/views/detail/index.d.ts +1 -0
  418. package/dist/views/detail/index.js.map +1 -0
  419. package/dist/views/diffing/InlineDiff.d.ts +38 -0
  420. package/dist/views/diffing/InlineDiff.js.map +1 -0
  421. package/dist/views/diffing/StructuredDiff.d.ts +11 -0
  422. package/dist/views/diffing/StructuredDiff.js.map +1 -0
  423. package/dist/views/hooks/useCustomView.d.ts +3 -0
  424. package/dist/views/hooks/useCustomView.js.map +1 -0
  425. package/dist/views/hooks/useItemClassConfig.d.ts +2 -0
  426. package/dist/views/hooks/useItemClassConfig.js.map +1 -0
  427. package/dist/views/hooks/useItemRef.d.ts +3 -0
  428. package/dist/views/hooks/useItemRef.js.map +1 -0
  429. package/dist/views/hooks/useLatestAcceptedProposal.d.ts +2 -0
  430. package/dist/views/hooks/useLatestAcceptedProposal.js.map +1 -0
  431. package/dist/views/hooks/useRegisterVersion.d.ts +5 -0
  432. package/dist/views/hooks/useRegisterVersion.js.map +1 -0
  433. package/dist/views/hooks/useSingleRegisterItemData.d.ts +3 -0
  434. package/dist/views/hooks/useSingleRegisterItemData.js.map +1 -0
  435. package/dist/views/hooks/useStakeholder.d.ts +0 -0
  436. package/dist/views/hooks/useStakeholder.js.map +1 -0
  437. package/dist/views/index.d.ts +8 -0
  438. package/dist/views/index.js.map +1 -0
  439. package/dist/views/itemPathUtils.d.ts +47 -0
  440. package/dist/views/itemPathUtils.js.map +1 -0
  441. package/dist/views/itemQueryUtils.d.ts +12 -0
  442. package/dist/views/itemQueryUtils.js.map +1 -0
  443. package/dist/views/protocolRegistry.d.ts +14 -0
  444. package/dist/views/protocolRegistry.js.map +1 -0
  445. package/dist/views/sidebar/Browse/index.d.ts +11 -0
  446. package/dist/views/sidebar/Browse/index.js.map +1 -0
  447. package/dist/views/sidebar/ExportImport/ExportOptions.d.ts +5 -0
  448. package/dist/views/sidebar/ExportImport/ExportOptions.js.map +1 -0
  449. package/dist/views/sidebar/ExportImport/ImportOptions.d.ts +4 -0
  450. package/dist/views/sidebar/ExportImport/ImportOptions.js.map +1 -0
  451. package/dist/views/sidebar/ExportImport/index.d.ts +3 -0
  452. package/dist/views/sidebar/ExportImport/index.js.map +1 -0
  453. package/dist/views/sidebar/ListItem.d.ts +10 -0
  454. package/dist/views/sidebar/ListItem.js.map +1 -0
  455. package/dist/views/sidebar/Registration/index.d.ts +9 -0
  456. package/dist/views/sidebar/Registration/index.js.map +1 -0
  457. package/dist/views/sidebar/Search/index.d.ts +29 -0
  458. package/{views → dist/views}/sidebar/Search/index.js +1 -1
  459. package/dist/views/sidebar/Search/index.js.map +1 -0
  460. package/dist/views/sidebar/index.d.ts +7 -0
  461. package/dist/views/sidebar/index.js.map +1 -0
  462. package/dist/views/util.d.ts +98 -0
  463. package/{views → dist/views}/util.js +33 -7
  464. package/dist/views/util.js.map +1 -0
  465. package/package.json +1 -1
  466. package/react-visual-diff.d.ts +9 -0
  467. package/views/detail/RegisterItem/index.js.map +0 -1
  468. package/views/util.js.map +0 -1
  469. /package/{common.d.ts → compiled/common.d.ts} +0 -0
  470. /package/{common.js.map → compiled/common.js.map} +0 -0
  471. /package/{index.d.ts → compiled/index.d.ts} +0 -0
  472. /package/{index.js.map → compiled/index.js.map} +0 -0
  473. /package/{item-classes → compiled/item-classes}/Tree.d.ts +0 -0
  474. /package/{item-classes → compiled/item-classes}/Tree.js.map +0 -0
  475. /package/{item-classes → compiled/item-classes}/treeNodes.d.ts +0 -0
  476. /package/{item-classes → compiled/item-classes}/treeNodes.js.map +0 -0
  477. /package/{migrations → compiled/migrations}/initial.d.ts +0 -0
  478. /package/{migrations → compiled/migrations}/initial.js.map +0 -0
  479. /package/{proposals → compiled/proposals}/ChangeRequestContext.d.ts +0 -0
  480. /package/{proposals → compiled/proposals}/ChangeRequestContext.js.map +0 -0
  481. /package/{proposals → compiled/proposals}/HistoryDrawer.d.ts +0 -0
  482. /package/{proposals → compiled/proposals}/HistoryDrawer.js.map +0 -0
  483. /package/{proposals → compiled/proposals}/ListItem.d.ts +0 -0
  484. /package/{proposals → compiled/proposals}/ListItem.js.map +0 -0
  485. /package/{proposals → compiled/proposals}/MetaProperties.d.ts +0 -0
  486. /package/{proposals → compiled/proposals}/MetaProperties.js.map +0 -0
  487. /package/{proposals → compiled/proposals}/NewProposalMenu.d.ts +0 -0
  488. /package/{proposals → compiled/proposals}/NewProposalMenu.js.map +0 -0
  489. /package/{proposals → compiled/proposals}/ProposalBrowser.d.ts +0 -0
  490. /package/{proposals → compiled/proposals}/ProposalBrowser.js.map +0 -0
  491. /package/{proposals → compiled/proposals}/ProposalDetail.d.ts +0 -0
  492. /package/{proposals → compiled/proposals}/ProposalDetail.js.map +0 -0
  493. /package/{proposals → compiled/proposals}/ProposalItem.d.ts +0 -0
  494. /package/{proposals → compiled/proposals}/ProposalItem.js.map +0 -0
  495. /package/{proposals → compiled/proposals}/ProposalSummary.d.ts +0 -0
  496. /package/{proposals → compiled/proposals}/ProposalSummary.js.map +0 -0
  497. /package/{proposals → compiled/proposals}/ProposalTab.d.ts +0 -0
  498. /package/{proposals → compiled/proposals}/ProposalTab.js.map +0 -0
  499. /package/{proposals → compiled/proposals}/ProposalType.d.ts +0 -0
  500. /package/{proposals → compiled/proposals}/ProposalType.js.map +0 -0
  501. /package/{proposals → compiled/proposals}/ProposalWorkspace.d.ts +0 -0
  502. /package/{proposals → compiled/proposals}/ProposalWorkspace.js.map +0 -0
  503. /package/{proposals → compiled/proposals}/Search.d.ts +0 -0
  504. /package/{proposals → compiled/proposals}/Search.js.map +0 -0
  505. /package/{proposals → compiled/proposals}/TransitionHistory.d.ts +0 -0
  506. /package/{proposals → compiled/proposals}/TransitionHistory.js.map +0 -0
  507. /package/{proposals → compiled/proposals}/TransitionOptions.d.ts +0 -0
  508. /package/{proposals → compiled/proposals}/TransitionOptions.js.map +0 -0
  509. /package/{proposals → compiled/proposals}/actionableGroups/Tree.d.ts +0 -0
  510. /package/{proposals → compiled/proposals}/actionableGroups/Tree.js.map +0 -0
  511. /package/{proposals → compiled/proposals}/actionableGroups/queries.d.ts +0 -0
  512. /package/{proposals → compiled/proposals}/actionableGroups/queries.js.map +0 -0
  513. /package/{proposals → compiled/proposals}/actionableGroups/treeNodes.d.ts +0 -0
  514. /package/{proposals → compiled/proposals}/actionableGroups/treeNodes.js.map +0 -0
  515. /package/{proposals → compiled/proposals}/actionableGroups/types.d.ts +0 -0
  516. /package/{proposals → compiled/proposals}/actionableGroups/types.js.map +0 -0
  517. /package/{proposals → compiled/proposals}/index.d.ts +0 -0
  518. /package/{proposals → compiled/proposals}/index.js.map +0 -0
  519. /package/{proposals → compiled/proposals}/objectChangeset.d.ts +0 -0
  520. /package/{proposals → compiled/proposals}/objectChangeset.js.map +0 -0
  521. /package/{proposals → compiled/proposals}/queries.d.ts +0 -0
  522. /package/{proposals → compiled/proposals}/queries.js.map +0 -0
  523. /package/{proposals → compiled/proposals}/types.d.ts +0 -0
  524. /package/{proposals → compiled/proposals}/types.js.map +0 -0
  525. /package/{types → compiled/types}/index.d.ts +0 -0
  526. /package/{types → compiled/types}/index.js.map +0 -0
  527. /package/{types → compiled/types}/item.d.ts +0 -0
  528. /package/{types → compiled/types}/item.js.map +0 -0
  529. /package/{types → compiled/types}/register.d.ts +0 -0
  530. /package/{types → compiled/types}/register.js.map +0 -0
  531. /package/{types → compiled/types}/registry.d.ts +0 -0
  532. /package/{types → compiled/types}/registry.js.map +0 -0
  533. /package/{types → compiled/types}/stakeholder.d.ts +0 -0
  534. /package/{types → compiled/types}/stakeholder.js.map +0 -0
  535. /package/{types → compiled/types}/util.d.ts +0 -0
  536. /package/{types → compiled/types}/util.js.map +0 -0
  537. /package/{types → compiled/types}/views.d.ts +0 -0
  538. /package/{types → compiled/types}/views.js.map +0 -0
  539. /package/{views → compiled/views}/AnnotatedChange.d.ts +0 -0
  540. /package/{views → compiled/views}/AnnotatedChange.js.map +0 -0
  541. /package/{views → compiled/views}/BrowserCtx.d.ts +0 -0
  542. /package/{views → compiled/views}/BrowserCtx.js.map +0 -0
  543. /package/{views → compiled/views}/FilterCriteria/CRITERIA_CONFIGURATION.d.ts +0 -0
  544. /package/{views → compiled/views}/FilterCriteria/CRITERIA_CONFIGURATION.js.map +0 -0
  545. /package/{views → compiled/views}/FilterCriteria/criteriaGroupToQueryExpression.d.ts +0 -0
  546. /package/{views → compiled/views}/FilterCriteria/criteriaGroupToQueryExpression.js.map +0 -0
  547. /package/{views → compiled/views}/FilterCriteria/criteriaGroupToSummary.d.ts +0 -0
  548. /package/{views → compiled/views}/FilterCriteria/criteriaGroupToSummary.js.map +0 -0
  549. /package/{views → compiled/views}/FilterCriteria/criteriaToNodes.d.ts +0 -0
  550. /package/{views → compiled/views}/FilterCriteria/criteriaToNodes.js.map +0 -0
  551. /package/{views → compiled/views}/FilterCriteria/index.d.ts +0 -0
  552. /package/{views → compiled/views}/FilterCriteria/index.js.map +0 -0
  553. /package/{views → compiled/views}/FilterCriteria/models.d.ts +0 -0
  554. /package/{views → compiled/views}/FilterCriteria/models.js.map +0 -0
  555. /package/{views → compiled/views}/FilterCriteria/mutateGroup.d.ts +0 -0
  556. /package/{views → compiled/views}/FilterCriteria/mutateGroup.js.map +0 -0
  557. /package/{views → compiled/views}/GenericRelatedItemView.d.ts +0 -0
  558. /package/{views → compiled/views}/GenericRelatedItemView.js.map +0 -0
  559. /package/{views → compiled/views}/ItemDetailsDrawer.d.ts +0 -0
  560. /package/{views → compiled/views}/ItemDetailsDrawer.js.map +0 -0
  561. /package/{views → compiled/views}/ItemSearchDrawer.d.ts +0 -0
  562. /package/{views → compiled/views}/ItemSearchDrawer.js.map +0 -0
  563. /package/{views → compiled/views}/Party.d.ts +0 -0
  564. /package/{views → compiled/views}/Party.js.map +0 -0
  565. /package/{views → compiled/views}/RegisterStakeholder.d.ts +0 -0
  566. /package/{views → compiled/views}/RegisterStakeholder.js.map +0 -0
  567. /package/{views → compiled/views}/RegisterVersion.d.ts +0 -0
  568. /package/{views → compiled/views}/RegisterVersion.js.map +0 -0
  569. /package/{views → compiled/views}/SearchQuery.d.ts +0 -0
  570. /package/{views → compiled/views}/SearchQuery.js.map +0 -0
  571. /package/{views → compiled/views}/StatefulTree.d.ts +0 -0
  572. /package/{views → compiled/views}/StatefulTree.js.map +0 -0
  573. /package/{views → compiled/views}/detail/AllItems.d.ts +0 -0
  574. /package/{views → compiled/views}/detail/AllItems.js.map +0 -0
  575. /package/{views → compiled/views}/detail/ChangeRequest/index.d.ts +0 -0
  576. /package/{views → compiled/views}/detail/ChangeRequest/index.js.map +0 -0
  577. /package/{views → compiled/views}/detail/CustomView/index.d.ts +0 -0
  578. /package/{views → compiled/views}/detail/CustomView/index.js.map +0 -0
  579. /package/{views → compiled/views}/detail/ProposalWork.d.ts +0 -0
  580. /package/{views → compiled/views}/detail/ProposalWork.js.map +0 -0
  581. /package/{views → compiled/views}/detail/RegisterHome/ActiveProposalDetails.d.ts +0 -0
  582. /package/{views → compiled/views}/detail/RegisterHome/ActiveProposalDetails.js.map +0 -0
  583. /package/{views → compiled/views}/detail/RegisterHome/Block.d.ts +0 -0
  584. /package/{views → compiled/views}/detail/RegisterHome/Block.js.map +0 -0
  585. /package/{views → compiled/views}/detail/RegisterHome/MetaSummary.d.ts +0 -0
  586. /package/{views → compiled/views}/detail/RegisterHome/MetaSummary.js.map +0 -0
  587. /package/{views → compiled/views}/detail/RegisterHome/Proposal.d.ts +0 -0
  588. /package/{views → compiled/views}/detail/RegisterHome/Proposal.js.map +0 -0
  589. /package/{views → compiled/views}/detail/RegisterHome/index.d.ts +0 -0
  590. /package/{views → compiled/views}/detail/RegisterHome/index.js.map +0 -0
  591. /package/{views → compiled/views}/detail/RegisterHome2/index.d.ts +0 -0
  592. /package/{views → compiled/views}/detail/RegisterHome2/index.js.map +0 -0
  593. /package/{views → compiled/views}/detail/RegisterItem/RelatedItems.d.ts +0 -0
  594. /package/{views → compiled/views}/detail/RegisterItem/RelatedItems.js.map +0 -0
  595. /package/{views → compiled/views}/detail/RegisterItem/SupersedingItemMenu.d.ts +0 -0
  596. /package/{views → compiled/views}/detail/RegisterItem/SupersedingItemMenu.js.map +0 -0
  597. /package/{views → compiled/views}/detail/RegisterItem/index.d.ts +0 -0
  598. /package/{views → compiled/views}/detail/RegisterItemClass.d.ts +0 -0
  599. /package/{views → compiled/views}/detail/RegisterItemClass.js.map +0 -0
  600. /package/{views → compiled/views}/detail/RegisterMeta/RegisterMetaForm.d.ts +0 -0
  601. /package/{views → compiled/views}/detail/RegisterMeta/RegisterMetaForm.js.map +0 -0
  602. /package/{views → compiled/views}/detail/RegisterMeta/index.d.ts +0 -0
  603. /package/{views → compiled/views}/detail/RegisterMeta/index.js.map +0 -0
  604. /package/{views → compiled/views}/detail/index.d.ts +0 -0
  605. /package/{views → compiled/views}/detail/index.js.map +0 -0
  606. /package/{views → compiled/views}/diffing/InlineDiff.d.ts +0 -0
  607. /package/{views → compiled/views}/diffing/InlineDiff.js.map +0 -0
  608. /package/{views → compiled/views}/diffing/StructuredDiff.d.ts +0 -0
  609. /package/{views → compiled/views}/diffing/StructuredDiff.js.map +0 -0
  610. /package/{views → compiled/views}/hooks/useCustomView.d.ts +0 -0
  611. /package/{views → compiled/views}/hooks/useCustomView.js.map +0 -0
  612. /package/{views → compiled/views}/hooks/useItemClassConfig.d.ts +0 -0
  613. /package/{views → compiled/views}/hooks/useItemClassConfig.js.map +0 -0
  614. /package/{views → compiled/views}/hooks/useItemRef.d.ts +0 -0
  615. /package/{views → compiled/views}/hooks/useItemRef.js.map +0 -0
  616. /package/{views → compiled/views}/hooks/useLatestAcceptedProposal.d.ts +0 -0
  617. /package/{views → compiled/views}/hooks/useLatestAcceptedProposal.js.map +0 -0
  618. /package/{views → compiled/views}/hooks/useRegisterVersion.d.ts +0 -0
  619. /package/{views → compiled/views}/hooks/useRegisterVersion.js.map +0 -0
  620. /package/{views → compiled/views}/hooks/useSingleRegisterItemData.d.ts +0 -0
  621. /package/{views → compiled/views}/hooks/useSingleRegisterItemData.js.map +0 -0
  622. /package/{views → compiled/views}/hooks/useStakeholder.d.ts +0 -0
  623. /package/{views → compiled/views}/hooks/useStakeholder.js.map +0 -0
  624. /package/{views → compiled/views}/index.d.ts +0 -0
  625. /package/{views → compiled/views}/index.js.map +0 -0
  626. /package/{views → compiled/views}/itemPathUtils.d.ts +0 -0
  627. /package/{views → compiled/views}/itemPathUtils.js.map +0 -0
  628. /package/{views → compiled/views}/itemQueryUtils.d.ts +0 -0
  629. /package/{views → compiled/views}/itemQueryUtils.js.map +0 -0
  630. /package/{views → compiled/views}/protocolRegistry.d.ts +0 -0
  631. /package/{views → compiled/views}/protocolRegistry.js.map +0 -0
  632. /package/{views → compiled/views}/sidebar/Browse/index.d.ts +0 -0
  633. /package/{views → compiled/views}/sidebar/Browse/index.js.map +0 -0
  634. /package/{views → compiled/views}/sidebar/ExportImport/ExportOptions.d.ts +0 -0
  635. /package/{views → compiled/views}/sidebar/ExportImport/ExportOptions.js.map +0 -0
  636. /package/{views → compiled/views}/sidebar/ExportImport/ImportOptions.d.ts +0 -0
  637. /package/{views → compiled/views}/sidebar/ExportImport/ImportOptions.js.map +0 -0
  638. /package/{views → compiled/views}/sidebar/ExportImport/index.d.ts +0 -0
  639. /package/{views → compiled/views}/sidebar/ExportImport/index.js.map +0 -0
  640. /package/{views → compiled/views}/sidebar/ListItem.d.ts +0 -0
  641. /package/{views → compiled/views}/sidebar/ListItem.js.map +0 -0
  642. /package/{views → compiled/views}/sidebar/Registration/index.d.ts +0 -0
  643. /package/{views → compiled/views}/sidebar/Registration/index.js.map +0 -0
  644. /package/{views → compiled/views}/sidebar/Search/index.d.ts +0 -0
  645. /package/{views → compiled/views}/sidebar/index.d.ts +0 -0
  646. /package/{views → compiled/views}/sidebar/index.js.map +0 -0
  647. /package/{views → compiled/views}/util.d.ts +0 -0
  648. /package/{proposals/actionableGroups → dependencies-local/extension-kit/i18n}/types.js +0 -0
  649. /package/{types/util.js → dependencies-local/extension-kit/types/binary-invocation.js} +0 -0
  650. /package/{types/views.js → dependencies-local/extension-kit/types/buffers.js} +0 -0
  651. /package/{common.js → dist/common.js} +0 -0
  652. /package/{index.js → dist/index.js} +0 -0
  653. /package/{item-classes → dist/item-classes}/Tree.js +0 -0
  654. /package/{item-classes → dist/item-classes}/treeNodes.js +0 -0
  655. /package/{migrations → dist/migrations}/initial.js +0 -0
  656. /package/{proposals → dist/proposals}/ChangeRequestContext.js +0 -0
  657. /package/{proposals → dist/proposals}/HistoryDrawer.js +0 -0
  658. /package/{proposals → dist/proposals}/ListItem.js +0 -0
  659. /package/{proposals → dist/proposals}/MetaProperties.js +0 -0
  660. /package/{proposals → dist/proposals}/NewProposalMenu.js +0 -0
  661. /package/{proposals → dist/proposals}/ProposalBrowser.js +0 -0
  662. /package/{proposals → dist/proposals}/ProposalDetail.js +0 -0
  663. /package/{proposals → dist/proposals}/ProposalItem.js +0 -0
  664. /package/{proposals → dist/proposals}/ProposalSummary.js +0 -0
  665. /package/{proposals → dist/proposals}/ProposalTab.js +0 -0
  666. /package/{proposals → dist/proposals}/ProposalType.js +0 -0
  667. /package/{proposals → dist/proposals}/ProposalWorkspace.js +0 -0
  668. /package/{proposals → dist/proposals}/Search.js +0 -0
  669. /package/{proposals → dist/proposals}/TransitionHistory.js +0 -0
  670. /package/{proposals → dist/proposals}/TransitionOptions.js +0 -0
  671. /package/{proposals → dist/proposals}/actionableGroups/Tree.js +0 -0
  672. /package/{proposals → dist/proposals}/actionableGroups/queries.js +0 -0
  673. /package/{proposals → dist/proposals}/actionableGroups/treeNodes.js +0 -0
  674. /package/{proposals → dist/proposals}/index.js +0 -0
  675. /package/{proposals → dist/proposals}/objectChangeset.js +0 -0
  676. /package/{proposals → dist/proposals}/queries.js +0 -0
  677. /package/{proposals → dist/proposals}/types.js +0 -0
  678. /package/{types → dist/types}/index.js +0 -0
  679. /package/{types → dist/types}/item.js +0 -0
  680. /package/{types → dist/types}/register.js +0 -0
  681. /package/{types → dist/types}/registry.js +0 -0
  682. /package/{types → dist/types}/stakeholder.js +0 -0
  683. /package/{views → dist/views}/AnnotatedChange.js +0 -0
  684. /package/{views → dist/views}/BrowserCtx.js +0 -0
  685. /package/{views → dist/views}/FilterCriteria/CRITERIA_CONFIGURATION.js +0 -0
  686. /package/{views → dist/views}/FilterCriteria/criteriaGroupToQueryExpression.js +0 -0
  687. /package/{views → dist/views}/FilterCriteria/criteriaGroupToSummary.js +0 -0
  688. /package/{views → dist/views}/FilterCriteria/criteriaToNodes.js +0 -0
  689. /package/{views → dist/views}/FilterCriteria/index.js +0 -0
  690. /package/{views → dist/views}/FilterCriteria/models.js +0 -0
  691. /package/{views → dist/views}/FilterCriteria/mutateGroup.js +0 -0
  692. /package/{views → dist/views}/GenericRelatedItemView.js +0 -0
  693. /package/{views → dist/views}/ItemDetailsDrawer.js +0 -0
  694. /package/{views → dist/views}/ItemSearchDrawer.js +0 -0
  695. /package/{views → dist/views}/Party.js +0 -0
  696. /package/{views → dist/views}/RegisterStakeholder.js +0 -0
  697. /package/{views → dist/views}/RegisterVersion.js +0 -0
  698. /package/{views → dist/views}/SearchQuery.js +0 -0
  699. /package/{views → dist/views}/StatefulTree.js +0 -0
  700. /package/{views → dist/views}/detail/AllItems.js +0 -0
  701. /package/{views → dist/views}/detail/ChangeRequest/index.js +0 -0
  702. /package/{views → dist/views}/detail/CustomView/index.js +0 -0
  703. /package/{views → dist/views}/detail/ProposalWork.js +0 -0
  704. /package/{views → dist/views}/detail/RegisterHome/ActiveProposalDetails.js +0 -0
  705. /package/{views → dist/views}/detail/RegisterHome/Block.js +0 -0
  706. /package/{views → dist/views}/detail/RegisterHome/MetaSummary.js +0 -0
  707. /package/{views → dist/views}/detail/RegisterHome/Proposal.js +0 -0
  708. /package/{views → dist/views}/detail/RegisterHome/index.js +0 -0
  709. /package/{views → dist/views}/detail/RegisterHome2/index.js +0 -0
  710. /package/{views → dist/views}/detail/RegisterItem/RelatedItems.js +0 -0
  711. /package/{views → dist/views}/detail/RegisterItem/SupersedingItemMenu.js +0 -0
  712. /package/{views → dist/views}/detail/RegisterItemClass.js +0 -0
  713. /package/{views → dist/views}/detail/RegisterMeta/RegisterMetaForm.js +0 -0
  714. /package/{views → dist/views}/detail/RegisterMeta/index.js +0 -0
  715. /package/{views → dist/views}/detail/index.js +0 -0
  716. /package/{views → dist/views}/diffing/InlineDiff.js +0 -0
  717. /package/{views → dist/views}/diffing/StructuredDiff.js +0 -0
  718. /package/{views → dist/views}/hooks/useCustomView.js +0 -0
  719. /package/{views → dist/views}/hooks/useItemClassConfig.js +0 -0
  720. /package/{views → dist/views}/hooks/useItemRef.js +0 -0
  721. /package/{views → dist/views}/hooks/useLatestAcceptedProposal.js +0 -0
  722. /package/{views → dist/views}/hooks/useRegisterVersion.js +0 -0
  723. /package/{views → dist/views}/hooks/useSingleRegisterItemData.js +0 -0
  724. /package/{views → dist/views}/hooks/useStakeholder.js +0 -0
  725. /package/{views → dist/views}/index.js +0 -0
  726. /package/{views → dist/views}/itemPathUtils.js +0 -0
  727. /package/{views → dist/views}/itemQueryUtils.js +0 -0
  728. /package/{views → dist/views}/protocolRegistry.js +0 -0
  729. /package/{views → dist/views}/sidebar/Browse/index.js +0 -0
  730. /package/{views → dist/views}/sidebar/ExportImport/ExportOptions.js +0 -0
  731. /package/{views → dist/views}/sidebar/ExportImport/ImportOptions.js +0 -0
  732. /package/{views → dist/views}/sidebar/ExportImport/index.js +0 -0
  733. /package/{views → dist/views}/sidebar/ListItem.js +0 -0
  734. /package/{views → dist/views}/sidebar/Registration/index.js +0 -0
  735. /package/{views → dist/views}/sidebar/index.js +0 -0
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.initialHook = exports.default = void 0;
7
+
8
+ var _react = require("react");
9
+
10
+ var _util = require("./util");
11
+
12
+ /**
13
+ * An (abstract) hook that wraps React’s useReducer hook and handles storing and loading reducer state
14
+ * using provided functions.
15
+ */
16
+ const DEFAULT_DEBOUNCE_DELAY = 200;
17
+ const LOAD_STATE_ACTION_TYPE = 'loadedState';
18
+ /**
19
+ * A reducer that persists each new state,
20
+ * and attempts to load persisted state when component is mounted.
21
+ *
22
+ * During the initial load, `initialized` is set to false.
23
+ *
24
+ * `storeState` is called on each change of state but debounced.
25
+ *
26
+ * NOTE: that state S cannot be an empty object,
27
+ * in such a case `initialState` will always be used.
28
+ */
29
+
30
+ function usePersistentStateReducer(storeState, loadState, ...args) {
31
+ const [storageKey, storageDebounceMS, validator, reducer, initialState, initializer] = args;
32
+ const effectiveReducer = (0, _react.useCallback)(convertToPersistentReducer(reducer), [reducer]);
33
+ const [state, dispatch] = (0, _react.useReducer)(effectiveReducer, initialState, initializer !== null && initializer !== void 0 ? initializer : defaultInitializer);
34
+
35
+ if (!(0, _util.isObject)(initialState)) {
36
+ console.error("usePersistentStateReducer: initialState is not an object", initialState);
37
+ throw new Error("initialState is not an object");
38
+ }
39
+
40
+ const [initialized, setInitialized] = (0, _react.useState)(false);
41
+ (0, _react.useEffect)(() => {
42
+ setInitialized(false);
43
+ let cancelled = false;
44
+
45
+ (async () => {
46
+ const loadedState = await loadState(storageKey);
47
+
48
+ if (cancelled) {
49
+ return;
50
+ }
51
+
52
+ let effectiveState;
53
+
54
+ if (loadedState && (0, _util.isObject)(loadedState) && Object.keys(loadedState).length > 0) {
55
+ if (validator) {
56
+ if (validator(loadedState)) {
57
+ effectiveState = loadedState;
58
+ } else {
59
+ console.error("usePersistentStateReducer: Failed to validate loaded state for key", storageKey, loadedState, initialState);
60
+ effectiveState = initialState;
61
+ }
62
+ } else {
63
+ effectiveState = loadedState || initialState;
64
+ }
65
+ } else {
66
+ effectiveState = initialState;
67
+ }
68
+
69
+ dispatch({
70
+ type: LOAD_STATE_ACTION_TYPE,
71
+ payload: effectiveState
72
+ });
73
+ setInitialized(true);
74
+ })();
75
+
76
+ return function cleanUp() {
77
+ cancelled = true;
78
+ };
79
+ }, [dispatch, validator, loadState, initialState, storageKey]);
80
+ const debounceDelay = storageDebounceMS !== null && storageDebounceMS !== void 0 ? storageDebounceMS : DEFAULT_DEBOUNCE_DELAY;
81
+ (0, _react.useEffect)(() => {
82
+ if (initialized === true) {
83
+ let timeout = setTimeout(() => {
84
+ storeState(storageKey, state);
85
+ }, debounceDelay);
86
+ return () => clearTimeout(timeout);
87
+ }
88
+
89
+ return () => void 0;
90
+ }, [debounceDelay, storeState, storageKey, state]);
91
+ const effectiveState = state && Object.keys(state).length > 0 ? state : initialState;
92
+ return [effectiveState, dispatch, initialized];
93
+ }
94
+
95
+ var _default = usePersistentStateReducer;
96
+ /**
97
+ * Creates a reducer that handles a special `loadedState` action,
98
+ * relevant to persistent state reducer, in addition to any other
99
+ * action handled by component-specific reducer function passed in.
100
+ */
101
+
102
+ exports.default = _default;
103
+
104
+ function convertToPersistentReducer(reducer) {
105
+ return function wrappedReducer(prevState, action) {
106
+ switch (action.type) {
107
+ case LOAD_STATE_ACTION_TYPE:
108
+ if ((0, _util.isObject)(action.payload)) {
109
+ // TODO: Why action type needs casting, not narrowed?
110
+ return { ...action.payload
111
+ };
112
+ } else {
113
+ console.error("usePersistentStateReducer: Loaded state is not an object", action === null || action === void 0 ? void 0 : action.payload);
114
+ throw new Error("Invalid state loaded: not an object");
115
+ }
116
+
117
+ default:
118
+ return reducer(prevState, action);
119
+ }
120
+ };
121
+ }
122
+
123
+ function defaultInitializer(s) {
124
+ return s;
125
+ }
126
+
127
+ async function noOpLoadState() {
128
+ return {};
129
+ }
130
+
131
+ const initialHook = (...args) => usePersistentStateReducer(() => void 0, noOpLoadState, ...args);
132
+
133
+ exports.initialHook = initialHook;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePersistentStateReducer.js","sourceR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EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;IAEnD,MAAM,cAAc,GAAG,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;QAC3D,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,YAAY,CAAC;IAEjB,OAAO,CAAC,cAAc,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;AACjD,CAAC;AAED,eAAe,yBAAyB,CAAC;AAIzC;;;;GAIG;AACH,SAAS,0BAA0B,CACjC,OAAsB;IAEtB,OAAO,SAAS,cAAc,CAAC,SAAY,EAAE,MAA8B;QACzE,QAAQ,MAAM,CAAC,IAAI,EAAE;YACnB,KAAK,sBAAsB;gBACzB,IAAI,QAAQ,CAAE,MAA6B,CAAC,OAAO,CAAC,EAAE;oBACpD,qDAAqD;oBACrD,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;iBAC9B;qBAAM;oBACL,OAAO,CAAC,KAAK,CAAC,0DAA0D,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,CAAC;oBAC3F,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;iBACxD;YACH;gBACE,OAAO,OAAO,CAAC,SAAS,EAAE,MAAW,CAAC,CAAC;SAC1C;IACH,CAAC,CAAA;AACH,CAAC;AAED,SAAS,kBAAkB,CAAI,CAAI,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC;AAEjD,KAAK,UAAU,aAAa,KAAK,OAAO,EAAE,CAAA,CAAC,CAAC;AAE5C,MAAM,CAAC,MAAM,WAAW,GACtB,CAAC,GAAG,IAAsD,EAAE,EAAE,CAC5D,yBAAyB,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,CAAC","sourcesContent":["/**\n * An (abstract) hook that wraps React’s useReducer hook and handles storing and loading reducer state\n * using provided functions.\n */\n\nimport { useReducer, useEffect, useCallback, useState } from 'react';\nimport { isObject } from './util';\nimport type { Reducer, Dispatch } from 'react';\n\n\nconst DEFAULT_DEBOUNCE_DELAY = 200;\n\nconst LOAD_STATE_ACTION_TYPE = 'loadedState' as const;\n\n\nexport interface BaseAction {\n type: string\n payload?: any\n}\n\n\n/** Action issued when previously stored state is loaded. */\nexport interface LoadStateAction<S> extends BaseAction {\n type: typeof LOAD_STATE_ACTION_TYPE\n\n /** Loaded state. */\n payload: S\n}\n\n\nexport type StateReducerHook<S, A extends BaseAction> =\n (\n reducer: Reducer<S, A>,\n initialState: S,\n initializer: ((initialState: S) => S) | null,\n ) => [state: S, dispatch: Dispatch<A>];\n\nexport type PersistentStateReducerHook<S, A extends BaseAction> =\n (\n /** Each component should specify a unique storage key. */\n storageKey: string,\n\n /**\n * Calls to store state will be debounced according to this delay\n * in case state change too often.\n */\n storageDebounceMS?: number,\n\n validateLoadedState?: (loadedValue: Partial<S> & any) => loadedValue is S,\n\n ...args: Parameters<StateReducerHook<S, A>>\n ) => [state: S, dispatch: Dispatch<A>, stateRecalled: boolean];\n\n\n\n/**\n * A reducer that persists each new state,\n * and attempts to load persisted state when component is mounted.\n *\n * During the initial load, `initialized` is set to false.\n *\n * `storeState` is called on each change of state but debounced.\n *\n * NOTE: that state S cannot be an empty object,\n * in such a case `initialState` will always be used.\n */\nfunction usePersistentStateReducer<S, A extends BaseAction>(\n storeState: (key: string, newState: S) => void,\n loadState: (key: string) => Promise<S | undefined>,\n ...args: Parameters<PersistentStateReducerHook<S, A>>\n): [state: S, dispatch: Dispatch<A>, initialized: boolean] {\n const [storageKey, storageDebounceMS, validator, reducer, initialState, initializer] = args;\n\n const effectiveReducer = useCallback(convertToPersistentReducer(reducer), [reducer]);\n const [state, dispatch] = useReducer(effectiveReducer, initialState, initializer ?? defaultInitializer)\n\n if (!isObject(initialState)) {\n console.error(\"usePersistentStateReducer: initialState is not an object\", initialState);\n throw new Error(\"initialState is not an object\");\n }\n\n const [initialized, setInitialized] = useState(false);\n\n useEffect(() => {\n setInitialized(false);\n let cancelled = false;\n (async () => {\n const loadedState = await loadState(storageKey);\n if (cancelled) { return; }\n\n let effectiveState: S | undefined;\n if (loadedState && isObject(loadedState) && Object.keys(loadedState).length > 0) {\n if (validator) {\n if (validator(loadedState)) {\n effectiveState = loadedState;\n } else {\n console.error(\"usePersistentStateReducer: Failed to validate loaded state for key\", storageKey, loadedState, initialState);\n effectiveState = initialState;\n }\n } else {\n effectiveState = loadedState || initialState;\n }\n } else {\n effectiveState = initialState;\n }\n dispatch({\n type: LOAD_STATE_ACTION_TYPE,\n payload: effectiveState,\n });\n setInitialized(true);\n })();\n return function cleanUp() {\n cancelled = true;\n }\n }, [dispatch, validator, loadState, initialState, storageKey]);\n\n\n const debounceDelay = storageDebounceMS ?? DEFAULT_DEBOUNCE_DELAY;\n useEffect(() => {\n if (initialized === true) {\n let timeout = setTimeout(() => {\n storeState(storageKey, state);\n }, debounceDelay);\n return () => clearTimeout(timeout);\n }\n return () => void 0;\n }, [debounceDelay, storeState, storageKey, state]);\n\n const effectiveState = state && Object.keys(state).length > 0\n ? state\n : initialState;\n\n return [effectiveState, dispatch, initialized];\n}\n\nexport default usePersistentStateReducer;\n\n\n\n/**\n * Creates a reducer that handles a special `loadedState` action,\n * relevant to persistent state reducer, in addition to any other\n * action handled by component-specific reducer function passed in.\n */\nfunction convertToPersistentReducer<S, A extends BaseAction>(\n reducer: Reducer<S, A>,\n): Reducer<S, A | LoadStateAction<S>> {\n return function wrappedReducer(prevState: S, action: A | LoadStateAction<S>) {\n switch (action.type) {\n case LOAD_STATE_ACTION_TYPE:\n if (isObject((action as LoadStateAction<S>).payload)) {\n // TODO: Why action type needs casting, not narrowed?\n return { ...action.payload };\n } else {\n console.error(\"usePersistentStateReducer: Loaded state is not an object\", action?.payload);\n throw new Error(\"Invalid state loaded: not an object\");\n }\n default:\n return reducer(prevState, action as A);\n }\n }\n}\n\nfunction defaultInitializer<T>(s: T) { return s }\n\nasync function noOpLoadState() { return {} }\n\nexport const initialHook: PersistentStateReducerHook<any, any> =\n (...args: Parameters<PersistentStateReducerHook<any, any>>) =>\n usePersistentStateReducer(() => void 0, noOpLoadState, ...args);\n"]}
@@ -0,0 +1,71 @@
1
+ import type { Dispatch } from 'react';
2
+ import type { BaseAction, PersistentStateReducerHook, StateReducerHook } from './usePersistentStateReducer';
3
+ declare const UNDO_ACTION_TYPE: "undo";
4
+ declare const REDO_ACTION_TYPE: "redo";
5
+ declare const RESET_ACTION_TYPE: "reset";
6
+ export interface UndoAction extends BaseAction {
7
+ type: typeof UNDO_ACTION_TYPE;
8
+ }
9
+ export interface RedoAction extends BaseAction {
10
+ type: typeof REDO_ACTION_TYPE;
11
+ }
12
+ export interface ResetAction extends BaseAction {
13
+ type: typeof RESET_ACTION_TYPE;
14
+ }
15
+ export declare type TimeTravelAction = UndoAction | RedoAction | ResetAction;
16
+ interface Timeline<S> {
17
+ present: S;
18
+ /** States that led to present state. */
19
+ past: S[];
20
+ /**
21
+ * Undoing a state makes present state first future state,
22
+ * and last past state the present.
23
+ */
24
+ future: S[];
25
+ }
26
+ declare type TimeTravelingPersistentStateReducerHookParams<S, A extends BaseAction> = [
27
+ /** How far back to allow the state to be rewound. */
28
+ maxHistorySteps: number,
29
+ /** Persistent reducer hook iplementation to delegate to. */
30
+ usePersistentReducer: PersistentStateReducerHook<Timeline<S>, A | TimeTravelAction>,
31
+ /** Each component should specify a unique storage key. */
32
+ storageKey: string,
33
+ /**
34
+ * Calls to store state will be debounced according to this delay
35
+ * in case state change too often.
36
+ */
37
+ storageDebounceMS?: number,
38
+ validateLoadedState?: (loadedValue: any) => loadedValue is S,
39
+ ...stateReducerHookArgs: Parameters<StateReducerHook<S, A>>
40
+ ];
41
+ export declare type TimeTravelingPersistentStateReducerHook<S, A extends BaseAction> = (...args: TimeTravelingPersistentStateReducerHookParams<S, A>) => TimeTravelingPersistentStateReducerInterface<S, A>;
42
+ interface TimeTravelingPersistentStateReducerInterface<S, A extends BaseAction> {
43
+ /** Present state. */
44
+ state: S;
45
+ /** Supports actions by wrapped reduce, and time-traveling actions below. */
46
+ dispatch: Dispatch<A>;
47
+ /**
48
+ * Go to previous state in the timeline;
49
+ * present state will become next “future” state.
50
+ */
51
+ undo: () => void;
52
+ /** Makes next (if any) “future” state in the timeline present. */
53
+ redo: () => void;
54
+ /**
55
+ * Resetting rewinds the timeline back to the beginning.
56
+ * All states are future states.
57
+ * Redoing is still possible (in that sense it’s not a proper reset).
58
+ */
59
+ reset: () => void;
60
+ /** State change history. */
61
+ timeline: Timeline<S>;
62
+ /** Proxied from persistent reducer. */
63
+ initialized: boolean;
64
+ }
65
+ /**
66
+ * Supports persistent state reducer features,
67
+ * but also offers time travel through undo/redo/reset actions.
68
+ */
69
+ export declare function useTimeTravelingPersistentStateReducer<S, A extends BaseAction>(...args: TimeTravelingPersistentStateReducerHookParams<S, A>): TimeTravelingPersistentStateReducerInterface<S, A>;
70
+ export default useTimeTravelingPersistentStateReducer;
71
+ export declare const initialHook: TimeTravelingPersistentStateReducerHook<any, any>;
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTimeTravelingPersistentStateReducer = useTimeTravelingPersistentStateReducer;
7
+ exports.initialHook = exports.default = void 0;
8
+
9
+ var _immer = _interopRequireDefault(require("immer"));
10
+
11
+ var _react = require("react");
12
+
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+
15
+ const UNDO_ACTION_TYPE = 'undo';
16
+ const REDO_ACTION_TYPE = 'redo';
17
+ const RESET_ACTION_TYPE = 'reset';
18
+ /**
19
+ * Supports persistent state reducer features,
20
+ * but also offers time travel through undo/redo/reset actions.
21
+ */
22
+
23
+ function useTimeTravelingPersistentStateReducer(...args) {
24
+ const [maxHistorySteps, usePersistentReducer, storageKey, storageDebounceMS,, reducer, initialState, initializer] = args;
25
+ const initialTimeline = (0, _react.useMemo)(() => ({
26
+ past: [],
27
+ present: initializer ? initializer(initialState) : initialState,
28
+ future: []
29
+ }), [initialState, initializer]);
30
+ const proxiedReducer = (0, _react.useCallback)((tl, action) => {
31
+ switch (action.type) {
32
+ case UNDO_ACTION_TYPE:
33
+ return _doUndo(tl);
34
+
35
+ case REDO_ACTION_TYPE:
36
+ return _doRedo(tl);
37
+
38
+ case RESET_ACTION_TYPE:
39
+ return _doReset(tl);
40
+
41
+ default:
42
+ const newState = (0, _immer.default)(tl.present, draft => reducer(draft, action));
43
+ return _addNewPresent(tl, newState, maxHistorySteps);
44
+ }
45
+ }, [reducer, maxHistorySteps]);
46
+ const [_timeline, _dispatch, _initialized] = usePersistentReducer(storageKey, storageDebounceMS, undefined, proxiedReducer, initialTimeline, null);
47
+ return {
48
+ state: _timeline.present,
49
+ timeline: _timeline,
50
+ dispatch: _dispatch,
51
+ undo: () => _dispatch({
52
+ type: UNDO_ACTION_TYPE
53
+ }),
54
+ redo: () => _dispatch({
55
+ type: REDO_ACTION_TYPE
56
+ }),
57
+ reset: () => _dispatch({
58
+ type: RESET_ACTION_TYPE
59
+ }),
60
+ initialized: _initialized
61
+ };
62
+ }
63
+
64
+ function _addNewPresent(timeline, newPresent, maxHistoryEntries) {
65
+ return (0, _immer.default)(timeline, draft => {
66
+ draft.past.push(draft.present); // TODO: apply maxHistoryEntries constraint here
67
+
68
+ draft.present = newPresent;
69
+ draft.future = [];
70
+ });
71
+ }
72
+
73
+ function _doUndo(timeline) {
74
+ return (0, _immer.default)(timeline, draft => {
75
+ if (!draft.past.length) return;
76
+ const newPresent = draft.past.pop(); // TODO: validate restored past; abort and wipe further past if invalid.
77
+
78
+ draft.future.unshift(draft.present);
79
+ draft.present = newPresent;
80
+ });
81
+ }
82
+
83
+ function _doRedo(timeline) {
84
+ return (0, _immer.default)(timeline, draft => {
85
+ if (!draft.future.length) return;
86
+ const newPresent = draft.future.shift();
87
+ draft.past.push(draft.present);
88
+ draft.present = newPresent;
89
+ });
90
+ }
91
+
92
+ function _doReset(timeline) {
93
+ return (0, _immer.default)(timeline, draft => {
94
+ if (!draft.past.length) return;
95
+ const newPresent = draft.past.shift();
96
+ draft.future = [...draft.past, draft.present, ...draft.future];
97
+ draft.present = newPresent;
98
+ draft.past = [];
99
+ });
100
+ }
101
+
102
+ var _default = useTimeTravelingPersistentStateReducer;
103
+ exports.default = _default;
104
+
105
+ const initialHook = (...args) => useTimeTravelingPersistentStateReducer(...args);
106
+
107
+ exports.initialHook = initialHook;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTimeTravelingPersistentStateReducer.js","sourceRoot":"","sources":["../src/useTimeTravelingPersistentStateReducer.ts"],"names":[],"mappings":"AAAA,OAAO,OAAuB,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAI7C,MAAM,gBAAgB,GAAG,MAAe,CAAC;AACzC,MAAM,gBAAgB,GAAG,MAAe,CAAC;AACzC,MAAM,iBAAiB,GAAG,OAAgB,CAAC;AA0F3C;;;GAGG;AACH,MAAM,UAAU,sCAAsC,CACpD,GAAG,IAAyD;IAE5D,MAAM,CAAC,eAAe,EAAE,oBAAoB,EAAE,UAAU,EAAE,iBAAiB,EAAE,AAAD,EAAG,OAAO,EAAE,YAAY,EAAE,WAAW,CAAC,GAAG,IAAI,CAAC;IAE1H,MAAM,eAAe,GAAgB,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAClD,IAAI,EAAE,EAAE;QACR,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY;QAC/D,MAAM,EAAE,EAAE;KACX,CAAC,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC;IAEjC,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,EAAe,EAAE,MAA4B,EAAe,EAAE;QAChG,QAAQ,MAAM,CAAC,IAAI,EAAE;YACnB,KAAK,gBAAg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;QACvC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,eAAe,sCAAsC,CAAC;AAGtD,MAAM,CAAC,MAAM,WAAW,GACtB,CAAC,GAAG,IAAmE,EAAE,EAAE,CACzE,sCAAsC,CAAC,GAAG,IAAI,CAAC,CAAC","sourcesContent":["import produce, { type Draft } from 'immer';\nimport type { Dispatch } from 'react';\nimport { useMemo, useCallback } from 'react';\nimport type { BaseAction, PersistentStateReducerHook, StateReducerHook } from './usePersistentStateReducer';\n\n\nconst UNDO_ACTION_TYPE = 'undo' as const;\nconst REDO_ACTION_TYPE = 'redo' as const;\nconst RESET_ACTION_TYPE = 'reset' as const;\n\nexport interface UndoAction extends BaseAction {\n type: typeof UNDO_ACTION_TYPE;\n}\n\nexport interface RedoAction extends BaseAction {\n type: typeof REDO_ACTION_TYPE;\n}\n\nexport interface ResetAction extends BaseAction {\n type: typeof RESET_ACTION_TYPE;\n}\n\nexport type TimeTravelAction = UndoAction | RedoAction | ResetAction;\n\ninterface Timeline<S> {\n present: S;\n\n /** States that led to present state. */\n past: S[];\n\n /**\n * Undoing a state makes present state first future state,\n * and last past state the present.\n */\n future: S[];\n}\n\ntype TimeTravelingPersistentStateReducerHookParams<S, A extends BaseAction> = [\n\n /** How far back to allow the state to be rewound. */\n maxHistorySteps: number,\n\n /** Persistent reducer hook iplementation to delegate to. */\n usePersistentReducer: PersistentStateReducerHook<Timeline<S>, A | TimeTravelAction>,\n\n // These are duplicated from PersistentStateReducerHook\n\n /** Each component should specify a unique storage key. */\n storageKey: string,\n\n /**\n * Calls to store state will be debounced according to this delay\n * in case state change too often.\n */\n storageDebounceMS?: number,\n\n validateLoadedState?: (loadedValue: any) => loadedValue is S,\n\n ...stateReducerHookArgs: Parameters<StateReducerHook<S, A>>\n];\n\nexport type TimeTravelingPersistentStateReducerHook<S, A extends BaseAction> =\n (...args: TimeTravelingPersistentStateReducerHookParams<S, A>) =>\n TimeTravelingPersistentStateReducerInterface<S, A>;\n\ninterface TimeTravelingPersistentStateReducerInterface<S, A extends BaseAction> {\n /** Present state. */\n state: S;\n\n /** Supports actions by wrapped reduce, and time-traveling actions below. */\n dispatch: Dispatch<A>;\n\n /**\n * Go to previous state in the timeline;\n * present state will become next “future” state.\n */\n undo: () => void;\n\n /** Makes next (if any) “future” state in the timeline present. */\n redo: () => void;\n\n /**\n * Resetting rewinds the timeline back to the beginning.\n * All states are future states.\n * Redoing is still possible (in that sense it’s not a proper reset).\n */\n reset: () => void;\n\n // TODO: Implenment “proper” reset that makes initial state present\n // and also clears past and future.\n\n /** State change history. */\n timeline: Timeline<S>;\n\n /** Proxied from persistent reducer. */\n initialized: boolean;\n}\n\n/**\n * Supports persistent state reducer features,\n * but also offers time travel through undo/redo/reset actions.\n */\nexport function useTimeTravelingPersistentStateReducer<S, A extends BaseAction>(\n ...args: TimeTravelingPersistentStateReducerHookParams<S, A>\n): TimeTravelingPersistentStateReducerInterface<S, A> {\n const [maxHistorySteps, usePersistentReducer, storageKey, storageDebounceMS, , reducer, initialState, initializer] = args;\n\n const initialTimeline: Timeline<S> = useMemo(() => ({\n past: [],\n present: initializer ? initializer(initialState) : initialState,\n future: [],\n }), [initialState, initializer]);\n\n const proxiedReducer = useCallback((tl: Timeline<S>, action: A | TimeTravelAction): Timeline<S> => {\n switch (action.type) {\n case UNDO_ACTION_TYPE:\n return _doUndo(tl);\n case REDO_ACTION_TYPE:\n return _doRedo(tl);\n case RESET_ACTION_TYPE:\n return _doReset(tl);\n default:\n const newState = produce(tl.present, (draft) => reducer(draft as S, action as A) as Draft<S>);\n return _addNewPresent(tl, newState, maxHistorySteps);\n }\n }, [reducer, maxHistorySteps]);\n\n const [_timeline, _dispatch, _initialized] = usePersistentReducer(\n storageKey, storageDebounceMS, undefined, proxiedReducer, initialTimeline, null);\n\n return {\n state: _timeline.present,\n timeline: _timeline,\n dispatch: _dispatch,\n undo: () => _dispatch({ type: UNDO_ACTION_TYPE }),\n redo: () => _dispatch({ type: REDO_ACTION_TYPE }),\n reset: () => _dispatch({ type: RESET_ACTION_TYPE }),\n initialized: _initialized,\n };\n}\n\nfunction _addNewPresent<S>(timeline: Timeline<S>, newPresent: S, maxHistoryEntries: number) {\n return produce(timeline, draft => {\n draft.past.push(draft.present);\n // TODO: apply maxHistoryEntries constraint here\n draft.present = newPresent as Draft<S>;\n draft.future = [];\n });\n}\n\nfunction _doUndo<S>(timeline: Timeline<S>) {\n return produce(timeline, draft => {\n if (!draft.past.length)\n return;\n const newPresent = draft.past.pop() as Draft<S>;\n // TODO: validate restored past; abort and wipe further past if invalid.\n draft.future.unshift(draft.present);\n draft.present = newPresent;\n });\n}\n\nfunction _doRedo<S>(timeline: Timeline<S>) {\n return produce(timeline, draft => {\n if (!draft.future.length)\n return;\n const newPresent = draft.future.shift();\n draft.past.push(draft.present);\n draft.present = newPresent as Draft<S>;\n });\n}\n\nfunction _doReset<S>(timeline: Timeline<S>) {\n return produce(timeline, draft => {\n if (!draft.past.length)\n return;\n const newPresent = draft.past.shift();\n draft.future = [...draft.past, draft.present, ...draft.future];\n draft.present = newPresent as Draft<S>;\n draft.past = [];\n });\n}\n\nexport default useTimeTravelingPersistentStateReducer;\n\n\nexport const initialHook: TimeTravelingPersistentStateReducerHook<any, any> =\n (...args: Parameters<TimeTravelingPersistentStateReducerHook<any, any>>) =>\n useTimeTravelingPersistentStateReducer(...args);\n"]}
@@ -0,0 +1,37 @@
1
+ import type { Progress } from './types/progress';
2
+ export declare type Entries<T> = {
3
+ [K in keyof T]: [K, T[K]];
4
+ }[keyof T][];
5
+ export declare function stripLeadingSlash(fp: string): string;
6
+ export declare function progressToValue(progress: Progress): number;
7
+ export declare const encoder: TextEncoder;
8
+ export declare const decoder: TextDecoder;
9
+ export declare type OnlyJSON<T> = T extends string | number | boolean | null ? T : T extends Function ? never : T extends object ? {
10
+ [K in keyof T]: OnlyJSON<T[K]>;
11
+ } : never;
12
+ /**
13
+ * Normalizes object by ensuring its keys are sorted.
14
+ * May not be the most efficient way of doing so.
15
+ */
16
+ export declare function normalizeObject<T extends Record<string, any>>(obj: T): T;
17
+ export declare function toJSONPreservingUndefined(data: any, indentation?: number): string;
18
+ /**
19
+ * NOTE: This is NOT a very fast implementation yet. Try to avoid.
20
+ */
21
+ export declare function toJSONNormalized(val: any, indentation?: number): string;
22
+ /**
23
+ * @deprecated use `toJSONNormalized()` instead.
24
+ */
25
+ export declare const JSONStringifyNormalized: typeof toJSONNormalized;
26
+ export declare function objectsHaveSameShape(l: any, r: any): boolean;
27
+ /**
28
+ * Does the equivalent of `normalizeObject` on given object
29
+ * as well as any objects encountered within.
30
+ */
31
+ export declare function normalizeObjectRecursively<T extends Record<string, any>>(obj: T, _seen?: null | WeakSet<any>): T;
32
+ /**
33
+ * Returns true if given value is a regular object (‘hash’),
34
+ * excluding “special” objects like dates etc.
35
+ */
36
+ export declare function isObject(val: unknown): val is Record<string, any>;
37
+ export declare const BP4_RESET_CSS = "\n body, html {\n -webkit-font-smoothing: antialiased;\n font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, roboto, noto, arial, sans-serif;\n }\n\n .filter-popover .bp4-popover2-content {\n border-radius: 0;\n }\n .bp4-overlay-backdrop.bp4-popover2-backdrop {\n background: rgba(0, 0, 0, .5);\n }\n\n .bp4-tag.bp4-interactive {\n cursor: default !important;\n }\n .bp4-tag-remove {\n cursor: default !important;\n }\n\n .bp4-input {\n /*\n * \u201Cmiddle\u201D, specified by BP4, causes issues with inpout text <-> OL marker alignment.\n * This seems to have no side-effects.\n */\n vertical-align: unset;\n }\n .bp4-input:read-only {\n box-shadow: inset silver 1px -1px;\n background: none;\n }\n .bp4-dark .bp4-input:read-only {\n box-shadow: inset rgba(255, 255, 255, 0.2) 1px -1px;\n }\n .bp4-tree-node-caret {\n cursor: default !important;\n }\n\n /* Why was it added? It breaks hover, definitely.\n .bp4-tree-node-content:hover {\n background: unset;\n }\n */\n\n .bp4-html-select select {\n cursor: default !important;\n }\n\n .bp4-button {\n cursor: default !important;\n\n }\n\n .bp4-button:focus {\n outline: none;\n }\n\n .bp4-tab {\n cursor: default !important;\n }\n\n .bp4-menu-item {\n cursor: default;\n }\n\n .bp4-menu-item, .bp4-menu .bp4-menu-item.bp4-disabled {\n cursor: default !important;\n }\n";
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.stripLeadingSlash = stripLeadingSlash;
7
+ exports.progressToValue = progressToValue;
8
+ exports.normalizeObject = normalizeObject;
9
+ exports.toJSONPreservingUndefined = toJSONPreservingUndefined;
10
+ exports.toJSONNormalized = toJSONNormalized;
11
+ exports.objectsHaveSameShape = objectsHaveSameShape;
12
+ exports.normalizeObjectRecursively = normalizeObjectRecursively;
13
+ exports.isObject = isObject;
14
+ exports.BP4_RESET_CSS = exports.JSONStringifyNormalized = exports.decoder = exports.encoder = void 0;
15
+
16
+ function stripLeadingSlash(fp) {
17
+ return fp.replace(/^\//, '');
18
+ }
19
+
20
+ function progressToValue(progress) {
21
+ return 1 / progress.total * progress.loaded;
22
+ }
23
+
24
+ const encoder = new TextEncoder();
25
+ exports.encoder = encoder;
26
+ const decoder = new TextDecoder('utf-8');
27
+ /**
28
+ * Normalizes object by ensuring its keys are sorted.
29
+ * May not be the most efficient way of doing so.
30
+ */
31
+
32
+ exports.decoder = decoder;
33
+
34
+ function normalizeObject(obj) {
35
+ return Object.fromEntries(Object.entries(obj).sort());
36
+ }
37
+
38
+ function toJSONPreservingUndefined(data, indentation) {
39
+ return JSON.stringify(data || {}, (_, v) => v === undefined ? '__undefined' : v, indentation).replace(/\"__undefined\"/g, 'undefined');
40
+ }
41
+ /**
42
+ * NOTE: This is NOT a very fast implementation yet. Try to avoid.
43
+ */
44
+
45
+
46
+ function toJSONNormalized(val, indentation) {
47
+ return toJSONPreservingUndefined(normalizeVal(val), indentation);
48
+ }
49
+ /**
50
+ * @deprecated use `toJSONNormalized()` instead.
51
+ */
52
+
53
+
54
+ const JSONStringifyNormalized = toJSONNormalized;
55
+ exports.JSONStringifyNormalized = JSONStringifyNormalized;
56
+
57
+ function objectsHaveSameShape(l, r) {
58
+ return JSONStringifyNormalized(l) === JSONStringifyNormalized(r);
59
+ }
60
+ /**
61
+ * Does the equivalent of `normalizeObject` on given object
62
+ * as well as any objects encountered within.
63
+ */
64
+
65
+
66
+ function normalizeObjectRecursively(obj, _seen = null) {
67
+ const seen = _seen !== null && _seen !== void 0 ? _seen : new WeakSet();
68
+
69
+ if (seen.has(obj)) {
70
+ return obj;
71
+ }
72
+
73
+ if (isObject(obj)) {
74
+ seen.add(obj);
75
+ const normalized = Object.fromEntries(Object.entries(obj).sort().map(([key, val]) => [key, normalizeVal(val, seen)]));
76
+ seen.delete(obj);
77
+ return normalized;
78
+ } else {
79
+ throw new Error(`Not an object: ${obj}`);
80
+ }
81
+ }
82
+
83
+ function normalizeVal(val, _seen = null) {
84
+ const seen = _seen !== null && _seen !== void 0 ? _seen : new WeakSet();
85
+
86
+ if (Array.isArray(val)) {
87
+ return val.map(v => isObject(v) ? normalizeObjectRecursively(v, seen) : v);
88
+ } else if (isObject(val)) {
89
+ return normalizeObjectRecursively(val, seen);
90
+ } else {
91
+ return val;
92
+ }
93
+ }
94
+ /**
95
+ * Returns true if given value is a regular object (‘hash’),
96
+ * excluding “special” objects like dates etc.
97
+ */
98
+
99
+
100
+ function isObject(val) {
101
+ var _a;
102
+
103
+ return val !== null && typeof val === 'object' && !Array.isArray(val) && // val?.constructor === Object && // normal objects fail this one in extensions
104
+ ((_a = val === null || val === void 0 ? void 0 : val.toString) === null || _a === void 0 ? void 0 : _a.call(val)) === '[object Object]';
105
+ } //function isArray(val: unknown): val is unknown[] {
106
+ // return val !== null && typeof val === 'object' && Array.isArray(val);
107
+ //}
108
+
109
+
110
+ const BP4_RESET_CSS = `
111
+ body, html {
112
+ -webkit-font-smoothing: antialiased;
113
+ font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, roboto, noto, arial, sans-serif;
114
+ }
115
+
116
+ .filter-popover .bp4-popover2-content {
117
+ border-radius: 0;
118
+ }
119
+ .bp4-overlay-backdrop.bp4-popover2-backdrop {
120
+ background: rgba(0, 0, 0, .5);
121
+ }
122
+
123
+ .bp4-tag.bp4-interactive {
124
+ cursor: default !important;
125
+ }
126
+ .bp4-tag-remove {
127
+ cursor: default !important;
128
+ }
129
+
130
+ .bp4-input {
131
+ /*
132
+ * “middle”, specified by BP4, causes issues with inpout text <-> OL marker alignment.
133
+ * This seems to have no side-effects.
134
+ */
135
+ vertical-align: unset;
136
+ }
137
+ .bp4-input:read-only {
138
+ box-shadow: inset silver 1px -1px;
139
+ background: none;
140
+ }
141
+ .bp4-dark .bp4-input:read-only {
142
+ box-shadow: inset rgba(255, 255, 255, 0.2) 1px -1px;
143
+ }
144
+ .bp4-tree-node-caret {
145
+ cursor: default !important;
146
+ }
147
+
148
+ /* Why was it added? It breaks hover, definitely.
149
+ .bp4-tree-node-content:hover {
150
+ background: unset;
151
+ }
152
+ */
153
+
154
+ .bp4-html-select select {
155
+ cursor: default !important;
156
+ }
157
+
158
+ .bp4-button {
159
+ cursor: default !important;
160
+
161
+ }
162
+
163
+ .bp4-button:focus {
164
+ outline: none;
165
+ }
166
+
167
+ .bp4-tab {
168
+ cursor: default !important;
169
+ }
170
+
171
+ .bp4-menu-item {
172
+ cursor: default;
173
+ }
174
+
175
+ .bp4-menu-item, .bp4-menu .bp4-menu-item.bp4-disabled {
176
+ cursor: default !important;
177
+ }
178
+ `;
179
+ exports.BP4_RESET_CSS = BP4_RESET_CSS;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,iBAAiB,CAAC,EAAU;IAC1C,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AA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QACZ,OAAO,GAAG,KAAK,QAAQ;QACvB,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QACnB,+EAA+E;QAC/E,CAAA,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,QAAQ,mDAAI,MAAK,iBAAiB,CACxC,CAAC;AACJ,CAAC;AAED,oDAAoD;AACpD,yEAAyE;AACzE,GAAG;AAGH,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoE5B,CAAC","sourcesContent":["import type { Progress } from './types/progress';\n\n\nexport type Entries<T> = {\n [K in keyof T]: [K, T[K]];\n}[keyof T][];\n\n\nexport function stripLeadingSlash(fp: string): string {\n return fp.replace(/^\\//, '');\n}\n\nexport function progressToValue(progress: Progress): number {\n return 1 / progress.total * progress.loaded;\n}\n\nexport const encoder = new TextEncoder();\n\nexport const decoder = new TextDecoder('utf-8');\n\nexport type OnlyJSON<T> =\n T extends string | number | boolean | null\n ? T\n : T extends Function\n ? never\n : T extends object\n ? { [K in keyof T]: OnlyJSON<T[K]> }\n : never;\n\n\n/**\n * Normalizes object by ensuring its keys are sorted.\n * May not be the most efficient way of doing so.\n */\nexport function normalizeObject<T extends Record<string, any>>(obj: T): T {\n return Object.fromEntries(Object.entries(obj).sort()) as T;\n}\n\nexport function toJSONPreservingUndefined(\n data: any,\n indentation?: number,\n): string {\n return (JSON.\n stringify(\n data || {},\n (_, v) => (v === undefined) ? '__undefined' : v,\n indentation).\n replace(/\\\"__undefined\\\"/g, 'undefined'));\n}\n\n/**\n * NOTE: This is NOT a very fast implementation yet. Try to avoid.\n */\nexport function toJSONNormalized(val: any, indentation?: number) {\n return toJSONPreservingUndefined(normalizeVal(val), indentation);\n}\n\n/**\n * @deprecated use `toJSONNormalized()` instead.\n */\nexport const JSONStringifyNormalized = toJSONNormalized;\n\nexport function objectsHaveSameShape(l: any, r: any): boolean {\n return JSONStringifyNormalized(l) === JSONStringifyNormalized(r);\n}\n\n/**\n * Does the equivalent of `normalizeObject` on given object\n * as well as any objects encountered within.\n */\nexport function normalizeObjectRecursively\n<T extends Record<string, any>>\n(obj: T, _seen: null | WeakSet<any> = null): T {\n const seen: WeakSet<any> = _seen ?? new WeakSet();\n\n if (seen.has(obj)) {\n return obj;\n }\n\n if (isObject(obj)) {\n seen.add(obj);\n\n const normalized = Object.fromEntries(\n Object.entries(obj).\n sort().\n map(([key, val]) => [\n key,\n normalizeVal(val, seen),\n ])\n ) as T;\n\n seen.delete(obj);\n\n return normalized;\n } else {\n throw new Error(`Not an object: ${obj}`);\n }\n}\n\nfunction normalizeVal<T>(val: T, _seen: null | WeakSet<any> = null): T {\n const seen: WeakSet<any> = _seen ?? new WeakSet();\n\n if (Array.isArray(val)) {\n return val.map(v => isObject(v)\n ? normalizeObjectRecursively(v, seen)\n : v\n ) as unknown as T;\n } else if (isObject(val)) {\n return normalizeObjectRecursively(val, seen);\n } else {\n return val;\n }\n}\n\n/**\n * Returns true if given value is a regular object (‘hash’),\n * excluding “special” objects like dates etc.\n */\nexport function isObject(val: unknown): val is Record<string, any> {\n return (\n val !== null &&\n typeof val === 'object' &&\n !Array.isArray(val) &&\n // val?.constructor === Object && // normal objects fail this one in extensions\n val?.toString?.() === '[object Object]'\n );\n}\n\n//function isArray(val: unknown): val is unknown[] {\n// return val !== null && typeof val === 'object' && Array.isArray(val);\n//}\n\n\nexport const BP4_RESET_CSS = `\n body, html {\n -webkit-font-smoothing: antialiased;\n font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, roboto, noto, arial, sans-serif;\n }\n\n .filter-popover .bp4-popover2-content {\n border-radius: 0;\n }\n .bp4-overlay-backdrop.bp4-popover2-backdrop {\n background: rgba(0, 0, 0, .5);\n }\n\n .bp4-tag.bp4-interactive {\n cursor: default !important;\n }\n .bp4-tag-remove {\n cursor: default !important;\n }\n\n .bp4-input {\n /*\n * “middle”, specified by BP4, causes issues with inpout text <-> OL marker alignment.\n * This seems to have no side-effects.\n */\n vertical-align: unset;\n }\n .bp4-input:read-only {\n box-shadow: inset silver 1px -1px;\n background: none;\n }\n .bp4-dark .bp4-input:read-only {\n box-shadow: inset rgba(255, 255, 255, 0.2) 1px -1px;\n }\n .bp4-tree-node-caret {\n cursor: default !important;\n }\n\n /* Why was it added? It breaks hover, definitely.\n .bp4-tree-node-content:hover {\n background: unset;\n }\n */\n\n .bp4-html-select select {\n cursor: default !important;\n }\n\n .bp4-button {\n cursor: default !important;\n\n }\n\n .bp4-button:focus {\n outline: none;\n }\n\n .bp4-tab {\n cursor: default !important;\n }\n\n .bp4-menu-item {\n cursor: default;\n }\n\n .bp4-menu-item, .bp4-menu .bp4-menu-item.bp4-disabled {\n cursor: default !important;\n }\n`;\n"]}
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ /**
3
+ * Definition list.
4
+ * Nest wrappers (like divs) with dt and dd within
5
+ * (`DLEntry` can be used to save time).
6
+ * NOTE: Wrappers are required. Only one DD per DT is allowed.
7
+ *
8
+ * Doesn’t work in narrow containers if DT and/or DD is too long,
9
+ * since DT and DD always begin on the same line.
10
+ */
11
+ declare const DL: import("@emotion/styled").StyledComponent<{
12
+ theme?: import("@emotion/react").Theme | undefined;
13
+ as?: React.ElementType<any> | undefined;
14
+ }, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDListElement>, HTMLDListElement>, {}>;
15
+ /**
16
+ * For use with `DL`.
17
+ * Specify
18
+ */
19
+ export declare const DLEntry: React.VoidFunctionComponent<{
20
+ term: JSX.Element | JSX.Element[] | string | string[];
21
+ definition: JSX.Element | JSX.Element[] | string | string[];
22
+ style?: React.CSSProperties;
23
+ className?: string;
24
+ dtStyle?: React.CSSProperties;
25
+ dtClassName?: string;
26
+ ddStyle?: React.CSSProperties;
27
+ ddClassName?: string;
28
+ }>;
29
+ /**
30
+ * Definition list where DT and DD can start on separate lines.
31
+ *
32
+ * Doesn’t work well for generic listings where it’s important
33
+ * for a nested object to always start to the right of key
34
+ * (never wrap to below).
35
+ */
36
+ export declare const WrappableDL: import("@emotion/styled").StyledComponent<{
37
+ theme?: import("@emotion/react").Theme | undefined;
38
+ as?: React.ElementType<any> | undefined;
39
+ } & React.ClassAttributes<HTMLDListElement> & React.HTMLAttributes<HTMLDListElement> & {
40
+ children?: React.ReactNode;
41
+ } & {
42
+ theme?: import("@emotion/react").Theme | undefined;
43
+ }, {}, {}>;
44
+ export default DL;