roamjs-components 0.85.3 → 0.85.4

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 (558) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +29 -29
  3. package/components/AutocompleteInput.d.ts +28 -28
  4. package/components/AutocompleteInput.js +120 -120
  5. package/components/BlockErrorBoundary.d.ts +15 -15
  6. package/components/BlockErrorBoundary.js +27 -27
  7. package/components/BlockInput.d.ts +13 -13
  8. package/components/BlockInput.js +55 -55
  9. package/components/ComponentContainer.d.ts +10 -10
  10. package/components/ComponentContainer.js +37 -37
  11. package/components/ConfigPage.d.ts +35 -35
  12. package/components/ConfigPage.js +159 -159
  13. package/components/ConfigPanels/BlockPanel.d.ts +3 -3
  14. package/components/ConfigPanels/BlockPanel.js +42 -42
  15. package/components/ConfigPanels/BlocksPanel.d.ts +3 -3
  16. package/components/ConfigPanels/BlocksPanel.js +58 -58
  17. package/components/ConfigPanels/CustomPanel.d.ts +3 -3
  18. package/components/ConfigPanels/CustomPanel.js +24 -24
  19. package/components/ConfigPanels/FlagPanel.d.ts +3 -3
  20. package/components/ConfigPanels/FlagPanel.js +31 -31
  21. package/components/ConfigPanels/MultiChildPanel.d.ts +9 -9
  22. package/components/ConfigPanels/MultiChildPanel.js +58 -58
  23. package/components/ConfigPanels/MultiTextPanel.d.ts +3 -3
  24. package/components/ConfigPanels/MultiTextPanel.js +14 -14
  25. package/components/ConfigPanels/NumberPanel.d.ts +3 -3
  26. package/components/ConfigPanels/NumberPanel.js +25 -25
  27. package/components/ConfigPanels/OauthPanel.d.ts +3 -3
  28. package/components/ConfigPanels/OauthPanel.js +81 -81
  29. package/components/ConfigPanels/PagesPanel.d.ts +3 -3
  30. package/components/ConfigPanels/PagesPanel.js +11 -11
  31. package/components/ConfigPanels/SelectPanel.d.ts +3 -3
  32. package/components/ConfigPanels/SelectPanel.js +27 -27
  33. package/components/ConfigPanels/TextPanel.d.ts +3 -3
  34. package/components/ConfigPanels/TextPanel.js +28 -28
  35. package/components/ConfigPanels/TimePanel.d.ts +3 -3
  36. package/components/ConfigPanels/TimePanel.js +34 -34
  37. package/components/ConfigPanels/getBrandColors.d.ts +7 -7
  38. package/components/ConfigPanels/getBrandColors.js +28 -28
  39. package/components/ConfigPanels/types.d.ts +84 -84
  40. package/components/ConfigPanels/types.js +2 -2
  41. package/components/ConfigPanels/types.js.map +1 -1
  42. package/components/ConfigPanels/useSingleChildValue.d.ts +13 -13
  43. package/components/ConfigPanels/useSingleChildValue.js +43 -43
  44. package/components/CursorMenu.d.ts +21 -21
  45. package/components/CursorMenu.js +181 -181
  46. package/components/Description.d.ts +5 -5
  47. package/components/Description.js +16 -16
  48. package/components/ExtensionApiContext.d.ts +31 -31
  49. package/components/ExtensionApiContext.js +16 -16
  50. package/components/ExternalLogin.d.ts +18 -18
  51. package/components/ExternalLogin.js +141 -141
  52. package/components/Filter.d.ts +15 -15
  53. package/components/Filter.js +142 -142
  54. package/components/FormDialog.d.ts +55 -55
  55. package/components/FormDialog.js +217 -217
  56. package/components/FormDialog.js.map +1 -1
  57. package/components/Loading.d.ts +4 -4
  58. package/components/Loading.js +35 -35
  59. package/components/MenuItemSelect.d.ts +17 -17
  60. package/components/MenuItemSelect.js +23 -23
  61. package/components/OauthPanel.d.ts +7 -7
  62. package/components/OauthPanel.js +30 -30
  63. package/components/OauthSelect.d.ts +5 -5
  64. package/components/OauthSelect.js +25 -25
  65. package/components/PageInput.d.ts +6 -6
  66. package/components/PageInput.js +13 -13
  67. package/components/PageLink.d.ts +6 -6
  68. package/components/PageLink.js +31 -31
  69. package/components/ProgressDialog.d.ts +11 -11
  70. package/components/ProgressDialog.js +48 -48
  71. package/components/SimpleAlert.d.ts +15 -15
  72. package/components/SimpleAlert.js +47 -47
  73. package/components/Toast.d.ts +15 -15
  74. package/components/Toast.js +50 -50
  75. package/components/index.js +4 -4
  76. package/components/index.js.map +1 -1
  77. package/components.d.ts +5 -5
  78. package/components.js +170 -170
  79. package/date/constants.d.ts +3 -3
  80. package/date/constants.js +19 -19
  81. package/date/constants.js.map +1 -1
  82. package/date/index.d.ts +3 -3
  83. package/date/index.js +9 -9
  84. package/date/index.js.map +1 -1
  85. package/date/parseNlpDate.d.ts +5 -5
  86. package/date/parseNlpDate.js +226 -226
  87. package/date/parseNlpDate.js.map +1 -1
  88. package/date/parseRoamDateUid.d.ts +2 -2
  89. package/date/parseRoamDateUid.js +7 -7
  90. package/date/parseRoamDateUid.js.map +1 -1
  91. package/dom/addBlockCommand.d.ts +5 -5
  92. package/dom/addBlockCommand.js +53 -53
  93. package/dom/addBlockCommand.js.map +1 -1
  94. package/dom/addKeyboardTriggers.d.ts +11 -11
  95. package/dom/addKeyboardTriggers.js +38 -38
  96. package/dom/addKeyboardTriggers.js.map +1 -1
  97. package/dom/addOldRoamJSDependency.d.ts +2 -2
  98. package/dom/addOldRoamJSDependency.js +10 -10
  99. package/dom/addOldRoamJSDependency.js.map +1 -1
  100. package/dom/addRoamJSDependency.d.ts +2 -2
  101. package/dom/addRoamJSDependency.js +8 -8
  102. package/dom/addRoamJSDependency.js.map +1 -1
  103. package/dom/addScriptAsDependency.d.ts +6 -6
  104. package/dom/addScriptAsDependency.js +16 -16
  105. package/dom/addScriptAsDependency.js.map +1 -1
  106. package/dom/addStyle.d.ts +2 -2
  107. package/dom/addStyle.js +14 -14
  108. package/dom/addStyle.js.map +1 -1
  109. package/dom/constants.d.ts +1 -1
  110. package/dom/constants.js +4 -4
  111. package/dom/constants.js.map +1 -1
  112. package/dom/createBlockObserver.d.ts +7 -7
  113. package/dom/createBlockObserver.js +43 -43
  114. package/dom/createBlockObserver.js.map +1 -1
  115. package/dom/createButtonObserver.d.ts +6 -6
  116. package/dom/createButtonObserver.js +21 -21
  117. package/dom/createButtonObserver.js.map +1 -1
  118. package/dom/createDivObserver.d.ts +2 -2
  119. package/dom/createDivObserver.js +13 -13
  120. package/dom/createDivObserver.js.map +1 -1
  121. package/dom/createHTMLObserver.d.ts +8 -8
  122. package/dom/createHTMLObserver.js +24 -24
  123. package/dom/createHTMLObserver.js.map +1 -1
  124. package/dom/createHashtagObserver.d.ts +5 -5
  125. package/dom/createHashtagObserver.js +16 -16
  126. package/dom/createHashtagObserver.js.map +1 -1
  127. package/dom/createIconButton.d.ts +2 -2
  128. package/dom/createIconButton.js +12 -12
  129. package/dom/createIconButton.js.map +1 -1
  130. package/dom/createObserver.d.ts +2 -2
  131. package/dom/createObserver.js +9 -9
  132. package/dom/createObserver.js.map +1 -1
  133. package/dom/createOverlayObserver.d.ts +2 -2
  134. package/dom/createOverlayObserver.js +6 -6
  135. package/dom/createOverlayObserver.js.map +1 -1
  136. package/dom/createPageObserver.d.ts +2 -2
  137. package/dom/createPageObserver.js +34 -34
  138. package/dom/createPageObserver.js.map +1 -1
  139. package/dom/createPageTitleObserver.d.ts +6 -6
  140. package/dom/createPageTitleObserver.js +31 -31
  141. package/dom/createPageTitleObserver.js.map +1 -1
  142. package/dom/elToTitle.d.ts +2 -2
  143. package/dom/elToTitle.js +22 -22
  144. package/dom/elToTitle.js.map +1 -1
  145. package/dom/genericError.d.ts +3 -3
  146. package/dom/genericError.js +11 -11
  147. package/dom/genericError.js.map +1 -1
  148. package/dom/getActiveUids.d.ts +3 -3
  149. package/dom/getActiveUids.js +6 -6
  150. package/dom/getActiveUids.js.map +1 -1
  151. package/dom/getBlockUidFromTarget.d.ts +2 -2
  152. package/dom/getBlockUidFromTarget.js +33 -33
  153. package/dom/getBlockUidFromTarget.js.map +1 -1
  154. package/dom/getCurrentPageUid.d.ts +2 -2
  155. package/dom/getCurrentPageUid.js +8 -8
  156. package/dom/getCurrentPageUid.js.map +1 -1
  157. package/dom/getDomRefs.d.ts +2 -2
  158. package/dom/getDomRefs.js +12 -12
  159. package/dom/getDomRefs.js.map +1 -1
  160. package/dom/getDropUidOffset.d.ts +5 -5
  161. package/dom/getDropUidOffset.js +27 -27
  162. package/dom/getDropUidOffset.js.map +1 -1
  163. package/dom/getMutatedNodes.d.ts +7 -7
  164. package/dom/getMutatedNodes.js +11 -11
  165. package/dom/getMutatedNodes.js.map +1 -1
  166. package/dom/getPageTitleByHtmlElement.d.ts +2 -2
  167. package/dom/getPageTitleByHtmlElement.js +12 -12
  168. package/dom/getPageTitleByHtmlElement.js.map +1 -1
  169. package/dom/getPageTitleValueByHtmlElement.d.ts +2 -2
  170. package/dom/getPageTitleValueByHtmlElement.js +9 -9
  171. package/dom/getPageTitleValueByHtmlElement.js.map +1 -1
  172. package/dom/getReferenceBlockUid.d.ts +2 -2
  173. package/dom/getReferenceBlockUid.js +18 -18
  174. package/dom/getReferenceBlockUid.js.map +1 -1
  175. package/dom/getRoamUrl.d.ts +2 -2
  176. package/dom/getRoamUrl.js +4 -4
  177. package/dom/getRoamUrl.js.map +1 -1
  178. package/dom/getRoamUrlByPage.d.ts +2 -2
  179. package/dom/getRoamUrlByPage.js +10 -10
  180. package/dom/getRoamUrlByPage.js.map +1 -1
  181. package/dom/getUids.d.ts +3 -3
  182. package/dom/getUids.js +8 -8
  183. package/dom/getUids.js.map +1 -1
  184. package/dom/getUidsFromButton.d.ts +3 -3
  185. package/dom/getUidsFromButton.js +8 -8
  186. package/dom/getUidsFromButton.js.map +1 -1
  187. package/dom/getUidsFromId.d.ts +5 -5
  188. package/dom/getUidsFromId.js +15 -15
  189. package/dom/getUidsFromId.js.map +1 -1
  190. package/dom/index.d.ts +30 -30
  191. package/dom/index.js +63 -63
  192. package/dom/index.js.map +1 -1
  193. package/dom/parseRoamBlocksToHtml.d.ts +11 -11
  194. package/dom/parseRoamBlocksToHtml.js +79 -79
  195. package/dom/parseRoamBlocksToHtml.js.map +1 -1
  196. package/dom/resolveRefs.d.ts +2 -2
  197. package/dom/resolveRefs.js +24 -24
  198. package/dom/resolveRefs.js.map +1 -1
  199. package/events/index.d.ts +1 -1
  200. package/events/index.js +8 -8
  201. package/events/index.js.map +1 -1
  202. package/events/watchOnce.d.ts +3 -3
  203. package/events/watchOnce.js +12 -12
  204. package/events/watchOnce.js.map +1 -1
  205. package/hooks/index.d.ts +2 -2
  206. package/hooks/index.js +10 -10
  207. package/hooks/index.js.map +1 -1
  208. package/hooks/useArrowKeyDown.d.ts +10 -10
  209. package/hooks/useArrowKeyDown.js +54 -54
  210. package/hooks/useArrowKeyDown.js.map +1 -1
  211. package/hooks/useSubTree.d.ts +3 -3
  212. package/hooks/useSubTree.js +11 -11
  213. package/hooks/useSubTree.js.map +1 -1
  214. package/marked/index.d.ts +25 -25
  215. package/marked/index.js +567 -567
  216. package/marked/index.js.map +1 -1
  217. package/package.json +116 -116
  218. package/queries/compileDatalog.d.ts +3 -3
  219. package/queries/compileDatalog.js +63 -63
  220. package/queries/compileDatalog.js.map +1 -1
  221. package/queries/getAllBlockUids.d.ts +2 -2
  222. package/queries/getAllBlockUids.js +6 -6
  223. package/queries/getAllBlockUids.js.map +1 -1
  224. package/queries/getAllBlockUidsAndTexts.d.ts +5 -5
  225. package/queries/getAllBlockUidsAndTexts.js +6 -6
  226. package/queries/getAllBlockUidsAndTexts.js.map +1 -1
  227. package/queries/getAllPageNames.d.ts +2 -2
  228. package/queries/getAllPageNames.js +6 -6
  229. package/queries/getAllPageNames.js.map +1 -1
  230. package/queries/getAttributeValueByBlockAndName.d.ts +5 -5
  231. package/queries/getAttributeValueByBlockAndName.js +11 -11
  232. package/queries/getAttributeValueByBlockAndName.js.map +1 -1
  233. package/queries/getBasicTreeByParentUid.d.ts +3 -3
  234. package/queries/getBasicTreeByParentUid.js +13 -13
  235. package/queries/getBasicTreeByParentUid.js.map +1 -1
  236. package/queries/getBlockUidAndTextIncludingText.d.ts +5 -5
  237. package/queries/getBlockUidAndTextIncludingText.js +7 -7
  238. package/queries/getBlockUidAndTextIncludingText.js.map +1 -1
  239. package/queries/getBlockUidByTextOnPage.d.ts +5 -5
  240. package/queries/getBlockUidByTextOnPage.js +7 -7
  241. package/queries/getBlockUidByTextOnPage.js.map +1 -1
  242. package/queries/getBlockUidsAndTextsReferencingPage.d.ts +5 -5
  243. package/queries/getBlockUidsAndTextsReferencingPage.js +9 -9
  244. package/queries/getBlockUidsAndTextsReferencingPage.js.map +1 -1
  245. package/queries/getBlockUidsByPageTitle.d.ts +2 -2
  246. package/queries/getBlockUidsByPageTitle.js +8 -8
  247. package/queries/getBlockUidsByPageTitle.js.map +1 -1
  248. package/queries/getBlockUidsReferencingBlock.d.ts +2 -2
  249. package/queries/getBlockUidsReferencingBlock.js +4 -4
  250. package/queries/getBlockUidsReferencingBlock.js.map +1 -1
  251. package/queries/getBlockUidsReferencingPage.d.ts +2 -2
  252. package/queries/getBlockUidsReferencingPage.js +6 -6
  253. package/queries/getBlockUidsReferencingPage.js.map +1 -1
  254. package/queries/getBlockUidsWithParentUid.d.ts +2 -2
  255. package/queries/getBlockUidsWithParentUid.js +6 -6
  256. package/queries/getBlockUidsWithParentUid.js.map +1 -1
  257. package/queries/getChildrenLengthByPageUid.d.ts +2 -2
  258. package/queries/getChildrenLengthByPageUid.js +8 -8
  259. package/queries/getChildrenLengthByPageUid.js.map +1 -1
  260. package/queries/getChildrenLengthByParentUid.d.ts +2 -2
  261. package/queries/getChildrenLengthByParentUid.js +7 -7
  262. package/queries/getChildrenLengthByParentUid.js.map +1 -1
  263. package/queries/getCreateTimeByBlockUid.d.ts +2 -2
  264. package/queries/getCreateTimeByBlockUid.js +7 -7
  265. package/queries/getCreateTimeByBlockUid.js.map +1 -1
  266. package/queries/getCurrentUser.d.ts +2 -2
  267. package/queries/getCurrentUser.js +11 -11
  268. package/queries/getCurrentUser.js.map +1 -1
  269. package/queries/getCurrentUserDisplayName.d.ts +2 -2
  270. package/queries/getCurrentUserDisplayName.js +10 -10
  271. package/queries/getCurrentUserDisplayName.js.map +1 -1
  272. package/queries/getCurrentUserEmail.d.ts +2 -2
  273. package/queries/getCurrentUserEmail.js +13 -13
  274. package/queries/getCurrentUserEmail.js.map +1 -1
  275. package/queries/getCurrentUserUid.d.ts +2 -2
  276. package/queries/getCurrentUserUid.js +13 -13
  277. package/queries/getCurrentUserUid.js.map +1 -1
  278. package/queries/getDisplayNameByEmail.d.ts +2 -2
  279. package/queries/getDisplayNameByEmail.js +7 -7
  280. package/queries/getDisplayNameByEmail.js.map +1 -1
  281. package/queries/getDisplayNameByUid.d.ts +2 -2
  282. package/queries/getDisplayNameByUid.js +7 -7
  283. package/queries/getDisplayNameByUid.js.map +1 -1
  284. package/queries/getEditTimeByBlockUid.d.ts +2 -2
  285. package/queries/getEditTimeByBlockUid.js +7 -7
  286. package/queries/getEditTimeByBlockUid.js.map +1 -1
  287. package/queries/getEditedUserEmailByBlockUid.d.ts +2 -2
  288. package/queries/getEditedUserEmailByBlockUid.js +7 -7
  289. package/queries/getEditedUserEmailByBlockUid.js.map +1 -1
  290. package/queries/getFirstChildTextByBlockUid.d.ts +2 -2
  291. package/queries/getFirstChildTextByBlockUid.js +7 -7
  292. package/queries/getFirstChildTextByBlockUid.js.map +1 -1
  293. package/queries/getFirstChildUidByBlockUid.d.ts +2 -2
  294. package/queries/getFirstChildUidByBlockUid.js +6 -6
  295. package/queries/getFirstChildUidByBlockUid.js.map +1 -1
  296. package/queries/getFullTreeByParentUid.d.ts +3 -3
  297. package/queries/getFullTreeByParentUid.js +51 -51
  298. package/queries/getFullTreeByParentUid.js.map +1 -1
  299. package/queries/getLinkedPageTitlesUnderUid.d.ts +2 -2
  300. package/queries/getLinkedPageTitlesUnderUid.js +6 -6
  301. package/queries/getLinkedPageTitlesUnderUid.js.map +1 -1
  302. package/queries/getNthChildUidByBlockUid.d.ts +5 -5
  303. package/queries/getNthChildUidByBlockUid.js +7 -7
  304. package/queries/getNthChildUidByBlockUid.js.map +1 -1
  305. package/queries/getOrderByBlockUid.d.ts +2 -2
  306. package/queries/getOrderByBlockUid.js +7 -7
  307. package/queries/getOrderByBlockUid.js.map +1 -1
  308. package/queries/getPageTitleByBlockUid.d.ts +2 -2
  309. package/queries/getPageTitleByBlockUid.js +7 -7
  310. package/queries/getPageTitleByBlockUid.js.map +1 -1
  311. package/queries/getPageTitleByPageUid.d.ts +2 -2
  312. package/queries/getPageTitleByPageUid.js +12 -12
  313. package/queries/getPageTitleByPageUid.js.map +1 -1
  314. package/queries/getPageTitleReferencesByPageTitle.d.ts +2 -2
  315. package/queries/getPageTitleReferencesByPageTitle.js +6 -6
  316. package/queries/getPageTitleReferencesByPageTitle.js.map +1 -1
  317. package/queries/getPageTitlesAndBlockUidsReferencingPage.d.ts +5 -5
  318. package/queries/getPageTitlesAndBlockUidsReferencingPage.js +9 -9
  319. package/queries/getPageTitlesAndBlockUidsReferencingPage.js.map +1 -1
  320. package/queries/getPageTitlesAndUidsDirectlyReferencingPage.d.ts +5 -5
  321. package/queries/getPageTitlesAndUidsDirectlyReferencingPage.js +9 -9
  322. package/queries/getPageTitlesAndUidsDirectlyReferencingPage.js.map +1 -1
  323. package/queries/getPageTitlesReferencingBlockUid.d.ts +2 -2
  324. package/queries/getPageTitlesReferencingBlockUid.js +4 -4
  325. package/queries/getPageTitlesReferencingBlockUid.js.map +1 -1
  326. package/queries/getPageTitlesStartingWithPrefix.d.ts +2 -2
  327. package/queries/getPageTitlesStartingWithPrefix.js +6 -6
  328. package/queries/getPageTitlesStartingWithPrefix.js.map +1 -1
  329. package/queries/getPageUidByBlockUid.d.ts +2 -2
  330. package/queries/getPageUidByBlockUid.js +7 -7
  331. package/queries/getPageUidByBlockUid.js.map +1 -1
  332. package/queries/getPageUidByPageTitle.d.ts +2 -2
  333. package/queries/getPageUidByPageTitle.js +9 -9
  334. package/queries/getPageUidByPageTitle.js.map +1 -1
  335. package/queries/getPageViewType.d.ts +3 -3
  336. package/queries/getPageViewType.js +9 -9
  337. package/queries/getPageViewType.js.map +1 -1
  338. package/queries/getParentTextByBlockUid.d.ts +2 -2
  339. package/queries/getParentTextByBlockUid.js +7 -7
  340. package/queries/getParentTextByBlockUid.js.map +1 -1
  341. package/queries/getParentTextByBlockUidAndTag.d.ts +5 -5
  342. package/queries/getParentTextByBlockUidAndTag.js +7 -7
  343. package/queries/getParentTextByBlockUidAndTag.js.map +1 -1
  344. package/queries/getParentUidByBlockUid.d.ts +2 -2
  345. package/queries/getParentUidByBlockUid.js +7 -7
  346. package/queries/getParentUidByBlockUid.js.map +1 -1
  347. package/queries/getParentUidsOfBlockUid.d.ts +2 -2
  348. package/queries/getParentUidsOfBlockUid.js +4 -4
  349. package/queries/getParentUidsOfBlockUid.js.map +1 -1
  350. package/queries/getSettingsByEmail.d.ts +3 -3
  351. package/queries/getSettingsByEmail.js +7 -7
  352. package/queries/getSettingsByEmail.js.map +1 -1
  353. package/queries/getShallowTreeByParentUid.d.ts +5 -5
  354. package/queries/getShallowTreeByParentUid.js +9 -9
  355. package/queries/getShallowTreeByParentUid.js.map +1 -1
  356. package/queries/getTextByBlockUid.d.ts +2 -2
  357. package/queries/getTextByBlockUid.js +9 -9
  358. package/queries/getTextByBlockUid.js.map +1 -1
  359. package/queries/index.js +4 -4
  360. package/queries/index.js.map +1 -1
  361. package/queries/isLiveBlock.d.ts +2 -2
  362. package/queries/isLiveBlock.js +4 -4
  363. package/queries/isLiveBlock.js.map +1 -1
  364. package/queries/isTagOnPage.d.ts +5 -5
  365. package/queries/isTagOnPage.js +9 -9
  366. package/queries/isTagOnPage.js.map +1 -1
  367. package/queries/normalizePageTitle.d.ts +2 -2
  368. package/queries/normalizePageTitle.js +4 -4
  369. package/queries/normalizePageTitle.js.map +1 -1
  370. package/scripts/index.d.ts +1 -1
  371. package/scripts/index.js +26 -26
  372. package/scripts/index.js.map +1 -1
  373. package/scripts/publishToRoamDepot.d.ts +7 -7
  374. package/scripts/publishToRoamDepot.js +113 -113
  375. package/scripts/publishToRoamDepot.js.map +1 -1
  376. package/testing/mockRoamEnvironment.d.ts +2 -2
  377. package/testing/mockRoamEnvironment.js +1253 -1253
  378. package/testing/mockRoamEnvironment.js.map +1 -1
  379. package/types/index.d.ts +389 -250
  380. package/types/index.js +4 -4
  381. package/types/index.js.map +1 -1
  382. package/types/native.d.ts +405 -402
  383. package/types/native.js +4 -4
  384. package/types/native.js.map +1 -1
  385. package/types/query-builder.d.ts +10 -10
  386. package/types/query-builder.js +2 -2
  387. package/types/query-builder.js.map +1 -1
  388. package/types/smartblocks.d.ts +35 -35
  389. package/types/smartblocks.js +2 -2
  390. package/types/smartblocks.js.map +1 -1
  391. package/util/addInputSetting.d.ts +7 -7
  392. package/util/addInputSetting.js +25 -25
  393. package/util/addInputSetting.js.map +1 -1
  394. package/util/apiDelete.d.ts +2 -2
  395. package/util/apiDelete.js +6 -6
  396. package/util/apiDelete.js.map +1 -1
  397. package/util/apiGet.d.ts +2 -2
  398. package/util/apiGet.js +6 -6
  399. package/util/apiGet.js.map +1 -1
  400. package/util/apiPost.d.ts +2 -2
  401. package/util/apiPost.js +6 -6
  402. package/util/apiPost.js.map +1 -1
  403. package/util/apiPut.d.ts +2 -2
  404. package/util/apiPut.js +6 -6
  405. package/util/apiPut.js.map +1 -1
  406. package/util/createOverlayRender.d.ts +4 -4
  407. package/util/createOverlayRender.js +6 -6
  408. package/util/createOverlayRender.js.map +1 -1
  409. package/util/createTagRegex.d.ts +2 -2
  410. package/util/createTagRegex.js +7 -7
  411. package/util/createTagRegex.js.map +1 -1
  412. package/util/dispatchToRegistry.d.ts +3 -3
  413. package/util/dispatchToRegistry.js +7 -7
  414. package/util/dispatchToRegistry.js.map +1 -1
  415. package/util/env.d.ts +4 -4
  416. package/util/env.js +47 -47
  417. package/util/env.js.map +1 -1
  418. package/util/extensionApiContext.d.ts +29 -29
  419. package/util/extensionApiContext.js +17 -17
  420. package/util/extensionApiContext.js.map +1 -1
  421. package/util/extensionDeprecatedWarning.d.ts +5 -5
  422. package/util/extensionDeprecatedWarning.js +39 -39
  423. package/util/extensionDeprecatedWarning.js.map +1 -1
  424. package/util/extractRef.d.ts +2 -2
  425. package/util/extractRef.js +8 -8
  426. package/util/extractRef.js.map +1 -1
  427. package/util/extractTag.d.ts +2 -2
  428. package/util/extractTag.js +15 -15
  429. package/util/extractTag.js.map +1 -1
  430. package/util/focusMainWindowBlock.d.ts +2 -2
  431. package/util/focusMainWindowBlock.js +12 -12
  432. package/util/focusMainWindowBlock.js.map +1 -1
  433. package/util/getAuthorizationHeader.d.ts +2 -2
  434. package/util/getAuthorizationHeader.js +12 -12
  435. package/util/getAuthorizationHeader.js.map +1 -1
  436. package/util/getLocalStorageKey.d.ts +2 -2
  437. package/util/getLocalStorageKey.js +4 -4
  438. package/util/getLocalStorageKey.js.map +1 -1
  439. package/util/getOauth.d.ts +2 -2
  440. package/util/getOauth.js +52 -52
  441. package/util/getOauth.js.map +1 -1
  442. package/util/getOauthAccounts.d.ts +2 -2
  443. package/util/getOauthAccounts.js +22 -22
  444. package/util/getOauthAccounts.js.map +1 -1
  445. package/util/getRenderRoot.d.ts +2 -2
  446. package/util/getRenderRoot.js +18 -18
  447. package/util/getRenderRoot.js.map +1 -1
  448. package/util/getSettingIntFromTree.d.ts +7 -7
  449. package/util/getSettingIntFromTree.js +11 -11
  450. package/util/getSettingIntFromTree.js.map +1 -1
  451. package/util/getSettingValueFromTree.d.ts +8 -8
  452. package/util/getSettingValueFromTree.js +14 -14
  453. package/util/getSettingValueFromTree.js.map +1 -1
  454. package/util/getSettingValuesFromTree.d.ts +7 -7
  455. package/util/getSettingValuesFromTree.js +12 -12
  456. package/util/getSettingValuesFromTree.js.map +1 -1
  457. package/util/getSubTree.d.ts +8 -8
  458. package/util/getSubTree.js +19 -19
  459. package/util/getSubTree.js.map +1 -1
  460. package/util/getToken.d.ts +2 -2
  461. package/util/getToken.js +10 -10
  462. package/util/getToken.js.map +1 -1
  463. package/util/getTokenFromTree.d.ts +3 -3
  464. package/util/getTokenFromTree.js +4 -4
  465. package/util/getTokenFromTree.js.map +1 -1
  466. package/util/getWorkerClient.d.ts +12 -12
  467. package/util/getWorkerClient.js +41 -41
  468. package/util/getWorkerClient.js.map +1 -1
  469. package/util/handleBodyFetch.d.ts +3 -3
  470. package/util/handleBodyFetch.js +21 -21
  471. package/util/handleBodyFetch.js.map +1 -1
  472. package/util/handleFetch.d.ts +13 -13
  473. package/util/handleFetch.js +40 -40
  474. package/util/handleFetch.js.map +1 -1
  475. package/util/handleUrlFetch.d.ts +3 -3
  476. package/util/handleUrlFetch.js +19 -19
  477. package/util/handleUrlFetch.js.map +1 -1
  478. package/util/idToTitle.d.ts +2 -2
  479. package/util/idToTitle.js +8 -8
  480. package/util/idToTitle.js.map +1 -1
  481. package/util/index.d.ts +24 -24
  482. package/util/index.js +54 -54
  483. package/util/index.js.map +1 -1
  484. package/util/isControl.d.ts +2 -2
  485. package/util/isControl.js +4 -4
  486. package/util/isControl.js.map +1 -1
  487. package/util/localStorageGet.d.ts +2 -2
  488. package/util/localStorageGet.js +8 -8
  489. package/util/localStorageGet.js.map +1 -1
  490. package/util/localStorageRemove.d.ts +2 -2
  491. package/util/localStorageRemove.js +6 -6
  492. package/util/localStorageRemove.js.map +1 -1
  493. package/util/localStorageSet.d.ts +2 -2
  494. package/util/localStorageSet.js +8 -8
  495. package/util/localStorageSet.js.map +1 -1
  496. package/util/registerExperimentalMode.d.ts +6 -6
  497. package/util/registerExperimentalMode.js +65 -65
  498. package/util/registerExperimentalMode.js.map +1 -1
  499. package/util/registerSmartBlocksCommand.d.ts +3 -3
  500. package/util/registerSmartBlocksCommand.js +23 -23
  501. package/util/registerSmartBlocksCommand.js.map +1 -1
  502. package/util/removeFromRegistry.d.ts +3 -3
  503. package/util/removeFromRegistry.js +7 -7
  504. package/util/removeFromRegistry.js.map +1 -1
  505. package/util/renderOverlay.d.ts +12 -12
  506. package/util/renderOverlay.js +48 -48
  507. package/util/renderOverlay.js.map +1 -1
  508. package/util/renderWithUnmount.d.ts +4 -4
  509. package/util/renderWithUnmount.js +44 -44
  510. package/util/renderWithUnmount.js.map +1 -1
  511. package/util/runExtension.d.ts +11 -11
  512. package/util/runExtension.js +174 -174
  513. package/util/runExtension.js.map +1 -1
  514. package/util/setInputSetting.d.ts +7 -7
  515. package/util/setInputSetting.js +37 -37
  516. package/util/setInputSetting.js.map +1 -1
  517. package/util/setInputSettings.d.ts +7 -7
  518. package/util/setInputSettings.js +28 -28
  519. package/util/setInputSettings.js.map +1 -1
  520. package/util/stripUid.d.ts +3 -3
  521. package/util/stripUid.js +10 -10
  522. package/util/stripUid.js.map +1 -1
  523. package/util/toConfigPageName.d.ts +2 -2
  524. package/util/toConfigPageName.js +4 -4
  525. package/util/toConfigPageName.js.map +1 -1
  526. package/util/toFlexRegex.d.ts +2 -2
  527. package/util/toFlexRegex.js +4 -4
  528. package/util/toFlexRegex.js.map +1 -1
  529. package/writes/clearBlockById.d.ts +2 -2
  530. package/writes/clearBlockById.js +17 -17
  531. package/writes/clearBlockById.js.map +1 -1
  532. package/writes/clearBlockByUid.d.ts +2 -2
  533. package/writes/clearBlockByUid.js +16 -16
  534. package/writes/clearBlockByUid.js.map +1 -1
  535. package/writes/createBlock.d.ts +8 -8
  536. package/writes/createBlock.js +28 -28
  537. package/writes/createBlock.js.map +1 -1
  538. package/writes/createPage.d.ts +7 -7
  539. package/writes/createPage.js +20 -20
  540. package/writes/createPage.js.map +1 -1
  541. package/writes/deleteBlock.d.ts +2 -2
  542. package/writes/deleteBlock.js +10 -10
  543. package/writes/deleteBlock.js.map +1 -1
  544. package/writes/index.d.ts +8 -8
  545. package/writes/index.js +22 -22
  546. package/writes/index.js.map +1 -1
  547. package/writes/openBlockInSidebar.d.ts +2 -2
  548. package/writes/openBlockInSidebar.js +13 -13
  549. package/writes/openBlockInSidebar.js.map +1 -1
  550. package/writes/submitActions.d.ts +8 -8
  551. package/writes/submitActions.js +36 -36
  552. package/writes/submitActions.js.map +1 -1
  553. package/writes/updateActiveBlock.d.ts +2 -2
  554. package/writes/updateActiveBlock.js +17 -17
  555. package/writes/updateActiveBlock.js.map +1 -1
  556. package/writes/updateBlock.d.ts +5 -5
  557. package/writes/updateBlock.js +23 -23
  558. package/writes/updateBlock.js.map +1 -1
