You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
194 lines
43 KiB
194 lines
43 KiB
/*
|
|
THIS IS A GENERATED/BUNDLED FILE BY ROLLUP
|
|
if you want to view the source visit the plugins github repository
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
var obsidian = require('obsidian');
|
|
|
|
/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */
|
|
|
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
});
|
|
}
|
|
|
|
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
}
|
|
|
|
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
}
|
|
|
|
const labeledRegex = /^[ \t]*(?:date:)(.+?)(?:^[ \t]*(?:title:)(.+?))?(?:^[ \t]*(?:content:)(.+?))?(?=^[ \t]*date:)/gimsu;
|
|
//it uses the EventFactory provided to parse the source into Events
|
|
const timelineLabeledHandler = (source, eventFactory) => {
|
|
source += "\ndate: ";
|
|
let sourceMatch;
|
|
while ((sourceMatch = labeledRegex.exec(source)) !== null) {
|
|
eventFactory.create(sourceMatch[1], sourceMatch[2], sourceMatch[3]);
|
|
}
|
|
};
|
|
const timelineHandler = (source, eventFactory) => {
|
|
//source to events
|
|
const sourceSplitted = source.split(/^\s*\+ ?/gm).slice(1);
|
|
//this is code is not readable
|
|
//sourceSplitted.push(...new Array(3 - (sourceSplitted.length % 3)).fill(""));
|
|
//adding 2 empty stings and 2 to sourceSplitted.length is safe and readble
|
|
sourceSplitted.push("", "");
|
|
const counter = sourceSplitted.length - (sourceSplitted.length % 3);
|
|
for (let i = 0; i < counter; i += 3) {
|
|
eventFactory.create(sourceSplitted[i], sourceSplitted[i + 1], sourceSplitted[i + 2]);
|
|
}
|
|
};
|
|
const toExport = [
|
|
{ tag: "timeline", handler: timelineHandler },
|
|
{ tag: "timeline-labeled", handler: timelineLabeledHandler },
|
|
];
|
|
|
|
var _EventFactory_root, _EventFactory_sourcePath, _EventFactory_eventCounter;
|
|
//remove first child's top margin and last child's bottom margin
|
|
const trim = (s) => {
|
|
if (s == null) {
|
|
s = "";
|
|
return;
|
|
}
|
|
s = s.trim();
|
|
if (s.length === 0)
|
|
s = "\u200B";
|
|
};
|
|
class EventFactory {
|
|
constructor(root, sourcePath) {
|
|
_EventFactory_root.set(this, void 0);
|
|
_EventFactory_sourcePath.set(this, void 0);
|
|
//#markdownRenderChild: MarkdownRenderChild;
|
|
_EventFactory_eventCounter.set(this, void 0);
|
|
this.create = (time, title, description) => {
|
|
trim(time);
|
|
trim(title);
|
|
trim(description);
|
|
let timeContainerEl = __classPrivateFieldGet(this, _EventFactory_root, "f").createDiv({ cls: "time-container" }), timeEl = timeContainerEl.createDiv({ cls: "time" }), infoEl = __classPrivateFieldGet(this, _EventFactory_root, "f").createDiv({ cls: "info" }), titleEl = infoEl.createDiv({ cls: "title" }), descriptionEl = infoEl.createDiv({ cls: "description" });
|
|
obsidian.MarkdownRenderer.renderMarkdown(time, timeEl, __classPrivateFieldGet(this, _EventFactory_sourcePath, "f"), null //this.#markdownRenderChild
|
|
);
|
|
obsidian.MarkdownRenderer.renderMarkdown(title, titleEl, __classPrivateFieldGet(this, _EventFactory_sourcePath, "f"), null //this.#markdownRenderChild
|
|
);
|
|
obsidian.MarkdownRenderer.renderMarkdown(description, descriptionEl, __classPrivateFieldGet(this, _EventFactory_sourcePath, "f"), null //this.#markdownRenderChild
|
|
);
|
|
// regulate(descriptionEl);
|
|
// regulate(timeEl);
|
|
// regulate(titleEl);
|
|
__classPrivateFieldSet(this, _EventFactory_eventCounter, +__classPrivateFieldGet(this, _EventFactory_eventCounter, "f") + 1, "f");
|
|
};
|
|
this.getEventCounter = () => __classPrivateFieldGet(this, _EventFactory_eventCounter, "f");
|
|
__classPrivateFieldSet(this, _EventFactory_root, root, "f");
|
|
__classPrivateFieldSet(this, _EventFactory_sourcePath, sourcePath, "f");
|
|
//this.#markdownRenderChild = new MarkdownRenderChild(root);
|
|
//this.markdownRenderChild.containerEl = root;
|
|
__classPrivateFieldSet(this, _EventFactory_eventCounter, 0, "f");
|
|
}
|
|
}
|
|
_EventFactory_root = new WeakMap(), _EventFactory_sourcePath = new WeakMap(), _EventFactory_eventCounter = new WeakMap();
|
|
|
|
const classRegex = /(?<=^\s*)\[.+?\]/gs;
|
|
const stringToClassArray = (input) => {
|
|
input = input.trim();
|
|
if (input[0] != "[" || input[input.length - 1] != "]")
|
|
return [];
|
|
return input
|
|
.substring(1, input.length - 1)
|
|
.trim()
|
|
.split(/\s*,\s*/);
|
|
};
|
|
class MyPlugin extends obsidian.Plugin {
|
|
constructor() {
|
|
super(...arguments);
|
|
this.onload = () => __awaiter(this, void 0, void 0, function* () {
|
|
toExport.forEach(({ tag, handler }) => {
|
|
this.registerMarkdownCodeBlockProcessor(tag, (source, el, ctx) => {
|
|
let mainLine = el.createDiv({
|
|
cls: "main-line",
|
|
});
|
|
el.addClass("timeline");
|
|
let classMatch = source.match(classRegex);
|
|
if (classMatch !== null) {
|
|
let classes = stringToClassArray(classMatch[0]);
|
|
el.addClasses(classes);
|
|
}
|
|
let eventFactory = new EventFactory(el, ctx.sourcePath);
|
|
handler(source, eventFactory);
|
|
mainLine.style.gridRowEnd = `${eventFactory.getEventCounter() + 1}`;
|
|
const links = el.querySelectorAll("a.internal-link");
|
|
this.addLinksToCache(links, ctx.sourcePath);
|
|
});
|
|
this.registerEvent(this.app.metadataCache.on("resolve", (file) => {
|
|
if (this.app.workspace.getActiveFile() != file)
|
|
return;
|
|
const view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView);
|
|
if (!view || !(view instanceof obsidian.MarkdownView))
|
|
return;
|
|
const admonitionLinks = view.contentEl.querySelectorAll("a.internal-link");
|
|
this.addLinksToCache(admonitionLinks, file.path);
|
|
}));
|
|
});
|
|
});
|
|
}
|
|
addLinksToCache(links, sourcePath) {
|
|
/* //@ts-expect-error
|
|
this.app.metadataCache.resolveLinks(sourcePath); */
|
|
for (let i = 0; i < links.length; i++) {
|
|
const a = links[i];
|
|
if (a.dataset.href) {
|
|
let file = this.app.metadataCache.getFirstLinkpathDest(a.dataset.href, "");
|
|
let cache, path;
|
|
if (file && file instanceof obsidian.TFile) {
|
|
cache = this.app.metadataCache.resolvedLinks;
|
|
path = file.path;
|
|
}
|
|
else {
|
|
cache = this.app.metadataCache.unresolvedLinks;
|
|
path = a.dataset.href;
|
|
}
|
|
if (!cache[sourcePath]) {
|
|
cache[sourcePath] = {
|
|
[path]: 0,
|
|
};
|
|
}
|
|
let resolved = cache[sourcePath];
|
|
if (!resolved[path]) {
|
|
resolved[path] = 0;
|
|
}
|
|
resolved[path] += 1;
|
|
cache[sourcePath] = resolved;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = MyPlugin;
|
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsInNyYy9jb2RlQmxvY2tIYW5kbGVyLnRzIiwic3JjL0V2ZW50RmFjdG9yeS50cyIsIm1haW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyohICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbkNvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLlxyXG5cclxuUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55XHJcbnB1cnBvc2Ugd2l0aCBvciB3aXRob3V0IGZlZSBpcyBoZXJlYnkgZ3JhbnRlZC5cclxuXHJcblRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCBcIkFTIElTXCIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEhcclxuUkVHQVJEIFRPIFRISVMgU09GVFdBUk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