diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index eaffd30..31047c2 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -4,5 +4,7 @@ "obsidian-markdown-formatting-assistant-plugin", "heading-level-indent", "global-proxy", - "lovely-mindmap" + "lovely-mindmap", + "obsidian-outliner", + "editing-toolbar" ] \ No newline at end of file diff --git a/.obsidian/plugins/editing-toolbar/data.json b/.obsidian/plugins/editing-toolbar/data.json new file mode 100644 index 0000000..0f64fda --- /dev/null +++ b/.obsidian/plugins/editing-toolbar/data.json @@ -0,0 +1,327 @@ +{ + "lastVersion": "3.1.13", + "aestheticStyle": "default", + "positionStyle": "top", + "menuCommands": [ + { + "id": "editing-toolbar:editor-undo", + "name": "Undo editor", + "icon": "undo-glyph" + }, + { + "id": "editing-toolbar:editor-redo", + "name": "Redo editor", + "icon": "redo-glyph" + }, + { + "id": "editing-toolbar:toggle-format-brush", + "name": "Format Brush", + "icon": "paintbrush" + }, + { + "id": "editing-toolbar:format-eraser", + "name": "Clear text formatting", + "icon": "eraser" + }, + { + "id": "editing-toolbar:header2-text", + "name": "Header 2", + "icon": "header-2" + }, + { + "id": "editing-toolbar:header3-text", + "name": "Header 3", + "icon": "header-3" + }, + { + "id": "SubmenuCommands-header", + "name": "submenu", + "icon": "header-n", + "SubmenuCommands": [ + { + "id": "editing-toolbar:header1-text", + "name": "Header 1", + "icon": "header-1" + }, + { + "id": "editing-toolbar:header4-text", + "name": "Header 4", + "icon": "header-4" + }, + { + "id": "editing-toolbar:header5-text", + "name": "Header 5", + "icon": "header-5" + }, + { + "id": "editing-toolbar:header6-text", + "name": "Header 6", + "icon": "header-6" + } + ] + }, + { + "id": "editing-toolbar:toggle-bold", + "name": "Bold", + "icon": "bold-glyph" + }, + { + "id": "editing-toolbar:toggle-italics", + "name": "Italics", + "icon": "italic-glyph" + }, + { + "id": "editing-toolbar:toggle-strikethrough", + "name": "Strikethrough", + "icon": "strikethrough-glyph" + }, + { + "id": "editing-toolbar:underline", + "name": "Underline", + "icon": "underline-glyph" + }, + { + "id": "editing-toolbar:toggle-highlight", + "name": "==Highlight==", + "icon": "highlight-glyph" + }, + { + "id": "SubmenuCommands-lucdf3en5", + "name": "submenu", + "icon": "edit", + "SubmenuCommands": [ + { + "id": "editing-toolbar:editor-copy", + "name": "Copy", + "icon": "lucide-copy" + }, + { + "id": "editing-toolbar:editor-cut", + "name": "Cut", + "icon": "lucide-scissors" + }, + { + "id": "editing-toolbar:editor-paste", + "name": "Paste", + "icon": "lucide-clipboard-type" + }, + { + "id": "editing-toolbar:editor:swap-line-down", + "name": "Swap line down", + "icon": "lucide-corner-right-down" + }, + { + "id": "editing-toolbar:editor:swap-line-up", + "name": "Swap line up", + "icon": "lucide-corner-right-up" + } + ] + }, + { + "id": "editing-toolbar:editor:attach-file", + "name": "Attach file", + "icon": "lucide-paperclip" + }, + { + "id": "editing-toolbar:editor:insert-table", + "name": "Insert Table", + "icon": "lucide-table" + }, + { + "id": "editing-toolbar:editor:cycle-list-checklist", + "name": "Cycle list checklist", + "icon": "check-circle" + }, + { + "id": "SubmenuCommands-luc8efull", + "name": "submenu", + "icon": "message-square", + "SubmenuCommands": [ + { + "id": "editing-toolbar:editor:toggle-blockquote", + "name": "Blockquote", + "icon": "lucide-text-quote" + }, + { + "id": "editing-toolbar:insert-callout", + "name": "Insert Callout ", + "icon": "lucide-quote" + } + ] + }, + { + "id": "SubmenuCommands-mdcmder", + "name": "submenu", + "icon": "", + "SubmenuCommands": [ + { + "id": "editing-toolbar:superscript", + "name": "Superscript", + "icon": "superscript-glyph" + }, + { + "id": "editing-toolbar:subscript", + "name": "Subscript", + "icon": "subscript-glyph" + }, + { + "id": "editing-toolbar:editor:toggle-code", + "name": "Inline code", + "icon": "code-glyph" + }, + { + "id": "editing-toolbar:codeblock", + "name": "Code block", + "icon": "codeblock-glyph" + }, + { + "id": "editing-toolbar:editor:insert-wikilink", + "name": "Insert wikilink [[]]", + "icon": "" + }, + { + "id": "editing-toolbar:editor:insert-embed", + "name": "Insert embed ![[]]", + "icon": "note-glyph" + }, + { + "id": "editing-toolbar:insert-link", + "name": "Insert link []()", + "icon": "link-glyph" + }, + { + "id": "editing-toolbar:hrline", + "name": "Horizontal divider", + "icon": "" + }, + { + "id": "editing-toolbar:toggle-inline-math", + "name": "Inline math", + "icon": "lucide-sigma" + }, + { + "id": "editing-toolbar:editor:insert-mathblock", + "name": "MathBlock", + "icon": "lucide-sigma-square" + } + ] + }, + { + "id": "SubmenuCommands-list", + "name": "submenu-list", + "icon": "bullet-list-glyph", + "SubmenuCommands": [ + { + "id": "editing-toolbar:editor:toggle-checklist-status", + "name": "Checklist", + "icon": "checkbox-glyph" + }, + { + "id": "editing-toolbar:renumber-ordered-list", + "name": "Renumber ordered list", + "icon": "list-restart" + }, + { + "id": "editing-toolbar:toggle-numbered-list", + "name": "Numbered list", + "icon": "" + }, + { + "id": "editing-toolbar:toggle-bullet-list", + "name": "Bullet list", + "icon": "" + }, + { + "id": "editing-toolbar:undent-list", + "name": "Unindent-list", + "icon": "" + }, + { + "id": "editing-toolbar:indent-list", + "name": "Indent list", + "icon": "" + } + ] + }, + { + "id": "SubmenuCommands-aligin", + "name": "submenu-aligin", + "icon": "", + "SubmenuCommands": [ + { + "id": "editing-toolbar:justify", + "name": "
", + "icon": "" + }, + { + "id": "editing-toolbar:left", + "name": "", + "icon": "" + }, + { + "id": "editing-toolbar:center", + "name": "e;){let i=!0,h=!1;if(!c||a>s[c-1].to){let t=on[a-1];t!=l&&(i=!1,h=16==t)}let d=i||1!=l?null:[],u=i?n:n+1,p=a;t:for(;;)if(c&&p==s[c-1].to){if(h)break t;let m=s[--c];if(!i)for(let t=m.from,i=c;;){if(t==e)break t;if(!i||s[i-1].to!=t){if(on[t-1]==l)break t;break}t=s[--i].from}if(d)d.push(m);else{m.to=0;t-=3)if(Ji[t+1]==-i){let e=Ji[t+2],i=2&e?o:4&e?1&e?s:o:0;i&&(on[r]=on[Ji[t]]=i),l=t;break}}else{if(189==Ji.length)break;Ji[l++]=r,Ji[l++]=e,Ji[l++]=a}else if(2==(n=on[r])||1==n){let t=n==o;a=t?0:1;for(let e=l-3;e>=0;e-=3){let i=Ji[e+2];if(2&i)break;if(t)Ji[e+2]|=2;else{if(4&i)break;Ji[e+2]|=4}}}}}(t,o,s,n,l),function(t,e,i,n){for(let o=0,s=n;o<=i.length;o++){let r=o?i[o-1].to:t,l=o ${Wr("AI question template:")} ',suffix:" ',suffix:" ',suffix:" (.*?)<\/p>$/.test(t))this.lastExecutedCommand="editing-toolbar:left",this.lastExecutedCommandName="Left Align",i=!0;else if(/^ (.*?)<\/p>$/.test(t))this.lastExecutedCommand="editing-toolbar:right",this.lastExecutedCommandName="Right Align",i=!0;else if(/^ (.*?)<\/p>$/.test(t))this.lastExecutedCommand="editing-toolbar:justify",this.lastExecutedCommandName="Justify",i=!0;else if(/^(.*?)<\/sup>$/.test(t))this.lastExecutedCommand="editing-toolbar:superscript",this.lastExecutedCommandName="Superscript",i=!0;else if(/^(.*?)<\/sub>$/.test(t))this.lastExecutedCommand="editing-toolbar:subscript",this.lastExecutedCommandName="Subscript",i=!0;else if(/^> \[!(note|tip|warning|danger|info|success|question|quote)\]/i.test(t)){const e=t.match(/^> \[!(note|tip|warning|danger|info|success|question|quote)\]/i);e&&(this.lastExecutedCommand="editor:insert-callout",this.lastExecutedCommandName="Callout-"+e[1].toLowerCase(),i=!0,n=e[1].toLowerCase())}else/^# /.test(t)?(this.lastExecutedCommand="editor:set-heading-1",this.lastExecutedCommandName="Heading 1",i=!0):/^## /.test(t)?(this.lastExecutedCommand="editor:set-heading-2",this.lastExecutedCommandName="Heading 2",i=!0):/^### /.test(t)?(this.lastExecutedCommand="editor:set-heading-3",this.lastExecutedCommandName="Heading 3",i=!0):/^#### /.test(t)?(this.lastExecutedCommand="editor:set-heading-4",this.lastExecutedCommandName="Heading 4",i=!0):/^##### /.test(t)?(this.lastExecutedCommand="editor:set-heading-5",this.lastExecutedCommandName="Heading 5",i=!0):/^###### /.test(t)&&(this.lastExecutedCommand="editor:set-heading-6",this.lastExecutedCommandName="Heading 6",i=!0)}else{const t=e.getCursor(),n=e.getLine(t.line),o=t.ch,s=[],r=/([^<]+)<\/u>/g;let l;for(;null!==(l=r.exec(n));){const t=l.index,e=l.index+l[0].length;o>t&&o=(c.left+c.right)/2,n=i;if(bi.chrome||bi.gecko){Ye(t,l).getBoundingClientRect().left==c.right&&(n=!i)}if(h<=0)return{node:t,offset:l+(n?1:0)};o=l+(n?1:0),s=h}}}return{node:t,offset:o>-1?o:r>0?t.nodeValue.length:0}}function to(t,e,i,n=-1){var o,s;let r,l=t.contentDOM.getBoundingClientRect(),a=l.top+t.viewState.paddingTop,{docHeight:c}=t.viewState,{x:h,y:d}=e,u=d-a;if(u<0)return 0;if(u>c)return t.state.doc.length;for(let e=t.viewState.heightOracle.textHeight/2,o=!1;r=t.elementAtHeight(u),r.type!=Bi.Text;)for(;u=n>0?r.bottom+e:r.top-e,!(u>=0&&u<=c);){if(o)return i?null:0;o=!0,n=-n}d=a+u;let p=r.from;if(p=r?s-i:0,l=s+(l-r),r=s}else if(l=l?s-i:0,r=s+(r-l),l=s}return{from:s,toA:r,toB:l}}(t.state.doc.sliceString(n,r,ro),e.text,l-n,a);c&&(bi.chrome&&13==s&&c.toB==c.from+2&&e.text.slice(c.from,c.toB)==ro+ro&&c.toB--,i={from:n+c.from,to:n+c.toA,insert:U.of(e.text.slice(c.from,c.toB).split(ro))})}else n&&(!t.hasFocus&&t.state.facet(Mn)||n.main.eq(o))&&(n=null);if(!i&&!n)return!1;if(!i&&e.typeOver&&!o.empty&&n&&n.main.empty?i={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,o.to)}:(bi.mac||bi.android)&&i&&i.from==i.to&&i.from==o.head-1&&/^\. ?$/.test(i.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(n&&2==i.insert.length&&(n=pt.single(n.main.anchor-1,n.main.head-1)),i={from:i.from,to:i.to,insert:U.of([i.insert.toString().replace("."," ")])}):i&&i.from>=o.from&&i.to<=o.to&&(i.from!=o.from||i.to!=o.to)&&o.to-o.from-(i.to-i.from)<=4?i={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,i.from).append(i.insert).append(t.state.doc.slice(i.to,o.to))}:bi.chrome&&i&&i.from==i.to&&i.from==o.head&&"\n "==i.insert.toString()&&t.lineWrapping&&(n&&(n=pt.single(n.main.anchor-1,n.main.head-1)),i={from:o.from,to:o.to,insert:U.of([" "])}),i)return po(t,i,n,s);if(n&&!n.main.eq(o)){let e=!1,i="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin),t.dispatch({selection:n,scrollIntoView:e,userEvent:i}),!0}return!1}function po(t,e,i,n=-1){if(bi.ios&&t.inputState.flushIOSKey(e))return!0;let o=t.state.selection.main;if(bi.android&&(e.to==o.to&&(e.from==o.from||e.from==o.from-1&&" "==t.state.sliceDoc(e.from,o.from))&&1==e.insert.length&&2==e.insert.lines&&Ge(t.contentDOM,"Enter",13)||(e.from==o.from-1&&e.to==o.to&&0==e.insert.length||8==n&&e.insert.lengtht.from>=a.from&&t.to<=a.to&&Math.abs(t.from-n)o&&(n.push({from:o,to:t}),s+=t-o),o=e}},20),o{let i=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,n=t.underlineThickness;if("None"!=e&&"None"!=n){let o=this.toEditorPos(t.rangeStart),s=this.toEditorPos(t.rangeEnd);if(o{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:e}=this.composing;this.composing=null,e&&this.reset(t.state)}};for(let t in this.handlers)e.addEventListener(t,this.handlers[t]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=Oe(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,i=!1,n=this.pendingContextChange;return t.changes.iterChanges(((o,s,r,l,a)=>{if(i)return;let c=a.length-(s-o);if(n&&s>=n.to){if(n.from==o&&n.to==s&&n.insert.eq(a))return n=this.pendingContextChange=null,e+=c,void(this.to+=c);n=null,this.revertPending(t.state)}if(o+=e,(s+=e)<=this.from)this.from+=c,this.to+=c;else if(o\n \n
\n\n \n Theme Colors \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Standard Colors \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Custom Font Colors \n \n \n \n \n \n \n \n \n \n \n
\n\n \n Translucent Colors \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n Highlighter Colors \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Custom Colors \n \n \n \n \n \n \n \n \n =s:o<=s))return n;if(n===Vl())break;n=Yl(n,!1)}return!1}function $l(t,e,i,n){for(var o=0,s=0,r=t.children;s
\n ${Wr("[Description]")}:\n ${Wr("I need to convert the url to a markdown format link")}\n
\n ${Wr("[Example]")}: \n ${Wr("For example, convert https://example.com to [https://example.com](https://example.com)")}\n
\n ${Wr("[Requirements]")}: \n ${Wr("Use js regular expression to implement, and output the parameters in the following format (the result does not need to be escaped with json)")}\n
\n ${Wr("[Output]")}:\n
\n "name": "[Descriptive Name]",
\n "pattern": "[Regex Pattern]",
\n "replacement": "[Replacement Pattern, if applicable]",
\n "flags": "[Regex Flags]"
\n