vault backup: 2025-08-23 11:05:00
This commit is contained in:
1 parent
65b637d1a8
commit
04058c1deb
12 files changed
+76523
-5
No files matched your search
Vendored
+4
-1
@@ -57,5 +57,8 @@
|
||||
"obsidian-banners",
|
||||
"simpread",
|
||||
"obsidian-timeline",
|
||||
"generate-timeline"
|
||||
"generate-timeline",
|
||||
"update-time-on-edit",
|
||||
"timelines-revamped",
|
||||
"mehrmaid"
|
||||
]
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
"contentTemplate": "# {{{title}}}\n\n{{{description}}}\n\n{{{article_title}}} //文章内容标题\n{{{content}}} //文章正文\n\n\n[Read in Cubox]({{{cubox_url}}}) \n[Read Original]({{{url}}}) \n\n---\n\n{{#highlights.length}}\n## Annotations \n\n{{#highlights}}\n> {{{text}}} \n\n{{#note}}\n{{{note}}}\n{{/note}}\n[Link️]({{{cubox_url}}}) \n\n{{/highlights}}\n{{/highlights.length}}",
|
||||
"highlightInContent": true,
|
||||
"dateFormat": "yyyy-MM-dd",
|
||||
"lastSyncTime": 1755915736396,
|
||||
"lastSyncTime": 1755917536417,
|
||||
"lastSyncCardId": "7358083230366436785",
|
||||
"lastCardUpdateTime": "2025-08-21T13:52:28.950+0800",
|
||||
"syncing": false
|
||||
|
||||
Vendored
+150
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
||||
if you want to view the source, please visit the github repository of this plugin
|
||||
*/
|
||||
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/main.ts
|
||||
var main_exports = {};
|
||||
__export(main_exports, {
|
||||
default: () => Mehrmaid
|
||||
});
|
||||
module.exports = __toCommonJS(main_exports);
|
||||
var import_obsidian2 = require("obsidian");
|
||||
|
||||
// src/mermaid.ts
|
||||
var import_obsidian = require("obsidian");
|
||||
|
||||
// src/themes.ts
|
||||
var THEME_DARK = {
|
||||
theme: "dark",
|
||||
"themeVariables": {
|
||||
"primaryColor": "#BB2528",
|
||||
"primaryTextColor": "#fff",
|
||||
"primaryBorderColor": "#7C0000",
|
||||
"lineColor": "#dadada",
|
||||
"secondaryColor": "#006100",
|
||||
"tertiaryColor": "#fff",
|
||||
"clusterBkg": "#242424",
|
||||
"clusterBorder": "#2d2d2d",
|
||||
"nodeBorder": "#dadada"
|
||||
},
|
||||
securityLevel: "loose",
|
||||
startOnLoad: true,
|
||||
flowchart: {
|
||||
htmlLabels: true
|
||||
}
|
||||
};
|
||||
var THEME_LIGHT = {
|
||||
theme: "neutral",
|
||||
"themeVariables": {
|
||||
"primaryBorderColor": "#000",
|
||||
"clusterBorder": "#2d2d2d",
|
||||
"lineColor": "#000",
|
||||
"nodeBorder": "#000"
|
||||
},
|
||||
securityLevel: "loose",
|
||||
startOnLoad: true,
|
||||
flowchart: {
|
||||
htmlLabels: true
|
||||
}
|
||||
};
|
||||
|
||||
// src/mermaid.ts
|
||||
async function renderMarkdown(str, el, ctx, app) {
|
||||
const markdownRenderChild = new import_obsidian.MarkdownRenderChild(el);
|
||||
const markdownEl = el.createDiv();
|
||||
markdownEl.addClass("mehrmaid-markdown-container");
|
||||
if (ctx && !(typeof ctx == "string")) {
|
||||
ctx.addChild(markdownRenderChild);
|
||||
}
|
||||
await import_obsidian.MarkdownRenderer.render(app, str, markdownEl, ctx.sourcePath, markdownRenderChild);
|
||||
return markdownEl;
|
||||
}
|
||||
async function renderMehrmaid(source, el, ctx) {
|
||||
var _a;
|
||||
const mermaid = await (0, import_obsidian.loadMermaid)();
|
||||
let config = {};
|
||||
if (document.body.classList.contains("theme-dark")) {
|
||||
config = THEME_DARK;
|
||||
source += "\nclassDef primary fill:#8a5cf5";
|
||||
} else {
|
||||
config = THEME_LIGHT;
|
||||
source += "\nclassDef primary fill:#a68afa";
|
||||
}
|
||||
mermaid.initialize(config);
|
||||
mermaid.mermaidAPI.setConfig(config);
|
||||
let matches = source.match(/"([^"]*?)"/g);
|
||||
if (matches) {
|
||||
const promises = [];
|
||||
for (let match of matches) {
|
||||
match = match.substring(1, match.length - 1);
|
||||
promises.push(renderMarkdown(match, el, ctx, this.app));
|
||||
}
|
||||
const markdownEls = await Promise.all(promises);
|
||||
let widths = [];
|
||||
let heights = [];
|
||||
for (let markdownEl of markdownEls) {
|
||||
widths.push(markdownEl.offsetWidth);
|
||||
heights.push(markdownEl.offsetHeight);
|
||||
}
|
||||
el.empty();
|
||||
for (let i = 0; i < matches.length; i++) {
|
||||
let match = matches[i];
|
||||
let markdownEl = markdownEls[i];
|
||||
let width = widths[i];
|
||||
width = Math.max(width, 10);
|
||||
let height = heights[i];
|
||||
height = Math.max(height, 10);
|
||||
let id = match.replace(/[^a-zA-Z0-9]/g, "") + i;
|
||||
source = source.replace(
|
||||
match,
|
||||
`<div class="${id} cm-sizer" style="width: ${width}px; height: ${height - 7}px; display: inline-block;"></div>`
|
||||
);
|
||||
}
|
||||
const graphId = "mehrmaid-" + ((_a = ctx.getSectionInfo(el)) == null ? void 0 : _a.lineStart) + "-" + Date.now();
|
||||
const { svg } = await mermaid.render(graphId, source);
|
||||
el.insertAdjacentHTML("beforeend", svg);
|
||||
for (let i = 0; i < markdownEls.length; i++) {
|
||||
let id = matches[i].replace(/[^a-zA-Z0-9]/g, "") + i;
|
||||
let markdownEl = markdownEls[i];
|
||||
let htmlEl = el.getElementsByClassName(id)[0];
|
||||
htmlEl.appendChild(markdownEl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// src/main.ts
|
||||
var Mehrmaid = class extends import_obsidian2.Plugin {
|
||||
async onload() {
|
||||
this.app.workspace.onLayoutReady(() => {
|
||||
this.registerMarkdownCodeBlockProcessor("mehrmaid", async (source, el, ctx) => {
|
||||
try {
|
||||
await renderMehrmaid(source, el, ctx);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
new import_obsidian2.Notice("Mehrmaid: Error rendering mermaid diagram");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/* nosourcemap */
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "mehrmaid",
|
||||
"name": "Mehrmaid",
|
||||
"version": "0.0.2",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Enables you to put Markdown inside of Mermaid diagrams.",
|
||||
"author": "huterguier",
|
||||
"authorUrl": "https://github.com/huterguier",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
.block-language-mehrmaid p:first-child {
|
||||
padding-top: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.block-language-mehrmaid p:last-child {
|
||||
padding-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.mehrmaid-markdown-container {
|
||||
display: inline-block;
|
||||
}
|
||||
+67515
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "timelines-revamped",
|
||||
"name": "Timelines (Revamped)",
|
||||
"version": "2.4.0",
|
||||
"minAppVersion": "0.10.11",
|
||||
"description": "Successor to darakah's Timelines plugin: Generate a chronological timeline in which all 'events' are notes that include a specific tag or set of tags.",
|
||||
"author": "seanlowe",
|
||||
"authorUrl": "https://github.com/seanlowe/",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
+2693
File diff suppressed because it is too large.
Load diff
+6095
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "update-time-on-edit",
|
||||
"name": "Update time on edit",
|
||||
"version": "2.4.0",
|
||||
"minAppVersion": "1.4.4",
|
||||
"description": "Keep front matter in sync with the last edit time",
|
||||
"author": "@beaussan",
|
||||
"authorUrl": "https://github.com/beaussan",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
.time_search {
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
|
||||
.update-time-on-edit--settings--warn {
|
||||
color: #ff5a5a;
|
||||
}
|
||||
|
||||
.update-time-on-edit--bulk-modal .progress-section {
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.update-time-on-edit--bulk-modal .progress-section progress {
|
||||
flex: 1;
|
||||
}
|
||||
Vendored
+5
-3
@@ -321,18 +321,20 @@
|
||||
"soundscapes:Soundscapes: My Music": false,
|
||||
"sheet-plus:创建 Excel 文件": false,
|
||||
"wucai-highlights-official:Start WuCai syncing": false,
|
||||
"note-to-mp:复制到公众号": false
|
||||
"note-to-mp:复制到公众号": false,
|
||||
"timelines-revamped:Insert Timeline Event": false,
|
||||
"timelines-revamped:Insert Timeline Event (Frontmatter)": false
|
||||
}
|
||||
},
|
||||
"active": "9203e86001762f28",
|
||||
"active": "210f6e255abf09ac",
|
||||
"lastOpenFiles": [
|
||||
"01-工作日记/2025-08-23.md",
|
||||
"03-学习笔记/Memos.md",
|
||||
"03-学习笔记/Calibre电子书平台.md",
|
||||
"03-学习笔记/微信公众号RSS.md",
|
||||
"03-学习笔记/微信机器人.md",
|
||||
"03-学习笔记/OB插件.md",
|
||||
"03-学习笔记/Bitwarden.md",
|
||||
"01-工作日记/2025-08-23.md",
|
||||
"01-工作日记/2025-08-22.md",
|
||||
"50-Memos/2025/08/长沙的街上现在已经很凉爽了! (2025-08-22 20-46).md",
|
||||
"50-Memos/2025/08/resources/npLDiAioDzxYNMCxDndP3Q_A0FB7954-FD46-4F7F-A39E-E5284AAD9223.jpg",
|
||||
|
||||
Reference in new issue
Block a user