@@ -1,5 +1,5 @@
1
- declare const getAllBlockUidsAndTexts: () => {
2
- uid: string;
3
- text: string;
4
- }[];
5
- export default getAllBlockUidsAndTexts;
1
+ declare const getAllBlockUidsAndTexts: () => {
2
+ uid: string;
3
+ text: string;
4
+ }[];
5
+ export default getAllBlockUidsAndTexts;
@@ -1,7 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getAllBlockUidsAndTexts = () => window.roamAlphaAPI
4
- .q(`[:find ?u ?s :where [?e :block/uid ?u] [?e :block/string ?s]]`)
5
- .map((f) => ({ uid: f[0], text: f[1] }));
6
- exports.default = getAllBlockUidsAndTexts;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const getAllBlockUidsAndTexts = () => window.roamAlphaAPI
4
+ .q(`[:find ?u ?s :where [?e :block/uid ?u] [?e :block/string ?s]]`)
5
+ .map((f) => ({ uid: f[0], text: f[1] }));
6
+ exports.default = getAllBlockUidsAndTexts;
7
7
  //# sourceMappingURL=getAllBlockUidsAndTexts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getAllBlockUidsAndTexts.js","sourceRoot":"","sources":["../../src/queries/getAllBlockUidsAndTexts.ts"],"names":[],"mappings":";;AAAA,MAAM,uBAAuB,GAAG,GAAoC,EAAE,CACpE,MAAM,CAAC,YAAY;KAChB,CAAC,CAAC,+DAA+D,CAAC;KAClE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAW,EAAE,CAAC,CAAC,CAAC;AAEjE,kBAAe,uBAAuB,CAAC","sourcesContent":["const getAllBlockUidsAndTexts = (): { uid: string; text: string }[] =>\r\n window.roamAlphaAPI\r\n .q(`[:find ?u ?s :where [?e :block/uid ?u] [?e :block/string ?s]]`)\r\n .map((f) => ({ uid: f[0] as string, text: f[1] as string }));\r\n\r\nexport default getAllBlockUidsAndTexts;\r\n"]}
