vault backup: 2022-09-27 10:25:08

Affected files:
.obsidian/plugins/dataview/main.js
.obsidian/plugins/dataview/manifest.json
.obsidian/plugins/dataview/styles.css
.obsidian/plugins/obsidian-columns/main.js
.obsidian/plugins/obsidian-columns/manifest.json
.obsidian/plugins/obsidian-columns/styles.css
.obsidian/plugins/obsidian-git/manifest.json
.obsidian/plugins/table-editor-obsidian/data.json
.obsidian/plugins/table-editor-obsidian/main.js
.obsidian/plugins/table-editor-obsidian/manifest.json
.obsidian/plugins/table-editor-obsidian/styles.css
00. Inbox/00. TODO.md
This commit is contained in:
2022-09-27 10:25:08 +08:00
parent 12cd61a862
commit 95d44dc09c
12 changed files with 15376 additions and 6125 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
{ {
"id": "dataview", "id": "dataview",
"name": "Dataview", "name": "Dataview",
"version": "0.3.13", "version": "0.5.46",
"minAppVersion": "0.11.10", "minAppVersion": "0.13.11",
"description": "Complex data views for the data-obsessed.", "description": "Complex data views for the data-obsessed.",
"author": "Michael Brenan <blacksmithgu@gmail.com>", "author": "Michael Brenan <blacksmithgu@gmail.com>",
"authorUrl": "https://github.com/blacksmithgu", "authorUrl": "https://github.com/blacksmithgu",

View File

@@ -1,3 +1,12 @@
/** 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. */ /* List View Default Styling; rendered internally as a table. */
.table-view-table { .table-view-table {
width: 100%; width: 100%;
@@ -9,6 +18,10 @@
text-align: left; text-align: left;
} }
.table-view-table > tbody > tr:hover {
background-color: var(--text-selection) !important;
}
.table-view-table > thead > tr > th { .table-view-table > thead > tr > th {
font-weight: 700; font-weight: 700;
font-size: larger; font-size: larger;
@@ -24,12 +37,106 @@
text-align: left; text-align: left;
border: none; border: none;
font-weight: 400; font-weight: 400;
max-width: 100%; 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. */ /** Rendered value styling for any view. */
.dataview-result-list-ul { .dataview-result-list-root-ul {
padding: 0em !important; padding: 0em !important;
margin: 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: ")";
}

View File

@@ -49,9 +49,74 @@ var __async = (__this, __arguments, generator) => {
// main.ts // main.ts
__export(exports, { __export(exports, {
ColumnInsertModal: () => ColumnInsertModal,
default: () => ObsidianColumns default: () => ObsidianColumns
}); });
var import_obsidian2 = __toModule(require("obsidian"));
// obsidian-settings/settings.ts
var import_obsidian = __toModule(require("obsidian")); var import_obsidian = __toModule(require("obsidian"));
var parseBoolean = (value) => {
return value == "yes" || value == "true";
};
var parseObject = (value, typ) => {
if (typ == "string") {
return value;
}
if (typ == "boolean") {
return parseBoolean(value);
}
if (typ == "number") {
return parseFloat(value);
}
};
function createSetting(containerEl, keyval, currentValue, onChange) {
let setting = new import_obsidian.Setting(containerEl).setName(keyval[1].name).setDesc(keyval[1].desc);
if (typeof keyval[1].value == "boolean") {
setting.addToggle((toggle) => toggle.setValue(currentValue).onChange((bool) => {
onChange(bool, keyval[0]);
}));
} else {
setting.addText((text) => text.setPlaceholder(String(keyval[1].value)).setValue(String(currentValue)).onChange((value) => {
onChange(parseObject(value, typeof keyval[1].value), keyval[0]);
}));
}
}
function display(obj, DEFAULT_SETTINGS2, name) {
const { containerEl } = obj;
containerEl.empty();
containerEl.createEl("h2", { text: "Settings for " + name });
let keyvals = Object.entries(DEFAULT_SETTINGS2);
for (let keyval of keyvals) {
createSetting(containerEl, keyval, obj.plugin.settings[keyval[0]].value, (value, key) => {
obj.plugin.settings[key].value = value;
obj.plugin.saveSettings();
});
}
}
function loadSettings(obj, DEFAULT_SETTINGS2) {
obj.settings = DEFAULT_SETTINGS2;
obj.loadData().then((data) => {
if (data) {
let items = Object.entries(data);
items.forEach((item) => {
obj.settings[item[0]].value = item[1];
});
}
});
}
function saveSettings(obj, DEFAULT_SETTINGS2) {
return __async(this, null, function* () {
let saveData = {};
Object.entries(obj.settings).forEach((i) => {
saveData[i[0]] = i[1].value;
});
yield obj.saveData(saveData);
});
}
// main.ts
var NAME = "Obsidian Columns";
var COLUMNNAME = "col"; var COLUMNNAME = "col";
var COLUMNMD = COLUMNNAME + "-md"; var COLUMNMD = COLUMNNAME + "-md";
var TOKEN = "!!!"; var TOKEN = "!!!";
@@ -76,7 +141,7 @@ var parseSettings = (settings) => {
}); });
return o; return o;
}; };
var ObsidianColumns = class extends import_obsidian.Plugin { var ObsidianColumns = class extends import_obsidian2.Plugin {
constructor() { constructor() {
super(...arguments); super(...arguments);
this.generateCssString = (span) => { this.generateCssString = (span) => {
@@ -89,20 +154,6 @@ var ObsidianColumns = class extends import_obsidian.Plugin {
this.applyStyle = (el, styles) => { this.applyStyle = (el, styles) => {
Object.assign(el.style, styles); Object.assign(el.style, styles);
}; };
this.parseBoolean = (value) => {
return value == "yes" || value == "true";
};
this.parseObject = (value, typ) => {
if (typ == "string") {
return value;
}
if (typ == "boolean") {
return this.parseBoolean(value);
}
if (typ == "number") {
return parseFloat(value);
}
};
this.processChild = (c) => { this.processChild = (c) => {
if (c.firstChild != null && "tagName" in c.firstChild && c.firstChild.tagName == "BR") { if (c.firstChild != null && "tagName" in c.firstChild && c.firstChild.tagName == "BR") {
c.removeChild(c.firstChild); c.removeChild(c.firstChild);
@@ -136,9 +187,9 @@ var ObsidianColumns = class extends import_obsidian.Plugin {
} }
const sourcePath = ctx.sourcePath; const sourcePath = ctx.sourcePath;
let child = el.createDiv(); let child = el.createDiv();
let renderChild = new import_obsidian.MarkdownRenderChild(child); let renderChild = new import_obsidian2.MarkdownRenderChild(child);
ctx.addChild(renderChild); ctx.addChild(renderChild);
import_obsidian.MarkdownRenderer.renderMarkdown(source, child, sourcePath, renderChild); import_obsidian2.MarkdownRenderer.renderMarkdown(source, child, sourcePath, renderChild);
if ("flexGrow" in settings) { if ("flexGrow" in settings) {
let flexGrow = parseFloat(settings.flexGrow); let flexGrow = parseFloat(settings.flexGrow);
let CSS = this.generateCssString(flexGrow); let CSS = this.generateCssString(flexGrow);
@@ -149,13 +200,13 @@ var ObsidianColumns = class extends import_obsidian.Plugin {
this.registerMarkdownCodeBlockProcessor(COLUMNNAME, (source, el, ctx) => { this.registerMarkdownCodeBlockProcessor(COLUMNNAME, (source, el, ctx) => {
const sourcePath = ctx.sourcePath; const sourcePath = ctx.sourcePath;
let child = createDiv(); let child = createDiv();
let renderChild = new import_obsidian.MarkdownRenderChild(child); let renderChild = new import_obsidian2.MarkdownRenderChild(child);
ctx.addChild(renderChild); ctx.addChild(renderChild);
import_obsidian.MarkdownRenderer.renderMarkdown(source, child, sourcePath, renderChild); import_obsidian2.MarkdownRenderer.renderMarkdown(source, child, sourcePath, renderChild);
let parent = el.createEl("div", { cls: "columnParent" }); let parent = el.createEl("div", { cls: "columnParent" });
Array.from(child.children).forEach((c) => { Array.from(child.children).forEach((c) => {
let cc = parent.createEl("div", { cls: "columnChild" }); let cc = parent.createEl("div", { cls: "columnChild" });
let renderCc = new import_obsidian.MarkdownRenderChild(cc); let renderCc = new import_obsidian2.MarkdownRenderChild(cc);
ctx.addChild(renderCc); ctx.addChild(renderCc);
this.applyStyle(cc, this.generateCssString(this.settings.defaultSpan.value)); this.applyStyle(cc, this.generateCssString(this.settings.defaultSpan.value));
cc.appendChild(c); cc.appendChild(c);
@@ -167,6 +218,28 @@ var ObsidianColumns = class extends import_obsidian.Plugin {
this.processChild(c); this.processChild(c);
}); });
}); });
this.addCommand({
id: "insert-column-wrapper",
name: "Insert column wrapper",
editorCallback: (editor, view) => {
new ColumnInsertModal(this.app, (result) => {
let num = result.numberOfColumns.value;
let outString = "````col\n";
for (let i = 0; i < num; i++) {
outString += "```col-md\nflexGrow=1\n===\n# Column " + i + "\n```\n";
}
outString += "````\n";
editor.replaceSelection(outString);
}).open();
}
});
this.addCommand({
id: "insert-column",
name: "Insert column",
editorCallback: (editor, view) => {
editor.replaceSelection("```col-md\nflexGrow=1\n===\n# New Column\n```");
}
});
let processList = (element, context) => { let processList = (element, context) => {
for (let child of Array.from(element.children)) { for (let child of Array.from(element.children)) {
if (child == null) { if (child == null) {
@@ -185,7 +258,7 @@ var ObsidianColumns = class extends import_obsidian.Plugin {
} }
child.removeChild(listItem); child.removeChild(listItem);
let colParent = element.createEl("div", { cls: "columnParent" }); let colParent = element.createEl("div", { cls: "columnParent" });
let renderColP = new import_obsidian.MarkdownRenderChild(colParent); let renderColP = new import_obsidian2.MarkdownRenderChild(colParent);
context.addChild(renderColP); context.addChild(renderColP);
let itemList = listItem.querySelector("ul, ol"); let itemList = listItem.querySelector("ul, ol");
if (itemList == null) { if (itemList == null) {
@@ -193,7 +266,7 @@ var ObsidianColumns = class extends import_obsidian.Plugin {
} }
for (let itemListItem of Array.from(itemList.children)) { for (let itemListItem of Array.from(itemList.children)) {
let childDiv = colParent.createEl("div", { cls: "columnChild" }); let childDiv = colParent.createEl("div", { cls: "columnChild" });
let renderColC = new import_obsidian.MarkdownRenderChild(childDiv); let renderColC = new import_obsidian2.MarkdownRenderChild(childDiv);
context.addChild(renderColC); context.addChild(renderColC);
let span = parseFloat(itemListItem.textContent.split("\n")[0].split(" ")[0]); let span = parseFloat(itemListItem.textContent.split("\n")[0].split(" ")[0]);
if (isNaN(span)) { if (isNaN(span)) {
@@ -224,50 +297,49 @@ var ObsidianColumns = class extends import_obsidian.Plugin {
} }
loadSettings() { loadSettings() {
return __async(this, null, function* () { return __async(this, null, function* () {
this.settings = DEFAULT_SETTINGS; loadSettings(this, DEFAULT_SETTINGS);
this.loadData().then((data) => {
if (data) {
let items = Object.entries(data);
items.forEach((item) => {
this.settings[item[0]].value = item[1];
});
}
});
}); });
} }
saveSettings() { saveSettings() {
return __async(this, null, function* () { return __async(this, null, function* () {
let saveData = {}; yield saveSettings(this, DEFAULT_SETTINGS);
Object.entries(this.settings).forEach((i) => {
saveData[i[0]] = i[1].value;
});
yield this.saveData(saveData);
}); });
} }
}; };
var ObsidianColumnsSettings = class extends import_obsidian.PluginSettingTab { var DEFAULT_MODAL_SETTINGS = {
numberOfColumns: { value: 2, name: "Number of Columns", desc: "Number of Columns to be made" }
};
var ColumnInsertModal = class extends import_obsidian2.Modal {
constructor(app, onSubmit) {
super(app);
this.onSubmit = onSubmit;
}
onOpen() {
const { contentEl } = this;
contentEl.createEl("h1", { text: "Create a Column Wrapper" });
let modalSettings = DEFAULT_MODAL_SETTINGS;
let keyvals = Object.entries(DEFAULT_MODAL_SETTINGS);
for (let keyval of keyvals) {
createSetting(contentEl, keyval, "", (value, key) => {
modalSettings[key].value = value;
});
}
new import_obsidian2.Setting(contentEl).addButton((btn) => btn.setButtonText("Submit").setCta().onClick(() => {
this.close();
this.onSubmit(modalSettings);
}));
}
onClose() {
let { contentEl } = this;
contentEl.empty();
}
};
var ObsidianColumnsSettings = class extends import_obsidian2.PluginSettingTab {
constructor(app, plugin) { constructor(app, plugin) {
super(app, plugin); super(app, plugin);
this.plugin = plugin; this.plugin = plugin;
} }
display() { display() {
const { containerEl } = this; display(this, DEFAULT_SETTINGS, NAME);
containerEl.empty();
containerEl.createEl("h2", { text: "Settings for obsidian-columns" });
let keyvals = Object.entries(DEFAULT_SETTINGS);
for (let keyval of keyvals) {
let setting = new import_obsidian.Setting(containerEl).setName(keyval[1].name).setDesc(keyval[1].desc);
if (typeof keyval[1].value == "boolean") {
setting.addToggle((toggle) => toggle.setValue(this.plugin.settings[keyval[0]].value).onChange((bool) => {
this.plugin.settings[keyval[0]].value = bool;
this.plugin.saveSettings();
}));
} else {
setting.addText((text) => text.setPlaceholder(String(keyval[1].value)).setValue(String(this.plugin.settings[keyval[0]].value)).onChange((value) => {
this.plugin.settings[keyval[0]].value = this.plugin.parseObject(value, typeof keyval[1].value);
this.plugin.saveSettings();
}));
}
}
} }
}; };

View File

@@ -6,5 +6,5 @@
"author": "Trevor Nichols", "author": "Trevor Nichols",
"authorUrl": "https://github.com/tnichols217/obsidian-columns", "authorUrl": "https://github.com/tnichols217/obsidian-columns",
"isDesktopOnly": false, "isDesktopOnly": false,
"version": "1.1.2" "version": "1.2.0"
} }

View File

@@ -5,6 +5,14 @@
gap: 20px; gap: 20px;
} }
.columnParent {
white-space: normal;
}
.cm-preview-code-block .admonition-content .columnParent p {
white-space: pre-wrap;
}
.columnChild { .columnChild {
flex-grow: 1; flex-grow: 1;
flex-basis: 0px; flex-basis: 0px;

View File

@@ -1,8 +1,8 @@
{ {
"id": "obsidian-git", "id": "obsidian-git",
"name": "Obsidian Git", "name": "Obsidian Git",
"description": "Backup your vault with git.", "description": "Backup your vault with Git.",
"isDesktopOnly": true, "isDesktopOnly": false,
"js": "main.js", "js": "main.js",
"version": "1.25.3" "version": "2.4.1"
} }

View File

@@ -1,8 +1,6 @@
{ {
"formatType": "normal", "formatType": "normal",
"showRibbonIcon": true, "showRibbonIcon": true,
"useMonospaceFont": true,
"preferredMonospaceFont": "Fira Code",
"bindEnter": true, "bindEnter": true,
"bindTab": true "bindTab": true
} }

File diff suppressed because one or more lines are too long

View File

@@ -5,7 +5,7 @@
"authorUrl": "https://grosinger.net", "authorUrl": "https://grosinger.net",
"description": "Improved table navigation, formatting, manipulation, and formulas", "description": "Improved table navigation, formatting, manipulation, and formulas",
"isDesktopOnly": false, "isDesktopOnly": false,
"minAppVersion": "0.10.2", "minAppVersion": "0.13.8",
"version": "0.9.1", "version": "0.17.3",
"js": "main.js" "js": "main.js"
} }

View File

@@ -1,18 +1,7 @@
.HyperMD-table-row span.cm-inline-code, .HyperMD-table-row span.cm-inline-code {
pre > code:not(.prism) {
font-size: 100%; font-size: 100%;
} }
.widget-background {
background-color: var(--background-secondary);
}
.widget-button {
padding: 3px 4px;
margin: 3px;
background-color: Transparent;
}
.widget-icon { .widget-icon {
width: 20px; width: 20px;
height: 20px; height: 20px;
@@ -23,15 +12,9 @@ pre > code:not(.prism) {
fill: var(--text-normal); fill: var(--text-normal);
} }
.widget-button-close { .advanced-tables-csv-export textarea {
position: absolute; height: 200px;
right: 0; width: 100%;
top: 0;
}
.widget-icon-close {
width: 15px;
height: 15px;
} }
.advanced-tables-donation { .advanced-tables-donation {

View File

@@ -121,6 +121,10 @@
- [x] Write document 🛫 2022-09-20 📅 2022-09-20 ✅ 2022-09-22 - [x] Write document 🛫 2022-09-20 📅 2022-09-20 ✅ 2022-09-22
### SentinelIQ ### SentinelIQ
- [ ] [Support Tiny HDMI-IN audio](https://jira.logitech.com/browse/VC-83800) 🛫 2022-09-27 📅 2022-09-30
- [ ] [Recorder audio file, and can playback for audio file](https://jira.logitech.com/browse/VC-80990) 🛫 2022-09-27 📅 2022-10-07
#### Done
- [x] RegionA rectangle can be at any position 🛫 2022-06-20 ✅ 2022-07-22 - [x] RegionA rectangle can be at any position 🛫 2022-06-20 ✅ 2022-07-22
- [x] Load engineer's config 🛫 2022-06-20 ✅ 2022-07-25 - [x] Load engineer's config 🛫 2022-06-20 ✅ 2022-07-25
- [x] RegionB的crop也要存圖 🛫 2022-07-08 ✅ 2022-07-22 - [x] RegionB的crop也要存圖 🛫 2022-07-08 ✅ 2022-07-22