Skip to content

Commit

Permalink
feat: update plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
quanru committed Dec 31, 2024
1 parent 95ae2f4 commit 14b96bf
Show file tree
Hide file tree
Showing 12 changed files with 7,338 additions and 8,582 deletions.
3 changes: 2 additions & 1 deletion .obsidian/core-plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
"sync": false,
"canvas": true,
"bookmarks": true,
"properties": true
"properties": true,
"webviewer": false
}
64 changes: 24 additions & 40 deletions .obsidian/plugins/better-search-views/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2768,7 +2768,10 @@ var require_plugin_context = __commonJS({
var _obsidian = require("obsidian");
var PluginContext = (0, _solidJs.createContext)();
function PluginContextProvider(props) {
const handleClick = async (path, line) => {
const handleClick = async (event, path, line) => {
if (event.target instanceof HTMLAnchorElement) {
return;
}
const file = props.plugin.app.metadataCache.getFirstLinkpathDest(path, path);
if (!file) {
new _obsidian.Notice(`File ${path} does not exist`);
Expand Down Expand Up @@ -2811,7 +2814,8 @@ var require_plugin_context = __commonJS({
handleClick,
handleMouseover,
handleHeightChange,
plugin: props.plugin
plugin: props.plugin,
app: props.plugin.app
};
},
get children() {
Expand All @@ -2838,29 +2842,13 @@ var require_list_icon = __commonJS({
});
exports.ListIcon = ListIcon;
var _web = require_web();
var _tmpl$ = /* @__PURE__ */ (0, _web.template)(`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="better-search-views-icon lucide lucide-list"><line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18">`);
var _tmpl$ = /* @__PURE__ */ (0, _web.template)(`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="better-search-views-icon lucide lucide-dot"><circle cx="12.1" cy="12.1" r="1">`);
function ListIcon() {
return _tmpl$();
}
}
});

// src/ui/solid/icons/arrow-right-icon.tsx
var require_arrow_right_icon = __commonJS({
"src/ui/solid/icons/arrow-right-icon.tsx"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ArrowRightIcon = ArrowRightIcon;
var _web = require_web();
var _tmpl$ = /* @__PURE__ */ (0, _web.template)(`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="better-search-views-icon lucide lucide-corner-down-right"><polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12">`);
function ArrowRightIcon() {
return _tmpl$();
}
}
});

// src/ui/solid/icons/heading-icon.tsx
var require_heading_icon = __commonJS({
"src/ui/solid/icons/heading-icon.tsx"(exports) {
Expand Down Expand Up @@ -2903,7 +2891,6 @@ var require_title = __commonJS({
var _solidJs = require_solid();
var _pluginContext = require_plugin_context();
var _listIcon = require_list_icon();
var _arrowRightIcon = require_arrow_right_icon();
var _headingIcon = require_heading_icon();
var _patterns = (init_patterns(), __toCommonJS(patterns_exports));
var _tmpl$ = /* @__PURE__ */ (0, _web.template)(`<div class="better-search-views-titles-container">`);
Expand All @@ -2923,32 +2910,25 @@ var require_title = __commonJS({
return props.breadcrumbs;
},
children: (breadcrumb, i) => {
var _a;
const handleTitleClick = async () => await handleClick(props.contextTree.filePath, breadcrumb.position.start.line);
const handleTitleClick = async (event) => await handleClick(event, props.contextTree.filePath, breadcrumb.position.start.line);
const handleTitleMouseover = (event) => handleMouseover(event, props.contextTree.filePath, breadcrumb.position.start.line);
const previousIsHeading = ((_a = props.breadcrumbs[i() - 1]) == null ? void 0 : _a.type) === "heading";
const isFirstListItemInBreadcrumbs = breadcrumb.type === "list" && (i() === 0 || previousIsHeading);
const isFirstHeadingInBreadcrumbs = i() === 0 && breadcrumb.type === "heading";
return (() => {
const _el$2 = _tmpl$2(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
_el$3.$$mouseover = handleTitleMouseover;
_el$3.$$click = handleTitleClick;
(0, _web.insert)(_el$4, (0, _web.createComponent)(_solidJs.Switch, {
get fallback() {
return (0, _web.createComponent)(_arrowRightIcon.ArrowRightIcon, {});
return (0, _web.createComponent)(_listIcon.ListIcon, {});
},
get children() {
return [(0, _web.createComponent)(_solidJs.Match, {
when: isFirstListItemInBreadcrumbs,
get children() {
return (0, _web.createComponent)(_listIcon.ListIcon, {});
}
}), (0, _web.createComponent)(_solidJs.Match, {
when: isFirstHeadingInBreadcrumbs,
return (0, _web.createComponent)(_solidJs.Match, {
get when() {
return breadcrumb.type === "heading";
},
get children() {
return (0, _web.createComponent)(_headingIcon.HeadingIcon, {});
}
})];
});
}
}));
(0, _web.insert)(_el$5, () => removeListToken(breadcrumb.text));
Expand Down Expand Up @@ -2980,7 +2960,8 @@ var require_match_section = __commonJS({
function MatchSection(props) {
const {
handleClick,
handleMouseover
handleMouseover,
app
} = (0, _pluginContext.usePluginContext)();
const matchLifecycleManager = new _obsidian.Component();
(0, _solidJs.onCleanup)(() => {
Expand All @@ -3003,11 +2984,11 @@ var require_match_section = __commonJS({
_el$2.$$mouseover = (event) => {
handleMouseover(event, section.filePath, line);
};
_el$2.$$click = async () => {
await handleClick(section.filePath, line);
_el$2.$$click = async (event) => {
await handleClick(event, section.filePath, line);
};
(0, _web.use)(async (el) => {
await _obsidian.MarkdownRenderer.renderMarkdown(section.text, el, section.filePath, matchLifecycleManager);
await _obsidian.MarkdownRenderer.render(app, section.text, el, section.filePath, matchLifecycleManager);
matchLifecycleManager.load();
}, _el$2);
return _el$2;
Expand Down Expand Up @@ -4588,10 +4569,11 @@ var Patcher = class {
addChild(old) {
return function(child, ...args) {
const thisIsSearchView = this.hasOwnProperty("searchQuery");
if (thisIsSearchView && !patcher.triedPatchingSearchResultItem) {
const hasBacklinks = child == null ? void 0 : child.backlinkDom;
if ((thisIsSearchView || hasBacklinks) && !patcher.triedPatchingSearchResultItem) {
patcher.triedPatchingSearchResultItem = true;
try {
patcher.patchSearchResultDom(child.dom);
patcher.patchSearchResultDom(child.dom || child.backlinkDom);
} catch (error) {
patcher.reportError(
error,
Expand Down Expand Up @@ -4747,3 +4729,5 @@ mark.js/dist/mark.js:
* Released under the MIT license https://git.io/vwTVl
*****************************************************)
*/

/* nosourcemap */
20 changes: 10 additions & 10 deletions .obsidian/plugins/better-search-views/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"id": "better-search-views",
"name": "Better Search Views",
"version": "0.2.2",
"minAppVersion": "0.16.0",
"description": "Outliner-like breadcrumb trees for search, backlinks and embedded queries ",
"author": "ivan-lednev",
"authorUrl": "https://github.com/ivan-lednev",
"fundingUrl": "https://www.buymeacoffee.com/machineelf",
"isDesktopOnly": false
}
"id": "better-search-views",
"name": "Better Search Views",
"version": "0.3.0",
"minAppVersion": "0.16.0",
"description": "Outliner-like breadcrumb trees for search, backlinks and embedded queries ",
"author": "ivan-lednev",
"authorUrl": "https://github.com/ivan-lednev",
"fundingUrl": "https://www.buymeacoffee.com/machineelf",
"isDesktopOnly": false
}
15 changes: 11 additions & 4 deletions .obsidian/plugins/better-search-views/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@
white-space: normal;
}

.better-search-views-file-match.markdown-rendered ul > li,
.better-search-views-file-match.markdown-rendered ol > li {
margin-inline-start: calc(var(--list-indent) * 0.8);
}

.better-search-views-file-match > blockquote {
margin-inline-start: 0;
margin-inline-end: 0;
}

.better-search-views-file-match ul {
position: relative;
padding-inline-start: var(--list-indent);
padding-inline-start: 0;
}

.better-search-views-file-match a {
Expand Down Expand Up @@ -139,8 +144,8 @@ body:not(.is-grabbing)

.better-search-views-tree .better-search-views-breadcrumb-container {
flex-grow: 1;
padding-right: 4px;
padding-left: 4px;
padding-right: 2px;
padding-left: 2px;
}

.better-search-views-tree
Expand All @@ -151,13 +156,15 @@ body:not(.is-grabbing)
}

.better-search-views-breadcrumb-token {
color: var(--text-faint);
display: flex;
align-items: center;
height: calc(1em * var(--line-height-tight));
}

.better-search-views-tree .collapse-icon {
display: flex;
align-items: flex-start;
align-items: center;
align-self: flex-start;

padding-top: 4px;
Expand Down
182 changes: 93 additions & 89 deletions .obsidian/plugins/obsidian-tasks-plugin/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .obsidian/plugins/obsidian-tasks-plugin/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-tasks-plugin",
"name": "Tasks",
"version": "7.12.3",
"version": "7.14.0",
"minAppVersion": "1.1.1",
"description": "Track tasks across your vault. Supports due dates, recurring tasks, done dates, sub-set of checklist items, and filtering.",
"helpUrl": "https://publish.obsidian.md/tasks/",
Expand Down
2 changes: 1 addition & 1 deletion .obsidian/plugins/obsidian-tasks-plugin/styles.css

Large diffs are not rendered by default.

Loading

0 comments on commit 14b96bf

Please sign in to comment.