roamjs-components 0.86.0-alpha → 0.86.0-alpha.3
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/components/AutocompleteInput.d.ts +28 -0
- package/components/AutocompleteInput.js +121 -0
- package/components/AutocompleteInput.js.map +1 -0
- package/components/BlockErrorBoundary.d.ts +16 -0
- package/components/BlockErrorBoundary.js +28 -0
- package/components/BlockErrorBoundary.js.map +1 -0
- package/components/BlockInput.d.ts +13 -0
- package/components/BlockInput.js +56 -0
- package/components/BlockInput.js.map +1 -0
- package/components/ComponentContainer.d.ts +11 -0
- package/components/ComponentContainer.js +38 -0
- package/components/ComponentContainer.js.map +1 -0
- package/components/ConfigPage.d.ts +35 -0
- package/components/ConfigPage.js +160 -0
- package/components/ConfigPage.js.map +1 -0
- package/components/ConfigPanels/BlockPanel.d.ts +3 -0
- package/components/ConfigPanels/BlockPanel.js +43 -0
- package/components/ConfigPanels/BlockPanel.js.map +1 -0
- package/components/ConfigPanels/BlocksPanel.d.ts +3 -0
- package/components/ConfigPanels/BlocksPanel.js +69 -0
- package/components/ConfigPanels/BlocksPanel.js.map +1 -0
- package/components/ConfigPanels/CustomPanel.d.ts +3 -0
- package/components/ConfigPanels/CustomPanel.js +25 -0
- package/components/ConfigPanels/CustomPanel.js.map +1 -0
- package/components/ConfigPanels/FlagPanel.d.ts +3 -0
- package/components/ConfigPanels/FlagPanel.js +32 -0
- package/components/ConfigPanels/FlagPanel.js.map +1 -0
- package/components/ConfigPanels/MultiChildPanel.d.ts +9 -0
- package/components/ConfigPanels/MultiChildPanel.js +59 -0
- package/components/ConfigPanels/MultiChildPanel.js.map +1 -0
- package/components/ConfigPanels/MultiTextPanel.d.ts +3 -0
- package/components/ConfigPanels/MultiTextPanel.js +15 -0
- package/components/ConfigPanels/MultiTextPanel.js.map +1 -0
- package/components/ConfigPanels/NumberPanel.d.ts +3 -0
- package/components/ConfigPanels/NumberPanel.js +26 -0
- package/components/ConfigPanels/NumberPanel.js.map +1 -0
- package/components/ConfigPanels/OauthPanel.d.ts +3 -0
- package/components/ConfigPanels/OauthPanel.js +82 -0
- package/components/ConfigPanels/OauthPanel.js.map +1 -0
- package/components/ConfigPanels/PagesPanel.d.ts +3 -0
- package/components/ConfigPanels/PagesPanel.js +12 -0
- package/components/ConfigPanels/PagesPanel.js.map +1 -0
- package/components/ConfigPanels/SelectPanel.d.ts +3 -0
- package/components/ConfigPanels/SelectPanel.js +28 -0
- package/components/ConfigPanels/SelectPanel.js.map +1 -0
- package/components/ConfigPanels/TextPanel.d.ts +3 -0
- package/components/ConfigPanels/TextPanel.js +29 -0
- package/components/ConfigPanels/TextPanel.js.map +1 -0
- package/components/ConfigPanels/TimePanel.d.ts +3 -0
- package/components/ConfigPanels/TimePanel.js +35 -0
- package/components/ConfigPanels/TimePanel.js.map +1 -0
- package/components/ConfigPanels/getBrandColors.d.ts +7 -0
- package/components/ConfigPanels/getBrandColors.js +29 -0
- package/components/ConfigPanels/getBrandColors.js.map +1 -0
- package/components/ConfigPanels/types.d.ts +84 -0
- package/components/ConfigPanels/types.js +3 -0
- package/components/ConfigPanels/types.js.map +1 -0
- package/components/ConfigPanels/useSingleChildValue.d.ts +13 -0
- package/components/ConfigPanels/useSingleChildValue.js +44 -0
- package/components/ConfigPanels/useSingleChildValue.js.map +1 -0
- package/components/CursorMenu.d.ts +21 -0
- package/components/CursorMenu.js +182 -0
- package/components/CursorMenu.js.map +1 -0
- package/components/Description.d.ts +5 -0
- package/components/Description.js +17 -0
- package/components/Description.js.map +1 -0
- package/components/ExtensionApiContext.d.ts +31 -0
- package/components/ExtensionApiContext.js +17 -0
- package/components/ExtensionApiContext.js.map +1 -0
- package/components/ExternalLogin.d.ts +18 -0
- package/components/ExternalLogin.js +142 -0
- package/components/ExternalLogin.js.map +1 -0
- package/components/Filter.d.ts +15 -0
- package/components/Filter.js +143 -0
- package/components/Filter.js.map +1 -0
- package/components/FormDialog.d.ts +55 -0
- package/components/FormDialog.js +224 -0
- package/components/FormDialog.js.map +1 -0
- package/components/Loading.d.ts +4 -0
- package/components/Loading.js +36 -0
- package/components/Loading.js.map +1 -0
- package/components/MenuItemSelect.d.ts +17 -0
- package/components/MenuItemSelect.js +24 -0
- package/components/MenuItemSelect.js.map +1 -0
- package/components/OauthPanel.d.ts +7 -0
- package/components/OauthPanel.js +31 -0
- package/components/OauthPanel.js.map +1 -0
- package/components/OauthSelect.d.ts +5 -0
- package/components/OauthSelect.js +26 -0
- package/components/OauthSelect.js.map +1 -0
- package/components/PageInput.d.ts +6 -0
- package/components/PageInput.js +14 -0
- package/components/PageInput.js.map +1 -0
- package/components/PageLink.d.ts +6 -0
- package/components/PageLink.js +32 -0
- package/components/PageLink.js.map +1 -0
- package/components/ProgressDialog.d.ts +11 -0
- package/components/ProgressDialog.js +61 -0
- package/components/ProgressDialog.js.map +1 -0
- package/components/SimpleAlert.d.ts +15 -0
- package/components/SimpleAlert.js +48 -0
- package/components/SimpleAlert.js.map +1 -0
- package/components/Toast.d.ts +15 -0
- package/components/Toast.js +51 -0
- package/components/Toast.js.map +1 -0
- package/components/index.d.ts +0 -0
- package/components/index.js +5 -0
- package/components/index.js.map +1 -0
- package/components.d.ts +5 -0
- package/components.js +202 -0
- package/components.js.map +1 -0
- package/date/constants.d.ts +3 -0
- package/date/constants.js +20 -0
- package/date/constants.js.map +1 -0
- package/date/index.js +10 -0
- package/date/index.js.map +1 -0
- package/date/parseNlpDate.d.ts +5 -0
- package/date/parseNlpDate.js +227 -0
- package/date/parseNlpDate.js.map +1 -0
- package/date/parseRoamDateUid.d.ts +2 -0
- package/date/parseRoamDateUid.js +8 -0
- package/date/parseRoamDateUid.js.map +1 -0
- package/dom/addBlockCommand.d.ts +5 -0
- package/dom/addBlockCommand.js +54 -0
- package/dom/addBlockCommand.js.map +1 -0
- package/dom/addKeyboardTriggers.d.ts +11 -0
- package/dom/addKeyboardTriggers.js +39 -0
- package/dom/addKeyboardTriggers.js.map +1 -0
- package/dom/addOldRoamJSDependency.d.ts +2 -0
- package/dom/addOldRoamJSDependency.js +11 -0
- package/dom/addOldRoamJSDependency.js.map +1 -0
- package/dom/addRoamJSDependency.d.ts +2 -0
- package/dom/addRoamJSDependency.js +9 -0
- package/dom/addRoamJSDependency.js.map +1 -0
- package/dom/addScriptAsDependency.d.ts +6 -0
- package/dom/addScriptAsDependency.js +17 -0
- package/dom/addScriptAsDependency.js.map +1 -0
- package/dom/addStyle.d.ts +2 -0
- package/dom/addStyle.js +15 -0
- package/dom/addStyle.js.map +1 -0
- package/dom/constants.d.ts +1 -0
- package/dom/constants.js +5 -0
- package/dom/constants.js.map +1 -0
- package/dom/createBlockObserver.d.ts +7 -0
- package/dom/createBlockObserver.js +44 -0
- package/dom/createBlockObserver.js.map +1 -0
- package/dom/createButtonObserver.d.ts +6 -0
- package/dom/createButtonObserver.js +22 -0
- package/dom/createButtonObserver.js.map +1 -0
- package/dom/createDivObserver.d.ts +2 -0
- package/dom/createDivObserver.js +14 -0
- package/dom/createDivObserver.js.map +1 -0
- package/dom/createHTMLObserver.d.ts +8 -0
- package/dom/createHTMLObserver.js +25 -0
- package/dom/createHTMLObserver.js.map +1 -0
- package/dom/createHashtagObserver.d.ts +5 -0
- package/dom/createHashtagObserver.js +17 -0
- package/dom/createHashtagObserver.js.map +1 -0
- package/dom/createIconButton.d.ts +2 -0
- package/dom/createIconButton.js +13 -0
- package/dom/createIconButton.js.map +1 -0
- package/dom/createObserver.d.ts +2 -0
- package/dom/createObserver.js +10 -0
- package/dom/createObserver.js.map +1 -0
- package/dom/createOverlayObserver.d.ts +2 -0
- package/dom/createOverlayObserver.js +7 -0
- package/dom/createOverlayObserver.js.map +1 -0
- package/dom/createPageObserver.d.ts +2 -0
- package/dom/createPageObserver.js +35 -0
- package/dom/createPageObserver.js.map +1 -0
- package/dom/createPageTitleObserver.d.ts +6 -0
- package/dom/createPageTitleObserver.js +32 -0
- package/dom/createPageTitleObserver.js.map +1 -0
- package/dom/elToTitle.d.ts +2 -0
- package/dom/elToTitle.js +23 -0
- package/dom/elToTitle.js.map +1 -0
- package/dom/genericError.d.ts +3 -0
- package/dom/genericError.js +12 -0
- package/dom/genericError.js.map +1 -0
- package/dom/getActiveUids.d.ts +3 -0
- package/dom/getActiveUids.js +7 -0
- package/dom/getActiveUids.js.map +1 -0
- package/dom/getBlockUidFromTarget.d.ts +2 -0
- package/dom/getBlockUidFromTarget.js +34 -0
- package/dom/getBlockUidFromTarget.js.map +1 -0
- package/dom/getCurrentPageUid.d.ts +2 -0
- package/dom/getCurrentPageUid.js +9 -0
- package/dom/getCurrentPageUid.js.map +1 -0
- package/dom/getDomRefs.d.ts +2 -0
- package/dom/getDomRefs.js +13 -0
- package/dom/getDomRefs.js.map +1 -0
- package/dom/getDropUidOffset.d.ts +5 -0
- package/dom/getDropUidOffset.js +28 -0
- package/dom/getDropUidOffset.js.map +1 -0
- package/dom/getMutatedNodes.d.ts +7 -0
- package/dom/getMutatedNodes.js +12 -0
- package/dom/getMutatedNodes.js.map +1 -0
- package/dom/getPageTitleByHtmlElement.d.ts +2 -0
- package/dom/getPageTitleByHtmlElement.js +13 -0
- package/dom/getPageTitleByHtmlElement.js.map +1 -0
- package/dom/getPageTitleValueByHtmlElement.d.ts +2 -0
- package/dom/getPageTitleValueByHtmlElement.js +10 -0
- package/dom/getPageTitleValueByHtmlElement.js.map +1 -0
- package/dom/getReferenceBlockUid.d.ts +2 -0
- package/dom/getReferenceBlockUid.js +19 -0
- package/dom/getReferenceBlockUid.js.map +1 -0
- package/dom/getRoamUrl.d.ts +2 -0
- package/dom/getRoamUrl.js +5 -0
- package/dom/getRoamUrl.js.map +1 -0
- package/dom/getRoamUrlByPage.d.ts +2 -0
- package/dom/getRoamUrlByPage.js +11 -0
- package/dom/getRoamUrlByPage.js.map +1 -0
- package/dom/getUids.d.ts +3 -0
- package/dom/getUids.js +9 -0
- package/dom/getUids.js.map +1 -0
- package/dom/getUidsFromButton.d.ts +3 -0
- package/dom/getUidsFromButton.js +9 -0
- package/dom/getUidsFromButton.js.map +1 -0
- package/dom/getUidsFromId.d.ts +5 -0
- package/dom/getUidsFromId.js +16 -0
- package/dom/getUidsFromId.js.map +1 -0
- package/dom/index.js +64 -0
- package/dom/index.js.map +1 -0
- package/dom/parseRoamBlocksToHtml.d.ts +11 -0
- package/dom/parseRoamBlocksToHtml.js +80 -0
- package/dom/parseRoamBlocksToHtml.js.map +1 -0
- package/dom/resolveRefs.d.ts +2 -0
- package/dom/resolveRefs.js +25 -0
- package/dom/resolveRefs.js.map +1 -0
- package/events/index.js +9 -0
- package/events/index.js.map +1 -0
- package/events/watchOnce.d.ts +3 -0
- package/events/watchOnce.js +13 -0
- package/events/watchOnce.js.map +1 -0
- package/hooks/index.js +11 -0
- package/hooks/index.js.map +1 -0
- package/hooks/useArrowKeyDown.d.ts +10 -0
- package/hooks/useArrowKeyDown.js +55 -0
- package/hooks/useArrowKeyDown.js.map +1 -0
- package/hooks/useSubTree.d.ts +3 -0
- package/hooks/useSubTree.js +12 -0
- package/hooks/useSubTree.js.map +1 -0
- package/marked/index.d.ts +25 -0
- package/marked/index.js +568 -0
- package/marked/index.js.map +1 -0
- package/package.json +18 -10
- package/queries/compileDatalog.d.ts +3 -0
- package/queries/compileDatalog.js +64 -0
- package/queries/compileDatalog.js.map +1 -0
- package/queries/getAllBlockUids.d.ts +2 -0
- package/queries/getAllBlockUids.js +7 -0
- package/queries/getAllBlockUids.js.map +1 -0
- package/queries/getAllBlockUidsAndTexts.d.ts +5 -0
- package/queries/getAllBlockUidsAndTexts.js +7 -0
- package/queries/getAllBlockUidsAndTexts.js.map +1 -0
- package/queries/getAllPageNames.d.ts +2 -0
- package/queries/getAllPageNames.js +7 -0
- package/queries/getAllPageNames.js.map +1 -0
- package/queries/getAttributeValueByBlockAndName.d.ts +5 -0
- package/queries/getAttributeValueByBlockAndName.js +12 -0
- package/queries/getAttributeValueByBlockAndName.js.map +1 -0
- package/queries/getBasicTreeByParentUid.d.ts +3 -0
- package/queries/getBasicTreeByParentUid.js +14 -0
- package/queries/getBasicTreeByParentUid.js.map +1 -0
- package/queries/getBlockUidAndTextIncludingText.d.ts +5 -0
- package/queries/getBlockUidAndTextIncludingText.js +8 -0
- package/queries/getBlockUidAndTextIncludingText.js.map +1 -0
- package/queries/getBlockUidByTextOnPage.d.ts +5 -0
- package/queries/getBlockUidByTextOnPage.js +8 -0
- package/queries/getBlockUidByTextOnPage.js.map +1 -0
- package/queries/getBlockUidsAndTextsReferencingPage.d.ts +5 -0
- package/queries/getBlockUidsAndTextsReferencingPage.js +10 -0
- package/queries/getBlockUidsAndTextsReferencingPage.js.map +1 -0
- package/queries/getBlockUidsByPageTitle.d.ts +2 -0
- package/queries/getBlockUidsByPageTitle.js +9 -0
- package/queries/getBlockUidsByPageTitle.js.map +1 -0
- package/queries/getBlockUidsReferencingBlock.d.ts +2 -0
- package/queries/getBlockUidsReferencingBlock.js +5 -0
- package/queries/getBlockUidsReferencingBlock.js.map +1 -0
- package/queries/getBlockUidsReferencingPage.d.ts +2 -0
- package/queries/getBlockUidsReferencingPage.js +7 -0
- package/queries/getBlockUidsReferencingPage.js.map +1 -0
- package/queries/getBlockUidsWithParentUid.d.ts +2 -0
- package/queries/getBlockUidsWithParentUid.js +7 -0
- package/queries/getBlockUidsWithParentUid.js.map +1 -0
- package/queries/getChildrenLengthByPageUid.d.ts +2 -0
- package/queries/getChildrenLengthByPageUid.js +9 -0
- package/queries/getChildrenLengthByPageUid.js.map +1 -0
- package/queries/getChildrenLengthByParentUid.d.ts +2 -0
- package/queries/getChildrenLengthByParentUid.js +8 -0
- package/queries/getChildrenLengthByParentUid.js.map +1 -0
- package/queries/getCreateTimeByBlockUid.d.ts +2 -0
- package/queries/getCreateTimeByBlockUid.js +8 -0
- package/queries/getCreateTimeByBlockUid.js.map +1 -0
- package/queries/getCurrentUser.d.ts +2 -0
- package/queries/getCurrentUser.js +12 -0
- package/queries/getCurrentUser.js.map +1 -0
- package/queries/getCurrentUserDisplayName.d.ts +2 -0
- package/queries/getCurrentUserDisplayName.js +11 -0
- package/queries/getCurrentUserDisplayName.js.map +1 -0
- package/queries/getCurrentUserEmail.d.ts +2 -0
- package/queries/getCurrentUserEmail.js +14 -0
- package/queries/getCurrentUserEmail.js.map +1 -0
- package/queries/getCurrentUserUid.d.ts +2 -0
- package/queries/getCurrentUserUid.js +14 -0
- package/queries/getCurrentUserUid.js.map +1 -0
- package/queries/getDisplayNameByEmail.d.ts +2 -0
- package/queries/getDisplayNameByEmail.js +8 -0
- package/queries/getDisplayNameByEmail.js.map +1 -0
- package/queries/getDisplayNameByUid.d.ts +2 -0
- package/queries/getDisplayNameByUid.js +8 -0
- package/queries/getDisplayNameByUid.js.map +1 -0
- package/queries/getEditTimeByBlockUid.d.ts +2 -0
- package/queries/getEditTimeByBlockUid.js +8 -0
- package/queries/getEditTimeByBlockUid.js.map +1 -0
- package/queries/getEditedUserEmailByBlockUid.d.ts +2 -0
- package/queries/getEditedUserEmailByBlockUid.js +8 -0
- package/queries/getEditedUserEmailByBlockUid.js.map +1 -0
- package/queries/getFirstChildTextByBlockUid.d.ts +2 -0
- package/queries/getFirstChildTextByBlockUid.js +8 -0
- package/queries/getFirstChildTextByBlockUid.js.map +1 -0
- package/queries/getFirstChildUidByBlockUid.d.ts +2 -0
- package/queries/getFirstChildUidByBlockUid.js +7 -0
- package/queries/getFirstChildUidByBlockUid.js.map +1 -0
- package/queries/getFullTreeByParentUid.d.ts +3 -0
- package/queries/getFullTreeByParentUid.js +52 -0
- package/queries/getFullTreeByParentUid.js.map +1 -0
- package/queries/getLinkedPageTitlesUnderUid.d.ts +2 -0
- package/queries/getLinkedPageTitlesUnderUid.js +7 -0
- package/queries/getLinkedPageTitlesUnderUid.js.map +1 -0
- package/queries/getNthChildUidByBlockUid.d.ts +5 -0
- package/queries/getNthChildUidByBlockUid.js +8 -0
- package/queries/getNthChildUidByBlockUid.js.map +1 -0
- package/queries/getOrderByBlockUid.d.ts +2 -0
- package/queries/getOrderByBlockUid.js +8 -0
- package/queries/getOrderByBlockUid.js.map +1 -0
- package/queries/getPageTitleByBlockUid.d.ts +2 -0
- package/queries/getPageTitleByBlockUid.js +8 -0
- package/queries/getPageTitleByBlockUid.js.map +1 -0
- package/queries/getPageTitleByPageUid.d.ts +2 -0
- package/queries/getPageTitleByPageUid.js +13 -0
- package/queries/getPageTitleByPageUid.js.map +1 -0
- package/queries/getPageTitleReferencesByPageTitle.d.ts +2 -0
- package/queries/getPageTitleReferencesByPageTitle.js +7 -0
- package/queries/getPageTitleReferencesByPageTitle.js.map +1 -0
- package/queries/getPageTitlesAndBlockUidsReferencingPage.d.ts +5 -0
- package/queries/getPageTitlesAndBlockUidsReferencingPage.js +10 -0
- package/queries/getPageTitlesAndBlockUidsReferencingPage.js.map +1 -0
- package/queries/getPageTitlesAndUidsDirectlyReferencingPage.d.ts +5 -0
- package/queries/getPageTitlesAndUidsDirectlyReferencingPage.js +10 -0
- package/queries/getPageTitlesAndUidsDirectlyReferencingPage.js.map +1 -0
- package/queries/getPageTitlesReferencingBlockUid.d.ts +2 -0
- package/queries/getPageTitlesReferencingBlockUid.js +5 -0
- package/queries/getPageTitlesReferencingBlockUid.js.map +1 -0
- package/queries/getPageTitlesStartingWithPrefix.d.ts +2 -0
- package/queries/getPageTitlesStartingWithPrefix.js +7 -0
- package/queries/getPageTitlesStartingWithPrefix.js.map +1 -0
- package/queries/getPageUidByBlockUid.d.ts +2 -0
- package/queries/getPageUidByBlockUid.js +8 -0
- package/queries/getPageUidByBlockUid.js.map +1 -0
- package/queries/getPageUidByPageTitle.d.ts +2 -0
- package/queries/getPageUidByPageTitle.js +10 -0
- package/queries/getPageUidByPageTitle.js.map +1 -0
- package/queries/getPageViewType.d.ts +3 -0
- package/queries/getPageViewType.js +10 -0
- package/queries/getPageViewType.js.map +1 -0
- package/queries/getParentTextByBlockUid.d.ts +2 -0
- package/queries/getParentTextByBlockUid.js +8 -0
- package/queries/getParentTextByBlockUid.js.map +1 -0
- package/queries/getParentTextByBlockUidAndTag.d.ts +5 -0
- package/queries/getParentTextByBlockUidAndTag.js +8 -0
- package/queries/getParentTextByBlockUidAndTag.js.map +1 -0
- package/queries/getParentUidByBlockUid.d.ts +2 -0
- package/queries/getParentUidByBlockUid.js +8 -0
- package/queries/getParentUidByBlockUid.js.map +1 -0
- package/queries/getParentUidsOfBlockUid.d.ts +2 -0
- package/queries/getParentUidsOfBlockUid.js +5 -0
- package/queries/getParentUidsOfBlockUid.js.map +1 -0
- package/queries/getSettingsByEmail.d.ts +3 -0
- package/queries/getSettingsByEmail.js +8 -0
- package/queries/getSettingsByEmail.js.map +1 -0
- package/queries/getShallowTreeByParentUid.d.ts +5 -0
- package/queries/getShallowTreeByParentUid.js +10 -0
- package/queries/getShallowTreeByParentUid.js.map +1 -0
- package/queries/getTextByBlockUid.d.ts +2 -0
- package/queries/getTextByBlockUid.js +10 -0
- package/queries/getTextByBlockUid.js.map +1 -0
- package/queries/index.d.ts +0 -0
- package/queries/index.js +5 -0
- package/queries/index.js.map +1 -0
- package/queries/isLiveBlock.d.ts +2 -0
- package/queries/isLiveBlock.js +5 -0
- package/queries/isLiveBlock.js.map +1 -0
- package/queries/isTagOnPage.d.ts +5 -0
- package/queries/isTagOnPage.js +10 -0
- package/queries/isTagOnPage.js.map +1 -0
- package/queries/normalizePageTitle.d.ts +2 -0
- package/queries/normalizePageTitle.js +5 -0
- package/queries/normalizePageTitle.js.map +1 -0
- package/scripts/index.d.ts +1 -0
- package/scripts/index.js +27 -0
- package/scripts/index.js.map +1 -0
- package/scripts/publishToRoamDepot.d.ts +7 -0
- package/scripts/publishToRoamDepot.js +114 -0
- package/scripts/publishToRoamDepot.js.map +1 -0
- package/testing/mockRoamEnvironment.d.ts +2 -0
- package/testing/mockRoamEnvironment.js +1254 -0
- package/testing/mockRoamEnvironment.js.map +1 -0
- package/types/index.d.ts +250 -0
- package/types/index.js +5 -0
- package/types/index.js.map +1 -0
- package/types/native.d.ts +402 -0
- package/types/native.js +5 -0
- package/types/native.js.map +1 -0
- package/types/query-builder.d.ts +10 -0
- package/types/query-builder.js +3 -0
- package/types/query-builder.js.map +1 -0
- package/types/smartblocks.d.ts +35 -0
- package/types/smartblocks.js +3 -0
- package/types/smartblocks.js.map +1 -0
- package/util/addInputSetting.d.ts +7 -0
- package/util/addInputSetting.js +26 -0
- package/util/addInputSetting.js.map +1 -0
- package/util/apiDelete.d.ts +2 -0
- package/util/apiDelete.js +7 -0
- package/util/apiDelete.js.map +1 -0
- package/util/apiGet.d.ts +2 -0
- package/util/apiGet.js +7 -0
- package/util/apiGet.js.map +1 -0
- package/util/apiPost.d.ts +2 -0
- package/util/apiPost.js +7 -0
- package/util/apiPost.js.map +1 -0
- package/util/apiPut.d.ts +2 -0
- package/util/apiPut.js +7 -0
- package/util/apiPut.js.map +1 -0
- package/util/createOverlayRender.d.ts +4 -0
- package/util/createOverlayRender.js +7 -0
- package/util/createOverlayRender.js.map +1 -0
- package/util/createTagRegex.d.ts +2 -0
- package/util/createTagRegex.js +8 -0
- package/util/createTagRegex.js.map +1 -0
- package/util/dispatchToRegistry.d.ts +3 -0
- package/util/dispatchToRegistry.js +8 -0
- package/util/dispatchToRegistry.js.map +1 -0
- package/util/env.d.ts +4 -0
- package/util/env.js +48 -0
- package/util/env.js.map +1 -0
- package/util/extensionApiContext.d.ts +29 -0
- package/util/extensionApiContext.js +18 -0
- package/util/extensionApiContext.js.map +1 -0
- package/util/extensionDeprecatedWarning.d.ts +5 -0
- package/util/extensionDeprecatedWarning.js +40 -0
- package/util/extensionDeprecatedWarning.js.map +1 -0
- package/util/extractRef.d.ts +2 -0
- package/util/extractRef.js +9 -0
- package/util/extractRef.js.map +1 -0
- package/util/extractTag.d.ts +2 -0
- package/util/extractTag.js +16 -0
- package/util/extractTag.js.map +1 -0
- package/util/focusMainWindowBlock.d.ts +2 -0
- package/util/focusMainWindowBlock.js +13 -0
- package/util/focusMainWindowBlock.js.map +1 -0
- package/util/getAuthorizationHeader.d.ts +2 -0
- package/util/getAuthorizationHeader.js +13 -0
- package/util/getAuthorizationHeader.js.map +1 -0
- package/util/getLocalStorageKey.d.ts +2 -0
- package/util/getLocalStorageKey.js +5 -0
- package/util/getLocalStorageKey.js.map +1 -0
- package/util/getOauth.d.ts +2 -0
- package/util/getOauth.js +53 -0
- package/util/getOauth.js.map +1 -0
- package/util/getOauthAccounts.d.ts +2 -0
- package/util/getOauthAccounts.js +23 -0
- package/util/getOauthAccounts.js.map +1 -0
- package/util/getRenderRoot.d.ts +2 -0
- package/util/getRenderRoot.js +19 -0
- package/util/getRenderRoot.js.map +1 -0
- package/util/getSettingIntFromTree.d.ts +7 -0
- package/util/getSettingIntFromTree.js +12 -0
- package/util/getSettingIntFromTree.js.map +1 -0
- package/util/getSettingValueFromTree.d.ts +8 -0
- package/util/getSettingValueFromTree.js +15 -0
- package/util/getSettingValueFromTree.js.map +1 -0
- package/util/getSettingValuesFromTree.d.ts +7 -0
- package/util/getSettingValuesFromTree.js +13 -0
- package/util/getSettingValuesFromTree.js.map +1 -0
- package/util/getSubTree.d.ts +8 -0
- package/util/getSubTree.js +20 -0
- package/util/getSubTree.js.map +1 -0
- package/util/getToken.d.ts +2 -0
- package/util/getToken.js +11 -0
- package/util/getToken.js.map +1 -0
- package/util/getTokenFromTree.d.ts +3 -0
- package/util/getTokenFromTree.js +5 -0
- package/util/getTokenFromTree.js.map +1 -0
- package/util/getWorkerClient.d.ts +12 -0
- package/util/getWorkerClient.js +42 -0
- package/util/getWorkerClient.js.map +1 -0
- package/util/handleBodyFetch.d.ts +3 -0
- package/util/handleBodyFetch.js +22 -0
- package/util/handleBodyFetch.js.map +1 -0
- package/util/handleFetch.d.ts +13 -0
- package/util/handleFetch.js +41 -0
- package/util/handleFetch.js.map +1 -0
- package/util/handleUrlFetch.d.ts +3 -0
- package/util/handleUrlFetch.js +20 -0
- package/util/handleUrlFetch.js.map +1 -0
- package/util/idToTitle.d.ts +2 -0
- package/util/idToTitle.js +9 -0
- package/util/idToTitle.js.map +1 -0
- package/{src/util/index.ts → util/index.d.ts} +4 -4
- package/util/index.js +55 -0
- package/util/index.js.map +1 -0
- package/util/isControl.d.ts +2 -0
- package/util/isControl.js +5 -0
- package/util/isControl.js.map +1 -0
- package/util/localStorageGet.d.ts +2 -0
- package/util/localStorageGet.js +9 -0
- package/util/localStorageGet.js.map +1 -0
- package/util/localStorageRemove.d.ts +2 -0
- package/util/localStorageRemove.js +7 -0
- package/util/localStorageRemove.js.map +1 -0
- package/util/localStorageSet.d.ts +2 -0
- package/util/localStorageSet.js +9 -0
- package/util/localStorageSet.js.map +1 -0
- package/util/registerExperimentalMode.d.ts +6 -0
- package/util/registerExperimentalMode.js +66 -0
- package/util/registerExperimentalMode.js.map +1 -0
- package/util/registerSmartBlocksCommand.d.ts +3 -0
- package/util/registerSmartBlocksCommand.js +24 -0
- package/util/registerSmartBlocksCommand.js.map +1 -0
- package/util/removeFromRegistry.d.ts +3 -0
- package/util/removeFromRegistry.js +8 -0
- package/util/removeFromRegistry.js.map +1 -0
- package/util/renderOverlay.d.ts +12 -0
- package/util/renderOverlay.js +49 -0
- package/util/renderOverlay.js.map +1 -0
- package/util/renderWithUnmount.d.ts +4 -0
- package/util/renderWithUnmount.js +45 -0
- package/util/renderWithUnmount.js.map +1 -0
- package/util/runExtension.d.ts +11 -0
- package/util/runExtension.js +175 -0
- package/util/runExtension.js.map +1 -0
- package/util/setInputSetting.d.ts +7 -0
- package/util/setInputSetting.js +38 -0
- package/util/setInputSetting.js.map +1 -0
- package/util/setInputSettings.d.ts +7 -0
- package/util/setInputSettings.js +29 -0
- package/util/setInputSettings.js.map +1 -0
- package/util/stripUid.d.ts +3 -0
- package/util/stripUid.js +11 -0
- package/util/stripUid.js.map +1 -0
- package/util/toConfigPageName.d.ts +2 -0
- package/util/toConfigPageName.js +5 -0
- package/util/toConfigPageName.js.map +1 -0
- package/util/toFlexRegex.d.ts +2 -0
- package/util/toFlexRegex.js +5 -0
- package/util/toFlexRegex.js.map +1 -0
- package/writes/clearBlockById.d.ts +2 -0
- package/writes/clearBlockById.js +18 -0
- package/writes/clearBlockById.js.map +1 -0
- package/writes/clearBlockByUid.d.ts +2 -0
- package/writes/clearBlockByUid.js +17 -0
- package/writes/clearBlockByUid.js.map +1 -0
- package/writes/createBlock.d.ts +8 -0
- package/writes/createBlock.js +29 -0
- package/writes/createBlock.js.map +1 -0
- package/writes/createPage.d.ts +7 -0
- package/writes/createPage.js +21 -0
- package/writes/createPage.js.map +1 -0
- package/writes/deleteBlock.d.ts +2 -0
- package/writes/deleteBlock.js +11 -0
- package/writes/deleteBlock.js.map +1 -0
- package/writes/index.js +23 -0
- package/writes/index.js.map +1 -0
- package/writes/openBlockInSidebar.d.ts +2 -0
- package/writes/openBlockInSidebar.js +14 -0
- package/writes/openBlockInSidebar.js.map +1 -0
- package/writes/submitActions.d.ts +8 -0
- package/writes/submitActions.js +37 -0
- package/writes/submitActions.js.map +1 -0
- package/writes/updateActiveBlock.d.ts +2 -0
- package/writes/updateActiveBlock.js +18 -0
- package/writes/updateActiveBlock.js.map +1 -0
- package/writes/updateBlock.d.ts +5 -0
- package/writes/updateBlock.js +24 -0
- package/writes/updateBlock.js.map +1 -0
- package/.eslintrc.json +0 -19
- package/.github/workflows/main.yaml +0 -34
- package/docs/components.md +0 -32
- package/docs/date.md +0 -13
- package/docs/dom.md +0 -58
- package/docs/events.md +0 -16
- package/docs/hooks.md +0 -15
- package/docs/marked.md +0 -56
- package/docs/queries.md +0 -24
- package/docs/scripts.md +0 -20
- package/docs/types.md +0 -32
- package/docs/util.md +0 -38
- package/docs/writes.md +0 -23
- package/patches/dotenv+16.3.1.patch +0 -12
- package/src/components/AutocompleteInput.tsx +0 -248
- package/src/components/BlockErrorBoundary.tsx +0 -35
- package/src/components/BlockInput.tsx +0 -117
- package/src/components/ComponentContainer.tsx +0 -69
- package/src/components/ConfigPage.tsx +0 -320
- package/src/components/ConfigPanels/BlockPanel.tsx +0 -60
- package/src/components/ConfigPanels/BlocksPanel.tsx +0 -100
- package/src/components/ConfigPanels/CustomPanel.tsx +0 -41
- package/src/components/ConfigPanels/FlagPanel.tsx +0 -48
- package/src/components/ConfigPanels/MultiChildPanel.tsx +0 -99
- package/src/components/ConfigPanels/MultiTextPanel.tsx +0 -23
- package/src/components/ConfigPanels/NumberPanel.tsx +0 -36
- package/src/components/ConfigPanels/OauthPanel.tsx +0 -127
- package/src/components/ConfigPanels/PagesPanel.tsx +0 -19
- package/src/components/ConfigPanels/SelectPanel.tsx +0 -46
- package/src/components/ConfigPanels/TextPanel.tsx +0 -44
- package/src/components/ConfigPanels/TimePanel.tsx +0 -45
- package/src/components/ConfigPanels/getBrandColors.tsx +0 -31
- package/src/components/ConfigPanels/types.ts +0 -111
- package/src/components/ConfigPanels/useSingleChildValue.tsx +0 -63
- package/src/components/CursorMenu.tsx +0 -286
- package/src/components/Description.tsx +0 -31
- package/src/components/ExtensionApiContext.tsx +0 -24
- package/src/components/ExternalLogin.tsx +0 -190
- package/src/components/Filter.tsx +0 -313
- package/src/components/FormDialog.tsx +0 -503
- package/src/components/Loading.tsx +0 -33
- package/src/components/MenuItemSelect.tsx +0 -88
- package/src/components/OauthPanel.tsx +0 -62
- package/src/components/OauthSelect.tsx +0 -40
- package/src/components/PageInput.tsx +0 -17
- package/src/components/PageLink.tsx +0 -50
- package/src/components/ProgressDialog.tsx +0 -85
- package/src/components/SimpleAlert.tsx +0 -103
- package/src/components/Toast.tsx +0 -85
- package/src/components/index.ts +0 -5
- package/src/components.tsx +0 -242
- package/src/date/constants.ts +0 -19
- package/src/date/parseNlpDate.ts +0 -255
- package/src/date/parseRoamDateUid.ts +0 -6
- package/src/dom/addBlockCommand.ts +0 -59
- package/src/dom/addKeyboardTriggers.ts +0 -52
- package/src/dom/addOldRoamJSDependency.ts +0 -10
- package/src/dom/addRoamJSDependency.ts +0 -7
- package/src/dom/addScriptAsDependency.ts +0 -24
- package/src/dom/addStyle.ts +0 -11
- package/src/dom/constants.ts +0 -1
- package/src/dom/createBlockObserver.ts +0 -44
- package/src/dom/createButtonObserver.ts +0 -31
- package/src/dom/createDivObserver.ts +0 -15
- package/src/dom/createHTMLObserver.ts +0 -44
- package/src/dom/createHashtagObserver.ts +0 -22
- package/src/dom/createIconButton.ts +0 -13
- package/src/dom/createObserver.ts +0 -15
- package/src/dom/createOverlayObserver.ts +0 -7
- package/src/dom/createPageObserver.ts +0 -37
- package/src/dom/createPageTitleObserver.ts +0 -43
- package/src/dom/elToTitle.ts +0 -21
- package/src/dom/genericError.ts +0 -13
- package/src/dom/getActiveUids.ts +0 -6
- package/src/dom/getBlockUidFromTarget.ts +0 -39
- package/src/dom/getCurrentPageUid.ts +0 -5
- package/src/dom/getDomRefs.ts +0 -15
- package/src/dom/getDropUidOffset.ts +0 -36
- package/src/dom/getMutatedNodes.ts +0 -31
- package/src/dom/getPageTitleByHtmlElement.ts +0 -19
- package/src/dom/getPageTitleValueByHtmlElement.ts +0 -8
- package/src/dom/getReferenceBlockUid.ts +0 -22
- package/src/dom/getRoamUrl.ts +0 -6
- package/src/dom/getRoamUrlByPage.ts +0 -9
- package/src/dom/getUids.ts +0 -9
- package/src/dom/getUidsFromButton.ts +0 -9
- package/src/dom/getUidsFromId.ts +0 -13
- package/src/dom/parseRoamBlocksToHtml.ts +0 -118
- package/src/dom/resolveRefs.ts +0 -31
- package/src/events/watchOnce.ts +0 -17
- package/src/hooks/useArrowKeyDown.ts +0 -72
- package/src/hooks/useSubTree.ts +0 -16
- package/src/marked/index.ts +0 -619
- package/src/queries/compileDatalog.ts +0 -81
- package/src/queries/getAllBlockUids.ts +0 -6
- package/src/queries/getAllBlockUidsAndTexts.ts +0 -6
- package/src/queries/getAllPageNames.ts +0 -6
- package/src/queries/getAttributeValueByBlockAndName.ts +0 -23
- package/src/queries/getBasicTreeByParentUid.ts +0 -21
- package/src/queries/getBlockUidAndTextIncludingText.ts +0 -15
- package/src/queries/getBlockUidByTextOnPage.ts +0 -12
- package/src/queries/getBlockUidsAndTextsReferencingPage.ts +0 -18
- package/src/queries/getBlockUidsByPageTitle.ts +0 -12
- package/src/queries/getBlockUidsReferencingBlock.ts +0 -10
- package/src/queries/getBlockUidsReferencingPage.ts +0 -13
- package/src/queries/getBlockUidsWithParentUid.ts +0 -10
- package/src/queries/getChildrenLengthByPageUid.ts +0 -7
- package/src/queries/getChildrenLengthByParentUid.ts +0 -6
- package/src/queries/getCreateTimeByBlockUid.ts +0 -6
- package/src/queries/getCurrentUser.ts +0 -12
- package/src/queries/getCurrentUserDisplayName.ts +0 -9
- package/src/queries/getCurrentUserEmail.ts +0 -12
- package/src/queries/getCurrentUserUid.ts +0 -12
- package/src/queries/getDisplayNameByEmail.ts +0 -6
- package/src/queries/getDisplayNameByUid.ts +0 -6
- package/src/queries/getEditTimeByBlockUid.ts +0 -6
- package/src/queries/getEditedUserEmailByBlockUid.ts +0 -6
- package/src/queries/getFirstChildTextByBlockUid.ts +0 -8
- package/src/queries/getFirstChildUidByBlockUid.ts +0 -6
- package/src/queries/getFullTreeByParentUid.ts +0 -60
- package/src/queries/getLinkedPageTitlesUnderUid.ts +0 -8
- package/src/queries/getNthChildUidByBlockUid.ts +0 -16
- package/src/queries/getOrderByBlockUid.ts +0 -6
- package/src/queries/getPageTitleByBlockUid.ts +0 -8
- package/src/queries/getPageTitleByPageUid.ts +0 -11
- package/src/queries/getPageTitleReferencesByPageTitle.ts +0 -13
- package/src/queries/getPageTitlesAndBlockUidsReferencingPage.ts +0 -18
- package/src/queries/getPageTitlesAndUidsDirectlyReferencingPage.ts +0 -18
- package/src/queries/getPageTitlesReferencingBlockUid.ts +0 -10
- package/src/queries/getPageTitlesStartingWithPrefix.ts +0 -8
- package/src/queries/getPageUidByBlockUid.ts +0 -8
- package/src/queries/getPageUidByPageTitle.ts +0 -10
- package/src/queries/getPageViewType.ts +0 -11
- package/src/queries/getParentTextByBlockUid.ts +0 -6
- package/src/queries/getParentTextByBlockUidAndTag.ts +0 -12
- package/src/queries/getParentUidByBlockUid.ts +0 -10
- package/src/queries/getParentUidsOfBlockUid.ts +0 -10
- package/src/queries/getSettingsByEmail.ts +0 -8
- package/src/queries/getShallowTreeByParentUid.ts +0 -17
- package/src/queries/getTextByBlockUid.ts +0 -8
- package/src/queries/index.ts +0 -5
- package/src/queries/isLiveBlock.ts +0 -4
- package/src/queries/isTagOnPage.ts +0 -12
- package/src/queries/normalizePageTitle.ts +0 -4
- package/src/scripts/index.ts +0 -2
- package/src/scripts/publishToRoamDepot.ts +0 -163
- package/src/testing/mockRoamEnvironment.ts +0 -1489
- package/src/types/index.ts +0 -260
- package/src/types/native.ts +0 -495
- package/src/types/query-builder.ts +0 -10
- package/src/types/smartblocks.ts +0 -39
- package/src/util/addInputSetting.ts +0 -33
- package/src/util/apiDelete.ts +0 -5
- package/src/util/apiGet.ts +0 -5
- package/src/util/apiPost.ts +0 -5
- package/src/util/apiPut.ts +0 -5
- package/src/util/createOverlayRender.ts +0 -12
- package/src/util/createTagRegex.ts +0 -7
- package/src/util/dispatchToRegistry.ts +0 -11
- package/src/util/env.ts +0 -44
- package/src/util/extensionApiContext.ts +0 -17
- package/src/util/extensionDeprecatedWarning.ts +0 -57
- package/src/util/extractRef.ts +0 -8
- package/src/util/extractTag.ts +0 -15
- package/src/util/focusMainWindowBlock.ts +0 -13
- package/src/util/getAuthorizationHeader.ts +0 -11
- package/src/util/getLocalStorageKey.ts +0 -4
- package/src/util/getOauth.ts +0 -57
- package/src/util/getOauthAccounts.ts +0 -26
- package/src/util/getRenderRoot.ts +0 -17
- package/src/util/getSettingIntFromTree.ts +0 -18
- package/src/util/getSettingValueFromTree.ts +0 -23
- package/src/util/getSettingValuesFromTree.ts +0 -20
- package/src/util/getSubTree.ts +0 -31
- package/src/util/getToken.ts +0 -12
- package/src/util/getTokenFromTree.ts +0 -6
- package/src/util/getWorkerClient.ts +0 -55
- package/src/util/handleBodyFetch.ts +0 -38
- package/src/util/handleFetch.ts +0 -70
- package/src/util/handleUrlFetch.ts +0 -30
- package/src/util/idToTitle.ts +0 -8
- package/src/util/isControl.ts +0 -4
- package/src/util/localStorageGet.ts +0 -6
- package/src/util/localStorageRemove.ts +0 -6
- package/src/util/localStorageSet.ts +0 -6
- package/src/util/registerExperimentalMode.ts +0 -76
- package/src/util/registerSmartBlocksCommand.ts +0 -23
- package/src/util/removeFromRegistry.ts +0 -11
- package/src/util/renderOverlay.ts +0 -69
- package/src/util/renderWithUnmount.ts +0 -50
- package/src/util/runExtension.ts +0 -206
- package/src/util/setInputSetting.ts +0 -46
- package/src/util/setInputSettings.ts +0 -37
- package/src/util/stripUid.ts +0 -10
- package/src/util/toConfigPageName.ts +0 -3
- package/src/util/toFlexRegex.ts +0 -7
- package/src/writes/clearBlockById.ts +0 -17
- package/src/writes/clearBlockByUid.ts +0 -16
- package/src/writes/createBlock.ts +0 -50
- package/src/writes/createPage.ts +0 -30
- package/src/writes/deleteBlock.ts +0 -9
- package/src/writes/openBlockInSidebar.ts +0 -13
- package/src/writes/submitActions.ts +0 -54
- package/src/writes/updateActiveBlock.ts +0 -17
- package/src/writes/updateBlock.ts +0 -33
- package/tests/backend.test.tsx +0 -28
- package/tests/date.test.ts +0 -26
- package/tests/dom.test.tsx +0 -10
- package/tests/index.test.tsx +0 -25
- package/tests/marked.test.ts +0 -474
- package/tests/util/createTagRegex.test.ts +0 -63
- package/tests/util/extractTag.test.ts +0 -17
- package/tests/util/toFlexRegex.test.ts +0 -7
- package/tsconfig.json +0 -26
- /package/{src/date/index.ts → date/index.d.ts} +0 -0
- /package/{src/dom/index.ts → dom/index.d.ts} +0 -0
- /package/{src/events/index.ts → events/index.d.ts} +0 -0
- /package/{src/hooks/index.ts → hooks/index.d.ts} +0 -0
- /package/{src/writes/index.ts → writes/index.d.ts} +0 -0
|
@@ -0,0 +1,402 @@
|
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native.js","sourceRoot":"","sources":["../../src/types/native.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,4EAA4E","sourcesContent":["// emulating Datalog Grammar\r\n// https://docs.datomic.com/cloud/query/query-data-reference.html#or-clauses\r\n\r\nimport { ChangeEvent } from \"react\";\r\n\r\nexport type DatalogSrcVar = {\r\n type: \"src-var\";\r\n value: string;\r\n};\r\n\r\nexport type DatalogVariable = {\r\n type: \"variable\";\r\n value: string;\r\n};\r\n\r\nexport type DatalogAndClause = {\r\n type: \"and-clause\";\r\n clauses: DatalogClause[];\r\n};\r\n\r\nexport type DatalogExpressionClause =\r\n | DatalogDataPattern\r\n | DatalogPredExpr\r\n | DatalogFnExpr\r\n | DatalogRuleExpr;\r\n\r\nexport type DatalogRuleExpr = {\r\n type: \"rule-expr\";\r\n srcVar?: DatalogSrcVar;\r\n ruleName: DatalogRuleName;\r\n arguments: DatalogArgument[];\r\n};\r\n\r\nexport type DatalogNotClause = {\r\n type: \"not-clause\";\r\n srcVar?: DatalogSrcVar;\r\n clauses: DatalogClause[];\r\n};\r\n\r\nexport type DatalogNotJoinClause = {\r\n type: \"not-join-clause\";\r\n srcVar?: DatalogSrcVar;\r\n variables: DatalogVariable[];\r\n clauses: DatalogClause[];\r\n};\r\n\r\nexport type DatalogOrClause = {\r\n type: \"or-clause\";\r\n srcVar?: DatalogSrcVar;\r\n clauses: DatalogClause[];\r\n};\r\n\r\nexport type DatalogOrJoinClause = {\r\n type: \"or-join-clause\";\r\n srcVar?: DatalogSrcVar;\r\n variables: DatalogVariable[];\r\n clauses: DatalogClause[];\r\n};\r\n\r\nexport type DatalogClause =\r\n | DatalogNotClause\r\n | DatalogOrJoinClause\r\n | DatalogExpressionClause\r\n | DatalogOrClause\r\n | DatalogNotJoinClause\r\n | DatalogAndClause;\r\n\r\nexport type DatalogDataPattern = {\r\n type: \"data-pattern\";\r\n srcVar?: DatalogSrcVar;\r\n arguments: DatalogArgument[];\r\n};\r\n\r\nexport type DatalogArgument =\r\n | DatalogSrcVar\r\n | DatalogVariable\r\n | DatalogConstant\r\n | DatalogUnderscore;\r\n\r\nexport type DatalogConstant = {\r\n type: \"constant\";\r\n value: string;\r\n};\r\n\r\nexport type DatalogPredExpr = {\r\n type: \"pred-expr\";\r\n pred:\r\n | \"<\"\r\n | \">\"\r\n | \"re-matches\"\r\n | \"re-find\"\r\n | \"clojure.string/includes?\"\r\n | \"clojure.string/ends-with?\"\r\n | \"clojure.string/starts-with?\";\r\n arguments: DatalogArgument[];\r\n};\r\n\r\nexport type DatalogFnExpr = {\r\n type: \"fn-expr\";\r\n fn: \"re-pattern\" | \"get\";\r\n arguments: DatalogArgument[];\r\n binding: DatalogBinding;\r\n};\r\n\r\nexport type DatalogBinding =\r\n | DatalogBindScalar\r\n | DatalogBindTuple\r\n | DatalogBindColl\r\n | DatalogBindRel;\r\n\r\nexport type DatalogBindScalar = {\r\n type: \"bind-scalar\";\r\n variable: DatalogVariable;\r\n};\r\nexport type DatalogBindTuple = {\r\n type: \"bind-tuple\";\r\n args: (DatalogVariable | DatalogUnderscore)[];\r\n};\r\nexport type DatalogBindColl = {\r\n type: \"bind-col\";\r\n variable: DatalogVariable;\r\n};\r\n\r\nexport type DatalogBindRel = {\r\n type: \"bind-rel\";\r\n args: (DatalogVariable | DatalogUnderscore)[];\r\n};\r\n\r\nexport type DatalogUnderscore = {\r\n type: \"underscore\";\r\n value: \"_\";\r\n};\r\n\r\nexport type DatalogRuleName = {\r\n type: \"rulename\";\r\n value: string;\r\n};\r\n\r\nexport type RoamBasicBlock = {\r\n string: string;\r\n uid: string;\r\n};\r\n\r\nexport type RoamBasicPage = { title: string; uid: string };\r\n\r\nexport type RoamBasicNode = {\r\n text: string;\r\n uid: string;\r\n children: RoamBasicNode[];\r\n};\r\n\r\nexport type RoamPull = {\r\n \"block/children\"?: RoamNode[];\r\n \"block/heading\"?: number;\r\n \"block/open\"?: boolean;\r\n \"block/order\"?: number;\r\n \"block/page\"?: RoamNode;\r\n \"block/parents\"?: RoamNode[];\r\n \"block/refs\"?: RoamNode[];\r\n \"block/string\"?: string;\r\n \"block/uid\"?: string;\r\n \"children/view-type\"?: `:${ViewType}`;\r\n \"create/time\"?: number;\r\n \"create/user\"?: RoamNode;\r\n \"edit/time\"?: number;\r\n \"edit/user\"?: RoamNode;\r\n \"log/id\"?: number;\r\n \"node/title\"?: string;\r\n} & RoamNode;\r\n\r\nexport type PullBlock = {\r\n \":attrs/lookup\"?: PullBlock[];\r\n \":entity/attrs\"?: [\r\n { \":source\": [\":block/uid\", string]; \":value\": [\":block/uid\", string] },\r\n { \":source\": [\":block/uid\", string]; \":value\": [\":block/uid\", string] },\r\n {\r\n \":source\": [\":block/uid\", string];\r\n \":value\": string | [\":block/uid\", string];\r\n }\r\n ][];\r\n \":block/children\"?: PullBlock[];\r\n \":block/heading\"?: number;\r\n \":block/open\"?: boolean;\r\n \":block/order\"?: number;\r\n \":block/page\"?: { \":db/id\": number };\r\n \":block/parents\"?: PullBlock[];\r\n \":block/props\"?: {\r\n \":image-size\"?: {\r\n [p: string]: {\r\n \":height\": number;\r\n \":width\": number;\r\n };\r\n };\r\n \":iframe\"?: {\r\n [p: string]: {\r\n \":size\": {\r\n \":height\": number;\r\n \":width\": number;\r\n };\r\n };\r\n };\r\n [k: `:roamjs-${string}`]: Record<string, unknown>;\r\n };\r\n \":block/refs\"?: { \":db/id\": number }[];\r\n \":block/string\"?: string;\r\n \":block/view-type\"?: `:${BlockViewType}`;\r\n \":block/text-align\"?: TextAlignment;\r\n \":block/uid\"?: string;\r\n \":children/view-type\"?: `:${ViewType}`;\r\n \":create/time\"?: number;\r\n \":create/user\"?: { \":db/id\": number };\r\n \":edit/time\"?: number;\r\n \":edit/user\"?: { \":db/id\": number };\r\n \":db/id\"?: number;\r\n \":log/id\"?: number;\r\n \":node/title\"?: string;\r\n \":user/display-name\"?: string;\r\n \":user/display-page\"?: { \":db/id\": number };\r\n \":user/settings\"?: {\r\n \":namespace-options\": [\":none\", \":partial\", \":full\"];\r\n \":link-brackets?\": boolean;\r\n \":showing-inline-references?\": boolean;\r\n \":right-sidebar-pinned\": {\r\n [uuid: string]: SidebarWindow;\r\n };\r\n \":showing-own-icons?\": boolean;\r\n \":showing-user-icons?\": boolean;\r\n \":first-day-of-week\"?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\r\n };\r\n \":user/uid\"?: string;\r\n \":user/email\"?: string;\r\n};\r\n\r\nexport type RoamPullResult = RoamPull | null;\r\n\r\nexport type ViewType = \"document\" | \"bullet\" | \"numbered\";\r\n\r\nexport type BlockViewType =\r\n | \"tabs\"\r\n | \"outline\"\r\n | \"horizontal\"\r\n | \"popout\"\r\n | \"comment\"\r\n | \"side\"\r\n | \"vertical\";\r\n\r\nexport type TextAlignment = \"left\" | \"center\" | \"right\" | \"justify\";\r\n\r\nexport type RoamBlock = {\r\n attrs?: { source: string[] }[][];\r\n children?: { id: number }[];\r\n id?: number;\r\n string?: string;\r\n title?: string;\r\n time?: number;\r\n uid?: string;\r\n order?: number;\r\n \"view-type\"?: ViewType;\r\n};\r\n\r\nexport type RoamError = {\r\n raw: string;\r\n \"status-code\": number;\r\n};\r\n\r\nexport type TreeNode = {\r\n text: string;\r\n order: number;\r\n children: TreeNode[];\r\n parents: number[];\r\n uid: string;\r\n heading: number;\r\n open: boolean;\r\n viewType: ViewType;\r\n editTime: Date;\r\n textAlign: TextAlignment;\r\n props: {\r\n imageResize: {\r\n [link: string]: {\r\n height: number;\r\n width: number;\r\n };\r\n };\r\n iframe: {\r\n [link: string]: {\r\n height: number;\r\n width: number;\r\n };\r\n };\r\n };\r\n};\r\n\r\nexport type TextNode = {\r\n text: string;\r\n children: TextNode[];\r\n};\r\n\r\nexport type InputTextNode = {\r\n text: string;\r\n children?: InputTextNode[];\r\n uid?: string;\r\n heading?: number;\r\n textAlign?: TextAlignment;\r\n viewType?: ViewType;\r\n open?: boolean;\r\n props?: Record<string, unknown>;\r\n};\r\n\r\ntype PlusType = [number, string];\r\n\r\nexport type RoamNode = { \"db/id\": number };\r\n\r\nexport type RoamQuery = RoamPull & {\r\n \"block/graph\"?: RoamNode;\r\n \"node/graph+title\"?: PlusType;\r\n \"block/graph+uid\"?: PlusType;\r\n \"node/graph\"?: RoamNode;\r\n \"edit/email\"?: string;\r\n \"entity/graph\"?: RoamNode;\r\n};\r\n\r\nexport type RoamQueryResult = number & RoamQuery;\r\n\r\nexport type ClientParams = {\r\n action:\r\n | \"pull\"\r\n | \"q\"\r\n | \"create-block\"\r\n | \"update-block\"\r\n | \"create-page\"\r\n | \"move-block\"\r\n | \"delete-block\"\r\n | \"delete-page\"\r\n | \"update-page\";\r\n selector?: string;\r\n uid?: string;\r\n query?: string;\r\n inputs?: string[];\r\n} & ActionParams;\r\n\r\nexport type ActionParams = {\r\n location?: {\r\n \"parent-uid\": string;\r\n order: number | \"last\";\r\n };\r\n block?: {\r\n string?: string;\r\n uid?: string;\r\n open?: boolean;\r\n heading?: number;\r\n \"text-align\"?: TextAlignment;\r\n \"children-view-type\"?: ViewType;\r\n props?: Record<string, unknown>;\r\n };\r\n page?: {\r\n title?: string;\r\n uid?: string;\r\n };\r\n};\r\n\r\nexport type WriteAction = (a: ActionParams) => Promise<void>;\r\n\r\nexport type UserSettings = {\r\n \"global-filters\": {\r\n includes: string[];\r\n removes: string[];\r\n };\r\n};\r\n\r\ntype SidebarWindowType =\r\n | SidebarBlockWindow\r\n | SidebarMentionsWindow\r\n | SidebarGraphWindow\r\n | SidebarOutlineWindow;\r\n\r\nexport type SidebarWindowInput = {\r\n \"block-uid\": string;\r\n type: SidebarWindowType[\"type\"];\r\n};\r\n\r\ntype SidebarBlockWindow = {\r\n type: \"block\";\r\n \"block-uid\": string;\r\n};\r\n\r\ntype SidebarOutlineWindow = {\r\n type: \"outline\";\r\n \"page-uid\": string;\r\n};\r\n\r\ntype SidebarMentionsWindow = {\r\n type: \"mentions\";\r\n \"mentions-uid\": string;\r\n};\r\n\r\ntype SidebarGraphWindow = {\r\n type: \"graph\";\r\n // \"page-uid\": string; Currently not working despite documentation\r\n \"block-uid\": string;\r\n};\r\n\r\nexport type SidebarAction = (action: {\r\n window: SidebarWindowInput;\r\n}) => Promise<void>;\r\n\r\nexport type SidebarWindow = {\r\n \"collapsed?\": boolean;\r\n order: number;\r\n \"pinned?\": boolean;\r\n \"window-id\": string;\r\n} & SidebarWindowType;\r\n\r\nexport type AddPullWatch = (\r\n pullPattern: string,\r\n entityId: string,\r\n callback: (before: PullBlock | null, after: PullBlock | null) => void\r\n) => boolean;\r\n\r\ntype ButtonAction = {\r\n type: \"button\";\r\n onClick?: (e: MouseEvent) => void;\r\n content: string;\r\n};\r\n\r\ntype SwitchAction = {\r\n type: \"switch\";\r\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\r\n};\r\n\r\ntype InputAction = {\r\n type: \"input\";\r\n placeholder: string;\r\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\r\n};\r\n\r\ntype SelectAction = {\r\n type: \"select\";\r\n items: string[];\r\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\r\n};\r\n\r\ntype CustomAction = {\r\n type: \"reactComponent\";\r\n component: React.FC;\r\n};\r\n\r\nexport type Action =\r\n | ButtonAction\r\n | SwitchAction\r\n | InputAction\r\n | SelectAction\r\n | CustomAction;\r\n\r\ntype PanelConfig = {\r\n tabTitle: string;\r\n settings: {\r\n id: string;\r\n name: string;\r\n description: string;\r\n action: Action;\r\n }[];\r\n};\r\n\r\nexport type AddCommandOptions = {\r\n label: string;\r\n callback: () => void;\r\n disableHotkey?: boolean;\r\n defaultHotkey?: string | string[];\r\n};\r\n\r\ntype RemoveCommandOptions = {\r\n label: string;\r\n};\r\n\r\nexport type OnloadArgs = {\r\n extensionAPI: {\r\n settings: {\r\n get: (k: string) => unknown;\r\n getAll: () => Record<string, unknown>;\r\n panel: {\r\n create: (c: PanelConfig) => void;\r\n };\r\n set: (k: string, v: unknown) => Promise<void>;\r\n };\r\n ui: {\r\n commandPalette: {\r\n addCommand: (c: AddCommandOptions) => Promise<void>;\r\n removeCommand: (c: RemoveCommandOptions) => Promise<void>;\r\n };\r\n };\r\n };\r\n extension: {\r\n version: string;\r\n };\r\n};\r\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
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<\r\n `${string}-uid`,\r\n string\r\n> &\r\n Record<string, string | number | Date>;\r\n\r\nexport type RunQuery = (parentUid: string) => Promise<Result[]>;\r\nexport type RunQuerySync = (parentUid: string) => Result[];\r\nexport type ListActiveQueries = () => { uid: string }[];\r\nexport type IsDiscourseNode = (uid: string) => boolean;\r\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smartblocks.js","sourceRoot":"","sources":["../../src/types/smartblocks.ts"],"names":[],"mappings":"","sourcesContent":["import { InputTextNode } from \"./native\";\r\n\r\ntype CommandOutput = string | string[] | InputTextNode[];\r\nexport type CommandHandler = (\r\n ...args: string[]\r\n) => CommandOutput | Promise<CommandOutput>;\r\n\r\nexport type SmartBlocksContext = {\r\n onBlockExit: CommandHandler;\r\n targetUid: string;\r\n triggerUid: string;\r\n ifCommand?: boolean;\r\n exitBlock: \"yes\" | \"no\" | \"end\" | \"empty\" | \"childless\";\r\n exitWorkflow: boolean;\r\n variables: Record<string, string>;\r\n cursorPosition?: { uid: string; selection: number };\r\n currentUid?: string;\r\n currentContent: string;\r\n indent: Set<string>;\r\n unindent: Set<string>;\r\n focusOnBlock?: string;\r\n dateBasisMethod?: string;\r\n refMapping: Record<string, string>;\r\n afterWorkflowMethods: (() => void | Promise<void>)[];\r\n};\r\n\r\nexport type RegisterCommand = (args: {\r\n text: string;\r\n help?: string;\r\n handler: (\r\n c: Pick<SmartBlocksContext, \"targetUid\" | \"variables\"> & {\r\n proccessBlockText: (s: string) => Promise<InputTextNode[]>;\r\n processBlock: (s: InputTextNode) => Promise<InputTextNode[]>;\r\n }\r\n ) => CommandHandler;\r\n delayArgs?: true;\r\n}) => () => void;\r\n\r\nexport type UnregisterCommand = (t: string) => void;\r\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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\";\r\nimport createBlock from \"../writes/createBlock\";\r\nimport toFlexRegex from \"./toFlexRegex\";\r\n\r\nconst addInputSetting = ({\r\n blockUid,\r\n value,\r\n key,\r\n index = 0,\r\n}: {\r\n blockUid: string;\r\n value: string;\r\n key: string;\r\n index?: number;\r\n}): Promise<string> => {\r\n const tree = getBasicTreeByParentUid(blockUid);\r\n const keyNode = tree.find((t) => toFlexRegex(key).test(t.text));\r\n if (keyNode) {\r\n return createBlock({\r\n node: { text: value },\r\n order: keyNode.children.length,\r\n parentUid: keyNode.uid,\r\n });\r\n } else {\r\n return createBlock({\r\n parentUid: blockUid,\r\n order: index,\r\n node: { text: key, children: [{ text: value }] },\r\n });\r\n }\r\n};\r\n\r\nexport default addInputSetting;\r\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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\";\r\n\r\nconst apiDelete = handleUrlFetch(\"DELETE\");\r\n\r\nexport default apiDelete;\r\n"]}
|
package/util/apiGet.d.ts
ADDED
package/util/apiGet.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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\";\r\n\r\nconst apiGet = handleUrlFetch(\"GET\");\r\n\r\nexport default apiGet;\r\n"]}
|
package/util/apiPost.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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\";\r\n\r\nconst apiPost = handleBodyFetch(\"POST\");\r\n\r\nexport default apiPost;\r\n"]}
|
package/util/apiPut.d.ts
ADDED
package/util/apiPut.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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\";\r\n\r\nconst apiPut = handleBodyFetch(\"PUT\")\r\n\r\nexport default apiPut;\r\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
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;
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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\";\r\nimport renderOverlay, { RoamOverlayProps } from \"./renderOverlay\";\r\n\r\nconst createOverlayRender =\r\n <T extends Record<string, unknown>>(\r\n id: string,\r\n Overlay: (props: RoamOverlayProps<T>) => React.ReactElement\r\n ) =>\r\n (props: T) =>\r\n renderOverlay<T>({ id, Overlay, props });\r\n\r\nexport default createOverlayRender;\r\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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 => {\r\n const escapedTitle = title.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\r\n return new RegExp(\r\n `(?:#\\\\[\\\\[${escapedTitle}\\\\]\\\\]|#${escapedTitle}(?!\\\\w)|\\\\[\\\\[${escapedTitle}\\\\]\\\\])`\r\n );\r\n};\r\nexport default createTagRegex;\r\n"]}
|