vault backup: 2021-10-18 07:44:58

This commit is contained in:
Daniel Bulant 2021-10-18 07:44:58 +02:00
parent f4378e1bb8
commit d9c0d435e3
33 changed files with 79635 additions and 3 deletions

View file

@ -11,5 +11,17 @@
"obsidian-admonition",
"table-editor-obsidian",
"obsidian-auto-link-title",
"open-note-to-window-title"
"open-note-to-window-title",
"obsidian-autocomplete-plugin",
"code-block-copy",
"cycle-through-panes",
"cm-editor-syntax-highlight-obsidian",
"obsidian-emoji-toolbar",
"obsidian-filename-heading-sync",
"hotkey-helper",
"obsidian-icons-plugin",
"obsidian-kanban",
"url-into-selection",
"obsidian-plugin-toc",
"wikilinks-to-mdlinks-obsidian"
]

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
{
"id": "cm-editor-syntax-highlight-obsidian",
"name": "Editor Syntax Highlight",
"author": "death_au",
"authorUrl": "https://github.com/deathau",
"description": "Show syntax highlighing in code blocks the editor",
"isDesktopOnly": false,
"version": "0.1.2",
"minAppVersion": "0.10.0"
}

View file

@ -0,0 +1,177 @@
@charset "UTF-8";
.cm-s-obsidian pre.HyperMD-codeblock span.cm-formatting-code-block {
color: var(--text-muted);
}
.cm-s-obsidian pre.HyperMD-codeblock .cm-keyword {
font-weight: normal;
}
.theme-dark .cm-s-obsidian {
/*
Name: yoncé
Author: Thomas MacLean (http://github.com/thomasmaclean)
Original yoncé color scheme by Mina Markham (https://github.com/minamarkham)
*/
/**/
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock {
color: #d4d4d4;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-keyword,
.theme-dark .cm-s-obsidian .cm-math.cm-keyword,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-keyword {
color: #00A7AA;
font-weight: normal;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-atom,
.theme-dark .cm-s-obsidian .cm-math.cm-atom,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-atom {
color: #F39B35;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-number,
.theme-dark .cm-s-obsidian .cm-math.cm-number,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-number {
color: #A06FCA;
}
.theme-dark .cm-s-obsidian span.cm-hmd-frontmatter.cm-type,
.theme-dark .cm-s-obsidian span.cm-math.cm-type,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock span.cm-type {
color: #A06FCA;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-def,
.theme-dark .cm-s-obsidian .cm-math.cm-def,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-def {
color: #98E342;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-property,
.theme-dark .cm-s-obsidian .cm-math.cm-property,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-property {
color: #D4D4D4;
}
.theme-dark .cm-s-obsidian span.cm-hmd-frontmatter.cm-variable,
.theme-dark .cm-s-obsidian span.cm-math.cm-variable,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock span.cm-variable {
color: #D4D4D4;
}
.theme-dark .cm-s-obsidian span.cm-hmd-frontmatter.cm-variable-2,
.theme-dark .cm-s-obsidian span.cm-math.cm-variable-2,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock span.cm-variable-2 {
color: #da7dae;
}
.theme-dark .cm-s-obsidian span.cm-hmd-frontmatter.cm-variable-3,
.theme-dark .cm-s-obsidian span.cm-math.cm-variable-3,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock span.cm-variable-3 {
color: #A06FCA;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-type.cm-def,
.theme-dark .cm-s-obsidian .cm-math.cm-type.cm-def,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-type.cm-def {
color: #FC4384;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-property.cm-def,
.theme-dark .cm-s-obsidian .cm-math.cm-property.cm-def,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-property.cm-def {
color: #FC4384;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-callee,
.theme-dark .cm-s-obsidian .cm-math.cm-callee,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-callee {
color: #FC4384;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-operator,
.theme-dark .cm-s-obsidian .cm-math.cm-operator,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-operator {
color: #FC4384;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-qualifier,
.theme-dark .cm-s-obsidian .cm-math.cm-qualifier,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-qualifier {
color: #FC4384;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-tag,
.theme-dark .cm-s-obsidian .cm-math.cm-tag,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-tag {
color: #FC4384;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-tag.cm-bracket,
.theme-dark .cm-s-obsidian .cm-math.cm-tag.cm-bracket,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-tag.cm-bracket {
color: #D4D4D4;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-attribute,
.theme-dark .cm-s-obsidian .cm-math.cm-attribute,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-attribute {
color: #A06FCA;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-comment,
.theme-dark .cm-s-obsidian .cm-math.cm-comment,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-comment {
color: #696d70;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-comment.cm-tag,
.theme-dark .cm-s-obsidian .cm-math.cm-comment.cm-tag,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-comment.cm-tag {
color: #FC4384;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-comment.cm-attribute,
.theme-dark .cm-s-obsidian .cm-math.cm-comment.cm-attribute,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-comment.cm-attribute {
color: #D4D4D4;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-string,
.theme-dark .cm-s-obsidian .cm-math.cm-string,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-string {
color: #E6DB74;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-string-2,
.theme-dark .cm-s-obsidian .cm-math.cm-string-2,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-string-2 {
color: #F39B35;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-meta,
.theme-dark .cm-s-obsidian .cm-math.cm-meta,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-meta {
color: #D4D4D4;
background: inherit;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-builtin,
.theme-dark .cm-s-obsidian .cm-math.cm-builtin,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-builtin {
color: #FC4384;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-header,
.theme-dark .cm-s-obsidian .cm-math.cm-header,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-header {
color: #da7dae;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-hr,
.theme-dark .cm-s-obsidian .cm-math.cm-hr,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-hr {
color: #98E342;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-link,
.theme-dark .cm-s-obsidian .cm-math.cm-link,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-link {
color: #696d70;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.cm-error,
.theme-dark .cm-s-obsidian .cm-math.cm-error,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .cm-error {
border-bottom: 1px solid #C42412;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.CodeMirror-activeline-background,
.theme-dark .cm-s-obsidian .cm-math.CodeMirror-activeline-background,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .CodeMirror-activeline-background {
background: #272727;
}
.theme-dark .cm-s-obsidian .cm-hmd-frontmatter.CodeMirror-matchingbracket,
.theme-dark .cm-s-obsidian .cm-math.CodeMirror-matchingbracket,
.theme-dark .cm-s-obsidian pre.HyperMD-codeblock .CodeMirror-matchingbracket {
outline: 1px solid grey;
color: #D4D4D4 !important;
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,8 @@
{
"id": "code-block-copy",
"name": "Copy button for code blocks",
"author": "Daniel Brandenburg",
"description": "Copy button for code blocks",
"isDesktopOnly": false,
"version": "0.1.0"
}

View file

@ -0,0 +1,41 @@
.copy-code-button {
color: var(--background-primary);
background-color: var(--text-faint);
border-radius: 1px 1px 0px 0px;
/* right-align */
display: block;
margin-left: auto;
margin-right: 0;
margin-bottom: -2px;
padding: 3px 8px;
font-size: 0.8em;
position: absolute;
top: 0px;
right: 0px;
}
.copy-code-button:hover {
cursor: pointer;
background-color: var(--text-normal);
}
.copy-code-button:focus {
/* Avoid an ugly focus outline on click in Chrome,
but darken the button for accessibility.
See https://stackoverflow.com/a/25298082/1481479 */
background-color: var(--text-normal);
outline: 0;
}
.copy-code-button:active {
background-color: var(--text-normal);
}
.highlight pre {
/* Avoid pushing up the copy buttons. */
margin: 0;
}
.has-copy-button {
position: relative;
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
{
"id": "cycle-through-panes",
"name": "Cycle through Panes",
"version": "0.0.6",
"minAppVersion": "0.9.7",
"description": "Cycle through your open Panes with `ctrl + Tab`, just like with Tabs in your Browser!, ctrl+shift+Tab for Reverse",
"author": "Vinadon & Rythm",
"authorUrl": "https://github.com/phibr0",
"isDesktopOnly": false
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,9 @@
{
"id": "hotkey-helper",
"name": "Hotkey Helper",
"version": "0.3.8",
"minAppVersion": "0.12.3",
"description": "Easily see and access any plugin's settings or hotkey assignments (and conflicts) from the Community Plugins tab",
"author": "PJ Eby",
"authorUrl": "https://github.com/pjeby"
}

View file

@ -0,0 +1,5 @@
.clickable-icon.mod-error, .modal .community-plugin-info button.mod-error {
background-color: var(--background-modifier-error);
}
.community-plugin-info > p > button { margin-top: 6px; margin-bottom: 6px;}

View file

@ -12,8 +12,8 @@
"checkpointList": [
{
"path": "/",
"date": "2021-10-10",
"size": 40697
"date": "2021-10-18",
"size": 40936
}
],
"activityHistory": [
@ -95,6 +95,18 @@
{
"date": "2021-10-10",
"value": 4296
},
{
"date": "2021-10-13",
"value": 239
},
{
"date": "2021-10-16",
"value": 0
},
{
"date": "2021-10-18",
"value": 0
}
]
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
{
"id": "obsidian-autocomplete-plugin",
"name": "Autocomplete",
"version": "0.8.0",
"minAppVersion": "0.10.0",
"description": "This plugin provides a text autocomplete feature to enhance typing speed.",
"author": "Yeboster",
"authorUrl": "https://github.com/Yeboster/",
"isDesktopOnly": false
}

View file

@ -0,0 +1,17 @@
.no-space-wrap {
white-space: nowrap;
}
.no-border-top {
border-top: 0;
}
.no-suggestions {
text-align: center;
margin: 10pt;
color: var(--text-faint);
}
.text-left {
text-align: left;
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,9 @@
{
"id": "obsidian-emoji-toolbar",
"name": "Emoji Toolbar",
"version": "0.2.2",
"description": "Quickly search for and insert emojis into your notes.",
"author": "oliveryh",
"authorUrl": "https://github.com/oliveryh/obsidian-emoji-toolbar",
"isDesktopOnly": false
}

View file

@ -0,0 +1,7 @@
img.emoji {
height: 1em;
width: 1em;
margin: 0 0.05em 0 0.1em;
vertical-align: -0.1em;
display: inline-block;
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
{
"id": "obsidian-filename-heading-sync",
"name": "Filename Heading Sync",
"version": "1.5.1",
"minAppVersion": "0.11.0",
"description": "Obsidian plugin for keeping the filename with the first heading of a file in sync",
"author": "dvcrn",
"authorUrl": "https://github.com/dvcrn/filename-header-sync",
"isDesktopOnly": false
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
{
"id": "obsidian-icons-plugin",
"name": "Icons",
"version": "0.3.0",
"minAppVersion": "0.10.7",
"description": "Add icons to your Obsidian notes.",
"author": "Camillo Visini",
"authorUrl": "https://github.com/visini",
"isDesktopOnly": true
}

View file

@ -0,0 +1,16 @@
.obsidian-icon {
font-size: inherit;
display: inline-block;
width: 2rem !important;
text-align: center;
/* margin-right: -0.5rem !important; */
}
p .obsidian-icon {
width: 1.75rem !important;
}
.obsidian-icon.react-icon > svg {
vertical-align: middle;
margin-bottom: 3px;
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
{
"id": "obsidian-kanban",
"name": "Kanban",
"version": "1.2.11",
"minAppVersion": "0.12.3",
"description": "Create markdown-backed Kanban boards in Obsidian.",
"author": "mgmeyers",
"authorUrl": "https://github.com/mgmeyers/obsidian-kanban",
"isDesktopOnly": false
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,291 @@
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
var __commonJS = (callback, module2) => () => {
if (!module2) {
module2 = {exports: {}};
callback(module2.exports, module2);
}
return module2.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, {get: all[name], enumerable: true});
};
var __exportStar = (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) => {
if (module2 && module2.__esModule)
return module2;
return __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", {value: module2, enumerable: true})), module2);
};
// node_modules/dedent/dist/dedent.js
var require_dedent = __commonJS((exports2, module2) => {
"use strict";
function dedent(strings) {
var raw = void 0;
if (typeof strings === "string") {
raw = [strings];
} else {
raw = strings.raw;
}
var result = "";
for (var i = 0; i < raw.length; i++) {
result += raw[i].replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`");
if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) {
result += arguments.length <= i + 1 ? void 0 : arguments[i + 1];
}
}
var lines = result.split("\n");
var mindent = null;
lines.forEach(function(l) {
var m = l.match(/^(\s+)\S+/);
if (m) {
var indent = m[1].length;
if (!mindent) {
mindent = indent;
} else {
mindent = Math.min(mindent, indent);
}
}
});
if (mindent !== null) {
result = lines.map(function(l) {
return l[0] === " " ? l.slice(mindent) : l;
}).join("\n");
}
result = result.trim();
return result.replace(/\\n/g, "\n");
}
if (typeof module2 !== "undefined") {
module2.exports = dedent;
}
});
// node_modules/objectorarray/index.js
var require_objectorarray = __commonJS((exports2, module2) => {
module2.exports = (val) => {
return val != null && typeof val === "object" && val.constructor !== RegExp;
};
});
// node_modules/fast-json-parse/parse.js
var require_parse = __commonJS((exports2, module2) => {
"use strict";
function Parse(data) {
if (!(this instanceof Parse)) {
return new Parse(data);
}
this.err = null;
this.value = null;
try {
this.value = JSON.parse(data);
} catch (err) {
this.err = err;
}
}
module2.exports = Parse;
});
// node_modules/endent/lib/index.js
var require_lib = __commonJS((exports2) => {
"use strict";
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : {default: mod};
};
Object.defineProperty(exports2, "__esModule", {value: true});
var dedent_1 = __importDefault(require_dedent());
var objectorarray_1 = __importDefault(require_objectorarray());
var fast_json_parse_1 = __importDefault(require_parse());
var ENDENT_ID = "twhZNwxI1aFG3r4";
function endent2(strings, ...values) {
let result = "";
for (let i = 0; i < strings.length; i++) {
result += strings[i];
if (i < values.length) {
let value = values[i];
let isJson = false;
if (fast_json_parse_1.default(value).value) {
value = fast_json_parse_1.default(value).value;
isJson = true;
}
if (value && value[ENDENT_ID] || isJson) {
let rawlines = result.split("\n");
let l = rawlines[rawlines.length - 1].search(/\S/);
let endentation = l > 0 ? " ".repeat(l) : "";
let valueJson = isJson ? JSON.stringify(value, null, 2) : value[ENDENT_ID];
let valueLines = valueJson.split("\n");
valueLines.forEach((l2, index) => {
if (index > 0) {
result += "\n" + endentation + l2;
} else {
result += l2;
}
});
} else if (typeof value === "string" && value.includes("\n")) {
let endentations = result.match(/(?:^|\n)( *)$/);
if (typeof value === "string") {
let endentation = endentations ? endentations[1] : "";
result += value.split("\n").map((str, i2) => {
str = ENDENT_ID + str;
return i2 === 0 ? str : `${endentation}${str}`;
}).join("\n");
} else {
result += value;
}
} else {
result += value;
}
}
}
result = dedent_1.default(result);
return result.split(ENDENT_ID).join("");
}
endent2.pretty = (data) => {
return objectorarray_1.default(data) ? {[ENDENT_ID]: JSON.stringify(data, null, 2)} : data;
};
exports2.default = endent2;
});
// src/main.ts
__markAsModule(exports);
__export(exports, {
default: () => main_default
});
var import_obsidian2 = __toModule(require("obsidian"));
// src/create-toc.ts
var import_endent = __toModule(require_lib());
var import_obsidian = __toModule(require("obsidian"));
var getCurrentHeaderDepth = (headings, cursor) => {
const previousHeadings = headings.filter((heading) => heading.position.end.line < cursor.line);
if (!previousHeadings.length) {
return 0;
}
return previousHeadings[previousHeadings.length - 1].level;
};
var getSubsequentHeadings = (headings, cursor) => {
return headings.filter((heading) => heading.position.end.line > cursor.line);
};
var createToc = ({headings = []}, cursor, settings) => {
const currentDepth = getCurrentHeaderDepth(headings, cursor);
const subsequentHeadings = getSubsequentHeadings(headings, cursor);
const includedHeadings = [];
for (const heading of subsequentHeadings) {
if (heading.level <= currentDepth) {
break;
}
if (heading.level >= settings.minimumDepth && heading.level <= settings.maximumDepth) {
includedHeadings.push(heading);
}
}
if (!includedHeadings.length) {
new import_obsidian.Notice(import_endent.default`
No headings below cursor matched settings
(min: ${settings.minimumDepth}) (max: ${settings.maximumDepth})
`);
return;
}
const firstHeadingDepth = includedHeadings[0].level;
const links = includedHeadings.map((heading) => {
const itemIndication = settings.listStyle === "number" && "1." || "-";
const indent = new Array(Math.max(0, heading.level - firstHeadingDepth)).fill(" ").join("");
return `${indent}${itemIndication} [[#${heading.heading}|${heading.heading}]]`;
});
return import_endent.default`
${settings.title ? `${settings.title}
` : ""}
${`${links.join("\n")}
`}
`;
};
// src/main.ts
var TableOfContentsSettingsTab = class extends import_obsidian2.PluginSettingTab {
constructor(app, plugin) {
super(app, plugin);
this.plugin = plugin;
}
display() {
const {containerEl} = this;
containerEl.empty();
containerEl.createEl("h2", {text: "Table of Contents - Settings"});
new import_obsidian2.Setting(containerEl).setName("List Style").setDesc("The type of list to render the table of contents as.").addDropdown((dropdown) => dropdown.setValue(this.plugin.settings.listStyle).addOption("bullet", "Bullet").addOption("number", "Number").onChange((value) => {
this.plugin.settings.listStyle = value;
this.plugin.saveData(this.plugin.settings);
this.display();
}));
new import_obsidian2.Setting(containerEl).setName("Title").setDesc("Optional title to put before the table of contents").addText((text) => text.setPlaceholder("**Table of Contents**").setValue(this.plugin.settings.title || "").onChange((value) => {
this.plugin.settings.title = value;
this.plugin.saveData(this.plugin.settings);
}));
new import_obsidian2.Setting(containerEl).setName("Minimum Header Depth").setDesc("The lowest header depth to add to the table of contents. Defaults to 2").addSlider((text) => text.setValue(this.plugin.settings.minimumDepth).setDynamicTooltip().setLimits(1, 6, 1).onChange((value) => {
this.plugin.settings.minimumDepth = value;
this.plugin.saveData(this.plugin.settings);
}));
new import_obsidian2.Setting(containerEl).setName("Maximum Header Depth").setDesc("The highest header depth to add to the table of contents. Defaults to 6").addSlider((text) => text.setValue(this.plugin.settings.maximumDepth).setDynamicTooltip().setLimits(1, 6, 1).onChange((value) => {
this.plugin.settings.minimumDepth = value;
this.plugin.saveData(this.plugin.settings);
}));
}
};
var TableOfContentsPlugin = class extends import_obsidian2.Plugin {
constructor() {
super(...arguments);
this.settings = {
minimumDepth: 2,
maximumDepth: 6,
listStyle: "bullet"
};
this.createTocForActiveFile = (settings = this.settings) => () => {
const activeView = this.app.workspace.getActiveViewOfType(import_obsidian2.MarkdownView);
if (activeView && activeView.file) {
const editor = activeView.sourceMode.cmEditor;
const cursor = editor.getCursor();
const data = this.app.metadataCache.getFileCache(activeView.file) || {};
const toc = createToc(data, cursor, typeof settings === "function" ? settings(data, cursor) : settings);
if (toc) {
editor.replaceRange(toc, cursor);
}
}
};
}
async onload() {
console.log("Load Table of Contents plugin");
this.settings = {
...this.settings,
...await this.loadData()
};
this.addCommand({
id: "create-toc",
name: "Create table of contents",
callback: this.createTocForActiveFile()
});
this.addCommand({
id: "create-toc-next-level",
name: "Create table of contents for next heading level",
callback: this.createTocForActiveFile((data, cursor) => {
const currentHeaderDepth = getCurrentHeaderDepth(data.headings || [], cursor);
const depth = Math.max(currentHeaderDepth + 1, this.settings.minimumDepth);
return {
...this.settings,
minimumDepth: depth,
maximumDepth: depth
};
})
});
this.addSettingTab(new TableOfContentsSettingsTab(this.app, this));
}
};
var main_default = TableOfContentsPlugin;

View file

@ -0,0 +1,10 @@
{
"id": "obsidian-plugin-toc",
"name": "Table of Contents",
"author": "Andrew Lisowski",
"authorUrl": "https://twitter.com/hipstersmoothie",
"description": "Create a table of contents for a note.",
"isDesktopOnly": false,
"minAppVersion": "0.10.12",
"version": "0.1.2"
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,8 @@
{
"id": "url-into-selection",
"name": "Paste URL into selection",
"description": "Paste URL \"into\" selected text.",
"isDesktopOnly": false,
"js": "main.js",
"version": "1.6.0"
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
{
"id": "wikilinks-to-mdlinks-obsidian",
"name": "Wikilinks to MDLinks",
"version": "0.0.12",
"minAppVersion": "0.9.12",
"description": "A plugin that converts wikilinks to markdown links and vice versa",
"author": "Agatha Uy",
"authorUrl": "https://github.com/agathauy",
"isDesktopOnly": false
}