From 5fd19895fd76d3dd21cf06d5f9b2ca11202d3d53 Mon Sep 17 00:00:00 2001 From: Ategon Date: Sat, 7 Sep 2024 03:56:20 -0400 Subject: [PATCH] vault backup: 2024-09-07 03:56:20 --- Edikoyo/.obsidian/community-plugins.json | 5 +- Edikoyo/.obsidian/plugins/iconic/data.json | 26 + .../.obsidian/plugins/pinned-notes/data.json | 10 + .../.obsidian/plugins/pinned-notes/main.js | 265 +++++++++ .../plugins/pinned-notes/manifest.json | 11 + .../.obsidian/plugins/privacy-glasses/main.js | 507 ++++++++++++++++++ .../plugins/privacy-glasses/manifest.json | 10 + .../plugins/privacy-glasses/styles.css | 44 ++ .../plugins/ribbon-divider/data.json | 7 + .../.obsidian/plugins/ribbon-divider/main.js | 175 ++++++ .../plugins/ribbon-divider/manifest.json | 11 + .../plugins/ribbon-divider/styles.css | 17 + Edikoyo/.obsidian/workspace.json | 19 +- 13 files changed, 1100 insertions(+), 7 deletions(-) create mode 100644 Edikoyo/.obsidian/plugins/iconic/data.json create mode 100644 Edikoyo/.obsidian/plugins/pinned-notes/data.json create mode 100644 Edikoyo/.obsidian/plugins/pinned-notes/main.js create mode 100644 Edikoyo/.obsidian/plugins/pinned-notes/manifest.json create mode 100644 Edikoyo/.obsidian/plugins/privacy-glasses/main.js create mode 100644 Edikoyo/.obsidian/plugins/privacy-glasses/manifest.json create mode 100644 Edikoyo/.obsidian/plugins/privacy-glasses/styles.css create mode 100644 Edikoyo/.obsidian/plugins/ribbon-divider/data.json create mode 100644 Edikoyo/.obsidian/plugins/ribbon-divider/main.js create mode 100644 Edikoyo/.obsidian/plugins/ribbon-divider/manifest.json create mode 100644 Edikoyo/.obsidian/plugins/ribbon-divider/styles.css diff --git a/Edikoyo/.obsidian/community-plugins.json b/Edikoyo/.obsidian/community-plugins.json index 77bc58b..b17a90b 100644 --- a/Edikoyo/.obsidian/community-plugins.json +++ b/Edikoyo/.obsidian/community-plugins.json @@ -4,5 +4,8 @@ "obsidian-linter", "dataview", "dataview-serializer", - "iconic" + "iconic", + "ribbon-divider", + "pinned-notes", + "privacy-glasses" ] \ No newline at end of file diff --git a/Edikoyo/.obsidian/plugins/iconic/data.json b/Edikoyo/.obsidian/plugins/iconic/data.json new file mode 100644 index 0000000..08cc3c9 --- /dev/null +++ b/Edikoyo/.obsidian/plugins/iconic/data.json @@ -0,0 +1,26 @@ +{ + "biggerIcons": "mobile", + "clickableIcons": "desktop", + "showAllFileIcons": false, + "showAllFolderIcons": false, + "minimalFolderIcons": false, + "showItemName": "desktop", + "biggerSearchResults": "mobile", + "maxSearchResults": 50, + "colorPicker1": "list", + "colorPicker2": "rgb", + "uncolorHover": false, + "uncolorDrag": false, + "uncolorSelect": false, + "rememberDeletedItems": false, + "appIcons": {}, + "tabIcons": {}, + "fileIcons": {}, + "bookmarkIcons": {}, + "propertyIcons": {}, + "ribbonIcons": { + "pinned-notes:Countries": { + "icon": "lucide-trees" + } + } +} \ No newline at end of file diff --git a/Edikoyo/.obsidian/plugins/pinned-notes/data.json b/Edikoyo/.obsidian/plugins/pinned-notes/data.json new file mode 100644 index 0000000..b717412 --- /dev/null +++ b/Edikoyo/.obsidian/plugins/pinned-notes/data.json @@ -0,0 +1,10 @@ +{ + "pinnedNotes": [ + { + "id": "710a3527-2ed2-4ad6-a7c9-bcad95cfb914", + "icon": "", + "path": "Countries/_index", + "title": "Countries" + } + ] +} \ No newline at end of file diff --git a/Edikoyo/.obsidian/plugins/pinned-notes/main.js b/Edikoyo/.obsidian/plugins/pinned-notes/main.js new file mode 100644 index 0000000..1d9727d --- /dev/null +++ b/Edikoyo/.obsidian/plugins/pinned-notes/main.js @@ -0,0 +1,265 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// main.ts +var main_exports = {}; +__export(main_exports, { + FileSuggest: () => FileSuggest, + default: () => PinnedNotesPlugin, + trimFile: () => trimFile +}); +module.exports = __toCommonJS(main_exports); +var import_obsidian = require("obsidian"); + +// node_modules/uuid/dist/esm-browser/rng.js +var getRandomValues; +var rnds8 = new Uint8Array(16); +function rng() { + if (!getRandomValues) { + getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto); + if (!getRandomValues) { + throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported"); + } + } + return getRandomValues(rnds8); +} + +// node_modules/uuid/dist/esm-browser/stringify.js +var byteToHex = []; +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 256).toString(16).slice(1)); +} +function unsafeStringify(arr, offset = 0) { + return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; +} + +// node_modules/uuid/dist/esm-browser/native.js +var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto); +var native_default = { + randomUUID +}; + +// node_modules/uuid/dist/esm-browser/v4.js +function v4(options, buf, offset) { + if (native_default.randomUUID && !buf && !options) { + return native_default.randomUUID(); + } + options = options || {}; + const rnds = options.random || (options.rng || rng)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + return buf; + } + return unsafeStringify(rnds); +} +var v4_default = v4; + +// main.ts +var PinnedNote = class { + constructor(title, path, icon) { + this.id = v4_default(); + this.icon = icon; + this.path = path; + this.title = title; + } +}; +var DEFAULT_SETTINGS = { + pinnedNotes: [] +}; +var PinnedNotesPlugin = class extends import_obsidian.Plugin { + async onload() { + await this.loadSettings(); + this.addSettingTab(new SettingTab(this.app, this)); + } + async addPinnedNote(note) { + this.settings.pinnedNotes.push(note); + await this.saveSettings(); + await this.loadSettings(); + } + async removePinnedNote(noteId) { + const noteIndex = this.settings.pinnedNotes.findIndex((note) => note.id === noteId); + delete this.settings.pinnedNotes[noteIndex]; + this.settings.pinnedNotes.splice(noteIndex, 1); + await this.saveSettings(); + await this.loadSettings(); + } + async loadSettings() { + var _a; + this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); + (_a = this.ribbonIcons) == null ? void 0 : _a.forEach((ribbonIcon, index) => { + ribbonIcon.remove(); + delete this.ribbonIcons[index]; + }); + this.ribbonIcons = this.settings.pinnedNotes.map( + (note) => this.addRibbonIcon( + note.icon === "" ? "file" : note.icon, + note.title, + async (e) => { + await this.app.workspace.openLinkText(note.path, ""); + } + ) + ); + } + async saveSettings() { + await this.saveData(this.settings); + } +}; +var SettingTab = class extends import_obsidian.PluginSettingTab { + constructor(app, plugin) { + super(app, plugin); + this.plugin = plugin; + } + display() { + const { containerEl } = this; + containerEl.empty(); + let isCanBeAddedNewNote = true; + let title = ""; + let path = ""; + let icon = ""; + let changedTitle; + let changedPath; + let changedIcon; + const addNoteButton = new import_obsidian.Setting(containerEl).setName("Add pinned note").setDesc(`Provide: 1) file's name that will be displayed on hover 2) path to this file, e.g Folder1/File1 3) Icon name from lucide.dev; if icon won't be provided, default icon "file" will be placed instead. RESTART OBSIDIAN AFTER CHANGES`); + isCanBeAddedNewNote && addNoteButton.addButton((button) => { + button.setIcon("plus").onClick( + () => { + isCanBeAddedNewNote = false; + this.display(); + new import_obsidian.Setting(containerEl).setName("File").addText( + (text) => text.setPlaceholder("Title").onChange((value) => title = value) + ).addText( + (text) => { + new FileSuggest(this.app, text.inputEl); + text.setPlaceholder("Path").onChange((value) => path = value); + } + ).addText( + (text) => text.setPlaceholder("Icon(optional)").onChange((value) => icon = value) + ).addButton((button2) => button2.setIcon("save").onClick( + async () => { + if (title.length !== 0 && path.length !== 0) { + await this.plugin.addPinnedNote(new PinnedNote(title, path, icon)); + isCanBeAddedNewNote = true; + this.display(); + } else { + new import_obsidian.Notice("Provide title and path"); + } + } + )); + } + ); + }); + this.plugin.settings.pinnedNotes.forEach((note, index) => { + new import_obsidian.Setting(containerEl).setName("File " + (index + 1)).addText( + (text) => text.setPlaceholder("Title").setValue(note.title).onChange(async (value) => { + changedTitle = value; + }) + ).addText( + (text) => { + new FileSuggest(this.app, text.inputEl); + text.setPlaceholder("Path").setValue(note.path).onChange(async (value) => { + changedPath = value; + }); + } + ).addText( + (text) => text.setPlaceholder("Icon(optional)").setValue(note.icon).onChange(async (value) => { + changedIcon = value; + }) + ).addButton( + (button) => button.setIcon("save").onClick( + async () => { + if ((changedTitle === void 0 || changedTitle === note.title) && (changedPath === void 0 || changedPath === note.path) && (changedIcon === void 0 || changedIcon === note.icon)) { + new import_obsidian.Notice("Provide any data"); + return; + } + if (changedTitle !== void 0) { + if (changedTitle.length !== 0) { + note.title = changedTitle; + changedTitle = void 0; + } else + new import_obsidian.Notice("Provide title"); + } + if (changedPath !== void 0) { + if (changedPath.length !== 0) { + note.path = changedPath; + changedPath = void 0; + } else + new import_obsidian.Notice("Provide path"); + } + if (changedIcon !== void 0) { + note.icon = changedIcon; + changedIcon = void 0; + } + await this.plugin.saveSettings(); + await this.plugin.loadSettings(); + this.display(); + } + ) + ).addButton((button) => button.setIcon("trash-2").setWarning().onClick( + async () => { + await this.plugin.removePinnedNote(note.id); + this.display(); + } + )); + }); + } +}; +var FileSuggest = class extends import_obsidian.AbstractInputSuggest { + getSuggestions(inputStr) { + const abstractFiles = this.app.vault.getAllLoadedFiles(); + const files = []; + const inputLower = inputStr.toLowerCase(); + abstractFiles.forEach((file) => { + if (file instanceof import_obsidian.TFile && ["md", "canvas"].contains(file.extension) && file.path.toLowerCase().contains(inputLower)) { + files.push(file); + } + }); + return files; + } + renderSuggestion(file, el) { + if (file.extension == "md") { + el.setText(trimFile(file)); + } else { + el.setText(file.path.slice(0, -7)); + el.insertAdjacentHTML( + "beforeend", + `` + ); + } + } + selectSuggestion(file) { + this.textInputEl.value = trimFile(file); + this.textInputEl.trigger("input"); + this.close(); + } +}; +function trimFile(file) { + if (!file) + return ""; + return file.extension == "md" ? file.path.slice(0, -3) : file.path; +} +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsibWFpbi50cyIsICJub2RlX21vZHVsZXMvdXVpZC9kaXN0L2VzbS1icm93c2VyL3JuZy5qcyIsICJub2RlX21vZHVsZXMvdXVpZC9kaXN0L2VzbS1icm93c2VyL3N0cmluZ2lmeS5qcyIsICJub2RlX21vZHVsZXMvdXVpZC9kaXN0L2VzbS1icm93c2VyL25hdGl2ZS5qcyIsICJub2RlX21vZHVsZXMvdXVpZC9kaXN0L2VzbS1icm93c2VyL3Y0LmpzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJpbXBvcnQge1xyXG5cdEFic3RyYWN0SW5wdXRTdWdnZXN0LFxyXG5cdEFwcCxcclxuXHRJY29uTmFtZSxcclxuXHROb3RpY2UsXHJcblx0UGx1Z2luLFxyXG5cdFBsdWdpblNldHRpbmdUYWIsXHJcblx0U2V0dGluZyxcclxuXHRU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QSxFQUNSO0FBQUEsRUFFQSxpQkFBaUIsTUFBYSxJQUFpQjtBQUM5QyxRQUFJLEtBQUssYUFBYSxNQUFNO0FBQzNCLFNBQUcsUUFBUSxTQUFTLElBQUksQ0FBQztBQUFBLElBQzFCLE9BQ0s7QUFFSixTQUFHLFFBQVEsS0FBSyxLQUFLLE1BQU0sR0FBRyxFQUFFLENBQUM7QUFDakMsU0FBRztBQUFBLFFBQ0Y7QUFBQSxRQUNBO0FBQUEsTUFDRDtBQUFBLElBQ0Q7QUFBQSxFQUNEO0FBQUEsRUFFQSxpQkFBaUIsTUFBYTtBQUM3QixTQUFLLFlBQVksUUFBUSxTQUFTLElBQUk7QUFDdEMsU0FBSyxZQUFZLFFBQVEsT0FBTztBQUNoQyxTQUFLLE1BQU07QUFBQSxFQUNaO0FBQ0Q7QUFFTyxTQUFTLFNBQVMsTUFBcUI7QUFDN0MsTUFBSSxDQUFDO0FBQU0sV0FBTztBQUNsQixTQUFPLEtBQUssYUFBYSxPQUFPLEtBQUssS0FBSyxNQUFNLEdBQUcsRUFBRSxJQUFHLEtBQUs7QUFDOUQ7IiwKICAibmFtZXMiOiBbImJ1dHRvbiJdCn0K diff --git a/Edikoyo/.obsidian/plugins/pinned-notes/manifest.json b/Edikoyo/.obsidian/plugins/pinned-notes/manifest.json new file mode 100644 index 0000000..692321b --- /dev/null +++ b/Edikoyo/.obsidian/plugins/pinned-notes/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "pinned-notes", + "name": "Pinned Notes", + "version": "2.0.3", + "minAppVersion": "0.15.0", + "description": "Pin frequently-used notes on Ribbon actions", + "author": "vasilcoin002", + "authorUrl": "https://github.com/vasilcoin002", + "fundingUrl": "https://buymeacoffee.com/vasilcoin002", + "isDesktopOnly": true +} diff --git a/Edikoyo/.obsidian/plugins/privacy-glasses/main.js b/Edikoyo/.obsidian/plugins/privacy-glasses/main.js new file mode 100644 index 0000000..9cf730c --- /dev/null +++ b/Edikoyo/.obsidian/plugins/privacy-glasses/main.js @@ -0,0 +1,507 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ROLLUP +if you want to view the source visit the plugins github repository +*/ + +'use strict'; + +var obsidian = require('obsidian'); + +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}; + +/* + Privacy Glasses plugin for Obsidian + Copyright 2021 Jill Alberts + Licensed under the MIT License (http://opensource.org/licenses/MIT) +*/ +function isMarkdownFileInfoView(x) { + const anyX = x; + return !!Object.getOwnPropertyDescriptor(anyX, "file"); +} +function isHooked(view) { + const anyView = view; + const ownProps = Object.getOwnPropertyNames(anyView); + return (ownProps.contains("setState") && typeof anyView.setState === "function"); +} +function hookViewStateChanged(view, onBeforeStateChange, onAfterStateChange) { + const anyView = view; + const original = anyView.__proto__.setState; + function wrapper() { + onBeforeStateChange(view); + const r = original.apply(this, arguments); + if (typeof r.then === "function") { + r.then(() => { + onAfterStateChange(view); + }); + } + else { + onAfterStateChange(view); + } + return r; + } + anyView.setState = wrapper.bind(view); + return anyView; +} +/** + * Constants + */ +var Level; +(function (Level) { + Level["HideAll"] = "hide-all"; + Level["HidePrivate"] = "hide-private"; + Level["RevealAll"] = "reveal-all"; + Level["RevealHeadlines"] = "reveal-headlines"; +})(Level || (Level = {})); +var CssClass; +(function (CssClass) { + CssClass["BlurAll"] = "privacy-glasses-blur-all"; + CssClass["RevealOnHover"] = "privacy-glasses-reveal-on-hover"; + CssClass["RevealAll"] = "privacy-glasses-reveal-all"; + CssClass["RevealUnderCaret"] = "privacy-glasses-reveal-under-caret"; + CssClass["RevealHeadlines"] = "privacy-glasses-reveal-headlines"; + CssClass["Reveal"] = "privacy-glasses-reveal"; + CssClass["IsMdView"] = "is-md-view"; + CssClass["IsNonMdView"] = "is-non-md-view"; + CssClass["IsMdViewHeadlinesOnly"] = "is-md-view-headlines-only"; + CssClass["PrivacyGlassesReveal"] = "privacy-glasses-reveal"; +})(CssClass || (CssClass = {})); +/** + * Main + */ +class PrivacyGlassesPlugin extends obsidian.Plugin { + constructor() { + super(...arguments); + this.revealed = []; + } + onload() { + return __awaiter(this, void 0, void 0, function* () { + this.statusBar = this.addStatusBarItem(); + yield this.loadSettings(); + this.addSettingTab(new privacyGlassesSettingTab(this.app, this)); + obsidian.addIcon("eye", eyeIcon); + obsidian.addIcon("eye-closed", eyeClosedIcon); + obsidian.addIcon("eye-slash", eyeSlashIcon); + obsidian.addIcon("eye-glasses", eyeGlasses); + this.addRibbonIcon("eye-closed", "Hide all", () => { + this.currentLevel = Level.HideAll; + this.updateLeavesAndGlobalReveals(); + }); + this.addRibbonIcon("eye-slash", "Reveal non-private", () => { + this.currentLevel = Level.HidePrivate; + this.updateLeavesAndGlobalReveals(); + }); + this.addRibbonIcon("eye-glasses", "Reveal headlines only", () => { + this.currentLevel = Level.RevealHeadlines; + this.updateLeavesAndGlobalReveals(); + }); + this.addRibbonIcon("eye", "Reveal all", () => { + this.currentLevel = Level.RevealAll; + this.updateLeavesAndGlobalReveals(); + }); + this.addCommand({ + id: "privacy-glasses-hide-all", + name: "Privacy Glasses - hide all", + callback: () => { + this.currentLevel = Level.HideAll; + this.updateLeavesAndGlobalReveals(); + }, + }); + this.addCommand({ + id: "privacy-glasses-hide-private", + name: "Privacy Glasses - hide files in folders marked as private", + callback: () => { + this.currentLevel = Level.HidePrivate; + this.updateLeavesAndGlobalReveals(); + }, + }); + this.addCommand({ + id: "privacy-glasses-reveal-headlines", + name: "Privacy Glasses - reveal headlines only, keeping body content hidden", + callback: () => { + this.currentLevel = Level.RevealHeadlines; + this.updateLeavesAndGlobalReveals(); + }, + }); + this.addCommand({ + id: "privacy-glasses-reveal-all", + name: "Privacy Glasses - do not hide anything", + callback: () => { + this.currentLevel = Level.RevealAll; + this.updateLeavesAndGlobalReveals(); + }, + }); + this.registerInterval(window.setInterval(() => { + this.checkIdleTimeout(); + }, 1000)); + this.app.workspace.onLayoutReady(() => { + this.registerDomActivityEvents(this.app.workspace.rootSplit.win); + this.currentLevel = this.settings.blurOnStartup; + this.updateLeavesAndGlobalReveals(); + this.updatePrivateDirsEl(this.app.workspace.rootSplit.win.document); + this.ensureLeavesHooked(); + }); + this.registerEvent(this.app.workspace.on("window-open", (win) => { + this.registerDomActivityEvents(win.win); + })); + this.registerEvent(this.app.workspace.on("active-leaf-change", (e) => { + this.ensureLeavesHooked(); + this.updateLeafViewStyle(e.view); + })); + this.lastEventTime = performance.now(); + }); + } + // we hook into setState function of the view, because it is synchronously called + // before the content switch. this is to prevent private content from being accidentally briefly revealed + onBeforeViewStateChange(l) { + this.revealed.forEach((r) => { + r.removeClass(CssClass.Reveal); + }); + } + onAfterViewStateChange(l) { + // some panels update using the same event, so it is important to update leaves after they are ready + setTimeout(() => { + this.updateLeavesStyle(); + }, 200); + this.ensureLeavesHooked(); + } + ensureLeavesHooked() { + this.app.workspace.iterateAllLeaves((e) => { + if (isHooked(e.view)) { + return; + } + hookViewStateChanged(e.view, () => { + this.onBeforeViewStateChange(e); + }, () => { + this.onAfterViewStateChange(e); + }); + }); + } + registerDomActivityEvents(win) { + this.registerDomEvent(win, "mousedown", (e) => { + this.lastEventTime = e.timeStamp; + }); + this.registerDomEvent(win, "keydown", (e) => { + this.lastEventTime = e.timeStamp; + }); + this.addBlurLevelEl(win.document); + } + checkIdleTimeout() { + if (this.settings.blurOnIdleTimeoutSeconds < 0) { + return; + } + if (this.currentLevel === Level.HideAll) { + return; + } + if (!this.lastEventTime) { + return; + } + const now = performance.now(); + if ((now - this.lastEventTime) / 1000 >= + this.settings.blurOnIdleTimeoutSeconds) { + this.currentLevel = Level.HideAll; + this.updateLeavesAndGlobalReveals(); + } + } + onunload() { + return __awaiter(this, void 0, void 0, function* () { + this.statusBar.remove(); + yield this.saveSettings(); + }); + } + loadSettings() { + return __awaiter(this, void 0, void 0, function* () { + this.settings = Object.assign(DEFAULT_SETTINGS, yield this.loadData()); + }); + } + saveSettings() { + return __awaiter(this, void 0, void 0, function* () { + yield this.saveData(this.settings); + }); + } + shouldRevealLeaf(view) { + var _a; + if (this.currentLevel === Level.RevealAll) { + return true; + } + if (this.currentLevel === Level.HideAll || + this.currentLevel === Level.RevealHeadlines) { + return false; + } + if (!isMarkdownFileInfoView(view)) { + return true; + } + if (view.editor && + this.settings.privateNoteMarker && + this.settings.privateNoteMarker !== "") { + let tags = []; + // Get tags in the note body, if any + if ('tags' in this.app.metadataCache.getFileCache(view.file)) { + tags.push(...this.app.metadataCache.getFileCache(view.file).tags.filter(x => !!x.tag).map(x => x.tag)); + } + // Get tags in properties, if any + if ('tags' in ((_a = this.app.metadataCache.getFileCache(view.file)) === null || _a === void 0 ? void 0 : _a.frontmatter)) { + tags.push(...this.app.metadataCache.getFileCache(view.file).frontmatter.tags.filter((x) => !!x)); + } + if (tags && tags.length > 0) { + return !tags.includes(this.settings.privateNoteMarker); + } + } + if (view.file && + !this.settings.privateDirs.contains(view.file.parent.path)) { + return true; + } + return false; + } + updateLeafViewStyle(view) { + const isMd = isMarkdownFileInfoView(view) && view.editor; + view.containerEl.removeClass(CssClass.IsMdView, CssClass.IsNonMdView, CssClass.IsMdViewHeadlinesOnly); + if (isMd && this.currentLevel === Level.RevealHeadlines) { + view.containerEl.addClass(CssClass.IsMdViewHeadlinesOnly); + } + else if (isMd) { + view.containerEl.addClass(CssClass.IsMdView); + } + else { + view.containerEl.addClass(CssClass.IsNonMdView); + } + const shouldReveal = this.shouldRevealLeaf(view); + if (shouldReveal) { + view.containerEl.addClass(CssClass.PrivacyGlassesReveal); + this.revealed.push(view.containerEl); + } + else { + view.containerEl.removeClass(CssClass.PrivacyGlassesReveal); + } + } + updateLeavesAndGlobalReveals() { + this.updateLeavesStyle(); + this.updateGlobalRevealStyle(); + } + updateLeavesStyle() { + this.app.workspace.iterateAllLeaves((e) => { + this.updateLeafViewStyle(e.view); + }); + } + updateGlobalRevealStyle() { + this.removeAllClasses(); + this.setClassToDocumentBody(this.currentLevel); + if (this.settings.hoverToReveal) { + document.body.classList.add(CssClass.RevealOnHover); + } + if (this.settings.revealUnderCaret) { + document.body.classList.add(CssClass.RevealUnderCaret); + } + } + removeAllClasses() { + document.body.removeClass(CssClass.BlurAll, CssClass.RevealOnHover, CssClass.RevealAll, CssClass.RevealUnderCaret, CssClass.RevealHeadlines); + } + setClassToDocumentBody(currentLevel) { + switch (currentLevel) { + case Level.HideAll: + document.body.classList.add(CssClass.BlurAll); + break; + case Level.RevealAll: + document.body.classList.add(CssClass.RevealAll); + break; + case Level.RevealHeadlines: + document.body.classList.add(CssClass.RevealHeadlines); + break; + } + } + addBlurLevelEl(doc) { + this.blurLevelStyleEl = doc.createElement("style"); + this.blurLevelStyleEl.id = "privacyGlassesBlurLevel"; + doc.head.appendChild(this.blurLevelStyleEl); + this.updateBlurLevelEl(); + } + updateBlurLevelEl() { + if (!this.blurLevelStyleEl) { + return; + } + this.blurLevelStyleEl.textContent = `body {--blurLevel:${this.settings.blurLevel}em};`; + } + updatePrivateDirsEl(doc) { + if (doc && !this.privateDirsStyleEl) { + this.privateDirsStyleEl = doc.createElement("style"); + this.privateDirsStyleEl.id = "privacyGlassesDirBlur"; + doc.head.appendChild(this.privateDirsStyleEl); + } + const dirs = this.settings.privateDirs.split(","); + this.privateDirsStyleEl.textContent = dirs + .map((d) => ` + + :is(.nav-folder-title, .nav-file-title)[data-path^=${d}] {filter: blur(calc(var(--blurLevel) * 1))} + + :is(.nav-folder-title, .nav-file-title)[data-path^=${d}]:hover {filter: unset} + + .privacy-glasses-reveal-all :is(.nav-folder-title, .nav-file-title)[data-path^=${d}] {filter: unset} + + + `) + .join(""); + } +} +const DEFAULT_SETTINGS = { + blurOnStartup: Level.HidePrivate, + blurLevel: 0.3, + blurOnIdleTimeoutSeconds: -1, + hoverToReveal: true, + revealUnderCaret: false, + privateDirs: "", + privateNoteMarker: "#private", +}; +class privacyGlassesSettingTab extends obsidian.PluginSettingTab { + constructor(app, plugin) { + super(app, plugin); + this.plugin = plugin; + } + display() { + let { containerEl } = this; + containerEl.empty(); + containerEl.createEl("h3", { + text: "Privacy Glasses v" + this.plugin.manifest.version, + }); + containerEl.createEl("a", { + text: "https://github.com/jillalberts/privacy-glasses", + href: "https://github.com/jillalberts/privacy-glasses", + }); + containerEl.createEl("span", { + text: ": documentation, report issues, contact info", + }); + containerEl.createEl("p", { + text: 'To activate/deactivate Privacy Glasses, click the glasses icon on the left-hand ribbon or run "Privacy Glasses" commands in the Command Palette (Ctrl-P). The command can also be bound to a keyboard shortcut if you wish.', + }); + new obsidian.Setting(containerEl) + .setName("Activate Privacy Glasses on startup") + .setDesc("Indicates whether the plugin is automatically activated when starting Obsidian.") + .addDropdown((toggle) => { + toggle.addOptions({ + "hide-all": "Hide all", + "hide-private": "Hide private (default)", + "reveal-all": "Reveal all", + "reveal-headlines": "Reveal headlines only" + }); + toggle.setValue(this.plugin.settings.blurOnStartup); + toggle.onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.blurOnStartup = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Hide all after user inactivity (seconds)") + .setDesc("Inactivity time after which Privacy Glasses will hide all. -1 to disable auto-hiding.") + .addText((textfield) => { + textfield.setPlaceholder("-1"); + textfield.inputEl.type = "number"; + textfield.inputEl.min = "-1"; + textfield.setValue(String(this.plugin.settings.blurOnIdleTimeoutSeconds)); + textfield.onChange((value) => __awaiter(this, void 0, void 0, function* () { + let parsed = parseFloat(value); + if (isNaN(parsed)) { + parsed = -1; + } + this.plugin.settings.blurOnIdleTimeoutSeconds = parsed; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Hover to reveal") + .setDesc("Indicates whether or not to reveal content when hovering the cursor over it.") + .addToggle((toggle) => { + toggle.setValue(this.plugin.settings.hoverToReveal); + toggle.onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.hoverToReveal = value; + this.plugin.updateLeavesAndGlobalReveals(); + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Reveal under caret") + .setDesc("Indicates whether or not to reveal content when caret is on it.") + .addToggle((toggle) => { + toggle.setValue(this.plugin.settings.revealUnderCaret); + toggle.onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.revealUnderCaret = value; + this.plugin.updateGlobalRevealStyle(); + yield this.plugin.saveSettings(); + })); + }); + var sliderEl = new obsidian.Setting(containerEl); + let sliderElDesc = "Higher is blurrier. Default=60, current="; + sliderEl + .setName("Blur level") + .setDesc(sliderElDesc + Math.round(this.plugin.settings.blurLevel * 100)) + // ^ need rounding to not show values like '55.00000000000001' + .addSlider((slider) => slider + .setLimits(0.1, 1.5, 0.05) + .setValue(this.plugin.settings.blurLevel) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.blurLevel = value; + sliderEl.setDesc(sliderElDesc + Math.round(this.plugin.settings.blurLevel * 100)); + this.plugin.updateBlurLevelEl(); + this.plugin.saveSettings(); + }))); + new obsidian.Setting(containerEl) + .setName("Private directories") + .setDesc("Comma-separated list of directories, in which files are considered private") + .addText((text) => text + .setPlaceholder("finance,therapy") + .setValue(this.plugin.settings.privateDirs) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.privateDirs = value; + yield this.plugin.saveSettings(); + this.plugin.updateLeavesAndGlobalReveals(); + this.plugin.updatePrivateDirsEl(); + }))); + new obsidian.Setting(containerEl) + .setName("Private note marker") + .setDesc("Start a note with this text to mark note as private") + .addText((text) => text + .setPlaceholder("#private") + .setValue(this.plugin.settings.privateNoteMarker) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.privateNoteMarker = value; + yield this.plugin.saveSettings(); + this.plugin.updateLeavesStyle(); + }))); + } +} +// https://icon-sets.iconify.design/ph/eye-slash/ +const eyeSlashIcon = ``; +// https://icon-sets.iconify.design/ph/eye-closed-bold/ +const eyeClosedIcon = ``; +// https://icon-sets.iconify.design/ph/eye/ +const eyeIcon = ``; +// https://icon-sets.iconify.design/ph/eyeglasses/ +const eyeGlasses = ``; + +module.exports = PrivacyGlassesPlugin; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsIm1haW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG5Db3B5cmlnaHQgKGMpIE1pY3Jvc29mdCBDb3Jwb3JhdGlvbi5cclxuXHJcblBlcm1pc3Npb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ICBzd2l0Y2ggKG9wWzBdKSB7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDA6IGNhc2UgMTogdCA9IG9wOyBicmVhaztcclxuICAgICAgICAgICAgICAgIGNhc2UgNDogXy5sYWJlbCsrOyByZXR1cm4geyB2YWx1ZTogb3BbMV0sIGRvbmU6IGZhbHNlIH07XHJcbiAgICAgICAgICAgICAgICBjYXNlIDU6IF8ubGFiZWwrKzsgeSA9IG9wWzFdOyBvcCA9IFswXTsgY29udGludWU7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDc6IG9wID0gXy5vcHMucG9wKCk7IF8udHJ5cy5wb3AoKTsgY29udGludWU7XHJcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxyXG4gICAgICAgICAgICAgICAgICAgIGlmICghKHQgPSBfLnRyeXMsIHQgPSB0Lmxlbmd0aCA+IDAgJiYgdFt0Lmxlbmd0aCAtIDFdKSAmJiAob3BbMF0gPT09IDYgfHwgb3BbMF0gPT09IDIpKSB7IF8gPSAwOyBjb250aW51ZTsgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChvcFswXSA9PT0gMyAmJiAoIXQgfHwgKG9wWzFdID4gdFswXSAmJiBvcFsxXSA8IHRbM10pKSkgeyBfLmxhYmVsID0gb3BbMV07IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSA2ICYmIF8ubGFiZWwgPCB0WzFdKSB7IF8ubGFiZWwgPSB0WzFdOyB0ID0gb3A7IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHQgJiYgXy5sYWJlbCA8IHRbMl0pIHsgXy5sYWJlbCA9IHRbMl07IF8ub3BzLnB1c2gob3ApOyBicmVhazsgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmICh0WzJdKSBfLm9wcy5wb3AoKTtcclxuICAgICAgICAgICAgICAgICAgICBfLnRyeXMucG9wKCk7IGNvbnRpbnVlO1xyXG4gICAgICAgICAgICB9XH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0FBd2lDLENBQUM7QUFFOWpDO0FBQ0EsTUFBTSxhQUFhLEdBQUcsQ0FBQSx5cUJBQUEsQ0FBMnFCLENBQUM7QUFFbHNCO0FBQ0EsTUFBTSxPQUFPLEdBQUcsQ0FBQSwwcEJBQUEsQ0FBNHBCLENBQUM7QUFFN3FCO0FBQ0EsTUFBTSxVQUFVLEdBQUcsQ0FBQSw4YkFBQSxDQUFnYzs7OzsifQ== diff --git a/Edikoyo/.obsidian/plugins/privacy-glasses/manifest.json b/Edikoyo/.obsidian/plugins/privacy-glasses/manifest.json new file mode 100644 index 0000000..3449b2f --- /dev/null +++ b/Edikoyo/.obsidian/plugins/privacy-glasses/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "privacy-glasses", + "name": "Privacy Glasses", + "version": "0.7.4", + "minAppVersion": "1.1", + "description": "Provides a button and command to obfuscate onscreen text for better privacy in public settings.", + "author": "Jill Alberts", + "authorUrl": "https://github.com/jillalberts/privacy-glasses", + "isDesktopOnly": false +} \ No newline at end of file diff --git a/Edikoyo/.obsidian/plugins/privacy-glasses/styles.css b/Edikoyo/.obsidian/plugins/privacy-glasses/styles.css new file mode 100644 index 0000000..48784b8 --- /dev/null +++ b/Edikoyo/.obsidian/plugins/privacy-glasses/styles.css @@ -0,0 +1,44 @@ +.workspace-leaf-content.is-md-view :is(.inline-title, .cm-line, .view-header-title-container, .cm-callout), +.workspace-leaf-content.is-non-md-view, +.workspace-leaf-content.is-md-view-headlines-only :is(.cm-line, .cm-callout), +.privacy-glasses-blur-all .workspace-tab-header-inner-title, +.privacy-glasses-blur-all #quick-explorer, +.privacy-glasses-reveal-headlines .workspace-tab-header-inner-title, +.privacy-glasses-reveal-headlines #quick-explorer { + filter: blur(calc(var(--blurLevel) * 1)); +} + +:is(.media-embed, .image-container) :is(img, video, svg, canvas) { + filter: blur(calc(var(--blurLevel) * 5)); +} + +.privacy-glasses-reveal-under-caret .workspace-leaf-content.is-md-view :is(.inline-title, .cm-line, .view-header-title-container).inline-title:focus-within, +.privacy-glasses-reveal-under-caret .workspace-leaf-content.is-md-view :is(.inline-title, .cm-line, .view-header-title-container).cm-active, +.privacy-glasses-reveal-under-caret .workspace-leaf-content.is-non-md-view.inline-title:focus-within, +.privacy-glasses-reveal-under-caret .workspace-leaf-content.is-non-md-view.cm-active, +.privacy-glasses-reveal-under-caret .privacy-glasses-blur-all .workspace-tab-header-inner-title.inline-title:focus-within, +.privacy-glasses-reveal-under-caret .privacy-glasses-blur-all .workspace-tab-header-inner-title.cm-active, +.privacy-glasses-reveal-under-caret .privacy-glasses-blur-all #quick-explorer.inline-title:focus-within, +.privacy-glasses-reveal-under-caret .privacy-glasses-blur-all #quick-explorer.cm-active, +.privacy-glasses-reveal-under-caret :is(.media-embed, .image-container) :is(img, video, svg, canvas).inline-title:focus-within, +.privacy-glasses-reveal-under-caret :is(.media-embed, .image-container) :is(img, video, svg, canvas).cm-active, +.privacy-glasses-reveal-on-hover .workspace-leaf-content.is-md-view :is(.inline-title, .cm-line, .view-header-title-container, .cm-callout):hover, +.privacy-glasses-reveal-on-hover .workspace-leaf-content.is-non-md-view:hover, +.privacy-glasses-reveal-on-hover .workspace-leaf-content.is-md-view-headlines-only :is(.cm-line, .cm-callout):hover, +.privacy-glasses-reveal-on-hover .privacy-glasses-blur-all .workspace-tab-header-inner-title:hover, +.privacy-glasses-reveal-on-hover .privacy-glasses-reveal-headlines .workspace-tab-header-inner-title:hover, +.privacy-glasses-reveal-on-hover .privacy-glasses-blur-all #quick-explorer:hover, +.privacy-glasses-reveal-on-hover :is(.media-embed, .image-container) :is(img, video, svg, canvas):hover, +.privacy-glasses-reveal.workspace-leaf-content.is-md-view :is(.inline-title, .cm-line, .view-header-title-container), +.privacy-glasses-reveal.workspace-leaf-content.is-non-md-view, +.privacy-glasses-reveal.privacy-glasses-blur-all .workspace-tab-header-inner-title, +.privacy-glasses-reveal.privacy-glasses-blur-all #quick-explorer, +.privacy-glasses-reveal.privacy-glasses-reveal-headlines .workspace-tab-header-inner-title, +.privacy-glasses-reveal.privacy-glasses-reveal-headlines #quick-explorer, +.privacy-glasses-reveal :is(.media-embed, .image-container) :is(img, video, svg, canvas), +.workspace-tab-header .workspace-tab-header-inner-title:hover, +.workspace-leaf-content.is-md-view-headlines-only .HyperMD-header, +.privacy-glasses-reveal :is(.cm-callout), +.privacy-glasses-reveal-all :is(.cm-callout) { + filter: unset !important; +} \ No newline at end of file diff --git a/Edikoyo/.obsidian/plugins/ribbon-divider/data.json b/Edikoyo/.obsidian/plugins/ribbon-divider/data.json new file mode 100644 index 0000000..41b16ea --- /dev/null +++ b/Edikoyo/.obsidian/plugins/ribbon-divider/data.json @@ -0,0 +1,7 @@ +{ + "dividers": { + "698b2a69-a92b-4b1b-bf0f-d93bf98733ef": { + "id": "698b2a69-a92b-4b1b-bf0f-d93bf98733ef" + } + } +} \ No newline at end of file diff --git a/Edikoyo/.obsidian/plugins/ribbon-divider/main.js b/Edikoyo/.obsidian/plugins/ribbon-divider/main.js new file mode 100644 index 0000000..8e2a807 --- /dev/null +++ b/Edikoyo/.obsidian/plugins/ribbon-divider/main.js @@ -0,0 +1,175 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: !0 }); +}, __copyProps = (to, from, except, desc) => { + if (from && typeof from == "object" || typeof from == "function") + for (let key of __getOwnPropNames(from)) + !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod); + +// main.ts +var main_exports = {}; +__export(main_exports, { + default: () => DividerPlugin +}); +module.exports = __toCommonJS(main_exports); +var import_obsidian = require("obsidian"); + +// node_modules/uuid/dist/esm-browser/rng.js +var getRandomValues, rnds8 = new Uint8Array(16); +function rng() { + if (!getRandomValues && (getRandomValues = typeof crypto != "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !getRandomValues)) + throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported"); + return getRandomValues(rnds8); +} + +// node_modules/uuid/dist/esm-browser/stringify.js +var byteToHex = []; +for (let i = 0; i < 256; ++i) + byteToHex.push((i + 256).toString(16).slice(1)); +function unsafeStringify(arr, offset = 0) { + return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; +} + +// node_modules/uuid/dist/esm-browser/native.js +var randomUUID = typeof crypto != "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto), native_default = { + randomUUID +}; + +// node_modules/uuid/dist/esm-browser/v4.js +function v4(options, buf, offset) { + if (native_default.randomUUID && !buf && !options) + return native_default.randomUUID(); + options = options || {}; + let rnds = options.random || (options.rng || rng)(); + if (rnds[6] = rnds[6] & 15 | 64, rnds[8] = rnds[8] & 63 | 128, buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) + buf[offset + i] = rnds[i]; + return buf; + } + return unsafeStringify(rnds); +} +var v4_default = v4; + +// main.ts +var DEFAULT_SETTINGS = { + dividers: {} +}, DividerPlugin = class extends import_obsidian.Plugin { + constructor() { + super(...arguments); + this.dividerElements = {}; + } + async onload() { + await this.loadSettings(), this.versionCheck(), Object.keys(this.settings.dividers).forEach((dividerId) => { + let divider = this.settings.dividers[dividerId]; + this.renderDivider(divider); + }), this.addSettingTab(new DividerSettingTab(this.app, this)); + } + onunload() { + } + /** + * Load data from disk, stored in data.json in plugin folder + */ + async loadSettings() { + let data = await this.loadData() || {}; + this.settings = Object.assign({}, DEFAULT_SETTINGS, data), this.settings.dividers || (this.settings.dividers = {}); + } + /** + * Save data to disk, stored in data.json in plugin folder + */ + async saveSettings() { + await this.saveData(this.settings); + } + /** + * Check the local plugin version against github. If there is a new version, notify the user. + */ + async versionCheck() { + let localVersion = "1.1.1", stableVersion = await (0, import_obsidian.requestUrl)( + "https://raw.githubusercontent.com/andrewmcgivery/obsidian-ribbon-divider/main/package.json" + ).then(async (res) => { + if (res.status === 200) + return (await res.json).version; + }), betaVersion = await (0, import_obsidian.requestUrl)( + "https://raw.githubusercontent.com/andrewmcgivery/obsidian-ribbon-divider/beta/package.json" + ).then(async (res) => { + if (res.status === 200) + return (await res.json).version; + }); + (localVersion == null ? void 0 : localVersion.indexOf("beta")) !== -1 ? localVersion !== betaVersion && new import_obsidian.Notice( + "There is a beta update available for the Ribbon Divider plugin. Please update to to the latest version to get the latest features!", + 0 + ) : localVersion !== stableVersion && new import_obsidian.Notice( + "There is an update available for the Ribbon Divider plugin. Please update to to the latest version to get the latest features!", + 0 + ); + } + /** + * Renders a divider on the ribbon. The HTMLElement is saved to this.dividerElemenets so we can remove it if the + * user deletes it from the settings screen. + * @param divider + */ + async renderDivider(divider) { + if (document.body.hasClass("is-phone")) + return; + let dividerIconEl = this.addRibbonIcon( + "", + `ribbon-divider-${divider.id}`, + (evt) => { + } + ); + dividerIconEl.addClass("ribbon-divider"), dividerIconEl.addClass(`ribbon-divider-${divider.id}`), this.dividerElements[divider.id] = dividerIconEl; + } + /** + * Add a new divider and render it + * @param divider + */ + async addDivider(divider) { + this.renderDivider(divider), this.settings.dividers[divider.id] = divider, await this.saveSettings(); + } + /** + * Remove an existing divider, both from settings, and from the UI by calling remove() on the saved HTMLElement + * @param dividerId + */ + async removeDivider(dividerId) { + delete this.settings.dividers[dividerId], this.saveSettings(), this.dividerElements[dividerId] && (this.dividerElements[dividerId].remove(), delete this.dividerElements[dividerId]); + } +}, DividerSettingTab = class extends import_obsidian.PluginSettingTab { + constructor(app, plugin) { + super(app, plugin); + this.plugin = plugin; + } + display() { + let { containerEl } = this; + containerEl.empty(), containerEl.createEl("p", { + attr: { + style: "display: block; margin-bottom: 5px" + }, + text: 'Use this settings screen to add/update dividers to your ribbon. Clicking "New Divider" below will immediately add the divider.' + }), containerEl.createEl("hr"); + let dividersContainerEl = containerEl.createDiv("dividers-container"); + Object.keys(this.plugin.settings.dividers).forEach((dividerId) => { + let divider = this.plugin.settings.dividers[dividerId]; + new import_obsidian.Setting(dividersContainerEl).setName("Divider").setDesc(`Id: ${divider.id}`).addButton((button) => { + button.setButtonText("Delete").onClick(async () => { + await this.plugin.removeDivider(divider.id), this.display(); + }); + }); + }), containerEl.createEl("button", { text: "New divider", cls: "mod-cta" }).addEventListener("click", () => { + this.plugin.addDivider({ + id: v4_default() + }), this.display(); + }); + } +}; diff --git a/Edikoyo/.obsidian/plugins/ribbon-divider/manifest.json b/Edikoyo/.obsidian/plugins/ribbon-divider/manifest.json new file mode 100644 index 0000000..6e32f5e --- /dev/null +++ b/Edikoyo/.obsidian/plugins/ribbon-divider/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "ribbon-divider", + "name": "Ribbon Divider", + "version": "1.1.1", + "minAppVersion": "0.15.0", + "description": "Allows you to add dividers to the ribbon to space out your icons.", + "author": "Andrew McGivery", + "authorUrl": "https://github.com/andrewmcgivery", + "fundingUrl": "https://www.buymeacoffee.com/andrewmcgivery", + "isDesktopOnly": false +} \ No newline at end of file diff --git a/Edikoyo/.obsidian/plugins/ribbon-divider/styles.css b/Edikoyo/.obsidian/plugins/ribbon-divider/styles.css new file mode 100644 index 0000000..9b86b4a --- /dev/null +++ b/Edikoyo/.obsidian/plugins/ribbon-divider/styles.css @@ -0,0 +1,17 @@ +/* styles.scss */ +.side-dock-actions .side-dock-ribbon-action.ribbon-divider { + height: 1px; + width: 70%; + padding: 4px 0; +} +.side-dock-actions .side-dock-ribbon-action.ribbon-divider:hover { + background-color: transparent; +} +.side-dock-actions .side-dock-ribbon-action.ribbon-divider:before { + content: ""; + display: block; + height: 1px; + width: 100%; + background-color: var(--icon-color); + opacity: .5; +} diff --git a/Edikoyo/.obsidian/workspace.json b/Edikoyo/.obsidian/workspace.json index 692819b..1fe529d 100644 --- a/Edikoyo/.obsidian/workspace.json +++ b/Edikoyo/.obsidian/workspace.json @@ -73,7 +73,7 @@ "state": { "type": "markdown", "state": { - "file": "Landmarks/Untitled.md", + "file": "Countries/_index.md", "mode": "source", "source": false } @@ -146,7 +146,7 @@ "state": { "type": "backlink", "state": { - "file": "Landmarks/Untitled.md", + "file": "Countries/_index.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -163,7 +163,7 @@ "state": { "type": "outgoing-link", "state": { - "file": "Landmarks/Untitled.md", + "file": "Countries/_index.md", "linksCollapsed": false, "unlinkedCollapsed": true } @@ -186,7 +186,7 @@ "state": { "type": "outline", "state": { - "file": "Landmarks/Untitled.md" + "file": "Countries/_index.md" } } }, @@ -212,11 +212,19 @@ "graph:Open graph view": false, "templates:Insert template": false, "command-palette:Open command palette": false, - "obsidian-git:Open Git source control": false + "obsidian-git:Open Git source control": false, + "privacy-glasses:Reveal non-private": true, + "ribbon-divider:ribbon-divider-5b05ebe7-55cd-443b-9de6-33e3cb2c36c3": false, + "privacy-glasses:Reveal all": false, + "privacy-glasses:Hide all": false, + "privacy-glasses:Reveal headlines only": false, + "ribbon-divider:ribbon-divider-698b2a69-a92b-4b1b-bf0f-d93bf98733ef": false, + "pinned-notes:Countries": false } }, "active": "e18161b255f8c3cb", "lastOpenFiles": [ + "Landmarks/Untitled.md", "Countries/Batanoka.md", "Animals/Cat.md", "Animals/Dog.md", @@ -242,7 +250,6 @@ "Countries/Nakadon.md", "Countries/Mortham.md", "Countries/Mantine.md", - "Countries/Llasuki.md", "Images/Slimes/garden-1.png", "Images/Slimes/sunflower-2.png", "Images/Slimes/sunflower-1.png",