/* 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() { // addLinksToCache( // links: NodeListOf, // sourcePath: string // ): void { // /* //@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 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; // } // } // } 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(MarkdownView); // if (!view || !(view instanceof MarkdownView)) return; // const admonitionLinks = // view.contentEl.querySelectorAll( // "a.internal-link" // ); // this.addLinksToCache(admonitionLinks, file.path); // }) // ); }); }); } } module.exports = MyPlugin; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsInNyYy9jb2RlQmxvY2tIYW5kbGVyLnRzIiwic3JjL0V2ZW50RmFjdG9yeS50cyIsIm1haW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyohICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbkNvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLlxyXG5cclxuUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55XHJcbnB1cnBvc2Ugd2l0aCBvciB3aXRob3V0IGZlZSBpcyBoZXJlYnkgZ3JhbnRlZC5cclxuXHJcblRIRSBTT0ZUV0FSRSBJUyBQUk9W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