generated from DNDs/dnd-template
Added Obsidian Configuration
This commit is contained in:
parent
7f889db8b9
commit
935a33dfde
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,3 +1 @@
|
|||||||
.obsidian
|
.trash
|
||||||
.trash
|
|
||||||
.obsidian/
|
|
||||||
|
22
.obsidian/app.json
vendored
Normal file
22
.obsidian/app.json
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"legacyEditor": false,
|
||||||
|
"livePreview": true,
|
||||||
|
"attachmentFolderPath": "attachment",
|
||||||
|
"trashOption": "local",
|
||||||
|
"promptDelete": false,
|
||||||
|
"alwaysUpdateLinks": true,
|
||||||
|
"showLineNumber": true,
|
||||||
|
"spellcheck": true,
|
||||||
|
"spellcheckLanguages": [
|
||||||
|
"de",
|
||||||
|
"en-GB"
|
||||||
|
],
|
||||||
|
"showUnsupportedFiles": true,
|
||||||
|
"pdfExportSettings": {
|
||||||
|
"pageSize": "A4",
|
||||||
|
"landscape": false,
|
||||||
|
"margin": "0",
|
||||||
|
"downscalePercent": 100
|
||||||
|
},
|
||||||
|
"communityThemeSortOrder": "release"
|
||||||
|
}
|
5
.obsidian/appearance.json
vendored
Normal file
5
.obsidian/appearance.json
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"translucency": true,
|
||||||
|
"baseFontSize": 17,
|
||||||
|
"cssTheme": "Willemstad"
|
||||||
|
}
|
10
.obsidian/community-plugins.json
vendored
Normal file
10
.obsidian/community-plugins.json
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[
|
||||||
|
"obsidian-git",
|
||||||
|
"table-editor-obsidian",
|
||||||
|
"obsidian-icons-plugin",
|
||||||
|
"obsidian-reading-time",
|
||||||
|
"dataview",
|
||||||
|
"obsidian-dialogue-plugin",
|
||||||
|
"obsidian-image-toolkit",
|
||||||
|
"obsidian-pandoc"
|
||||||
|
]
|
20
.obsidian/core-plugins.json
vendored
Normal file
20
.obsidian/core-plugins.json
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
[
|
||||||
|
"file-explorer",
|
||||||
|
"global-search",
|
||||||
|
"switcher",
|
||||||
|
"graph",
|
||||||
|
"backlink",
|
||||||
|
"outgoing-link",
|
||||||
|
"tag-pane",
|
||||||
|
"page-preview",
|
||||||
|
"note-composer",
|
||||||
|
"command-palette",
|
||||||
|
"slash-command",
|
||||||
|
"editor-status",
|
||||||
|
"starred",
|
||||||
|
"markdown-importer",
|
||||||
|
"outline",
|
||||||
|
"word-count",
|
||||||
|
"workspaces",
|
||||||
|
"file-recovery"
|
||||||
|
]
|
22
.obsidian/graph.json
vendored
Normal file
22
.obsidian/graph.json
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"collapse-filter": false,
|
||||||
|
"search": "",
|
||||||
|
"showTags": true,
|
||||||
|
"showAttachments": true,
|
||||||
|
"hideUnresolved": false,
|
||||||
|
"showOrphans": true,
|
||||||
|
"collapse-color-groups": true,
|
||||||
|
"colorGroups": [],
|
||||||
|
"collapse-display": true,
|
||||||
|
"showArrow": false,
|
||||||
|
"textFadeMultiplier": 0,
|
||||||
|
"nodeSizeMultiplier": 1,
|
||||||
|
"lineSizeMultiplier": 1,
|
||||||
|
"collapse-forces": true,
|
||||||
|
"centerStrength": 0.518713248970312,
|
||||||
|
"repelStrength": 10,
|
||||||
|
"linkStrength": 1,
|
||||||
|
"linkDistance": 250,
|
||||||
|
"scale": 0.6346285676930677,
|
||||||
|
"close": true
|
||||||
|
}
|
20
.obsidian/hotkeys.json
vendored
Normal file
20
.obsidian/hotkeys.json
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"editor:swap-line-up": [
|
||||||
|
{
|
||||||
|
"modifiers": [
|
||||||
|
"Alt",
|
||||||
|
"Mod"
|
||||||
|
],
|
||||||
|
"key": "ArrowUp"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"editor:swap-line-down": [
|
||||||
|
{
|
||||||
|
"modifiers": [
|
||||||
|
"Alt",
|
||||||
|
"Mod"
|
||||||
|
],
|
||||||
|
"key": "ArrowDown"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
3
.obsidian/page-preview.json
vendored
Normal file
3
.obsidian/page-preview.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"editor": false
|
||||||
|
}
|
20607
.obsidian/plugins/dataview/main.js
vendored
Normal file
20607
.obsidian/plugins/dataview/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
.obsidian/plugins/dataview/manifest.json
vendored
Normal file
10
.obsidian/plugins/dataview/manifest.json
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"id": "dataview",
|
||||||
|
"name": "Dataview",
|
||||||
|
"version": "0.5.41",
|
||||||
|
"minAppVersion": "0.13.11",
|
||||||
|
"description": "Complex data views for the data-obsessed.",
|
||||||
|
"author": "Michael Brenan <blacksmithgu@gmail.com>",
|
||||||
|
"authorUrl": "https://github.com/blacksmithgu",
|
||||||
|
"isDesktopOnly": false
|
||||||
|
}
|
142
.obsidian/plugins/dataview/styles.css
vendored
Normal file
142
.obsidian/plugins/dataview/styles.css
vendored
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
/** Live Preview padding fixes, specifically for DataviewJS custom HTML elements. */
|
||||||
|
.is-live-preview .block-language-dataviewjs > p, .is-live-preview .block-language-dataviewjs > span {
|
||||||
|
line-height: 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************/
|
||||||
|
/** Table Views **/
|
||||||
|
/*****************/
|
||||||
|
|
||||||
|
/* List View Default Styling; rendered internally as a table. */
|
||||||
|
.table-view-table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-view-table > thead > tr, .table-view-table > tbody > tr {
|
||||||
|
margin-top: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-view-table > tbody > tr:hover {
|
||||||
|
background-color: var(--text-selection);
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-view-table > thead > tr > th {
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: larger;
|
||||||
|
border-top: none;
|
||||||
|
border-left: none;
|
||||||
|
border-right: none;
|
||||||
|
border-bottom: solid;
|
||||||
|
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-view-table > tbody > tr > td {
|
||||||
|
text-align: left;
|
||||||
|
border: none;
|
||||||
|
font-weight: 400;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-view-table ul, .table-view-table ol {
|
||||||
|
margin-block-start: 0.2em !important;
|
||||||
|
margin-block-end: 0.2em !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Rendered value styling for any view. */
|
||||||
|
.dataview-result-list-root-ul {
|
||||||
|
padding: 0em !important;
|
||||||
|
margin: 0em !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataview-result-list-ul {
|
||||||
|
margin-block-start: 0.2em !important;
|
||||||
|
margin-block-end: 0.2em !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Generic grouping styling. */
|
||||||
|
.dataview.result-group {
|
||||||
|
padding-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*******************/
|
||||||
|
/** Inline Fields **/
|
||||||
|
/*******************/
|
||||||
|
|
||||||
|
.dataview.inline-field-key {
|
||||||
|
padding-left: 8px;
|
||||||
|
padding-right: 8px;
|
||||||
|
font-family: var(--font-monospace);
|
||||||
|
background-color: var(--background-primary-alt);
|
||||||
|
color: var(--text-nav-selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataview.inline-field-value {
|
||||||
|
padding-left: 8px;
|
||||||
|
padding-right: 8px;
|
||||||
|
font-family: var(--font-monospace);
|
||||||
|
background-color: var(--background-secondary-alt);
|
||||||
|
color: var(--text-nav-selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataview.inline-field-standalone-value {
|
||||||
|
padding-left: 8px;
|
||||||
|
padding-right: 8px;
|
||||||
|
font-family: var(--font-monospace);
|
||||||
|
background-color: var(--background-secondary-alt);
|
||||||
|
color: var(--text-nav-selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
/***************/
|
||||||
|
/** Task View **/
|
||||||
|
/***************/
|
||||||
|
|
||||||
|
.dataview.task-list-item, .dataview.task-list-basic-item {
|
||||||
|
margin-top: 3px;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
transition: 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataview.task-list-item:hover, .dataview.task-list-basic-item:hover {
|
||||||
|
background-color: var(--text-selection);
|
||||||
|
box-shadow: -40px 0 0 var(--text-selection);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************/
|
||||||
|
/** Error Views **/
|
||||||
|
/*****************/
|
||||||
|
|
||||||
|
div.dataview-error-box {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 150px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border: 4px dashed var(--background-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataview-error-message {
|
||||||
|
color: var(--text-muted);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*************************/
|
||||||
|
/** Additional Metadata **/
|
||||||
|
/*************************/
|
||||||
|
|
||||||
|
.dataview.small-text {
|
||||||
|
font-size: smaller;
|
||||||
|
color: var(--text-muted);
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataview.small-text::before {
|
||||||
|
content: "(";
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataview.small-text::after {
|
||||||
|
content: ")";
|
||||||
|
}
|
340
.obsidian/plugins/obsidian-dialogue-plugin/main.js
vendored
Normal file
340
.obsidian/plugins/obsidian-dialogue-plugin/main.js
vendored
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
/*
|
||||||
|
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: () => DialoguePlugin
|
||||||
|
});
|
||||||
|
var import_obsidian2 = __toModule(require("obsidian"));
|
||||||
|
|
||||||
|
// src/types/dialogueTitleMode.ts
|
||||||
|
var DialogueTitleMode;
|
||||||
|
(function(DialogueTitleMode2) {
|
||||||
|
DialogueTitleMode2["Disabled"] = "disabled";
|
||||||
|
DialogueTitleMode2["First"] = "first";
|
||||||
|
DialogueTitleMode2["All"] = "all";
|
||||||
|
})(DialogueTitleMode || (DialogueTitleMode = {}));
|
||||||
|
|
||||||
|
// src/constants/classes.ts
|
||||||
|
var CLASSES = class {
|
||||||
|
};
|
||||||
|
CLASSES.DIALOGUE_WRAPPER = "dialogue-plugin-wrapper";
|
||||||
|
CLASSES.BLOCK_WRAPPER = "dialogue-plugin-block-wrapper";
|
||||||
|
CLASSES.MESSAGE_WRAPPER_LEFT = "dialogue-plugin-message-wrapper-left";
|
||||||
|
CLASSES.MESSAGE_WRAPPER_RIGHT = "dialogue-plugin-message-wrapper-right";
|
||||||
|
CLASSES.MESSAGE = "dialogue-plugin-message";
|
||||||
|
CLASSES.MESSAGE_TITLE = "dialogue-plugin-message-title";
|
||||||
|
CLASSES.MESSAGE_CONTENT = "dialogue-plugin-message-content";
|
||||||
|
CLASSES.DELIMITER_WRAPPER = "dialogue-plugin-delimiter-wrapper";
|
||||||
|
CLASSES.DELIMITER = "dialogue-plugin-delimiter";
|
||||||
|
CLASSES.DELIMITER_DOT = "dialogue-plugin-delimiter-dot";
|
||||||
|
CLASSES.COMMENT_WRAPPER = "dialogue-plugin-comment-wrapper";
|
||||||
|
CLASSES.COMMENT = "dialogue-plugin-comment";
|
||||||
|
|
||||||
|
// src/components/message.ts
|
||||||
|
var SIDES = class {
|
||||||
|
};
|
||||||
|
SIDES.LEFT = "left";
|
||||||
|
SIDES.RIGHT = "right";
|
||||||
|
var Message = class {
|
||||||
|
constructor(content, side, dialogueSettings) {
|
||||||
|
this.content = content;
|
||||||
|
this.side = side;
|
||||||
|
this.dialogueSettings = dialogueSettings;
|
||||||
|
this.participant = this.side == SIDES.LEFT ? this.dialogueSettings.leftParticipant : this.dialogueSettings.rightParticipant;
|
||||||
|
this.renderMessage();
|
||||||
|
}
|
||||||
|
renderMessage() {
|
||||||
|
const messageEl = this.createMessageEl();
|
||||||
|
if (this.titleShouldRender()) {
|
||||||
|
messageEl.createDiv({ cls: CLASSES.MESSAGE_TITLE, text: this.participant.title });
|
||||||
|
}
|
||||||
|
messageEl.createDiv({ cls: CLASSES.MESSAGE_CONTENT, text: this.content });
|
||||||
|
}
|
||||||
|
createMessageEl() {
|
||||||
|
var _a;
|
||||||
|
const sideClass = this.side == SIDES.LEFT ? CLASSES.MESSAGE_WRAPPER_LEFT : CLASSES.MESSAGE_WRAPPER_RIGHT;
|
||||||
|
const messageWrapperEl = this.dialogueSettings.parent.createDiv({
|
||||||
|
cls: `${CLASSES.BLOCK_WRAPPER} ${sideClass}`
|
||||||
|
});
|
||||||
|
return messageWrapperEl.createDiv({
|
||||||
|
cls: CLASSES.MESSAGE,
|
||||||
|
attr: {
|
||||||
|
style: `max-width: ${this.dialogueSettings.messageMaxWidth};`,
|
||||||
|
"data-participant-name": this.participant.title,
|
||||||
|
"data-participant-id": (_a = this.participant.enforcedId) != null ? _a : this.dialogueSettings.participants.get(this.participant.title)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
titleShouldRender() {
|
||||||
|
if (this.participant.title.length < 1)
|
||||||
|
return false;
|
||||||
|
switch (this.dialogueSettings.titleMode) {
|
||||||
|
case DialogueTitleMode.Disabled:
|
||||||
|
return false;
|
||||||
|
case DialogueTitleMode.All:
|
||||||
|
return true;
|
||||||
|
case DialogueTitleMode.First: {
|
||||||
|
if (this.participant.renderedOnce)
|
||||||
|
return false;
|
||||||
|
this.participant.renderedOnce = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// src/components/delimiter.ts
|
||||||
|
var Delimiter = class {
|
||||||
|
constructor(dialogueSettings) {
|
||||||
|
this.dialogueSettings = dialogueSettings;
|
||||||
|
this.renderDelimiter();
|
||||||
|
}
|
||||||
|
renderDelimiter() {
|
||||||
|
const delimiterWrapperEl = this.dialogueSettings.parent.createDiv({
|
||||||
|
cls: `${CLASSES.BLOCK_WRAPPER} ${CLASSES.DELIMITER_WRAPPER}`
|
||||||
|
});
|
||||||
|
const delimiterEl = delimiterWrapperEl.createDiv({ cls: CLASSES.DELIMITER });
|
||||||
|
delimiterEl.createEl("div", { cls: CLASSES.DELIMITER_DOT });
|
||||||
|
delimiterEl.createEl("div", { cls: CLASSES.DELIMITER_DOT });
|
||||||
|
delimiterEl.createEl("div", { cls: CLASSES.DELIMITER_DOT });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// src/components/comment.ts
|
||||||
|
var Comment = class {
|
||||||
|
constructor(content, dialogueSettings) {
|
||||||
|
this.content = content;
|
||||||
|
this.dialogueSettings = dialogueSettings;
|
||||||
|
this.renderComment();
|
||||||
|
}
|
||||||
|
renderComment() {
|
||||||
|
const commentEl = this.dialogueSettings.parent.createDiv({
|
||||||
|
cls: `${CLASSES.BLOCK_WRAPPER} ${CLASSES.COMMENT_WRAPPER}`
|
||||||
|
});
|
||||||
|
return commentEl.createDiv({
|
||||||
|
cls: CLASSES.COMMENT,
|
||||||
|
text: this.content,
|
||||||
|
attr: {
|
||||||
|
style: `max-width: ${this.dialogueSettings.commentMaxWidth};`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// src/dialogue.ts
|
||||||
|
var KEYWORDS = class {
|
||||||
|
};
|
||||||
|
KEYWORDS.LEFT_PATTERN = /^l(?:eft)?(?:-(\d+))?:/i;
|
||||||
|
KEYWORDS.RIGHT_PATTERN = /^r(?:ight)?(?:-(\d+))?:/i;
|
||||||
|
KEYWORDS.TITLE_MODE = "titleMode:";
|
||||||
|
KEYWORDS.MESSAGE_MAX_WIDTH = "messageMaxWidth:";
|
||||||
|
KEYWORDS.COMMENT_MAX_WIDTH = "commentMaxWidth:";
|
||||||
|
KEYWORDS.DELIMITER = /^-|delimiter/;
|
||||||
|
KEYWORDS.COMMENT = "#";
|
||||||
|
KEYWORDS.MESSAGE_LEFT = "<";
|
||||||
|
KEYWORDS.MESSAGE_RIGHT = ">";
|
||||||
|
var DialogueRenderer = class {
|
||||||
|
constructor(src, parent, settings) {
|
||||||
|
this.src = src;
|
||||||
|
this.dialogueWrapperEl = parent.createDiv({ cls: CLASSES.DIALOGUE_WRAPPER });
|
||||||
|
this.dialogueSettings = {
|
||||||
|
parent: this.dialogueWrapperEl,
|
||||||
|
leftParticipant: {
|
||||||
|
title: settings.defaultLeftTitle,
|
||||||
|
renderedOnce: false,
|
||||||
|
enforcedId: null
|
||||||
|
},
|
||||||
|
rightParticipant: {
|
||||||
|
title: settings.defaultRightTitle,
|
||||||
|
renderedOnce: false,
|
||||||
|
enforcedId: null
|
||||||
|
},
|
||||||
|
titleMode: settings.defaultTitleMode,
|
||||||
|
messageMaxWidth: settings.defaultMessageMaxWidth,
|
||||||
|
commentMaxWidth: settings.defaultCommentMaxWidth,
|
||||||
|
participants: new Map()
|
||||||
|
};
|
||||||
|
this.renderDialogue();
|
||||||
|
}
|
||||||
|
registerParticipant(participant) {
|
||||||
|
if (!this.dialogueSettings.participants.has(participant)) {
|
||||||
|
this.dialogueSettings.participants.set(participant, this.dialogueSettings.participants.size + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getEnforcedId(pattern, line) {
|
||||||
|
let enforcedId = null;
|
||||||
|
const result = pattern.exec(line);
|
||||||
|
if (result != null && result.length > 1) {
|
||||||
|
enforcedId = result[1];
|
||||||
|
}
|
||||||
|
return enforcedId;
|
||||||
|
}
|
||||||
|
renderDialogue() {
|
||||||
|
const lines = this.src.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0);
|
||||||
|
for (const line of lines) {
|
||||||
|
if (KEYWORDS.LEFT_PATTERN.test(line)) {
|
||||||
|
this.dialogueSettings.leftParticipant.title = line.split(":").splice(1).join(":").trim();
|
||||||
|
this.dialogueSettings.leftParticipant.renderedOnce = false;
|
||||||
|
this.dialogueSettings.leftParticipant.enforcedId = this.getEnforcedId(KEYWORDS.LEFT_PATTERN, line);
|
||||||
|
} else if (KEYWORDS.RIGHT_PATTERN.test(line)) {
|
||||||
|
this.dialogueSettings.rightParticipant.title = line.split(":").splice(1).join(":").trim();
|
||||||
|
this.dialogueSettings.rightParticipant.renderedOnce = false;
|
||||||
|
this.dialogueSettings.rightParticipant.enforcedId = this.getEnforcedId(KEYWORDS.RIGHT_PATTERN, line);
|
||||||
|
} else if (line.startsWith(KEYWORDS.TITLE_MODE)) {
|
||||||
|
const modeName = line.substr(KEYWORDS.TITLE_MODE.length).trim().toLowerCase();
|
||||||
|
if (Object.values(DialogueTitleMode).some((mode) => mode == modeName)) {
|
||||||
|
this.dialogueSettings.titleMode = modeName;
|
||||||
|
}
|
||||||
|
} else if (line.startsWith(KEYWORDS.MESSAGE_MAX_WIDTH)) {
|
||||||
|
this.dialogueSettings.messageMaxWidth = line.substr(KEYWORDS.MESSAGE_MAX_WIDTH.length).trim();
|
||||||
|
} else if (line.startsWith(KEYWORDS.COMMENT_MAX_WIDTH)) {
|
||||||
|
this.dialogueSettings.commentMaxWidth = line.substr(KEYWORDS.COMMENT_MAX_WIDTH.length).trim();
|
||||||
|
} else if (KEYWORDS.DELIMITER.test(line)) {
|
||||||
|
new Delimiter(this.dialogueSettings);
|
||||||
|
} else if (line.startsWith(KEYWORDS.COMMENT)) {
|
||||||
|
const content = line.substr(KEYWORDS.COMMENT.length);
|
||||||
|
new Comment(content, this.dialogueSettings);
|
||||||
|
} else if (line.startsWith(KEYWORDS.MESSAGE_LEFT)) {
|
||||||
|
const content = line.substr(KEYWORDS.MESSAGE_LEFT.length);
|
||||||
|
this.registerParticipant(this.dialogueSettings.leftParticipant.title);
|
||||||
|
new Message(content, SIDES.LEFT, this.dialogueSettings);
|
||||||
|
} else if (line.startsWith(KEYWORDS.MESSAGE_RIGHT)) {
|
||||||
|
const content = line.substr(KEYWORDS.MESSAGE_RIGHT.length);
|
||||||
|
this.registerParticipant(this.dialogueSettings.rightParticipant.title);
|
||||||
|
new Message(content, SIDES.RIGHT, this.dialogueSettings);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// src/settings.ts
|
||||||
|
var import_obsidian = __toModule(require("obsidian"));
|
||||||
|
var DEFAULT_SETTINGS = {
|
||||||
|
defaultLeftTitle: "",
|
||||||
|
defaultRightTitle: "",
|
||||||
|
defaultTitleMode: DialogueTitleMode.First,
|
||||||
|
defaultMessageMaxWidth: "60%",
|
||||||
|
defaultCommentMaxWidth: "60%"
|
||||||
|
};
|
||||||
|
var DialogueSettingTab = class extends import_obsidian.PluginSettingTab {
|
||||||
|
constructor(app, plugin) {
|
||||||
|
super(app, plugin);
|
||||||
|
this.plugin = plugin;
|
||||||
|
}
|
||||||
|
display() {
|
||||||
|
const { containerEl } = this;
|
||||||
|
containerEl.empty();
|
||||||
|
containerEl.createEl("h2", { text: "Dialogue Settings" });
|
||||||
|
const coffeeEl = containerEl.createEl("div", {
|
||||||
|
attr: {
|
||||||
|
style: "text-align: center; margin-bottom: 10px;"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const coffeeLinkEl = coffeeEl.createEl("a", { href: "https://www.buymeacoffee.com/holubj" });
|
||||||
|
coffeeLinkEl.createEl("img", {
|
||||||
|
attr: {
|
||||||
|
src: "https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png",
|
||||||
|
alt: "Buy Me A Coffee",
|
||||||
|
style: "height: 60px; width: 217px;"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
new import_obsidian.Setting(containerEl).setName("Default left title").setDesc("Default value for left title in all dialogues.").addText((text) => text.setPlaceholder("Enter default left title").setValue(this.plugin.settings.defaultLeftTitle).onChange((value) => __async(this, null, function* () {
|
||||||
|
this.plugin.settings.defaultLeftTitle = value;
|
||||||
|
yield this.plugin.saveSettings();
|
||||||
|
})));
|
||||||
|
new import_obsidian.Setting(containerEl).setName("Default right title").setDesc("Default value for right title in all dialogues.").addText((text) => text.setPlaceholder("Enter default right title").setValue(this.plugin.settings.defaultRightTitle).onChange((value) => __async(this, null, function* () {
|
||||||
|
this.plugin.settings.defaultRightTitle = value;
|
||||||
|
yield this.plugin.saveSettings();
|
||||||
|
})));
|
||||||
|
new import_obsidian.Setting(containerEl).setName("Default title mode").setDesc("Default title mode in all dialogues.").addDropdown((cb) => {
|
||||||
|
Object.values(DialogueTitleMode).forEach((titleMode) => {
|
||||||
|
const mode = titleMode.toString();
|
||||||
|
cb.addOption(mode, mode.charAt(0).toUpperCase() + mode.slice(1));
|
||||||
|
});
|
||||||
|
cb.setValue(this.plugin.settings.defaultTitleMode).onChange((value) => __async(this, null, function* () {
|
||||||
|
this.plugin.settings.defaultTitleMode = value;
|
||||||
|
yield this.plugin.saveSettings();
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
new import_obsidian.Setting(containerEl).setName("Default max message width").setDesc("Default max message width in all dialogues.").addText((text) => text.setPlaceholder("Enter default max message width").setValue(this.plugin.settings.defaultMessageMaxWidth).onChange((value) => __async(this, null, function* () {
|
||||||
|
this.plugin.settings.defaultMessageMaxWidth = value;
|
||||||
|
yield this.plugin.saveSettings();
|
||||||
|
})));
|
||||||
|
new import_obsidian.Setting(containerEl).setName("Default max comment width").setDesc("Default max comment width in all dialogues.").addText((text) => text.setPlaceholder("Enter default max comment width").setValue(this.plugin.settings.defaultCommentMaxWidth).onChange((value) => __async(this, null, function* () {
|
||||||
|
this.plugin.settings.defaultCommentMaxWidth = value;
|
||||||
|
yield this.plugin.saveSettings();
|
||||||
|
})));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// src/main.ts
|
||||||
|
var DialoguePlugin = class extends import_obsidian2.Plugin {
|
||||||
|
onload() {
|
||||||
|
return __async(this, null, function* () {
|
||||||
|
yield this.loadSettings();
|
||||||
|
this.registerMarkdownCodeBlockProcessor(`dialogue`, (src, el, ctx) => {
|
||||||
|
new DialogueRenderer(src, el, this.settings);
|
||||||
|
});
|
||||||
|
this.addSettingTab(new DialogueSettingTab(this.app, this));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
loadSettings() {
|
||||||
|
return __async(this, null, function* () {
|
||||||
|
this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
saveSettings() {
|
||||||
|
return __async(this, null, function* () {
|
||||||
|
yield this.saveData(this.settings);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
10
.obsidian/plugins/obsidian-dialogue-plugin/manifest.json
vendored
Normal file
10
.obsidian/plugins/obsidian-dialogue-plugin/manifest.json
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"id": "obsidian-dialogue-plugin",
|
||||||
|
"name": "Dialogue",
|
||||||
|
"version": "1.0.2",
|
||||||
|
"minAppVersion": "0.12.0",
|
||||||
|
"description": "Create dialogues in Markdown.",
|
||||||
|
"author": "Jakub Holub",
|
||||||
|
"authorUrl": "https://github.com/holubj",
|
||||||
|
"isDesktopOnly": false
|
||||||
|
}
|
58
.obsidian/plugins/obsidian-dialogue-plugin/styles.css
vendored
Normal file
58
.obsidian/plugins/obsidian-dialogue-plugin/styles.css
vendored
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
.dialogue-plugin-wrapper {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-block-wrapper {
|
||||||
|
display: flex;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-message-wrapper-left {
|
||||||
|
justify-content: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-message-wrapper-right {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-message {
|
||||||
|
overflow: hidden;
|
||||||
|
max-width: 60%;
|
||||||
|
background-color: var(--background-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-message-title {
|
||||||
|
padding: 5px 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-message-content {
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-delimiter-wrapper {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-delimiter {
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-delimiter-dot {
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
margin: 0 3px;
|
||||||
|
display: inline-block;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: var(--background-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-comment-wrapper {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogue-plugin-comment {
|
||||||
|
margin: 20px 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
24
.obsidian/plugins/obsidian-git/data.json
vendored
Normal file
24
.obsidian/plugins/obsidian-git/data.json
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"commitMessage": "vault backup: {{date}}",
|
||||||
|
"autoCommitMessage": "vault auto-backup: {{date}}",
|
||||||
|
"commitDateFormat": "DD.MM.YYYY - HH:mm:ss",
|
||||||
|
"autoSaveInterval": 5,
|
||||||
|
"autoPushInterval": 0,
|
||||||
|
"autoPullInterval": 0,
|
||||||
|
"autoPullOnBoot": true,
|
||||||
|
"disablePush": false,
|
||||||
|
"pullBeforePush": true,
|
||||||
|
"disablePopups": false,
|
||||||
|
"listChangedFilesInMessageBody": true,
|
||||||
|
"showStatusBar": true,
|
||||||
|
"updateSubmodules": false,
|
||||||
|
"syncMethod": "merge",
|
||||||
|
"gitPath": "",
|
||||||
|
"customMessageOnAutoBackup": false,
|
||||||
|
"autoBackupAfterFileChange": true,
|
||||||
|
"treeStructure": false,
|
||||||
|
"refreshSourceControl": true,
|
||||||
|
"basePath": "",
|
||||||
|
"differentIntervalCommitAndPush": true,
|
||||||
|
"changedFilesInStatusBar": true
|
||||||
|
}
|
14915
.obsidian/plugins/obsidian-git/main.js
vendored
Normal file
14915
.obsidian/plugins/obsidian-git/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
8
.obsidian/plugins/obsidian-git/manifest.json
vendored
Normal file
8
.obsidian/plugins/obsidian-git/manifest.json
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"id": "obsidian-git",
|
||||||
|
"name": "Obsidian Git",
|
||||||
|
"description": "Backup your vault with git.",
|
||||||
|
"isDesktopOnly": true,
|
||||||
|
"js": "main.js",
|
||||||
|
"version": "1.26.1"
|
||||||
|
}
|
413
.obsidian/plugins/obsidian-git/styles.css
vendored
Normal file
413
.obsidian/plugins/obsidian-git/styles.css
vendored
Normal file
@ -0,0 +1,413 @@
|
|||||||
|
@keyframes loading {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loading > svg {
|
||||||
|
animation: 2s linear infinite loading;
|
||||||
|
transform-origin: 50% 50%;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.obsidian-git-center {
|
||||||
|
margin: auto;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip.mod-left {
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip.mod-right {
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.obsidian-git-shortcuts {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diff-err {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diff-err-sign {
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-d-none {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-wrapper {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-header {
|
||||||
|
background-color: var(--background-primary);
|
||||||
|
border-bottom: 1px solid var(--interactive-accent);
|
||||||
|
font-family: var(--font-monospace);
|
||||||
|
height: 35px;
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-header,
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-stats {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-stats {
|
||||||
|
font-size: 14px;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-lines-added {
|
||||||
|
border: 1px solid #b4e2b4;
|
||||||
|
border-radius: 5px 0 0 5px;
|
||||||
|
color: #399839;
|
||||||
|
padding: 2px;
|
||||||
|
text-align: right;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-lines-deleted {
|
||||||
|
border: 1px solid #e9aeae;
|
||||||
|
border-radius: 0 5px 5px 0;
|
||||||
|
color: #c33;
|
||||||
|
margin-left: 1px;
|
||||||
|
padding: 2px;
|
||||||
|
text-align: left;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .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%;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-name {
|
||||||
|
overflow-x: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-wrapper {
|
||||||
|
border: 1px solid var(--background-modifier-border);
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .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-modifier-border);
|
||||||
|
border-radius: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
display: none;
|
||||||
|
font-size: 12px;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 4px 8px;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse.d2h-selected {
|
||||||
|
background-color: #c8e1ff;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse-input {
|
||||||
|
margin: 0 4px 0 0;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-diff-table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
font-family: Menlo, Consolas, monospace;
|
||||||
|
font-size: 13px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-files-diff {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-diff {
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-side-diff {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: -8px;
|
||||||
|
margin-right: -4px;
|
||||||
|
overflow-x: scroll;
|
||||||
|
overflow-y: hidden;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line {
|
||||||
|
padding: 0 8em;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line,
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .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%;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line {
|
||||||
|
padding: 0 4.5em;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .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;
|
||||||
|
white-space: pre;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
|
||||||
|
.theme-light
|
||||||
|
.workspace-leaf-content[data-type="diff-view"]
|
||||||
|
.d2h-code-side-line
|
||||||
|
del {
|
||||||
|
background-color: #ffb6ba;
|
||||||
|
}
|
||||||
|
.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
|
||||||
|
.theme-dark
|
||||||
|
.workspace-leaf-content[data-type="diff-view"]
|
||||||
|
.d2h-code-side-line
|
||||||
|
del {
|
||||||
|
background-color: #8d232881;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line del,
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line ins {
|
||||||
|
border-radius: 0.2em;
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: -1px;
|
||||||
|
text-decoration: none;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
|
||||||
|
.theme-light
|
||||||
|
.workspace-leaf-content[data-type="diff-view"]
|
||||||
|
.d2h-code-side-line
|
||||||
|
ins {
|
||||||
|
background-color: #97f295;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
|
||||||
|
.theme-dark
|
||||||
|
.workspace-leaf-content[data-type="diff-view"]
|
||||||
|
.d2h-code-side-line
|
||||||
|
ins {
|
||||||
|
background-color: #1d921996;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line-prefix {
|
||||||
|
word-wrap: normal;
|
||||||
|
background: none;
|
||||||
|
display: inline;
|
||||||
|
padding: 0;
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .line-num1 {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .line-num1,
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .line-num2 {
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0 0.5em;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
width: 3.5em;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .line-num2 {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .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-muted);
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
text-align: right;
|
||||||
|
width: 7.5em;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber:after {
|
||||||
|
content: "\200b";
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .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-muted);
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0 0.5em;
|
||||||
|
position: absolute;
|
||||||
|
text-align: right;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
width: 4em;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber:after {
|
||||||
|
content: "\200b";
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-emptyplaceholder,
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-emptyplaceholder {
|
||||||
|
background-color: var(--background-primary);
|
||||||
|
border-color: var(--background-modifier-border);
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line-prefix,
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber,
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber,
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-emptyplaceholder {
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber,
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber {
|
||||||
|
direction: rtl;
|
||||||
|
}
|
||||||
|
.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-del {
|
||||||
|
background-color: #fee8e9;
|
||||||
|
border-color: #e9aeae;
|
||||||
|
}
|
||||||
|
.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-ins {
|
||||||
|
background-color: #dfd;
|
||||||
|
border-color: #b4e2b4;
|
||||||
|
}
|
||||||
|
.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-del {
|
||||||
|
background-color: #521b1d83;
|
||||||
|
border-color: #691d1d73;
|
||||||
|
}
|
||||||
|
.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-ins {
|
||||||
|
background-color: rgba(30, 71, 30, 0.5);
|
||||||
|
border-color: #13501381;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-info {
|
||||||
|
background-color: var(--background-primary);
|
||||||
|
border-color: var(--background-modifier-border);
|
||||||
|
color: var(--text-normal);
|
||||||
|
}
|
||||||
|
.theme-light
|
||||||
|
.workspace-leaf-content[data-type="diff-view"]
|
||||||
|
.d2h-file-diff
|
||||||
|
.d2h-del.d2h-change {
|
||||||
|
background-color: #fdf2d0;
|
||||||
|
}
|
||||||
|
.theme-dark
|
||||||
|
.workspace-leaf-content[data-type="diff-view"]
|
||||||
|
.d2h-file-diff
|
||||||
|
.d2h-del.d2h-change {
|
||||||
|
background-color: #55492480;
|
||||||
|
}
|
||||||
|
.theme-light
|
||||||
|
.workspace-leaf-content[data-type="diff-view"]
|
||||||
|
.d2h-file-diff
|
||||||
|
.d2h-ins.d2h-change {
|
||||||
|
background-color: #ded;
|
||||||
|
}
|
||||||
|
.theme-dark
|
||||||
|
.workspace-leaf-content[data-type="diff-view"]
|
||||||
|
.d2h-file-diff
|
||||||
|
.d2h-ins.d2h-change {
|
||||||
|
background-color: rgba(37, 78, 37, 0.418);
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper a {
|
||||||
|
color: #3572b0;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"]
|
||||||
|
.d2h-file-list-wrapper
|
||||||
|
a:visited {
|
||||||
|
color: #3572b0;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-header {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-title {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-line {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list {
|
||||||
|
display: block;
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list > li {
|
||||||
|
border-bottom: 1px solid var(--background-modifier-border);
|
||||||
|
margin: 0;
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list > li:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-file-switch {
|
||||||
|
cursor: pointer;
|
||||||
|
display: none;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-icon {
|
||||||
|
fill: currentColor;
|
||||||
|
margin-right: 10px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-deleted {
|
||||||
|
color: #c33;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-added {
|
||||||
|
color: #399839;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-changed {
|
||||||
|
color: #d0b44c;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-moved {
|
||||||
|
color: #3572b0;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-tag {
|
||||||
|
background-color: var(--background-primary);
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
font-size: 10px;
|
||||||
|
margin-left: 5px;
|
||||||
|
padding: 0 2px;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-deleted-tag {
|
||||||
|
border: 2px solid #c33;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-added-tag {
|
||||||
|
border: 1px solid #399839;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-changed-tag {
|
||||||
|
border: 1px solid #d0b44c;
|
||||||
|
}
|
||||||
|
.workspace-leaf-content[data-type="diff-view"] .d2h-moved-tag {
|
||||||
|
border: 1px solid #3572b0;
|
||||||
|
}
|
26325
.obsidian/plugins/obsidian-icons-plugin/main.js
vendored
Normal file
26325
.obsidian/plugins/obsidian-icons-plugin/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
.obsidian/plugins/obsidian-icons-plugin/manifest.json
vendored
Normal file
10
.obsidian/plugins/obsidian-icons-plugin/manifest.json
vendored
Normal 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
|
||||||
|
}
|
16
.obsidian/plugins/obsidian-icons-plugin/styles.css
vendored
Normal file
16
.obsidian/plugins/obsidian-icons-plugin/styles.css
vendored
Normal 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;
|
||||||
|
}
|
26
.obsidian/plugins/obsidian-image-toolkit/data.json
vendored
Normal file
26
.obsidian/plugins/obsidian-image-toolkit/data.json
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"viewImageEditor": true,
|
||||||
|
"viewImageInCPB": true,
|
||||||
|
"viewImageWithALink": true,
|
||||||
|
"viewImageOther": true,
|
||||||
|
"pinMode": false,
|
||||||
|
"pinMaximum": 3,
|
||||||
|
"pinCoverMode": true,
|
||||||
|
"imageMoveSpeed": 10,
|
||||||
|
"imgTipToggle": true,
|
||||||
|
"imgFullScreenMode": "FIT",
|
||||||
|
"imgViewBackgroundColor": "#00000000",
|
||||||
|
"imageBorderToggle": false,
|
||||||
|
"imageBorderWidth": "medium",
|
||||||
|
"imageBorderStyle": "solid",
|
||||||
|
"imageBorderColor": "black",
|
||||||
|
"galleryNavbarToggle": true,
|
||||||
|
"galleryNavbarDefaultColor": "#0000001A",
|
||||||
|
"galleryNavbarHoverColor": "#0000004D",
|
||||||
|
"galleryImgBorderActive": true,
|
||||||
|
"galleryImgBorderActiveColor": "#FF0000",
|
||||||
|
"moveTheImageHotkey": "NONE",
|
||||||
|
"switchTheImageHotkey": "CTRL",
|
||||||
|
"doubleClickToolbar": "toolbar_full_screen",
|
||||||
|
"viewTriggerHotkey": "NONE"
|
||||||
|
}
|
3192
.obsidian/plugins/obsidian-image-toolkit/main.js
vendored
Normal file
3192
.obsidian/plugins/obsidian-image-toolkit/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
.obsidian/plugins/obsidian-image-toolkit/manifest.json
vendored
Normal file
10
.obsidian/plugins/obsidian-image-toolkit/manifest.json
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"id": "obsidian-image-toolkit",
|
||||||
|
"name": "Image Toolkit",
|
||||||
|
"version": "1.3.1",
|
||||||
|
"minAppVersion": "0.2.0",
|
||||||
|
"description": "This plugin provides some image viewing toolkit.",
|
||||||
|
"author": "sissilab",
|
||||||
|
"authorUrl": "https://github.com/sissilab",
|
||||||
|
"isDesktopOnly": true
|
||||||
|
}
|
341
.obsidian/plugins/obsidian-image-toolkit/styles.css
vendored
Normal file
341
.obsidian/plugins/obsidian-image-toolkit/styles.css
vendored
Normal file
File diff suppressed because one or more lines are too long
15
.obsidian/plugins/obsidian-pandoc/data.json
vendored
Normal file
15
.obsidian/plugins/obsidian-pandoc/data.json
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"showCLICommands": false,
|
||||||
|
"addExtensionsToInternalLinks": "html",
|
||||||
|
"injectAppCSS": "current",
|
||||||
|
"injectThemeCSS": false,
|
||||||
|
"customCSSFile": null,
|
||||||
|
"displayYAMLFrontmatter": false,
|
||||||
|
"linkStrippingBehaviour": "text",
|
||||||
|
"highDPIDiagrams": true,
|
||||||
|
"pandoc": null,
|
||||||
|
"pdflatex": null,
|
||||||
|
"outputFolder": null,
|
||||||
|
"extraArguments": "",
|
||||||
|
"exportFrom": "html"
|
||||||
|
}
|
11327
.obsidian/plugins/obsidian-pandoc/main.js
vendored
Normal file
11327
.obsidian/plugins/obsidian-pandoc/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
.obsidian/plugins/obsidian-pandoc/manifest.json
vendored
Normal file
10
.obsidian/plugins/obsidian-pandoc/manifest.json
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"id": "obsidian-pandoc",
|
||||||
|
"name": "Pandoc Plugin",
|
||||||
|
"version": "0.2.5",
|
||||||
|
"minAppVersion": "0.12.5",
|
||||||
|
"description": "This is a Pandoc export plugin for Obsidian. It provides commands to export to formats like DOCX, ePub and PDF.",
|
||||||
|
"author": "Oliver Balfour",
|
||||||
|
"authorUrl": "https://github.com/OliverBalfour/obsidian-pandoc",
|
||||||
|
"isDesktopOnly": true
|
||||||
|
}
|
4
.obsidian/plugins/obsidian-pandoc/styles.css
vendored
Normal file
4
.obsidian/plugins/obsidian-pandoc/styles.css
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
.pandoc-plugin-error {
|
||||||
|
color: red;
|
||||||
|
}
|
365
.obsidian/plugins/obsidian-reading-time/main.js
vendored
Normal file
365
.obsidian/plugins/obsidian-reading-time/main.js
vendored
Normal file
@ -0,0 +1,365 @@
|
|||||||
|
/*
|
||||||
|
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 __commonJS = (cb, mod) => function __require() {
|
||||||
|
return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||||
|
};
|
||||||
|
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());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// node_modules/parse-ms/index.js
|
||||||
|
var require_parse_ms = __commonJS({
|
||||||
|
"node_modules/parse-ms/index.js"(exports, module2) {
|
||||||
|
"use strict";
|
||||||
|
module2.exports = (milliseconds) => {
|
||||||
|
if (typeof milliseconds !== "number") {
|
||||||
|
throw new TypeError("Expected a number");
|
||||||
|
}
|
||||||
|
const roundTowardsZero = milliseconds > 0 ? Math.floor : Math.ceil;
|
||||||
|
return {
|
||||||
|
days: roundTowardsZero(milliseconds / 864e5),
|
||||||
|
hours: roundTowardsZero(milliseconds / 36e5) % 24,
|
||||||
|
minutes: roundTowardsZero(milliseconds / 6e4) % 60,
|
||||||
|
seconds: roundTowardsZero(milliseconds / 1e3) % 60,
|
||||||
|
milliseconds: roundTowardsZero(milliseconds) % 1e3,
|
||||||
|
microseconds: roundTowardsZero(milliseconds * 1e3) % 1e3,
|
||||||
|
nanoseconds: roundTowardsZero(milliseconds * 1e6) % 1e3
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// node_modules/pretty-ms/index.js
|
||||||
|
var require_pretty_ms = __commonJS({
|
||||||
|
"node_modules/pretty-ms/index.js"(exports, module2) {
|
||||||
|
"use strict";
|
||||||
|
var parseMilliseconds = require_parse_ms();
|
||||||
|
var pluralize = (word, count) => count === 1 ? word : `${word}s`;
|
||||||
|
var SECOND_ROUNDING_EPSILON = 1e-7;
|
||||||
|
module2.exports = (milliseconds, options = {}) => {
|
||||||
|
if (!Number.isFinite(milliseconds)) {
|
||||||
|
throw new TypeError("Expected a finite number");
|
||||||
|
}
|
||||||
|
if (options.colonNotation) {
|
||||||
|
options.compact = false;
|
||||||
|
options.formatSubMilliseconds = false;
|
||||||
|
options.separateMilliseconds = false;
|
||||||
|
options.verbose = false;
|
||||||
|
}
|
||||||
|
if (options.compact) {
|
||||||
|
options.secondsDecimalDigits = 0;
|
||||||
|
options.millisecondsDecimalDigits = 0;
|
||||||
|
}
|
||||||
|
const result = [];
|
||||||
|
const floorDecimals = (value, decimalDigits) => {
|
||||||
|
const flooredInterimValue = Math.floor(value * 10 ** decimalDigits + SECOND_ROUNDING_EPSILON);
|
||||||
|
const flooredValue = Math.round(flooredInterimValue) / 10 ** decimalDigits;
|
||||||
|
return flooredValue.toFixed(decimalDigits);
|
||||||
|
};
|
||||||
|
const add = (value, long, short, valueString) => {
|
||||||
|
if ((result.length === 0 || !options.colonNotation) && value === 0 && !(options.colonNotation && short === "m")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
valueString = (valueString || value || "0").toString();
|
||||||
|
let prefix;
|
||||||
|
let suffix;
|
||||||
|
if (options.colonNotation) {
|
||||||
|
prefix = result.length > 0 ? ":" : "";
|
||||||
|
suffix = "";
|
||||||
|
const wholeDigits = valueString.includes(".") ? valueString.split(".")[0].length : valueString.length;
|
||||||
|
const minLength = result.length > 0 ? 2 : 1;
|
||||||
|
valueString = "0".repeat(Math.max(0, minLength - wholeDigits)) + valueString;
|
||||||
|
} else {
|
||||||
|
prefix = "";
|
||||||
|
suffix = options.verbose ? " " + pluralize(long, value) : short;
|
||||||
|
}
|
||||||
|
result.push(prefix + valueString + suffix);
|
||||||
|
};
|
||||||
|
const parsed = parseMilliseconds(milliseconds);
|
||||||
|
add(Math.trunc(parsed.days / 365), "year", "y");
|
||||||
|
add(parsed.days % 365, "day", "d");
|
||||||
|
add(parsed.hours, "hour", "h");
|
||||||
|
add(parsed.minutes, "minute", "m");
|
||||||
|
if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
|
||||||
|
add(parsed.seconds, "second", "s");
|
||||||
|
if (options.formatSubMilliseconds) {
|
||||||
|
add(parsed.milliseconds, "millisecond", "ms");
|
||||||
|
add(parsed.microseconds, "microsecond", "\xB5s");
|
||||||
|
add(parsed.nanoseconds, "nanosecond", "ns");
|
||||||
|
} else {
|
||||||
|
const millisecondsAndBelow = parsed.milliseconds + parsed.microseconds / 1e3 + parsed.nanoseconds / 1e6;
|
||||||
|
const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
|
||||||
|
const roundedMiliseconds = millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
|
||||||
|
const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : roundedMiliseconds;
|
||||||
|
add(Number.parseFloat(millisecondsString, 10), "millisecond", "ms", millisecondsString);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const seconds = milliseconds / 1e3 % 60;
|
||||||
|
const secondsDecimalDigits = typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1;
|
||||||
|
const secondsFixed = floorDecimals(seconds, secondsDecimalDigits);
|
||||||
|
const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
|
||||||
|
add(Number.parseFloat(secondsString, 10), "second", "s", secondsString);
|
||||||
|
}
|
||||||
|
if (result.length === 0) {
|
||||||
|
return "0" + (options.verbose ? " milliseconds" : "ms");
|
||||||
|
}
|
||||||
|
if (options.compact) {
|
||||||
|
return result[0];
|
||||||
|
}
|
||||||
|
if (typeof options.unitCount === "number") {
|
||||||
|
const separator = options.colonNotation ? "" : " ";
|
||||||
|
return result.slice(0, Math.max(options.unitCount, 1)).join(separator);
|
||||||
|
}
|
||||||
|
return options.colonNotation ? result.join("") : result.join(" ");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// node_modules/reading-time/lib/reading-time.js
|
||||||
|
var require_reading_time = __commonJS({
|
||||||
|
"node_modules/reading-time/lib/reading-time.js"(exports, module2) {
|
||||||
|
"use strict";
|
||||||
|
function codeIsInRanges(number, arrayOfRanges) {
|
||||||
|
return arrayOfRanges.some(([lowerBound, upperBound]) => lowerBound <= number && number <= upperBound);
|
||||||
|
}
|
||||||
|
function isCJK(c) {
|
||||||
|
if (typeof c !== "string") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const charCode = c.charCodeAt(0);
|
||||||
|
return codeIsInRanges(charCode, [
|
||||||
|
[12352, 12447],
|
||||||
|
[19968, 40959],
|
||||||
|
[44032, 55203],
|
||||||
|
[131072, 191456]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
function isAnsiWordBound(c) {
|
||||||
|
return " \n\r ".includes(c);
|
||||||
|
}
|
||||||
|
function isPunctuation(c) {
|
||||||
|
if (typeof c !== "string") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const charCode = c.charCodeAt(0);
|
||||||
|
return codeIsInRanges(charCode, [
|
||||||
|
[33, 47],
|
||||||
|
[58, 64],
|
||||||
|
[91, 96],
|
||||||
|
[123, 126],
|
||||||
|
[12288, 12351],
|
||||||
|
[65280, 65519]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
function readingTime2(text, options = {}) {
|
||||||
|
let words = 0, start = 0, end = text.length - 1;
|
||||||
|
const wordsPerMinute = options.wordsPerMinute || 200;
|
||||||
|
const isWordBound = options.wordBound || isAnsiWordBound;
|
||||||
|
while (isWordBound(text[start]))
|
||||||
|
start++;
|
||||||
|
while (isWordBound(text[end]))
|
||||||
|
end--;
|
||||||
|
const normalizedText = `${text}
|
||||||
|
`;
|
||||||
|
for (let i = start; i <= end; i++) {
|
||||||
|
if (isCJK(normalizedText[i]) || !isWordBound(normalizedText[i]) && (isWordBound(normalizedText[i + 1]) || isCJK(normalizedText[i + 1]))) {
|
||||||
|
words++;
|
||||||
|
}
|
||||||
|
if (isCJK(normalizedText[i])) {
|
||||||
|
while (i <= end && (isPunctuation(normalizedText[i + 1]) || isWordBound(normalizedText[i + 1]))) {
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const minutes = words / wordsPerMinute;
|
||||||
|
const time = Math.round(minutes * 60 * 1e3);
|
||||||
|
const displayed = Math.ceil(minutes.toFixed(2));
|
||||||
|
return {
|
||||||
|
text: displayed + " min read",
|
||||||
|
minutes,
|
||||||
|
time,
|
||||||
|
words
|
||||||
|
};
|
||||||
|
}
|
||||||
|
module2.exports = readingTime2;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// src/main.ts
|
||||||
|
__export(exports, {
|
||||||
|
default: () => ReadingTime
|
||||||
|
});
|
||||||
|
var import_obsidian2 = __toModule(require("obsidian"));
|
||||||
|
|
||||||
|
// src/settings.ts
|
||||||
|
var import_obsidian = __toModule(require("obsidian"));
|
||||||
|
var RT_DEFAULT_SETTINGS = {
|
||||||
|
readingSpeed: 200,
|
||||||
|
format: "default",
|
||||||
|
appendText: "read"
|
||||||
|
};
|
||||||
|
var ReadingTimeSettingsTab = class extends import_obsidian.PluginSettingTab {
|
||||||
|
constructor(app, plugin) {
|
||||||
|
super(app, plugin);
|
||||||
|
this.plugin = plugin;
|
||||||
|
}
|
||||||
|
display() {
|
||||||
|
const { containerEl } = this;
|
||||||
|
containerEl.empty();
|
||||||
|
new import_obsidian.Setting(containerEl).setName("Reading speed").setDesc("Words per minute used for reading speed (default: 200).").addText((text) => {
|
||||||
|
text.setPlaceholder("Example: 200").setValue(this.plugin.settings.readingSpeed.toString()).onChange((value) => __async(this, null, function* () {
|
||||||
|
this.plugin.settings.readingSpeed = parseInt(value.trim());
|
||||||
|
yield this.plugin.saveSettings().then(this.plugin.calculateReadingTime);
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
new import_obsidian.Setting(this.containerEl).setName("Format").setDesc("Choose the output format").addDropdown((dropdown) => dropdown.addOption("default", "Default (10 min)").addOption("compact", "Compact (10m)").addOption("simple", "Simple (10m 4s)").addOption("verbose", "Verbose (10 minutes 4 seconds)").addOption("digital", "Colon Notation (10:04)").setValue(this.plugin.settings.format).onChange((value) => __async(this, null, function* () {
|
||||||
|
this.plugin.settings.format = value;
|
||||||
|
yield this.plugin.saveSettings().then(this.plugin.calculateReadingTime);
|
||||||
|
})));
|
||||||
|
new import_obsidian.Setting(this.containerEl).setName("Append Text").setDesc("Append 'read' to formatted string.").addText((text) => text.setValue(this.plugin.settings.appendText).onChange((value) => __async(this, null, function* () {
|
||||||
|
this.plugin.settings.appendText = value.trim();
|
||||||
|
yield this.plugin.saveSettings().then(this.plugin.calculateReadingTime);
|
||||||
|
})));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// src/helpers.ts
|
||||||
|
var import_pretty_ms = __toModule(require_pretty_ms());
|
||||||
|
var ReadTime = require_reading_time();
|
||||||
|
function readingTimeText(text, plugin) {
|
||||||
|
const result = ReadTime(text, {
|
||||||
|
wordsPerMinute: plugin.settings.readingSpeed
|
||||||
|
});
|
||||||
|
let options = {
|
||||||
|
secondsDecimalDigits: 0
|
||||||
|
};
|
||||||
|
switch (plugin.settings.format) {
|
||||||
|
case "simple":
|
||||||
|
break;
|
||||||
|
case "compact":
|
||||||
|
if (result.time > 36e5) {
|
||||||
|
options.unitCount = 2;
|
||||||
|
} else {
|
||||||
|
options.compact = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "verbose":
|
||||||
|
options.verbose = true;
|
||||||
|
break;
|
||||||
|
case "digital":
|
||||||
|
options.colonNotation = true;
|
||||||
|
break;
|
||||||
|
case "default":
|
||||||
|
return plugin.settings.appendText ? result.text : result.text.replace(" read", "");
|
||||||
|
}
|
||||||
|
let output = (0, import_pretty_ms.default)(result.time, options);
|
||||||
|
return plugin.settings.appendText ? `${output} ${plugin.settings.appendText}` : output;
|
||||||
|
}
|
||||||
|
|
||||||
|
// src/main.ts
|
||||||
|
var ReadingTime = class extends import_obsidian2.Plugin {
|
||||||
|
constructor() {
|
||||||
|
super(...arguments);
|
||||||
|
this.calculateReadingTime = () => {
|
||||||
|
const mdView = this.app.workspace.getActiveViewOfType(import_obsidian2.MarkdownView);
|
||||||
|
if (mdView && mdView.getViewData()) {
|
||||||
|
const result = readingTimeText(mdView.getViewData(), this);
|
||||||
|
this.statusBar.setText(`${result}`);
|
||||||
|
} else {
|
||||||
|
this.statusBar.setText("0 min read");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
onload() {
|
||||||
|
return __async(this, null, function* () {
|
||||||
|
yield this.loadSettings();
|
||||||
|
this.statusBar = this.addStatusBarItem();
|
||||||
|
this.statusBar.setText("");
|
||||||
|
this.addSettingTab(new ReadingTimeSettingsTab(this.app, this));
|
||||||
|
this.addCommand({
|
||||||
|
id: "reading-time-editor-command",
|
||||||
|
name: "Selected Text",
|
||||||
|
editorCallback: (editor, view) => {
|
||||||
|
new ReadingTimeModal(this.app, editor, this).open();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.registerEvent(this.app.workspace.on("file-open", this.calculateReadingTime));
|
||||||
|
this.registerEvent(this.app.workspace.on("editor-change", (0, import_obsidian2.debounce)(this.calculateReadingTime, 1e3)));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
loadSettings() {
|
||||||
|
return __async(this, null, function* () {
|
||||||
|
this.settings = Object.assign({}, RT_DEFAULT_SETTINGS, yield this.loadData());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
saveSettings() {
|
||||||
|
return __async(this, null, function* () {
|
||||||
|
yield this.saveData(this.settings);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var ReadingTimeModal = class extends import_obsidian2.Modal {
|
||||||
|
constructor(app, editor, plugin) {
|
||||||
|
super(app);
|
||||||
|
this.editor = editor;
|
||||||
|
this.plugin = plugin;
|
||||||
|
}
|
||||||
|
onOpen() {
|
||||||
|
const { contentEl, titleEl } = this;
|
||||||
|
titleEl.setText("Reading Time of Selected Text");
|
||||||
|
const stats = readingTime(this.editor.getSelection(), this.plugin);
|
||||||
|
contentEl.setText(`${stats} (at ${this.plugin.settings.readingSpeed} wpm)`);
|
||||||
|
}
|
||||||
|
onClose() {
|
||||||
|
const { contentEl } = this;
|
||||||
|
contentEl.empty();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/*!
|
||||||
|
* reading-time
|
||||||
|
* Copyright (c) Nicolas Gryman <ngryman@gmail.com>
|
||||||
|
* MIT Licensed
|
||||||
|
*/
|
10
.obsidian/plugins/obsidian-reading-time/manifest.json
vendored
Normal file
10
.obsidian/plugins/obsidian-reading-time/manifest.json
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"id": "obsidian-reading-time",
|
||||||
|
"name": "Reading Time",
|
||||||
|
"description": "Add the current note's reading time to Obsidian's status bar.",
|
||||||
|
"version": "1.1.1",
|
||||||
|
"minAppVersion": "0.12.17",
|
||||||
|
"isDesktopOnly": false,
|
||||||
|
"author": "avr",
|
||||||
|
"authorUrl": "https://github.com/avr"
|
||||||
|
}
|
6
.obsidian/plugins/table-editor-obsidian/data.json
vendored
Normal file
6
.obsidian/plugins/table-editor-obsidian/data.json
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"formatType": "normal",
|
||||||
|
"showRibbonIcon": true,
|
||||||
|
"bindEnter": true,
|
||||||
|
"bindTab": true
|
||||||
|
}
|
24029
.obsidian/plugins/table-editor-obsidian/main.js
vendored
Normal file
24029
.obsidian/plugins/table-editor-obsidian/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
.obsidian/plugins/table-editor-obsidian/manifest.json
vendored
Normal file
11
.obsidian/plugins/table-editor-obsidian/manifest.json
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"id": "table-editor-obsidian",
|
||||||
|
"name": "Advanced Tables",
|
||||||
|
"author": "Tony Grosinger",
|
||||||
|
"authorUrl": "https://grosinger.net",
|
||||||
|
"description": "Improved table navigation, formatting, manipulation, and formulas",
|
||||||
|
"isDesktopOnly": false,
|
||||||
|
"minAppVersion": "0.13.8",
|
||||||
|
"version": "0.17.3",
|
||||||
|
"js": "main.js"
|
||||||
|
}
|
28
.obsidian/plugins/table-editor-obsidian/styles.css
vendored
Normal file
28
.obsidian/plugins/table-editor-obsidian/styles.css
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
.HyperMD-table-row span.cm-inline-code {
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-icon {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
fill: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-icon:hover {
|
||||||
|
fill: var(--text-normal);
|
||||||
|
}
|
||||||
|
|
||||||
|
.advanced-tables-csv-export textarea {
|
||||||
|
height: 200px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.advanced-tables-donation {
|
||||||
|
width: 70%;
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.advanced-tables-donate-button {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
1166
.obsidian/themes/Deep Work.css
vendored
Normal file
1166
.obsidian/themes/Deep Work.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2790
.obsidian/themes/Ono Sendai.css
vendored
Normal file
2790
.obsidian/themes/Ono Sendai.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
16319
.obsidian/themes/Willemstad.css
vendored
Normal file
16319
.obsidian/themes/Willemstad.css
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user