vault backup: 2026-05-20 16:42:03
This commit is contained in:
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"attachmentFolderPath": "/attachments",
|
||||
"alwaysUpdateLinks": true,
|
||||
"showUnsupportedFiles": true,
|
||||
"readableLineLength": true,
|
||||
"promptDelete": false
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
[
|
||||
"obsidian-git",
|
||||
"omnisearch",
|
||||
"pdf-plus",
|
||||
"obsidian-excel-to-markdown-table",
|
||||
"excel",
|
||||
"drawio-obsidian",
|
||||
"d2-obsidian",
|
||||
"obsidian-plantuml"
|
||||
]
|
||||
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"file-explorer": true,
|
||||
"global-search": true,
|
||||
"switcher": true,
|
||||
"graph": true,
|
||||
"backlink": true,
|
||||
"canvas": true,
|
||||
"outgoing-link": true,
|
||||
"tag-pane": true,
|
||||
"footnotes": false,
|
||||
"properties": true,
|
||||
"page-preview": true,
|
||||
"daily-notes": true,
|
||||
"templates": true,
|
||||
"note-composer": true,
|
||||
"command-palette": true,
|
||||
"slash-command": false,
|
||||
"editor-status": true,
|
||||
"bookmarks": true,
|
||||
"markdown-importer": false,
|
||||
"zk-prefixer": false,
|
||||
"random-note": false,
|
||||
"outline": true,
|
||||
"word-count": true,
|
||||
"slides": false,
|
||||
"audio-recorder": false,
|
||||
"workspaces": false,
|
||||
"file-recovery": true,
|
||||
"publish": false,
|
||||
"sync": true,
|
||||
"bases": true,
|
||||
"webviewer": false
|
||||
}
|
||||
+535
@@ -0,0 +1,535 @@
|
||||
/*
|
||||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
||||
if you want to view the source, please visit the github repository of this plugin: https://github.com/terrastruct/d2-obsidian
|
||||
*/
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// node_modules/lodash.debounce/index.js
|
||||
var require_lodash = __commonJS({
|
||||
"node_modules/lodash.debounce/index.js"(exports, module2) {
|
||||
var FUNC_ERROR_TEXT = "Expected a function";
|
||||
var NAN = 0 / 0;
|
||||
var symbolTag = "[object Symbol]";
|
||||
var reTrim = /^\s+|\s+$/g;
|
||||
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
||||
var reIsBinary = /^0b[01]+$/i;
|
||||
var reIsOctal = /^0o[0-7]+$/i;
|
||||
var freeParseInt = parseInt;
|
||||
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
||||
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
||||
var root = freeGlobal || freeSelf || Function("return this")();
|
||||
var objectProto = Object.prototype;
|
||||
var objectToString = objectProto.toString;
|
||||
var nativeMax = Math.max;
|
||||
var nativeMin = Math.min;
|
||||
var now = function() {
|
||||
return root.Date.now();
|
||||
};
|
||||
function debounce2(func, wait, options) {
|
||||
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
||||
if (typeof func != "function") {
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
wait = toNumber(wait) || 0;
|
||||
if (isObject(options)) {
|
||||
leading = !!options.leading;
|
||||
maxing = "maxWait" in options;
|
||||
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
||||
trailing = "trailing" in options ? !!options.trailing : trailing;
|
||||
}
|
||||
function invokeFunc(time) {
|
||||
var args = lastArgs, thisArg = lastThis;
|
||||
lastArgs = lastThis = void 0;
|
||||
lastInvokeTime = time;
|
||||
result = func.apply(thisArg, args);
|
||||
return result;
|
||||
}
|
||||
function leadingEdge(time) {
|
||||
lastInvokeTime = time;
|
||||
timerId = setTimeout(timerExpired, wait);
|
||||
return leading ? invokeFunc(time) : result;
|
||||
}
|
||||
function remainingWait(time) {
|
||||
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result2 = wait - timeSinceLastCall;
|
||||
return maxing ? nativeMin(result2, maxWait - timeSinceLastInvoke) : result2;
|
||||
}
|
||||
function shouldInvoke(time) {
|
||||
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
||||
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
||||
}
|
||||
function timerExpired() {
|
||||
var time = now();
|
||||
if (shouldInvoke(time)) {
|
||||
return trailingEdge(time);
|
||||
}
|
||||
timerId = setTimeout(timerExpired, remainingWait(time));
|
||||
}
|
||||
function trailingEdge(time) {
|
||||
timerId = void 0;
|
||||
if (trailing && lastArgs) {
|
||||
return invokeFunc(time);
|
||||
}
|
||||
lastArgs = lastThis = void 0;
|
||||
return result;
|
||||
}
|
||||
function cancel() {
|
||||
if (timerId !== void 0) {
|
||||
clearTimeout(timerId);
|
||||
}
|
||||
lastInvokeTime = 0;
|
||||
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
||||
}
|
||||
function flush() {
|
||||
return timerId === void 0 ? result : trailingEdge(now());
|
||||
}
|
||||
function debounced() {
|
||||
var time = now(), isInvoking = shouldInvoke(time);
|
||||
lastArgs = arguments;
|
||||
lastThis = this;
|
||||
lastCallTime = time;
|
||||
if (isInvoking) {
|
||||
if (timerId === void 0) {
|
||||
return leadingEdge(lastCallTime);
|
||||
}
|
||||
if (maxing) {
|
||||
timerId = setTimeout(timerExpired, wait);
|
||||
return invokeFunc(lastCallTime);
|
||||
}
|
||||
}
|
||||
if (timerId === void 0) {
|
||||
timerId = setTimeout(timerExpired, wait);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
debounced.cancel = cancel;
|
||||
debounced.flush = flush;
|
||||
return debounced;
|
||||
}
|
||||
function isObject(value) {
|
||||
var type = typeof value;
|
||||
return !!value && (type == "object" || type == "function");
|
||||
}
|
||||
function isObjectLike(value) {
|
||||
return !!value && typeof value == "object";
|
||||
}
|
||||
function isSymbol(value) {
|
||||
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
||||
}
|
||||
function toNumber(value) {
|
||||
if (typeof value == "number") {
|
||||
return value;
|
||||
}
|
||||
if (isSymbol(value)) {
|
||||
return NAN;
|
||||
}
|
||||
if (isObject(value)) {
|
||||
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
||||
value = isObject(other) ? other + "" : other;
|
||||
}
|
||||
if (typeof value != "string") {
|
||||
return value === 0 ? value : +value;
|
||||
}
|
||||
value = value.replace(reTrim, "");
|
||||
var isBinary = reIsBinary.test(value);
|
||||
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
||||
}
|
||||
module2.exports = debounce2;
|
||||
}
|
||||
});
|
||||
|
||||
// src/main.ts
|
||||
var main_exports = {};
|
||||
__export(main_exports, {
|
||||
default: () => D2Plugin
|
||||
});
|
||||
module.exports = __toCommonJS(main_exports);
|
||||
var import_obsidian3 = require("obsidian");
|
||||
|
||||
// src/settings.ts
|
||||
var import_obsidian = require("obsidian");
|
||||
|
||||
// src/constants.ts
|
||||
var LAYOUT_ENGINES = {
|
||||
DAGRE: {
|
||||
value: "dagre",
|
||||
label: "dagre"
|
||||
},
|
||||
ELK: {
|
||||
value: "elk",
|
||||
label: "ELK"
|
||||
},
|
||||
TALA: {
|
||||
value: "tala",
|
||||
label: "TALA"
|
||||
}
|
||||
};
|
||||
var RecompileIcon = `
|
||||
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.33325 83.3334V58.3334H33.3333" stroke="#2E3346" stroke-width="8.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M91.6667 16.6666V41.6666H66.6667" stroke="#2E3346" stroke-width="8.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14.6249 37.5004C16.7381 31.5287 20.3296 26.1896 25.0644 21.9813C29.7991 17.773 35.5227 14.8328 41.7011 13.4348C47.8795 12.0369 54.3114 12.2268 60.3965 13.987C66.4817 15.7471 72.0218 19.02 76.4999 23.5004C80.978 27.9808 91.6666 41.667 91.6666 41.667M8.33325 58.3337C8.33325 58.3337 19.0218 72.02 23.4999 76.5004C27.978 80.9808 33.5181 84.2537 39.6033 86.0138C45.6884 87.774 52.1203 87.9639 58.2987 86.566C64.4771 85.168 70.2007 82.2277 74.9355 78.0195C79.6702 73.8112 83.2617 68.4721 85.3749 62.5004" stroke="#2E3346" stroke-width="8.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
`;
|
||||
|
||||
// src/settings.ts
|
||||
var DEFAULT_SETTINGS = {
|
||||
layoutEngine: "dagre",
|
||||
debounce: 500,
|
||||
theme: 0,
|
||||
apiToken: "",
|
||||
d2Path: "",
|
||||
pad: 100,
|
||||
sketch: false,
|
||||
containerHeight: 800
|
||||
};
|
||||
var D2SettingsTab = class extends import_obsidian.PluginSettingTab {
|
||||
constructor(app, plugin) {
|
||||
super(app, plugin);
|
||||
this.plugin = plugin;
|
||||
}
|
||||
addTALASettings() {
|
||||
const talaSettings = this.containerEl.createEl("div");
|
||||
talaSettings.createEl("h3", {
|
||||
text: "TALA settings"
|
||||
});
|
||||
new import_obsidian.Setting(talaSettings).setName("API token").setDesc('To use TALA, copy your API token here or in ~/.local/state/tstruct/auth.json under the field "api_token"').addText((text) => text.setPlaceholder("tstruct_...").setValue(this.plugin.settings.apiToken).setDisabled(this.plugin.settings.layoutEngine !== LAYOUT_ENGINES.TALA.value).onChange(async (value) => {
|
||||
if (value && !value.startsWith("tstruct_")) {
|
||||
new import_obsidian.Notice("Invalid API token");
|
||||
} else {
|
||||
this.plugin.settings.apiToken = value;
|
||||
await this.plugin.saveSettings();
|
||||
}
|
||||
}));
|
||||
this.talaSettings = talaSettings;
|
||||
}
|
||||
display() {
|
||||
const { containerEl } = this;
|
||||
containerEl.empty();
|
||||
containerEl.createEl("h1", { text: "D2 plugin settings" });
|
||||
new import_obsidian.Setting(containerEl).setName("Layout engine").setDesc('Available layout engines include "dagre", "ELK", and "TALA" (TALA must be installed separately from D2)').addDropdown((dropdown) => {
|
||||
dropdown.addOption(LAYOUT_ENGINES.DAGRE.value, LAYOUT_ENGINES.DAGRE.label).addOption(LAYOUT_ENGINES.ELK.value, LAYOUT_ENGINES.ELK.label).addOption(LAYOUT_ENGINES.TALA.value, LAYOUT_ENGINES.TALA.label).setValue(this.plugin.settings.layoutEngine).onChange(async (value) => {
|
||||
var _a;
|
||||
this.plugin.settings.layoutEngine = value;
|
||||
await this.plugin.saveSettings();
|
||||
if (value === LAYOUT_ENGINES.TALA.value) {
|
||||
this.addTALASettings();
|
||||
} else {
|
||||
(_a = this.talaSettings) == null ? void 0 : _a.remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
new import_obsidian.Setting(containerEl).setName("Theme ID").setDesc("Available themes are located at https://github.com/terrastruct/d2/tree/master/d2themes").addText((text) => text.setPlaceholder("Enter a theme ID").setValue(String(this.plugin.settings.theme)).onChange(async (value) => {
|
||||
if (!isNaN(Number(value)) || value === "") {
|
||||
this.plugin.settings.theme = Number(value || DEFAULT_SETTINGS.theme);
|
||||
await this.plugin.saveSettings();
|
||||
} else {
|
||||
new import_obsidian.Notice("Please specify a valid number");
|
||||
}
|
||||
}));
|
||||
new import_obsidian.Setting(containerEl).setName("Pad").setDesc("Pixels padded around the rendered diagram").addText((text) => text.setPlaceholder(String(DEFAULT_SETTINGS.pad)).setValue(String(this.plugin.settings.pad)).onChange(async (value) => {
|
||||
if (isNaN(Number(value))) {
|
||||
new import_obsidian.Notice("Please specify a valid number");
|
||||
this.plugin.settings.pad = Number(DEFAULT_SETTINGS.pad);
|
||||
} else if (value === "") {
|
||||
this.plugin.settings.pad = Number(DEFAULT_SETTINGS.pad);
|
||||
} else {
|
||||
this.plugin.settings.pad = Number(value);
|
||||
}
|
||||
await this.plugin.saveSettings();
|
||||
}));
|
||||
new import_obsidian.Setting(containerEl).setName("Sketch mode").setDesc("Render the diagram to look like it was sketched by hand").addToggle((toggle) => toggle.setValue(this.plugin.settings.sketch).onChange(async (value) => {
|
||||
this.plugin.settings.sketch = value;
|
||||
await this.plugin.saveSettings();
|
||||
}));
|
||||
new import_obsidian.Setting(containerEl).setName("Container height").setDesc("Diagram max render height in pixels (Requires d2 v0.2.2 and up)").addText((text) => text.setPlaceholder(String(DEFAULT_SETTINGS.containerHeight)).setValue(String(this.plugin.settings.containerHeight)).onChange(async (value) => {
|
||||
if (isNaN(Number(value))) {
|
||||
new import_obsidian.Notice("Please specify a valid number");
|
||||
this.plugin.settings.containerHeight = Number(DEFAULT_SETTINGS.containerHeight);
|
||||
} else if (value === "") {
|
||||
this.plugin.settings.containerHeight = Number(DEFAULT_SETTINGS.containerHeight);
|
||||
} else {
|
||||
this.plugin.settings.containerHeight = Number(value);
|
||||
}
|
||||
await this.plugin.saveSettings();
|
||||
}));
|
||||
new import_obsidian.Setting(containerEl).setName("Debounce").setDesc("How often should the diagram refresh in milliseconds (min 100)").addText((text) => text.setPlaceholder(String(DEFAULT_SETTINGS.debounce)).setValue(String(this.plugin.settings.debounce)).onChange(async (value) => {
|
||||
if (isNaN(Number(value))) {
|
||||
new import_obsidian.Notice("Please specify a valid number");
|
||||
this.plugin.settings.debounce = Number(DEFAULT_SETTINGS.debounce);
|
||||
} else if (value === "") {
|
||||
this.plugin.settings.debounce = Number(DEFAULT_SETTINGS.debounce);
|
||||
} else if (Number(value) < 100) {
|
||||
new import_obsidian.Notice("The value must be greater than 100");
|
||||
this.plugin.settings.debounce = Number(DEFAULT_SETTINGS.debounce);
|
||||
} else {
|
||||
this.plugin.settings.debounce = Number(value);
|
||||
}
|
||||
await this.plugin.saveSettings();
|
||||
}));
|
||||
new import_obsidian.Setting(containerEl).setName("Path (optional)").setDesc("Customize the local path to the directory `d2` is installed in (ex. if d2 is located at `/usr/local/bin/d2`, then the path is `/usr/local/bin`). This is only necessary if `d2` is not found automatically by the plugin (but is installed).").addText((text) => {
|
||||
text.setPlaceholder("/usr/local/Cellar").setValue(this.plugin.settings.d2Path).onChange(async (value) => {
|
||||
this.plugin.settings.d2Path = value;
|
||||
await this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
if (this.plugin.settings.layoutEngine === LAYOUT_ENGINES.TALA.value) {
|
||||
this.addTALASettings();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// src/processor.ts
|
||||
var import_obsidian2 = require("obsidian");
|
||||
var import_child_process = require("child_process");
|
||||
var import_path = require("path");
|
||||
var import_lodash = __toESM(require_lodash());
|
||||
var import_os = __toESM(require("os"));
|
||||
var D2Processor = class {
|
||||
constructor(plugin) {
|
||||
this.attemptExport = async (source, el, ctx) => {
|
||||
var _a;
|
||||
el.createEl("h6", {
|
||||
text: "Generating D2 diagram...",
|
||||
cls: "D2__Loading"
|
||||
});
|
||||
const pageContainer = ctx.containerEl;
|
||||
let pageID = pageContainer.dataset.pageID;
|
||||
if (!pageID) {
|
||||
pageID = Math.floor(Math.random() * Date.now()).toString();
|
||||
pageContainer.dataset.pageID = pageID;
|
||||
}
|
||||
let debouncedFunc = this.debouncedMap.get(pageID);
|
||||
if (!debouncedFunc) {
|
||||
await this.export(source, el, ctx);
|
||||
debouncedFunc = (0, import_lodash.default)(this.export, this.plugin.settings.debounce, {
|
||||
leading: true
|
||||
});
|
||||
this.debouncedMap.set(pageID, debouncedFunc);
|
||||
return;
|
||||
}
|
||||
(_a = this.abortControllerMap.get(pageID)) == null ? void 0 : _a.abort();
|
||||
const newAbortController = new AbortController();
|
||||
this.abortControllerMap.set(pageID, newAbortController);
|
||||
await debouncedFunc(source, el, ctx, newAbortController.signal);
|
||||
};
|
||||
this.isValidUrl = (urlString) => {
|
||||
let url;
|
||||
try {
|
||||
url = new URL(urlString);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
return url.protocol === "http:" || url.protocol === "https:";
|
||||
};
|
||||
this.formatLinks = (svgEl) => {
|
||||
const links = svgEl.querySelectorAll("a");
|
||||
links.forEach((link) => {
|
||||
var _a;
|
||||
const href = (_a = link.getAttribute("href")) != null ? _a : "";
|
||||
if (!this.isValidUrl(href)) {
|
||||
link.classList.add("internal-link");
|
||||
link.setAttribute("data-href", href);
|
||||
link.setAttribute("target", "_blank");
|
||||
link.setAttribute("rel", "noopener");
|
||||
}
|
||||
});
|
||||
};
|
||||
this.sanitizeSVGIDs = (svgEl, docID) => {
|
||||
const overrides = svgEl.querySelectorAll("marker, mask, filter");
|
||||
const overrideIDs = [];
|
||||
overrides.forEach((override) => {
|
||||
const id = override.getAttribute("id");
|
||||
if (id) {
|
||||
overrideIDs.push(id);
|
||||
}
|
||||
});
|
||||
return overrideIDs.reduce((svgHTML, overrideID) => {
|
||||
return svgHTML.replaceAll(overrideID, [overrideID, docID].join("-"));
|
||||
}, svgEl.outerHTML);
|
||||
};
|
||||
this.export = async (source, el, ctx, signal) => {
|
||||
try {
|
||||
const image = await this.generatePreview(source, signal);
|
||||
if (image) {
|
||||
el.empty();
|
||||
this.prevImage = image;
|
||||
this.insertImage(image, el, ctx);
|
||||
const button = new import_obsidian2.ButtonComponent(el).setClass("Preview__Recompile").setIcon("recompile").onClick((e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
el.empty();
|
||||
this.attemptExport(source, el, ctx);
|
||||
});
|
||||
button.buttonEl.createEl("span", {
|
||||
text: "Recompile"
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
el.empty();
|
||||
const errorEl = el.createEl("pre", {
|
||||
cls: "markdown-rendered pre Preview__Error"
|
||||
});
|
||||
errorEl.createEl("code", {
|
||||
text: "D2 Compilation Error:",
|
||||
cls: "Preview__Error--Title"
|
||||
});
|
||||
errorEl.createEl("code", {
|
||||
text: err.message
|
||||
});
|
||||
if (this.prevImage) {
|
||||
this.insertImage(this.prevImage, el, ctx);
|
||||
}
|
||||
} finally {
|
||||
const pageContainer = ctx.containerEl;
|
||||
this.abortControllerMap.delete(pageContainer.dataset.id);
|
||||
}
|
||||
};
|
||||
this.plugin = plugin;
|
||||
this.debouncedMap = /* @__PURE__ */ new Map();
|
||||
this.abortControllerMap = /* @__PURE__ */ new Map();
|
||||
}
|
||||
insertImage(image, el, ctx) {
|
||||
const parser = new DOMParser();
|
||||
const svg = parser.parseFromString(image, "image/svg+xml");
|
||||
const containerEl = el.createDiv();
|
||||
const svgEl = svg.documentElement;
|
||||
svgEl.style.maxHeight = `${this.plugin.settings.containerHeight}px`;
|
||||
svgEl.style.maxWidth = "100%";
|
||||
svgEl.style.height = "fit-content";
|
||||
svgEl.style.width = "fit-content";
|
||||
this.formatLinks(svgEl);
|
||||
containerEl.innerHTML = this.sanitizeSVGIDs(svgEl, ctx.docId);
|
||||
}
|
||||
async generatePreview(source, signal) {
|
||||
var _a, _b;
|
||||
const pathArray = [process.env.PATH, "/opt/homebrew/bin", "/usr/local/bin"];
|
||||
if (import_os.default.platform() === "win32") {
|
||||
pathArray.push(`C:Program FilesD2`);
|
||||
} else {
|
||||
pathArray.push(`${process.env.HOME}/.local/bin`);
|
||||
}
|
||||
let GOPATH = "";
|
||||
try {
|
||||
GOPATH = (0, import_child_process.execSync)("go env GOPATH", {
|
||||
env: {
|
||||
...process.env,
|
||||
PATH: pathArray.join(import_path.delimiter)
|
||||
}
|
||||
}).toString();
|
||||
} catch (error) {
|
||||
}
|
||||
if (GOPATH) {
|
||||
pathArray.push(`${GOPATH.replace("\n", "")}/bin`);
|
||||
}
|
||||
if (this.plugin.settings.d2Path) {
|
||||
pathArray.push(this.plugin.settings.d2Path);
|
||||
}
|
||||
const options = {
|
||||
...process.env,
|
||||
env: {
|
||||
PATH: pathArray.join(import_path.delimiter)
|
||||
},
|
||||
signal
|
||||
};
|
||||
if (this.plugin.settings.apiToken) {
|
||||
options.env.TSTRUCT_TOKEN = this.plugin.settings.apiToken;
|
||||
}
|
||||
let args = [
|
||||
`d2`,
|
||||
"-",
|
||||
`--theme=${this.plugin.settings.theme}`,
|
||||
`--layout=${this.plugin.settings.layoutEngine}`,
|
||||
`--pad=${this.plugin.settings.pad}`,
|
||||
`--sketch=${this.plugin.settings.sketch}`,
|
||||
"--bundle=false",
|
||||
"--scale=1"
|
||||
];
|
||||
const cmd = args.join(" ");
|
||||
const child = (0, import_child_process.exec)(cmd, options);
|
||||
(_a = child.stdin) == null ? void 0 : _a.write(source);
|
||||
(_b = child.stdin) == null ? void 0 : _b.end();
|
||||
let stdout;
|
||||
let stderr;
|
||||
if (child.stdout) {
|
||||
child.stdout.on("data", (data) => {
|
||||
if (stdout === void 0) {
|
||||
stdout = data;
|
||||
} else {
|
||||
stdout += data;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (child.stderr) {
|
||||
child.stderr.on("data", (data) => {
|
||||
if (stderr === void 0) {
|
||||
stderr = data;
|
||||
} else {
|
||||
stderr += data;
|
||||
}
|
||||
});
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
child.on("error", reject);
|
||||
child.on("close", (code) => {
|
||||
if (code === 0) {
|
||||
resolve(stdout);
|
||||
return;
|
||||
} else if (stderr) {
|
||||
console.error(stderr);
|
||||
reject(new Error(stderr));
|
||||
} else if (stdout) {
|
||||
console.error(stdout);
|
||||
reject(new Error(stdout));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// src/main.ts
|
||||
var D2Plugin = class extends import_obsidian3.Plugin {
|
||||
async onload() {
|
||||
(0, import_obsidian3.addIcon)("recompile", RecompileIcon);
|
||||
await this.loadSettings();
|
||||
this.addSettingTab(new D2SettingsTab(this.app, this));
|
||||
const processor = new D2Processor(this);
|
||||
this.registerMarkdownCodeBlockProcessor("d2", processor.attemptExport);
|
||||
this.processor = processor;
|
||||
}
|
||||
onunload() {
|
||||
const abortControllers = this.processor.abortControllerMap.values();
|
||||
Array.from(abortControllers).forEach((controller) => {
|
||||
controller.abort();
|
||||
});
|
||||
}
|
||||
async loadSettings() {
|
||||
this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData());
|
||||
}
|
||||
async saveSettings() {
|
||||
await this.saveData(this.settings);
|
||||
}
|
||||
};
|
||||
|
||||
/* nosourcemap */
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "d2-obsidian",
|
||||
"name": "D2",
|
||||
"version": "1.1.4",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "The official D2 plugin for Obsidian. D2 is a modern diagram scripting language that turns text to diagrams.",
|
||||
"author": "Terrastruct",
|
||||
"authorUrl": "https://d2lang.com",
|
||||
"isDesktopOnly": true
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
.D2__Loading {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.Preview__Error--Title {
|
||||
color: #be0b41 !important;
|
||||
}
|
||||
|
||||
.Preview__Error {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.Preview__Recompile {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
height: 24px;
|
||||
padding: 6px;
|
||||
background-color: white !important;
|
||||
color: #2e3346;
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
box-shadow: none !important;
|
||||
border: 1px solid #dee1eb;
|
||||
filter: drop-shadow(1px 1px 4px rgba(31, 36, 58, 0.08));
|
||||
}
|
||||
|
||||
.Preview__Recompile:hover {
|
||||
filter: drop-shadow(2px 2px 16px rgba(31, 36, 58, 0.12));
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.Preview__Recompile > .svg-icon {
|
||||
height: 12px !important;
|
||||
width: 12px !important;
|
||||
}
|
||||
|
||||
.block-language-d2 {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.Preview__Recompile {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"welcomeComplete": true,
|
||||
"theme": {
|
||||
"dark": null,
|
||||
"layout": "full"
|
||||
},
|
||||
"drawing": {
|
||||
"sketch": false
|
||||
},
|
||||
"cssSnippets": []
|
||||
}
|
||||
+17
File diff suppressed because one or more lines are too long
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "drawio-obsidian",
|
||||
"name": "Diagrams",
|
||||
"version": "1.5.4",
|
||||
"minAppVersion": "0.9.12",
|
||||
"description": "Draw.io diagrams for Obsidian. This plugin introduces diagrams that can be included within notes or as stand-alone files. Diagrams are created as SVG files (although .drawio extensions are also supported).",
|
||||
"author": "Sam Greenhalgh",
|
||||
"authorUrl": "https://www.radicalresearch.co.uk/",
|
||||
"isDesktopOnly": true
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
.progress-bar-line {
|
||||
width: 100%;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.progress-bar-indicator {
|
||||
width: 90%;
|
||||
margin: 0 10%;
|
||||
}
|
||||
|
||||
.diagram-view svg {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.diagram-view svg a:link,
|
||||
.diagram-view svg a:visited {
|
||||
color: var(--interactive-accent, #00f);
|
||||
filter: drop-shadow(
|
||||
0 0 3px rgba(var(--interactive-accent-rgb, "0, 0, 255"), 0.5)
|
||||
);
|
||||
}
|
||||
|
||||
.diagram-view svg a:hover {
|
||||
color: var(--interactive-accent-hover, #00f);
|
||||
filter: drop-shadow(0 0 3px var(--interactive-accent-hover, #00f));
|
||||
}
|
||||
Vendored
+47153
File diff suppressed because it is too large
Load Diff
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "excel",
|
||||
"name": "Excel",
|
||||
"version": "1.3.24",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Create spreadsheets and easily embed them in Markdown",
|
||||
"author": "ljcoder",
|
||||
"authorUrl": "https://github.com/ljcoder2015",
|
||||
"fundingUrl": "https://ko-fi.com/ljcoder",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
Vendored
+1177
File diff suppressed because one or more lines are too long
@@ -0,0 +1,230 @@
|
||||
/*
|
||||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
||||
if you want to view the source, please visit the github repository of this plugin
|
||||
*/
|
||||
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
||||
var __export = (target, all) => {
|
||||
__markAsModule(target);
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __reExport = (target, module2, desc) => {
|
||||
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
||||
for (let key of __getOwnPropNames(module2))
|
||||
if (!__hasOwnProp.call(target, key) && key !== "default")
|
||||
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
||||
}
|
||||
return target;
|
||||
};
|
||||
var __toModule = (module2) => {
|
||||
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
||||
};
|
||||
var __async = (__this, __arguments, generator) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
var fulfilled = (value) => {
|
||||
try {
|
||||
step(generator.next(value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
};
|
||||
var rejected = (value) => {
|
||||
try {
|
||||
step(generator.throw(value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
};
|
||||
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
||||
step((generator = generator.apply(__this, __arguments)).next());
|
||||
});
|
||||
};
|
||||
|
||||
// src/main.ts
|
||||
__export(exports, {
|
||||
default: () => ExcelToMarkdownTablePlugin
|
||||
});
|
||||
var import_obsidian = __toModule(require("obsidian"));
|
||||
|
||||
// src/table-alignment-syntax.ts
|
||||
var ALIGNED_LEFT_SYNTAX = {
|
||||
prefix: "",
|
||||
postfix: "",
|
||||
adjust: 0
|
||||
};
|
||||
var ALIGNED_RIGHT_SYNTAX = {
|
||||
prefix: "",
|
||||
postfix: ":",
|
||||
adjust: 1
|
||||
};
|
||||
var ALIGNED_CENTER_SYNTAX = {
|
||||
prefix: ":",
|
||||
postfix: ":",
|
||||
adjust: 2
|
||||
};
|
||||
|
||||
// src/excel-markdown-helpers.ts
|
||||
var ALIGNED_LEFT = "l";
|
||||
var ALIGNED_RIGHT = "r";
|
||||
var ALIGNED_CENTER = "c";
|
||||
var EXCEL_COLUMN_DELIMITER = " ";
|
||||
var MARKDOWN_NEWLINE = "<br/>";
|
||||
var UNESCAPED_DOUBLE_QUOTE = '"';
|
||||
var EXCEL_ROW_DELIMITER_REGEX = /[\n\u0085\u2028\u2029]|\r\n?/g;
|
||||
var COLUMN_ALIGNMENT_REGEX = /^(\^[lcr])/i;
|
||||
var EXCEL_NEWLINE_ESCAPED_CELL_REGEX = /"([^\t]*(?<=[^\r])\n[^\t]*)"/g;
|
||||
var EXCEL_NEWLINE_REGEX = /\n/g;
|
||||
var EXCEL_DOUBLE_QUOTE_ESCAPED_REGEX = /""/g;
|
||||
function addMarkdownSyntax(rows, columnWidths) {
|
||||
return rows.map(function(row, rowIndex) {
|
||||
return "| " + row.map(function(column, index) {
|
||||
column = column.replace("|", "\\|");
|
||||
return column + Array(columnWidths[index] - column.length + 1).join(" ");
|
||||
}).join(" | ") + " |";
|
||||
});
|
||||
}
|
||||
function addAlignmentSyntax(markdownRows, columnWidths, colAlignments) {
|
||||
let result = Object.assign([], markdownRows);
|
||||
result.splice(1, 0, "|" + columnWidths.map(function(width, index) {
|
||||
let { prefix, postfix, adjust } = calculateAlignmentMarkdownSyntaxMetadata(colAlignments[index]);
|
||||
return prefix + Array(columnWidths[index] + 3 - adjust).join("-") + postfix;
|
||||
}).join("|") + "|");
|
||||
return result;
|
||||
}
|
||||
function calculateAlignmentMarkdownSyntaxMetadata(alignment) {
|
||||
switch (alignment) {
|
||||
case ALIGNED_LEFT:
|
||||
return ALIGNED_LEFT_SYNTAX;
|
||||
case ALIGNED_CENTER:
|
||||
return ALIGNED_CENTER_SYNTAX;
|
||||
case ALIGNED_RIGHT:
|
||||
return ALIGNED_RIGHT_SYNTAX;
|
||||
default:
|
||||
return ALIGNED_LEFT_SYNTAX;
|
||||
}
|
||||
}
|
||||
function getColumnWidthsAndAlignments(rows) {
|
||||
let colAlignments = [];
|
||||
return {
|
||||
columnWidths: rows[0].map(function(column, columnIndex) {
|
||||
let alignment = columnAlignment(column);
|
||||
colAlignments.push(alignment);
|
||||
column = column.replace(COLUMN_ALIGNMENT_REGEX, "");
|
||||
rows[0][columnIndex] = column;
|
||||
return columnWidth(rows, columnIndex);
|
||||
}),
|
||||
colAlignments
|
||||
};
|
||||
}
|
||||
function columnAlignment(columnHeaderText) {
|
||||
var m = columnHeaderText.match(COLUMN_ALIGNMENT_REGEX);
|
||||
if (m) {
|
||||
var alignChar = m[1][1].toLowerCase();
|
||||
return columnAlignmentFromChar(alignChar);
|
||||
}
|
||||
return ALIGNED_LEFT;
|
||||
}
|
||||
function columnAlignmentFromChar(alignChar) {
|
||||
switch (alignChar) {
|
||||
case ALIGNED_LEFT:
|
||||
return ALIGNED_LEFT;
|
||||
case ALIGNED_CENTER:
|
||||
return ALIGNED_CENTER;
|
||||
case ALIGNED_RIGHT:
|
||||
return ALIGNED_RIGHT;
|
||||
default:
|
||||
return ALIGNED_LEFT;
|
||||
}
|
||||
}
|
||||
function columnWidth(rows, columnIndex) {
|
||||
return Math.max.apply(null, rows.map(function(row) {
|
||||
return row[columnIndex] && row[columnIndex].length || 0;
|
||||
}));
|
||||
}
|
||||
function splitIntoRowsAndColumns(data) {
|
||||
var rows = data.split(EXCEL_ROW_DELIMITER_REGEX).map(function(row) {
|
||||
return row.split(EXCEL_COLUMN_DELIMITER);
|
||||
});
|
||||
return rows;
|
||||
}
|
||||
function replaceIntraCellNewline(data) {
|
||||
let cellReplacer = (_) => _.slice(1, -1).replace(EXCEL_DOUBLE_QUOTE_ESCAPED_REGEX, UNESCAPED_DOUBLE_QUOTE).replace(EXCEL_NEWLINE_REGEX, MARKDOWN_NEWLINE);
|
||||
return data.replace(EXCEL_NEWLINE_ESCAPED_CELL_REGEX, cellReplacer);
|
||||
}
|
||||
|
||||
// src/excel-markdown-tables.ts
|
||||
var LINE_ENDING = "\n";
|
||||
function excelToMarkdown(rawData) {
|
||||
let data = rawData.trim();
|
||||
var intraCellNewlineReplacedData = replaceIntraCellNewline(data);
|
||||
var rows = splitIntoRowsAndColumns(intraCellNewlineReplacedData);
|
||||
var { columnWidths, colAlignments } = getColumnWidthsAndAlignments(rows);
|
||||
const markdownRows = addMarkdownSyntax(rows, columnWidths);
|
||||
return addAlignmentSyntax(markdownRows, columnWidths, colAlignments).join(LINE_ENDING);
|
||||
}
|
||||
function getExcelRows(rawData) {
|
||||
let data = rawData.trim();
|
||||
var intraCellNewlineReplacedData = replaceIntraCellNewline(data);
|
||||
return splitIntoRowsAndColumns(intraCellNewlineReplacedData);
|
||||
}
|
||||
function excelRowsToMarkdown(rows) {
|
||||
var { columnWidths, colAlignments } = getColumnWidthsAndAlignments(rows);
|
||||
const markdownRows = addMarkdownSyntax(rows, columnWidths);
|
||||
return addAlignmentSyntax(markdownRows, columnWidths, colAlignments).join(LINE_ENDING);
|
||||
}
|
||||
function isExcelData(rows) {
|
||||
return rows && rows[0] && rows[0].length > 1 ? true : false;
|
||||
}
|
||||
|
||||
// src/main.ts
|
||||
var ExcelToMarkdownTablePlugin = class extends import_obsidian.Plugin {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.pasteHandler = (evt, editor) => {
|
||||
if (evt.clipboardData === null) {
|
||||
return;
|
||||
}
|
||||
if (evt.clipboardData.types.length === 1 && evt.clipboardData.types[0] === "text/plain") {
|
||||
return;
|
||||
}
|
||||
const rawData = evt.clipboardData.getData("text");
|
||||
const rows = getExcelRows(rawData);
|
||||
if (isExcelData(rows)) {
|
||||
const markdownData = excelRowsToMarkdown(rows);
|
||||
editor.replaceSelection(markdownData + "\n");
|
||||
evt.preventDefault();
|
||||
}
|
||||
};
|
||||
}
|
||||
onload() {
|
||||
return __async(this, null, function* () {
|
||||
this.addCommand({
|
||||
id: "excel-to-markdown-table",
|
||||
name: "Excel to Markdown",
|
||||
hotkeys: [
|
||||
{
|
||||
modifiers: ["Mod", "Alt"],
|
||||
key: "v"
|
||||
}
|
||||
],
|
||||
editorCallback: (editor, view) => __async(this, null, function* () {
|
||||
const text = yield navigator.clipboard.readText();
|
||||
editor.replaceSelection(excelToMarkdown(text));
|
||||
})
|
||||
});
|
||||
this.app.workspace.on("editor-paste", this.pasteHandler);
|
||||
});
|
||||
}
|
||||
onunload() {
|
||||
this.app.workspace.off("editor-paste", this.pasteHandler);
|
||||
}
|
||||
};
|
||||
|
||||
/* nosourcemap */
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "obsidian-excel-to-markdown-table",
|
||||
"name": "Excel to Markdown Table",
|
||||
"version": "0.4.0",
|
||||
"minAppVersion": "0.12.0",
|
||||
"description": "An Obsidian plugin to paste data from Microsoft Excel, Google Sheets, Apple Numbers and LibreOffice Calc as Markdown tables in Obsidian editor.",
|
||||
"author": "Ganessh Kumar R P <rpganesshkumar@gmail.com>",
|
||||
"authorUrl": "https://ganesshkumar.com",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"commitMessage": "vault backup: {{date}}",
|
||||
"autoCommitMessage": "vault backup: {{date}}",
|
||||
"commitMessageScript": "",
|
||||
"commitDateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"autoSaveInterval": 5,
|
||||
"autoPushInterval": 0,
|
||||
"autoPullInterval": 0,
|
||||
"autoPullOnBoot": true,
|
||||
"autoCommitOnlyStaged": false,
|
||||
"disablePush": false,
|
||||
"pullBeforePush": true,
|
||||
"disablePopups": false,
|
||||
"showErrorNotices": true,
|
||||
"disablePopupsForNoChanges": false,
|
||||
"listChangedFilesInMessageBody": false,
|
||||
"showStatusBar": true,
|
||||
"updateSubmodules": false,
|
||||
"syncMethod": "merge",
|
||||
"mergeStrategy": "none",
|
||||
"customMessageOnAutoBackup": false,
|
||||
"autoBackupAfterFileChange": false,
|
||||
"treeStructure": false,
|
||||
"refreshSourceControl": true,
|
||||
"basePath": "",
|
||||
"differentIntervalCommitAndPush": false,
|
||||
"changedFilesInStatusBar": false,
|
||||
"showedMobileNotice": true,
|
||||
"refreshSourceControlTimer": 7000,
|
||||
"showBranchStatusBar": true,
|
||||
"setLastSaveToLastCommit": false,
|
||||
"submoduleRecurseCheckout": false,
|
||||
"gitDir": "",
|
||||
"showFileMenu": true,
|
||||
"authorInHistoryView": "initials",
|
||||
"dateInHistoryView": false,
|
||||
"diffStyle": "split",
|
||||
"hunks": {
|
||||
"showSigns": false,
|
||||
"hunkCommands": false,
|
||||
"statusBar": "disabled"
|
||||
},
|
||||
"lineAuthor": {
|
||||
"show": false,
|
||||
"followMovement": "inactive",
|
||||
"authorDisplay": "initials",
|
||||
"showCommitHash": false,
|
||||
"dateTimeFormatOptions": "date",
|
||||
"dateTimeFormatCustomString": "YYYY-MM-DD HH:mm",
|
||||
"dateTimeTimezone": "viewer-local",
|
||||
"coloringMaxAge": "1y",
|
||||
"colorNew": {
|
||||
"r": 255,
|
||||
"g": 150,
|
||||
"b": 150
|
||||
},
|
||||
"colorOld": {
|
||||
"r": 120,
|
||||
"g": 160,
|
||||
"b": 255
|
||||
},
|
||||
"textColorCss": "var(--text-muted)",
|
||||
"ignoreWhitespace": false,
|
||||
"gutterSpacingFallbackLength": 5,
|
||||
"lastShownAuthorDisplay": "initials",
|
||||
"lastShownDateTimeFormatOptions": "date"
|
||||
}
|
||||
}
|
||||
+452
File diff suppressed because one or more lines are too long
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"author": "Vinzent",
|
||||
"authorUrl": "https://github.com/Vinzent03",
|
||||
"id": "obsidian-git",
|
||||
"name": "Git",
|
||||
"description": "Integrate Git version control with automatic backup and other advanced features.",
|
||||
"isDesktopOnly": false,
|
||||
"fundingUrl": "https://ko-fi.com/vinzent",
|
||||
"version": "2.38.2"
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
PROMPT="$1"
|
||||
TEMP_FILE="$OBSIDIAN_GIT_CREDENTIALS_INPUT"
|
||||
|
||||
cleanup() {
|
||||
rm -f "$TEMP_FILE" "$TEMP_FILE.response"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
echo "$PROMPT" > "$TEMP_FILE"
|
||||
|
||||
while [ ! -e "$TEMP_FILE.response" ]; do
|
||||
if [ ! -e "$TEMP_FILE" ]; then
|
||||
echo "Trigger file got removed: Abort" >&2
|
||||
exit 1
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
RESPONSE=$(cat "$TEMP_FILE.response")
|
||||
|
||||
echo "$RESPONSE"
|
||||
+710
@@ -0,0 +1,710 @@
|
||||
@keyframes loading {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.git-signs-gutter {
|
||||
.cm-gutterElement {
|
||||
/* Needed to align the sign properly for different line heigts. Such as
|
||||
* when having a heading or list item.
|
||||
*/
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-view"] .button-border {
|
||||
border: 2px solid var(--interactive-accent);
|
||||
border-radius: var(--radius-s);
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-view"] .view-content {
|
||||
padding-left: 0;
|
||||
padding-top: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-history-view"] .view-content {
|
||||
padding-left: 0;
|
||||
padding-top: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.loading {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.loading > svg {
|
||||
animation: 2s linear infinite loading;
|
||||
transform-origin: 50% 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.obsidian-git-center {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.obsidian-git-textarea {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.obsidian-git-disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.obsidian-git-center-button {
|
||||
display: block;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.tooltip.mod-left {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.tooltip.mod-right {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* Limits the scrollbar to the view body */
|
||||
.git-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Re-enable wrapping of nav buttns to prevent overflow on smaller screens #*/
|
||||
.workspace-drawer .git-view .nav-buttons-container {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.git-tools {
|
||||
display: flex;
|
||||
margin-left: auto;
|
||||
}
|
||||
.git-tools .type {
|
||||
padding-left: var(--size-2-1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 11px;
|
||||
}
|
||||
|
||||
.git-tools .type[data-type="M"] {
|
||||
color: orange;
|
||||
}
|
||||
.git-tools .type[data-type="D"] {
|
||||
color: red;
|
||||
}
|
||||
.git-tools .buttons {
|
||||
display: flex;
|
||||
}
|
||||
.git-tools .buttons > * {
|
||||
padding: 0 0;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-view"] .tree-item-self,
|
||||
.workspace-leaf-content[data-type="git-history-view"] .tree-item-self {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-view"]
|
||||
.tree-item-self:hover
|
||||
.clickable-icon,
|
||||
.workspace-leaf-content[data-type="git-history-view"]
|
||||
.tree-item-self:hover
|
||||
.clickable-icon {
|
||||
color: var(--icon-color-hover);
|
||||
}
|
||||
|
||||
/* Highlight an item as active if it's diff is currently opened */
|
||||
.is-active .git-tools .buttons > * {
|
||||
color: var(--nav-item-color-active);
|
||||
}
|
||||
|
||||
.git-author {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
.git-date {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
.git-ref {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
/* ====== diff2html ======
|
||||
The following styles are adapted from the obsidian-version-history plugin by
|
||||
@kometenstaub https://github.com/kometenstaub/obsidian-version-history-diff/blob/main/src/styles.scss
|
||||
which itself is adapted from the diff2html library with the following original license:
|
||||
|
||||
https://github.com/rtfpessoa/diff2html/blob/master/LICENSE.md
|
||||
|
||||
Copyright 2014-2016 Rodrigo Fernandes https://rtfpessoa.github.io/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
.theme-dark,
|
||||
.theme-light {
|
||||
--git-delete-bg: #ff475040;
|
||||
--git-delete-hl: #96050a75;
|
||||
--git-insert-bg: #68d36840;
|
||||
--git-insert-hl: #23c02350;
|
||||
--git-change-bg: #ffd55840;
|
||||
--git-selected: #3572b0;
|
||||
|
||||
--git-delete: #c33;
|
||||
--git-insert: #399839;
|
||||
--git-change: #d0b44c;
|
||||
--git-move: #3572b0;
|
||||
}
|
||||
|
||||
.git-diff {
|
||||
.d2h-d-none {
|
||||
display: none;
|
||||
}
|
||||
.d2h-wrapper {
|
||||
text-align: left;
|
||||
border-radius: 0.25em;
|
||||
overflow: auto;
|
||||
}
|
||||
.d2h-file-header.d2h-file-header {
|
||||
background-color: var(--background-secondary);
|
||||
border-bottom: 1px solid var(--background-modifier-border);
|
||||
font-family:
|
||||
Source Sans Pro,
|
||||
Helvetica Neue,
|
||||
Helvetica,
|
||||
Arial,
|
||||
sans-serif;
|
||||
height: 35px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.d2h-file-header,
|
||||
.d2h-file-stats {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
.d2h-file-header {
|
||||
display: none;
|
||||
}
|
||||
.d2h-file-stats {
|
||||
font-size: 14px;
|
||||
margin-left: auto;
|
||||
}
|
||||
.d2h-lines-added {
|
||||
border: 1px solid var(--color-green);
|
||||
border-radius: 5px 0 0 5px;
|
||||
color: var(--color-green);
|
||||
padding: 2px;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.d2h-lines-deleted {
|
||||
border: 1px solid var(--color-red);
|
||||
border-radius: 0 5px 5px 0;
|
||||
color: var(--color-red);
|
||||
margin-left: 1px;
|
||||
padding: 2px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.d2h-file-name-wrapper {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
font-size: 15px;
|
||||
width: 100%;
|
||||
}
|
||||
.d2h-file-name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: var(--text-normal);
|
||||
font-size: var(--h5-size);
|
||||
}
|
||||
.d2h-file-wrapper {
|
||||
border: 1px solid var(--background-secondary-alt);
|
||||
border-radius: 3px;
|
||||
margin-bottom: 1em;
|
||||
max-height: 100%;
|
||||
}
|
||||
.d2h-file-collapse {
|
||||
-webkit-box-pack: end;
|
||||
-ms-flex-pack: end;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
border: 1px solid var(--background-secondary-alt);
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
font-size: 12px;
|
||||
justify-content: flex-end;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
.d2h-file-collapse.d2h-selected {
|
||||
background-color: var(--git-selected);
|
||||
}
|
||||
.d2h-file-collapse-input {
|
||||
margin: 0 4px 0 0;
|
||||
}
|
||||
.d2h-diff-table {
|
||||
border-collapse: collapse;
|
||||
font-family: var(--font-monospace);
|
||||
font-size: var(--code-size);
|
||||
width: 100%;
|
||||
}
|
||||
.d2h-files-diff {
|
||||
width: 100%;
|
||||
}
|
||||
.d2h-file-diff {
|
||||
/*
|
||||
overflow-y: scroll;
|
||||
*/
|
||||
border-radius: 5px;
|
||||
font-size: var(--font-text-size);
|
||||
line-height: var(--line-height-normal);
|
||||
}
|
||||
.d2h-file-side-diff {
|
||||
display: inline-block;
|
||||
margin-bottom: -8px;
|
||||
margin-right: -4px;
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
width: 50%;
|
||||
}
|
||||
.d2h-code-line {
|
||||
padding-left: 6em;
|
||||
padding-right: 1.5em;
|
||||
}
|
||||
.d2h-code-line,
|
||||
.d2h-code-side-line {
|
||||
display: inline-block;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
.d2h-code-side-line {
|
||||
/* needed to be changed */
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
.d2h-code-line-ctn {
|
||||
word-wrap: normal;
|
||||
background: none;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
-webkit-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
vertical-align: middle;
|
||||
width: 100%;
|
||||
/* only works for line-by-line */
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.d2h-code-line del,
|
||||
.d2h-code-side-line del {
|
||||
background-color: var(--git-delete-hl);
|
||||
color: var(--text-normal);
|
||||
}
|
||||
.d2h-code-line del,
|
||||
.d2h-code-line ins,
|
||||
.d2h-code-side-line del,
|
||||
.d2h-code-side-line ins {
|
||||
border-radius: 0.2em;
|
||||
display: inline-block;
|
||||
margin-top: -1px;
|
||||
text-decoration: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.d2h-code-line ins,
|
||||
.d2h-code-side-line ins {
|
||||
background-color: var(--git-insert-hl);
|
||||
text-align: left;
|
||||
}
|
||||
.d2h-code-line-prefix {
|
||||
word-wrap: normal;
|
||||
background: none;
|
||||
display: inline;
|
||||
padding: 0;
|
||||
white-space: pre;
|
||||
}
|
||||
.line-num1 {
|
||||
float: left;
|
||||
}
|
||||
.line-num1,
|
||||
.line-num2 {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
/*
|
||||
padding: 0 0.5em;
|
||||
*/
|
||||
text-overflow: ellipsis;
|
||||
width: 2.5em;
|
||||
padding-left: 0;
|
||||
}
|
||||
.line-num2 {
|
||||
float: right;
|
||||
}
|
||||
.d2h-code-linenumber {
|
||||
background-color: var(--background-primary);
|
||||
border: solid var(--background-modifier-border);
|
||||
border-width: 0 1px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
color: var(--text-faint);
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
text-align: right;
|
||||
width: 5.5em;
|
||||
}
|
||||
.d2h-code-linenumber:after {
|
||||
content: "\200b";
|
||||
}
|
||||
.d2h-code-side-linenumber {
|
||||
background-color: var(--background-primary);
|
||||
border: solid var(--background-modifier-border);
|
||||
border-width: 0 1px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
color: var(--text-faint);
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
padding: 0 0.5em;
|
||||
text-align: right;
|
||||
text-overflow: ellipsis;
|
||||
width: 4em;
|
||||
/* needed to be changed */
|
||||
display: table-cell;
|
||||
position: relative;
|
||||
}
|
||||
.d2h-code-side-linenumber:after {
|
||||
content: "\200b";
|
||||
}
|
||||
.d2h-code-side-emptyplaceholder,
|
||||
.d2h-emptyplaceholder {
|
||||
background-color: var(--background-primary);
|
||||
border-color: var(--background-modifier-border);
|
||||
}
|
||||
.d2h-code-line-prefix,
|
||||
.d2h-code-linenumber,
|
||||
.d2h-code-side-linenumber,
|
||||
.d2h-emptyplaceholder {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.d2h-code-linenumber,
|
||||
.d2h-code-side-linenumber {
|
||||
direction: rtl;
|
||||
}
|
||||
.d2h-del {
|
||||
background-color: var(--git-delete-bg);
|
||||
border-color: var(--git-delete-hl);
|
||||
}
|
||||
.d2h-ins {
|
||||
background-color: var(--git-insert-bg);
|
||||
border-color: var(--git-insert-hl);
|
||||
}
|
||||
.d2h-info {
|
||||
background-color: var(--background-primary);
|
||||
border-color: var(--background-modifier-border);
|
||||
color: var(--text-faint);
|
||||
}
|
||||
.d2h-del,
|
||||
.d2h-ins,
|
||||
.d2h-file-diff .d2h-change {
|
||||
color: var(--text-normal);
|
||||
}
|
||||
.d2h-file-diff .d2h-del.d2h-change {
|
||||
background-color: var(--git-change-bg);
|
||||
}
|
||||
.d2h-file-diff .d2h-ins.d2h-change {
|
||||
background-color: var(--git-insert-bg);
|
||||
}
|
||||
.d2h-file-list-wrapper {
|
||||
a {
|
||||
text-decoration: none;
|
||||
cursor: default;
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
|
||||
svg {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.d2h-file-list-header {
|
||||
text-align: left;
|
||||
}
|
||||
.d2h-file-list-title {
|
||||
display: none;
|
||||
}
|
||||
.d2h-file-list-line {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
text-align: left;
|
||||
}
|
||||
.d2h-file-list {
|
||||
}
|
||||
.d2h-file-list > li {
|
||||
border-bottom: 1px solid var(--background-modifier-border);
|
||||
margin: 0;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.d2h-file-list > li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.d2h-file-switch {
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
font-size: 10px;
|
||||
}
|
||||
.d2h-icon {
|
||||
fill: currentColor;
|
||||
margin-right: 10px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.d2h-deleted {
|
||||
color: var(--git-delete);
|
||||
}
|
||||
.d2h-added {
|
||||
color: var(--git-insert);
|
||||
}
|
||||
.d2h-changed {
|
||||
color: var(--git-change);
|
||||
}
|
||||
.d2h-moved {
|
||||
color: var(--git-move);
|
||||
}
|
||||
.d2h-tag {
|
||||
background-color: var(--background-secondary);
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
font-size: 10px;
|
||||
margin-left: 5px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.d2h-deleted-tag {
|
||||
border: 1px solid var(--git-delete);
|
||||
}
|
||||
.d2h-added-tag {
|
||||
border: 1px solid var(--git-insert);
|
||||
}
|
||||
.d2h-changed-tag {
|
||||
border: 1px solid var(--git-change);
|
||||
}
|
||||
.d2h-moved-tag {
|
||||
border: 1px solid var(--git-move);
|
||||
}
|
||||
|
||||
/* needed for line-by-line*/
|
||||
|
||||
.d2h-diff-tbody {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
/* ====================== Line Authoring Information ====================== */
|
||||
|
||||
.cm-gutterElement.obs-git-blame-gutter {
|
||||
/* Add background color to spacing inbetween and around the gutter for better aesthetics */
|
||||
border-width: 0px 2px 0.2px 2px;
|
||||
border-style: solid;
|
||||
border-color: var(--background-secondary);
|
||||
background-color: var(--background-secondary);
|
||||
}
|
||||
|
||||
.cm-gutterElement.obs-git-blame-gutter > div,
|
||||
.line-author-settings-preview {
|
||||
/* delegate text color to settings */
|
||||
color: var(--obs-git-gutter-text);
|
||||
font-family: monospace;
|
||||
height: 100%; /* ensure, that age-based background color occupies entire parent */
|
||||
text-align: right;
|
||||
padding: 0px 6px 0px 6px;
|
||||
white-space: pre; /* Keep spaces and do not collapse them. */
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
/* hide git blame gutter not to superpose text */
|
||||
.cm-gutterElement.obs-git-blame-gutter {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.git-unified-diff-view,
|
||||
.git-split-diff-view .cm-deletedLine .cm-changedText {
|
||||
background-color: #ee443330;
|
||||
}
|
||||
|
||||
.git-unified-diff-view,
|
||||
.git-split-diff-view .cm-insertedLine .cm-changedText {
|
||||
background-color: #22bb2230;
|
||||
}
|
||||
|
||||
.git-obscure-prompt[git-is-obscured="true"] #git-show-password:after {
|
||||
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-eye"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"></path><circle cx="12" cy="12" r="3"></circle></svg>');
|
||||
}
|
||||
|
||||
.git-obscure-prompt[git-is-obscured="false"] #git-show-password:after {
|
||||
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-eye-off"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"></path><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"></path><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"></path><path d="m2 2 20 20"></path></svg>');
|
||||
}
|
||||
|
||||
/* Override styling of Codemirror merge view "collapsed lines" indicator */
|
||||
.git-split-diff-view .ͼ2 .cm-collapsedLines {
|
||||
background: var(--interactive-normal);
|
||||
border-radius: var(--radius-m);
|
||||
color: var(--text-accent);
|
||||
font-size: var(--font-small);
|
||||
padding: var(--size-4-1) var(--size-4-1);
|
||||
}
|
||||
.git-split-diff-view .ͼ2 .cm-collapsedLines:hover {
|
||||
background: var(--interactive-hover);
|
||||
color: var(--text-accent-hover);
|
||||
}
|
||||
|
||||
.git-signs-gutter {
|
||||
.cm-gutterElement {
|
||||
display: grid;
|
||||
}
|
||||
}
|
||||
|
||||
.git-gutter-marker:hover {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-add {
|
||||
background-color: var(--color-green);
|
||||
justify-self: center;
|
||||
height: inherit;
|
||||
width: 0.2rem;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-change {
|
||||
background-color: var(--color-yellow);
|
||||
justify-self: center;
|
||||
height: inherit;
|
||||
width: 0.2rem;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-changedelete {
|
||||
color: var(--color-yellow);
|
||||
font-weight: var(--font-bold);
|
||||
font-size: 1rem;
|
||||
justify-self: center;
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-delete {
|
||||
background-color: var(--color-red);
|
||||
height: 0.2rem;
|
||||
width: 0.8rem;
|
||||
align-self: end;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-topdelete {
|
||||
background-color: var(--color-red);
|
||||
height: 0.2rem;
|
||||
width: 0.8rem;
|
||||
align-self: start;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-change {
|
||||
width: 0.6rem;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-add {
|
||||
width: 0.6rem;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-delete {
|
||||
height: 0.6rem;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-topdelete {
|
||||
height: 0.6rem;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-changedelete {
|
||||
font-weight: var(--font-bold);
|
||||
}
|
||||
|
||||
.git-gutter-marker.staged {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.git-diff {
|
||||
.cm-merge-revert {
|
||||
width: 4em;
|
||||
}
|
||||
/* Ensure that merge revert markers are positioned correctly */
|
||||
.cm-merge-revert > * {
|
||||
position: absolute;
|
||||
background-color: var(--background-secondary);
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
/* Prevent shifting of the editor when git signs gutter is the only gutter present */
|
||||
.cm-gutters.cm-gutters-before:has(> .git-signs-gutter:only-child) {
|
||||
margin-inline-end: 0;
|
||||
.git-signs-gutter {
|
||||
margin-inline-start: -1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.git-changes-status-bar-colored {
|
||||
.git-add {
|
||||
color: var(--color-green);
|
||||
}
|
||||
.git-change {
|
||||
color: var(--color-yellow);
|
||||
}
|
||||
.git-delete {
|
||||
color: var(--color-red);
|
||||
}
|
||||
}
|
||||
|
||||
.git-changes-status-bar .git-add {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
|
||||
.git-changes-status-bar .git-change {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
+7938
File diff suppressed because one or more lines are too long
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "obsidian-plantuml",
|
||||
"name": "PlantUML",
|
||||
"version": "1.8.1",
|
||||
"minAppVersion": "1.12.3",
|
||||
"description": "Render PlantUML diagrams.",
|
||||
"author": "Johannes Theiner",
|
||||
"authorUrl": "https://github.com/joethei/",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
.puml-settings-area {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.plantuml-source-view .cm-activeLine {
|
||||
background-color: unset !important;
|
||||
}
|
||||
|
||||
.plantuml-source-view .cm-gutters {
|
||||
background-color: unset !important;
|
||||
}
|
||||
|
||||
.plantuml-source-view .cm-cursor {
|
||||
border-left: 1.2px solid var(--text-muted);
|
||||
}
|
||||
|
||||
.plantuml-source-view .cm-selectionBackground {
|
||||
background-color: var(--text-selection) !important;
|
||||
}
|
||||
|
||||
.puml-loading {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
.internal-embed.file-embed[src$=".puml"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.internal-embed.file-embed[src$=".pu"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.puml-error {
|
||||
color: var(--text-error);
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"useCache": true,
|
||||
"hideExcluded": false,
|
||||
"recencyBoost": "0",
|
||||
"downrankedFoldersFilters": [],
|
||||
"ignoreDiacritics": true,
|
||||
"ignoreArabicDiacritics": false,
|
||||
"indexedFileTypes": [],
|
||||
"displayTitle": "",
|
||||
"PDFIndexing": false,
|
||||
"officeIndexing": false,
|
||||
"imagesIndexing": false,
|
||||
"aiImageIndexing": false,
|
||||
"unsupportedFilesIndexing": "default",
|
||||
"splitCamelCase": false,
|
||||
"openInNewPane": false,
|
||||
"vimLikeNavigationShortcut": false,
|
||||
"ribbonIcon": true,
|
||||
"showExcerpt": true,
|
||||
"maxEmbeds": 5,
|
||||
"renderLineReturnInExcerpts": true,
|
||||
"showCreateButton": false,
|
||||
"highlight": true,
|
||||
"showPreviousQueryResults": true,
|
||||
"simpleSearch": false,
|
||||
"tokenizeUrls": false,
|
||||
"fuzziness": "1",
|
||||
"weightBasename": 10,
|
||||
"weightDirectory": 7,
|
||||
"weightH1": 6,
|
||||
"weightH2": 5,
|
||||
"weightH3": 4,
|
||||
"weightUnmarkedTags": 2,
|
||||
"weightCustomProperties": [],
|
||||
"httpApiEnabled": false,
|
||||
"httpApiPort": "51361",
|
||||
"httpApiNotice": true,
|
||||
"welcomeMessage": "1.21.0",
|
||||
"verboseLogging": false,
|
||||
"DANGER_httpHost": null,
|
||||
"DANGER_forceSaveCache": false
|
||||
}
|
||||
Vendored
+171
File diff suppressed because one or more lines are too long
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "omnisearch",
|
||||
"name": "Omnisearch",
|
||||
"version": "1.28.2",
|
||||
"minAppVersion": "1.7.2",
|
||||
"description": "A search engine that just works",
|
||||
"author": "Simon Cambier",
|
||||
"authorUrl": "https://github.com/scambier/obsidian-omnisearch",
|
||||
"fundingUrl": {
|
||||
"Github": "https://github.com/sponsors/scambier",
|
||||
"Ko-fi": "https://ko-fi.com/scambier"
|
||||
},
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
.omnisearch-modal {
|
||||
}
|
||||
|
||||
.omnisearch-result {
|
||||
white-space: normal;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
/* justify-content: space-between; */
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.omnisearch-result__title-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
column-gap: 5px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.omnisearch-result__title {
|
||||
white-space: pre-wrap;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.omnisearch-result__title > span {
|
||||
}
|
||||
|
||||
.omnisearch-result__folder-path {
|
||||
font-size: 0.75rem;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.omnisearch-result__extension {
|
||||
font-size: 0.7rem;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.omnisearch-result__counter {
|
||||
font-size: 0.7rem;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.omnisearch-result__body {
|
||||
white-space: normal;
|
||||
font-size: small;
|
||||
word-wrap: normal;
|
||||
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
|
||||
color: var(--text-muted);
|
||||
margin-inline-start: 0.5em;
|
||||
}
|
||||
|
||||
.omnisearch-result__embed {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
|
||||
.omnisearch-result__image-container {
|
||||
flex-basis: 20%;
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.omnisearch-highlight {
|
||||
}
|
||||
|
||||
.omnisearch-default-highlight {
|
||||
text-decoration: underline;
|
||||
text-decoration-color: var(--text-highlight-bg);
|
||||
text-decoration-thickness: 3px;
|
||||
text-underline-offset: -1px;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
.omnisearch-input-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.omnisearch-result__icon {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.omnisearch-result__icon svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.omnisearch-result__icon--emoji {
|
||||
font-size: 16px;
|
||||
vertical-align: middle;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
.omnisearch-input-container {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.omnisearch-input-container__buttons {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
padding: 0 1em 0 1em;
|
||||
gap: 1em;
|
||||
}
|
||||
.omnisearch-input-container__buttons > button {
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 600px) {
|
||||
.omnisearch-input-container__buttons {
|
||||
margin-inline-end: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.omnisearch-input-field {
|
||||
position: relative;
|
||||
flex-grow: 1;
|
||||
}
|
||||
Vendored
+326
@@ -0,0 +1,326 @@
|
||||
{
|
||||
"displayTextFormats": [
|
||||
{
|
||||
"name": "Title & page",
|
||||
"template": "{{file.basename}}, p.{{pageLabel}}"
|
||||
},
|
||||
{
|
||||
"name": "Page",
|
||||
"template": "p.{{pageLabel}}"
|
||||
},
|
||||
{
|
||||
"name": "Text",
|
||||
"template": "{{text}}"
|
||||
},
|
||||
{
|
||||
"name": "Emoji",
|
||||
"template": "📖"
|
||||
},
|
||||
{
|
||||
"name": "None",
|
||||
"template": ""
|
||||
}
|
||||
],
|
||||
"defaultDisplayTextFormatIndex": 0,
|
||||
"syncDisplayTextFormat": true,
|
||||
"syncDefaultDisplayTextFormat": false,
|
||||
"copyCommands": [
|
||||
{
|
||||
"name": "Quote",
|
||||
"template": "> ({{linkWithDisplay}})\n> {{text}}\n"
|
||||
},
|
||||
{
|
||||
"name": "Link",
|
||||
"template": "{{linkWithDisplay}}"
|
||||
},
|
||||
{
|
||||
"name": "Embed",
|
||||
"template": "!{{link}}"
|
||||
},
|
||||
{
|
||||
"name": "Callout",
|
||||
"template": "> [!{{calloutType}}|{{color}}] {{linkWithDisplay}}\n> {{text}}\n"
|
||||
},
|
||||
{
|
||||
"name": "Quote in callout",
|
||||
"template": "> [!{{calloutType}}|{{color}}] {{linkWithDisplay}}\n> > {{text}}\n> \n> "
|
||||
}
|
||||
],
|
||||
"useAnotherCopyTemplateWhenNoSelection": false,
|
||||
"copyTemplateWhenNoSelection": "{{linkToPageWithDisplay}}",
|
||||
"trimSelectionEmbed": false,
|
||||
"embedMargin": 50,
|
||||
"noSidebarInEmbed": true,
|
||||
"noSpreadModeInEmbed": true,
|
||||
"embedUnscrollable": false,
|
||||
"singleTabForSinglePDF": true,
|
||||
"highlightExistingTab": false,
|
||||
"existingTabHighlightOpacity": 0.5,
|
||||
"existingTabHighlightDuration": 0.75,
|
||||
"paneTypeForFirstPDFLeaf": "left",
|
||||
"openLinkNextToExistingPDFTab": true,
|
||||
"openPDFWithDefaultApp": false,
|
||||
"openPDFWithDefaultAppAndObsidian": true,
|
||||
"focusObsidianAfterOpenPDFWithDefaultApp": true,
|
||||
"syncWithDefaultApp": false,
|
||||
"dontActivateAfterOpenPDF": true,
|
||||
"dontActivateAfterOpenMD": true,
|
||||
"highlightDuration": 0.75,
|
||||
"noTextHighlightsInEmbed": false,
|
||||
"noAnnotationHighlightsInEmbed": true,
|
||||
"persistentTextHighlightsInEmbed": true,
|
||||
"persistentAnnotationHighlightsInEmbed": false,
|
||||
"highlightBacklinks": true,
|
||||
"selectionBacklinkVisualizeStyle": "highlight",
|
||||
"dblclickEmbedToOpenLink": true,
|
||||
"highlightBacklinksPane": true,
|
||||
"highlightOnHoverBacklinkPane": true,
|
||||
"backlinkHoverColor": "",
|
||||
"colors": {
|
||||
"Yellow": "#ffd000",
|
||||
"Red": "#ea5252",
|
||||
"Note": "#086ddd",
|
||||
"Important": "#bb61e5"
|
||||
},
|
||||
"defaultColor": "",
|
||||
"defaultColorPaletteItemIndex": 0,
|
||||
"syncColorPaletteItem": true,
|
||||
"syncDefaultColorPaletteItem": false,
|
||||
"colorPaletteInToolbar": true,
|
||||
"noColorButtonInColorPalette": true,
|
||||
"colorPaletteInEmbedToolbar": false,
|
||||
"quietColorPaletteTooltip": false,
|
||||
"showStatusInToolbar": true,
|
||||
"highlightColorSpecifiedOnly": false,
|
||||
"doubleClickHighlightToOpenBacklink": true,
|
||||
"hoverHighlightAction": "preview",
|
||||
"paneTypeForFirstMDLeaf": "right",
|
||||
"singleMDLeafInSidebar": true,
|
||||
"alwaysUseSidebar": true,
|
||||
"ignoreExistingMarkdownTabIn": [],
|
||||
"defaultColorPaletteActionIndex": 4,
|
||||
"syncColorPaletteAction": true,
|
||||
"syncDefaultColorPaletteAction": false,
|
||||
"proxyMDProperty": "PDF",
|
||||
"hoverPDFLinkToOpen": false,
|
||||
"ignoreHeightParamInPopoverPreview": true,
|
||||
"filterBacklinksByPageDefault": true,
|
||||
"showBacklinkToPage": true,
|
||||
"enableHoverPDFInternalLink": true,
|
||||
"recordPDFInternalLinkHistory": true,
|
||||
"alwaysRecordHistory": true,
|
||||
"renderMarkdownInStickyNote": false,
|
||||
"enablePDFEdit": false,
|
||||
"author": "",
|
||||
"writeHighlightToFileOpacity": 0.2,
|
||||
"defaultWriteFileToggle": false,
|
||||
"syncWriteFileToggle": true,
|
||||
"syncDefaultWriteFileToggle": false,
|
||||
"enableAnnotationDeletion": true,
|
||||
"warnEveryAnnotationDelete": false,
|
||||
"warnBacklinkedAnnotationDelete": true,
|
||||
"enableAnnotationContentEdit": true,
|
||||
"enableEditEncryptedPDF": false,
|
||||
"pdfLinkColor": "#04a802",
|
||||
"pdfLinkBorder": false,
|
||||
"replaceContextMenu": true,
|
||||
"showContextMenuOnMouseUpIf": "Mod",
|
||||
"contextMenuConfig": [
|
||||
{
|
||||
"id": "action",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "selection",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "write-file",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "annotation",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "modify-annotation",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "link",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "text",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "search",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "speech",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "page",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "settings",
|
||||
"visible": true
|
||||
}
|
||||
],
|
||||
"selectionProductMenuConfig": [
|
||||
"color",
|
||||
"copy-format",
|
||||
"display"
|
||||
],
|
||||
"writeFileProductMenuConfig": [
|
||||
"color",
|
||||
"copy-format",
|
||||
"display"
|
||||
],
|
||||
"annotationProductMenuConfig": [
|
||||
"copy-format",
|
||||
"display"
|
||||
],
|
||||
"updateColorPaletteStateFromContextMenu": true,
|
||||
"mobileCopyAction": "pdf-plus",
|
||||
"showContextMenuOnTablet": false,
|
||||
"executeBuiltinCommandForOutline": true,
|
||||
"executeBuiltinCommandForZoom": true,
|
||||
"executeFontSizeAdjusterCommand": true,
|
||||
"closeSidebarWithShowCommandIfExist": true,
|
||||
"autoHidePDFSidebar": false,
|
||||
"defaultSidebarView": 1,
|
||||
"outlineDrag": true,
|
||||
"outlineContextMenu": true,
|
||||
"outlineLinkDisplayTextFormat": "{{file.basename}}, {{text}}",
|
||||
"outlineLinkCopyFormat": "{{linkWithDisplay}}",
|
||||
"recordHistoryOnOutlineClick": true,
|
||||
"popoverPreviewOnOutlineHover": true,
|
||||
"thumbnailDrag": true,
|
||||
"thumbnailContextMenu": true,
|
||||
"thumbnailLinkDisplayTextFormat": "{{file.basename}}, p.{{pageLabel}}",
|
||||
"thumbnailLinkCopyFormat": "{{linkWithDisplay}}",
|
||||
"recordHistoryOnThumbnailClick": true,
|
||||
"popoverPreviewOnThumbnailHover": true,
|
||||
"annotationPopupDrag": true,
|
||||
"showAnnotationPopupOnHover": true,
|
||||
"useCallout": true,
|
||||
"calloutType": "PDF",
|
||||
"calloutIcon": "highlighter",
|
||||
"highlightBacklinksInEmbed": false,
|
||||
"highlightBacklinksInHoverPopover": false,
|
||||
"highlightBacklinksInCanvas": true,
|
||||
"clickPDFInternalLinkWithModifierKey": true,
|
||||
"clickOutlineItemWithModifierKey": true,
|
||||
"clickThumbnailWithModifierKey": true,
|
||||
"focusEditorAfterAutoPaste": true,
|
||||
"clearSelectionAfterAutoPaste": true,
|
||||
"respectCursorPositionWhenAutoPaste": true,
|
||||
"blankLineAboveAppendedContent": true,
|
||||
"autoCopy": false,
|
||||
"autoFocus": false,
|
||||
"autoPaste": false,
|
||||
"autoFocusTarget": "last-active-and-open-then-last-paste",
|
||||
"autoPasteTarget": "last-active-and-open-then-last-paste",
|
||||
"openAutoFocusTargetIfNotOpened": true,
|
||||
"howToOpenAutoFocusTargetIfNotOpened": "right",
|
||||
"closeHoverEditorWhenLostFocus": true,
|
||||
"closeSidebarWhenLostFocus": false,
|
||||
"openAutoFocusTargetInEditingView": true,
|
||||
"executeCommandWhenTargetNotIdentified": true,
|
||||
"commandToExecuteWhenTargetNotIdentified": "switcher:open",
|
||||
"autoPasteTargetDialogTimeoutSec": 20,
|
||||
"autoCopyToggleRibbonIcon": true,
|
||||
"autoCopyIconName": "highlighter",
|
||||
"autoFocusToggleRibbonIcon": true,
|
||||
"autoFocusIconName": "zap",
|
||||
"autoPasteToggleRibbonIcon": true,
|
||||
"autoPasteIconName": "clipboard-paste",
|
||||
"viewSyncFollowPageNumber": true,
|
||||
"viewSyncPageDebounceInterval": 0.3,
|
||||
"openAfterExtractPages": true,
|
||||
"howToOpenExtractedPDF": "tab",
|
||||
"warnEveryPageDelete": false,
|
||||
"warnBacklinkedPageDelete": true,
|
||||
"extractPageInPlace": false,
|
||||
"askExtractPageInPlace": true,
|
||||
"pageLabelUpdateWhenInsertPage": "keep",
|
||||
"pageLabelUpdateWhenDeletePage": "keep",
|
||||
"pageLabelUpdateWhenExtractPage": "keep",
|
||||
"askPageLabelUpdateWhenInsertPage": true,
|
||||
"askPageLabelUpdateWhenDeletePage": true,
|
||||
"askPageLabelUpdateWhenExtractPage": true,
|
||||
"copyOutlineAsListFormat": "{{linkWithDisplay}}",
|
||||
"copyOutlineAsListDisplayTextFormat": "{{text}}",
|
||||
"copyOutlineAsHeadingsFormat": "{{text}}\n\n{{linkWithDisplay}}",
|
||||
"copyOutlineAsHeadingsDisplayTextFormat": "p.{{pageLabel}}",
|
||||
"copyOutlineAsHeadingsMinLevel": 2,
|
||||
"newFileNameFormat": "",
|
||||
"newFileTemplatePath": "",
|
||||
"newPDFLocation": "current",
|
||||
"newPDFFolderPath": "",
|
||||
"rectEmbedStaticImage": false,
|
||||
"rectImageFormat": "file",
|
||||
"rectImageExtension": "webp",
|
||||
"zoomToFitRect": false,
|
||||
"rectFollowAdaptToTheme": true,
|
||||
"rectEmbedResolution": 100,
|
||||
"includeColorWhenCopyingRectLink": true,
|
||||
"backlinkIconSize": 50,
|
||||
"showBacklinkIconForSelection": false,
|
||||
"showBacklinkIconForAnnotation": false,
|
||||
"showBacklinkIconForOffset": true,
|
||||
"showBacklinkIconForRect": false,
|
||||
"showBoundingRectForBacklinkedAnnot": false,
|
||||
"hideReplyAnnotation": false,
|
||||
"hideStampAnnotation": false,
|
||||
"searchLinkHighlightAll": "true",
|
||||
"searchLinkCaseSensitive": "true",
|
||||
"searchLinkMatchDiacritics": "default",
|
||||
"searchLinkEntireWord": "false",
|
||||
"dontFitWidthWhenOpenPDFLink": true,
|
||||
"preserveCurrentLeftOffsetWhenOpenPDFLink": false,
|
||||
"defaultZoomValue": "page-width",
|
||||
"scrollModeOnLoad": 0,
|
||||
"spreadModeOnLoad": 0,
|
||||
"usePageUpAndPageDown": true,
|
||||
"hoverableDropdownMenuInToolbar": true,
|
||||
"zoomLevelInputBoxInToolbar": true,
|
||||
"popoverPreviewOnExternalLinkHover": true,
|
||||
"actionOnCitationHover": "pdf-plus-bib-popover",
|
||||
"enableBibInEmbed": false,
|
||||
"enableBibInHoverPopover": false,
|
||||
"enableBibInCanvas": true,
|
||||
"citationIdPatterns": "^cite.\n^bib\\d+$",
|
||||
"copyAsSingleLine": true,
|
||||
"removeWhitespaceBetweenCJChars": true,
|
||||
"dummyFileFolderPath": "",
|
||||
"externalURIPatterns": [
|
||||
".*\\.pdf$",
|
||||
"https://arxiv.org/pdf/.*"
|
||||
],
|
||||
"modifierToDropExternalPDFToCreateDummy": [
|
||||
"Shift"
|
||||
],
|
||||
"vim": false,
|
||||
"vimrcPath": "",
|
||||
"vimVisualMotion": true,
|
||||
"vimScrollSize": 40,
|
||||
"vimLargerScrollSizeWhenZoomIn": true,
|
||||
"vimContinuousScrollSpeed": 1.2,
|
||||
"vimSmoothScroll": true,
|
||||
"vimHlsearch": true,
|
||||
"vimIncsearch": true,
|
||||
"enableVimInContextMenu": true,
|
||||
"enableVimOutlineMode": true,
|
||||
"vimSmoothOutlineMode": true,
|
||||
"vimHintChars": "hjklasdfgyuiopqwertnmzxcvb",
|
||||
"vimHintArgs": "all",
|
||||
"PATH": "",
|
||||
"autoCheckForUpdates": true,
|
||||
"fixObsidianTextSelectionBug": true
|
||||
}
|
||||
Vendored
+161
File diff suppressed because one or more lines are too long
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "pdf-plus",
|
||||
"name": "PDF++",
|
||||
"version": "0.40.31",
|
||||
"minAppVersion": "1.5.8",
|
||||
"description": "The most Obsidian-native PDF annotation tool ever.",
|
||||
"author": "Ryota Ushio",
|
||||
"authorUrl": "https://github.com/RyotaUshio",
|
||||
"fundingUrl": {
|
||||
"GitHub Sponsor": "https://github.com/sponsors/RyotaUshio",
|
||||
"Buy Me a Coffee": "https://www.buymeacoffee.com/ryotaushio",
|
||||
"Ko-fi": "https://ko-fi.com/ryotaushio"
|
||||
},
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
+694
@@ -0,0 +1,694 @@
|
||||
/* @settings
|
||||
|
||||
name: PDF++
|
||||
id: pdf-plus
|
||||
settings:
|
||||
-
|
||||
id: pdf-highlight
|
||||
title: Highlights
|
||||
type: heading
|
||||
level: 2
|
||||
-
|
||||
id: pdf-plus-highlight-opacity
|
||||
title: Highlight opacity
|
||||
type: variable-number-slider
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.01
|
||||
default: 0.2
|
||||
-
|
||||
id: pdf-plus-highlight-padding-vertical-em
|
||||
title: Highlight padding (top & bottom)
|
||||
description: Boldness of highlights (em)
|
||||
type: variable-number-slider
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.01
|
||||
default: 0.05
|
||||
format: em
|
||||
-
|
||||
id: pdf-plus-highlight-padding-horizontal-em
|
||||
title: Highlight padding (left & right)
|
||||
description: Boldness of highlights (em)
|
||||
type: variable-number-slider
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.01
|
||||
default: 0.05
|
||||
format: em
|
||||
-
|
||||
id: pdf-plus-highlight-border-radius
|
||||
title: Highlight edge roundness
|
||||
description: Radius of the highlight edge (em). 0 for sharp edges and 0.5 for rounded edges.
|
||||
type: variable-number-slider
|
||||
min: 0
|
||||
max: 0.5
|
||||
step: 0.01
|
||||
default: 0.1
|
||||
format: em
|
||||
-
|
||||
id: pdf-rect
|
||||
title: Rectanglular selection
|
||||
type: heading
|
||||
level: 2
|
||||
-
|
||||
id: pdf-plus-rect-highlight-opacity
|
||||
title: Rectangle highlight opacity
|
||||
type: variable-number-slider
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.01
|
||||
default: 1
|
||||
-
|
||||
id: pdf-plus-rect-highlight-border-width
|
||||
title: Rectangle highlight border width (px)
|
||||
type: variable-number-slider
|
||||
min: 1
|
||||
max: 10
|
||||
step: 1
|
||||
default: 2
|
||||
format: px
|
||||
-
|
||||
id: hover-popover
|
||||
title: Hover popovers
|
||||
type: heading
|
||||
level: 2
|
||||
-
|
||||
id: pdf-plus-backlink-popover
|
||||
title: Backlink popovers
|
||||
description: Styles for popovers displayed when hovering over backlinked highlights or rectangular selections in PDF viewer
|
||||
type: heading
|
||||
level: 3
|
||||
-
|
||||
id: pdf-plus-backlink-popover-width
|
||||
title: Backlink popover width (px)
|
||||
type: variable-number-slider
|
||||
min: 100
|
||||
max: 1000
|
||||
step: 10
|
||||
default: 450
|
||||
format: px
|
||||
-
|
||||
id: pdf-plus-backlink-popover-height
|
||||
title: Backlink popover height (px)
|
||||
type: variable-number-slider
|
||||
min: 100
|
||||
max: 1000
|
||||
step: 10
|
||||
default: 400
|
||||
format: px
|
||||
-
|
||||
id: pdf-plus-pdf-link-like-popover
|
||||
title: PDF internal link popovers
|
||||
description: Styles for popovers displayed when hovering over internal links, outline items or thumbnails in PDF viewer
|
||||
type: heading
|
||||
level: 3
|
||||
-
|
||||
id: pdf-plus-pdf-link-like-popover-width
|
||||
title: PDF internal link popover width (px)
|
||||
type: variable-number-slider
|
||||
min: 100
|
||||
max: 1000
|
||||
step: 10
|
||||
default: 450
|
||||
format: px
|
||||
-
|
||||
id: pdf-plus-pdf-link-like-popover-height
|
||||
title: PDF internal link popover height (px)
|
||||
type: variable-number-slider
|
||||
min: 100
|
||||
max: 1000
|
||||
step: 10
|
||||
default: 400
|
||||
format: px
|
||||
-
|
||||
id: pdf-toolbar
|
||||
title: PDF toolbars
|
||||
type: heading
|
||||
level: 2
|
||||
-
|
||||
id: hide-pdf-embed-toolbar
|
||||
title: Hide toolbar in PDF embeds with a page specified
|
||||
type: class-toggle
|
||||
default: true
|
||||
-
|
||||
id: hide-pdf-toolbar-in-hover-editor
|
||||
title: Hide PDF toolbar in Hover Editor
|
||||
type: class-toggle
|
||||
default: true
|
||||
-
|
||||
id: pdf-sidebar
|
||||
title: PDF sidebars
|
||||
type: heading
|
||||
level: 2
|
||||
-
|
||||
id: pdf-plus-sidebar-width
|
||||
title: Sidebar width (px)
|
||||
type: variable-number-slider
|
||||
min: 100
|
||||
max: 1000
|
||||
step: 10
|
||||
default: 140
|
||||
format: px
|
||||
-
|
||||
id: pdf-plus-vim
|
||||
title: Vim keybindings
|
||||
type: heading
|
||||
level: 2
|
||||
-
|
||||
id: pdf-plus-vim-hin
|
||||
title: Hint mode
|
||||
type: heading
|
||||
level: 3
|
||||
-
|
||||
id: pdf-plus-vim-hint-inverted
|
||||
title: Inverted color scheme
|
||||
type: class-toggle
|
||||
default: false
|
||||
*/
|
||||
|
||||
:root {
|
||||
--pdf-plus-highlight-padding-default-em: 0.05em;
|
||||
}
|
||||
|
||||
.hide-pdf-embed-toolbar .pdf-embed[src*="#"] .pdf-toolbar,
|
||||
.hide-pdf-embed-toolbar .popover.hover-popover.hover-editor .pdf-embed[src*="#"] .pdf-toolbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hide-pdf-toolbar-in-hover-editor .popover.hover-popover.hover-editor .view-content>.pdf-toolbar {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* When hovering over a highlighted text in PDF viewer, highlight the corresponding item in backlink pane */
|
||||
.backlink-pane .search-result-file-match.hovered-backlink,
|
||||
.backlink-pane .search-result-file-matches:has(.better-search-views-tree) .better-search-views-file-match.hovered-backlink:not(:hover) {
|
||||
background-color: var(--text-selection);
|
||||
}
|
||||
|
||||
.setting-item.no-border,
|
||||
.pdf-plus-settings.vertical-tab-content .setting-item.no-border {
|
||||
border-top: none;
|
||||
|
||||
&.small-padding {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.setting-item-control input.error {
|
||||
border-color: var(--background-modifier-error);
|
||||
}
|
||||
|
||||
.setting-item-description.error {
|
||||
color: var(--background-modifier-error);
|
||||
}
|
||||
|
||||
.is-mobile,
|
||||
.is-tablet {
|
||||
.pdf-plus-color-palette .pdf-plus-color-palette-item-inner {
|
||||
width: calc(var(--swatch-width) * 0.85);
|
||||
height: calc(var(--swatch-width) * 0.85);
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-color-palette {
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.pdf-plus-color-palette-item {
|
||||
/* Avoid text selections to be cleared when tapping on a color palette item on the mobile app */
|
||||
/* https://github.com/RyotaUshio/obsidian-pdf-plus/issues/169 */
|
||||
user-select: none;
|
||||
|
||||
.pdf-plus-color-palette-item-inner {
|
||||
width: var(--swatch-width);
|
||||
height: var(--swatch-width);
|
||||
border-radius: 50%;
|
||||
border: var(--input-border-width) solid var(--background-modifier-border);
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-color-palette-status-container {
|
||||
padding: var(--size-2-2) var(--size-2-3);
|
||||
color: var(--text-muted);
|
||||
font-size: var(--font-ui-small);
|
||||
text-wrap: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.menu .menu-item.pdf-plus-color-menu-item {
|
||||
padding-left: 0;
|
||||
|
||||
.pdf-plus-color-indicator {
|
||||
border-radius: 50%;
|
||||
border-width: 0;
|
||||
height: var(--size-4-3);
|
||||
width: var(--size-4-3);
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-toolbar .clickable-icon.is-disabled {
|
||||
background-color: inherit;
|
||||
|
||||
&>svg {
|
||||
color: var(--text-faint);
|
||||
}
|
||||
}
|
||||
|
||||
/* .pdf-page-input, */
|
||||
.pdf-zoom-level-input {
|
||||
width: 6ch;
|
||||
text-align: right;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.pdf-zoom-level-percent {
|
||||
white-space: nowrap;
|
||||
margin-right: var(--size-4-1);
|
||||
font-size: var(--font-ui-small);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.pdf-plus-settings.vertical-tab-content {
|
||||
--pdf-plus-settings-header-height: var(--size-4-12);
|
||||
|
||||
padding-top: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.pdf-plus-settings.vertical-tab-content .header-container {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
height: var(--pdf-plus-settings-header-height);
|
||||
line-height: var(--pdf-plus-settings-header-height);
|
||||
text-align: center;
|
||||
background-color: var(--background-secondary);
|
||||
border-bottom: 1px solid var(--divider-color);
|
||||
padding: 0 var(--size-4-4);
|
||||
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
white-space: nowrap;
|
||||
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.header {
|
||||
line-height: normal;
|
||||
|
||||
.header-title {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-settings.vertical-tab-content .content {
|
||||
padding-top: var(--size-4-8);
|
||||
padding-bottom: var(--size-4-16);
|
||||
padding-left: var(--size-4-12);
|
||||
padding-right: var(--size-4-12);
|
||||
}
|
||||
|
||||
.pdf-plus-settings.vertical-tab-content .spacer {
|
||||
height: var(--pdf-plus-settings-header-height);
|
||||
}
|
||||
|
||||
.pdf-plus-settings.vertical-tab-content .top-note {
|
||||
min-height: var(--pdf-plus-settings-header-height);
|
||||
color: var(--text-muted);
|
||||
font-size: var(--font-ui-smaller);
|
||||
}
|
||||
|
||||
.pdf-plus-settings .setting-item-description,
|
||||
.pdf-plus-modal .setting-item-description {
|
||||
&>p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&>p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-settings .ignore-split-setting.setting-item {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.annotationLayer .popupContent {
|
||||
&>p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&>p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
transform-origin: 0 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer .pdf-plus-backlink {
|
||||
position: absolute;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
box-sizing: content-box;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer .rect-highlight {
|
||||
background-color: rgb(var(--text-highlight-bg-rgb));
|
||||
border-radius: var(--radius-m);
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
body:not(.pdf-plus-backlink-selection-underline) .pdf-plus-backlink-highlight-layer .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
background-color: rgb(from var(--pdf-plus-color) r g b / var(--pdf-plus-highlight-opacity, 0.2));
|
||||
padding: var(--pdf-plus-highlight-padding-vertical-em, var(--pdf-plus-highlight-padding-default-em)) var(--pdf-plus-highlight-padding-horizontal-em, var(--pdf-plus-highlight-padding-default-em));
|
||||
margin: calc(var(--pdf-plus-highlight-padding-vertical-em, var(--pdf-plus-highlight-padding-default-em)) * -1) calc(var(--pdf-plus-highlight-padding-horizontal-em, var(--pdf-plus-highlight-padding-default-em)) * -1);
|
||||
border-radius: var(--pdf-plus-highlight-border-radius, 0.1em);
|
||||
}
|
||||
|
||||
body.pdf-plus-backlink-selection-underline {
|
||||
.pdf-plus-backlink-highlight-layer .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
opacity: 1.0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer[data-main-rotation="0"] .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
border-bottom: 0.1em solid var(--pdf-plus-color);
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer[data-main-rotation="90"] .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
border-right: 0.1em solid var(--pdf-plus-color);
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer[data-main-rotation="180"] .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
border-top: 0.1em solid var(--pdf-plus-color);
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer[data-main-rotation="270"] .pdf-plus-backlink.pdf-plus-backlink-selection {
|
||||
border-left: 0.1em solid var(--pdf-plus-color);
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-highlight-layer .pdf-plus-backlink.pdf-plus-backlink-fit-r {
|
||||
border: dashed rgb(from var(--pdf-plus-rect-color) r g b / var(--pdf-plus-rect-highlight-opacity, 1)) var(--pdf-plus-rect-highlight-border-width, 2px);
|
||||
}
|
||||
|
||||
.pdf-plus-backlink-icon {
|
||||
position: absolute;
|
||||
--icon-size: 100%;
|
||||
}
|
||||
|
||||
[data-main-rotation="90"] .pdf-plus-backlink-icon {
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
|
||||
[data-main-rotation="180"] .pdf-plus-backlink-icon {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
[data-main-rotation="270"] .pdf-plus-backlink-icon {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.pdf-plus-annotation-edit-modal {
|
||||
.desc {
|
||||
margin-bottom: var(--size-4-4);
|
||||
}
|
||||
|
||||
.preview-container {
|
||||
background: var(--background-modifier-form-field);
|
||||
border: var(--input-border-width) solid var(--background-modifier-border);
|
||||
border-radius: var(--input-radius);
|
||||
padding: var(--size-4-1) var(--size-4-2);
|
||||
text-align: left;
|
||||
|
||||
&>p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&>p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Arrange two children of .setting-item, namely .setting-item-info and .setting-item-contrl, vertically */
|
||||
.setting-item:last-child:has(textarea) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: left;
|
||||
align-items: flex-start;
|
||||
|
||||
.setting-item-control {
|
||||
width: 100%;
|
||||
padding-top: var(--size-4-2);
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-annotation-edit-modal-save-instructions {
|
||||
color: var(--text-muted);
|
||||
font-size: calc(var(--font-text-size) * 0.65);
|
||||
text-align: end;
|
||||
}
|
||||
}
|
||||
|
||||
.popupWrapper {
|
||||
--pdf-popup-width: 310px;
|
||||
}
|
||||
|
||||
.pdf-plus-annotation-icon-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
margin-right: calc(var(--size-4-1) * -1);
|
||||
margin-left: calc(var(--size-2-1) * -1);
|
||||
|
||||
.clickable-icon {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-draggable .popup {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#pdf-plus-funding {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: left;
|
||||
align-items: flex-end;
|
||||
|
||||
.setting-item-control {
|
||||
padding-top: var(--size-4-4);
|
||||
}
|
||||
}
|
||||
|
||||
#pdf-plus-funding-icon-info-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
/* justify-content: left; */
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#pdf-plus-funding-icon {
|
||||
margin-right: var(--size-4-4);
|
||||
}
|
||||
|
||||
.page-label-range:first-of-type {
|
||||
margin-top: var(--size-4-4);
|
||||
}
|
||||
|
||||
.page-label-range:not(:first-of-type) {
|
||||
margin-top: var(--size-4-9);
|
||||
}
|
||||
|
||||
.pdf-plus-page-label-modal {
|
||||
z-index: var(--he-popover-layer-inactive, var(--layer-popover));
|
||||
|
||||
.page-labels-loading {
|
||||
color: var(--text-muted);
|
||||
text-align: center;
|
||||
margin: var(--size-4-4);
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-restore-default-modal {
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.pdf-content-container {
|
||||
--sidebar-width: var(--pdf-plus-sidebar-width, 140px);
|
||||
}
|
||||
|
||||
body {
|
||||
--container-pdf-cropped-width: var(--line-width);
|
||||
--container-pdf-cropped-max-width: var(--max-width);
|
||||
}
|
||||
|
||||
.internal-embed.pdf-cropped-embed {
|
||||
width: var(--container-pdf-cropped-width);
|
||||
max-width: var(--container-pdf-cropped-max-width);
|
||||
|
||||
img {
|
||||
cursor: text !important;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.popover.hover-popover>.pdf-cropped-embed img {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.pdf-plus-selecting * {
|
||||
cursor: crosshair !important;
|
||||
|
||||
.textLayer {
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-container .pdf-plus-select-box {
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
border: dashed var(--background-modifier-border) 2px;
|
||||
background-color: hsla(var(--interactive-accent-hsl), 0.15);
|
||||
}
|
||||
|
||||
/* From Obsidian's app.css (.annotationLayer .mod-focused / .annotationLayer .boundingRect)*/
|
||||
.pdf-plus-annotation-bounding-rect {
|
||||
background-color: rgba(var(--text-highlight-bg-rgb), 0.1);
|
||||
border-radius: var(--radius-s);
|
||||
box-shadow: var(--shadow-s);
|
||||
box-sizing: content-box;
|
||||
margin: calc(var(--size-4-2) * -1);
|
||||
border: var(--size-4-1) solid rgba(var(--text-highlight-bg-rgb), 0.8);
|
||||
padding: var(--size-4-1);
|
||||
z-index: 0;
|
||||
/* Avoid preventing annotation click */
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.popover.hover-popover.pdf-plus-backlink-popover {
|
||||
--popover-width: var(--pdf-plus-backlink-popover-width, 450px);
|
||||
--popover-height: var(--pdf-plus-backlink-popover-height, 400px);
|
||||
}
|
||||
|
||||
.popover.hover-popover.pdf-plus-pdf-link-like-popover {
|
||||
--popover-pdf-width: var(--pdf-plus-pdf-link-like-popover-width, 450px);
|
||||
--popover-pdf-height: var(--pdf-plus-pdf-link-like-popover-height, 400px);
|
||||
}
|
||||
|
||||
.popover.hover-popover.pdf-plus-bib-popover {
|
||||
--popover-width: 400px;
|
||||
--pdf-plus-bib-metadata-font-size: var(--font-ui-small);
|
||||
|
||||
/* Workaround to prevent bib popovers from being covered by Hover Editor
|
||||
when the bib popover is spawned from a hover editor
|
||||
(https://github.com/RyotaUshio/obsidian-pdf-plus/issues/459).
|
||||
Hover Editor decides z-index based on --layer-slides, so we need to set a higher z-index. */
|
||||
z-index: calc(var(--layer-slides) + 1);
|
||||
|
||||
.pdf-plus-bib {
|
||||
padding: var(--size-4-3);
|
||||
font-size: var(--font-ui-medium);
|
||||
|
||||
/* Make text inside citation hover selectable (https://github.com/RyotaUshio/obsidian-pdf-plus/issues/252) */
|
||||
-moz-user-select: text;
|
||||
-webkit-user-select: text;
|
||||
user-select: text;
|
||||
|
||||
.bib-title {
|
||||
font-weight: bold;
|
||||
padding-bottom: var(--size-4-2);
|
||||
}
|
||||
|
||||
.bib-author-year {
|
||||
color: var(--text-muted);
|
||||
text-align: left;
|
||||
font-size: var(--pdf-plus-bib-metadata-font-size);
|
||||
}
|
||||
|
||||
.bib-container-title {
|
||||
color: var(--text-muted);
|
||||
font-style: italic;
|
||||
text-align: left;
|
||||
font-size: var(--pdf-plus-bib-metadata-font-size);
|
||||
}
|
||||
|
||||
.button-container {
|
||||
margin-top: 1em;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: var(--size-4-2);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pdf-plus-vim-command {
|
||||
border-top: 1px solid var(--background-modifier-border);
|
||||
/* height: var(--size-4-8); */
|
||||
font-family: monospace;
|
||||
|
||||
input {
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
.page.pdf-plus-vim-hint-mode [data-pdf-plus-vim-hint]::after {
|
||||
content: attr(data-pdf-plus-vim-hint);
|
||||
color: var(--pdf-plus-vim-hint-color);
|
||||
text-transform: uppercase;
|
||||
font-size: var(--font-ui-medium);
|
||||
font-weight: bold;
|
||||
background-color: var(--pdf-plus-vim-hint-background-color);
|
||||
border: var(--size-2-1) solid hsl(var(--accent-h), var(--accent-s), var(--accent-l));
|
||||
border-radius: 10%;
|
||||
padding: 0 var(--size-2-2);
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
body {
|
||||
--pdf-plus-vim-hint-color: var(--text-normal);
|
||||
--pdf-plus-vim-hint-background-color: var(--background-primary);
|
||||
}
|
||||
|
||||
body.pdf-plus-vim-hint-inverted {
|
||||
--pdf-plus-vim-hint-color: var(--text-on-accent);
|
||||
--pdf-plus-vim-hint-background-color: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
|
||||
}
|
||||
Reference in New Issue
Block a user