roamjs-components 0.53.2 → 0.53.5
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/LICENSE +21 -21
- package/README.md +154 -154
- package/backend/emailCatch.d.ts +4 -4
- package/backend/emailCatch.js +11 -11
- package/backend/emailError.d.ts +4 -4
- package/backend/emailError.js +56 -56
- package/backend/getRoamJSUser.d.ts +11 -11
- package/backend/getRoamJSUser.js +30 -30
- package/backend/headers.d.ts +5 -5
- package/backend/headers.js +7 -7
- package/backend/index.d.ts +6 -6
- package/backend/index.js +20 -20
- package/backend/meterRoamJSUser.d.ts +4 -4
- package/backend/meterRoamJSUser.js +14 -14
- package/backend/putRoamJSUser.d.ts +10 -10
- package/backend/putRoamJSUser.js +25 -25
- package/components/BlockErrorBoundary.d.ts +15 -15
- package/components/BlockErrorBoundary.js +27 -27
- package/components/BlockInput.d.ts +12 -12
- package/components/BlockInput.js +53 -53
- package/components/ComponentContainer.d.ts +9 -9
- package/components/ComponentContainer.js +46 -46
- package/components/ConfigPage.d.ts +99 -99
- package/components/ConfigPage.js +751 -751
- package/components/CursorMenu.d.ts +21 -21
- package/components/CursorMenu.js +181 -181
- package/components/Description.d.ts +5 -5
- package/components/Description.js +16 -16
- package/components/ExternalLogin.d.ts +18 -18
- package/components/ExternalLogin.js +131 -131
- package/components/Filter.d.ts +14 -14
- package/components/Filter.js +147 -147
- package/components/Loading.d.ts +4 -4
- package/components/Loading.js +33 -33
- package/components/MenuItemSelect.d.ts +10 -10
- package/components/MenuItemSelect.js +13 -13
- package/components/OauthSelect.d.ts +5 -5
- package/components/OauthSelect.js +25 -25
- package/components/PageInput.d.ts +10 -10
- package/components/PageInput.js +69 -69
- package/components/ServiceComponents.d.ts +49 -49
- package/components/ServiceComponents.js +277 -277
- package/components/SimpleAlert.d.ts +12 -12
- package/components/SimpleAlert.js +38 -38
- package/components/Toast.d.ts +10 -10
- package/components/Toast.js +41 -41
- package/components/TokenDialog.d.ts +11 -11
- package/components/TokenDialog.js +100 -100
- package/components/index.d.ts +15 -15
- package/components/index.js +60 -60
- package/date/constants.d.ts +2 -2
- package/date/constants.js +5 -5
- package/date/index.d.ts +5 -5
- package/date/index.js +13 -13
- package/date/parseRoamDate.d.ts +2 -2
- package/date/parseRoamDate.js +6 -6
- package/date/parseRoamDateUid.d.ts +2 -2
- package/date/parseRoamDateUid.js +6 -6
- package/date/toRoamDate.d.ts +2 -2
- package/date/toRoamDate.js +6 -6
- package/date/toRoamDateUid.d.ts +2 -2
- package/date/toRoamDateUid.js +6 -6
- package/dom/addBlockCommand.d.ts +5 -5
- package/dom/addBlockCommand.js +53 -53
- package/dom/addOldRoamJSDependency.d.ts +2 -2
- package/dom/addOldRoamJSDependency.js +10 -10
- package/dom/addRoamJSDependency.d.ts +2 -2
- package/dom/addRoamJSDependency.js +8 -8
- package/dom/addScriptAsDependency.d.ts +6 -6
- package/dom/addScriptAsDependency.js +16 -16
- package/dom/addStyle.d.ts +2 -2
- package/dom/addStyle.js +14 -14
- package/dom/constants.d.ts +1 -1
- package/dom/constants.js +4 -4
- package/dom/createBlockObserver.d.ts +7 -7
- package/dom/createBlockObserver.js +43 -43
- package/dom/createButtonObserver.d.ts +6 -6
- package/dom/createButtonObserver.js +21 -21
- package/dom/createDivObserver.d.ts +2 -2
- package/dom/createDivObserver.js +8 -8
- package/dom/createHTMLObserver.d.ts +8 -8
- package/dom/createHTMLObserver.js +24 -24
- package/dom/createHashtagObserver.d.ts +5 -5
- package/dom/createHashtagObserver.js +16 -16
- package/dom/createIconButton.d.ts +2 -2
- package/dom/createIconButton.js +12 -12
- package/dom/createObserver.d.ts +2 -2
- package/dom/createObserver.js +6 -6
- package/dom/createOverlayObserver.d.ts +2 -2
- package/dom/createOverlayObserver.js +6 -6
- package/dom/createPageObserver.d.ts +2 -2
- package/dom/createPageObserver.js +34 -34
- package/dom/createPageTitleObserver.d.ts +6 -6
- package/dom/createPageTitleObserver.js +29 -29
- package/dom/genericError.d.ts +4 -4
- package/dom/genericError.js +16 -16
- package/dom/getActiveUids.d.ts +3 -3
- package/dom/getActiveUids.js +6 -6
- package/dom/getBlockUidFromTarget.d.ts +2 -2
- package/dom/getBlockUidFromTarget.js +33 -33
- package/dom/getCurrentPageUid.d.ts +2 -2
- package/dom/getCurrentPageUid.js +6 -6
- package/dom/getDomRefs.d.ts +2 -2
- package/dom/getDomRefs.js +12 -12
- package/dom/getDropUidOffset.d.ts +5 -5
- package/dom/getDropUidOffset.js +27 -27
- package/dom/getMutatedNodes.d.ts +7 -7
- package/dom/getMutatedNodes.js +11 -11
- package/dom/getPageTitleByHtmlElement.d.ts +2 -2
- package/dom/getPageTitleByHtmlElement.js +12 -12
- package/dom/getPageTitleValueByHtmlElement.d.ts +2 -2
- package/dom/getPageTitleValueByHtmlElement.js +27 -27
- package/dom/getReferenceBlockUid.d.ts +2 -2
- package/dom/getReferenceBlockUid.js +18 -18
- package/dom/getRoamUrl.d.ts +2 -2
- package/dom/getRoamUrl.js +4 -4
- package/dom/getRoamUrlByPage.d.ts +2 -2
- package/dom/getRoamUrlByPage.js +10 -10
- package/dom/getUids.d.ts +3 -3
- package/dom/getUids.js +8 -8
- package/dom/getUidsFromButton.d.ts +3 -3
- package/dom/getUidsFromButton.js +9 -9
- package/dom/getUidsFromId.d.ts +5 -5
- package/dom/getUidsFromId.js +15 -15
- package/dom/index.d.ts +31 -31
- package/dom/index.js +65 -65
- package/dom/openBlock.d.ts +2 -2
- package/dom/openBlock.js +6 -6
- package/dom/openBlockElement.d.ts +2 -2
- package/dom/openBlockElement.js +16 -16
- package/dom/parseRoamBlocksToHtml.d.ts +9 -9
- package/dom/parseRoamBlocksToHtml.js +75 -75
- package/dom/resolveRefs.d.ts +2 -2
- package/dom/resolveRefs.js +24 -24
- package/events/index.d.ts +1 -1
- package/events/index.js +8 -8
- package/events/watchOnce.d.ts +3 -3
- package/events/watchOnce.js +11 -11
- package/hooks/index.d.ts +3 -3
- package/hooks/index.js +12 -12
- package/hooks/useArrowKeyDown.d.ts +8 -8
- package/hooks/useArrowKeyDown.js +31 -31
- package/hooks/useRoamJSTokenWarning.d.ts +2 -2
- package/hooks/useRoamJSTokenWarning.js +11 -11
- package/hooks/useSubTree.d.ts +3 -3
- package/hooks/useSubTree.js +11 -11
- package/index.d.ts +11 -11
- package/index.js +14 -14
- package/marked/index.d.ts +14 -14
- package/marked/index.js +518 -518
- package/package.json +86 -86
- package/queries/getAllBlockUids.d.ts +2 -2
- package/queries/getAllBlockUids.js +6 -6
- package/queries/getAllBlockUidsAndTexts.d.ts +5 -5
- package/queries/getAllBlockUidsAndTexts.js +6 -6
- package/queries/getAllPageNames.d.ts +2 -2
- package/queries/getAllPageNames.js +6 -6
- package/queries/getAttributeValueByBlockAndName.d.ts +5 -5
- package/queries/getAttributeValueByBlockAndName.js +11 -11
- package/queries/getBasicTreeByParentUid.d.ts +3 -3
- package/queries/getBasicTreeByParentUid.js +13 -13
- package/queries/getBlockUidAndTextIncludingText.d.ts +5 -5
- package/queries/getBlockUidAndTextIncludingText.js +6 -6
- package/queries/getBlockUidByTextOnPage.d.ts +5 -5
- package/queries/getBlockUidByTextOnPage.js +7 -7
- package/queries/getBlockUidsAndTextsReferencingPage.d.ts +5 -5
- package/queries/getBlockUidsAndTextsReferencingPage.js +11 -11
- package/queries/getBlockUidsByPageTitle.d.ts +2 -2
- package/queries/getBlockUidsByPageTitle.js +8 -8
- package/queries/getBlockUidsReferencingBlock.d.ts +2 -2
- package/queries/getBlockUidsReferencingBlock.js +6 -6
- package/queries/getBlockUidsReferencingPage.d.ts +2 -2
- package/queries/getBlockUidsReferencingPage.js +8 -8
- package/queries/getBlockUidsWithParentUid.d.ts +2 -2
- package/queries/getBlockUidsWithParentUid.js +6 -6
- package/queries/getChildrenLengthByPageUid.d.ts +2 -2
- package/queries/getChildrenLengthByPageUid.js +4 -4
- package/queries/getCreateTimeByBlockUid.d.ts +2 -2
- package/queries/getCreateTimeByBlockUid.js +7 -7
- package/queries/getCurrentUser.d.ts +2 -2
- package/queries/getCurrentUser.js +11 -11
- package/queries/getCurrentUserDisplayName.d.ts +2 -2
- package/queries/getCurrentUserDisplayName.js +13 -13
- package/queries/getCurrentUserEmail.d.ts +2 -2
- package/queries/getCurrentUserEmail.js +13 -13
- package/queries/getCurrentUserUid.d.ts +2 -2
- package/queries/getCurrentUserUid.js +13 -13
- package/queries/getDisplayNameByEmail.d.ts +2 -2
- package/queries/getDisplayNameByEmail.js +7 -7
- package/queries/getDisplayNameByUid.d.ts +2 -2
- package/queries/getDisplayNameByUid.js +7 -7
- package/queries/getEditTimeByBlockUid.d.ts +2 -2
- package/queries/getEditTimeByBlockUid.js +7 -7
- package/queries/getEditedUserEmailByBlockUid.d.ts +2 -2
- package/queries/getEditedUserEmailByBlockUid.js +7 -7
- package/queries/getFirstChildTextByBlockUid.d.ts +2 -2
- package/queries/getFirstChildTextByBlockUid.js +7 -7
- package/queries/getFirstChildUidByBlockUid.d.ts +2 -2
- package/queries/getFirstChildUidByBlockUid.js +5 -5
- package/queries/getFullTreeByParentUid.d.ts +3 -3
- package/queries/getFullTreeByParentUid.js +26 -26
- package/queries/getLinkedPageTitlesUnderUid.d.ts +2 -2
- package/queries/getLinkedPageTitlesUnderUid.js +6 -6
- package/queries/getNthChildUidByBlockUid.d.ts +5 -5
- package/queries/getNthChildUidByBlockUid.js +7 -7
- package/queries/getOrderByBlockUid.d.ts +2 -2
- package/queries/getOrderByBlockUid.js +7 -7
- package/queries/getPageTitleByBlockUid.d.ts +2 -2
- package/queries/getPageTitleByBlockUid.js +7 -7
- package/queries/getPageTitleByPageUid.d.ts +2 -2
- package/queries/getPageTitleByPageUid.js +9 -9
- package/queries/getPageTitleReferencesByPageTitle.d.ts +2 -2
- package/queries/getPageTitleReferencesByPageTitle.js +8 -8
- package/queries/getPageTitlesAndBlockUidsReferencingPage.d.ts +5 -5
- package/queries/getPageTitlesAndBlockUidsReferencingPage.js +8 -8
- package/queries/getPageTitlesAndUidsDirectlyReferencingPage.d.ts +5 -5
- package/queries/getPageTitlesAndUidsDirectlyReferencingPage.js +8 -8
- package/queries/getPageTitlesReferencingBlockUid.d.ts +2 -2
- package/queries/getPageTitlesReferencingBlockUid.js +6 -6
- package/queries/getPageTitlesStartingWithPrefix.d.ts +2 -2
- package/queries/getPageTitlesStartingWithPrefix.js +6 -6
- package/queries/getPageUidByPageTitle.d.ts +2 -2
- package/queries/getPageUidByPageTitle.js +9 -9
- package/queries/getPageViewType.d.ts +3 -3
- package/queries/getPageViewType.js +9 -9
- package/queries/getParentTextByBlockUid.d.ts +2 -2
- package/queries/getParentTextByBlockUid.js +7 -7
- package/queries/getParentTextByBlockUidAndTag.d.ts +5 -5
- package/queries/getParentTextByBlockUidAndTag.js +7 -7
- package/queries/getParentUidByBlockUid.d.ts +2 -2
- package/queries/getParentUidByBlockUid.js +7 -7
- package/queries/getParentUidsOfBlockUid.d.ts +2 -2
- package/queries/getParentUidsOfBlockUid.js +6 -6
- package/queries/getSettingsByEmail.d.ts +3 -3
- package/queries/getSettingsByEmail.js +7 -7
- package/queries/getShallowTreeByParentUid.d.ts +5 -5
- package/queries/getShallowTreeByParentUid.js +10 -10
- package/queries/getTextByBlockUid.d.ts +2 -2
- package/queries/getTextByBlockUid.js +7 -7
- package/queries/index.d.ts +45 -45
- package/queries/index.js +96 -96
- package/queries/isTagOnPage.d.ts +5 -5
- package/queries/isTagOnPage.js +9 -9
- package/queries/normalizePageTitle.d.ts +2 -2
- package/queries/normalizePageTitle.js +4 -4
- package/types/index.d.ts +461 -459
- package/types/index.js +2 -2
- package/types/query-builder.d.ts +16 -16
- package/types/query-builder.js +2 -2
- package/util/addInputSetting.d.ts +7 -7
- package/util/addInputSetting.js +25 -25
- package/util/apiDelete.d.ts +2 -2
- package/util/apiDelete.js +9 -9
- package/util/apiGet.d.ts +2 -2
- package/util/apiGet.js +9 -9
- package/util/apiPost.d.ts +2 -2
- package/util/apiPost.js +9 -9
- package/util/apiPut.d.ts +2 -2
- package/util/apiPut.js +9 -9
- package/util/createOverlayRender.d.ts +6 -6
- package/util/createOverlayRender.js +18 -18
- package/util/createTagRegex.d.ts +2 -2
- package/util/createTagRegex.js +4 -4
- package/util/extractRef.d.ts +2 -2
- package/util/extractRef.js +8 -8
- package/util/extractTag.d.ts +2 -2
- package/util/extractTag.js +12 -12
- package/util/getAuthorizationHeader.d.ts +2 -2
- package/util/getAuthorizationHeader.js +12 -12
- package/util/getGraph.d.ts +2 -2
- package/util/getGraph.js +8 -8
- package/util/getLocalStorageKey.d.ts +2 -2
- package/util/getLocalStorageKey.js +6 -6
- package/util/getOauth.d.ts +2 -2
- package/util/getOauth.js +50 -50
- package/util/getOauthAccounts.d.ts +2 -2
- package/util/getOauthAccounts.js +21 -21
- package/util/getRenderRoot.d.ts +2 -2
- package/util/getRenderRoot.js +11 -11
- package/util/getSettingIntFromTree.d.ts +7 -7
- package/util/getSettingIntFromTree.js +11 -11
- package/util/getSettingValueFromTree.d.ts +7 -7
- package/util/getSettingValueFromTree.js +13 -13
- package/util/getSettingValuesFromTree.d.ts +7 -7
- package/util/getSettingValuesFromTree.js +12 -12
- package/util/getSubTree.d.ts +8 -8
- package/util/getSubTree.js +19 -19
- package/util/getToken.d.ts +2 -2
- package/util/getToken.js +9 -9
- package/util/getTokenFromTree.d.ts +2 -2
- package/util/getTokenFromTree.js +5 -5
- package/util/idToTitle.d.ts +2 -2
- package/util/idToTitle.js +8 -8
- package/util/index.d.ts +23 -23
- package/util/index.js +52 -52
- package/util/isControl.d.ts +2 -2
- package/util/isControl.js +6 -6
- package/util/localStorageGet.d.ts +2 -2
- package/util/localStorageGet.js +8 -8
- package/util/localStorageRemove.d.ts +2 -2
- package/util/localStorageRemove.js +6 -6
- package/util/localStorageSet.d.ts +2 -2
- package/util/localStorageSet.js +8 -8
- package/util/registerSmartBlocksCommand.d.ts +8 -8
- package/util/registerSmartBlocksCommand.js +24 -24
- package/util/runExtension.d.ts +4 -4
- package/util/runExtension.js +40 -40
- package/util/setInputSetting.d.ts +7 -7
- package/util/setInputSetting.js +33 -33
- package/util/setInputSettings.d.ts +7 -7
- package/util/setInputSettings.js +28 -28
- package/util/toConfigPageName.d.ts +2 -2
- package/util/toConfigPageName.js +4 -4
- package/util/toFlexRegex.d.ts +2 -2
- package/util/toFlexRegex.js +4 -4
- package/writes/clearBlockById.d.ts +2 -2
- package/writes/clearBlockById.js +11 -11
- package/writes/clearBlockByUid.d.ts +2 -2
- package/writes/clearBlockByUid.js +9 -9
- package/writes/createBlock.d.ts +9 -9
- package/writes/createBlock.js +61 -61
- package/writes/createPage.d.ts +7 -7
- package/writes/createPage.js +18 -18
- package/writes/deleteBlock.d.ts +2 -2
- package/writes/deleteBlock.js +6 -6
- package/writes/index.d.ts +8 -8
- package/writes/index.js +22 -22
- package/writes/openBlockInSidebar.d.ts +2 -2
- package/writes/openBlockInSidebar.js +13 -13
- package/writes/updateActiveBlock.d.ts +2 -2
- package/writes/updateActiveBlock.js +11 -11
- package/writes/updateBlock.d.ts +5 -5
- package/writes/updateBlock.js +17 -17
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const getCurrentUser_1 = (0, tslib_1.__importDefault)(require("./getCurrentUser"));
|
|
5
|
-
const getCurrentUserEmail = () => {
|
|
6
|
-
const userArray = (0, getCurrentUser_1.default)();
|
|
7
|
-
const emailIndex = userArray.findIndex((s) => s === "~:email");
|
|
8
|
-
if (emailIndex > 0) {
|
|
9
|
-
return userArray[emailIndex + 1];
|
|
10
|
-
}
|
|
11
|
-
return "";
|
|
12
|
-
};
|
|
13
|
-
exports.default = getCurrentUserEmail;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const getCurrentUser_1 = (0, tslib_1.__importDefault)(require("./getCurrentUser"));
|
|
5
|
+
const getCurrentUserEmail = () => {
|
|
6
|
+
const userArray = (0, getCurrentUser_1.default)();
|
|
7
|
+
const emailIndex = userArray.findIndex((s) => s === "~:email");
|
|
8
|
+
if (emailIndex > 0) {
|
|
9
|
+
return userArray[emailIndex + 1];
|
|
10
|
+
}
|
|
11
|
+
return "";
|
|
12
|
+
};
|
|
13
|
+
exports.default = getCurrentUserEmail;
|
|
14
14
|
//# sourceMappingURL=getCurrentUserEmail.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getCurrentUserUid: () => string;
|
|
2
|
-
export default getCurrentUserUid;
|
|
1
|
+
declare const getCurrentUserUid: () => string;
|
|
2
|
+
export default getCurrentUserUid;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const getCurrentUser_1 = (0, tslib_1.__importDefault)(require("./getCurrentUser"));
|
|
5
|
-
const getCurrentUserUid = () => {
|
|
6
|
-
const userArray = (0, getCurrentUser_1.default)();
|
|
7
|
-
const uidIndex = userArray.findIndex((s) => s === "~:uid");
|
|
8
|
-
if (uidIndex > 0) {
|
|
9
|
-
return userArray[uidIndex + 1];
|
|
10
|
-
}
|
|
11
|
-
return "";
|
|
12
|
-
};
|
|
13
|
-
exports.default = getCurrentUserUid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const getCurrentUser_1 = (0, tslib_1.__importDefault)(require("./getCurrentUser"));
|
|
5
|
+
const getCurrentUserUid = () => {
|
|
6
|
+
const userArray = (0, getCurrentUser_1.default)();
|
|
7
|
+
const uidIndex = userArray.findIndex((s) => s === "~:uid");
|
|
8
|
+
if (uidIndex > 0) {
|
|
9
|
+
return userArray[uidIndex + 1];
|
|
10
|
+
}
|
|
11
|
+
return "";
|
|
12
|
+
};
|
|
13
|
+
exports.default = getCurrentUserUid;
|
|
14
14
|
//# sourceMappingURL=getCurrentUserUid.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getDisplayNameByEmail: (email: string) => string;
|
|
2
|
-
export default getDisplayNameByEmail;
|
|
1
|
+
declare const getDisplayNameByEmail: (email: string) => string;
|
|
2
|
+
export default getDisplayNameByEmail;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getDisplayNameByEmail = (email) => {
|
|
4
|
-
var _a, _b;
|
|
5
|
-
return ((_b = (_a = window.roamAlphaAPI.q(`[:find ?name :where[?e :user/display-name ?name] [?e :user/email "${email}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || "";
|
|
6
|
-
};
|
|
7
|
-
exports.default = getDisplayNameByEmail;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getDisplayNameByEmail = (email) => {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
return ((_b = (_a = window.roamAlphaAPI.q(`[:find ?name :where[?e :user/display-name ?name] [?e :user/email "${email}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || "";
|
|
6
|
+
};
|
|
7
|
+
exports.default = getDisplayNameByEmail;
|
|
8
8
|
//# sourceMappingURL=getDisplayNameByEmail.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getDisplayNameByUid: (uid: string) => string;
|
|
2
|
-
export default getDisplayNameByUid;
|
|
1
|
+
declare const getDisplayNameByUid: (uid: string) => string;
|
|
2
|
+
export default getDisplayNameByUid;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getDisplayNameByUid = (uid) => {
|
|
4
|
-
var _a, _b;
|
|
5
|
-
return ((_b = (_a = window.roamAlphaAPI.q(`[:find ?s :where [?p :node/title ?s] [?e :user/display-page ?p] [?e :user/uid "${uid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || "";
|
|
6
|
-
};
|
|
7
|
-
exports.default = getDisplayNameByUid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getDisplayNameByUid = (uid) => {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
return ((_b = (_a = window.roamAlphaAPI.q(`[:find ?s :where [?p :node/title ?s] [?e :user/display-page ?p] [?e :user/uid "${uid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || "";
|
|
6
|
+
};
|
|
7
|
+
exports.default = getDisplayNameByUid;
|
|
8
8
|
//# sourceMappingURL=getDisplayNameByUid.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getEditTimeByBlockUid: (uid: string) => number;
|
|
2
|
-
export default getEditTimeByBlockUid;
|
|
1
|
+
declare const getEditTimeByBlockUid: (uid: string) => number;
|
|
2
|
+
export default getEditTimeByBlockUid;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getEditTimeByBlockUid = (uid) => {
|
|
4
|
-
var _a, _b;
|
|
5
|
-
return (_b = (_a = window.roamAlphaAPI.q(`[:find ?t :where [?e :edit/time ?t] [?e :block/uid "${uid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0];
|
|
6
|
-
};
|
|
7
|
-
exports.default = getEditTimeByBlockUid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getEditTimeByBlockUid = (uid) => {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
return (_b = (_a = window.roamAlphaAPI.q(`[:find ?t :where [?e :edit/time ?t] [?e :block/uid "${uid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0];
|
|
6
|
+
};
|
|
7
|
+
exports.default = getEditTimeByBlockUid;
|
|
8
8
|
//# sourceMappingURL=getEditTimeByBlockUid.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getEditedUserEmailByBlockUid: (blockUid: string) => string;
|
|
2
|
-
export default getEditedUserEmailByBlockUid;
|
|
1
|
+
declare const getEditedUserEmailByBlockUid: (blockUid: string) => string;
|
|
2
|
+
export default getEditedUserEmailByBlockUid;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getEditedUserEmailByBlockUid = (blockUid) => {
|
|
4
|
-
var _a, _b;
|
|
5
|
-
return ((_b = (_a = window.roamAlphaAPI.q(`[:find ?e :where [?u :user/email ?e] [?b :edit/user ?u] [?b :block/uid "${blockUid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || "";
|
|
6
|
-
};
|
|
7
|
-
exports.default = getEditedUserEmailByBlockUid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getEditedUserEmailByBlockUid = (blockUid) => {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
return ((_b = (_a = window.roamAlphaAPI.q(`[:find ?e :where [?u :user/email ?e] [?b :edit/user ?u] [?b :block/uid "${blockUid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || "";
|
|
6
|
+
};
|
|
7
|
+
exports.default = getEditedUserEmailByBlockUid;
|
|
8
8
|
//# sourceMappingURL=getEditedUserEmailByBlockUid.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getFirstChildTextByBlockUid: (blockUid: string) => string;
|
|
2
|
-
export default getFirstChildTextByBlockUid;
|
|
1
|
+
declare const getFirstChildTextByBlockUid: (blockUid: string) => string;
|
|
2
|
+
export default getFirstChildTextByBlockUid;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getFirstChildTextByBlockUid = (blockUid) => {
|
|
4
|
-
var _a, _b;
|
|
5
|
-
return (_b = (_a = window.roamAlphaAPI.q(`[:find ?s :where [?c :block/string ?s] [?c :block/order 0] [?p :block/children ?c] [?p :block/uid "${blockUid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0];
|
|
6
|
-
};
|
|
7
|
-
exports.default = getFirstChildTextByBlockUid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getFirstChildTextByBlockUid = (blockUid) => {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
return (_b = (_a = window.roamAlphaAPI.q(`[:find ?s :where [?c :block/string ?s] [?c :block/order 0] [?p :block/children ?c] [?p :block/uid "${blockUid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0];
|
|
6
|
+
};
|
|
7
|
+
exports.default = getFirstChildTextByBlockUid;
|
|
8
8
|
//# sourceMappingURL=getFirstChildTextByBlockUid.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getFirstChildUidByBlockUid: (blockUid: string) => string;
|
|
2
|
-
export default getFirstChildUidByBlockUid;
|
|
1
|
+
declare const getFirstChildUidByBlockUid: (blockUid: string) => string;
|
|
2
|
+
export default getFirstChildUidByBlockUid;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const _1 = require(".");
|
|
4
|
-
const getFirstChildUidByBlockUid = (blockUid) => (0, _1.getNthChildUidByBlockUid)({ blockUid, order: 0 });
|
|
5
|
-
exports.default = getFirstChildUidByBlockUid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const _1 = require(".");
|
|
4
|
+
const getFirstChildUidByBlockUid = (blockUid) => (0, _1.getNthChildUidByBlockUid)({ blockUid, order: 0 });
|
|
5
|
+
exports.default = getFirstChildUidByBlockUid;
|
|
6
6
|
//# sourceMappingURL=getFirstChildUidByBlockUid.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TreeNode } from "../types";
|
|
2
|
-
declare const getFullTreeByParentUid: (uid: string) => TreeNode;
|
|
3
|
-
export default getFullTreeByParentUid;
|
|
1
|
+
import type { TreeNode } from "../types";
|
|
2
|
+
declare const getFullTreeByParentUid: (uid: string) => TreeNode;
|
|
3
|
+
export default getFullTreeByParentUid;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const formatRoamNode = (n, v) => ({
|
|
4
|
-
text: n.string || n.title || "",
|
|
5
|
-
open: typeof n.open === "undefined" ? true : n.open,
|
|
6
|
-
order: n.order || 0,
|
|
7
|
-
uid: n.uid || "",
|
|
8
|
-
heading: n.heading || 0,
|
|
9
|
-
viewType: n.viewType || v,
|
|
10
|
-
editTime: new Date(n.editTime || 0),
|
|
11
|
-
props: { imageResize: {}, iframe: {} },
|
|
12
|
-
textAlign: n.textAlign || "left",
|
|
13
|
-
children: (n.children || [])
|
|
14
|
-
.sort(({ order: a }, { order: b }) => a - b)
|
|
15
|
-
.map((r) => formatRoamNode(r, n.viewType || v)),
|
|
16
|
-
});
|
|
17
|
-
const getFullTreeByParentUid = (uid) => {
|
|
18
|
-
var _a, _b;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const formatRoamNode = (n, v) => ({
|
|
4
|
+
text: n.string || n.title || "",
|
|
5
|
+
open: typeof n.open === "undefined" ? true : n.open,
|
|
6
|
+
order: n.order || 0,
|
|
7
|
+
uid: n.uid || "",
|
|
8
|
+
heading: n.heading || 0,
|
|
9
|
+
viewType: n.viewType || v,
|
|
10
|
+
editTime: new Date(n.editTime || 0),
|
|
11
|
+
props: { imageResize: {}, iframe: {} },
|
|
12
|
+
textAlign: n.textAlign || "left",
|
|
13
|
+
children: (n.children || [])
|
|
14
|
+
.sort(({ order: a }, { order: b }) => a - b)
|
|
15
|
+
.map((r) => formatRoamNode(r, n.viewType || v)),
|
|
16
|
+
});
|
|
17
|
+
const getFullTreeByParentUid = (uid) => {
|
|
18
|
+
var _a, _b;
|
|
19
19
|
return formatRoamNode(((_b = (_a = window.roamAlphaAPI.q(`[:find (pull ?b [
|
|
20
20
|
:block/string
|
|
21
21
|
:node/title
|
|
@@ -28,14 +28,14 @@ const getFullTreeByParentUid = (uid) => {
|
|
|
28
28
|
[:edit/time :as "editTime"]
|
|
29
29
|
:block/props
|
|
30
30
|
{:block/children ...}
|
|
31
|
-
]) :where [?b :block/uid "${uid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || {}, window.roamAlphaAPI
|
|
31
|
+
]) :where [?b :block/uid "${uid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || {}, window.roamAlphaAPI
|
|
32
32
|
.q(`[:find
|
|
33
33
|
(pull ?p [:children/view-type]) :where
|
|
34
|
-
[?c :block/uid "${uid}"] [?c :block/parents ?p]]`)
|
|
35
|
-
.reverse()
|
|
36
|
-
.map((a) => a[0])
|
|
37
|
-
.map((a) => a && a["view-type"])
|
|
38
|
-
.find((a) => !!a) || "bullet");
|
|
39
|
-
};
|
|
40
|
-
exports.default = getFullTreeByParentUid;
|
|
34
|
+
[?c :block/uid "${uid}"] [?c :block/parents ?p]]`)
|
|
35
|
+
.reverse()
|
|
36
|
+
.map((a) => a[0])
|
|
37
|
+
.map((a) => a && a["view-type"])
|
|
38
|
+
.find((a) => !!a) || "bullet");
|
|
39
|
+
};
|
|
40
|
+
exports.default = getFullTreeByParentUid;
|
|
41
41
|
//# sourceMappingURL=getFullTreeByParentUid.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getLinkedPageTitlesUnderUid: (uid: string) => string[];
|
|
2
|
-
export default getLinkedPageTitlesUnderUid;
|
|
1
|
+
declare const getLinkedPageTitlesUnderUid: (uid: string) => string[];
|
|
2
|
+
export default getLinkedPageTitlesUnderUid;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getLinkedPageTitlesUnderUid = (uid) => window.roamAlphaAPI
|
|
4
|
-
.q(`[:find ?t :where [?r :node/title ?t] [?c :block/refs ?r] [?c :block/parents ?b] [?b :block/uid "${uid}"]]`)
|
|
5
|
-
.map((r) => r[0]);
|
|
6
|
-
exports.default = getLinkedPageTitlesUnderUid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getLinkedPageTitlesUnderUid = (uid) => window.roamAlphaAPI
|
|
4
|
+
.q(`[:find ?t :where [?r :node/title ?t] [?c :block/refs ?r] [?c :block/parents ?b] [?b :block/uid "${uid}"]]`)
|
|
5
|
+
.map((r) => r[0]);
|
|
6
|
+
exports.default = getLinkedPageTitlesUnderUid;
|
|
7
7
|
//# sourceMappingURL=getLinkedPageTitlesUnderUid.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const getNthChildUidByBlockUid: ({ blockUid, order, }: {
|
|
2
|
-
blockUid: string;
|
|
3
|
-
order: number;
|
|
4
|
-
}) => string;
|
|
5
|
-
export default getNthChildUidByBlockUid;
|
|
1
|
+
declare const getNthChildUidByBlockUid: ({ blockUid, order, }: {
|
|
2
|
+
blockUid: string;
|
|
3
|
+
order: number;
|
|
4
|
+
}) => string;
|
|
5
|
+
export default getNthChildUidByBlockUid;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getNthChildUidByBlockUid = ({ blockUid, order, }) => {
|
|
4
|
-
var _a, _b;
|
|
5
|
-
return (_b = (_a = window.roamAlphaAPI.q(`[:find ?u :where [?c :block/uid ?u] [?c :block/order ${order}] [?p :block/children ?c] [?p :block/uid "${blockUid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0];
|
|
6
|
-
};
|
|
7
|
-
exports.default = getNthChildUidByBlockUid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getNthChildUidByBlockUid = ({ blockUid, order, }) => {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
return (_b = (_a = window.roamAlphaAPI.q(`[:find ?u :where [?c :block/uid ?u] [?c :block/order ${order}] [?p :block/children ?c] [?p :block/uid "${blockUid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0];
|
|
6
|
+
};
|
|
7
|
+
exports.default = getNthChildUidByBlockUid;
|
|
8
8
|
//# sourceMappingURL=getNthChildUidByBlockUid.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getOrderByBlockUid: (blockUid: string) => number;
|
|
2
|
-
export default getOrderByBlockUid;
|
|
1
|
+
declare const getOrderByBlockUid: (blockUid: string) => number;
|
|
2
|
+
export default getOrderByBlockUid;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getOrderByBlockUid = (blockUid) => {
|
|
4
|
-
var _a, _b;
|
|
5
|
-
return (_b = (_a = window.roamAlphaAPI.q(`[:find ?o :where [?r :block/order ?o] [?r :block/uid "${blockUid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0];
|
|
6
|
-
};
|
|
7
|
-
exports.default = getOrderByBlockUid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getOrderByBlockUid = (blockUid) => {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
return (_b = (_a = window.roamAlphaAPI.q(`[:find ?o :where [?r :block/order ?o] [?r :block/uid "${blockUid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0];
|
|
6
|
+
};
|
|
7
|
+
exports.default = getOrderByBlockUid;
|
|
8
8
|
//# sourceMappingURL=getOrderByBlockUid.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getPageTitleByBlockUid: (blockUid: string) => string;
|
|
2
|
-
export default getPageTitleByBlockUid;
|
|
1
|
+
declare const getPageTitleByBlockUid: (blockUid: string) => string;
|
|
2
|
+
export default getPageTitleByBlockUid;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getPageTitleByBlockUid = (blockUid) => {
|
|
4
|
-
var _a, _b, _c;
|
|
5
|
-
return ((_c = (_b = (_a = window.roamAlphaAPI.q(`[:find (pull ?p [:node/title]) :where [?e :block/uid "${blockUid}"] [?e :block/page ?p]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.title) || "";
|
|
6
|
-
};
|
|
7
|
-
exports.default = getPageTitleByBlockUid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getPageTitleByBlockUid = (blockUid) => {
|
|
4
|
+
var _a, _b, _c;
|
|
5
|
+
return ((_c = (_b = (_a = window.roamAlphaAPI.q(`[:find (pull ?p [:node/title]) :where [?e :block/uid "${blockUid}"] [?e :block/page ?p]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.title) || "";
|
|
6
|
+
};
|
|
7
|
+
exports.default = getPageTitleByBlockUid;
|
|
8
8
|
//# sourceMappingURL=getPageTitleByBlockUid.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const getPageTitleByPageUid: (blockUid: string) => string;
|
|
2
|
-
export default getPageTitleByPageUid;
|
|
1
|
+
export declare const getPageTitleByPageUid: (blockUid: string) => string;
|
|
2
|
+
export default getPageTitleByPageUid;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPageTitleByPageUid = void 0;
|
|
4
|
-
const getPageTitleByPageUid = (blockUid) => {
|
|
5
|
-
var _a, _b, _c;
|
|
6
|
-
return ((_c = (_b = (_a = window.roamAlphaAPI.q(`[:find (pull ?p [:node/title]) :where [?p :block/uid "${blockUid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.title) || "";
|
|
7
|
-
};
|
|
8
|
-
exports.getPageTitleByPageUid = getPageTitleByPageUid;
|
|
9
|
-
exports.default = exports.getPageTitleByPageUid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPageTitleByPageUid = void 0;
|
|
4
|
+
const getPageTitleByPageUid = (blockUid) => {
|
|
5
|
+
var _a, _b, _c;
|
|
6
|
+
return ((_c = (_b = (_a = window.roamAlphaAPI.q(`[:find (pull ?p [:node/title]) :where [?p :block/uid "${blockUid}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.title) || "";
|
|
7
|
+
};
|
|
8
|
+
exports.getPageTitleByPageUid = getPageTitleByPageUid;
|
|
9
|
+
exports.default = exports.getPageTitleByPageUid;
|
|
10
10
|
//# sourceMappingURL=getPageTitleByPageUid.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getPageTitleReferencesByPageTitle: (title: string) => string[];
|
|
2
|
-
export default getPageTitleReferencesByPageTitle;
|
|
1
|
+
declare const getPageTitleReferencesByPageTitle: (title: string) => string[];
|
|
2
|
+
export default getPageTitleReferencesByPageTitle;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const normalizePageTitle_1 = (0, tslib_1.__importDefault)(require("./normalizePageTitle"));
|
|
5
|
-
const getPageTitleReferencesByPageTitle = (title) => window.roamAlphaAPI
|
|
6
|
-
.q(`[:find ?t :where [?b :node/title ?t] [?b :block/children ?c] [?c :block/refs ?r] [?r :node/title "${(0, normalizePageTitle_1.default)(title)}"]]`)
|
|
7
|
-
.map((p) => p[0]);
|
|
8
|
-
exports.default = getPageTitleReferencesByPageTitle;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const normalizePageTitle_1 = (0, tslib_1.__importDefault)(require("./normalizePageTitle"));
|
|
5
|
+
const getPageTitleReferencesByPageTitle = (title) => window.roamAlphaAPI
|
|
6
|
+
.q(`[:find ?t :where [?b :node/title ?t] [?b :block/children ?c] [?c :block/refs ?r] [?r :node/title "${(0, normalizePageTitle_1.default)(title)}"]]`)
|
|
7
|
+
.map((p) => p[0]);
|
|
8
|
+
exports.default = getPageTitleReferencesByPageTitle;
|
|
9
9
|
//# sourceMappingURL=getPageTitleReferencesByPageTitle.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const getPageTitlesAndBlockUidsReferencingPage: (pageName: string) => {
|
|
2
|
-
title: string;
|
|
3
|
-
uid: string;
|
|
4
|
-
}[];
|
|
5
|
-
export default getPageTitlesAndBlockUidsReferencingPage;
|
|
1
|
+
declare const getPageTitlesAndBlockUidsReferencingPage: (pageName: string) => {
|
|
2
|
+
title: string;
|
|
3
|
+
uid: string;
|
|
4
|
+
}[];
|
|
5
|
+
export default getPageTitlesAndBlockUidsReferencingPage;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const normalizePageTitle_1 = (0, tslib_1.__importDefault)(require("./normalizePageTitle"));
|
|
5
|
-
const getPageTitlesAndBlockUidsReferencingPage = (pageName) => window.roamAlphaAPI
|
|
6
|
-
.q(`[:find (pull ?pr [:node/title]) (pull ?r [:block/uid]) :where [?p :node/title "${(0, normalizePageTitle_1.default)(pageName)}"] [?r :block/refs ?p] [?r :block/page ?pr]]`)
|
|
7
|
-
.map(([{ title }, { uid }]) => ({ title, uid }));
|
|
8
|
-
exports.default = getPageTitlesAndBlockUidsReferencingPage;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const normalizePageTitle_1 = (0, tslib_1.__importDefault)(require("./normalizePageTitle"));
|
|
5
|
+
const getPageTitlesAndBlockUidsReferencingPage = (pageName) => window.roamAlphaAPI
|
|
6
|
+
.q(`[:find (pull ?pr [:node/title]) (pull ?r [:block/uid]) :where [?p :node/title "${(0, normalizePageTitle_1.default)(pageName)}"] [?r :block/refs ?p] [?r :block/page ?pr]]`)
|
|
7
|
+
.map(([{ title }, { uid }]) => ({ title, uid }));
|
|
8
|
+
exports.default = getPageTitlesAndBlockUidsReferencingPage;
|
|
9
9
|
//# sourceMappingURL=getPageTitlesAndBlockUidsReferencingPage.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const getPageTitlesAndUidsDirectlyReferencingPage: (pageName: string) => {
|
|
2
|
-
title: string;
|
|
3
|
-
uid: string;
|
|
4
|
-
}[];
|
|
5
|
-
export default getPageTitlesAndUidsDirectlyReferencingPage;
|
|
1
|
+
declare const getPageTitlesAndUidsDirectlyReferencingPage: (pageName: string) => {
|
|
2
|
+
title: string;
|
|
3
|
+
uid: string;
|
|
4
|
+
}[];
|
|
5
|
+
export default getPageTitlesAndUidsDirectlyReferencingPage;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const normalizePageTitle_1 = (0, tslib_1.__importDefault)(require("./normalizePageTitle"));
|
|
5
|
-
const getPageTitlesAndUidsDirectlyReferencingPage = (pageName) => window.roamAlphaAPI
|
|
6
|
-
.q(`[:find ?t ?u :where [?r :block/uid ?u] [?r :node/title ?t] [?r :block/refs ?p] [?p :node/title "${(0, normalizePageTitle_1.default)(pageName)}"]]`)
|
|
7
|
-
.map(([title, uid]) => ({ title, uid }));
|
|
8
|
-
exports.default = getPageTitlesAndUidsDirectlyReferencingPage;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const normalizePageTitle_1 = (0, tslib_1.__importDefault)(require("./normalizePageTitle"));
|
|
5
|
+
const getPageTitlesAndUidsDirectlyReferencingPage = (pageName) => window.roamAlphaAPI
|
|
6
|
+
.q(`[:find ?t ?u :where [?r :block/uid ?u] [?r :node/title ?t] [?r :block/refs ?p] [?p :node/title "${(0, normalizePageTitle_1.default)(pageName)}"]]`)
|
|
7
|
+
.map(([title, uid]) => ({ title, uid }));
|
|
8
|
+
exports.default = getPageTitlesAndUidsDirectlyReferencingPage;
|
|
9
9
|
//# sourceMappingURL=getPageTitlesAndUidsDirectlyReferencingPage.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getPageTitlesReferencingBlockUid: (uid: string) => string[];
|
|
2
|
-
export default getPageTitlesReferencingBlockUid;
|
|
1
|
+
declare const getPageTitlesReferencingBlockUid: (uid: string) => string[];
|
|
2
|
+
export default getPageTitlesReferencingBlockUid;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getPageTitlesReferencingBlockUid = (uid) => window.roamAlphaAPI
|
|
4
|
-
.q(`[:find ?t :where [?r :block/uid "${uid}"] [?b :block/refs ?r] [?b :block/page ?p] [?p :node/title ?t]]`)
|
|
5
|
-
.map((s) => s[0]);
|
|
6
|
-
exports.default = getPageTitlesReferencingBlockUid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getPageTitlesReferencingBlockUid = (uid) => window.roamAlphaAPI
|
|
4
|
+
.q(`[:find ?t :where [?r :block/uid "${uid}"] [?b :block/refs ?r] [?b :block/page ?p] [?p :node/title ?t]]`)
|
|
5
|
+
.map((s) => s[0]);
|
|
6
|
+
exports.default = getPageTitlesReferencingBlockUid;
|
|
7
7
|
//# sourceMappingURL=getPageTitlesReferencingBlockUid.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getPageTitlesStartingWithPrefix: (prefix: string) => string[];
|
|
2
|
-
export default getPageTitlesStartingWithPrefix;
|
|
1
|
+
declare const getPageTitlesStartingWithPrefix: (prefix: string) => string[];
|
|
2
|
+
export default getPageTitlesStartingWithPrefix;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getPageTitlesStartingWithPrefix = (prefix) => window.roamAlphaAPI
|
|
4
|
-
.q(`[:find ?title :where [?b :node/title ?title][(clojure.string/starts-with? ?title "${prefix}")]]`)
|
|
5
|
-
.map((r) => r[0]);
|
|
6
|
-
exports.default = getPageTitlesStartingWithPrefix;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getPageTitlesStartingWithPrefix = (prefix) => window.roamAlphaAPI
|
|
4
|
+
.q(`[:find ?title :where [?b :node/title ?title][(clojure.string/starts-with? ?title "${prefix}")]]`)
|
|
5
|
+
.map((r) => r[0]);
|
|
6
|
+
exports.default = getPageTitlesStartingWithPrefix;
|
|
7
7
|
//# sourceMappingURL=getPageTitlesStartingWithPrefix.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getPageUidByPageTitle: (title: string) => string;
|
|
2
|
-
export default getPageUidByPageTitle;
|
|
1
|
+
declare const getPageUidByPageTitle: (title: string) => string;
|
|
2
|
+
export default getPageUidByPageTitle;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const normalizePageTitle_1 = (0, tslib_1.__importDefault)(require("./normalizePageTitle"));
|
|
5
|
-
const getPageUidByPageTitle = (title) => {
|
|
6
|
-
var _a, _b, _c;
|
|
7
|
-
return ((_c = (_b = (_a = window.roamAlphaAPI.q(`[:find (pull ?e [:block/uid]) :where [?e :node/title "${(0, normalizePageTitle_1.default)(title)}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.uid) || "";
|
|
8
|
-
};
|
|
9
|
-
exports.default = getPageUidByPageTitle;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const normalizePageTitle_1 = (0, tslib_1.__importDefault)(require("./normalizePageTitle"));
|
|
5
|
+
const getPageUidByPageTitle = (title) => {
|
|
6
|
+
var _a, _b, _c;
|
|
7
|
+
return ((_c = (_b = (_a = window.roamAlphaAPI.q(`[:find (pull ?e [:block/uid]) :where [?e :node/title "${(0, normalizePageTitle_1.default)(title)}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.uid) || "";
|
|
8
|
+
};
|
|
9
|
+
exports.default = getPageUidByPageTitle;
|
|
10
10
|
//# sourceMappingURL=getPageUidByPageTitle.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ViewType } from "../types";
|
|
2
|
-
declare const getPageViewType: (title: string) => ViewType;
|
|
3
|
-
export default getPageViewType;
|
|
1
|
+
import type { ViewType } from "../types";
|
|
2
|
+
declare const getPageViewType: (title: string) => ViewType;
|
|
3
|
+
export default getPageViewType;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const normalizePageTitle_1 = (0, tslib_1.__importDefault)(require("./normalizePageTitle"));
|
|
5
|
-
const getPageViewType = (title) => {
|
|
6
|
-
var _a, _b;
|
|
7
|
-
return ((_b = (_a = window.roamAlphaAPI.q(`[:find ?v :where [?e :children/view-type ?v] [?e :node/title "${(0, normalizePageTitle_1.default)(title)}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || "bullet";
|
|
8
|
-
};
|
|
9
|
-
exports.default = getPageViewType;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const normalizePageTitle_1 = (0, tslib_1.__importDefault)(require("./normalizePageTitle"));
|
|
5
|
+
const getPageViewType = (title) => {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
return ((_b = (_a = window.roamAlphaAPI.q(`[:find ?v :where [?e :children/view-type ?v] [?e :node/title "${(0, normalizePageTitle_1.default)(title)}"]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || "bullet";
|
|
8
|
+
};
|
|
9
|
+
exports.default = getPageViewType;
|
|
10
10
|
//# sourceMappingURL=getPageViewType.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getParentTextByBlockUid: (blockUid: string) => string;
|
|
2
|
-
export default getParentTextByBlockUid;
|
|
1
|
+
declare const getParentTextByBlockUid: (blockUid: string) => string;
|
|
2
|
+
export default getParentTextByBlockUid;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getParentTextByBlockUid = (blockUid) => {
|
|
4
|
-
var _a, _b;
|
|
5
|
-
return ((_b = (_a = window.roamAlphaAPI.q(`[:find ?s :where [?e :block/uid "${blockUid}"] [?p :block/children ?e] [?p :block/string ?s]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || "";
|
|
6
|
-
};
|
|
7
|
-
exports.default = getParentTextByBlockUid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getParentTextByBlockUid = (blockUid) => {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
return ((_b = (_a = window.roamAlphaAPI.q(`[:find ?s :where [?e :block/uid "${blockUid}"] [?p :block/children ?e] [?p :block/string ?s]]`)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) || "";
|
|
6
|
+
};
|
|
7
|
+
exports.default = getParentTextByBlockUid;
|
|
8
8
|
//# sourceMappingURL=getParentTextByBlockUid.js.map
|