1
+ {"version":3,"file":"getAllBlockUidsAndTexts.js","sourceRoot":"","sources":["../../src/queries/getAllBlockUidsAndTexts.ts"],"names":[],"mappings":";;AAAA,MAAM,uBAAuB,GAAG,GAAoC,EAAE,CACpE,MAAM,CAAC,YAAY;KAChB,CAAC,CAAC,+DAA+D,CAAC;KAClE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAW,EAAE,CAAC,CAAC,CAAC;AAEjE,kBAAe,uBAAuB,CAAC","sourcesContent":["const getAllBlockUidsAndTexts = (): { uid: string; text: string }[] =>\n window.roamAlphaAPI\n .q(`[:find ?u ?s :where [?e :block/uid ?u] [?e :block/string ?s]]`)\n .map((f) => ({ uid: f[0] as string, text: f[1] as string }));\n\nexport default getAllBlockUidsAndTexts;\n"]}
@@ -1,2 +1,2 @@
1
- declare const getAllPageNames: () => string[];
2
- export default getAllPageNames;
1
+ declare const getAllPageNames: () => string[];
2
+ export default getAllPageNames;
@@ -1,7 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getAllPageNames = () => window.roamAlphaAPI
4
- .q("[:find ?s :where [?e :node/title ?s]]")
5
- .map((b) => b[0]);
6
- exports.default = getAllPageNames;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const getAllPageNames = () => window.roamAlphaAPI
4
+ .q("[:find ?s :where [?e :node/title ?s]]")
5
+ .map((b) => b[0]);
6
+ exports.default = getAllPageNames;
7
7
  //# sourceMappingURL=getAllPageNames.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getAllPageNames.js","sourceRoot":"","sources":["../../src/queries/getAllPageNames.ts"],"names":[],"mappings":";;AAAA,MAAM,eAAe,GAAG,GAAa,EAAE,CACrC,MAAM,CAAC,YAAY;KAChB,CAAC,CAAC,uCAAuC,CAAC;KAC1C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC,CAAC;AAEhC,kBAAe,eAAe,CAAC","sourcesContent":["const getAllPageNames = (): string[] =>\r\n window.roamAlphaAPI\r\n .q(\"[:find ?s :where [?e :node/title ?s]]\")\r\n .map((b) => b[0] as string);\r\n\r\nexport default getAllPageNames;\r\n"]}
