roamjs-components 0.85.1 → 1.0.0-beta.2
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.
- package/.eslintrc.json +19 -0
- package/.github/workflows/main.yaml +34 -0
- package/LICENSE +21 -21
- package/README.md +29 -29
- package/docs/components.md +32 -0
- package/docs/date.md +13 -0
- package/docs/dom.md +58 -0
- package/docs/events.md +16 -0
- package/docs/hooks.md +15 -0
- package/docs/marked.md +56 -0
- package/docs/queries.md +24 -0
- package/docs/scripts.md +20 -0
- package/docs/types.md +32 -0
- package/docs/util.md +38 -0
- package/docs/writes.md +23 -0
- package/package.json +117 -117
- package/patches/dotenv+16.3.1.patch +12 -0
- package/src/components/AutocompleteInput.tsx +248 -0
- package/src/components/BlockErrorBoundary.tsx +35 -0
- package/src/components/BlockInput.tsx +130 -0
- package/src/components/ComponentContainer.tsx +71 -0
- package/src/components/ConfigPage.tsx +340 -0
- package/src/components/ConfigPanels/BlockPanel.tsx +60 -0
- package/src/components/ConfigPanels/BlocksPanel.tsx +102 -0
- package/src/components/ConfigPanels/CustomPanel.tsx +41 -0
- package/src/components/ConfigPanels/FlagPanel.tsx +48 -0
- package/src/components/ConfigPanels/MultiChildPanel.tsx +108 -0
- package/src/components/ConfigPanels/MultiTextPanel.tsx +23 -0
- package/src/components/ConfigPanels/NumberPanel.tsx +36 -0
- package/src/components/ConfigPanels/OauthPanel.tsx +134 -0
- package/src/components/ConfigPanels/PagesPanel.tsx +19 -0
- package/src/components/ConfigPanels/SelectPanel.tsx +46 -0
- package/src/components/ConfigPanels/TextPanel.tsx +44 -0
- package/src/components/ConfigPanels/TimePanel.tsx +45 -0
- package/src/components/ConfigPanels/getBrandColors.tsx +31 -0
- package/src/components/ConfigPanels/types.ts +111 -0
- package/src/components/ConfigPanels/useSingleChildValue.tsx +80 -0
- package/src/components/CursorMenu.tsx +286 -0
- package/src/components/Description.tsx +31 -0
- package/src/components/ExtensionApiContext.tsx +24 -0
- package/src/components/ExternalLogin.tsx +201 -0
- package/src/components/Filter.tsx +313 -0
- package/src/components/FormDialog.tsx +517 -0
- package/src/components/Loading.tsx +33 -0
- package/src/components/MenuItemSelect.tsx +88 -0
- package/src/components/OauthPanel.tsx +62 -0
- package/src/components/OauthSelect.tsx +49 -0
- package/src/components/PageInput.tsx +31 -0
- package/src/components/PageLink.tsx +50 -0
- package/src/components/ProgressDialog.tsx +85 -0
- package/src/components/SimpleAlert.tsx +103 -0
- package/src/components/Toast.tsx +85 -0
- package/src/components/index.ts +5 -0
- package/src/components.tsx +242 -0
- package/src/date/constants.ts +19 -0
- package/{date/index.d.ts → src/date/index.ts} +3 -3
- package/src/date/parseNlpDate.ts +270 -0
- package/src/date/parseRoamDateUid.ts +6 -0
- package/src/dom/addBlockCommand.ts +59 -0
- package/src/dom/addKeyboardTriggers.ts +56 -0
- package/src/dom/addOldRoamJSDependency.ts +10 -0
- package/src/dom/addRoamJSDependency.ts +7 -0
- package/src/dom/addScriptAsDependency.ts +24 -0
- package/src/dom/addStyle.ts +11 -0
- package/src/dom/constants.ts +1 -0
- package/src/dom/createBlockObserver.ts +44 -0
- package/src/dom/createButtonObserver.ts +31 -0
- package/src/dom/createDivObserver.ts +15 -0
- package/src/dom/createHTMLObserver.ts +44 -0
- package/src/dom/createHashtagObserver.ts +22 -0
- package/src/dom/createIconButton.ts +13 -0
- package/src/dom/createObserver.ts +15 -0
- package/src/dom/createOverlayObserver.ts +7 -0
- package/src/dom/createPageObserver.ts +39 -0
- package/src/dom/createPageTitleObserver.ts +44 -0
- package/src/dom/elToTitle.ts +21 -0
- package/src/dom/genericError.ts +13 -0
- package/src/dom/getActiveUids.ts +6 -0
- package/src/dom/getBlockUidFromTarget.ts +39 -0
- package/src/dom/getCurrentPageUid.ts +5 -0
- package/src/dom/getDomRefs.ts +15 -0
- package/src/dom/getDropUidOffset.ts +36 -0
- package/src/dom/getMutatedNodes.ts +31 -0
- package/src/dom/getPageTitleByHtmlElement.ts +19 -0
- package/src/dom/getPageTitleValueByHtmlElement.ts +8 -0
- package/src/dom/getReferenceBlockUid.ts +22 -0
- package/src/dom/getRoamUrl.ts +6 -0
- package/src/dom/getRoamUrlByPage.ts +9 -0
- package/src/dom/getUids.ts +9 -0
- package/src/dom/getUidsFromButton.ts +9 -0
- package/src/dom/getUidsFromId.ts +13 -0
- package/{dom/index.d.ts → src/dom/index.ts} +30 -30
- package/src/dom/parseRoamBlocksToHtml.ts +118 -0
- package/src/dom/resolveRefs.ts +46 -0
- package/{events/index.d.ts → src/events/index.ts} +1 -1
- package/src/events/watchOnce.ts +17 -0
- package/{hooks/index.d.ts → src/hooks/index.ts} +2 -2
- package/src/hooks/useArrowKeyDown.ts +72 -0
- package/src/hooks/useSubTree.ts +16 -0
- package/src/marked/index.ts +619 -0
- package/src/queries/compileDatalog.ts +81 -0
- package/src/queries/getAllBlockUids.ts +8 -0
- package/src/queries/getAllBlockUidsAndTexts.ts +10 -0
- package/src/queries/getAllPageNames.ts +8 -0
- package/src/queries/getAttributeValueByBlockAndName.ts +20 -0
- package/src/queries/getBasicTreeByParentUid.ts +21 -0
- package/src/queries/getBlockUidAndTextIncludingText.ts +15 -0
- package/src/queries/getBlockUidByTextOnPage.ts +14 -0
- package/src/queries/getBlockUidsAndTextsReferencingPage.ts +18 -0
- package/src/queries/getBlockUidsByPageTitle.ts +12 -0
- package/src/queries/getBlockUidsReferencingBlock.ts +10 -0
- package/src/queries/getBlockUidsReferencingPage.ts +15 -0
- package/src/queries/getBlockUidsWithParentUid.ts +8 -0
- package/src/queries/getChildrenLengthByPageUid.ts +10 -0
- package/src/queries/getChildrenLengthByParentUid.ts +9 -0
- package/src/queries/getCreateTimeByBlockUid.ts +9 -0
- package/src/queries/getCurrentUser.ts +12 -0
- package/src/queries/getCurrentUserDisplayName.ts +9 -0
- package/src/queries/getCurrentUserEmail.ts +12 -0
- package/src/queries/getCurrentUserUid.ts +12 -0
- package/src/queries/getDisplayNameByEmail.ts +8 -0
- package/src/queries/getDisplayNameByUid.ts +8 -0
- package/src/queries/getEditTimeByBlockUid.ts +9 -0
- package/src/queries/getEditedUserEmailByBlockUid.ts +10 -0
- package/src/queries/getFirstChildTextByBlockUid.ts +10 -0
- package/src/queries/getFirstChildUidByBlockUid.ts +6 -0
- package/src/queries/getFullTreeByParentUid.ts +60 -0
- package/src/queries/getLinkedPageTitlesUnderUid.ts +8 -0
- package/src/queries/getNthChildUidByBlockUid.ts +16 -0
- package/src/queries/getOrderByBlockUid.ts +8 -0
- package/src/queries/getPageTitleByBlockUid.ts +8 -0
- package/src/queries/getPageTitleByPageUid.ts +13 -0
- package/src/queries/getPageTitleReferencesByPageTitle.ts +15 -0
- package/src/queries/getPageTitlesAndBlockUidsReferencingPage.ts +18 -0
- package/src/queries/getPageTitlesAndUidsDirectlyReferencingPage.ts +18 -0
- package/src/queries/getPageTitlesReferencingBlockUid.ts +12 -0
- package/src/queries/getPageTitlesStartingWithPrefix.ts +10 -0
- package/src/queries/getPageUidByBlockUid.ts +8 -0
- package/src/queries/getPageUidByPageTitle.ts +10 -0
- package/src/queries/getPageViewType.ts +13 -0
- package/src/queries/getParentTextByBlockUid.ts +8 -0
- package/src/queries/getParentTextByBlockUidAndTag.ts +14 -0
- package/src/queries/getParentUidByBlockUid.ts +10 -0
- package/src/queries/getParentUidsOfBlockUid.ts +10 -0
- package/src/queries/getSettingsByEmail.ts +10 -0
- package/src/queries/getShallowTreeByParentUid.ts +17 -0
- package/src/queries/getTextByBlockUid.ts +10 -0
- package/src/queries/index.ts +5 -0
- package/src/queries/isLiveBlock.ts +9 -0
- package/src/queries/isTagOnPage.ts +20 -0
- package/src/queries/normalizePageTitle.ts +4 -0
- package/src/scripts/index.ts +2 -0
- package/src/scripts/publishToRoamDepot.ts +163 -0
- package/src/testing/mockRoamEnvironment.ts +1493 -0
- package/src/types/index.ts +266 -0
- package/src/types/native.ts +495 -0
- package/src/types/query-builder.ts +10 -0
- package/src/types/smartblocks.ts +39 -0
- package/src/util/addInputSetting.ts +33 -0
- package/src/util/apiDelete.ts +5 -0
- package/src/util/apiGet.ts +5 -0
- package/src/util/apiPost.ts +5 -0
- package/src/util/apiPut.ts +5 -0
- package/src/util/createOverlayRender.ts +12 -0
- package/src/util/createTagRegex.ts +7 -0
- package/src/util/dispatchToRegistry.ts +11 -0
- package/src/util/env.ts +44 -0
- package/src/util/extensionApiContext.ts +17 -0
- package/src/util/extensionDeprecatedWarning.ts +58 -0
- package/src/util/extractRef.ts +8 -0
- package/src/util/extractTag.ts +15 -0
- package/src/util/focusMainWindowBlock.ts +13 -0
- package/src/util/getAuthorizationHeader.ts +11 -0
- package/src/util/getLocalStorageKey.ts +4 -0
- package/src/util/getOauth.ts +56 -0
- package/src/util/getOauthAccounts.ts +26 -0
- package/src/util/getRenderRoot.ts +17 -0
- package/src/util/getSettingIntFromTree.ts +18 -0
- package/src/util/getSettingValueFromTree.ts +27 -0
- package/src/util/getSettingValuesFromTree.ts +20 -0
- package/src/util/getSubTree.ts +33 -0
- package/src/util/getToken.ts +17 -0
- package/src/util/getTokenFromTree.ts +6 -0
- package/src/util/getWorkerClient.ts +55 -0
- package/src/util/handleBodyFetch.ts +38 -0
- package/src/util/handleFetch.ts +70 -0
- package/src/util/handleUrlFetch.ts +30 -0
- package/src/util/idToTitle.ts +8 -0
- package/{util/index.d.ts → src/util/index.ts} +24 -24
- package/src/util/isControl.ts +4 -0
- package/src/util/localStorageGet.ts +6 -0
- package/src/util/localStorageRemove.ts +6 -0
- package/src/util/localStorageSet.ts +6 -0
- package/src/util/registerExperimentalMode.ts +76 -0
- package/src/util/registerSmartBlocksCommand.ts +23 -0
- package/src/util/removeFromRegistry.ts +11 -0
- package/src/util/renderOverlay.ts +69 -0
- package/src/util/renderWithUnmount.ts +50 -0
- package/src/util/runExtension.ts +206 -0
- package/src/util/setInputSetting.ts +46 -0
- package/src/util/setInputSettings.ts +37 -0
- package/src/util/stripUid.ts +10 -0
- package/src/util/toConfigPageName.ts +3 -0
- package/src/util/toFlexRegex.ts +7 -0
- package/src/writes/clearBlockById.ts +17 -0
- package/src/writes/clearBlockByUid.ts +16 -0
- package/src/writes/createBlock.ts +50 -0
- package/src/writes/createPage.ts +30 -0
- package/src/writes/deleteBlock.ts +9 -0
- package/{writes/index.d.ts → src/writes/index.ts} +8 -8
- package/src/writes/openBlockInSidebar.ts +13 -0
- package/src/writes/submitActions.ts +54 -0
- package/src/writes/updateActiveBlock.ts +17 -0
- package/src/writes/updateBlock.ts +33 -0
- package/tests/backend.test.tsx +28 -0
- package/tests/date.test.ts +26 -0
- package/tests/dom.test.tsx +10 -0
- package/tests/index.test.tsx +25 -0
- package/tests/marked.test.ts +474 -0
- package/tests/util/createTagRegex.test.ts +63 -0
- package/tests/util/extractTag.test.ts +17 -0
- package/tests/util/toFlexRegex.test.ts +7 -0
- package/tsconfig.json +26 -0
- package/components/AutocompleteInput.d.ts +0 -28
- package/components/AutocompleteInput.js +0 -121
- package/components/AutocompleteInput.js.map +0 -1
- package/components/BlockErrorBoundary.d.ts +0 -15
- package/components/BlockErrorBoundary.js +0 -28
- package/components/BlockErrorBoundary.js.map +0 -1
- package/components/BlockInput.d.ts +0 -13
- package/components/BlockInput.js +0 -56
- package/components/BlockInput.js.map +0 -1
- package/components/ComponentContainer.d.ts +0 -10
- package/components/ComponentContainer.js +0 -38
- package/components/ComponentContainer.js.map +0 -1
- package/components/ConfigPage.d.ts +0 -35
- package/components/ConfigPage.js +0 -160
- package/components/ConfigPage.js.map +0 -1
- package/components/ConfigPanels/BlockPanel.d.ts +0 -3
- package/components/ConfigPanels/BlockPanel.js +0 -43
- package/components/ConfigPanels/BlockPanel.js.map +0 -1
- package/components/ConfigPanels/BlocksPanel.d.ts +0 -3
- package/components/ConfigPanels/BlocksPanel.js +0 -69
- package/components/ConfigPanels/BlocksPanel.js.map +0 -1
- package/components/ConfigPanels/CustomPanel.d.ts +0 -3
- package/components/ConfigPanels/CustomPanel.js +0 -25
- package/components/ConfigPanels/CustomPanel.js.map +0 -1
- package/components/ConfigPanels/FlagPanel.d.ts +0 -3
- package/components/ConfigPanels/FlagPanel.js +0 -32
- package/components/ConfigPanels/FlagPanel.js.map +0 -1
- package/components/ConfigPanels/MultiChildPanel.d.ts +0 -9
- package/components/ConfigPanels/MultiChildPanel.js +0 -59
- package/components/ConfigPanels/MultiChildPanel.js.map +0 -1
- package/components/ConfigPanels/MultiTextPanel.d.ts +0 -3
- package/components/ConfigPanels/MultiTextPanel.js +0 -15
- package/components/ConfigPanels/MultiTextPanel.js.map +0 -1
- package/components/ConfigPanels/NumberPanel.d.ts +0 -3
- package/components/ConfigPanels/NumberPanel.js +0 -26
- package/components/ConfigPanels/NumberPanel.js.map +0 -1
- package/components/ConfigPanels/OauthPanel.d.ts +0 -3
- package/components/ConfigPanels/OauthPanel.js +0 -82
- package/components/ConfigPanels/OauthPanel.js.map +0 -1
- package/components/ConfigPanels/PagesPanel.d.ts +0 -3
- package/components/ConfigPanels/PagesPanel.js +0 -12
- package/components/ConfigPanels/PagesPanel.js.map +0 -1
- package/components/ConfigPanels/SelectPanel.d.ts +0 -3
- package/components/ConfigPanels/SelectPanel.js +0 -28
- package/components/ConfigPanels/SelectPanel.js.map +0 -1
- package/components/ConfigPanels/TextPanel.d.ts +0 -3
- package/components/ConfigPanels/TextPanel.js +0 -29
- package/components/ConfigPanels/TextPanel.js.map +0 -1
- package/components/ConfigPanels/TimePanel.d.ts +0 -3
- package/components/ConfigPanels/TimePanel.js +0 -35
- package/components/ConfigPanels/TimePanel.js.map +0 -1
- package/components/ConfigPanels/getBrandColors.d.ts +0 -7
- package/components/ConfigPanels/getBrandColors.js +0 -29
- package/components/ConfigPanels/getBrandColors.js.map +0 -1
- package/components/ConfigPanels/types.d.ts +0 -84
- package/components/ConfigPanels/types.js +0 -3
- package/components/ConfigPanels/types.js.map +0 -1
- package/components/ConfigPanels/useSingleChildValue.d.ts +0 -13
- package/components/ConfigPanels/useSingleChildValue.js +0 -44
- package/components/ConfigPanels/useSingleChildValue.js.map +0 -1
- package/components/CursorMenu.d.ts +0 -21
- package/components/CursorMenu.js +0 -182
- package/components/CursorMenu.js.map +0 -1
- package/components/Description.d.ts +0 -5
- package/components/Description.js +0 -17
- package/components/Description.js.map +0 -1
- package/components/ExtensionApiContext.d.ts +0 -31
- package/components/ExtensionApiContext.js +0 -17
- package/components/ExtensionApiContext.js.map +0 -1
- package/components/ExternalLogin.d.ts +0 -18
- package/components/ExternalLogin.js +0 -142
- package/components/ExternalLogin.js.map +0 -1
- package/components/Filter.d.ts +0 -15
- package/components/Filter.js +0 -143
- package/components/Filter.js.map +0 -1
- package/components/FormDialog.d.ts +0 -55
- package/components/FormDialog.js +0 -224
- package/components/FormDialog.js.map +0 -1
- package/components/Loading.d.ts +0 -4
- package/components/Loading.js +0 -36
- package/components/Loading.js.map +0 -1
- package/components/MenuItemSelect.d.ts +0 -17
- package/components/MenuItemSelect.js +0 -24
- package/components/MenuItemSelect.js.map +0 -1
- package/components/OauthPanel.d.ts +0 -7
- package/components/OauthPanel.js +0 -31
- package/components/OauthPanel.js.map +0 -1
- package/components/OauthSelect.d.ts +0 -5
- package/components/OauthSelect.js +0 -26
- package/components/OauthSelect.js.map +0 -1
- package/components/PageInput.d.ts +0 -6
- package/components/PageInput.js +0 -14
- package/components/PageInput.js.map +0 -1
- package/components/PageLink.d.ts +0 -6
- package/components/PageLink.js +0 -32
- package/components/PageLink.js.map +0 -1
- package/components/ProgressDialog.d.ts +0 -11
- package/components/ProgressDialog.js +0 -61
- package/components/ProgressDialog.js.map +0 -1
- package/components/SimpleAlert.d.ts +0 -15
- package/components/SimpleAlert.js +0 -48
- package/components/SimpleAlert.js.map +0 -1
- package/components/Toast.d.ts +0 -15
- package/components/Toast.js +0 -51
- package/components/Toast.js.map +0 -1
- package/components/index.d.ts +0 -0
- package/components/index.js +0 -5
- package/components/index.js.map +0 -1
- package/components.d.ts +0 -5
- package/components.js +0 -171
- package/components.js.map +0 -1
- package/date/constants.d.ts +0 -3
- package/date/constants.js +0 -20
- package/date/constants.js.map +0 -1
- package/date/index.js +0 -10
- package/date/index.js.map +0 -1
- package/date/parseNlpDate.d.ts +0 -5
- package/date/parseNlpDate.js +0 -227
- package/date/parseNlpDate.js.map +0 -1
- package/date/parseRoamDateUid.d.ts +0 -2
- package/date/parseRoamDateUid.js +0 -8
- package/date/parseRoamDateUid.js.map +0 -1
- package/dom/addBlockCommand.d.ts +0 -5
- package/dom/addBlockCommand.js +0 -54
- package/dom/addBlockCommand.js.map +0 -1
- package/dom/addKeyboardTriggers.d.ts +0 -11
- package/dom/addKeyboardTriggers.js +0 -39
- package/dom/addKeyboardTriggers.js.map +0 -1
- package/dom/addOldRoamJSDependency.d.ts +0 -2
- package/dom/addOldRoamJSDependency.js +0 -11
- package/dom/addOldRoamJSDependency.js.map +0 -1
- package/dom/addRoamJSDependency.d.ts +0 -2
- package/dom/addRoamJSDependency.js +0 -9
- package/dom/addRoamJSDependency.js.map +0 -1
- package/dom/addScriptAsDependency.d.ts +0 -6
- package/dom/addScriptAsDependency.js +0 -17
- package/dom/addScriptAsDependency.js.map +0 -1
- package/dom/addStyle.d.ts +0 -2
- package/dom/addStyle.js +0 -15
- package/dom/addStyle.js.map +0 -1
- package/dom/constants.d.ts +0 -1
- package/dom/constants.js +0 -5
- package/dom/constants.js.map +0 -1
- package/dom/createBlockObserver.d.ts +0 -7
- package/dom/createBlockObserver.js +0 -44
- package/dom/createBlockObserver.js.map +0 -1
- package/dom/createButtonObserver.d.ts +0 -6
- package/dom/createButtonObserver.js +0 -22
- package/dom/createButtonObserver.js.map +0 -1
- package/dom/createDivObserver.d.ts +0 -2
- package/dom/createDivObserver.js +0 -14
- package/dom/createDivObserver.js.map +0 -1
- package/dom/createHTMLObserver.d.ts +0 -8
- package/dom/createHTMLObserver.js +0 -25
- package/dom/createHTMLObserver.js.map +0 -1
- package/dom/createHashtagObserver.d.ts +0 -5
- package/dom/createHashtagObserver.js +0 -17
- package/dom/createHashtagObserver.js.map +0 -1
- package/dom/createIconButton.d.ts +0 -2
- package/dom/createIconButton.js +0 -13
- package/dom/createIconButton.js.map +0 -1
- package/dom/createObserver.d.ts +0 -2
- package/dom/createObserver.js +0 -10
- package/dom/createObserver.js.map +0 -1
- package/dom/createOverlayObserver.d.ts +0 -2
- package/dom/createOverlayObserver.js +0 -7
- package/dom/createOverlayObserver.js.map +0 -1
- package/dom/createPageObserver.d.ts +0 -2
- package/dom/createPageObserver.js +0 -35
- package/dom/createPageObserver.js.map +0 -1
- package/dom/createPageTitleObserver.d.ts +0 -6
- package/dom/createPageTitleObserver.js +0 -32
- package/dom/createPageTitleObserver.js.map +0 -1
- package/dom/elToTitle.d.ts +0 -2
- package/dom/elToTitle.js +0 -23
- package/dom/elToTitle.js.map +0 -1
- package/dom/genericError.d.ts +0 -3
- package/dom/genericError.js +0 -12
- package/dom/genericError.js.map +0 -1
- package/dom/getActiveUids.d.ts +0 -3
- package/dom/getActiveUids.js +0 -7
- package/dom/getActiveUids.js.map +0 -1
- package/dom/getBlockUidFromTarget.d.ts +0 -2
- package/dom/getBlockUidFromTarget.js +0 -34
- package/dom/getBlockUidFromTarget.js.map +0 -1
- package/dom/getCurrentPageUid.d.ts +0 -2
- package/dom/getCurrentPageUid.js +0 -9
- package/dom/getCurrentPageUid.js.map +0 -1
- package/dom/getDomRefs.d.ts +0 -2
- package/dom/getDomRefs.js +0 -13
- package/dom/getDomRefs.js.map +0 -1
- package/dom/getDropUidOffset.d.ts +0 -5
- package/dom/getDropUidOffset.js +0 -28
- package/dom/getDropUidOffset.js.map +0 -1
- package/dom/getMutatedNodes.d.ts +0 -7
- package/dom/getMutatedNodes.js +0 -12
- package/dom/getMutatedNodes.js.map +0 -1
- package/dom/getPageTitleByHtmlElement.d.ts +0 -2
- package/dom/getPageTitleByHtmlElement.js +0 -13
- package/dom/getPageTitleByHtmlElement.js.map +0 -1
- package/dom/getPageTitleValueByHtmlElement.d.ts +0 -2
- package/dom/getPageTitleValueByHtmlElement.js +0 -10
- package/dom/getPageTitleValueByHtmlElement.js.map +0 -1
- package/dom/getReferenceBlockUid.d.ts +0 -2
- package/dom/getReferenceBlockUid.js +0 -19
- package/dom/getReferenceBlockUid.js.map +0 -1
- package/dom/getRoamUrl.d.ts +0 -2
- package/dom/getRoamUrl.js +0 -5
- package/dom/getRoamUrl.js.map +0 -1
- package/dom/getRoamUrlByPage.d.ts +0 -2
- package/dom/getRoamUrlByPage.js +0 -11
- package/dom/getRoamUrlByPage.js.map +0 -1
- package/dom/getUids.d.ts +0 -3
- package/dom/getUids.js +0 -9
- package/dom/getUids.js.map +0 -1
- package/dom/getUidsFromButton.d.ts +0 -3
- package/dom/getUidsFromButton.js +0 -9
- package/dom/getUidsFromButton.js.map +0 -1
- package/dom/getUidsFromId.d.ts +0 -5
- package/dom/getUidsFromId.js +0 -16
- package/dom/getUidsFromId.js.map +0 -1
- package/dom/index.js +0 -64
- package/dom/index.js.map +0 -1
- package/dom/parseRoamBlocksToHtml.d.ts +0 -11
- package/dom/parseRoamBlocksToHtml.js +0 -80
- package/dom/parseRoamBlocksToHtml.js.map +0 -1
- package/dom/resolveRefs.d.ts +0 -2
- package/dom/resolveRefs.js +0 -25
- package/dom/resolveRefs.js.map +0 -1
- package/events/index.js +0 -9
- package/events/index.js.map +0 -1
- package/events/watchOnce.d.ts +0 -3
- package/events/watchOnce.js +0 -13
- package/events/watchOnce.js.map +0 -1
- package/hooks/index.js +0 -11
- package/hooks/index.js.map +0 -1
- package/hooks/useArrowKeyDown.d.ts +0 -10
- package/hooks/useArrowKeyDown.js +0 -55
- package/hooks/useArrowKeyDown.js.map +0 -1
- package/hooks/useSubTree.d.ts +0 -3
- package/hooks/useSubTree.js +0 -12
- package/hooks/useSubTree.js.map +0 -1
- package/marked/index.d.ts +0 -25
- package/marked/index.js +0 -568
- package/marked/index.js.map +0 -1
- package/queries/compileDatalog.d.ts +0 -3
- package/queries/compileDatalog.js +0 -64
- package/queries/compileDatalog.js.map +0 -1
- package/queries/getAllBlockUids.d.ts +0 -2
- package/queries/getAllBlockUids.js +0 -7
- package/queries/getAllBlockUids.js.map +0 -1
- package/queries/getAllBlockUidsAndTexts.d.ts +0 -5
- package/queries/getAllBlockUidsAndTexts.js +0 -7
- package/queries/getAllBlockUidsAndTexts.js.map +0 -1
- package/queries/getAllPageNames.d.ts +0 -2
- package/queries/getAllPageNames.js +0 -7
- package/queries/getAllPageNames.js.map +0 -1
- package/queries/getAttributeValueByBlockAndName.d.ts +0 -5
- package/queries/getAttributeValueByBlockAndName.js +0 -12
- package/queries/getAttributeValueByBlockAndName.js.map +0 -1
- package/queries/getBasicTreeByParentUid.d.ts +0 -3
- package/queries/getBasicTreeByParentUid.js +0 -14
- package/queries/getBasicTreeByParentUid.js.map +0 -1
- package/queries/getBlockUidAndTextIncludingText.d.ts +0 -5
- package/queries/getBlockUidAndTextIncludingText.js +0 -8
- package/queries/getBlockUidAndTextIncludingText.js.map +0 -1
- package/queries/getBlockUidByTextOnPage.d.ts +0 -5
- package/queries/getBlockUidByTextOnPage.js +0 -8
- package/queries/getBlockUidByTextOnPage.js.map +0 -1
- package/queries/getBlockUidsAndTextsReferencingPage.d.ts +0 -5
- package/queries/getBlockUidsAndTextsReferencingPage.js +0 -10
- package/queries/getBlockUidsAndTextsReferencingPage.js.map +0 -1
- package/queries/getBlockUidsByPageTitle.d.ts +0 -2
- package/queries/getBlockUidsByPageTitle.js +0 -9
- package/queries/getBlockUidsByPageTitle.js.map +0 -1
- package/queries/getBlockUidsReferencingBlock.d.ts +0 -2
- package/queries/getBlockUidsReferencingBlock.js +0 -5
- package/queries/getBlockUidsReferencingBlock.js.map +0 -1
- package/queries/getBlockUidsReferencingPage.d.ts +0 -2
- package/queries/getBlockUidsReferencingPage.js +0 -7
- package/queries/getBlockUidsReferencingPage.js.map +0 -1
- package/queries/getBlockUidsWithParentUid.d.ts +0 -2
- package/queries/getBlockUidsWithParentUid.js +0 -7
- package/queries/getBlockUidsWithParentUid.js.map +0 -1
- package/queries/getChildrenLengthByPageUid.d.ts +0 -2
- package/queries/getChildrenLengthByPageUid.js +0 -9
- package/queries/getChildrenLengthByPageUid.js.map +0 -1
- package/queries/getChildrenLengthByParentUid.d.ts +0 -2
- package/queries/getChildrenLengthByParentUid.js +0 -8
- package/queries/getChildrenLengthByParentUid.js.map +0 -1
- package/queries/getCreateTimeByBlockUid.d.ts +0 -2
- package/queries/getCreateTimeByBlockUid.js +0 -8
- package/queries/getCreateTimeByBlockUid.js.map +0 -1
- package/queries/getCurrentUser.d.ts +0 -2
- package/queries/getCurrentUser.js +0 -12
- package/queries/getCurrentUser.js.map +0 -1
- package/queries/getCurrentUserDisplayName.d.ts +0 -2
- package/queries/getCurrentUserDisplayName.js +0 -11
- package/queries/getCurrentUserDisplayName.js.map +0 -1
- package/queries/getCurrentUserEmail.d.ts +0 -2
- package/queries/getCurrentUserEmail.js +0 -14
- package/queries/getCurrentUserEmail.js.map +0 -1
- package/queries/getCurrentUserUid.d.ts +0 -2
- package/queries/getCurrentUserUid.js +0 -14
- package/queries/getCurrentUserUid.js.map +0 -1
- package/queries/getDisplayNameByEmail.d.ts +0 -2
- package/queries/getDisplayNameByEmail.js +0 -8
- package/queries/getDisplayNameByEmail.js.map +0 -1
- package/queries/getDisplayNameByUid.d.ts +0 -2
- package/queries/getDisplayNameByUid.js +0 -8
- package/queries/getDisplayNameByUid.js.map +0 -1
- package/queries/getEditTimeByBlockUid.d.ts +0 -2
- package/queries/getEditTimeByBlockUid.js +0 -8
- package/queries/getEditTimeByBlockUid.js.map +0 -1
- package/queries/getEditedUserEmailByBlockUid.d.ts +0 -2
- package/queries/getEditedUserEmailByBlockUid.js +0 -8
- package/queries/getEditedUserEmailByBlockUid.js.map +0 -1
- package/queries/getFirstChildTextByBlockUid.d.ts +0 -2
- package/queries/getFirstChildTextByBlockUid.js +0 -8
- package/queries/getFirstChildTextByBlockUid.js.map +0 -1
- package/queries/getFirstChildUidByBlockUid.d.ts +0 -2
- package/queries/getFirstChildUidByBlockUid.js +0 -7
- package/queries/getFirstChildUidByBlockUid.js.map +0 -1
- package/queries/getFullTreeByParentUid.d.ts +0 -3
- package/queries/getFullTreeByParentUid.js +0 -52
- package/queries/getFullTreeByParentUid.js.map +0 -1
- package/queries/getLinkedPageTitlesUnderUid.d.ts +0 -2
- package/queries/getLinkedPageTitlesUnderUid.js +0 -7
- package/queries/getLinkedPageTitlesUnderUid.js.map +0 -1
- package/queries/getNthChildUidByBlockUid.d.ts +0 -5
- package/queries/getNthChildUidByBlockUid.js +0 -8
- package/queries/getNthChildUidByBlockUid.js.map +0 -1
- package/queries/getOrderByBlockUid.d.ts +0 -2
- package/queries/getOrderByBlockUid.js +0 -8
- package/queries/getOrderByBlockUid.js.map +0 -1
- package/queries/getPageTitleByBlockUid.d.ts +0 -2
- package/queries/getPageTitleByBlockUid.js +0 -8
- package/queries/getPageTitleByBlockUid.js.map +0 -1
- package/queries/getPageTitleByPageUid.d.ts +0 -2
- package/queries/getPageTitleByPageUid.js +0 -13
- package/queries/getPageTitleByPageUid.js.map +0 -1
- package/queries/getPageTitleReferencesByPageTitle.d.ts +0 -2
- package/queries/getPageTitleReferencesByPageTitle.js +0 -7
- package/queries/getPageTitleReferencesByPageTitle.js.map +0 -1
- package/queries/getPageTitlesAndBlockUidsReferencingPage.d.ts +0 -5
- package/queries/getPageTitlesAndBlockUidsReferencingPage.js +0 -10
- package/queries/getPageTitlesAndBlockUidsReferencingPage.js.map +0 -1
- package/queries/getPageTitlesAndUidsDirectlyReferencingPage.d.ts +0 -5
- package/queries/getPageTitlesAndUidsDirectlyReferencingPage.js +0 -10
- package/queries/getPageTitlesAndUidsDirectlyReferencingPage.js.map +0 -1
- package/queries/getPageTitlesReferencingBlockUid.d.ts +0 -2
- package/queries/getPageTitlesReferencingBlockUid.js +0 -5
- package/queries/getPageTitlesReferencingBlockUid.js.map +0 -1
- package/queries/getPageTitlesStartingWithPrefix.d.ts +0 -2
- package/queries/getPageTitlesStartingWithPrefix.js +0 -7
- package/queries/getPageTitlesStartingWithPrefix.js.map +0 -1
- package/queries/getPageUidByBlockUid.d.ts +0 -2
- package/queries/getPageUidByBlockUid.js +0 -8
- package/queries/getPageUidByBlockUid.js.map +0 -1
- package/queries/getPageUidByPageTitle.d.ts +0 -2
- package/queries/getPageUidByPageTitle.js +0 -10
- package/queries/getPageUidByPageTitle.js.map +0 -1
- package/queries/getPageViewType.d.ts +0 -3
- package/queries/getPageViewType.js +0 -10
- package/queries/getPageViewType.js.map +0 -1
- package/queries/getParentTextByBlockUid.d.ts +0 -2
- package/queries/getParentTextByBlockUid.js +0 -8
- package/queries/getParentTextByBlockUid.js.map +0 -1
- package/queries/getParentTextByBlockUidAndTag.d.ts +0 -5
- package/queries/getParentTextByBlockUidAndTag.js +0 -8
- package/queries/getParentTextByBlockUidAndTag.js.map +0 -1
- package/queries/getParentUidByBlockUid.d.ts +0 -2
- package/queries/getParentUidByBlockUid.js +0 -8
- package/queries/getParentUidByBlockUid.js.map +0 -1
- package/queries/getParentUidsOfBlockUid.d.ts +0 -2
- package/queries/getParentUidsOfBlockUid.js +0 -5
- package/queries/getParentUidsOfBlockUid.js.map +0 -1
- package/queries/getSettingsByEmail.d.ts +0 -3
- package/queries/getSettingsByEmail.js +0 -8
- package/queries/getSettingsByEmail.js.map +0 -1
- package/queries/getShallowTreeByParentUid.d.ts +0 -5
- package/queries/getShallowTreeByParentUid.js +0 -10
- package/queries/getShallowTreeByParentUid.js.map +0 -1
- package/queries/getTextByBlockUid.d.ts +0 -2
- package/queries/getTextByBlockUid.js +0 -10
- package/queries/getTextByBlockUid.js.map +0 -1
- package/queries/index.d.ts +0 -0
- package/queries/index.js +0 -5
- package/queries/index.js.map +0 -1
- package/queries/isLiveBlock.d.ts +0 -2
- package/queries/isLiveBlock.js +0 -5
- package/queries/isLiveBlock.js.map +0 -1
- package/queries/isTagOnPage.d.ts +0 -5
- package/queries/isTagOnPage.js +0 -10
- package/queries/isTagOnPage.js.map +0 -1
- package/queries/normalizePageTitle.d.ts +0 -2
- package/queries/normalizePageTitle.js +0 -5
- package/queries/normalizePageTitle.js.map +0 -1
- package/scripts/index.d.ts +0 -1
- package/scripts/index.js +0 -27
- package/scripts/index.js.map +0 -1
- package/scripts/publishToRoamDepot.d.ts +0 -7
- package/scripts/publishToRoamDepot.js +0 -114
- package/scripts/publishToRoamDepot.js.map +0 -1
- package/testing/mockRoamEnvironment.d.ts +0 -2
- package/testing/mockRoamEnvironment.js +0 -1254
- package/testing/mockRoamEnvironment.js.map +0 -1
- package/types/index.d.ts +0 -250
- package/types/index.js +0 -5
- package/types/index.js.map +0 -1
- package/types/native.d.ts +0 -402
- package/types/native.js +0 -5
- package/types/native.js.map +0 -1
- package/types/query-builder.d.ts +0 -10
- package/types/query-builder.js +0 -3
- package/types/query-builder.js.map +0 -1
- package/types/smartblocks.d.ts +0 -35
- package/types/smartblocks.js +0 -3
- package/types/smartblocks.js.map +0 -1
- package/util/addInputSetting.d.ts +0 -7
- package/util/addInputSetting.js +0 -26
- package/util/addInputSetting.js.map +0 -1
- package/util/apiDelete.d.ts +0 -2
- package/util/apiDelete.js +0 -7
- package/util/apiDelete.js.map +0 -1
- package/util/apiGet.d.ts +0 -2
- package/util/apiGet.js +0 -7
- package/util/apiGet.js.map +0 -1
- package/util/apiPost.d.ts +0 -2
- package/util/apiPost.js +0 -7
- package/util/apiPost.js.map +0 -1
- package/util/apiPut.d.ts +0 -2
- package/util/apiPut.js +0 -7
- package/util/apiPut.js.map +0 -1
- package/util/createOverlayRender.d.ts +0 -4
- package/util/createOverlayRender.js +0 -7
- package/util/createOverlayRender.js.map +0 -1
- package/util/createTagRegex.d.ts +0 -2
- package/util/createTagRegex.js +0 -8
- package/util/createTagRegex.js.map +0 -1
- package/util/dispatchToRegistry.d.ts +0 -3
- package/util/dispatchToRegistry.js +0 -8
- package/util/dispatchToRegistry.js.map +0 -1
- package/util/env.d.ts +0 -4
- package/util/env.js +0 -48
- package/util/env.js.map +0 -1
- package/util/extensionApiContext.d.ts +0 -29
- package/util/extensionApiContext.js +0 -18
- package/util/extensionApiContext.js.map +0 -1
- package/util/extensionDeprecatedWarning.d.ts +0 -5
- package/util/extensionDeprecatedWarning.js +0 -40
- package/util/extensionDeprecatedWarning.js.map +0 -1
- package/util/extractRef.d.ts +0 -2
- package/util/extractRef.js +0 -9
- package/util/extractRef.js.map +0 -1
- package/util/extractTag.d.ts +0 -2
- package/util/extractTag.js +0 -16
- package/util/extractTag.js.map +0 -1
- package/util/focusMainWindowBlock.d.ts +0 -2
- package/util/focusMainWindowBlock.js +0 -13
- package/util/focusMainWindowBlock.js.map +0 -1
- package/util/getAuthorizationHeader.d.ts +0 -2
- package/util/getAuthorizationHeader.js +0 -13
- package/util/getAuthorizationHeader.js.map +0 -1
- package/util/getLocalStorageKey.d.ts +0 -2
- package/util/getLocalStorageKey.js +0 -5
- package/util/getLocalStorageKey.js.map +0 -1
- package/util/getOauth.d.ts +0 -2
- package/util/getOauth.js +0 -53
- package/util/getOauth.js.map +0 -1
- package/util/getOauthAccounts.d.ts +0 -2
- package/util/getOauthAccounts.js +0 -23
- package/util/getOauthAccounts.js.map +0 -1
- package/util/getRenderRoot.d.ts +0 -2
- package/util/getRenderRoot.js +0 -19
- package/util/getRenderRoot.js.map +0 -1
- package/util/getSettingIntFromTree.d.ts +0 -7
- package/util/getSettingIntFromTree.js +0 -12
- package/util/getSettingIntFromTree.js.map +0 -1
- package/util/getSettingValueFromTree.d.ts +0 -8
- package/util/getSettingValueFromTree.js +0 -15
- package/util/getSettingValueFromTree.js.map +0 -1
- package/util/getSettingValuesFromTree.d.ts +0 -7
- package/util/getSettingValuesFromTree.js +0 -13
- package/util/getSettingValuesFromTree.js.map +0 -1
- package/util/getSubTree.d.ts +0 -8
- package/util/getSubTree.js +0 -20
- package/util/getSubTree.js.map +0 -1
- package/util/getToken.d.ts +0 -2
- package/util/getToken.js +0 -11
- package/util/getToken.js.map +0 -1
- package/util/getTokenFromTree.d.ts +0 -3
- package/util/getTokenFromTree.js +0 -5
- package/util/getTokenFromTree.js.map +0 -1
- package/util/getWorkerClient.d.ts +0 -12
- package/util/getWorkerClient.js +0 -42
- package/util/getWorkerClient.js.map +0 -1
- package/util/handleBodyFetch.d.ts +0 -3
- package/util/handleBodyFetch.js +0 -22
- package/util/handleBodyFetch.js.map +0 -1
- package/util/handleFetch.d.ts +0 -13
- package/util/handleFetch.js +0 -41
- package/util/handleFetch.js.map +0 -1
- package/util/handleUrlFetch.d.ts +0 -3
- package/util/handleUrlFetch.js +0 -20
- package/util/handleUrlFetch.js.map +0 -1
- package/util/idToTitle.d.ts +0 -2
- package/util/idToTitle.js +0 -9
- package/util/idToTitle.js.map +0 -1
- package/util/index.js +0 -55
- package/util/index.js.map +0 -1
- package/util/isControl.d.ts +0 -2
- package/util/isControl.js +0 -5
- package/util/isControl.js.map +0 -1
- package/util/localStorageGet.d.ts +0 -2
- package/util/localStorageGet.js +0 -9
- package/util/localStorageGet.js.map +0 -1
- package/util/localStorageRemove.d.ts +0 -2
- package/util/localStorageRemove.js +0 -7
- package/util/localStorageRemove.js.map +0 -1
- package/util/localStorageSet.d.ts +0 -2
- package/util/localStorageSet.js +0 -9
- package/util/localStorageSet.js.map +0 -1
- package/util/registerExperimentalMode.d.ts +0 -6
- package/util/registerExperimentalMode.js +0 -66
- package/util/registerExperimentalMode.js.map +0 -1
- package/util/registerSmartBlocksCommand.d.ts +0 -3
- package/util/registerSmartBlocksCommand.js +0 -24
- package/util/registerSmartBlocksCommand.js.map +0 -1
- package/util/removeFromRegistry.d.ts +0 -3
- package/util/removeFromRegistry.js +0 -8
- package/util/removeFromRegistry.js.map +0 -1
- package/util/renderOverlay.d.ts +0 -12
- package/util/renderOverlay.js +0 -49
- package/util/renderOverlay.js.map +0 -1
- package/util/renderWithUnmount.d.ts +0 -4
- package/util/renderWithUnmount.js +0 -45
- package/util/renderWithUnmount.js.map +0 -1
- package/util/runExtension.d.ts +0 -11
- package/util/runExtension.js +0 -175
- package/util/runExtension.js.map +0 -1
- package/util/setInputSetting.d.ts +0 -7
- package/util/setInputSetting.js +0 -38
- package/util/setInputSetting.js.map +0 -1
- package/util/setInputSettings.d.ts +0 -7
- package/util/setInputSettings.js +0 -29
- package/util/setInputSettings.js.map +0 -1
- package/util/stripUid.d.ts +0 -3
- package/util/stripUid.js +0 -11
- package/util/stripUid.js.map +0 -1
- package/util/toConfigPageName.d.ts +0 -2
- package/util/toConfigPageName.js +0 -5
- package/util/toConfigPageName.js.map +0 -1
- package/util/toFlexRegex.d.ts +0 -2
- package/util/toFlexRegex.js +0 -5
- package/util/toFlexRegex.js.map +0 -1
- package/writes/clearBlockById.d.ts +0 -2
- package/writes/clearBlockById.js +0 -18
- package/writes/clearBlockById.js.map +0 -1
- package/writes/clearBlockByUid.d.ts +0 -2
- package/writes/clearBlockByUid.js +0 -17
- package/writes/clearBlockByUid.js.map +0 -1
- package/writes/createBlock.d.ts +0 -8
- package/writes/createBlock.js +0 -29
- package/writes/createBlock.js.map +0 -1
- package/writes/createPage.d.ts +0 -7
- package/writes/createPage.js +0 -21
- package/writes/createPage.js.map +0 -1
- package/writes/deleteBlock.d.ts +0 -2
- package/writes/deleteBlock.js +0 -11
- package/writes/deleteBlock.js.map +0 -1
- package/writes/index.js +0 -23
- package/writes/index.js.map +0 -1
- package/writes/openBlockInSidebar.d.ts +0 -2
- package/writes/openBlockInSidebar.js +0 -14
- package/writes/openBlockInSidebar.js.map +0 -1
- package/writes/submitActions.d.ts +0 -8
- package/writes/submitActions.js +0 -37
- package/writes/submitActions.js.map +0 -1
- package/writes/updateActiveBlock.d.ts +0 -2
- package/writes/updateActiveBlock.js +0 -18
- package/writes/updateActiveBlock.js.map +0 -1
- package/writes/updateBlock.d.ts +0 -5
- package/writes/updateBlock.js +0 -24
- package/writes/updateBlock.js.map +0 -1
package/types/native.d.ts
DELETED
|
@@ -1,402 +0,0 @@
|
|
|
1
|
-
import { ChangeEvent } from "react";
|
|
2
|
-
export declare type DatalogSrcVar = {
|
|
3
|
-
type: "src-var";
|
|
4
|
-
value: string;
|
|
5
|
-
};
|
|
6
|
-
export declare type DatalogVariable = {
|
|
7
|
-
type: "variable";
|
|
8
|
-
value: string;
|
|
9
|
-
};
|
|
10
|
-
export declare type DatalogAndClause = {
|
|
11
|
-
type: "and-clause";
|
|
12
|
-
clauses: DatalogClause[];
|
|
13
|
-
};
|
|
14
|
-
export declare type DatalogExpressionClause = DatalogDataPattern | DatalogPredExpr | DatalogFnExpr | DatalogRuleExpr;
|
|
15
|
-
export declare type DatalogRuleExpr = {
|
|
16
|
-
type: "rule-expr";
|
|
17
|
-
srcVar?: DatalogSrcVar;
|
|
18
|
-
ruleName: DatalogRuleName;
|
|
19
|
-
arguments: DatalogArgument[];
|
|
20
|
-
};
|
|
21
|
-
export declare type DatalogNotClause = {
|
|
22
|
-
type: "not-clause";
|
|
23
|
-
srcVar?: DatalogSrcVar;
|
|
24
|
-
clauses: DatalogClause[];
|
|
25
|
-
};
|
|
26
|
-
export declare type DatalogNotJoinClause = {
|
|
27
|
-
type: "not-join-clause";
|
|
28
|
-
srcVar?: DatalogSrcVar;
|
|
29
|
-
variables: DatalogVariable[];
|
|
30
|
-
clauses: DatalogClause[];
|
|
31
|
-
};
|
|
32
|
-
export declare type DatalogOrClause = {
|
|
33
|
-
type: "or-clause";
|
|
34
|
-
srcVar?: DatalogSrcVar;
|
|
35
|
-
clauses: DatalogClause[];
|
|
36
|
-
};
|
|
37
|
-
export declare type DatalogOrJoinClause = {
|
|
38
|
-
type: "or-join-clause";
|
|
39
|
-
srcVar?: DatalogSrcVar;
|
|
40
|
-
variables: DatalogVariable[];
|
|
41
|
-
clauses: DatalogClause[];
|
|
42
|
-
};
|
|
43
|
-
export declare type DatalogClause = DatalogNotClause | DatalogOrJoinClause | DatalogExpressionClause | DatalogOrClause | DatalogNotJoinClause | DatalogAndClause;
|
|
44
|
-
export declare type DatalogDataPattern = {
|
|
45
|
-
type: "data-pattern";
|
|
46
|
-
srcVar?: DatalogSrcVar;
|
|
47
|
-
arguments: DatalogArgument[];
|
|
48
|
-
};
|
|
49
|
-
export declare type DatalogArgument = DatalogSrcVar | DatalogVariable | DatalogConstant | DatalogUnderscore;
|
|
50
|
-
export declare type DatalogConstant = {
|
|
51
|
-
type: "constant";
|
|
52
|
-
value: string;
|
|
53
|
-
};
|
|
54
|
-
export declare type DatalogPredExpr = {
|
|
55
|
-
type: "pred-expr";
|
|
56
|
-
pred: "<" | ">" | "re-matches" | "re-find" | "clojure.string/includes?" | "clojure.string/ends-with?" | "clojure.string/starts-with?";
|
|
57
|
-
arguments: DatalogArgument[];
|
|
58
|
-
};
|
|
59
|
-
export declare type DatalogFnExpr = {
|
|
60
|
-
type: "fn-expr";
|
|
61
|
-
fn: "re-pattern" | "get";
|
|
62
|
-
arguments: DatalogArgument[];
|
|
63
|
-
binding: DatalogBinding;
|
|
64
|
-
};
|
|
65
|
-
export declare type DatalogBinding = DatalogBindScalar | DatalogBindTuple | DatalogBindColl | DatalogBindRel;
|
|
66
|
-
export declare type DatalogBindScalar = {
|
|
67
|
-
type: "bind-scalar";
|
|
68
|
-
variable: DatalogVariable;
|
|
69
|
-
};
|
|
70
|
-
export declare type DatalogBindTuple = {
|
|
71
|
-
type: "bind-tuple";
|
|
72
|
-
args: (DatalogVariable | DatalogUnderscore)[];
|
|
73
|
-
};
|
|
74
|
-
export declare type DatalogBindColl = {
|
|
75
|
-
type: "bind-col";
|
|
76
|
-
variable: DatalogVariable;
|
|
77
|
-
};
|
|
78
|
-
export declare type DatalogBindRel = {
|
|
79
|
-
type: "bind-rel";
|
|
80
|
-
args: (DatalogVariable | DatalogUnderscore)[];
|
|
81
|
-
};
|
|
82
|
-
export declare type DatalogUnderscore = {
|
|
83
|
-
type: "underscore";
|
|
84
|
-
value: "_";
|
|
85
|
-
};
|
|
86
|
-
export declare type DatalogRuleName = {
|
|
87
|
-
type: "rulename";
|
|
88
|
-
value: string;
|
|
89
|
-
};
|
|
90
|
-
export declare type RoamBasicBlock = {
|
|
91
|
-
string: string;
|
|
92
|
-
uid: string;
|
|
93
|
-
};
|
|
94
|
-
export declare type RoamBasicPage = {
|
|
95
|
-
title: string;
|
|
96
|
-
uid: string;
|
|
97
|
-
};
|
|
98
|
-
export declare type RoamBasicNode = {
|
|
99
|
-
text: string;
|
|
100
|
-
uid: string;
|
|
101
|
-
children: RoamBasicNode[];
|
|
102
|
-
};
|
|
103
|
-
export declare type RoamPull = {
|
|
104
|
-
"block/children"?: RoamNode[];
|
|
105
|
-
"block/heading"?: number;
|
|
106
|
-
"block/open"?: boolean;
|
|
107
|
-
"block/order"?: number;
|
|
108
|
-
"block/page"?: RoamNode;
|
|
109
|
-
"block/parents"?: RoamNode[];
|
|
110
|
-
"block/refs"?: RoamNode[];
|
|
111
|
-
"block/string"?: string;
|
|
112
|
-
"block/uid"?: string;
|
|
113
|
-
"children/view-type"?: `:${ViewType}`;
|
|
114
|
-
"create/time"?: number;
|
|
115
|
-
"create/user"?: RoamNode;
|
|
116
|
-
"edit/time"?: number;
|
|
117
|
-
"edit/user"?: RoamNode;
|
|
118
|
-
"log/id"?: number;
|
|
119
|
-
"node/title"?: string;
|
|
120
|
-
} & RoamNode;
|
|
121
|
-
export declare type PullBlock = {
|
|
122
|
-
":attrs/lookup"?: PullBlock[];
|
|
123
|
-
":entity/attrs"?: [
|
|
124
|
-
{
|
|
125
|
-
":source": [":block/uid", string];
|
|
126
|
-
":value": [":block/uid", string];
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
":source": [":block/uid", string];
|
|
130
|
-
":value": [":block/uid", string];
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
":source": [":block/uid", string];
|
|
134
|
-
":value": string | [":block/uid", string];
|
|
135
|
-
}
|
|
136
|
-
][];
|
|
137
|
-
":block/children"?: PullBlock[];
|
|
138
|
-
":block/heading"?: number;
|
|
139
|
-
":block/open"?: boolean;
|
|
140
|
-
":block/order"?: number;
|
|
141
|
-
":block/page"?: {
|
|
142
|
-
":db/id": number;
|
|
143
|
-
};
|
|
144
|
-
":block/parents"?: PullBlock[];
|
|
145
|
-
":block/props"?: {
|
|
146
|
-
":image-size"?: {
|
|
147
|
-
[p: string]: {
|
|
148
|
-
":height": number;
|
|
149
|
-
":width": number;
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
":iframe"?: {
|
|
153
|
-
[p: string]: {
|
|
154
|
-
":size": {
|
|
155
|
-
":height": number;
|
|
156
|
-
":width": number;
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
[k: `:roamjs-${string}`]: Record<string, unknown>;
|
|
161
|
-
};
|
|
162
|
-
":block/refs"?: {
|
|
163
|
-
":db/id": number;
|
|
164
|
-
}[];
|
|
165
|
-
":block/string"?: string;
|
|
166
|
-
":block/view-type"?: `:${BlockViewType}`;
|
|
167
|
-
":block/text-align"?: TextAlignment;
|
|
168
|
-
":block/uid"?: string;
|
|
169
|
-
":children/view-type"?: `:${ViewType}`;
|
|
170
|
-
":create/time"?: number;
|
|
171
|
-
":create/user"?: {
|
|
172
|
-
":db/id": number;
|
|
173
|
-
};
|
|
174
|
-
":edit/time"?: number;
|
|
175
|
-
":edit/user"?: {
|
|
176
|
-
":db/id": number;
|
|
177
|
-
};
|
|
178
|
-
":db/id"?: number;
|
|
179
|
-
":log/id"?: number;
|
|
180
|
-
":node/title"?: string;
|
|
181
|
-
":user/display-name"?: string;
|
|
182
|
-
":user/display-page"?: {
|
|
183
|
-
":db/id": number;
|
|
184
|
-
};
|
|
185
|
-
":user/settings"?: {
|
|
186
|
-
":namespace-options": [":none", ":partial", ":full"];
|
|
187
|
-
":link-brackets?": boolean;
|
|
188
|
-
":showing-inline-references?": boolean;
|
|
189
|
-
":right-sidebar-pinned": {
|
|
190
|
-
[uuid: string]: SidebarWindow;
|
|
191
|
-
};
|
|
192
|
-
":showing-own-icons?": boolean;
|
|
193
|
-
":showing-user-icons?": boolean;
|
|
194
|
-
":first-day-of-week"?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
195
|
-
};
|
|
196
|
-
":user/uid"?: string;
|
|
197
|
-
":user/email"?: string;
|
|
198
|
-
};
|
|
199
|
-
export declare type RoamPullResult = RoamPull | null;
|
|
200
|
-
export declare type ViewType = "document" | "bullet" | "numbered";
|
|
201
|
-
export declare type BlockViewType = "tabs" | "outline" | "horizontal" | "popout" | "comment" | "side" | "vertical";
|
|
202
|
-
export declare type TextAlignment = "left" | "center" | "right" | "justify";
|
|
203
|
-
export declare type RoamBlock = {
|
|
204
|
-
attrs?: {
|
|
205
|
-
source: string[];
|
|
206
|
-
}[][];
|
|
207
|
-
children?: {
|
|
208
|
-
id: number;
|
|
209
|
-
}[];
|
|
210
|
-
id?: number;
|
|
211
|
-
string?: string;
|
|
212
|
-
title?: string;
|
|
213
|
-
time?: number;
|
|
214
|
-
uid?: string;
|
|
215
|
-
order?: number;
|
|
216
|
-
"view-type"?: ViewType;
|
|
217
|
-
};
|
|
218
|
-
export declare type RoamError = {
|
|
219
|
-
raw: string;
|
|
220
|
-
"status-code": number;
|
|
221
|
-
};
|
|
222
|
-
export declare type TreeNode = {
|
|
223
|
-
text: string;
|
|
224
|
-
order: number;
|
|
225
|
-
children: TreeNode[];
|
|
226
|
-
parents: number[];
|
|
227
|
-
uid: string;
|
|
228
|
-
heading: number;
|
|
229
|
-
open: boolean;
|
|
230
|
-
viewType: ViewType;
|
|
231
|
-
editTime: Date;
|
|
232
|
-
textAlign: TextAlignment;
|
|
233
|
-
props: {
|
|
234
|
-
imageResize: {
|
|
235
|
-
[link: string]: {
|
|
236
|
-
height: number;
|
|
237
|
-
width: number;
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
iframe: {
|
|
241
|
-
[link: string]: {
|
|
242
|
-
height: number;
|
|
243
|
-
width: number;
|
|
244
|
-
};
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
};
|
|
248
|
-
export declare type TextNode = {
|
|
249
|
-
text: string;
|
|
250
|
-
children: TextNode[];
|
|
251
|
-
};
|
|
252
|
-
export declare type InputTextNode = {
|
|
253
|
-
text: string;
|
|
254
|
-
children?: InputTextNode[];
|
|
255
|
-
uid?: string;
|
|
256
|
-
heading?: number;
|
|
257
|
-
textAlign?: TextAlignment;
|
|
258
|
-
viewType?: ViewType;
|
|
259
|
-
open?: boolean;
|
|
260
|
-
props?: Record<string, unknown>;
|
|
261
|
-
};
|
|
262
|
-
declare type PlusType = [number, string];
|
|
263
|
-
export declare type RoamNode = {
|
|
264
|
-
"db/id": number;
|
|
265
|
-
};
|
|
266
|
-
export declare type RoamQuery = RoamPull & {
|
|
267
|
-
"block/graph"?: RoamNode;
|
|
268
|
-
"node/graph+title"?: PlusType;
|
|
269
|
-
"block/graph+uid"?: PlusType;
|
|
270
|
-
"node/graph"?: RoamNode;
|
|
271
|
-
"edit/email"?: string;
|
|
272
|
-
"entity/graph"?: RoamNode;
|
|
273
|
-
};
|
|
274
|
-
export declare type RoamQueryResult = number & RoamQuery;
|
|
275
|
-
export declare type ClientParams = {
|
|
276
|
-
action: "pull" | "q" | "create-block" | "update-block" | "create-page" | "move-block" | "delete-block" | "delete-page" | "update-page";
|
|
277
|
-
selector?: string;
|
|
278
|
-
uid?: string;
|
|
279
|
-
query?: string;
|
|
280
|
-
inputs?: string[];
|
|
281
|
-
} & ActionParams;
|
|
282
|
-
export declare type ActionParams = {
|
|
283
|
-
location?: {
|
|
284
|
-
"parent-uid": string;
|
|
285
|
-
order: number | "last";
|
|
286
|
-
};
|
|
287
|
-
block?: {
|
|
288
|
-
string?: string;
|
|
289
|
-
uid?: string;
|
|
290
|
-
open?: boolean;
|
|
291
|
-
heading?: number;
|
|
292
|
-
"text-align"?: TextAlignment;
|
|
293
|
-
"children-view-type"?: ViewType;
|
|
294
|
-
props?: Record<string, unknown>;
|
|
295
|
-
};
|
|
296
|
-
page?: {
|
|
297
|
-
title?: string;
|
|
298
|
-
uid?: string;
|
|
299
|
-
};
|
|
300
|
-
};
|
|
301
|
-
export declare type WriteAction = (a: ActionParams) => Promise<void>;
|
|
302
|
-
export declare type UserSettings = {
|
|
303
|
-
"global-filters": {
|
|
304
|
-
includes: string[];
|
|
305
|
-
removes: string[];
|
|
306
|
-
};
|
|
307
|
-
};
|
|
308
|
-
declare type SidebarWindowType = SidebarBlockWindow | SidebarMentionsWindow | SidebarGraphWindow | SidebarOutlineWindow;
|
|
309
|
-
export declare type SidebarWindowInput = {
|
|
310
|
-
"block-uid": string;
|
|
311
|
-
type: SidebarWindowType["type"];
|
|
312
|
-
};
|
|
313
|
-
declare type SidebarBlockWindow = {
|
|
314
|
-
type: "block";
|
|
315
|
-
"block-uid": string;
|
|
316
|
-
};
|
|
317
|
-
declare type SidebarOutlineWindow = {
|
|
318
|
-
type: "outline";
|
|
319
|
-
"page-uid": string;
|
|
320
|
-
};
|
|
321
|
-
declare type SidebarMentionsWindow = {
|
|
322
|
-
type: "mentions";
|
|
323
|
-
"mentions-uid": string;
|
|
324
|
-
};
|
|
325
|
-
declare type SidebarGraphWindow = {
|
|
326
|
-
type: "graph";
|
|
327
|
-
"block-uid": string;
|
|
328
|
-
};
|
|
329
|
-
export declare type SidebarAction = (action: {
|
|
330
|
-
window: SidebarWindowInput;
|
|
331
|
-
}) => Promise<void>;
|
|
332
|
-
export declare type SidebarWindow = {
|
|
333
|
-
"collapsed?": boolean;
|
|
334
|
-
order: number;
|
|
335
|
-
"pinned?": boolean;
|
|
336
|
-
"window-id": string;
|
|
337
|
-
} & SidebarWindowType;
|
|
338
|
-
export declare type AddPullWatch = (pullPattern: string, entityId: string, callback: (before: PullBlock | null, after: PullBlock | null) => void) => boolean;
|
|
339
|
-
declare type ButtonAction = {
|
|
340
|
-
type: "button";
|
|
341
|
-
onClick?: (e: MouseEvent) => void;
|
|
342
|
-
content: string;
|
|
343
|
-
};
|
|
344
|
-
declare type SwitchAction = {
|
|
345
|
-
type: "switch";
|
|
346
|
-
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
347
|
-
};
|
|
348
|
-
declare type InputAction = {
|
|
349
|
-
type: "input";
|
|
350
|
-
placeholder: string;
|
|
351
|
-
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
352
|
-
};
|
|
353
|
-
declare type SelectAction = {
|
|
354
|
-
type: "select";
|
|
355
|
-
items: string[];
|
|
356
|
-
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
357
|
-
};
|
|
358
|
-
declare type CustomAction = {
|
|
359
|
-
type: "reactComponent";
|
|
360
|
-
component: React.FC;
|
|
361
|
-
};
|
|
362
|
-
export declare type Action = ButtonAction | SwitchAction | InputAction | SelectAction | CustomAction;
|
|
363
|
-
declare type PanelConfig = {
|
|
364
|
-
tabTitle: string;
|
|
365
|
-
settings: {
|
|
366
|
-
id: string;
|
|
367
|
-
name: string;
|
|
368
|
-
description: string;
|
|
369
|
-
action: Action;
|
|
370
|
-
}[];
|
|
371
|
-
};
|
|
372
|
-
export declare type AddCommandOptions = {
|
|
373
|
-
label: string;
|
|
374
|
-
callback: () => void;
|
|
375
|
-
disableHotkey?: boolean;
|
|
376
|
-
defaultHotkey?: string | string[];
|
|
377
|
-
};
|
|
378
|
-
declare type RemoveCommandOptions = {
|
|
379
|
-
label: string;
|
|
380
|
-
};
|
|
381
|
-
export declare type OnloadArgs = {
|
|
382
|
-
extensionAPI: {
|
|
383
|
-
settings: {
|
|
384
|
-
get: (k: string) => unknown;
|
|
385
|
-
getAll: () => Record<string, unknown>;
|
|
386
|
-
panel: {
|
|
387
|
-
create: (c: PanelConfig) => void;
|
|
388
|
-
};
|
|
389
|
-
set: (k: string, v: unknown) => Promise<void>;
|
|
390
|
-
};
|
|
391
|
-
ui: {
|
|
392
|
-
commandPalette: {
|
|
393
|
-
addCommand: (c: AddCommandOptions) => Promise<void>;
|
|
394
|
-
removeCommand: (c: RemoveCommandOptions) => Promise<void>;
|
|
395
|
-
};
|
|
396
|
-
};
|
|
397
|
-
};
|
|
398
|
-
extension: {
|
|
399
|
-
version: string;
|
|
400
|
-
};
|
|
401
|
-
};
|
|
402
|
-
export {};
|
package/types/native.js
DELETED
package/types/native.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"native.js","sourceRoot":"","sources":["../../src/types/native.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,4EAA4E","sourcesContent":["// emulating Datalog Grammar\n// https://docs.datomic.com/cloud/query/query-data-reference.html#or-clauses\n\nimport { ChangeEvent } from \"react\";\n\nexport type DatalogSrcVar = {\n type: \"src-var\";\n value: string;\n};\n\nexport type DatalogVariable = {\n type: \"variable\";\n value: string;\n};\n\nexport type DatalogAndClause = {\n type: \"and-clause\";\n clauses: DatalogClause[];\n};\n\nexport type DatalogExpressionClause =\n | DatalogDataPattern\n | DatalogPredExpr\n | DatalogFnExpr\n | DatalogRuleExpr;\n\nexport type DatalogRuleExpr = {\n type: \"rule-expr\";\n srcVar?: DatalogSrcVar;\n ruleName: DatalogRuleName;\n arguments: DatalogArgument[];\n};\n\nexport type DatalogNotClause = {\n type: \"not-clause\";\n srcVar?: DatalogSrcVar;\n clauses: DatalogClause[];\n};\n\nexport type DatalogNotJoinClause = {\n type: \"not-join-clause\";\n srcVar?: DatalogSrcVar;\n variables: DatalogVariable[];\n clauses: DatalogClause[];\n};\n\nexport type DatalogOrClause = {\n type: \"or-clause\";\n srcVar?: DatalogSrcVar;\n clauses: DatalogClause[];\n};\n\nexport type DatalogOrJoinClause = {\n type: \"or-join-clause\";\n srcVar?: DatalogSrcVar;\n variables: DatalogVariable[];\n clauses: DatalogClause[];\n};\n\nexport type DatalogClause =\n | DatalogNotClause\n | DatalogOrJoinClause\n | DatalogExpressionClause\n | DatalogOrClause\n | DatalogNotJoinClause\n | DatalogAndClause;\n\nexport type DatalogDataPattern = {\n type: \"data-pattern\";\n srcVar?: DatalogSrcVar;\n arguments: DatalogArgument[];\n};\n\nexport type DatalogArgument =\n | DatalogSrcVar\n | DatalogVariable\n | DatalogConstant\n | DatalogUnderscore;\n\nexport type DatalogConstant = {\n type: \"constant\";\n value: string;\n};\n\nexport type DatalogPredExpr = {\n type: \"pred-expr\";\n pred:\n | \"<\"\n | \">\"\n | \"re-matches\"\n | \"re-find\"\n | \"clojure.string/includes?\"\n | \"clojure.string/ends-with?\"\n | \"clojure.string/starts-with?\";\n arguments: DatalogArgument[];\n};\n\nexport type DatalogFnExpr = {\n type: \"fn-expr\";\n fn: \"re-pattern\" | \"get\";\n arguments: DatalogArgument[];\n binding: DatalogBinding;\n};\n\nexport type DatalogBinding =\n | DatalogBindScalar\n | DatalogBindTuple\n | DatalogBindColl\n | DatalogBindRel;\n\nexport type DatalogBindScalar = {\n type: \"bind-scalar\";\n variable: DatalogVariable;\n};\nexport type DatalogBindTuple = {\n type: \"bind-tuple\";\n args: (DatalogVariable | DatalogUnderscore)[];\n};\nexport type DatalogBindColl = {\n type: \"bind-col\";\n variable: DatalogVariable;\n};\n\nexport type DatalogBindRel = {\n type: \"bind-rel\";\n args: (DatalogVariable | DatalogUnderscore)[];\n};\n\nexport type DatalogUnderscore = {\n type: \"underscore\";\n value: \"_\";\n};\n\nexport type DatalogRuleName = {\n type: \"rulename\";\n value: string;\n};\n\nexport type RoamBasicBlock = {\n string: string;\n uid: string;\n};\n\nexport type RoamBasicPage = { title: string; uid: string };\n\nexport type RoamBasicNode = {\n text: string;\n uid: string;\n children: RoamBasicNode[];\n};\n\nexport type RoamPull = {\n \"block/children\"?: RoamNode[];\n \"block/heading\"?: number;\n \"block/open\"?: boolean;\n \"block/order\"?: number;\n \"block/page\"?: RoamNode;\n \"block/parents\"?: RoamNode[];\n \"block/refs\"?: RoamNode[];\n \"block/string\"?: string;\n \"block/uid\"?: string;\n \"children/view-type\"?: `:${ViewType}`;\n \"create/time\"?: number;\n \"create/user\"?: RoamNode;\n \"edit/time\"?: number;\n \"edit/user\"?: RoamNode;\n \"log/id\"?: number;\n \"node/title\"?: string;\n} & RoamNode;\n\nexport type PullBlock = {\n \":attrs/lookup\"?: PullBlock[];\n \":entity/attrs\"?: [\n { \":source\": [\":block/uid\", string]; \":value\": [\":block/uid\", string] },\n { \":source\": [\":block/uid\", string]; \":value\": [\":block/uid\", string] },\n {\n \":source\": [\":block/uid\", string];\n \":value\": string | [\":block/uid\", string];\n }\n ][];\n \":block/children\"?: PullBlock[];\n \":block/heading\"?: number;\n \":block/open\"?: boolean;\n \":block/order\"?: number;\n \":block/page\"?: { \":db/id\": number };\n \":block/parents\"?: PullBlock[];\n \":block/props\"?: {\n \":image-size\"?: {\n [p: string]: {\n \":height\": number;\n \":width\": number;\n };\n };\n \":iframe\"?: {\n [p: string]: {\n \":size\": {\n \":height\": number;\n \":width\": number;\n };\n };\n };\n [k: `:roamjs-${string}`]: Record<string, unknown>;\n };\n \":block/refs\"?: { \":db/id\": number }[];\n \":block/string\"?: string;\n \":block/view-type\"?: `:${BlockViewType}`;\n \":block/text-align\"?: TextAlignment;\n \":block/uid\"?: string;\n \":children/view-type\"?: `:${ViewType}`;\n \":create/time\"?: number;\n \":create/user\"?: { \":db/id\": number };\n \":edit/time\"?: number;\n \":edit/user\"?: { \":db/id\": number };\n \":db/id\"?: number;\n \":log/id\"?: number;\n \":node/title\"?: string;\n \":user/display-name\"?: string;\n \":user/display-page\"?: { \":db/id\": number };\n \":user/settings\"?: {\n \":namespace-options\": [\":none\", \":partial\", \":full\"];\n \":link-brackets?\": boolean;\n \":showing-inline-references?\": boolean;\n \":right-sidebar-pinned\": {\n [uuid: string]: SidebarWindow;\n };\n \":showing-own-icons?\": boolean;\n \":showing-user-icons?\": boolean;\n \":first-day-of-week\"?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n };\n \":user/uid\"?: string;\n \":user/email\"?: string;\n};\n\nexport type RoamPullResult = RoamPull | null;\n\nexport type ViewType = \"document\" | \"bullet\" | \"numbered\";\n\nexport type BlockViewType =\n | \"tabs\"\n | \"outline\"\n | \"horizontal\"\n | \"popout\"\n | \"comment\"\n | \"side\"\n | \"vertical\";\n\nexport type TextAlignment = \"left\" | \"center\" | \"right\" | \"justify\";\n\nexport type RoamBlock = {\n attrs?: { source: string[] }[][];\n children?: { id: number }[];\n id?: number;\n string?: string;\n title?: string;\n time?: number;\n uid?: string;\n order?: number;\n \"view-type\"?: ViewType;\n};\n\nexport type RoamError = {\n raw: string;\n \"status-code\": number;\n};\n\nexport type TreeNode = {\n text: string;\n order: number;\n children: TreeNode[];\n parents: number[];\n uid: string;\n heading: number;\n open: boolean;\n viewType: ViewType;\n editTime: Date;\n textAlign: TextAlignment;\n props: {\n imageResize: {\n [link: string]: {\n height: number;\n width: number;\n };\n };\n iframe: {\n [link: string]: {\n height: number;\n width: number;\n };\n };\n };\n};\n\nexport type TextNode = {\n text: string;\n children: TextNode[];\n};\n\nexport type InputTextNode = {\n text: string;\n children?: InputTextNode[];\n uid?: string;\n heading?: number;\n textAlign?: TextAlignment;\n viewType?: ViewType;\n open?: boolean;\n props?: Record<string, unknown>;\n};\n\ntype PlusType = [number, string];\n\nexport type RoamNode = { \"db/id\": number };\n\nexport type RoamQuery = RoamPull & {\n \"block/graph\"?: RoamNode;\n \"node/graph+title\"?: PlusType;\n \"block/graph+uid\"?: PlusType;\n \"node/graph\"?: RoamNode;\n \"edit/email\"?: string;\n \"entity/graph\"?: RoamNode;\n};\n\nexport type RoamQueryResult = number & RoamQuery;\n\nexport type ClientParams = {\n action:\n | \"pull\"\n | \"q\"\n | \"create-block\"\n | \"update-block\"\n | \"create-page\"\n | \"move-block\"\n | \"delete-block\"\n | \"delete-page\"\n | \"update-page\";\n selector?: string;\n uid?: string;\n query?: string;\n inputs?: string[];\n} & ActionParams;\n\nexport type ActionParams = {\n location?: {\n \"parent-uid\": string;\n order: number | \"last\";\n };\n block?: {\n string?: string;\n uid?: string;\n open?: boolean;\n heading?: number;\n \"text-align\"?: TextAlignment;\n \"children-view-type\"?: ViewType;\n props?: Record<string, unknown>;\n };\n page?: {\n title?: string;\n uid?: string;\n };\n};\n\nexport type WriteAction = (a: ActionParams) => Promise<void>;\n\nexport type UserSettings = {\n \"global-filters\": {\n includes: string[];\n removes: string[];\n };\n};\n\ntype SidebarWindowType =\n | SidebarBlockWindow\n | SidebarMentionsWindow\n | SidebarGraphWindow\n | SidebarOutlineWindow;\n\nexport type SidebarWindowInput = {\n \"block-uid\": string;\n type: SidebarWindowType[\"type\"];\n};\n\ntype SidebarBlockWindow = {\n type: \"block\";\n \"block-uid\": string;\n};\n\ntype SidebarOutlineWindow = {\n type: \"outline\";\n \"page-uid\": string;\n};\n\ntype SidebarMentionsWindow = {\n type: \"mentions\";\n \"mentions-uid\": string;\n};\n\ntype SidebarGraphWindow = {\n type: \"graph\";\n // \"page-uid\": string; Currently not working despite documentation\n \"block-uid\": string;\n};\n\nexport type SidebarAction = (action: {\n window: SidebarWindowInput;\n}) => Promise<void>;\n\nexport type SidebarWindow = {\n \"collapsed?\": boolean;\n order: number;\n \"pinned?\": boolean;\n \"window-id\": string;\n} & SidebarWindowType;\n\nexport type AddPullWatch = (\n pullPattern: string,\n entityId: string,\n callback: (before: PullBlock | null, after: PullBlock | null) => void\n) => boolean;\n\ntype ButtonAction = {\n type: \"button\";\n onClick?: (e: MouseEvent) => void;\n content: string;\n};\n\ntype SwitchAction = {\n type: \"switch\";\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\n};\n\ntype InputAction = {\n type: \"input\";\n placeholder: string;\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\n};\n\ntype SelectAction = {\n type: \"select\";\n items: string[];\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\n};\n\ntype CustomAction = {\n type: \"reactComponent\";\n component: React.FC;\n};\n\nexport type Action =\n | ButtonAction\n | SwitchAction\n | InputAction\n | SelectAction\n | CustomAction;\n\ntype PanelConfig = {\n tabTitle: string;\n settings: {\n id: string;\n name: string;\n description: string;\n action: Action;\n }[];\n};\n\nexport type AddCommandOptions = {\n label: string;\n callback: () => void;\n disableHotkey?: boolean;\n defaultHotkey?: string | string[];\n};\n\ntype RemoveCommandOptions = {\n label: string;\n};\n\nexport type OnloadArgs = {\n extensionAPI: {\n settings: {\n get: (k: string) => unknown;\n getAll: () => Record<string, unknown>;\n panel: {\n create: (c: PanelConfig) => void;\n };\n set: (k: string, v: unknown) => Promise<void>;\n };\n ui: {\n commandPalette: {\n addCommand: (c: AddCommandOptions) => Promise<void>;\n removeCommand: (c: RemoveCommandOptions) => Promise<void>;\n };\n };\n };\n extension: {\n version: string;\n };\n};\n"]}
|
package/types/query-builder.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare type Result = {
|
|
2
|
-
text: string;
|
|
3
|
-
uid: string;
|
|
4
|
-
} & Record<`${string}-uid`, string> & Record<string, string | number | Date>;
|
|
5
|
-
export declare type RunQuery = (parentUid: string) => Promise<Result[]>;
|
|
6
|
-
export declare type RunQuerySync = (parentUid: string) => Result[];
|
|
7
|
-
export declare type ListActiveQueries = () => {
|
|
8
|
-
uid: string;
|
|
9
|
-
}[];
|
|
10
|
-
export declare type IsDiscourseNode = (uid: string) => boolean;
|
package/types/query-builder.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-builder.js","sourceRoot":"","sources":["../../src/types/query-builder.ts"],"names":[],"mappings":"","sourcesContent":["export type Result = { text: string; uid: string } & Record<\n `${string}-uid`,\n string\n> &\n Record<string, string | number | Date>;\n\nexport type RunQuery = (parentUid: string) => Promise<Result[]>;\nexport type RunQuerySync = (parentUid: string) => Result[];\nexport type ListActiveQueries = () => { uid: string }[];\nexport type IsDiscourseNode = (uid: string) => boolean;\n"]}
|
package/types/smartblocks.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { InputTextNode } from "./native";
|
|
2
|
-
declare type CommandOutput = string | string[] | InputTextNode[];
|
|
3
|
-
export declare type CommandHandler = (...args: string[]) => CommandOutput | Promise<CommandOutput>;
|
|
4
|
-
export declare type SmartBlocksContext = {
|
|
5
|
-
onBlockExit: CommandHandler;
|
|
6
|
-
targetUid: string;
|
|
7
|
-
triggerUid: string;
|
|
8
|
-
ifCommand?: boolean;
|
|
9
|
-
exitBlock: "yes" | "no" | "end" | "empty" | "childless";
|
|
10
|
-
exitWorkflow: boolean;
|
|
11
|
-
variables: Record<string, string>;
|
|
12
|
-
cursorPosition?: {
|
|
13
|
-
uid: string;
|
|
14
|
-
selection: number;
|
|
15
|
-
};
|
|
16
|
-
currentUid?: string;
|
|
17
|
-
currentContent: string;
|
|
18
|
-
indent: Set<string>;
|
|
19
|
-
unindent: Set<string>;
|
|
20
|
-
focusOnBlock?: string;
|
|
21
|
-
dateBasisMethod?: string;
|
|
22
|
-
refMapping: Record<string, string>;
|
|
23
|
-
afterWorkflowMethods: (() => void | Promise<void>)[];
|
|
24
|
-
};
|
|
25
|
-
export declare type RegisterCommand = (args: {
|
|
26
|
-
text: string;
|
|
27
|
-
help?: string;
|
|
28
|
-
handler: (c: Pick<SmartBlocksContext, "targetUid" | "variables"> & {
|
|
29
|
-
proccessBlockText: (s: string) => Promise<InputTextNode[]>;
|
|
30
|
-
processBlock: (s: InputTextNode) => Promise<InputTextNode[]>;
|
|
31
|
-
}) => CommandHandler;
|
|
32
|
-
delayArgs?: true;
|
|
33
|
-
}) => () => void;
|
|
34
|
-
export declare type UnregisterCommand = (t: string) => void;
|
|
35
|
-
export {};
|
package/types/smartblocks.js
DELETED
package/types/smartblocks.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"smartblocks.js","sourceRoot":"","sources":["../../src/types/smartblocks.ts"],"names":[],"mappings":"","sourcesContent":["import { InputTextNode } from \"./native\";\n\ntype CommandOutput = string | string[] | InputTextNode[];\nexport type CommandHandler = (\n ...args: string[]\n) => CommandOutput | Promise<CommandOutput>;\n\nexport type SmartBlocksContext = {\n onBlockExit: CommandHandler;\n targetUid: string;\n triggerUid: string;\n ifCommand?: boolean;\n exitBlock: \"yes\" | \"no\" | \"end\" | \"empty\" | \"childless\";\n exitWorkflow: boolean;\n variables: Record<string, string>;\n cursorPosition?: { uid: string; selection: number };\n currentUid?: string;\n currentContent: string;\n indent: Set<string>;\n unindent: Set<string>;\n focusOnBlock?: string;\n dateBasisMethod?: string;\n refMapping: Record<string, string>;\n afterWorkflowMethods: (() => void | Promise<void>)[];\n};\n\nexport type RegisterCommand = (args: {\n text: string;\n help?: string;\n handler: (\n c: Pick<SmartBlocksContext, \"targetUid\" | \"variables\"> & {\n proccessBlockText: (s: string) => Promise<InputTextNode[]>;\n processBlock: (s: InputTextNode) => Promise<InputTextNode[]>;\n }\n ) => CommandHandler;\n delayArgs?: true;\n}) => () => void;\n\nexport type UnregisterCommand = (t: string) => void;\n"]}
|
package/util/addInputSetting.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const getBasicTreeByParentUid_1 = tslib_1.__importDefault(require("../queries/getBasicTreeByParentUid"));
|
|
5
|
-
const createBlock_1 = tslib_1.__importDefault(require("../writes/createBlock"));
|
|
6
|
-
const toFlexRegex_1 = tslib_1.__importDefault(require("./toFlexRegex"));
|
|
7
|
-
const addInputSetting = ({ blockUid, value, key, index = 0, }) => {
|
|
8
|
-
const tree = (0, getBasicTreeByParentUid_1.default)(blockUid);
|
|
9
|
-
const keyNode = tree.find((t) => (0, toFlexRegex_1.default)(key).test(t.text));
|
|
10
|
-
if (keyNode) {
|
|
11
|
-
return (0, createBlock_1.default)({
|
|
12
|
-
node: { text: value },
|
|
13
|
-
order: keyNode.children.length,
|
|
14
|
-
parentUid: keyNode.uid,
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
return (0, createBlock_1.default)({
|
|
19
|
-
parentUid: blockUid,
|
|
20
|
-
order: index,
|
|
21
|
-
node: { text: key, children: [{ text: value }] },
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
exports.default = addInputSetting;
|
|
26
|
-
//# sourceMappingURL=addInputSetting.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addInputSetting.js","sourceRoot":"","sources":["../../src/util/addInputSetting.ts"],"names":[],"mappings":";;;AAAA,yGAAyE;AACzE,gFAAgD;AAChD,wEAAwC;AAExC,MAAM,eAAe,GAAG,CAAC,EACvB,QAAQ,EACR,KAAK,EACL,GAAG,EACH,KAAK,GAAG,CAAC,GAMV,EAAmB,EAAE;IACpB,MAAM,IAAI,GAAG,IAAA,iCAAuB,EAAC,QAAQ,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,qBAAW,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAChE,IAAI,OAAO,EAAE;QACX,OAAO,IAAA,qBAAW,EAAC;YACjB,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;YACrB,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM;YAC9B,SAAS,EAAE,OAAO,CAAC,GAAG;SACvB,CAAC,CAAC;KACJ;SAAM;QACL,OAAO,IAAA,qBAAW,EAAC;YACjB,SAAS,EAAE,QAAQ;YACnB,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;SACjD,CAAC,CAAC;KACJ;AACH,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC","sourcesContent":["import getBasicTreeByParentUid from \"../queries/getBasicTreeByParentUid\";\nimport createBlock from \"../writes/createBlock\";\nimport toFlexRegex from \"./toFlexRegex\";\n\nconst addInputSetting = ({\n blockUid,\n value,\n key,\n index = 0,\n}: {\n blockUid: string;\n value: string;\n key: string;\n index?: number;\n}): Promise<string> => {\n const tree = getBasicTreeByParentUid(blockUid);\n const keyNode = tree.find((t) => toFlexRegex(key).test(t.text));\n if (keyNode) {\n return createBlock({\n node: { text: value },\n order: keyNode.children.length,\n parentUid: keyNode.uid,\n });\n } else {\n return createBlock({\n parentUid: blockUid,\n order: index,\n node: { text: key, children: [{ text: value }] },\n });\n }\n};\n\nexport default addInputSetting;\n"]}
|
package/util/apiDelete.d.ts
DELETED
package/util/apiDelete.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const handleUrlFetch_1 = tslib_1.__importDefault(require("./handleUrlFetch"));
|
|
5
|
-
const apiDelete = (0, handleUrlFetch_1.default)("DELETE");
|
|
6
|
-
exports.default = apiDelete;
|
|
7
|
-
//# sourceMappingURL=apiDelete.js.map
|
package/util/apiDelete.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apiDelete.js","sourceRoot":"","sources":["../../src/util/apiDelete.ts"],"names":[],"mappings":";;;AAAA,8EAA8C;AAE9C,MAAM,SAAS,GAAG,IAAA,wBAAc,EAAC,QAAQ,CAAC,CAAC;AAE3C,kBAAe,SAAS,CAAC","sourcesContent":["import handleUrlFetch from \"./handleUrlFetch\";\n\nconst apiDelete = handleUrlFetch(\"DELETE\");\n\nexport default apiDelete;\n"]}
|
package/util/apiGet.d.ts
DELETED
package/util/apiGet.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const handleUrlFetch_1 = tslib_1.__importDefault(require("./handleUrlFetch"));
|
|
5
|
-
const apiGet = (0, handleUrlFetch_1.default)("GET");
|
|
6
|
-
exports.default = apiGet;
|
|
7
|
-
//# sourceMappingURL=apiGet.js.map
|
package/util/apiGet.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apiGet.js","sourceRoot":"","sources":["../../src/util/apiGet.ts"],"names":[],"mappings":";;;AAAA,8EAA8C;AAE9C,MAAM,MAAM,GAAG,IAAA,wBAAc,EAAC,KAAK,CAAC,CAAC;AAErC,kBAAe,MAAM,CAAC","sourcesContent":["import handleUrlFetch from \"./handleUrlFetch\";\n\nconst apiGet = handleUrlFetch(\"GET\");\n\nexport default apiGet;\n"]}
|
package/util/apiPost.d.ts
DELETED
package/util/apiPost.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const handleBodyFetch_1 = tslib_1.__importDefault(require("./handleBodyFetch"));
|
|
5
|
-
const apiPost = (0, handleBodyFetch_1.default)("POST");
|
|
6
|
-
exports.default = apiPost;
|
|
7
|
-
//# sourceMappingURL=apiPost.js.map
|
package/util/apiPost.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apiPost.js","sourceRoot":"","sources":["../../src/util/apiPost.ts"],"names":[],"mappings":";;;AAAA,gFAAgD;AAEhD,MAAM,OAAO,GAAG,IAAA,yBAAe,EAAC,MAAM,CAAC,CAAC;AAExC,kBAAe,OAAO,CAAC","sourcesContent":["import handleBodyFetch from \"./handleBodyFetch\";\n\nconst apiPost = handleBodyFetch(\"POST\");\n\nexport default apiPost;\n"]}
|
package/util/apiPut.d.ts
DELETED
package/util/apiPut.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const handleBodyFetch_1 = tslib_1.__importDefault(require("./handleBodyFetch"));
|
|
5
|
-
const apiPut = (0, handleBodyFetch_1.default)("PUT");
|
|
6
|
-
exports.default = apiPut;
|
|
7
|
-
//# sourceMappingURL=apiPut.js.map
|
package/util/apiPut.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apiPut.js","sourceRoot":"","sources":["../../src/util/apiPut.ts"],"names":[],"mappings":";;;AAAA,gFAAgD;AAEhD,MAAM,MAAM,GAAG,IAAA,yBAAe,EAAC,KAAK,CAAC,CAAA;AAErC,kBAAe,MAAM,CAAC","sourcesContent":["import handleBodyFetch from \"./handleBodyFetch\";\n\nconst apiPut = handleBodyFetch(\"PUT\")\n\nexport default apiPut;\n"]}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { RoamOverlayProps } from "./renderOverlay";
|
|
3
|
-
declare const createOverlayRender: <T extends Record<string, unknown>>(id: string, Overlay: (props: RoamOverlayProps<T>) => React.ReactElement) => (props: T) => (() => void) | undefined;
|
|
4
|
-
export default createOverlayRender;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const renderOverlay_1 = tslib_1.__importDefault(require("./renderOverlay"));
|
|
5
|
-
const createOverlayRender = (id, Overlay) => (props) => (0, renderOverlay_1.default)({ id, Overlay, props });
|
|
6
|
-
exports.default = createOverlayRender;
|
|
7
|
-
//# sourceMappingURL=createOverlayRender.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createOverlayRender.js","sourceRoot":"","sources":["../../src/util/createOverlayRender.ts"],"names":[],"mappings":";;;AACA,4EAAkE;AAElE,MAAM,mBAAmB,GACvB,CACE,EAAU,EACV,OAA2D,EAC3D,EAAE,CACJ,CAAC,KAAQ,EAAE,EAAE,CACX,IAAA,uBAAa,EAAI,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AAE7C,kBAAe,mBAAmB,CAAC","sourcesContent":["import React from \"react\";\nimport renderOverlay, { RoamOverlayProps } from \"./renderOverlay\";\n\nconst createOverlayRender =\n <T extends Record<string, unknown>>(\n id: string,\n Overlay: (props: RoamOverlayProps<T>) => React.ReactElement\n ) =>\n (props: T) =>\n renderOverlay<T>({ id, Overlay, props });\n\nexport default createOverlayRender;\n"]}
|
package/util/createTagRegex.d.ts
DELETED
package/util/createTagRegex.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const createTagRegex = (title) => {
|
|
4
|
-
const escapedTitle = title.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5
|
-
return new RegExp(`(?:#\\[\\[${escapedTitle}\\]\\]|#${escapedTitle}(?!\\w)|\\[\\[${escapedTitle}\\]\\])`);
|
|
6
|
-
};
|
|
7
|
-
exports.default = createTagRegex;
|
|
8
|
-
//# sourceMappingURL=createTagRegex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createTagRegex.js","sourceRoot":"","sources":["../../src/util/createTagRegex.ts"],"names":[],"mappings":";;AAAA,MAAM,cAAc,GAAG,CAAC,KAAa,EAAU,EAAE;IAC/C,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IAClE,OAAO,IAAI,MAAM,CACf,aAAa,YAAY,WAAW,YAAY,iBAAiB,YAAY,SAAS,CACvF,CAAC;AACJ,CAAC,CAAC;AACF,kBAAe,cAAc,CAAC","sourcesContent":["const createTagRegex = (title: string): RegExp => {\n const escapedTitle = title.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n return new RegExp(\n `(?:#\\\\[\\\\[${escapedTitle}\\\\]\\\\]|#${escapedTitle}(?!\\\\w)|\\\\[\\\\[${escapedTitle}\\\\]\\\\])`\n );\n};\nexport default createTagRegex;\n"]}
|