1
+ {"version":3,"file":"getAllPageNames.js","sourceRoot":"","sources":["../../src/queries/getAllPageNames.ts"],"names":[],"mappings":";;AAAA,MAAM,eAAe,GAAG,GAAa,EAAE,CACrC,MAAM,CAAC,YAAY;KAChB,CAAC,CAAC,uCAAuC,CAAC;KAC1C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC,CAAC;AAEhC,kBAAe,eAAe,CAAC","sourcesContent":["const getAllPageNames = (): string[] =>\n window.roamAlphaAPI\n .q(\"[:find ?s :where [?e :node/title ?s]]\")\n .map((b) => b[0] as string);\n\nexport default getAllPageNames;\n"]}
@@ -1,5 +1,5 @@
1
- declare const getAttributeValueByBlockAndName: ({ name, uid, }: {
2
- name: string;
3
- uid: string;
4
- }) => string;
5
- export default getAttributeValueByBlockAndName;
1
+ declare const getAttributeValueByBlockAndName: ({ name, uid, }: {
2
+ name: string;
3
+ uid: string;
4
+ }) => string;
5
+ export default getAttributeValueByBlockAndName;
@@ -1,12 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const normalizePageTitle_1 = tslib_1.__importDefault(require("./normalizePageTitle"));
5
- const getAttributeValueByBlockAndName = ({ name, uid, }) => {
6
- var _a, _b, _c;
7
- return (((_c = (_b = (_a = window.roamAlphaAPI.data.fast.q(`[:find (pull ?b [:block/string]) :where [?a :node/title "${(0, normalizePageTitle_1.default)(name)}"] [?p :block/uid "${uid}"] [?b :block/refs ?a] [?b :block/parents ?p]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c[":block/string"]) || "")
8
- .slice(name.length + 2)
9
- .trim();
10
- };
11
- exports.default = getAttributeValueByBlockAndName;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const normalizePageTitle_1 = tslib_1.__importDefault(require("./normalizePageTitle"));
5
+ const getAttributeValueByBlockAndName = ({ name, uid, }) => {
6
+ var _a, _b, _c;
7
+ return (((_c = (_b = (_a = window.roamAlphaAPI.data.fast.q(`[:find (pull ?b [:block/string]) :where [?a :node/title "${(0, normalizePageTitle_1.default)(name)}"] [?p :block/uid "${uid}"] [?b :block/refs ?a] [?b :block/parents ?p]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c[":block/string"]) || "")
8
+ .slice(name.length + 2)
9
+ .trim();
10
+ };
11
+ exports.default = getAttributeValueByBlockAndName;
12
12
  //# sourceMappingURL=getAttributeValueByBlockAndName.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getAttributeValueByBlockAndName.js","sourceRoot":"","sources":["../../src/queries/getAttributeValueByBlockAndName.ts"],"names":[],"mappings":";;;AACA,sFAAsD;AAEtD,MAAM,+BAA+B,GAAG,CAAC,EACvC,IAAI,EACJ,GAAG,GAIJ,EAAE,EAAE;;IACH,OAAA,CACE,CAAA,MACE,MAAA,MAAA,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAC7B,4DAA4D,IAAA,4BAAkB,EAC5E,IAAI,CACL,sBAAsB,GAAG,gDAAgD,CAC3E,0CAAG,CAAC,CAAC,0CAAG,CAAC,CACX,0CAAG,eAAe,CAAC,KAAI,EAAE,CAC3B;SACE,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;SACtB,IAAI,EAAE,CAAA;CAAA,CAAC;AAEZ,kBAAe,+BAA+B,CAAC","sourcesContent":["import { PullBlock } from \"../types\";\r\nimport normalizePageTitle from \"./normalizePageTitle\";\r\n\r\nconst getAttributeValueByBlockAndName = ({\r\n name,\r\n uid,\r\n}: {\r\n name: string;\r\n uid: string;\r\n}) =>\r\n (\r\n (\r\n window.roamAlphaAPI.data.fast.q(\r\n `[:find (pull ?b [:block/string]) :where [?a :node/title \"${normalizePageTitle(\r\n name\r\n )}\"] [?p :block/uid \"${uid}\"] [?b :block/refs ?a] [?b :block/parents ?p]]`\r\n )?.[0]?.[0] as PullBlock\r\n )?.[\":block/string\"] || \"\"\r\n )\r\n .slice(name.length + 2)\r\n .trim();\r\n\r\nexport default getAttributeValueByBlockAndName;\r\n"]}
1
+ {"version":3,"file":"getAttributeValueByBlockAndName.js","sourceRoot":"","sources":["../../src/queries/getAttributeValueByBlockAndName.ts"],"names":[],"mappings":";;;AACA,sFAAsD;AAEtD,MAAM,+BAA+B,GAAG,CAAC,EACvC,IAAI,EACJ,GAAG,GAIJ,EAAE,EAAE;;IACH,OAAA,CACE,CAAA,MACE,MAAA,MAAA,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAC7B,4DAA4D,IAAA,4BAAkB,EAC5E,IAAI,CACL,sBAAsB,GAAG,gDAAgD,CAC3E,0CAAG,CAAC,CAAC,0CAAG,CAAC,CACX,0CAAG,eAAe,CAAC,KAAI,EAAE,CAC3B;SACE,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;SACtB,IAAI,EAAE,CAAA;CAAA,CAAC;AAEZ,kBAAe,+BAA+B,CAAC","sourcesContent":["import { PullBlock } from \"../types\";\nimport normalizePageTitle from \"./normalizePageTitle\";\n\nconst getAttributeValueByBlockAndName = ({\n name,\n uid,\n}: {\n name: string;\n uid: string;\n}) =>\n (\n (\n window.roamAlphaAPI.data.fast.q(\n `[:find (pull ?b [:block/string]) :where [?a :node/title \"${normalizePageTitle(\n name\n )}\"] [?p :block/uid \"${uid}\"] [?b :block/refs ?a] [?b :block/parents ?p]]`\n )?.[0]?.[0] as PullBlock\n )?.[\":block/string\"] || \"\"\n )\n .slice(name.length + 2)\n .trim();\n\nexport default getAttributeValueByBlockAndName;\n"]}
@@ -1,3 +1,3 @@
1
- import { RoamBasicNode } from "../types";
2
- declare const getBasicTreeByParentUid: (uid: string) => RoamBasicNode[];
3
- export default getBasicTreeByParentUid;
1
+ import { RoamBasicNode } from "../types";
2
+ declare const getBasicTreeByParentUid: (uid: string) => RoamBasicNode[];
3
+ export default getBasicTreeByParentUid;
@@ -1,14 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const sortBasicNodes = (c) => c
4
- .sort((a, b) => (a[":block/order"] || 0) - (b[":block/order"] || 0))
5
- .map((node) => ({
6
- children: sortBasicNodes(node[":block/children"] || []),
7
- uid: node[":block/uid"] || "",
8
- text: node[":block/string"] || "",
9
- }));
10
- const getBasicTreeByParentUid = (uid) => sortBasicNodes(window.roamAlphaAPI.data.fast
11
- .q(`[:find (pull ?c [:block/string :block/uid :block/order {:block/children ...}]) :where [?b :block/uid "${uid}"] [?b :block/children ?c]]`)
12
- .map((a) => a[0]));
13
- exports.default = getBasicTreeByParentUid;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const sortBasicNodes = (c) => c
4
+ .sort((a, b) => (a[":block/order"] || 0) - (b[":block/order"] || 0))
5
+ .map((node) => ({
6
+ children: sortBasicNodes(node[":block/children"] || []),
7
+ uid: node[":block/uid"] || "",
8
+ text: node[":block/string"] || "",
9
+ }));
10
+ const getBasicTreeByParentUid = (uid) => sortBasicNodes(window.roamAlphaAPI.data.fast
11
+ .q(`[:find (pull ?c [:block/string :block/uid :block/order {:block/children ...}]) :where [?b :block/uid "${uid}"] [?b :block/children ?c]]`)
12
+ .map((a) => a[0]));
13
+ exports.default = getBasicTreeByParentUid;
14
14
  //# sourceMappingURL=getBasicTreeByParentUid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBasicTreeByParentUid.js","sourceRoot":"","sources":["../../src/queries/getBasicTreeByParentUid.ts"],"names":[],"mappings":";;AAEA,MAAM,cAAc,GAAG,CAAC,CAAc,EAAmB,EAAE,CACzD,CAAC;KACE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;KACnE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACd,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IACvD,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IAC7B,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;CAClC,CAAC,CAAC,CAAC;AAER,MAAM,uBAAuB,GAAG,CAAC,GAAW,EAAmB,EAAE,CAC/D,cAAc,CACZ,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI;KAC1B,CAAC,CACA,yGAAyG,GAAG,6BAA6B,CAC1I;KACA,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAc,CAAC,CACjC,CAAC;AAEJ,kBAAe,uBAAuB,CAAC","sourcesContent":["import { PullBlock, RoamBasicNode } from \"../types\";\r\n\r\nconst sortBasicNodes = (c: PullBlock[]): RoamBasicNode[] =>\r\n c\r\n .sort((a, b) => (a[\":block/order\"] || 0) - (b[\":block/order\"] || 0))\r\n .map((node) => ({\r\n children: sortBasicNodes(node[\":block/children\"] || []),\r\n uid: node[\":block/uid\"] || \"\",\r\n text: node[\":block/string\"] || \"\",\r\n }));\r\n\r\nconst getBasicTreeByParentUid = (uid: string): RoamBasicNode[] =>\r\n sortBasicNodes(\r\n window.roamAlphaAPI.data.fast\r\n .q(\r\n `[:find (pull ?c [:block/string :block/uid :block/order {:block/children ...}]) :where [?b :block/uid \"${uid}\"] [?b :block/children ?c]]`\r\n )\r\n .map((a) => a[0] as PullBlock)\r\n );\r\n\r\nexport default getBasicTreeByParentUid;\r\n"]}
1
+ {"version":3,"file":"getBasicTreeByParentUid.js","sourceRoot":"","sources":["../../src/queries/getBasicTreeByParentUid.ts"],"names":[],"mappings":";;AAEA,MAAM,cAAc,GAAG,CAAC,CAAc,EAAmB,EAAE,CACzD,CAAC;KACE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;KACnE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACd,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IACvD,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IAC7B,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;CAClC,CAAC,CAAC,CAAC;AAER,MAAM,uBAAuB,GAAG,CAAC,GAAW,EAAmB,EAAE,CAC/D,cAAc,CACZ,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI;KAC1B,CAAC,CACA,yGAAyG,GAAG,6BAA6B,CAC1I;KACA,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAc,CAAC,CACjC,CAAC;AAEJ,kBAAe,uBAAuB,CAAC","sourcesContent":["import { PullBlock, RoamBasicNode } from \"../types\";\n\nconst sortBasicNodes = (c: PullBlock[]): RoamBasicNode[] =>\n c\n .sort((a, b) => (a[\":block/order\"] || 0) - (b[\":block/order\"] || 0))\n .map((node) => ({\n children: sortBasicNodes(node[\":block/children\"] || []),\n uid: node[\":block/uid\"] || \"\",\n text: node[\":block/string\"] || \"\",\n }));\n\nconst getBasicTreeByParentUid = (uid: string): RoamBasicNode[] =>\n sortBasicNodes(\n window.roamAlphaAPI.data.fast\n .q(\n `[:find (pull ?c [:block/string :block/uid :block/order {:block/children ...}]) :where [?b :block/uid \"${uid}\"] [?b :block/children ?c]]`\n )\n .map((a) => a[0] as PullBlock)\n );\n\nexport default getBasicTreeByParentUid;\n"]}
@@ -1,5 +1,5 @@
1
- declare const getBlockUidAndTextIncludingText: (t: string) => {
2
- uid: string;
3
- text: string;
4
- }[];
5
- export default getBlockUidAndTextIncludingText;
1
+ declare const getBlockUidAndTextIncludingText: (t: string) => {
2
+ uid: string;
3
+ text: string;
4
+ }[];
5
+ export default getBlockUidAndTextIncludingText;
@@ -1,8 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getBlockUidAndTextIncludingText = (t) => window.roamAlphaAPI.data.fast.q(`[:find (pull ?block [:block/uid :block/string]) :where [?block :block/string ?contents] [(clojure.string/includes? ?contents "${t}")]]`).map(([block]) => ({
4
- uid: block[":block/uid"] || "",
5
- text: block[":block/string"] || "",
6
- }));
7
- exports.default = getBlockUidAndTextIncludingText;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const getBlockUidAndTextIncludingText = (t) => window.roamAlphaAPI.data.fast.q(`[:find (pull ?block [:block/uid :block/string]) :where [?block :block/string ?contents] [(clojure.string/includes? ?contents "${t}")]]`).map(([block]) => ({
4
+ uid: block[":block/uid"] || "",
5
+ text: block[":block/string"] || "",
6
+ }));
7
+ exports.default = getBlockUidAndTextIncludingText;
8
8
  //# sourceMappingURL=getBlockUidAndTextIncludingText.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBlockUidAndTextIncludingText.js","sourceRoot":"","sources":["../../src/queries/getBlockUidAndTextIncludingText.ts"],"names":[],"mappings":";;AAEA,MAAM,+BAA+B,GAAG,CACtC,CAAS,EACwB,EAAE,CAEjC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAC7B,kIAAkI,CAAC,MAAM,CAE5I,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAClB,GAAG,EAAE,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE;IAC9B,IAAI,EAAE,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE;CACnC,CAAC,CAAC,CAAC;AAEN,kBAAe,+BAA+B,CAAC","sourcesContent":["import { PullBlock } from \"../types\";\r\n\r\nconst getBlockUidAndTextIncludingText = (\r\n t: string\r\n): { uid: string; text: string }[] =>\r\n (\r\n window.roamAlphaAPI.data.fast.q(\r\n `[:find (pull ?block [:block/uid :block/string]) :where [?block :block/string ?contents] [(clojure.string/includes? ?contents \"${t}\")]]`\r\n ) as [PullBlock][]\r\n ).map(([block]) => ({\r\n uid: block[\":block/uid\"] || \"\",\r\n text: block[\":block/string\"] || \"\",\r\n }));\r\n\r\nexport default getBlockUidAndTextIncludingText;\r\n"]}
1
+ {"version":3,"file":"getBlockUidAndTextIncludingText.js","sourceRoot":"","sources":["../../src/queries/getBlockUidAndTextIncludingText.ts"],"names":[],"mappings":";;AAEA,MAAM,+BAA+B,GAAG,CACtC,CAAS,EACwB,EAAE,CAEjC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAC7B,kIAAkI,CAAC,MAAM,CAE5I,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAClB,GAAG,EAAE,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE;IAC9B,IAAI,EAAE,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE;CACnC,CAAC,CAAC,CAAC;AAEN,kBAAe,+BAA+B,CAAC","sourcesContent":["import { PullBlock } from \"../types\";\n\nconst getBlockUidAndTextIncludingText = (\n t: string\n): { uid: string; text: string }[] =>\n (\n window.roamAlphaAPI.data.fast.q(\n `[:find (pull ?block [:block/uid :block/string]) :where [?block :block/string ?contents] [(clojure.string/includes? ?contents \"${t}\")]]`\n ) as [PullBlock][]\n ).map(([block]) => ({\n uid: block[\":block/uid\"] || \"\",\n text: block[\":block/string\"] || \"\",\n }));\n\nexport default getBlockUidAndTextIncludingText;\n"]}
@@ -1,5 +1,5 @@
1
- declare const getBlockUidByTextOnPage: ({ text, title, }: {
2
- text: string;
3
- title: string;
4
- }) => string;
5
- export default getBlockUidByTextOnPage;
1
+ declare const getBlockUidByTextOnPage: ({ text, title, }: {
2
+ text: string;
3
+ title: string;
4
+ }) => string;
5
+ export default getBlockUidByTextOnPage;
@@ -1,8 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getBlockUidByTextOnPage = ({ text, title, }) => {
4
- var _a, _b;
5
- return ((_b = (_a = window.roamAlphaAPI.q(`[:find ?u :where [?b :block/page ?p] [?b :block/uid ?u] [?b :block/string "${text}"] [?p :node/title "${title}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || "";
6
- };
7
- exports.default = getBlockUidByTextOnPage;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const getBlockUidByTextOnPage = ({ text, title, }) => {
4
+ var _a, _b;
5
+ return ((_b = (_a = window.roamAlphaAPI.q(`[:find ?u :where [?b :block/page ?p] [?b :block/uid ?u] [?b :block/string "${text}"] [?p :node/title "${title}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || "";
6
+ };
7
+ exports.default = getBlockUidByTextOnPage;
8
8
  //# sourceMappingURL=getBlockUidByTextOnPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBlockUidByTextOnPage.js","sourceRoot":"","sources":["../../src/queries/getBlockUidByTextOnPage.ts"],"names":[],"mappings":";;AAAA,MAAM,uBAAuB,GAAG,CAAC,EAC/B,IAAI,EACJ,KAAK,GAIN,EAAU,EAAE;;IACX,OAAA,CAAC,MAAA,MAAA,MAAM,CAAC,YAAY,CAAC,CAAC,CACpB,8EAA8E,IAAI,uBAAuB,KAAK,KAAK,CACpH,0CAAG,CAAC,CAAC,0CAAG,CAAC,CAAY,KAAI,EAAE,CAAA;CAAA,CAAC;AAE/B,kBAAe,uBAAuB,CAAC","sourcesContent":["const getBlockUidByTextOnPage = ({\r\n text,\r\n title,\r\n}: {\r\n text: string;\r\n title: string;\r\n}): string =>\r\n (window.roamAlphaAPI.q(\r\n `[:find ?u :where [?b :block/page ?p] [?b :block/uid ?u] [?b :block/string \"${text}\"] [?p :node/title \"${title}\"]]`\r\n )?.[0]?.[0] as string) || \"\";\r\n\r\nexport default getBlockUidByTextOnPage;\r\n"]}
1
+ {"version":3,"file":"getBlockUidByTextOnPage.js","sourceRoot":"","sources":["../../src/queries/getBlockUidByTextOnPage.ts"],"names":[],"mappings":";;AAAA,MAAM,uBAAuB,GAAG,CAAC,EAC/B,IAAI,EACJ,KAAK,GAIN,EAAU,EAAE;;IACX,OAAA,CAAC,MAAA,MAAA,MAAM,CAAC,YAAY,CAAC,CAAC,CACpB,8EAA8E,IAAI,uBAAuB,KAAK,KAAK,CACpH,0CAAG,CAAC,CAAC,0CAAG,CAAC,CAAY,KAAI,EAAE,CAAA;CAAA,CAAC;AAE/B,kBAAe,uBAAuB,CAAC","sourcesContent":["const getBlockUidByTextOnPage = ({\n text,\n title,\n}: {\n text: string;\n title: string;\n}): string =>\n (window.roamAlphaAPI.q(\n `[:find ?u :where [?b :block/page ?p] [?b :block/uid ?u] [?b :block/string \"${text}\"] [?p :node/title \"${title}\"]]`\n )?.[0]?.[0] as string) || \"\";\n\nexport default getBlockUidByTextOnPage;\n"]}
@@ -1,5 +1,5 @@
1
- declare const getBlockUidsAndTextsReferencingPage: (title: string) => {
2
- uid: string;
3
- text: string;
4
- }[];
5
- export default getBlockUidsAndTextsReferencingPage;
1
+ declare const getBlockUidsAndTextsReferencingPage: (title: string) => {
2
+ uid: string;
3
+ text: string;
4
+ }[];
5
+ export default getBlockUidsAndTextsReferencingPage;
@@ -1,10 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const normalizePageTitle_1 = tslib_1.__importDefault(require("./normalizePageTitle"));
5
- const getBlockUidsAndTextsReferencingPage = (title) => window.roamAlphaAPI.data.fast.q(`[:find (pull ?r [:block/uid :block/string]) :where [?p :node/title "${(0, normalizePageTitle_1.default)(title)}"] [?r :block/refs ?p]]`).map(([node]) => ({
6
- uid: node[":block/uid"] || "",
7
- text: node[":block/string"] || "",
8
- }));
9
- exports.default = getBlockUidsAndTextsReferencingPage;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const normalizePageTitle_1 = tslib_1.__importDefault(require("./normalizePageTitle"));
5
+ const getBlockUidsAndTextsReferencingPage = (title) => window.roamAlphaAPI.data.fast.q(`[:find (pull ?r [:block/uid :block/string]) :where [?p :node/title "${(0, normalizePageTitle_1.default)(title)}"] [?r :block/refs ?p]]`).map(([node]) => ({
6
+ uid: node[":block/uid"] || "",
7
+ text: node[":block/string"] || "",
8
+ }));
9
+ exports.default = getBlockUidsAndTextsReferencingPage;
10
10
  //# sourceMappingURL=getBlockUidsAndTextsReferencingPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBlockUidsAndTextsReferencingPage.js","sourceRoot":"","sources":["../../src/queries/getBlockUidsAndTextsReferencingPage.ts"],"names":[],"mappings":";;;AACA,sFAAsD;AAEtD,MAAM,mCAAmC,GAAG,CAC1C,KAAa,EACoB,EAAE,CAEjC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAC7B,uEAAuE,IAAA,4BAAkB,EACvF,KAAK,CACN,yBAAyB,CAE7B,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IACjB,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IAC7B,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;CAClC,CAAC,CAAC,CAAC;AAEN,kBAAe,mCAAmC,CAAC","sourcesContent":["import { PullBlock } from \"../types\";\r\nimport normalizePageTitle from \"./normalizePageTitle\";\r\n\r\nconst getBlockUidsAndTextsReferencingPage = (\r\n title: string\r\n): { uid: string; text: string }[] =>\r\n (\r\n window.roamAlphaAPI.data.fast.q(\r\n `[:find (pull ?r [:block/uid :block/string]) :where [?p :node/title \"${normalizePageTitle(\r\n title\r\n )}\"] [?r :block/refs ?p]]`\r\n ) as [PullBlock][]\r\n ).map(([node]) => ({\r\n uid: node[\":block/uid\"] || \"\",\r\n text: node[\":block/string\"] || \"\",\r\n }));\r\n\r\nexport default getBlockUidsAndTextsReferencingPage;\r\n"]}
1
+ {"version":3,"file":"getBlockUidsAndTextsReferencingPage.js","sourceRoot":"","sources":["../../src/queries/getBlockUidsAndTextsReferencingPage.ts"],"names":[],"mappings":";;;AACA,sFAAsD;AAEtD,MAAM,mCAAmC,GAAG,CAC1C,KAAa,EACoB,EAAE,CAEjC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAC7B,uEAAuE,IAAA,4BAAkB,EACvF,KAAK,CACN,yBAAyB,CAE7B,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IACjB,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IAC7B,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;CAClC,CAAC,CAAC,CAAC;AAEN,kBAAe,mCAAmC,CAAC","sourcesContent":["import { PullBlock } from \"../types\";\nimport normalizePageTitle from \"./normalizePageTitle\";\n\nconst getBlockUidsAndTextsReferencingPage = (\n title: string\n): { uid: string; text: string }[] =>\n (\n window.roamAlphaAPI.data.fast.q(\n `[:find (pull ?r [:block/uid :block/string]) :where [?p :node/title \"${normalizePageTitle(\n title\n )}\"] [?r :block/refs ?p]]`\n ) as [PullBlock][]\n ).map(([node]) => ({\n uid: node[\":block/uid\"] || \"\",\n text: node[\":block/string\"] || \"\",\n }));\n\nexport default getBlockUidsAndTextsReferencingPage;\n"]}
@@ -1,2 +1,2 @@
1
- declare const getBlockUidsByPageTitle: (title: string) => string[];
2
- export default getBlockUidsByPageTitle;
1
+ declare const getBlockUidsByPageTitle: (title: string) => string[];
2
+ export default getBlockUidsByPageTitle;
@@ -1,9 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const normalizePageTitle_1 = tslib_1.__importDefault(require("./normalizePageTitle"));
5
- const getBlockUidsByPageTitle = (title) => window.roamAlphaAPI
6
- .q(`[:find ?u :where [?b :block/uid ?u] [?b :block/page ?e] [?e :node/title "${(0, normalizePageTitle_1.default)(title)}"]]`)
7
- .map((b) => b[0]);
8
- exports.default = getBlockUidsByPageTitle;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const normalizePageTitle_1 = tslib_1.__importDefault(require("./normalizePageTitle"));
5
+ const getBlockUidsByPageTitle = (title) => window.roamAlphaAPI
6
+ .q(`[:find ?u :where [?b :block/uid ?u] [?b :block/page ?e] [?e :node/title "${(0, normalizePageTitle_1.default)(title)}"]]`)
7
+ .map((b) => b[0]);
8
+ exports.default = getBlockUidsByPageTitle;
9
9
  //# sourceMappingURL=getBlockUidsByPageTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBlockUidsByPageTitle.js","sourceRoot":"","sources":["../../src/queries/getBlockUidsByPageTitle.ts"],"names":[],"mappings":";;;AAAA,sFAAsD;AAEtD,MAAM,uBAAuB,GAAG,CAAC,KAAa,EAAY,EAAE,CAC1D,MAAM,CAAC,YAAY;KAChB,CAAC,CACA,6EAA6E,IAAA,4BAAkB,EAC7F,KAAK,CACN,KAAK,CACP;KACA,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC,CAAC;AAEhC,kBAAe,uBAAuB,CAAC","sourcesContent":["import normalizePageTitle from \"./normalizePageTitle\";\r\n\r\nconst getBlockUidsByPageTitle = (title: string): string[] =>\r\n window.roamAlphaAPI\r\n .q(\r\n `[:find ?u :where [?b :block/uid ?u] [?b :block/page ?e] [?e :node/title \"${normalizePageTitle(\r\n title\r\n )}\"]]`\r\n )\r\n .map((b) => b[0] as string);\r\n\r\nexport default getBlockUidsByPageTitle;\r\n"]}
1
+ {"version":3,"file":"getBlockUidsByPageTitle.js","sourceRoot":"","sources":["../../src/queries/getBlockUidsByPageTitle.ts"],"names":[],"mappings":";;;AAAA,sFAAsD;AAEtD,MAAM,uBAAuB,GAAG,CAAC,KAAa,EAAY,EAAE,CAC1D,MAAM,CAAC,YAAY;KAChB,CAAC,CACA,6EAA6E,IAAA,4BAAkB,EAC7F,KAAK,CACN,KAAK,CACP;KACA,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC,CAAC;AAEhC,kBAAe,uBAAuB,CAAC","sourcesContent":["import normalizePageTitle from \"./normalizePageTitle\";\n\nconst getBlockUidsByPageTitle = (title: string): string[] =>\n window.roamAlphaAPI\n .q(\n `[:find ?u :where [?b :block/uid ?u] [?b :block/page ?e] [?e :node/title \"${normalizePageTitle(\n title\n )}\"]]`\n )\n .map((b) => b[0] as string);\n\nexport default getBlockUidsByPageTitle;\n"]}
@@ -1,2 +1,2 @@
1
- declare const getBlockUidsReferencingBlock: (uid: string) => string[];
2
- export default getBlockUidsReferencingBlock;
1
+ declare const getBlockUidsReferencingBlock: (uid: string) => string[];
2
+ export default getBlockUidsReferencingBlock;
@@ -1,5 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getBlockUidsReferencingBlock = (uid) => window.roamAlphaAPI.data.fast.q(`[:find (pull ?r [:block/uid]) :where [?b :block/uid "${uid}"] [?r :block/refs ?b]]`).map((s) => s[0][":block/uid"] || "");
4
- exports.default = getBlockUidsReferencingBlock;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const getBlockUidsReferencingBlock = (uid) => window.roamAlphaAPI.data.fast.q(`[:find (pull ?r [:block/uid]) :where [?b :block/uid "${uid}"] [?r :block/refs ?b]]`).map((s) => s[0][":block/uid"] || "");
4
+ exports.default = getBlockUidsReferencingBlock;
5
5
  //# sourceMappingURL=getBlockUidsReferencingBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBlockUidsReferencingBlock.js","sourceRoot":"","sources":["../../src/queries/getBlockUidsReferencingBlock.ts"],"names":[],"mappings":";;AAEA,MAAM,4BAA4B,GAAG,CAAC,GAAW,EAAY,EAAE,CAE3D,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAC7B,wDAAwD,GAAG,yBAAyB,CAEvF,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;AAEzC,kBAAe,4BAA4B,CAAC","sourcesContent":["import { PullBlock } from \"../types\";\r\n\r\nconst getBlockUidsReferencingBlock = (uid: string): string[] =>\r\n (\r\n window.roamAlphaAPI.data.fast.q(\r\n `[:find (pull ?r [:block/uid]) :where [?b :block/uid \"${uid}\"] [?r :block/refs ?b]]`\r\n ) as [PullBlock][]\r\n ).map((s) => s[0][\":block/uid\"] || \"\");\r\n\r\nexport default getBlockUidsReferencingBlock;\r\n"]}
1
+ {"version":3,"file":"getBlockUidsReferencingBlock.js","sourceRoot":"","sources":["../../src/queries/getBlockUidsReferencingBlock.ts"],"names":[],"mappings":";;AAEA,MAAM,4BAA4B,GAAG,CAAC,GAAW,EAAY,EAAE,CAE3D,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAC7B,wDAAwD,GAAG,yBAAyB,CAEvF,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;AAEzC,kBAAe,4BAA4B,CAAC","sourcesContent":["import { PullBlock } from \"../types\";\n\nconst getBlockUidsReferencingBlock = (uid: string): string[] =>\n (\n window.roamAlphaAPI.data.fast.q(\n `[:find (pull ?r [:block/uid]) :where [?b :block/uid \"${uid}\"] [?r :block/refs ?b]]`\n ) as [PullBlock][]\n ).map((s) => s[0][\":block/uid\"] || \"\");\n\nexport default getBlockUidsReferencingBlock;\n"]}
@@ -1,2 +1,2 @@
1
- declare const getBlockUidsReferencingPage: (title: string) => string[];
2
- export default getBlockUidsReferencingPage;
1
+ declare const getBlockUidsReferencingPage: (title: string) => string[];
2
+ export default getBlockUidsReferencingPage;
@@ -1,7 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const normalizePageTitle_1 = tslib_1.__importDefault(require("./normalizePageTitle"));
5
- const getBlockUidsReferencingPage = (title) => window.roamAlphaAPI.data.fast.q(`[:find (pull ?r [:block/uid]) :where [?p :node/title "${(0, normalizePageTitle_1.default)(title)}"] [?r :block/refs ?p]]`).map((s) => s[0][":block/uid"] || "");
6
- exports.default = getBlockUidsReferencingPage;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const normalizePageTitle_1 = tslib_1.__importDefault(require("./normalizePageTitle"));
5
+ const getBlockUidsReferencingPage = (title) => window.roamAlphaAPI.data.fast.q(`[:find (pull ?r [:block/uid]) :where [?p :node/title "${(0, normalizePageTitle_1.default)(title)}"] [?r :block/refs ?p]]`).map((s) => s[0][":block/uid"] || "");
6
+ exports.default = getBlockUidsReferencingPage;
7
7
  //# sourceMappingURL=getBlockUidsReferencingPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBlockUidsReferencingPage.js","sourceRoot":"","sources":["../../src/queries/getBlockUidsReferencingPage.ts"],"names":[],"mappings":";;;AACA,sFAAsD;AAEtD,MAAM,2BAA2B,GAAG,CAAC,KAAa,EAAY,EAAE,CAE5D,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAC7B,yDAAyD,IAAA,4BAAkB,EACzE,KAAK,CACN,yBAAyB,CAE7B,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;AAEzC,kBAAe,2BAA2B,CAAC","sourcesContent":["import { PullBlock } from \"../types\";\r\nimport normalizePageTitle from \"./normalizePageTitle\";\r\n\r\nconst getBlockUidsReferencingPage = (title: string): string[] =>\r\n (\r\n window.roamAlphaAPI.data.fast.q(\r\n `[:find (pull ?r [:block/uid]) :where [?p :node/title \"${normalizePageTitle(\r\n title\r\n )}\"] [?r :block/refs ?p]]`\r\n ) as [PullBlock][]\r\n ).map((s) => s[0][\":block/uid\"] || \"\");\r\n\r\nexport default getBlockUidsReferencingPage;\r\n"]}
1
+ {"version":3,"file":"getBlockUidsReferencingPage.js","sourceRoot":"","sources":["../../src/queries/getBlockUidsReferencingPage.ts"],"names":[],"mappings":";;;AACA,sFAAsD;AAEtD,MAAM,2BAA2B,GAAG,CAAC,KAAa,EAAY,EAAE,CAE5D,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAC7B,yDAAyD,IAAA,4BAAkB,EACzE,KAAK,CACN,yBAAyB,CAE7B,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;AAEzC,kBAAe,2BAA2B,CAAC","sourcesContent":["import { PullBlock } from \"../types\";\nimport normalizePageTitle from \"./normalizePageTitle\";\n\nconst getBlockUidsReferencingPage = (title: string): string[] =>\n (\n window.roamAlphaAPI.data.fast.q(\n `[:find (pull ?r [:block/uid]) :where [?p :node/title \"${normalizePageTitle(\n title\n )}\"] [?r :block/refs ?p]]`\n ) as [PullBlock][]\n ).map((s) => s[0][\":block/uid\"] || \"\");\n\nexport default getBlockUidsReferencingPage;\n"]}
@@ -1,2 +1,2 @@
1
- declare const getBlockUidsWithParentUid: (uid: string) => string[];
2
- export default getBlockUidsWithParentUid;
1
+ declare const getBlockUidsWithParentUid: (uid: string) => string[];
2
+ export default getBlockUidsWithParentUid;
@@ -1,7 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getBlockUidsWithParentUid = (uid) => window.roamAlphaAPI
4
- .q(`[:find ?u :where [?c :block/uid ?u] [?c :block/parents ?b] [?b :block/uid "${uid}"]]`)
5
- .map((r) => r[0]);
6
- exports.default = getBlockUidsWithParentUid;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const getBlockUidsWithParentUid = (uid) => window.roamAlphaAPI
4
+ .q(`[:find ?u :where [?c :block/uid ?u] [?c :block/parents ?b] [?b :block/uid "${uid}"]]`)
5
+ .map((r) => r[0]);
6
+ exports.default = getBlockUidsWithParentUid;
7
7
  //# sourceMappingURL=getBlockUidsWithParentUid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBlockUidsWithParentUid.js","sourceRoot":"","sources":["../../src/queries/getBlockUidsWithParentUid.ts"],"names":[],"mappings":";;AAEA,MAAM,yBAAyB,GAAG,CAAC,GAAW,EAAY,EAAE,CAC1D,MAAM,CAAC,YAAY;KAChB,CAAC,CACA,8EAA8E,GAAG,KAAK,CACvF;KACA,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC,CAAC;AAEhC,kBAAe,yBAAyB,CAAC","sourcesContent":["\r\n\r\nconst getBlockUidsWithParentUid = (uid: string): string[] =>\r\n window.roamAlphaAPI\r\n .q(\r\n `[:find ?u :where [?c :block/uid ?u] [?c :block/parents ?b] [?b :block/uid \"${uid}\"]]`\r\n )\r\n .map((r) => r[0] as string);\r\n\r\nexport default getBlockUidsWithParentUid;\r\n"]}
1
+ {"version":3,"file":"getBlockUidsWithParentUid.js","sourceRoot":"","sources":["../../src/queries/getBlockUidsWithParentUid.ts"],"names":[],"mappings":";;AAEA,MAAM,yBAAyB,GAAG,CAAC,GAAW,EAAY,EAAE,CAC1D,MAAM,CAAC,YAAY;KAChB,CAAC,CACA,8EAA8E,GAAG,KAAK,CACvF;KACA,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC,CAAC;AAEhC,kBAAe,yBAAyB,CAAC","sourcesContent":["\n\nconst getBlockUidsWithParentUid = (uid: string): string[] =>\n window.roamAlphaAPI\n .q(\n `[:find ?u :where [?c :block/uid ?u] [?c :block/parents ?b] [?b :block/uid \"${uid}\"]]`\n )\n .map((r) => r[0] as string);\n\nexport default getBlockUidsWithParentUid;\n"]}
@@ -1,2 +1,2 @@
1
- declare const getChildrenLengthByPageUid: (uid: string) => number;
2
- export default getChildrenLengthByPageUid;
1
+ declare const getChildrenLengthByPageUid: (uid: string) => number;
2
+ export default getChildrenLengthByPageUid;
@@ -1,9 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // @deprecated - use getChildrenLengthByParentUid instead
4
- const getChildrenLengthByPageUid = (uid) => {
5
- var _a, _b;
6
- return ((_b = (_a = window.roamAlphaAPI.pull("[:block/children]", [":block/uid", uid])) === null || _a === void 0 ? void 0 : _a[":block/children"]) === null || _b === void 0 ? void 0 : _b.length) || 0;
7
- };
8
- exports.default = getChildrenLengthByPageUid;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @deprecated - use getChildrenLengthByParentUid instead
4
+ const getChildrenLengthByPageUid = (uid) => {
5
+ var _a, _b;
6
+ return ((_b = (_a = window.roamAlphaAPI.pull("[:block/children]", [":block/uid", uid])) === null || _a === void 0 ? void 0 : _a[":block/children"]) === null || _b === void 0 ? void 0 : _b.length) || 0;
7
+ };
8
+ exports.default = getChildrenLengthByPageUid;
9
9
  //# sourceMappingURL=getChildrenLengthByPageUid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getChildrenLengthByPageUid.js","sourceRoot":"","sources":["../../src/queries/getChildrenLengthByPageUid.ts"],"names":[],"mappings":";;AAAA,yDAAyD;AACzD,MAAM,0BAA0B,GAAG,CAAC,GAAW,EAAU,EAAE;;IACzD,OAAA,CAAA,MAAA,MAAA,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,0CAChE,iBAAiB,CAClB,0CAAE,MAAM,KAAI,CAAC,CAAA;CAAA,CAAC;AAEjB,kBAAe,0BAA0B,CAAC","sourcesContent":["// @deprecated - use getChildrenLengthByParentUid instead\r\nconst getChildrenLengthByPageUid = (uid: string): number =>\r\n window.roamAlphaAPI.pull(\"[:block/children]\", [\":block/uid\", uid])?.[\r\n \":block/children\"\r\n ]?.length || 0;\r\n\r\nexport default getChildrenLengthByPageUid;\r\n"]}
1
+ {"version":3,"file":"getChildrenLengthByPageUid.js","sourceRoot":"","sources":["../../src/queries/getChildrenLengthByPageUid.ts"],"names":[],"mappings":";;AAAA,yDAAyD;AACzD,MAAM,0BAA0B,GAAG,CAAC,GAAW,EAAU,EAAE;;IACzD,OAAA,CAAA,MAAA,MAAA,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,0CAChE,iBAAiB,CAClB,0CAAE,MAAM,KAAI,CAAC,CAAA;CAAA,CAAC;AAEjB,kBAAe,0BAA0B,CAAC","sourcesContent":["// @deprecated - use getChildrenLengthByParentUid instead\nconst getChildrenLengthByPageUid = (uid: string): number =>\n window.roamAlphaAPI.pull(\"[:block/children]\", [\":block/uid\", uid])?.[\n \":block/children\"\n ]?.length || 0;\n\nexport default getChildrenLengthByPageUid;\n"]}
@@ -1,2 +1,2 @@
1
- declare const getChildrenLengthByPageUid: (uid: string) => number;
2
- export default getChildrenLengthByPageUid;
1
+ declare const getChildrenLengthByPageUid: (uid: string) => number;
2
+ export default getChildrenLengthByPageUid;
@@ -1,8 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getChildrenLengthByPageUid = (uid) => {
4
- var _a, _b;
5
- return ((_b = (_a = window.roamAlphaAPI.pull("[:block/children]", [":block/uid", uid])) === null || _a === void 0 ? void 0 : _a[":block/children"]) === null || _b === void 0 ? void 0 : _b.length) || 0;
6
- };
7
- exports.default = getChildrenLengthByPageUid;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const getChildrenLengthByPageUid = (uid) => {
4
+ var _a, _b;
5
+ return ((_b = (_a = window.roamAlphaAPI.pull("[:block/children]", [":block/uid", uid])) === null || _a === void 0 ? void 0 : _a[":block/children"]) === null || _b === void 0 ? void 0 : _b.length) || 0;
6
+ };
7
+ exports.default = getChildrenLengthByPageUid;
8
8
  //# sourceMappingURL=getChildrenLengthByParentUid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getChildrenLengthByParentUid.js","sourceRoot":"","sources":["../../src/queries/getChildrenLengthByParentUid.ts"],"names":[],"mappings":";;AAAA,MAAM,0BAA0B,GAAG,CAAC,GAAW,EAAU,EAAE;;IACzD,OAAA,CAAA,MAAA,MAAA,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,0CAChE,iBAAiB,CAClB,0CAAE,MAAM,KAAI,CAAC,CAAA;CAAA,CAAC;AAEjB,kBAAe,0BAA0B,CAAC","sourcesContent":["const getChildrenLengthByPageUid = (uid: string): number =>\r\n window.roamAlphaAPI.pull(\"[:block/children]\", [\":block/uid\", uid])?.[\r\n \":block/children\"\r\n ]?.length || 0;\r\n\r\nexport default getChildrenLengthByPageUid;\r\n"]}
1
+ {"version":3,"file":"getChildrenLengthByParentUid.js","sourceRoot":"","sources":["../../src/queries/getChildrenLengthByParentUid.ts"],"names":[],"mappings":";;AAAA,MAAM,0BAA0B,GAAG,CAAC,GAAW,EAAU,EAAE;;IACzD,OAAA,CAAA,MAAA,MAAA,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,0CAChE,iBAAiB,CAClB,0CAAE,MAAM,KAAI,CAAC,CAAA;CAAA,CAAC;AAEjB,kBAAe,0BAA0B,CAAC","sourcesContent":["const getChildrenLengthByPageUid = (uid: string): number =>\n window.roamAlphaAPI.pull(\"[:block/children]\", [\":block/uid\", uid])?.[\n \":block/children\"\n ]?.length || 0;\n\nexport default getChildrenLengthByPageUid;\n"]}
@@ -1,2 +1,2 @@
1
- declare const getCreateTimeByBlockUid: (uid: string) => number;
2
- export default getCreateTimeByBlockUid;
1
+ declare const getCreateTimeByBlockUid: (uid: string) => number;
2
+ export default getCreateTimeByBlockUid;
@@ -1,8 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getCreateTimeByBlockUid = (uid) => {
4
- var _a;
5
- return ((_a = window.roamAlphaAPI.pull(`[:edit/time]`, [":block/uid", uid])) === null || _a === void 0 ? void 0 : _a[":create/time"]) || 0;
6
- };
7
- exports.default = getCreateTimeByBlockUid;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const getCreateTimeByBlockUid = (uid) => {
4
+ var _a;
5
+ return ((_a = window.roamAlphaAPI.pull(`[:edit/time]`, [":block/uid", uid])) === null || _a === void 0 ? void 0 : _a[":create/time"]) || 0;
6
+ };
7
+ exports.default = getCreateTimeByBlockUid;
8
8
  //# sourceMappingURL=getCreateTimeByBlockUid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCreateTimeByBlockUid.js","sourceRoot":"","sources":["../../src/queries/getCreateTimeByBlockUid.ts"],"names":[],"mappings":";;AAAA,MAAM,uBAAuB,GAAG,CAAC,GAAW,EAAU,EAAE;;IACtD,OAAA,CAAA,MAAA,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,0CAC3D,cAAc,CACf,KAAI,CAAC,CAAA;CAAA,CAAC;AAET,kBAAe,uBAAuB,CAAC","sourcesContent":["const getCreateTimeByBlockUid = (uid: string): number =>\r\n window.roamAlphaAPI.pull(`[:edit/time]`, [\":block/uid\", uid])?.[\r\n \":create/time\"\r\n ] || 0;\r\n\r\nexport default getCreateTimeByBlockUid;\r\n"]}
1
+ {"version":3,"file":"getCreateTimeByBlockUid.js","sourceRoot":"","sources":["../../src/queries/getCreateTimeByBlockUid.ts"],"names":[],"mappings":";;AAAA,MAAM,uBAAuB,GAAG,CAAC,GAAW,EAAU,EAAE;;IACtD,OAAA,CAAA,MAAA,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,0CAC3D,cAAc,CACf,KAAI,CAAC,CAAA;CAAA,CAAC;AAET,kBAAe,uBAAuB,CAAC","sourcesContent":["const getCreateTimeByBlockUid = (uid: string): number =>\n window.roamAlphaAPI.pull(`[:edit/time]`, [\":block/uid\", uid])?.[\n \":create/time\"\n ] || 0;\n\nexport default getCreateTimeByBlockUid;\n"]}
@@ -1,2 +1,2 @@
1
- declare const getCurrentUser: () => string[];
2
- export default getCurrentUser;
1
+ declare const getCurrentUser: () => string[];
2
+ export default getCurrentUser;
@@ -1,12 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getCurrentUser = () => {
4
- const globalAppState = JSON.parse(localStorage.getItem("globalAppState") || '["","",[]]');
5
- const userIndex = globalAppState.findIndex((s) => s === "~:user");
6
- if (userIndex > 0) {
7
- return globalAppState[userIndex + 1];
8
- }
9
- return [];
10
- };
11
- exports.default = getCurrentUser;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const getCurrentUser = () => {
4
+ const globalAppState = JSON.parse(localStorage.getItem("globalAppState") || '["","",[]]');
5
+ const userIndex = globalAppState.findIndex((s) => s === "~:user");
6
+ if (userIndex > 0) {
7
+ return globalAppState[userIndex + 1];
8
+ }
9
+ return [];
10
+ };
11
+ exports.default = getCurrentUser;
12
12
  //# sourceMappingURL=getCurrentUser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCurrentUser.js","sourceRoot":"","sources":["../../src/queries/getCurrentUser.ts"],"names":[],"mappings":";;AAAA,MAAM,cAAc,GAAG,GAAa,EAAE;IACpC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAC/B,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,YAAY,CAC9B,CAAC;IAC3B,MAAM,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC;IAClE,IAAI,SAAS,GAAG,CAAC,EAAE;QACjB,OAAO,cAAc,CAAC,SAAS,GAAG,CAAC,CAAa,CAAC;KAClD;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,kBAAe,cAAc,CAAC","sourcesContent":["const getCurrentUser = (): string[] => {\r\n const globalAppState = JSON.parse(\r\n localStorage.getItem(\"globalAppState\") || '[\"\",\"\",[]]'\r\n ) as (string | string[])[];\r\n const userIndex = globalAppState.findIndex((s) => s === \"~:user\");\r\n if (userIndex > 0) {\r\n return globalAppState[userIndex + 1] as string[];\r\n }\r\n return [];\r\n};\r\n\r\nexport default getCurrentUser;\r\n"]}
1
+ {"version":3,"file":"getCurrentUser.js","sourceRoot":"","sources":["../../src/queries/getCurrentUser.ts"],"names":[],"mappings":";;AAAA,MAAM,cAAc,GAAG,GAAa,EAAE;IACpC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAC/B,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,YAAY,CAC9B,CAAC;IAC3B,MAAM,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC;IAClE,IAAI,SAAS,GAAG,CAAC,EAAE;QACjB,OAAO,cAAc,CAAC,SAAS,GAAG,CAAC,CAAa,CAAC;KAClD;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,kBAAe,cAAc,CAAC","sourcesContent":["const getCurrentUser = (): string[] => {\n const globalAppState = JSON.parse(\n localStorage.getItem(\"globalAppState\") || '[\"\",\"\",[]]'\n ) as (string | string[])[];\n const userIndex = globalAppState.findIndex((s) => s === \"~:user\");\n if (userIndex > 0) {\n return globalAppState[userIndex + 1] as string[];\n }\n return [];\n};\n\nexport default getCurrentUser;\n"]}
@@ -1,2 +1,2 @@
1
- declare const getCurrentUserDisplayName: () => string;
2
- export default getCurrentUserDisplayName;
1
+ declare const getCurrentUserDisplayName: () => string;
2
+ export default getCurrentUserDisplayName;
@@ -1,11 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const getCurrentUserUid_1 = tslib_1.__importDefault(require("./getCurrentUserUid"));
5
- const getDisplayNameByUid_1 = tslib_1.__importDefault(require("./getDisplayNameByUid"));
6
- const getCurrentUserDisplayName = () => {
7
- const uid = (0, getCurrentUserUid_1.default)();
8
- return (0, getDisplayNameByUid_1.default)(uid);
9
- };
10
- exports.default = getCurrentUserDisplayName;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const getCurrentUserUid_1 = tslib_1.__importDefault(require("./getCurrentUserUid"));
5
+ const getDisplayNameByUid_1 = tslib_1.__importDefault(require("./getDisplayNameByUid"));
6
+ const getCurrentUserDisplayName = () => {
7
+ const uid = (0, getCurrentUserUid_1.default)();
8
+ return (0, getDisplayNameByUid_1.default)(uid);
9
+ };
10
+ exports.default = getCurrentUserDisplayName;
11
11
  //# sourceMappingURL=getCurrentUserDisplayName.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCurrentUserDisplayName.js","sourceRoot":"","sources":["../../src/queries/getCurrentUserDisplayName.ts"],"names":[],"mappings":";;;AAAA,oFAAoD;AACpD,wFAAwD;AAExD,MAAM,yBAAyB,GAAG,GAAW,EAAE;IAC7C,MAAM,GAAG,GAAG,IAAA,2BAAiB,GAAE,CAAC;IAChC,OAAO,IAAA,6BAAmB,EAAC,GAAG,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF,kBAAe,yBAAyB,CAAC","sourcesContent":["import getCurrentUserUid from \"./getCurrentUserUid\";\r\nimport getDisplayNameByUid from \"./getDisplayNameByUid\";\r\n\r\nconst getCurrentUserDisplayName = (): string => {\r\n const uid = getCurrentUserUid();\r\n return getDisplayNameByUid(uid);\r\n};\r\n\r\nexport default getCurrentUserDisplayName;\r\n"]}
1
+ {"version":3,"file":"getCurrentUserDisplayName.js","sourceRoot":"","sources":["../../src/queries/getCurrentUserDisplayName.ts"],"names":[],"mappings":";;;AAAA,oFAAoD;AACpD,wFAAwD;AAExD,MAAM,yBAAyB,GAAG,GAAW,EAAE;IAC7C,MAAM,GAAG,GAAG,IAAA,2BAAiB,GAAE,CAAC;IAChC,OAAO,IAAA,6BAAmB,EAAC,GAAG,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF,kBAAe,yBAAyB,CAAC","sourcesContent":["import getCurrentUserUid from \"./getCurrentUserUid\";\nimport getDisplayNameByUid from \"./getDisplayNameByUid\";\n\nconst getCurrentUserDisplayName = (): string => {\n const uid = getCurrentUserUid();\n return getDisplayNameByUid(uid);\n};\n\nexport default getCurrentUserDisplayName;\n"]}
@@ -1,2 +1,2 @@
1
- declare const getCurrentUserEmail: () => string;
2
- export default getCurrentUserEmail;
1
+ declare const getCurrentUserEmail: () => string;
2
+ export default getCurrentUserEmail;