init notes
This commit is contained in:
parent
a671836ca9
commit
6ee3d1fab9
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1 @@
|
|||
{}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
"table-editor-obsidian",
|
||||
"better-search-views",
|
||||
"better-word-count",
|
||||
"bmo-chatbot",
|
||||
"code-styler",
|
||||
"editing-toolbar",
|
||||
"obsidian-git",
|
||||
"obsidian-hover-editor",
|
||||
"make-md",
|
||||
"obsidian-paste-image-rename",
|
||||
"obsidian-spaced-repetition",
|
||||
"templater-obsidian",
|
||||
"obsidian-text-format"
|
||||
]
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"file-explorer": true,
|
||||
"global-search": true,
|
||||
"switcher": true,
|
||||
"graph": true,
|
||||
"backlink": true,
|
||||
"canvas": true,
|
||||
"outgoing-link": true,
|
||||
"tag-pane": true,
|
||||
"footnotes": false,
|
||||
"properties": true,
|
||||
"page-preview": true,
|
||||
"daily-notes": true,
|
||||
"templates": true,
|
||||
"note-composer": true,
|
||||
"command-palette": true,
|
||||
"slash-command": false,
|
||||
"editor-status": true,
|
||||
"bookmarks": true,
|
||||
"markdown-importer": false,
|
||||
"zk-prefixer": false,
|
||||
"random-note": false,
|
||||
"outline": true,
|
||||
"word-count": true,
|
||||
"slides": false,
|
||||
"audio-recorder": false,
|
||||
"workspaces": false,
|
||||
"file-recovery": true,
|
||||
"publish": false,
|
||||
"sync": true,
|
||||
"bases": true
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"collapse-filter": true,
|
||||
"search": "",
|
||||
"showTags": false,
|
||||
"showAttachments": false,
|
||||
"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": 1,
|
||||
"close": true
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"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
|
||||
}
|
||||
|
|
@ -0,0 +1,190 @@
|
|||
/* TODO: blockquotes need a better fix */
|
||||
.better-search-views-file-match.markdown-rendered > *,
|
||||
.better-search-views-file-match.markdown-rendered > blockquote > * {
|
||||
margin-block-start: 0;
|
||||
margin-block-end: 0;
|
||||
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: 0;
|
||||
}
|
||||
|
||||
.better-search-views-file-match a {
|
||||
cursor: default;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Copied from Obsidian */
|
||||
.better-search-views-file-match li > ul::before {
|
||||
content: "\200B";
|
||||
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: -1em;
|
||||
|
||||
display: block;
|
||||
|
||||
border-right: var(--indentation-guide-width) solid
|
||||
var(--indentation-guide-color);
|
||||
}
|
||||
|
||||
.better-search-views-breadcrumbs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.better-search-views-tree-item-children {
|
||||
margin-left: 10px;
|
||||
padding-left: 10px;
|
||||
border-left: var(--nav-indentation-guide-width) solid
|
||||
var(--indentation-guide-color);
|
||||
}
|
||||
|
||||
.better-search-views-tree-item-children:hover {
|
||||
border-left-color: var(--indentation-guide-color-active);
|
||||
}
|
||||
|
||||
.better-search-views-breadcrumb-container {
|
||||
display: flex;
|
||||
gap: 0.5em;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.better-search-views-tree .tree-item-inner {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
gap: 2px;
|
||||
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
|
||||
border-radius: var(--radius-s);
|
||||
}
|
||||
|
||||
.better-search-views-titles-container .tree-item-inner:not(:hover) {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.search-result-file-matches:has(.better-search-views-tree) {
|
||||
overflow: hidden;
|
||||
|
||||
font-size: var(--font-ui-smaller);
|
||||
line-height: var(--line-height-tight);
|
||||
color: var(--text-muted);
|
||||
|
||||
background-color: revert;
|
||||
border-radius: var(--radius-s);
|
||||
}
|
||||
|
||||
.search-result-file-matches:has(.better-search-views-tree),
|
||||
.better-search-views-tree .search-result-file-matches {
|
||||
margin: var(--size-4-1) 0 var(--size-4-1);
|
||||
}
|
||||
|
||||
.better-search-views-tree .search-result-file-matches {
|
||||
margin-left: 21px;
|
||||
}
|
||||
|
||||
.tree-item.search-result
|
||||
> .search-result-file-matches:has(.better-search-views-tree) {
|
||||
/* This fixes box shadow in child match boxes */
|
||||
padding-right: 1px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.search-result-file-matches:has(.better-search-views-tree)
|
||||
.better-search-views-file-match:not(:hover) {
|
||||
background-color: var(--search-result-background);
|
||||
box-shadow: 0 0 0 1px var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.better-search-views-icon {
|
||||
width: var(--icon-xs);
|
||||
height: var(--icon-xs);
|
||||
color: var(--text-faint);
|
||||
}
|
||||
|
||||
.better-search-views-tree blockquote {
|
||||
padding-left: 10px;
|
||||
border-left: var(--blockquote-border-thickness) solid
|
||||
var(--blockquote-border-color);
|
||||
}
|
||||
|
||||
.better-search-views-tree .tree-item-inner:hover {
|
||||
background-color: var(--nav-item-background-hover);
|
||||
}
|
||||
|
||||
.better-search-views-tree .search-result-file-title {
|
||||
padding-right: 0;
|
||||
|
||||
/* TODO: this is still hardcoded */
|
||||
padding-left: calc(20px + var(--nav-indentation-guide-width));
|
||||
}
|
||||
|
||||
body:not(.is-grabbing)
|
||||
.better-search-views-tree
|
||||
.tree-item-self.search-result-file-title:hover {
|
||||
background-color: unset;
|
||||
}
|
||||
|
||||
.better-search-views-tree .better-search-views-breadcrumb-container {
|
||||
flex-grow: 1;
|
||||
padding-right: 2px;
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
.better-search-views-tree
|
||||
.better-search-views-breadcrumb-container:not(:last-child) {
|
||||
padding-bottom: 2px;
|
||||
border-bottom: var(--nav-indentation-guide-width) solid
|
||||
var(--nav-indentation-guide-color);
|
||||
}
|
||||
|
||||
.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: center;
|
||||
align-self: flex-start;
|
||||
|
||||
padding-top: 4px;
|
||||
padding-bottom: 2px;
|
||||
|
||||
border-radius: var(--radius-s);
|
||||
}
|
||||
|
||||
.better-search-views-titles-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.markdown-source-view.mod-cm6
|
||||
.better-search-views-tree
|
||||
.task-list-item-checkbox {
|
||||
margin-inline-start: calc(var(--checkbox-size) * -1.5);
|
||||
}
|
||||
|
||||
.better-search-views-is-hidden {
|
||||
display: none;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"id": "better-word-count",
|
||||
"name": "Better Word Count",
|
||||
"version": "0.10.1",
|
||||
"description": "Counts the words of selected text in the editor.",
|
||||
"author": "Luke Leppan",
|
||||
"authorUrl": "https://lukeleppan.com",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
details.bwc-sb-item-setting {
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
border-radius: 10px;
|
||||
padding: 10px 5px 20px 10px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.bwc-sb-item-setting summary::marker {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
/* .bwc-sb-item-setting summary { */
|
||||
/* margin-bottom: 5px; */
|
||||
/* } */
|
||||
.bwc-sb-item-setting summary span.bwc-sb-buttons {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.bwc-status-bar-settings-title {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.bwc-section-count {
|
||||
background: var(--background-secondary);
|
||||
border-radius: var(--tag-radius);
|
||||
color: var(--text-muted);
|
||||
content: var(--word-count);
|
||||
display: inline-flex;
|
||||
font-size: var(--font-ui-smaller);
|
||||
font-weight: var(--font-normal);
|
||||
line-height: 1;
|
||||
margin: calc(-1 * var(--size-2-3)) 0 calc(-1 * var(--size-2-3)) var(--size-4-2);
|
||||
padding: var(--size-2-3) var(--size-4-2);
|
||||
pointer-events: none;
|
||||
position: relative;
|
||||
top: -3px;
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
{
|
||||
"profiles": {
|
||||
"profile": "BMO.md",
|
||||
"profileFolderPath": "BMO/Profiles",
|
||||
"lastLoadedChatHistoryPath": null,
|
||||
"lastLoadedChatHistory": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"general": {
|
||||
"model": "",
|
||||
"system_role": "You are a helpful assistant.",
|
||||
"max_tokens": null,
|
||||
"temperature": "1.00",
|
||||
"enableReferenceCurrentNote": false
|
||||
},
|
||||
"appearance": {
|
||||
"userName": "YOU",
|
||||
"chatbotName": "BMO",
|
||||
"chatbotContainerBackgroundColor": "#--background-secondary",
|
||||
"messageContainerBackgroundColor": "#--background-secondary",
|
||||
"userMessageFontColor": "#--text-normal",
|
||||
"userMessageBackgroundColor": "#--background-primary",
|
||||
"botMessageFontColor": "#--text-normal",
|
||||
"botMessageBackgroundColor": "#--background-secondary",
|
||||
"chatBoxFontColor": "#--text-normal",
|
||||
"chatBoxBackgroundColor": "#--interactive-accent",
|
||||
"enableHeader": true,
|
||||
"enableScrollBar": false,
|
||||
"bmoGenerateBackgroundColor": "#0c0a12",
|
||||
"bmoGenerateFontColor": "#--text-normal"
|
||||
},
|
||||
"prompts": {
|
||||
"prompt": "",
|
||||
"promptFolderPath": "BMO/Prompts"
|
||||
},
|
||||
"editor": {
|
||||
"systen_role": "You are a helpful assistant."
|
||||
},
|
||||
"chatHistory": {
|
||||
"chatHistoryPath": "BMO/History",
|
||||
"templateFilePath": "",
|
||||
"allowRenameNoteTitle": false
|
||||
},
|
||||
"OllamaConnection": {
|
||||
"RESTAPIURL": "http://localhost:11434",
|
||||
"enableStream": true,
|
||||
"ollamaParameters": {
|
||||
"mirostat": "0",
|
||||
"mirostat_eta": "0.10",
|
||||
"mirostat_tau": "5.00",
|
||||
"num_ctx": "2048",
|
||||
"num_gqa": null,
|
||||
"num_thread": null,
|
||||
"repeat_last_n": "64",
|
||||
"repeat_penalty": "1.10",
|
||||
"seed": null,
|
||||
"stop": [],
|
||||
"tfs_z": "1.00",
|
||||
"top_k": "40",
|
||||
"top_p": "0.90",
|
||||
"min_p": "0.00",
|
||||
"keep_alive": ""
|
||||
},
|
||||
"ollamaModels": []
|
||||
},
|
||||
"RESTAPIURLConnection": {
|
||||
"APIKey": "",
|
||||
"RESTAPIURL": "",
|
||||
"enableStream": false,
|
||||
"RESTAPIURLModels": []
|
||||
},
|
||||
"APIConnections": {
|
||||
"anthropic": {
|
||||
"APIKey": "",
|
||||
"anthropicModels": []
|
||||
},
|
||||
"googleGemini": {
|
||||
"APIKey": "",
|
||||
"enableStream": false,
|
||||
"geminiModels": []
|
||||
},
|
||||
"mistral": {
|
||||
"APIKey": "",
|
||||
"enableStream": false,
|
||||
"mistralModels": []
|
||||
},
|
||||
"openAI": {
|
||||
"APIKey": "",
|
||||
"openAIBaseUrl": "https://api.openai.com/v1",
|
||||
"enableStream": true,
|
||||
"openAIBaseModels": []
|
||||
},
|
||||
"openRouter": {
|
||||
"APIKey": "",
|
||||
"enableStream": false,
|
||||
"openRouterModels": []
|
||||
}
|
||||
},
|
||||
"toggleGeneralSettings": true,
|
||||
"toggleAppearanceSettings": false,
|
||||
"togglePromptSettings": false,
|
||||
"toggleEditorSettings": false,
|
||||
"toggleChatHistorySettings": false,
|
||||
"toggleProfileSettings": false,
|
||||
"toggleAPIConnectionSettings": true,
|
||||
"toggleOpenAISettings": false,
|
||||
"toggleMistralSettings": false,
|
||||
"toggleGoogleGeminiSettings": false,
|
||||
"toggleAnthropicSettings": false,
|
||||
"toggleRESTAPIURLSettings": true,
|
||||
"toggleOpenRouterSettings": false,
|
||||
"toggleOllamaSettings": true,
|
||||
"toggleAdvancedSettings": false
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"id": "bmo-chatbot",
|
||||
"name": "BMO Chatbot",
|
||||
"version": "2.3.3",
|
||||
"minAppVersion": "1.0.0",
|
||||
"description": "Generate and brainstorm ideas while creating your notes using Large Language Models (LLMs) from Ollama, LM Studio, Anthropic, Google Gemini, Mistral AI, OpenAI, and more for Obsidian.",
|
||||
"author": "Longy2k",
|
||||
"authorUrl": "https://github.com/longy2k",
|
||||
"fundingUrl": "https://ko-fi.com/longy2k",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
|
|
@ -0,0 +1,548 @@
|
|||
/*
|
||||
|
||||
This CSS file will be included with your plugin, and
|
||||
available in the app when your plugin is enabled.
|
||||
|
||||
If your plugin does not need CSS, delete this file.
|
||||
|
||||
*/
|
||||
.userMessage pre,
|
||||
.preElement {
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
|
||||
Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
|
||||
sans-serif;
|
||||
margin: 0;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.chatbotContainer {
|
||||
height: 100%;
|
||||
max-height: 99.2%;
|
||||
position: relative;
|
||||
border-radius: 5px;
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
word-break: break-word;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 800px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#header {
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
#chatbotNameHeading {
|
||||
color: var(--interactive-accent);
|
||||
text-align: center;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding: 0px 0px 0px 0px;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
#modelName {
|
||||
margin: 0rem 0;
|
||||
text-align: center;
|
||||
color: var(--interactive-accent);
|
||||
font-size: 0.65rem;
|
||||
}
|
||||
|
||||
#referenceCurrentNote {
|
||||
margin: -0.5rem 0 0.5rem 0;
|
||||
padding: 0 0 0 0;
|
||||
text-align: center;
|
||||
color: var(--interactive-accent);
|
||||
font-size: 0.65rem;
|
||||
}
|
||||
|
||||
/* messageContainer */
|
||||
|
||||
#messageContainer {
|
||||
margin-top: 0px;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
-webkit-touch-callout: default;
|
||||
-webkit-user-select: text;
|
||||
-khtml-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
-o-user-select: text;
|
||||
user-select: text;
|
||||
max-height: calc(100% - 120px);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
/* User & Bot Messages */
|
||||
|
||||
.userName,
|
||||
.chatbotName {
|
||||
display: block;
|
||||
font-size: 0.8rem;
|
||||
font-weight: bold;
|
||||
color: var(--interactive-accent);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.userMessage,
|
||||
.botMessage {
|
||||
margin: 0;
|
||||
padding: 10px 3.5%;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.userMessage {
|
||||
background-color: var(--background-primary);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.userMessage p,
|
||||
.botMessage p {
|
||||
margin: 0;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.messageBlock {
|
||||
margin: 0;
|
||||
overflow-wrap: break-word;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* messageBlock style */
|
||||
|
||||
.messageBlock pre:not(.preElement) {
|
||||
position: relative;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: break-word;
|
||||
font-size: 14px;
|
||||
background-color: #282c34;
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #ccc;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.messageBlock pre code {
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
color: #ced4df;
|
||||
}
|
||||
|
||||
.edit-textarea {
|
||||
max-width: 100%;
|
||||
min-width: 100%;
|
||||
min-height: 2rem;
|
||||
width: 100%;
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
|
||||
.textarea-edit-button,
|
||||
.textarea-cancel-button {
|
||||
margin: 0.2rem 0.5rem 0 0;
|
||||
font-size: 0.7rem;
|
||||
padding: 0 0.6rem;
|
||||
}
|
||||
|
||||
.textarea-edit-button:hover {
|
||||
background-color: var(--interactive-accent);
|
||||
}
|
||||
|
||||
button.copy-code-button,
|
||||
.messageBlock pre button.copy-button,
|
||||
.messageBlock pre button.edit-button {
|
||||
padding: 0 4px;
|
||||
background-color: transparent !important;
|
||||
box-shadow: none !important;
|
||||
border: none;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
color: var(--text-muted);
|
||||
display: inline-block;
|
||||
max-width: 30px;
|
||||
}
|
||||
|
||||
button.copy-code-button:hover,
|
||||
.messageBlock .copy-button:hover,
|
||||
.messageBlock .edit-button:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.userMessageToolBar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 1.2rem;
|
||||
}
|
||||
|
||||
.button-container {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Styles for copy button */
|
||||
.userMessageToolBar button.regenerate-button,
|
||||
.userMessageToolBar button.edit-button,
|
||||
.userMessageToolBar button.copy-button,
|
||||
.userMessageToolBar button.trash-button {
|
||||
padding: 0 3px;
|
||||
background-color: transparent !important;
|
||||
box-shadow: none !important;
|
||||
border: none;
|
||||
color: var(--interactive-accent);
|
||||
width: 1.2rem;
|
||||
}
|
||||
|
||||
.userMessageToolBar .regenerate-button:hover,
|
||||
.userMessageToolBar .edit-button:hover,
|
||||
.userMessageToolBar .copy-button:hover {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.userMessageToolBar .trash-button:hover {
|
||||
color: rgb(188, 35, 35);
|
||||
}
|
||||
|
||||
.botMessageToolBar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 1.2rem;
|
||||
}
|
||||
|
||||
.botMessageToolBar button.edit-button,
|
||||
.botMessageToolBar button.copy-button,
|
||||
.botMessageToolBar button.append-button {
|
||||
padding: 0 3px;
|
||||
background-color: transparent !important;
|
||||
box-shadow: none !important;
|
||||
border: none;
|
||||
color: var(--interactive-accent);
|
||||
width: 1.2rem;
|
||||
}
|
||||
|
||||
.botMessageToolBar .edit-button:hover,
|
||||
.botMessageToolBar .copy-button:hover,
|
||||
.botMessageToolBar .append-button:hover {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* Hide buttons */
|
||||
.userMessage .edit-button,
|
||||
.userMessage .regenerate-button,
|
||||
.userMessage .copy-button,
|
||||
.userMessage .trash-button,
|
||||
.botMessage .append-button,
|
||||
.botMessage .copy-button,
|
||||
.botMessage .edit-button {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* Show buttons on hover */
|
||||
.userMessage:hover .edit-button,
|
||||
.userMessage:hover .regenerate-button,
|
||||
.userMessage:hover .copy-button,
|
||||
.userMessage:hover .trash-button,
|
||||
.botMessage:hover .append-button,
|
||||
.botMessage:hover .copy-button,
|
||||
.botMessage:hover .edit-button {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.userMessageToolBar button,
|
||||
.botMessageToolBar button {
|
||||
width: 1.2rem;
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
|
||||
.messageBlock table {
|
||||
border: 1px solid gray;
|
||||
border-collapse: collapse;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.messageBlock th,
|
||||
.messageBlock td {
|
||||
border: 1px solid gray;
|
||||
}
|
||||
|
||||
/* chatbox - textarea */
|
||||
|
||||
.chatbox {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
margin: 13px 3.5%;
|
||||
padding: 3px;
|
||||
background-color: var(--interactive-accent);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.chatbox textarea {
|
||||
color: var(--text-normal);
|
||||
font-weight: 500;
|
||||
background-color: var(--interactive-accent);
|
||||
border-color: var(--interactive-accent);
|
||||
width: 100%;
|
||||
height: 29px;
|
||||
max-height: 150px;
|
||||
resize: none;
|
||||
font-size: 16px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.chatbox textarea::placeholder {
|
||||
color: var(--text-normal);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.chatbox textarea:focus {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.chatbox textarea::selection {
|
||||
background: blue !important;
|
||||
}
|
||||
|
||||
/* Send Button */
|
||||
|
||||
.chatbox .submit-button {
|
||||
background-color: var(--interactive-accent);
|
||||
filter: brightness(90%);
|
||||
box-shadow: none !important;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
padding: 8px;
|
||||
max-width: 30px;
|
||||
cursor: pointer;
|
||||
margin: 0 3px;
|
||||
}
|
||||
|
||||
.chatbox .submit-button:hover {
|
||||
filter: brightness(80%);
|
||||
}
|
||||
|
||||
.is-mobile .chatbox .submit-button {
|
||||
background-color: var(--interactive-accent);
|
||||
filter: brightness(90%);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
padding: 8px !important;
|
||||
max-width: 30px;
|
||||
max-height: 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.is-mobile .chatbox .submit-button:hover {
|
||||
filter: brightness(80%);
|
||||
}
|
||||
|
||||
/* Misc */
|
||||
|
||||
.errorMessage {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#spacer {
|
||||
height: 8vh;
|
||||
}
|
||||
|
||||
#loading {
|
||||
color: white;
|
||||
background-color: #808080;
|
||||
padding: 0px 5px 12px 5px;
|
||||
border-radius: 5px;
|
||||
display: none;
|
||||
line-height: 10px;
|
||||
font-size: 25px;
|
||||
font-weight: bolder;
|
||||
margin: 5px 0px;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.theme-light #loading {
|
||||
color: white;
|
||||
background-color: #b0b0b0;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
0%,
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
49.9% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0;
|
||||
}
|
||||
50.1% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#loading span {
|
||||
animation: blink 1.3s infinite both;
|
||||
}
|
||||
|
||||
#loading span:nth-child(1) {
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
#loading span:nth-child(2) {
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
#loading span:nth-child(3) {
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
|
||||
.dotIndicator {
|
||||
display: inline-block;
|
||||
width: 0.3rem;
|
||||
height: 0.3rem;
|
||||
background-color: #da2c2c;
|
||||
border-radius: 50%;
|
||||
margin-left: 0.25rem;
|
||||
margin-bottom: 0.05rem;
|
||||
}
|
||||
|
||||
ul#dropdownOptions {
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 0;
|
||||
display: none;
|
||||
z-index: 1;
|
||||
background-color: #282c34;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 0.2rem;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#dropdownOptions li {
|
||||
padding: 0.3rem 1rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
/* CSS for highlighting <li> elements on hover */
|
||||
ul#dropdownOptions li:hover {
|
||||
background-color: var(--interactive-accent);
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.commandBotMessage {
|
||||
border: 1px solid #ccc;
|
||||
background-color: #282c34;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
margin: 0.5rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.commandBotMessage h2 {
|
||||
margin: 8px 0 12px 0;
|
||||
}
|
||||
|
||||
.commandBotMessage p {
|
||||
padding: 0.1rem 0;
|
||||
}
|
||||
|
||||
.commandBotMessage code {
|
||||
background-color: #4d5158;
|
||||
border-radius: 0.2rem;
|
||||
padding: 0.16rem;
|
||||
}
|
||||
|
||||
/* Display Error Bot Message Style */
|
||||
|
||||
.errorBotMessage {
|
||||
color: #f30000;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #282c34;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
margin: 0.5rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
/* Toggle Settings Container */
|
||||
.toggleSettingContainer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.settingsContainer {
|
||||
margin: 0rem 1.4rem;
|
||||
}
|
||||
|
||||
.chevron-icon {
|
||||
margin-left: 0.5rem;
|
||||
--icon-size: 1.2rem;
|
||||
}
|
||||
|
||||
/* Light Theme */
|
||||
|
||||
.theme-light .commandBotMessage,
|
||||
.theme-light .errorBotMessage {
|
||||
border: 1px solid #ccc;
|
||||
background-color: white;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
margin: 0.5rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.theme-light .commandBotMessage code {
|
||||
background-color: #ccc;
|
||||
border-radius: 0.2rem;
|
||||
padding: 0.16rem;
|
||||
}
|
||||
|
||||
.theme-light .messageBlock pre {
|
||||
position: relative;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: break-word;
|
||||
font-size: 14px;
|
||||
background-color: white;
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #ccc;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.theme-light .messageBlock pre code {
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.theme-light .chatbox textarea::selection {
|
||||
background: var(--interactive-accent) !important;
|
||||
}
|
||||
|
||||
#modelOptions {
|
||||
height: 24px;
|
||||
font-size: 0.7em;
|
||||
color: var(--interactive-accent);
|
||||
margin: 5px auto;
|
||||
padding: 0 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"id": "code-styler",
|
||||
"name": "Code Styler",
|
||||
"version": "1.1.7",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Style and customize codeblocks and inline code in both editing mode and reading mode.",
|
||||
"author": "Mayuran Visakan",
|
||||
"authorUrl": "https://github.com/mayurankv",
|
||||
"fundingUrl": "https://www.buymeacoffee.com/mayurankv2",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,564 @@
|
|||
{
|
||||
"lastVersion": "4.0.8",
|
||||
"aestheticStyle": "default",
|
||||
"positionStyle": "top",
|
||||
"menuCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:ai-tools",
|
||||
"name": "AI Tools",
|
||||
"icon": "lucide-sparkles"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor-undo",
|
||||
"name": "Undo Edit",
|
||||
"icon": "undo-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor-redo",
|
||||
"name": "Redo Edit",
|
||||
"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": "Italic",
|
||||
"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-text-tools",
|
||||
"name": "Text Tools",
|
||||
"icon": "box",
|
||||
"menuType": "dropdown",
|
||||
"SubmenuCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:get-plain-text",
|
||||
"name": "Get Plain Text",
|
||||
"icon": "lucide-file-text"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:smart-symbols",
|
||||
"name": "Full Half Converter",
|
||||
"icon": "lucide-at-sign"
|
||||
},
|
||||
{
|
||||
"id": "editingToolbar-Divider-Line",
|
||||
"name": "Line Operations",
|
||||
"icon": "vertical-split"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:insert-blank-lines",
|
||||
"name": "Insert Blank Lines",
|
||||
"icon": "lucide-space"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:remove-blank-lines",
|
||||
"name": "Remove Blank Lines",
|
||||
"icon": "lucide-minimize-2"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:split-lines",
|
||||
"name": "Split Lines",
|
||||
"icon": "lucide-split"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:merge-lines",
|
||||
"name": "Merge Lines",
|
||||
"icon": "lucide-merge"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:dedupe-lines",
|
||||
"name": "Dedupe Lines",
|
||||
"icon": "lucide-filter"
|
||||
},
|
||||
{
|
||||
"id": "editingToolbar-Divider-Line",
|
||||
"name": "Text Processing",
|
||||
"icon": "vertical-split"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:add-wrap",
|
||||
"name": "Add Prefix/Suffix",
|
||||
"icon": "lucide-wrap-text"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:number-lines",
|
||||
"name": "Number Lines (Custom)",
|
||||
"icon": "lucide-list-ordered"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:remove-whitespace-trim",
|
||||
"name": "Trim Line Ends",
|
||||
"icon": "lucide-scissors"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:remove-whitespace-compress",
|
||||
"name": "Shrink Extra Spaces",
|
||||
"icon": "lucide-minimize"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:remove-whitespace-all",
|
||||
"name": "Remove All Whitespace",
|
||||
"icon": "lucide-eraser"
|
||||
},
|
||||
{
|
||||
"id": "editingToolbar-Divider-Line",
|
||||
"name": "Advanced Tools",
|
||||
"icon": "vertical-split"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:list-to-table",
|
||||
"name": "List to Table",
|
||||
"icon": "lucide-table"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:table-to-list",
|
||||
"name": "Table to List",
|
||||
"icon": "lucide-list"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:extract-between",
|
||||
"name": "Extract Between Strings",
|
||||
"icon": "lucide-brackets"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "SubmenuCommands-lucdf3en5",
|
||||
"name": "submenu",
|
||||
"icon": "edit",
|
||||
"SubmenuCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:editor-cut",
|
||||
"name": "Cut",
|
||||
"icon": "lucide-scissors"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor-copy",
|
||||
"name": "Copy",
|
||||
"icon": "lucide-copy"
|
||||
},
|
||||
{
|
||||
"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 and 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": "Callout",
|
||||
"icon": "lucide-quote"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "SubmenuCommands-mdcmder",
|
||||
"name": "submenu",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M464 608 l0 -568 q0 -3 -2.5 -5.5 q-2.5 -2.5 -5.5 -2.5 l-80 0 q-3 0 -5.5 2.5 q-2.5 2.5 -2.5 5.5 l0 568 l-232 0 q-3 0 -5.5 2.5 q-2.5 2.5 -2.5 5.5 l0 80 q0 3 2.5 5.5 q2.5 2.5 5.5 2.5 l560 0 q3 0 5.5 -2.5 q2.5 -2.5 2.5 -5.5 l0 -80 q0 -3 -2.5 -5.5 q-2.5 -2.5 -5.5 -2.5 l-232 0 ZM864 696 q17 0 28.5 11.5 q11.5 11.5 11.5 28.5 q0 17 -11.5 28.5 q-11.5 11.5 -28.5 11.5 q-17 0 -28.5 -11.5 q-11.5 -11.5 -11.5 -28.5 q0 -17 11.5 -28.5 q11.5 -11.5 28.5 -11.5 ZM864 640 q-40 0 -68 28 q-28 28 -28 68 q0 40 28 68 q28 28 68 28 q40 0 68 -28 q28 -28 28 -68 q0 -40 -28 -68 q-28 -28 -68 -28 ZM576 322 l0 -63 q0 -3 2 -5 l89 -70 l-89 -70 q-2 -2 -2 -5 l0 -63 q0 -4 3.5 -5.5 q3.5 -1.5 6.5 0.5 l170 133 q4 3 4.5 8.5 q0.5 5.5 -2.5 9.5 l-2 2 l-170 133 q-3 2 -6.5 0.5 q-3.5 -1.5 -3.5 -5.5 ZM256 322 l0 -63 q0 -3 -2 -5 l-89 -70 l89 -70 q2 -2 2 -5 l0 -63 q0 -4 -3.5 -5.5 q-3.5 -1.5 -6.5 0.5 l-170 133 q-4 3 -4.5 8.5 q-0.5 5.5 2.5 9.5 l2 2 l170 133 q3 2 6.5 0.5 q3.5 -1.5 3.5 -5.5 Z\"></path></g></svg>",
|
||||
"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": "Wikilink",
|
||||
"icon": "<svg width=\"15\" height=\"15\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M306 134 l91 0 q1 0 1 -8 l0 -80 q0 -8 -1 -8 l-91 0 q-1 0 -1 7 q0 -8 -5 -8 l-45 0 q-5 0 -5 8 l0 784 q0 8 5 8 l45 0 q5 0 5 -8 q0 8 1 8 l91 0 q1 0 1 -8 l0 -80 q0 -8 -1 -8 l-91 0 q-1 0 -1 8 l0 -623 q0 8 1 8 ZM139 134 l91 0 q1 0 1 -8 l0 -80 q0 -8 -1 -8 l-91 0 q-1 0 -1 7 q0 -8 -5 -8 l-45 0 q-5 0 -5 8 l0 784 q0 8 5 8 l45 0 q5 0 5 -8 q0 8 1 8 l91 0 q1 0 1 -8 l0 -80 q0 -8 -1 -8 l-91 0 q-1 0 -1 8 l0 -623 q0 8 1 8 ZM711 134 q1 0 1 -8 l0 623 q0 -8 -1 -8 l-91 0 q-1 0 -1 8 l0 80 q0 8 1 8 l91 0 q1 0 1 -8 q0 8 4 8 l46 0 q4 0 4 -8 l0 -784 q0 -8 -4 -8 l-46 0 q-4 0 -4 8 q0 -7 -1 -7 l-91 0 q-1 0 -1 8 l0 80 q0 8 1 8 l91 0 ZM878 134 q1 0 1 -8 l0 623 q0 -8 -1 -8 l-91 0 q-1 0 -1 8 l0 80 q0 8 1 8 l91 0 q1 0 1 -8 q0 8 5 8 l45 0 q4 0 4 -8 l0 -784 q0 -8 -4 -8 l-45 0 q-5 0 -5 8 q0 -7 -1 -7 l-91 0 q-1 0 -1 8 l0 80 q0 8 1 8 l91 0 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor:insert-embed",
|
||||
"name": "Embed",
|
||||
"icon": "note-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:insert-link",
|
||||
"name": "Link",
|
||||
"icon": "link-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:hrline",
|
||||
"name": "Horizontal Divider",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M912 424 l0 -80 q0 -3 -2.5 -5.5 q-2.5 -2.5 -5.5 -2.5 l-784 0 q-3 0 -5.5 2.5 q-2.5 2.5 -2.5 5.5 l0 80 q0 3 2.5 5.5 q2.5 2.5 5.5 2.5 l784 0 q3 0 5.5 -2.5 q2.5 -2.5 2.5 -5.5 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"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": "Ordered List",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M860 424 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-457 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l457 0 ZM860 756 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-457 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l457 0 ZM860 92 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-457 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l457 0 ZM264 136 l-3 -3 l-51 -57 l56 0 q14 0 24.5 -10 q10.5 -10 11.5 -25 l0 -1 q0 -15 -10.5 -25.5 q-10.5 -10.5 -24.5 -10.5 l-137 0 q-15 0 -25 10 q-10 10 -11 24.5 q-1 14.5 9 25.5 l63 70 l49 54 q7 7 7 16.5 q0 9.5 -7.5 16.5 q-7.5 7 -18.5 7 q-11 0 -18.5 -6.5 q-7.5 -6.5 -8.5 -16.5 l0 0 q0 -15 -10.5 -25.5 q-10.5 -10.5 -25.5 -10.5 q-15 0 -25.5 10.5 q-10.5 10.5 -10.5 25.5 q0 26 13.5 47.5 q13.5 21.5 36 34.5 q22.5 13 49 13 q26.5 0 49.5 -13 q23 -13 36 -34.5 q13 -21.5 13 -47.5 q0 -20 -7.5 -37.5 q-7.5 -17.5 -21.5 -30.5 l-1 -1 ZM173 794 q11 11 25 10.5 q14 -0.5 24.5 -10.5 q10.5 -10 10.5 -25 l0 -293 q0 -15 -10 -25.5 q-10 -10.5 -25 -10.5 q-15 0 -25.5 10 q-10.5 10 -11.5 25 l0 211 q-10 -8 -23.5 -7 q-13.5 1 -22.5 11 l-1 0 q-10 11 -9.5 25.5 q0.5 14.5 10.5 24.5 l58 54 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:toggle-bullet-list",
|
||||
"name": "Unordered List",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M860 424 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-477 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l477 0 ZM860 756 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-477 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l477 0 ZM860 92 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-477 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l477 0 ZM176 716 l0 0 ZM112 716 q0 -27 18.5 -45.5 q18.5 -18.5 45.5 -18.5 q27 0 45.5 18.5 q18.5 18.5 18.5 45.5 q0 27 -18.5 45.5 q-18.5 18.5 -45.5 18.5 q-27 0 -45.5 -18.5 q-18.5 -18.5 -18.5 -45.5 ZM176 384 l0 0 ZM112 384 q0 -27 18.5 -45.5 q18.5 -18.5 45.5 -18.5 q27 0 45.5 18.5 q18.5 18.5 18.5 45.5 q0 27 -18.5 45.5 q-18.5 18.5 -45.5 18.5 q-27 0 -45.5 -18.5 q-18.5 -18.5 -18.5 -45.5 ZM176 52 l0 0 ZM112 52 q0 -27 18.5 -45.5 q18.5 -18.5 45.5 -18.5 q27 0 45.5 18.5 q18.5 18.5 18.5 45.5 q0 27 -18.5 45.5 q-18.5 18.5 -45.5 18.5 q-27 0 -45.5 -18.5 q-18.5 -18.5 -18.5 -45.5 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:undent-list",
|
||||
"name": "Unindent List",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M872 302 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-429 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l429 0 ZM872 542 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-429 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l429 0 ZM872 784 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM872 62 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM244 534 l-123 -122 q-8 -7 -8 -18 q0 -11 8 -18 l123 -122 q8 -7 19 -7 q11 0 18.5 7.5 q7.5 7.5 7.5 18.5 l0 242 q0 11 -7.5 18.5 q-7.5 7.5 -18.5 7.5 q-11 0 -19 -7 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:indent-list",
|
||||
"name": "Indent list",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M872 302 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-429 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l429 0 ZM872 542 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-429 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l429 0 ZM872 784 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM872 62 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM158 534 l124 -122 q7 -7 7 -18 q0 -11 -7 -18 l-124 -122 q-7 -7 -18 -7 q-11 0 -19 7.5 q-8 7.5 -8 18.5 l0 242 q0 11 8 18.5 q8 7.5 19 7.5 q11 0 18 -7 Z\"></path></g></svg>"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "SubmenuCommands-aligin",
|
||||
"name": "submenu-aligin",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M724 304 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 540 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM724 776 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 68 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 Z\"></path></g></svg>",
|
||||
"SubmenuCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:justify",
|
||||
"name": "Justify Text",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M112 736 l0 0 ZM120 736 l784 0 q8 0 8 -8 l0 -80 q0 -8 -8 -8 l-784 0 q-8 0 -8 8 l0 80 q0 8 8 8 ZM112 331 l0 0 ZM120 331 l784 0 q8 0 8 -8 l0 -80 q0 -8 -8 -8 l-784 0 q-8 0 -8 8 l0 80 q0 8 8 8 ZM112 128 l0 0 ZM120 128 l784 0 q8 0 8 -8 l0 -80 q0 -8 -8 -8 l-784 0 q-8 0 -8 8 l0 80 q0 8 8 8 ZM112 533 l0 0 ZM120 533 l784 0 q8 0 8 -8 l0 -80 q0 -8 -8 -8 l-784 0 q-8 0 -8 8 l0 80 q0 8 8 8 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:left",
|
||||
"name": "Align Text Left",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M572 304 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 540 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM572 776 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 68 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:center",
|
||||
"name": "Center Text",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M724 304 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 540 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM724 776 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 68 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:right",
|
||||
"name": "Align Text Right",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M872 304 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 540 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM872 776 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 68 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 Z\"></path></g></svg>"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:change-font-color",
|
||||
"name": "Change Font Color",
|
||||
"icon": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" focusable=\"false\" fill=\"currentColor\"><g fill-rule=\"evenodd\"><path id=\"change-font-color-icon\" d=\"M3 18h18v3H3z\" style=\"fill:#2DC26B\"></path><path d=\"M8.7 16h-.8a.5.5 0 01-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 01-.5.6h-.8a.5.5 0 01-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 00.5.6h1.6a.5.5 0 00.5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:change-background-color",
|
||||
"name": "Change Background Color",
|
||||
"icon": "<svg width=\"18\" height=\"24\" viewBox=\"0 0 256 256\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><g stroke=\"none\" stroke-width=\"1\" fill=\"currentColor\" fill-rule=\"evenodd\"><g ><g fill=\"currentColor\"><g transform=\"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)\" ><path d=\"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z\" fill-rule=\"nonzero\"></path><path d=\"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z\" fill-rule=\"evenodd\"></path><path d=\"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z\" fill-rule=\"nonzero\"></path></g></g><path d=\"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z\" id=\"change-background-color-icon\" style=\"fill:#FA541C\"></path></g></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:fullscreen-focus",
|
||||
"name": "Fullscreen Focus Mode",
|
||||
"icon": "fullscreen"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:workplace-fullscreen-focus",
|
||||
"name": "Workplace Fullscreen",
|
||||
"icon": "exit-fullscreen"
|
||||
}
|
||||
],
|
||||
"followingCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:ai-tools",
|
||||
"name": "AI Tools",
|
||||
"icon": "lucide-sparkles"
|
||||
}
|
||||
],
|
||||
"topCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:ai-tools",
|
||||
"name": "AI Tools",
|
||||
"icon": "lucide-sparkles"
|
||||
}
|
||||
],
|
||||
"fixedCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:ai-tools",
|
||||
"name": "AI Tools",
|
||||
"icon": "lucide-sparkles"
|
||||
}
|
||||
],
|
||||
"mobileCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:ai-tools",
|
||||
"name": "AI Tools",
|
||||
"icon": "lucide-sparkles"
|
||||
}
|
||||
],
|
||||
"enableMultipleConfig": false,
|
||||
"enableTopToolbar": true,
|
||||
"enableFollowingToolbar": false,
|
||||
"enableFixedToolbar": false,
|
||||
"appendMethod": "workspace",
|
||||
"shouldShowMenuOnSelect": false,
|
||||
"cMenuVisibility": true,
|
||||
"cMenuBottomValue": 4.25,
|
||||
"cMenuNumRows": 12,
|
||||
"cMenuWidth": 610,
|
||||
"cMenuFontColor": "#2DC26B",
|
||||
"cMenuBackgroundColor": "#d3f8b6",
|
||||
"autohide": false,
|
||||
"Iscentered": false,
|
||||
"custom_bg1": "#FFB78B8C",
|
||||
"custom_bg2": "#CDF4698C",
|
||||
"custom_bg3": "#A0CCF68C",
|
||||
"custom_bg4": "#F0A7D88C",
|
||||
"custom_bg5": "#ADEFEF8C",
|
||||
"custom_fc1": "#D83931",
|
||||
"custom_fc2": "#DE7802",
|
||||
"custom_fc3": "#245BDB",
|
||||
"custom_fc4": "#6425D0",
|
||||
"custom_fc5": "#646A73",
|
||||
"isLoadOnMobile": false,
|
||||
"horizontalPosition": 0,
|
||||
"verticalPosition": 0,
|
||||
"formatBrushes": {},
|
||||
"customCommands": [],
|
||||
"viewTypeSettings": {},
|
||||
"appearanceByStyle": {
|
||||
"top": {
|
||||
"toolbarBackgroundColor": "rgba(var(--background-secondary-rgb), 0.7)",
|
||||
"toolbarIconColor": "var(--text-normal)",
|
||||
"toolbarIconSize": 18,
|
||||
"aestheticStyle": "default"
|
||||
},
|
||||
"following": {
|
||||
"toolbarBackgroundColor": "rgba(var(--background-secondary-rgb), 0.7)",
|
||||
"toolbarIconColor": "var(--text-normal)",
|
||||
"toolbarIconSize": 18,
|
||||
"aestheticStyle": "default"
|
||||
},
|
||||
"fixed": {
|
||||
"toolbarBackgroundColor": "rgba(var(--background-secondary-rgb), 0.7)",
|
||||
"toolbarIconColor": "var(--text-normal)",
|
||||
"toolbarIconSize": 18,
|
||||
"aestheticStyle": "default"
|
||||
},
|
||||
"mobile": {
|
||||
"toolbarBackgroundColor": "rgba(var(--background-secondary-rgb), 0.7)",
|
||||
"toolbarIconColor": "var(--text-normal)",
|
||||
"toolbarIconSize": 18,
|
||||
"aestheticStyle": "default"
|
||||
}
|
||||
},
|
||||
"toolbarBackgroundColor": "rgba(var(--background-secondary-rgb), 0.7)",
|
||||
"toolbarIconColor": "var(--text-normal)",
|
||||
"toolbarIconSize": 18,
|
||||
"useCurrentLineForRegex": false,
|
||||
"ai": {
|
||||
"enabled": true,
|
||||
"consentAccepted": true,
|
||||
"onboardingShown": true,
|
||||
"providerMode": "pkmer-first",
|
||||
"enableInlineCompletion": true,
|
||||
"inlineCompletionHintLearned": false,
|
||||
"completionTrigger": "manual",
|
||||
"completionDelay": 500,
|
||||
"enableRewrite": true,
|
||||
"showRewriteToolbarOnSelection": false,
|
||||
"rewriteMinSelectionLength": 1,
|
||||
"pkmerApiBaseUrl": "https://newapi.pkmer.cn",
|
||||
"pkmerModel": "04-fast",
|
||||
"pkmerModelRouting": {
|
||||
"mode": "smart",
|
||||
"completion": "04-fast",
|
||||
"rewrite": "04-fast",
|
||||
"reasoning": "03-agent",
|
||||
"artifact": "03-agent"
|
||||
},
|
||||
"pkmer": {
|
||||
"tokenExpiresAt": 0,
|
||||
"userInfo": null
|
||||
},
|
||||
"enableCustomModel": false,
|
||||
"customModel": {
|
||||
"apiFormat": "openai-compatible",
|
||||
"baseUrl": "",
|
||||
"apiKey": "",
|
||||
"model": "",
|
||||
"temperature": 0.2
|
||||
},
|
||||
"customPromptHistory": [],
|
||||
"customPromptTemplates": [
|
||||
{
|
||||
"id": "template-demo-variables",
|
||||
"name": "📝 总结要点",
|
||||
"prompt": "分析 {{file:content}} 的内容结构,重点关注:\n{{selection}}\n\n请提供:\n1. 内容概要\n2. 关键要点\n3. 改进建议",
|
||||
"icon": "lucide-sparkles"
|
||||
},
|
||||
{
|
||||
"id": "template-task-variables",
|
||||
"name": "提炼任务",
|
||||
"prompt": "当前日期{{date}},从 {{file:content}} 中提取所有待办事项,重点关注:\n{{selection}}\n\n请严格按 Obsidian Tasks 插件格式输出,每条任务单独一行:\n\n- [ ] 任务描述 ⏫/🔼/🔽/⏬ 优先级\n- [ ] 任务描述 📅 YYYY-MM-DD 截止日期\n- [ ] 任务描述 ⏰ YYYY-MM-DD HH:mm 提醒时间\n- [ ] 任务描述 🛫 YYYY-MM-DD 开始日期\n- [ ] 任务描述 🔁 every day/week/month 重复周期\n- [ ] 任务描述 #标签 #项目名\n\n提取规则:\n1. 如果原文提到\"紧急/马上/立即/今天\",添加 ⏫(最高优先级)\n2. 如果提到\"明天/本周/尽快\",添加 🔼(高优先级)\n3. 如果提到具体日期,转换为 📅 YYYY-MM-DD 格式\n4. 如果提到时间,转换为 ⏰ YYYY-MM-DD HH:mm 格式\n5. 如果提到周期性工作,添加 🔁 every week/month\n6. 为每个任务添加合适的标签(如 #工作 #会议 #跟进)\n\n示例输出:\n- [ ] 完成项目报告 ⏫ 📅 2026-04-25 #工作\n- [ ] 每周团队例会 🔁 every week on Monday ⏰ 09:00 #会议\n- [ ] 跟进客户需求 🔼 📅 2026-04-23 #跟进",
|
||||
"icon": "lucide-sparkles"
|
||||
},
|
||||
{
|
||||
"id": "template-dataview",
|
||||
"name": "生成 Dataview",
|
||||
"prompt": "根据我的需求,帮我生成一个 Obsidian Dataview 查询代码块。要求:\n1. 使用 DataviewJS 或 DQL 语法\n2. 包含必要的字段筛选和排序\n3. 添加注释说明每个部分的作用\n4. 如果需要复杂逻辑,使用 DataviewJS\n\n我的需求:",
|
||||
"icon": "lucide-database"
|
||||
},
|
||||
{
|
||||
"id": "template-templater",
|
||||
"name": "设计 Templater 模板",
|
||||
"prompt": "帮我设计一个 Obsidian Templater 模板。要求:\n1. 使用 Templater 语法 (<% %>)\n2. 包含动态日期、时间等变量\n3. 支持用户输入提示\n4. 添加必要的条件判断和循环\n5. 注释说明每个部分的用途\n\n模板用途:",
|
||||
"icon": "lucide-file-code"
|
||||
},
|
||||
{
|
||||
"id": "template-mermaid",
|
||||
"name": "绘制 Mermaid 图表",
|
||||
"prompt": "根据我选中的文本内容 {{selection}},生成 Mermaid 图表代码。要求:\n1. 选择合适的图表类型(流程图/时序图/类图/甘特图等)\n2. 使用清晰的节点命名\n3. 添加必要的样式和注释\n4. 确保语法正确可渲染\n",
|
||||
"icon": "lucide-workflow"
|
||||
},
|
||||
{
|
||||
"id": "template-metadata",
|
||||
"name": "设计 YAML",
|
||||
"prompt": "根据当前笔记内容 {{file:content}},帮我设计一个适合当前笔记的 YAML Frontmatter 元数据结构。要求:\n1. 根据笔记内容推荐合适的字段\n2. 包含常用字段(tags, aliases, date等)\n3. 添加自定义字段建议\n4. 注释说明每个字段的用途\n\n笔记类型:",
|
||||
"icon": "lucide-file-json"
|
||||
},
|
||||
{
|
||||
"id": "template-callout",
|
||||
"name": "使用Callout包装",
|
||||
"prompt": "根据我选中的文本内容 {{selection}},帮我使用 Obsidian Callout 块进行包装。要求:\n1. 选择合适的 callout 类型(note/tip/warning/danger等)\n2. 支持嵌套和折叠\n3. 包含标题和内容\n4. 可以包含代码块或列表\n\n内容需求:",
|
||||
"icon": "lucide-message-square"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"id": "editing-toolbar",
|
||||
"name": "Editing Toolbar",
|
||||
"version": "4.0.8",
|
||||
"minAppVersion": "0.14.0",
|
||||
"description": "The Obsidian Editing Toolbar is modified from cmenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.",
|
||||
"author": "Cuman",
|
||||
"authorUrl": "https://github.com/cumany/obsidian-editing-toolbar",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,112 @@
|
|||
{
|
||||
"newNotePlaceholder": "Untitled",
|
||||
"defaultInitialization": false,
|
||||
"navigatorEnabled": true,
|
||||
"filePreviewOnHover": false,
|
||||
"blinkEnabled": true,
|
||||
"datePickerTime": false,
|
||||
"imageThumbnails": false,
|
||||
"noteThumbnails": false,
|
||||
"spacesMDBInHidden": true,
|
||||
"cacheIndex": true,
|
||||
"spacesRightSplit": false,
|
||||
"contextEnabled": true,
|
||||
"spaceViewEnabled": true,
|
||||
"saveAllContextToFrontmatter": true,
|
||||
"autoOpenFileContext": false,
|
||||
"activeView": "/",
|
||||
"hideFrontmatter": true,
|
||||
"activeSpace": "",
|
||||
"defaultDateFormat": "MMM dd yyyy",
|
||||
"defaultTimeFormat": "h:mm a",
|
||||
"spacesEnabled": true,
|
||||
"syncFormulaToFrontmatter": true,
|
||||
"spacesPerformance": false,
|
||||
"currentWaypoint": 0,
|
||||
"enableFolderNote": true,
|
||||
"folderIndentationLines": true,
|
||||
"revealActiveFile": false,
|
||||
"spacesStickers": true,
|
||||
"spaceRowHeight": 29,
|
||||
"mobileSpaceRowHeight": 40,
|
||||
"bannerHeight": 200,
|
||||
"spacesDisablePatch": false,
|
||||
"folderNoteInsideFolder": true,
|
||||
"folderNoteName": "",
|
||||
"sidebarTabs": true,
|
||||
"showRibbon": true,
|
||||
"vaultSelector": true,
|
||||
"deleteFileOption": "trash",
|
||||
"expandedSpaces": [
|
||||
"/",
|
||||
"//Tags",
|
||||
"//BMO"
|
||||
],
|
||||
"expandFolderOnClick": true,
|
||||
"spacesFolder": "Tags",
|
||||
"suppressedWarnings": [],
|
||||
"spaceSubFolder": ".space",
|
||||
"hiddenFiles": [],
|
||||
"hiddenExtensions": [
|
||||
".mdb",
|
||||
"_assets",
|
||||
"_blocks"
|
||||
],
|
||||
"inlineBacklinks": false,
|
||||
"inlineContext": true,
|
||||
"inlineBacklinksExpanded": false,
|
||||
"inlineContextExpanded": true,
|
||||
"inlineContextProperties": true,
|
||||
"inlineContextSectionsExpanded": true,
|
||||
"banners": true,
|
||||
"inlineContextNameLayout": "vertical",
|
||||
"spacesUseAlias": false,
|
||||
"fmKeyAlias": "aliases",
|
||||
"fmKeyBanner": "banner",
|
||||
"fmKeyColor": "color",
|
||||
"fmKeyBannerOffset": "banner_y",
|
||||
"fmKeySticker": "sticker",
|
||||
"openSpacesOnLaunch": true,
|
||||
"indexSVG": false,
|
||||
"readableLineWidth": true,
|
||||
"autoAddContextsToSubtags": true,
|
||||
"releaseNotesPrompt": 0.999,
|
||||
"enableDefaultSpaces": true,
|
||||
"showSpacePinIcon": true,
|
||||
"experimental": false,
|
||||
"systemName": "ZhouWenTao",
|
||||
"defaultSpaceTemplate": "",
|
||||
"selectedKit": "default",
|
||||
"actionMaxSteps": 100,
|
||||
"contextPagination": 25,
|
||||
"skipFolders": [],
|
||||
"skipFolderNames": [],
|
||||
"enhancedLogs": false,
|
||||
"basics": true,
|
||||
"basicsSettings": {
|
||||
"flowMenuEnabled": true,
|
||||
"markSans": false,
|
||||
"makeMenuPlaceholder": true,
|
||||
"mobileMakeBar": false,
|
||||
"mobileSidepanel": false,
|
||||
"inlineStyler": true,
|
||||
"inlineStylerColors": false,
|
||||
"inlineStylerSelectedPalette": "",
|
||||
"editorFlow": true,
|
||||
"internalLinkClickFlow": false,
|
||||
"internalLinkSticker": false,
|
||||
"editorFlowStyle": "minimal",
|
||||
"menuTriggerChar": "/",
|
||||
"inlineStickerMenu": true,
|
||||
"emojiTriggerChar": ":",
|
||||
"flowState": false
|
||||
},
|
||||
"firstLaunch": true,
|
||||
"notesPreview": false,
|
||||
"editStickerInSidebar": true,
|
||||
"overrideNativeMenu": false,
|
||||
"onboardingCompleted": false,
|
||||
"contextCreateUseModal": false,
|
||||
"homepagePath": "",
|
||||
"mobileMakeHeader": false
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"id": "make-md",
|
||||
"name": "make.md",
|
||||
"version": "1.3.4",
|
||||
"minAppVersion": "0.16.0",
|
||||
"description": "make.md gives you everything you need to organize and personalize your notes.",
|
||||
"author": "make.md",
|
||||
"authorUrl": "https://www.make.md",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"author": "Vinzent",
|
||||
"authorUrl": "https://github.com/Vinzent03",
|
||||
"id": "obsidian-git",
|
||||
"name": "Git",
|
||||
"description": "Integrate Git version control with automatic backup and other advanced features.",
|
||||
"isDesktopOnly": false,
|
||||
"fundingUrl": "https://ko-fi.com/vinzent",
|
||||
"version": "2.38.2"
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
PROMPT="$1"
|
||||
TEMP_FILE="$OBSIDIAN_GIT_CREDENTIALS_INPUT"
|
||||
|
||||
cleanup() {
|
||||
rm -f "$TEMP_FILE" "$TEMP_FILE.response"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
echo "$PROMPT" > "$TEMP_FILE"
|
||||
|
||||
while [ ! -e "$TEMP_FILE.response" ]; do
|
||||
if [ ! -e "$TEMP_FILE" ]; then
|
||||
echo "Trigger file got removed: Abort" >&2
|
||||
exit 1
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
RESPONSE=$(cat "$TEMP_FILE.response")
|
||||
|
||||
echo "$RESPONSE"
|
||||
|
|
@ -0,0 +1,710 @@
|
|||
@keyframes loading {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.git-signs-gutter {
|
||||
.cm-gutterElement {
|
||||
/* Needed to align the sign properly for different line heigts. Such as
|
||||
* when having a heading or list item.
|
||||
*/
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-view"] .button-border {
|
||||
border: 2px solid var(--interactive-accent);
|
||||
border-radius: var(--radius-s);
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-view"] .view-content {
|
||||
padding-left: 0;
|
||||
padding-top: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-history-view"] .view-content {
|
||||
padding-left: 0;
|
||||
padding-top: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.loading {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.loading > svg {
|
||||
animation: 2s linear infinite loading;
|
||||
transform-origin: 50% 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.obsidian-git-center {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.obsidian-git-textarea {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.obsidian-git-disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.obsidian-git-center-button {
|
||||
display: block;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.tooltip.mod-left {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.tooltip.mod-right {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* Limits the scrollbar to the view body */
|
||||
.git-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Re-enable wrapping of nav buttns to prevent overflow on smaller screens #*/
|
||||
.workspace-drawer .git-view .nav-buttons-container {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.git-tools {
|
||||
display: flex;
|
||||
margin-left: auto;
|
||||
}
|
||||
.git-tools .type {
|
||||
padding-left: var(--size-2-1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 11px;
|
||||
}
|
||||
|
||||
.git-tools .type[data-type="M"] {
|
||||
color: orange;
|
||||
}
|
||||
.git-tools .type[data-type="D"] {
|
||||
color: red;
|
||||
}
|
||||
.git-tools .buttons {
|
||||
display: flex;
|
||||
}
|
||||
.git-tools .buttons > * {
|
||||
padding: 0 0;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-view"] .tree-item-self,
|
||||
.workspace-leaf-content[data-type="git-history-view"] .tree-item-self {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-view"]
|
||||
.tree-item-self:hover
|
||||
.clickable-icon,
|
||||
.workspace-leaf-content[data-type="git-history-view"]
|
||||
.tree-item-self:hover
|
||||
.clickable-icon {
|
||||
color: var(--icon-color-hover);
|
||||
}
|
||||
|
||||
/* Highlight an item as active if it's diff is currently opened */
|
||||
.is-active .git-tools .buttons > * {
|
||||
color: var(--nav-item-color-active);
|
||||
}
|
||||
|
||||
.git-author {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
.git-date {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
.git-ref {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
/* ====== diff2html ======
|
||||
The following styles are adapted from the obsidian-version-history plugin by
|
||||
@kometenstaub https://github.com/kometenstaub/obsidian-version-history-diff/blob/main/src/styles.scss
|
||||
which itself is adapted from the diff2html library with the following original license:
|
||||
|
||||
https://github.com/rtfpessoa/diff2html/blob/master/LICENSE.md
|
||||
|
||||
Copyright 2014-2016 Rodrigo Fernandes https://rtfpessoa.github.io/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
.theme-dark,
|
||||
.theme-light {
|
||||
--git-delete-bg: #ff475040;
|
||||
--git-delete-hl: #96050a75;
|
||||
--git-insert-bg: #68d36840;
|
||||
--git-insert-hl: #23c02350;
|
||||
--git-change-bg: #ffd55840;
|
||||
--git-selected: #3572b0;
|
||||
|
||||
--git-delete: #c33;
|
||||
--git-insert: #399839;
|
||||
--git-change: #d0b44c;
|
||||
--git-move: #3572b0;
|
||||
}
|
||||
|
||||
.git-diff {
|
||||
.d2h-d-none {
|
||||
display: none;
|
||||
}
|
||||
.d2h-wrapper {
|
||||
text-align: left;
|
||||
border-radius: 0.25em;
|
||||
overflow: auto;
|
||||
}
|
||||
.d2h-file-header.d2h-file-header {
|
||||
background-color: var(--background-secondary);
|
||||
border-bottom: 1px solid var(--background-modifier-border);
|
||||
font-family:
|
||||
Source Sans Pro,
|
||||
Helvetica Neue,
|
||||
Helvetica,
|
||||
Arial,
|
||||
sans-serif;
|
||||
height: 35px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.d2h-file-header,
|
||||
.d2h-file-stats {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
.d2h-file-header {
|
||||
display: none;
|
||||
}
|
||||
.d2h-file-stats {
|
||||
font-size: 14px;
|
||||
margin-left: auto;
|
||||
}
|
||||
.d2h-lines-added {
|
||||
border: 1px solid var(--color-green);
|
||||
border-radius: 5px 0 0 5px;
|
||||
color: var(--color-green);
|
||||
padding: 2px;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.d2h-lines-deleted {
|
||||
border: 1px solid var(--color-red);
|
||||
border-radius: 0 5px 5px 0;
|
||||
color: var(--color-red);
|
||||
margin-left: 1px;
|
||||
padding: 2px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.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%;
|
||||
}
|
||||
.d2h-file-name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: var(--text-normal);
|
||||
font-size: var(--h5-size);
|
||||
}
|
||||
.d2h-file-wrapper {
|
||||
border: 1px solid var(--background-secondary-alt);
|
||||
border-radius: 3px;
|
||||
margin-bottom: 1em;
|
||||
max-height: 100%;
|
||||
}
|
||||
.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-secondary-alt);
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
font-size: 12px;
|
||||
justify-content: flex-end;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
.d2h-file-collapse.d2h-selected {
|
||||
background-color: var(--git-selected);
|
||||
}
|
||||
.d2h-file-collapse-input {
|
||||
margin: 0 4px 0 0;
|
||||
}
|
||||
.d2h-diff-table {
|
||||
border-collapse: collapse;
|
||||
font-family: var(--font-monospace);
|
||||
font-size: var(--code-size);
|
||||
width: 100%;
|
||||
}
|
||||
.d2h-files-diff {
|
||||
width: 100%;
|
||||
}
|
||||
.d2h-file-diff {
|
||||
/*
|
||||
overflow-y: scroll;
|
||||
*/
|
||||
border-radius: 5px;
|
||||
font-size: var(--font-text-size);
|
||||
line-height: var(--line-height-normal);
|
||||
}
|
||||
.d2h-file-side-diff {
|
||||
display: inline-block;
|
||||
margin-bottom: -8px;
|
||||
margin-right: -4px;
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
width: 50%;
|
||||
}
|
||||
.d2h-code-line {
|
||||
padding-left: 6em;
|
||||
padding-right: 1.5em;
|
||||
}
|
||||
.d2h-code-line,
|
||||
.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%;
|
||||
}
|
||||
.d2h-code-side-line {
|
||||
/* needed to be changed */
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
.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;
|
||||
width: 100%;
|
||||
/* only works for line-by-line */
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.d2h-code-line del,
|
||||
.d2h-code-side-line del {
|
||||
background-color: var(--git-delete-hl);
|
||||
color: var(--text-normal);
|
||||
}
|
||||
.d2h-code-line del,
|
||||
.d2h-code-line ins,
|
||||
.d2h-code-side-line del,
|
||||
.d2h-code-side-line ins {
|
||||
border-radius: 0.2em;
|
||||
display: inline-block;
|
||||
margin-top: -1px;
|
||||
text-decoration: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.d2h-code-line ins,
|
||||
.d2h-code-side-line ins {
|
||||
background-color: var(--git-insert-hl);
|
||||
text-align: left;
|
||||
}
|
||||
.d2h-code-line-prefix {
|
||||
word-wrap: normal;
|
||||
background: none;
|
||||
display: inline;
|
||||
padding: 0;
|
||||
white-space: pre;
|
||||
}
|
||||
.line-num1 {
|
||||
float: left;
|
||||
}
|
||||
.line-num1,
|
||||
.line-num2 {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
/*
|
||||
padding: 0 0.5em;
|
||||
*/
|
||||
text-overflow: ellipsis;
|
||||
width: 2.5em;
|
||||
padding-left: 0;
|
||||
}
|
||||
.line-num2 {
|
||||
float: right;
|
||||
}
|
||||
.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-faint);
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
text-align: right;
|
||||
width: 5.5em;
|
||||
}
|
||||
.d2h-code-linenumber:after {
|
||||
content: "\200b";
|
||||
}
|
||||
.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-faint);
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
padding: 0 0.5em;
|
||||
text-align: right;
|
||||
text-overflow: ellipsis;
|
||||
width: 4em;
|
||||
/* needed to be changed */
|
||||
display: table-cell;
|
||||
position: relative;
|
||||
}
|
||||
.d2h-code-side-linenumber:after {
|
||||
content: "\200b";
|
||||
}
|
||||
.d2h-code-side-emptyplaceholder,
|
||||
.d2h-emptyplaceholder {
|
||||
background-color: var(--background-primary);
|
||||
border-color: var(--background-modifier-border);
|
||||
}
|
||||
.d2h-code-line-prefix,
|
||||
.d2h-code-linenumber,
|
||||
.d2h-code-side-linenumber,
|
||||
.d2h-emptyplaceholder {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.d2h-code-linenumber,
|
||||
.d2h-code-side-linenumber {
|
||||
direction: rtl;
|
||||
}
|
||||
.d2h-del {
|
||||
background-color: var(--git-delete-bg);
|
||||
border-color: var(--git-delete-hl);
|
||||
}
|
||||
.d2h-ins {
|
||||
background-color: var(--git-insert-bg);
|
||||
border-color: var(--git-insert-hl);
|
||||
}
|
||||
.d2h-info {
|
||||
background-color: var(--background-primary);
|
||||
border-color: var(--background-modifier-border);
|
||||
color: var(--text-faint);
|
||||
}
|
||||
.d2h-del,
|
||||
.d2h-ins,
|
||||
.d2h-file-diff .d2h-change {
|
||||
color: var(--text-normal);
|
||||
}
|
||||
.d2h-file-diff .d2h-del.d2h-change {
|
||||
background-color: var(--git-change-bg);
|
||||
}
|
||||
.d2h-file-diff .d2h-ins.d2h-change {
|
||||
background-color: var(--git-insert-bg);
|
||||
}
|
||||
.d2h-file-list-wrapper {
|
||||
a {
|
||||
text-decoration: none;
|
||||
cursor: default;
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
|
||||
svg {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.d2h-file-list-header {
|
||||
text-align: left;
|
||||
}
|
||||
.d2h-file-list-title {
|
||||
display: none;
|
||||
}
|
||||
.d2h-file-list-line {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
text-align: left;
|
||||
}
|
||||
.d2h-file-list {
|
||||
}
|
||||
.d2h-file-list > li {
|
||||
border-bottom: 1px solid var(--background-modifier-border);
|
||||
margin: 0;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.d2h-file-list > li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.d2h-file-switch {
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
font-size: 10px;
|
||||
}
|
||||
.d2h-icon {
|
||||
fill: currentColor;
|
||||
margin-right: 10px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.d2h-deleted {
|
||||
color: var(--git-delete);
|
||||
}
|
||||
.d2h-added {
|
||||
color: var(--git-insert);
|
||||
}
|
||||
.d2h-changed {
|
||||
color: var(--git-change);
|
||||
}
|
||||
.d2h-moved {
|
||||
color: var(--git-move);
|
||||
}
|
||||
.d2h-tag {
|
||||
background-color: var(--background-secondary);
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
font-size: 10px;
|
||||
margin-left: 5px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.d2h-deleted-tag {
|
||||
border: 1px solid var(--git-delete);
|
||||
}
|
||||
.d2h-added-tag {
|
||||
border: 1px solid var(--git-insert);
|
||||
}
|
||||
.d2h-changed-tag {
|
||||
border: 1px solid var(--git-change);
|
||||
}
|
||||
.d2h-moved-tag {
|
||||
border: 1px solid var(--git-move);
|
||||
}
|
||||
|
||||
/* needed for line-by-line*/
|
||||
|
||||
.d2h-diff-tbody {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
/* ====================== Line Authoring Information ====================== */
|
||||
|
||||
.cm-gutterElement.obs-git-blame-gutter {
|
||||
/* Add background color to spacing inbetween and around the gutter for better aesthetics */
|
||||
border-width: 0px 2px 0.2px 2px;
|
||||
border-style: solid;
|
||||
border-color: var(--background-secondary);
|
||||
background-color: var(--background-secondary);
|
||||
}
|
||||
|
||||
.cm-gutterElement.obs-git-blame-gutter > div,
|
||||
.line-author-settings-preview {
|
||||
/* delegate text color to settings */
|
||||
color: var(--obs-git-gutter-text);
|
||||
font-family: monospace;
|
||||
height: 100%; /* ensure, that age-based background color occupies entire parent */
|
||||
text-align: right;
|
||||
padding: 0px 6px 0px 6px;
|
||||
white-space: pre; /* Keep spaces and do not collapse them. */
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
/* hide git blame gutter not to superpose text */
|
||||
.cm-gutterElement.obs-git-blame-gutter {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.git-unified-diff-view,
|
||||
.git-split-diff-view .cm-deletedLine .cm-changedText {
|
||||
background-color: #ee443330;
|
||||
}
|
||||
|
||||
.git-unified-diff-view,
|
||||
.git-split-diff-view .cm-insertedLine .cm-changedText {
|
||||
background-color: #22bb2230;
|
||||
}
|
||||
|
||||
.git-obscure-prompt[git-is-obscured="true"] #git-show-password:after {
|
||||
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-eye"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"></path><circle cx="12" cy="12" r="3"></circle></svg>');
|
||||
}
|
||||
|
||||
.git-obscure-prompt[git-is-obscured="false"] #git-show-password:after {
|
||||
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-eye-off"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"></path><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"></path><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"></path><path d="m2 2 20 20"></path></svg>');
|
||||
}
|
||||
|
||||
/* Override styling of Codemirror merge view "collapsed lines" indicator */
|
||||
.git-split-diff-view .ͼ2 .cm-collapsedLines {
|
||||
background: var(--interactive-normal);
|
||||
border-radius: var(--radius-m);
|
||||
color: var(--text-accent);
|
||||
font-size: var(--font-small);
|
||||
padding: var(--size-4-1) var(--size-4-1);
|
||||
}
|
||||
.git-split-diff-view .ͼ2 .cm-collapsedLines:hover {
|
||||
background: var(--interactive-hover);
|
||||
color: var(--text-accent-hover);
|
||||
}
|
||||
|
||||
.git-signs-gutter {
|
||||
.cm-gutterElement {
|
||||
display: grid;
|
||||
}
|
||||
}
|
||||
|
||||
.git-gutter-marker:hover {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-add {
|
||||
background-color: var(--color-green);
|
||||
justify-self: center;
|
||||
height: inherit;
|
||||
width: 0.2rem;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-change {
|
||||
background-color: var(--color-yellow);
|
||||
justify-self: center;
|
||||
height: inherit;
|
||||
width: 0.2rem;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-changedelete {
|
||||
color: var(--color-yellow);
|
||||
font-weight: var(--font-bold);
|
||||
font-size: 1rem;
|
||||
justify-self: center;
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-delete {
|
||||
background-color: var(--color-red);
|
||||
height: 0.2rem;
|
||||
width: 0.8rem;
|
||||
align-self: end;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-topdelete {
|
||||
background-color: var(--color-red);
|
||||
height: 0.2rem;
|
||||
width: 0.8rem;
|
||||
align-self: start;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-change {
|
||||
width: 0.6rem;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-add {
|
||||
width: 0.6rem;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-delete {
|
||||
height: 0.6rem;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-topdelete {
|
||||
height: 0.6rem;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-changedelete {
|
||||
font-weight: var(--font-bold);
|
||||
}
|
||||
|
||||
.git-gutter-marker.staged {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.git-diff {
|
||||
.cm-merge-revert {
|
||||
width: 4em;
|
||||
}
|
||||
/* Ensure that merge revert markers are positioned correctly */
|
||||
.cm-merge-revert > * {
|
||||
position: absolute;
|
||||
background-color: var(--background-secondary);
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
/* Prevent shifting of the editor when git signs gutter is the only gutter present */
|
||||
.cm-gutters.cm-gutters-before:has(> .git-signs-gutter:only-child) {
|
||||
margin-inline-end: 0;
|
||||
.git-signs-gutter {
|
||||
margin-inline-start: -1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.git-changes-status-bar-colored {
|
||||
.git-add {
|
||||
color: var(--color-green);
|
||||
}
|
||||
.git-change {
|
||||
color: var(--color-yellow);
|
||||
}
|
||||
.git-delete {
|
||||
color: var(--color-red);
|
||||
}
|
||||
}
|
||||
|
||||
.git-changes-status-bar .git-add {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
|
||||
.git-changes-status-bar .git-change {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"id": "obsidian-hover-editor",
|
||||
"name": "Hover Editor",
|
||||
"version": "0.11.29",
|
||||
"minAppVersion": "1.10.6",
|
||||
"description": "Transform the Page Preview hover popover into a floating tab",
|
||||
"author": "NothingIsLost",
|
||||
"authorUrl": "https://github.com/nothingislost",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
|
|
@ -0,0 +1,582 @@
|
|||
/* @settings
|
||||
|
||||
name: Hover Editor
|
||||
id: hover-editor
|
||||
settings:
|
||||
-
|
||||
id: titlebar-heading
|
||||
title: Title bar
|
||||
type: heading
|
||||
level: 1
|
||||
collapsed: true
|
||||
-
|
||||
id: titlebar-heading
|
||||
title: Title bar background/foreground
|
||||
type: heading
|
||||
level: 2
|
||||
collapsed: true
|
||||
-
|
||||
id: he-title-bar-active-bg
|
||||
title: Active unpinned title bar background color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: he-title-bar-inactive-bg
|
||||
title: Inactive unpinned title bar background color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: he-title-bar-active-pinned-bg
|
||||
title: Active pinned title bar background color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: he-title-bar-inactive-pinned-bg
|
||||
title: Inactive pinned title bar background color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: he-title-bar-active-fg
|
||||
title: Active title bar foreground color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: he-title-bar-inactive-fg
|
||||
title: Inactive title bar foreground color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: titlebar-action-heading
|
||||
title: Title bar icons
|
||||
type: heading
|
||||
level: 2
|
||||
collapsed: true
|
||||
-
|
||||
id: he-title-bar-inactive-action
|
||||
title: Title bar inactive icon color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: he-title-bar-active-action
|
||||
title: Titlebar active icon color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: titlebar-text-heading
|
||||
title: Title bar text
|
||||
type: heading
|
||||
level: 2
|
||||
collapsed: true
|
||||
-
|
||||
id: he-title-bar-font-size
|
||||
title: Title bar Font size
|
||||
type: variable-text
|
||||
description: Accepts any CSS font-size value
|
||||
default: 15px
|
||||
-
|
||||
id: titlebar-height-heading
|
||||
title: Title bar height
|
||||
type: heading
|
||||
level: 2
|
||||
collapsed: true
|
||||
-
|
||||
id: he-title-bar-height
|
||||
title: Title bar height
|
||||
type: variable-text
|
||||
description: Accepts any CSS font-size value
|
||||
default: 28px
|
||||
*/
|
||||
|
||||
:root {
|
||||
/* general styling */
|
||||
--he-popover-opacity-while-dragging: 0.8;
|
||||
--he-popover-border-radius: 6px;
|
||||
--he-popover-header-transition-speed: 0.3s;
|
||||
--he-popover-snap-to-edge-transition-speed: 0.3s;
|
||||
/* resize handle sizing */
|
||||
--he-resize-handle-side-size: 12px;
|
||||
--he-resize-handle-corner-size: 18px;
|
||||
/* view header height */
|
||||
--he-view-header-height: 36px;
|
||||
}
|
||||
|
||||
body {
|
||||
--he-text-on-accent-inactive: var(--text-on-accent); /* couldn't find a good variable that worked across themes */
|
||||
--he-text-on-accent-active: #fff;
|
||||
/* z-index layer settings, probably not a good idea to mess with these */
|
||||
--he-popover-layer-inactive: calc(var(--layer-slides) - 4);
|
||||
--he-popover-layer-active: calc(var(--he-popover-layer-inactive) + 1);
|
||||
--he-popover-layer-new: calc(var(--he-popover-layer-inactive) + 2);
|
||||
--he-leaf-drag-overlay: calc(var(--he-popover-layer-inactive) + 3);
|
||||
/* calculated variables, do not modify */
|
||||
--he-resize-handle-side-offset: calc((var(--he-resize-handle-side-size) - 3px) * -1);
|
||||
--he-resize-handle-corner-offset: calc((var(--he-resize-handle-corner-size) / 2) * -1);
|
||||
--he-resize-handle-side-length: calc(100% - var(--he-resize-handle-corner-size));
|
||||
/* title bar colors */
|
||||
--he-title-bar-active-bg: var(--interactive-accent);
|
||||
--he-title-bar-inactive-bg: #777777;
|
||||
--he-title-bar-inactive-pinned-bg: #777777;
|
||||
--he-title-bar-active-pinned-bg: var(--interactive-accent);
|
||||
|
||||
--he-title-bar-active-fg: var(--he-text-on-accent-active);
|
||||
--he-title-bar-inactive-fg: var(--he-text-on-accent-inactive);
|
||||
/* title bar action/icon colors */
|
||||
--he-title-bar-inactive-action: var(--he-text-on-accent-inactive);
|
||||
--he-title-bar-active-action: var(--he-text-on-accent-active);
|
||||
/* titlebar sizing */
|
||||
--he-title-bar-height: 28px;
|
||||
--he-title-bar-font-size: 15px;
|
||||
}
|
||||
|
||||
.popover.hover-editor .workspace-leaf,
|
||||
.popover.hover-editor .workspace-split {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*
|
||||
Obsidian 1.6 sets a different background for non-root splits,
|
||||
then uses primary as an override at root. Since hover editors
|
||||
don't live in a root split, we have to copy the override:
|
||||
*/
|
||||
.popover.hover-editor .workspace-split .view-content {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
|
||||
.popover.hover-editor {
|
||||
min-height: unset;
|
||||
max-height: unset;
|
||||
/* touch action none fixes dragging and resizing on mobile */
|
||||
touch-action: none;
|
||||
/* this is set to allow the drag/resize handles to overflow the popover frame */
|
||||
overflow: visible;
|
||||
border: none;
|
||||
padding: 0;
|
||||
z-index: var(--he-popover-layer-inactive);
|
||||
border-radius: var(--he-popover-border-radius);
|
||||
|
||||
/* Prevent snagging on titlebar */
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
||||
.popover.hover-editor .markdown-preview-view {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-active {
|
||||
z-index: var(--he-popover-layer-active);
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-new {
|
||||
z-index: var(--he-popover-layer-new);
|
||||
}
|
||||
|
||||
/* Drag/link overlay needs to overlay popups */
|
||||
.workspace-fake-target-overlay,
|
||||
.workspace-drop-overlay {
|
||||
z-index: var(--he-leaf-drag-overlay);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle {
|
||||
position: absolute;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.top {
|
||||
top: var(--he-resize-handle-side-offset);
|
||||
height: var(--he-resize-handle-side-size);
|
||||
left: calc(var(--he-resize-handle-corner-offset) * -1);
|
||||
width: var(--he-resize-handle-side-length);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.left {
|
||||
height: var(--he-resize-handle-side-length);
|
||||
left: var(--he-resize-handle-side-offset);
|
||||
top: calc(var(--he-resize-handle-corner-offset) * -1);
|
||||
width: var(--he-resize-handle-side-size);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.right {
|
||||
height: var(--he-resize-handle-side-length);
|
||||
right: var(--he-resize-handle-side-offset);
|
||||
top: calc(var(--he-resize-handle-corner-offset) * -1);
|
||||
width: var(--he-resize-handle-side-size);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.bottom {
|
||||
bottom: var(--he-resize-handle-side-offset);
|
||||
height: var(--he-resize-handle-side-size);
|
||||
left: calc(var(--he-resize-handle-corner-offset) * -1);
|
||||
width: var(--he-resize-handle-side-length);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.bottom-left {
|
||||
bottom: var(--he-resize-handle-corner-offset);
|
||||
height: var(--he-resize-handle-corner-size);
|
||||
left: var(--he-resize-handle-corner-offset);
|
||||
width: var(--he-resize-handle-corner-size);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.bottom-right {
|
||||
bottom: var(--he-resize-handle-corner-offset);
|
||||
height: var(--he-resize-handle-corner-size);
|
||||
right: var(--he-resize-handle-corner-offset);
|
||||
width: var(--he-resize-handle-corner-size);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.top-left {
|
||||
top: var(--he-resize-handle-corner-offset);
|
||||
height: var(--he-resize-handle-corner-size);
|
||||
left: var(--he-resize-handle-corner-offset);
|
||||
width: var(--he-resize-handle-corner-size);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.top-right {
|
||||
top: var(--he-resize-handle-corner-offset);
|
||||
height: var(--he-resize-handle-corner-size);
|
||||
right: var(--he-resize-handle-corner-offset);
|
||||
width: var(--he-resize-handle-corner-size);
|
||||
}
|
||||
|
||||
/* body.is-dragging-popover .tooltip {
|
||||
opacity: 0;
|
||||
} */
|
||||
|
||||
.popover-header-icon {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.mod-pin-popover > svg {
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.mod-pin-popover.is-active > svg {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.popover-action,
|
||||
.popover-header-icon {
|
||||
margin: 0 8px;
|
||||
cursor: pointer;
|
||||
color: var(--he-title-bar-inactive-action);
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.popover-action.is-active,
|
||||
.mod-pin-popover.is-active {
|
||||
color: var(--he-title-bar-active-action);
|
||||
}
|
||||
|
||||
.popover-action:hover,
|
||||
.popover-header-icon:hover {
|
||||
color: var(--he-title-bar-active-action);
|
||||
}
|
||||
|
||||
.popover-action.is-active svg,
|
||||
.mod-pin-popover.is-active svg {
|
||||
}
|
||||
|
||||
.mod-pin-popover.is-active > svg {
|
||||
transform: unset;
|
||||
}
|
||||
|
||||
.popover.hover-editor .workspace-leaf-content[data-type="empty"] .view-header {
|
||||
/* ensures that minimal theme doesn't hide the popover header */
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.popover.hover-editor .workspace-split > .workspace-leaf:last-child > .workspace-leaf-resize-handle {
|
||||
/* this hides the leaf resize handles that touch the edge of the popover */
|
||||
/* without this the leaf resize handles conflict with the popover resize handles */
|
||||
display: none;
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-dragging {
|
||||
opacity: var(--he-popover-opacity-while-dragging);
|
||||
}
|
||||
|
||||
.popover.hover-editor:is(.snap-to-viewport, .snap-to-left, .snap-to-right) .resize-handle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.popover.hover-editor.snap-to-right .resize-handle.left,
|
||||
.popover.hover-editor.snap-to-left .resize-handle.right {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-dragging.snap-to-left,
|
||||
.popover.hover-editor.is-dragging.snap-to-right,
|
||||
.popover.hover-editor.is-dragging.snap-to-viewport {
|
||||
transition: width var(--he-popover-snap-to-edge-transition-speed),
|
||||
height var(--he-popover-snap-to-edge-transition-speed), top var(--he-popover-snap-to-edge-transition-speed),
|
||||
left var(--he-popover-snap-to-edge-transition-speed);
|
||||
}
|
||||
|
||||
.hover-popover.is-dragging.snap-to-left::after,
|
||||
.hover-popover.is-dragging.snap-to-right::after,
|
||||
.hover-popover.is-dragging.snap-to-viewport::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
border-radius: var(--he-popover-border-radius);
|
||||
box-shadow: inset 0px 0px 0px 4px var(--interactive-accent);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.popover.hover-editor.snap-to-left {
|
||||
max-height: unset !important;
|
||||
}
|
||||
|
||||
.popover.hover-editor.snap-to-right {
|
||||
right: 0 !important;
|
||||
max-height: unset !important;
|
||||
}
|
||||
|
||||
.popover.hover-editor.snap-to-viewport {
|
||||
max-height: unset !important;
|
||||
max-width: unset !important;
|
||||
}
|
||||
|
||||
.popover.hover-editor .popover-titlebar {
|
||||
display: flex;
|
||||
height: var(--he-title-bar-height);
|
||||
width: 100%;
|
||||
background-color: var(--he-title-bar-inactive-bg);
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-active .popover-titlebar {
|
||||
background-color: var(--he-title-bar-active-bg);
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-pinned.is-pinned .popover-titlebar {
|
||||
background-color: var(--he-title-bar-inactive-pinned-bg);
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-pinned.is-pinned.is-active .popover-titlebar {
|
||||
background-color: var(--he-title-bar-active-pinned-bg);
|
||||
}
|
||||
|
||||
.popover.hover-editor .popover-titlebar .popover-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.popover.hover-editor > .popover-content {
|
||||
margin: 0;
|
||||
border-radius: var(--he-popover-border-radius);
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.popover.hover-popover.hover-editor .pdf-toolbar:not(.pdf-findbar.mod-hidden) {
|
||||
/* Show PDF toolbar in hover editor */
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.popover.hover-editor .popover-titlebar .popover-title {
|
||||
display: block;
|
||||
flex-grow: 1;
|
||||
transition: all 0.3s;
|
||||
align-self: center;
|
||||
font-size: var(--he-title-bar-font-size);
|
||||
font-weight: 500;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
color: var(--he-title-bar-inactive-fg);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-active .popover-title {
|
||||
color: var(--he-title-bar-active-fg);
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-active .popover-title:after {
|
||||
background: linear-gradient(to right, transparent, var(--he-title-bar-active-bg));
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-pinned.is-pinned.is-active .popover-title:after {
|
||||
background: linear-gradient(to right, transparent, var(--he-title-bar-active-pinned-bg));
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-pinned.is-pinned .popover-title:after {
|
||||
background: linear-gradient(to right, transparent, var(--he-title-bar-inactive-pinned-bg));
|
||||
}
|
||||
|
||||
.popover.hover-editor .popover-title:after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 30px;
|
||||
height: 100%;
|
||||
background: linear-gradient(to right, transparent, var(--he-title-bar-inactive-bg));
|
||||
}
|
||||
|
||||
.popover.hover-editor .mod-show-navbar svg {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.popover.hover-editor > .popover-content > .workspace-split {
|
||||
height: calc(100% - var(--he-title-bar-height));
|
||||
}
|
||||
|
||||
.popover.hover-editor .view-header {
|
||||
border-top: none;
|
||||
transition: all var(--he-popover-header-transition-speed);
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Restore 1.5.x view header icons */
|
||||
.view-header .view-header-icon {
|
||||
display: none;
|
||||
padding: var(--size-2-2);
|
||||
margin-right: var(--size-2-3);
|
||||
color: var(--text-muted);
|
||||
align-self: center;
|
||||
cursor: grab;
|
||||
}
|
||||
.view-header .view-header-icon:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.popover.hover-editor .view-header .view-header-icon {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.popover.hover-editor.show-navbar:not(.is-minimized) .popover-title {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.popover.hover-editor:not(.show-navbar) .view-header {
|
||||
height: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.popover.hover-editor.show-navbar .view-header {
|
||||
/* theme devs: if you want to change the header height, you must do so by setting the --he-view-header-height variable */
|
||||
/* if you don't use the variable, you will break internal measurement logic */
|
||||
height: var(--he-view-header-height);
|
||||
overflow: unset;
|
||||
}
|
||||
|
||||
.popover.hover-editor:not(.show-navbar) .view-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.popover.hover-editor .workspace-leaf-content[data-type="image"] .view-content {
|
||||
padding: 0;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.popover.hover-editor .workspace-leaf-content[data-type="image"] img {
|
||||
display: block;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
max-width: unset;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
body .popover.hover-editor .view-content {
|
||||
/* theme devs: if you want to change the header height, you must do so by setting the --he-view-header-height variable */
|
||||
/* if you don't use the variable, you will break internal measurement logic */
|
||||
height: calc(100% - var(--he-view-header-height));
|
||||
}
|
||||
|
||||
/* start: zoomable images feature */
|
||||
|
||||
.popover.hover-editor.image-zoom .view-content .image-embed:active {
|
||||
aspect-ratio: unset;
|
||||
cursor: zoom-out;
|
||||
display: block;
|
||||
z-index: 200;
|
||||
position: fixed;
|
||||
max-height: calc(100% + 1px);
|
||||
max-width: 100%;
|
||||
height: calc(100% + 1px);
|
||||
width: 100%;
|
||||
object-fit: contain;
|
||||
margin: -0.5px auto 0;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
max-width: unset;
|
||||
}
|
||||
|
||||
/* extra specificity to override some community theme styles that cause issues */
|
||||
.popover.hover-editor.image-zoom .view-content .image-embed img:active {
|
||||
top: 50%;
|
||||
z-index: 99;
|
||||
transform: translateY(-50%);
|
||||
padding: 0;
|
||||
margin: 0 auto;
|
||||
width: calc(100% - 20px);
|
||||
height: unset;
|
||||
max-height: 95vh;
|
||||
object-fit: contain;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
opacity: 1;
|
||||
max-width: unset;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.popover.hover-editor.image-zoom .view-content .image-embed:active:after {
|
||||
background-color: var(--background-primary);
|
||||
opacity: 0.9;
|
||||
content: " ";
|
||||
height: calc(100% + 1px);
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 1px;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.popover.hover-editor.image-zoom .view-content img {
|
||||
cursor: zoom-in;
|
||||
}
|
||||
|
||||
/* extra specificity to override some community theme styles that cause issues */
|
||||
.popover.hover-editor.image-zoom .workspace-leaf-content[data-type="image"] img {
|
||||
cursor: zoom-in;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
object-fit: contain;
|
||||
height: unset;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
opacity: 1;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
/* end: zoomable images feature */
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"id": "obsidian-image-auto-upload-plugin",
|
||||
"name": "Image auto upload",
|
||||
"version": "4.1.0",
|
||||
"minAppVersion": "0.10.7",
|
||||
"description": "This plugin uploads images from your clipboard by PicGo",
|
||||
"author": "renmu",
|
||||
"authorUrl": "https://github.com/renmu123/obsidian-image-auto-upload-plugin",
|
||||
"isDesktopOnly": true,
|
||||
"fundingUrl": "https://afdian.com/a/renmu123"
|
||||
}
|
||||
|
|
@ -0,0 +1,944 @@
|
|||
/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD */
|
||||
var __defProp = Object.defineProperty;
|
||||
var __defProps = Object.defineProperties;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols)
|
||||
for (var prop of __getOwnPropSymbols(b)) {
|
||||
if (__propIsEnum.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
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);
|
||||
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());
|
||||
});
|
||||
};
|
||||
|
||||
// package.json
|
||||
var require_package = __commonJS({
|
||||
"package.json"(exports, module2) {
|
||||
module2.exports = {
|
||||
name: "obsidian-paste-image-rename",
|
||||
version: "1.6.1",
|
||||
main: "main.js",
|
||||
scripts: {
|
||||
start: "node esbuild.config.mjs",
|
||||
build: "tsc -noEmit -skipLibCheck && BUILD_ENV=production node esbuild.config.mjs && cp manifest.json build",
|
||||
version: "node version-bump.mjs && git add manifest.json versions.json",
|
||||
release: "npm run build && gh release create ${npm_package_version} build/*"
|
||||
},
|
||||
keywords: [],
|
||||
author: "Reorx",
|
||||
license: "MIT",
|
||||
devDependencies: {
|
||||
"@types/node": "^18.11.18",
|
||||
"@typescript-eslint/eslint-plugin": "^5.49.0",
|
||||
"@typescript-eslint/parser": "^5.49.0",
|
||||
"builtin-modules": "^3.3.0",
|
||||
esbuild: "0.16.17",
|
||||
obsidian: "^1.1.1",
|
||||
tslib: "2.5.0",
|
||||
typescript: "4.9.4"
|
||||
},
|
||||
dependencies: {
|
||||
"cash-dom": "^8.1.2"
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// src/main.ts
|
||||
var main_exports = {};
|
||||
__export(main_exports, {
|
||||
default: () => PasteImageRenamePlugin
|
||||
});
|
||||
module.exports = __toCommonJS(main_exports);
|
||||
var import_obsidian2 = require("obsidian");
|
||||
|
||||
// src/batch.ts
|
||||
var import_obsidian = require("obsidian");
|
||||
|
||||
// src/utils.ts
|
||||
var DEBUG = false;
|
||||
if (DEBUG)
|
||||
console.log("DEBUG is enabled");
|
||||
function debugLog(...args) {
|
||||
if (DEBUG) {
|
||||
console.log(new Date().toISOString().slice(11, 23), ...args);
|
||||
}
|
||||
}
|
||||
function createElementTree(rootEl, opts) {
|
||||
const result = {
|
||||
el: rootEl.createEl(opts.tag, opts),
|
||||
children: []
|
||||
};
|
||||
const children = opts.children || [];
|
||||
for (const child of children) {
|
||||
result.children.push(createElementTree(result.el, child));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
var path = {
|
||||
// Credit: @creationix/path.js
|
||||
join(...partSegments) {
|
||||
let parts = [];
|
||||
for (let i = 0, l = partSegments.length; i < l; i++) {
|
||||
parts = parts.concat(partSegments[i].split("/"));
|
||||
}
|
||||
const newParts = [];
|
||||
for (let i = 0, l = parts.length; i < l; i++) {
|
||||
const part = parts[i];
|
||||
if (!part || part === ".")
|
||||
continue;
|
||||
else
|
||||
newParts.push(part);
|
||||
}
|
||||
if (parts[0] === "")
|
||||
newParts.unshift("");
|
||||
return newParts.join("/");
|
||||
},
|
||||
// returns the last part of a path, e.g. 'foo.jpg'
|
||||
basename(fullpath) {
|
||||
const sp = fullpath.split("/");
|
||||
return sp[sp.length - 1];
|
||||
},
|
||||
// return extension without dot, e.g. 'jpg'
|
||||
extension(fullpath) {
|
||||
const positions = [...fullpath.matchAll(new RegExp("\\.", "gi"))].map((a) => a.index);
|
||||
return fullpath.slice(positions[positions.length - 1] + 1);
|
||||
}
|
||||
};
|
||||
var filenameNotAllowedChars = /[^\p{L}0-9~`!@$&*()\-_=+{};'",<.>? ]/ug;
|
||||
var sanitizer = {
|
||||
filename(s) {
|
||||
return s.replace(filenameNotAllowedChars, "").trim();
|
||||
},
|
||||
delimiter(s) {
|
||||
s = this.filename(s);
|
||||
if (!s)
|
||||
s = "-";
|
||||
return s;
|
||||
}
|
||||
};
|
||||
function escapeRegExp(s) {
|
||||
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
}
|
||||
function lockInputMethodComposition(el) {
|
||||
const state = {
|
||||
lock: false
|
||||
};
|
||||
el.addEventListener("compositionstart", () => {
|
||||
state.lock = true;
|
||||
});
|
||||
el.addEventListener("compositionend", () => {
|
||||
state.lock = false;
|
||||
});
|
||||
return state;
|
||||
}
|
||||
|
||||
// src/batch.ts
|
||||
var ImageBatchRenameModal = class extends import_obsidian.Modal {
|
||||
constructor(app, activeFile, renameFunc, onClose) {
|
||||
super(app);
|
||||
this.activeFile = activeFile;
|
||||
this.renameFunc = renameFunc;
|
||||
this.onCloseExtra = onClose;
|
||||
this.state = {
|
||||
namePattern: "",
|
||||
extPattern: "",
|
||||
nameReplace: "",
|
||||
renameTasks: []
|
||||
};
|
||||
}
|
||||
onOpen() {
|
||||
this.containerEl.addClass("image-rename-modal");
|
||||
const { contentEl, titleEl } = this;
|
||||
titleEl.setText("Batch rename embeded files");
|
||||
const namePatternSetting = new import_obsidian.Setting(contentEl).setName("Name pattern").setDesc("Please input the name pattern to match files (regex)").addText((text) => text.setValue(this.state.namePattern).onChange(
|
||||
(value) => __async(this, null, function* () {
|
||||
this.state.namePattern = value;
|
||||
})
|
||||
));
|
||||
const npInputEl = namePatternSetting.controlEl.children[0];
|
||||
npInputEl.focus();
|
||||
const npInputState = lockInputMethodComposition(npInputEl);
|
||||
npInputEl.addEventListener("keydown", (e) => __async(this, null, function* () {
|
||||
if (e.key === "Enter" && !npInputState.lock) {
|
||||
e.preventDefault();
|
||||
if (!this.state.namePattern) {
|
||||
errorEl.innerText = 'Error: "Name pattern" could not be empty';
|
||||
errorEl.style.display = "block";
|
||||
return;
|
||||
}
|
||||
this.matchImageNames(tbodyEl);
|
||||
}
|
||||
}));
|
||||
const extPatternSetting = new import_obsidian.Setting(contentEl).setName("Extension pattern").setDesc("Please input the extension pattern to match files (regex)").addText((text) => text.setValue(this.state.extPattern).onChange(
|
||||
(value) => __async(this, null, function* () {
|
||||
this.state.extPattern = value;
|
||||
})
|
||||
));
|
||||
const extInputEl = extPatternSetting.controlEl.children[0];
|
||||
extInputEl.addEventListener("keydown", (e) => __async(this, null, function* () {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
this.matchImageNames(tbodyEl);
|
||||
}
|
||||
}));
|
||||
const nameReplaceSetting = new import_obsidian.Setting(contentEl).setName("Name replace").setDesc("Please input the string to replace the matched name (use $1, $2 for regex groups)").addText((text) => text.setValue(this.state.nameReplace).onChange(
|
||||
(value) => __async(this, null, function* () {
|
||||
this.state.nameReplace = value;
|
||||
})
|
||||
));
|
||||
const nrInputEl = nameReplaceSetting.controlEl.children[0];
|
||||
const nrInputState = lockInputMethodComposition(nrInputEl);
|
||||
nrInputEl.addEventListener("keydown", (e) => __async(this, null, function* () {
|
||||
if (e.key === "Enter" && !nrInputState.lock) {
|
||||
e.preventDefault();
|
||||
this.matchImageNames(tbodyEl);
|
||||
}
|
||||
}));
|
||||
const matchedContainer = contentEl.createDiv({
|
||||
cls: "matched-container"
|
||||
});
|
||||
const tableET = createElementTree(matchedContainer, {
|
||||
tag: "table",
|
||||
children: [
|
||||
{
|
||||
tag: "thead",
|
||||
children: [
|
||||
{
|
||||
tag: "tr",
|
||||
children: [
|
||||
{
|
||||
tag: "td",
|
||||
text: "Original path"
|
||||
},
|
||||
{
|
||||
tag: "td",
|
||||
text: "Renamed Name"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
tag: "tbody"
|
||||
}
|
||||
]
|
||||
});
|
||||
const tbodyEl = tableET.children[1].el;
|
||||
const errorEl = contentEl.createDiv({
|
||||
cls: "error",
|
||||
attr: {
|
||||
style: "display: none;"
|
||||
}
|
||||
});
|
||||
new import_obsidian.Setting(contentEl).addButton((button) => {
|
||||
button.setButtonText("Rename all").setClass("mod-cta").onClick(() => {
|
||||
new ConfirmModal(
|
||||
this.app,
|
||||
"Confirm rename all",
|
||||
`Are you sure? This will rename all the ${this.state.renameTasks.length} images matched the pattern.`,
|
||||
() => {
|
||||
this.renameAll();
|
||||
this.close();
|
||||
}
|
||||
).open();
|
||||
});
|
||||
}).addButton((button) => {
|
||||
button.setButtonText("Cancel").onClick(() => {
|
||||
this.close();
|
||||
});
|
||||
});
|
||||
}
|
||||
onClose() {
|
||||
const { contentEl } = this;
|
||||
contentEl.empty();
|
||||
this.onCloseExtra();
|
||||
}
|
||||
renameAll() {
|
||||
return __async(this, null, function* () {
|
||||
debugLog("renameAll", this.state);
|
||||
for (const task of this.state.renameTasks) {
|
||||
yield this.renameFunc(task.file, task.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
matchImageNames(tbodyEl) {
|
||||
const { state } = this;
|
||||
const renameTasks = [];
|
||||
tbodyEl.empty();
|
||||
const fileCache = this.app.metadataCache.getFileCache(this.activeFile);
|
||||
if (!fileCache || !fileCache.embeds)
|
||||
return;
|
||||
const namePatternRegex = new RegExp(state.namePattern, "g");
|
||||
const extPatternRegex = new RegExp(state.extPattern);
|
||||
fileCache.embeds.forEach((embed) => {
|
||||
const file = this.app.metadataCache.getFirstLinkpathDest(embed.link, this.activeFile.path);
|
||||
if (!file) {
|
||||
console.warn("file not found", embed.link);
|
||||
return;
|
||||
}
|
||||
if (state.extPattern) {
|
||||
const m0 = extPatternRegex.exec(file.extension);
|
||||
if (!m0)
|
||||
return;
|
||||
}
|
||||
const stem = file.basename;
|
||||
namePatternRegex.lastIndex = 0;
|
||||
const m1 = namePatternRegex.exec(stem);
|
||||
if (!m1)
|
||||
return;
|
||||
let renamedName = file.name;
|
||||
if (state.nameReplace) {
|
||||
namePatternRegex.lastIndex = 0;
|
||||
renamedName = stem.replace(namePatternRegex, state.nameReplace);
|
||||
renamedName = `${renamedName}.${file.extension}`;
|
||||
}
|
||||
renameTasks.push({
|
||||
file,
|
||||
name: renamedName
|
||||
});
|
||||
createElementTree(tbodyEl, {
|
||||
tag: "tr",
|
||||
children: [
|
||||
{
|
||||
tag: "td",
|
||||
children: [
|
||||
{
|
||||
tag: "span",
|
||||
text: file.name
|
||||
},
|
||||
{
|
||||
tag: "div",
|
||||
text: file.path,
|
||||
attr: {
|
||||
class: "file-path"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
tag: "td",
|
||||
children: [
|
||||
{
|
||||
tag: "span",
|
||||
text: renamedName
|
||||
},
|
||||
{
|
||||
tag: "div",
|
||||
text: path.join(file.parent.path, renamedName),
|
||||
attr: {
|
||||
class: "file-path"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
debugLog("new renameTasks", renameTasks);
|
||||
state.renameTasks = renameTasks;
|
||||
}
|
||||
};
|
||||
var ConfirmModal = class extends import_obsidian.Modal {
|
||||
constructor(app, title, message, onConfirm) {
|
||||
super(app);
|
||||
this.title = title;
|
||||
this.message = message;
|
||||
this.onConfirm = onConfirm;
|
||||
}
|
||||
onOpen() {
|
||||
const { contentEl, titleEl } = this;
|
||||
titleEl.setText(this.title);
|
||||
contentEl.createEl("p", {
|
||||
text: this.message
|
||||
});
|
||||
new import_obsidian.Setting(contentEl).addButton((button) => {
|
||||
button.setButtonText("Yes").setClass("mod-warning").onClick(() => {
|
||||
this.onConfirm();
|
||||
this.close();
|
||||
});
|
||||
}).addButton((button) => {
|
||||
button.setButtonText("No").onClick(() => {
|
||||
this.close();
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// src/template.ts
|
||||
var dateTmplRegex = /{{DATE:([^}]+)}}/gm;
|
||||
var frontmatterTmplRegex = /{{frontmatter:([^}]+)}}/gm;
|
||||
var replaceDateVar = (s, date) => {
|
||||
const m = dateTmplRegex.exec(s);
|
||||
if (!m)
|
||||
return s;
|
||||
return s.replace(m[0], date.format(m[1]));
|
||||
};
|
||||
var replaceFrontmatterVar = (s, frontmatter) => {
|
||||
if (!frontmatter)
|
||||
return s;
|
||||
const m = frontmatterTmplRegex.exec(s);
|
||||
if (!m)
|
||||
return s;
|
||||
return s.replace(m[0], frontmatter[m[1]] || "");
|
||||
};
|
||||
var renderTemplate = (tmpl, data, frontmatter) => {
|
||||
const now = window.moment();
|
||||
let text = tmpl;
|
||||
let newtext;
|
||||
while ((newtext = replaceDateVar(text, now)) != text) {
|
||||
text = newtext;
|
||||
}
|
||||
while ((newtext = replaceFrontmatterVar(text, frontmatter)) != text) {
|
||||
text = newtext;
|
||||
}
|
||||
text = text.replace(/{{imageNameKey}}/gm, data.imageNameKey).replace(/{{fileName}}/gm, data.fileName).replace(/{{dirName}}/gm, data.dirName).replace(/{{firstHeading}}/gm, data.firstHeading);
|
||||
return text;
|
||||
};
|
||||
|
||||
// src/main.ts
|
||||
var DEFAULT_SETTINGS = {
|
||||
imageNamePattern: "{{fileName}}",
|
||||
dupNumberAtStart: false,
|
||||
dupNumberDelimiter: "-",
|
||||
dupNumberAlways: false,
|
||||
autoRename: false,
|
||||
handleAllAttachments: false,
|
||||
excludeExtensionPattern: "",
|
||||
disableRenameNotice: false
|
||||
};
|
||||
var PASTED_IMAGE_PREFIX = "Pasted image ";
|
||||
var PasteImageRenamePlugin = class extends import_obsidian2.Plugin {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.modals = [];
|
||||
}
|
||||
onload() {
|
||||
return __async(this, null, function* () {
|
||||
const pkg = require_package();
|
||||
console.log(`Plugin loading: ${pkg.name} ${pkg.version} BUILD_ENV=${"production"}`);
|
||||
yield this.loadSettings();
|
||||
this.registerEvent(
|
||||
this.app.vault.on("create", (file) => {
|
||||
if (!(file instanceof import_obsidian2.TFile))
|
||||
return;
|
||||
const timeGapMs = new Date().getTime() - file.stat.ctime;
|
||||
if (timeGapMs > 1e3)
|
||||
return;
|
||||
if (isMarkdownFile(file))
|
||||
return;
|
||||
if (isPastedImage(file)) {
|
||||
debugLog("pasted image created", file);
|
||||
this.startRenameProcess(file, this.settings.autoRename);
|
||||
} else {
|
||||
if (this.settings.handleAllAttachments) {
|
||||
debugLog("handleAllAttachments for file", file);
|
||||
if (this.testExcludeExtension(file)) {
|
||||
debugLog("excluded file by ext", file);
|
||||
return;
|
||||
}
|
||||
this.startRenameProcess(file, this.settings.autoRename);
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
const startBatchRenameProcess = () => {
|
||||
this.openBatchRenameModal();
|
||||
};
|
||||
this.addCommand({
|
||||
id: "batch-rename-embeded-files",
|
||||
name: "Batch rename embeded files (in the current file)",
|
||||
callback: startBatchRenameProcess
|
||||
});
|
||||
if (DEBUG) {
|
||||
this.addRibbonIcon("wand-glyph", "Batch rename embeded files", startBatchRenameProcess);
|
||||
}
|
||||
const batchRenameAllImages = () => {
|
||||
this.batchRenameAllImages();
|
||||
};
|
||||
this.addCommand({
|
||||
id: "batch-rename-all-images",
|
||||
name: "Batch rename all images instantly (in the current file)",
|
||||
callback: batchRenameAllImages
|
||||
});
|
||||
if (DEBUG) {
|
||||
this.addRibbonIcon("wand-glyph", "Batch rename all images instantly (in the current file)", batchRenameAllImages);
|
||||
}
|
||||
this.addSettingTab(new SettingTab(this.app, this));
|
||||
});
|
||||
}
|
||||
startRenameProcess(file, autoRename = false) {
|
||||
return __async(this, null, function* () {
|
||||
const activeFile = this.getActiveFile();
|
||||
if (!activeFile) {
|
||||
new import_obsidian2.Notice("Error: No active file found.");
|
||||
return;
|
||||
}
|
||||
const { stem, newName, isMeaningful } = this.generateNewName(file, activeFile);
|
||||
debugLog("generated newName:", newName, isMeaningful);
|
||||
if (!isMeaningful || !autoRename) {
|
||||
this.openRenameModal(file, isMeaningful ? stem : "", activeFile.path);
|
||||
return;
|
||||
}
|
||||
this.renameFile(file, newName, activeFile.path, true);
|
||||
});
|
||||
}
|
||||
renameFile(file, inputNewName, sourcePath, replaceCurrentLine) {
|
||||
return __async(this, null, function* () {
|
||||
const { name: newName } = yield this.deduplicateNewName(inputNewName, file);
|
||||
debugLog("deduplicated newName:", newName);
|
||||
const originName = file.name;
|
||||
const linkText = this.app.fileManager.generateMarkdownLink(file, sourcePath);
|
||||
const newPath = path.join(file.parent.path, newName);
|
||||
try {
|
||||
yield this.app.fileManager.renameFile(file, newPath);
|
||||
} catch (err) {
|
||||
new import_obsidian2.Notice(`Failed to rename ${newName}: ${err}`);
|
||||
throw err;
|
||||
}
|
||||
if (!replaceCurrentLine) {
|
||||
return;
|
||||
}
|
||||
const newLinkText = this.app.fileManager.generateMarkdownLink(file, sourcePath);
|
||||
debugLog("replace text", linkText, newLinkText);
|
||||
const editor = this.getActiveEditor();
|
||||
if (!editor) {
|
||||
new import_obsidian2.Notice(`Failed to rename ${newName}: no active editor`);
|
||||
return;
|
||||
}
|
||||
const cursor = editor.getCursor();
|
||||
const line = editor.getLine(cursor.line);
|
||||
const replacedLine = line.replace(linkText, newLinkText);
|
||||
debugLog("current line -> replaced line", line, replacedLine);
|
||||
editor.transaction({
|
||||
changes: [
|
||||
{
|
||||
from: __spreadProps(__spreadValues({}, cursor), { ch: 0 }),
|
||||
to: __spreadProps(__spreadValues({}, cursor), { ch: line.length }),
|
||||
text: replacedLine
|
||||
}
|
||||
]
|
||||
});
|
||||
if (!this.settings.disableRenameNotice) {
|
||||
new import_obsidian2.Notice(`Renamed ${originName} to ${newName}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
openRenameModal(file, newName, sourcePath) {
|
||||
const modal = new ImageRenameModal(
|
||||
this.app,
|
||||
file,
|
||||
newName,
|
||||
(confirmedName) => {
|
||||
debugLog("confirmedName:", confirmedName);
|
||||
this.renameFile(file, confirmedName, sourcePath, true);
|
||||
},
|
||||
() => {
|
||||
this.modals.splice(this.modals.indexOf(modal), 1);
|
||||
}
|
||||
);
|
||||
this.modals.push(modal);
|
||||
modal.open();
|
||||
debugLog("modals count", this.modals.length);
|
||||
}
|
||||
openBatchRenameModal() {
|
||||
const activeFile = this.getActiveFile();
|
||||
const modal = new ImageBatchRenameModal(
|
||||
this.app,
|
||||
activeFile,
|
||||
(file, name) => __async(this, null, function* () {
|
||||
yield this.renameFile(file, name, activeFile.path);
|
||||
}),
|
||||
() => {
|
||||
this.modals.splice(this.modals.indexOf(modal), 1);
|
||||
}
|
||||
);
|
||||
this.modals.push(modal);
|
||||
modal.open();
|
||||
}
|
||||
batchRenameAllImages() {
|
||||
return __async(this, null, function* () {
|
||||
const activeFile = this.getActiveFile();
|
||||
const fileCache = this.app.metadataCache.getFileCache(activeFile);
|
||||
if (!fileCache || !fileCache.embeds)
|
||||
return;
|
||||
const extPatternRegex = /jpe?g|png|gif|tiff|webp/i;
|
||||
for (const embed of fileCache.embeds) {
|
||||
const file = this.app.metadataCache.getFirstLinkpathDest(embed.link, activeFile.path);
|
||||
if (!file) {
|
||||
console.warn("file not found", embed.link);
|
||||
return;
|
||||
}
|
||||
const m0 = extPatternRegex.exec(file.extension);
|
||||
if (!m0)
|
||||
return;
|
||||
const { newName, isMeaningful } = this.generateNewName(file, activeFile);
|
||||
debugLog("generated newName:", newName, isMeaningful);
|
||||
if (!isMeaningful) {
|
||||
new import_obsidian2.Notice("Failed to batch rename images: the generated name is not meaningful");
|
||||
break;
|
||||
}
|
||||
yield this.renameFile(file, newName, activeFile.path, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
// returns a new name for the input file, with extension
|
||||
generateNewName(file, activeFile) {
|
||||
let imageNameKey = "";
|
||||
let firstHeading = "";
|
||||
let frontmatter;
|
||||
const fileCache = this.app.metadataCache.getFileCache(activeFile);
|
||||
if (fileCache) {
|
||||
debugLog("frontmatter", fileCache.frontmatter);
|
||||
frontmatter = fileCache.frontmatter;
|
||||
imageNameKey = (frontmatter == null ? void 0 : frontmatter.imageNameKey) || "";
|
||||
firstHeading = getFirstHeading(fileCache.headings);
|
||||
} else {
|
||||
console.warn("could not get file cache from active file", activeFile.name);
|
||||
}
|
||||
const stem = renderTemplate(
|
||||
this.settings.imageNamePattern,
|
||||
{
|
||||
imageNameKey,
|
||||
fileName: activeFile.basename,
|
||||
dirName: activeFile.parent.name,
|
||||
firstHeading
|
||||
},
|
||||
frontmatter
|
||||
);
|
||||
const meaninglessRegex = new RegExp(`[${this.settings.dupNumberDelimiter}\\s]`, "gm");
|
||||
return {
|
||||
stem,
|
||||
newName: stem + "." + file.extension,
|
||||
isMeaningful: stem.replace(meaninglessRegex, "") !== ""
|
||||
};
|
||||
}
|
||||
// newName: foo.ext
|
||||
deduplicateNewName(newName, file) {
|
||||
return __async(this, null, function* () {
|
||||
const dir = file.parent.path;
|
||||
const listed = yield this.app.vault.adapter.list(dir);
|
||||
debugLog("sibling files", listed);
|
||||
const newNameExt = path.extension(newName), newNameStem = newName.slice(0, newName.length - newNameExt.length - 1), newNameStemEscaped = escapeRegExp(newNameStem), delimiter = this.settings.dupNumberDelimiter, delimiterEscaped = escapeRegExp(delimiter);
|
||||
let dupNameRegex;
|
||||
if (this.settings.dupNumberAtStart) {
|
||||
dupNameRegex = new RegExp(
|
||||
`^(?<number>\\d+)${delimiterEscaped}(?<name>${newNameStemEscaped})\\.${newNameExt}$`
|
||||
);
|
||||
} else {
|
||||
dupNameRegex = new RegExp(
|
||||
`^(?<name>${newNameStemEscaped})${delimiterEscaped}(?<number>\\d+)\\.${newNameExt}$`
|
||||
);
|
||||
}
|
||||
debugLog("dupNameRegex", dupNameRegex);
|
||||
const dupNameNumbers = [];
|
||||
let isNewNameExist = false;
|
||||
for (let sibling of listed.files) {
|
||||
sibling = path.basename(sibling);
|
||||
if (sibling == newName) {
|
||||
isNewNameExist = true;
|
||||
continue;
|
||||
}
|
||||
const m = dupNameRegex.exec(sibling);
|
||||
if (!m)
|
||||
continue;
|
||||
dupNameNumbers.push(parseInt(m.groups.number));
|
||||
}
|
||||
if (isNewNameExist || this.settings.dupNumberAlways) {
|
||||
const newNumber = dupNameNumbers.length > 0 ? Math.max(...dupNameNumbers) + 1 : 1;
|
||||
if (this.settings.dupNumberAtStart) {
|
||||
newName = `${newNumber}${delimiter}${newNameStem}.${newNameExt}`;
|
||||
} else {
|
||||
newName = `${newNameStem}${delimiter}${newNumber}.${newNameExt}`;
|
||||
}
|
||||
}
|
||||
return {
|
||||
name: newName,
|
||||
stem: newName.slice(0, newName.length - newNameExt.length - 1),
|
||||
extension: newNameExt
|
||||
};
|
||||
});
|
||||
}
|
||||
getActiveFile() {
|
||||
const view = this.app.workspace.getActiveViewOfType(import_obsidian2.MarkdownView);
|
||||
const file = view == null ? void 0 : view.file;
|
||||
debugLog("active file", file == null ? void 0 : file.path);
|
||||
return file;
|
||||
}
|
||||
getActiveEditor() {
|
||||
const view = this.app.workspace.getActiveViewOfType(import_obsidian2.MarkdownView);
|
||||
return view == null ? void 0 : view.editor;
|
||||
}
|
||||
onunload() {
|
||||
this.modals.map((modal) => modal.close());
|
||||
}
|
||||
testExcludeExtension(file) {
|
||||
const pattern = this.settings.excludeExtensionPattern;
|
||||
if (!pattern)
|
||||
return false;
|
||||
return new RegExp(pattern).test(file.extension);
|
||||
}
|
||||
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);
|
||||
});
|
||||
}
|
||||
};
|
||||
function getFirstHeading(headings) {
|
||||
if (headings && headings.length > 0) {
|
||||
for (const heading of headings) {
|
||||
if (heading.level === 1) {
|
||||
return heading.heading;
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
function isPastedImage(file) {
|
||||
if (file instanceof import_obsidian2.TFile) {
|
||||
if (file.name.startsWith(PASTED_IMAGE_PREFIX)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function isMarkdownFile(file) {
|
||||
if (file instanceof import_obsidian2.TFile) {
|
||||
if (file.extension === "md") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
var ImageRenameModal = class extends import_obsidian2.Modal {
|
||||
constructor(app, src, stem, renameFunc, onClose) {
|
||||
super(app);
|
||||
this.src = src;
|
||||
this.stem = stem;
|
||||
this.renameFunc = renameFunc;
|
||||
this.onCloseExtra = onClose;
|
||||
}
|
||||
onOpen() {
|
||||
this.containerEl.addClass("image-rename-modal");
|
||||
const { contentEl, titleEl } = this;
|
||||
titleEl.setText("Rename image");
|
||||
const imageContainer = contentEl.createDiv({
|
||||
cls: "image-container"
|
||||
});
|
||||
imageContainer.createEl("img", {
|
||||
attr: {
|
||||
src: this.app.vault.getResourcePath(this.src)
|
||||
}
|
||||
});
|
||||
let stem = this.stem;
|
||||
const ext = this.src.extension;
|
||||
const getNewName = (stem2) => stem2 + "." + ext;
|
||||
const getNewPath = (stem2) => path.join(this.src.parent.path, getNewName(stem2));
|
||||
const infoET = createElementTree(contentEl, {
|
||||
tag: "ul",
|
||||
cls: "info",
|
||||
children: [
|
||||
{
|
||||
tag: "li",
|
||||
children: [
|
||||
{
|
||||
tag: "span",
|
||||
text: "Origin path"
|
||||
},
|
||||
{
|
||||
tag: "span",
|
||||
text: this.src.path
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
tag: "li",
|
||||
children: [
|
||||
{
|
||||
tag: "span",
|
||||
text: "New path"
|
||||
},
|
||||
{
|
||||
tag: "span",
|
||||
text: getNewPath(stem)
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
const doRename = () => __async(this, null, function* () {
|
||||
debugLog("doRename", `stem=${stem}`);
|
||||
this.renameFunc(getNewName(stem));
|
||||
});
|
||||
const nameSetting = new import_obsidian2.Setting(contentEl).setName("New name").setDesc("Please input the new name for the image (without extension)").addText((text) => text.setValue(stem).onChange(
|
||||
(value) => __async(this, null, function* () {
|
||||
stem = sanitizer.filename(value);
|
||||
infoET.children[1].children[1].el.innerText = getNewPath(stem);
|
||||
})
|
||||
));
|
||||
const nameInputEl = nameSetting.controlEl.children[0];
|
||||
nameInputEl.focus();
|
||||
const nameInputState = lockInputMethodComposition(nameInputEl);
|
||||
nameInputEl.addEventListener("keydown", (e) => __async(this, null, function* () {
|
||||
if (e.key === "Enter" && !nameInputState.lock) {
|
||||
e.preventDefault();
|
||||
if (!stem) {
|
||||
errorEl.innerText = 'Error: "New name" could not be empty';
|
||||
errorEl.style.display = "block";
|
||||
return;
|
||||
}
|
||||
doRename();
|
||||
this.close();
|
||||
}
|
||||
}));
|
||||
const errorEl = contentEl.createDiv({
|
||||
cls: "error",
|
||||
attr: {
|
||||
style: "display: none;"
|
||||
}
|
||||
});
|
||||
new import_obsidian2.Setting(contentEl).addButton((button) => {
|
||||
button.setButtonText("Rename").onClick(() => {
|
||||
doRename();
|
||||
this.close();
|
||||
});
|
||||
}).addButton((button) => {
|
||||
button.setButtonText("Cancel").onClick(() => {
|
||||
this.close();
|
||||
});
|
||||
});
|
||||
}
|
||||
onClose() {
|
||||
const { contentEl } = this;
|
||||
contentEl.empty();
|
||||
this.onCloseExtra();
|
||||
}
|
||||
};
|
||||
var imageNamePatternDesc = `
|
||||
The pattern indicates how the new name should be generated.
|
||||
|
||||
Available variables:
|
||||
- {{fileName}}: name of the active file, without ".md" extension.
|
||||
- {{imageNameKey}}: this variable is read from the markdown file's frontmatter, from the same key "imageNameKey".
|
||||
- {{DATE:$FORMAT}}: use "$FORMAT" to format the current date, "$FORMAT" must be a Moment.js format string, e.g. {{DATE:YYYY-MM-DD}}.
|
||||
|
||||
Here are some examples from pattern to image names (repeat in sequence), variables: fileName = "My note", imageNameKey = "foo":
|
||||
- {{fileName}}: My note, My note-1, My note-2
|
||||
- {{imageNameKey}}: foo, foo-1, foo-2
|
||||
- {{imageNameKey}}-{{DATE:YYYYMMDD}}: foo-20220408, foo-20220408-1, foo-20220408-2
|
||||
`;
|
||||
var SettingTab = class extends import_obsidian2.PluginSettingTab {
|
||||
constructor(app, plugin) {
|
||||
super(app, plugin);
|
||||
this.plugin = plugin;
|
||||
}
|
||||
display() {
|
||||
const { containerEl } = this;
|
||||
containerEl.empty();
|
||||
new import_obsidian2.Setting(containerEl).setName("Image name pattern").setDesc(imageNamePatternDesc).setClass("long-description-setting-item").addText((text) => text.setPlaceholder("{{imageNameKey}}").setValue(this.plugin.settings.imageNamePattern).onChange(
|
||||
(value) => __async(this, null, function* () {
|
||||
this.plugin.settings.imageNamePattern = value;
|
||||
yield this.plugin.saveSettings();
|
||||
})
|
||||
));
|
||||
new import_obsidian2.Setting(containerEl).setName("Duplicate number at start (or end)").setDesc(`If enabled, duplicate number will be added at the start as prefix for the image name, otherwise it will be added at the end as suffix for the image name.`).addToggle((toggle) => toggle.setValue(this.plugin.settings.dupNumberAtStart).onChange(
|
||||
(value) => __async(this, null, function* () {
|
||||
this.plugin.settings.dupNumberAtStart = value;
|
||||
yield this.plugin.saveSettings();
|
||||
})
|
||||
));
|
||||
new import_obsidian2.Setting(containerEl).setName("Duplicate number delimiter").setDesc(`The delimiter to generate the number prefix/suffix for duplicated names. For example, if the value is "-", the suffix will be like "-1", "-2", "-3", and the prefix will be like "1-", "2-", "3-". Only characters that are valid in file names are allowed.`).addText((text) => text.setValue(this.plugin.settings.dupNumberDelimiter).onChange(
|
||||
(value) => __async(this, null, function* () {
|
||||
this.plugin.settings.dupNumberDelimiter = sanitizer.delimiter(value);
|
||||
yield this.plugin.saveSettings();
|
||||
})
|
||||
));
|
||||
new import_obsidian2.Setting(containerEl).setName("Always add duplicate number").setDesc(`If enabled, duplicate number will always be added to the image name. Otherwise, it will only be added when the name is duplicated.`).addToggle((toggle) => toggle.setValue(this.plugin.settings.dupNumberAlways).onChange(
|
||||
(value) => __async(this, null, function* () {
|
||||
this.plugin.settings.dupNumberAlways = value;
|
||||
yield this.plugin.saveSettings();
|
||||
})
|
||||
));
|
||||
new import_obsidian2.Setting(containerEl).setName("Auto rename").setDesc(`By default, the rename modal will always be shown to confirm before renaming, if this option is set, the image will be auto renamed after pasting.`).addToggle((toggle) => toggle.setValue(this.plugin.settings.autoRename).onChange(
|
||||
(value) => __async(this, null, function* () {
|
||||
this.plugin.settings.autoRename = value;
|
||||
yield this.plugin.saveSettings();
|
||||
})
|
||||
));
|
||||
new import_obsidian2.Setting(containerEl).setName("Handle all attachments").setDesc(`By default, the plugin only handles images that starts with "Pasted image " in name,
|
||||
which is the prefix Obsidian uses to create images from pasted content.
|
||||
If this option is set, the plugin will handle all attachments that are created in the vault.`).addToggle((toggle) => toggle.setValue(this.plugin.settings.handleAllAttachments).onChange(
|
||||
(value) => __async(this, null, function* () {
|
||||
this.plugin.settings.handleAllAttachments = value;
|
||||
yield this.plugin.saveSettings();
|
||||
})
|
||||
));
|
||||
new import_obsidian2.Setting(containerEl).setName("Exclude extension pattern").setDesc(`This option is only useful when "Handle all attachments" is enabled.
|
||||
Write a Regex pattern to exclude certain extensions from being handled. Only the first line will be used.`).setClass("single-line-textarea").addTextArea((text) => text.setPlaceholder("docx?|xlsx?|pptx?|zip|rar").setValue(this.plugin.settings.excludeExtensionPattern).onChange(
|
||||
(value) => __async(this, null, function* () {
|
||||
this.plugin.settings.excludeExtensionPattern = value;
|
||||
yield this.plugin.saveSettings();
|
||||
})
|
||||
));
|
||||
new import_obsidian2.Setting(containerEl).setName("Disable rename notice").setDesc(`Turn off this option if you don't want to see the notice when renaming images.
|
||||
Note that Obsidian may display a notice when a link has changed, this option cannot disable that.`).addToggle((toggle) => toggle.setValue(this.plugin.settings.disableRenameNotice).onChange(
|
||||
(value) => __async(this, null, function* () {
|
||||
this.plugin.settings.disableRenameNotice = value;
|
||||
yield this.plugin.saveSettings();
|
||||
})
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
/* nosourcemap */
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"id": "obsidian-paste-image-rename",
|
||||
"name": "Paste image rename",
|
||||
"version": "1.6.1",
|
||||
"minAppVersion": "0.12.0",
|
||||
"description": "Rename pasted images and all the other attchments added to the vault",
|
||||
"author": "Reorx",
|
||||
"authorUrl": "https://github.com/reorx",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
/* src/styles.css */
|
||||
:root {
|
||||
--shadow-color: 0deg 0% 0%;
|
||||
--shadow-elevation-medium:
|
||||
0.5px 0.5px 0.7px hsl(var(--shadow-color) / 0.14),
|
||||
1.1px 1.1px 1.5px -0.9px hsl(var(--shadow-color) / 0.12),
|
||||
2.4px 2.5px 3.3px -1.8px hsl(var(--shadow-color) / 0.1),
|
||||
5.3px 5.6px 7.3px -2.7px hsl(var(--shadow-color) / 0.09),
|
||||
11px 11.4px 15.1px -3.6px hsl(var(--shadow-color) / 0.07);
|
||||
}
|
||||
.image-rename-modal .modal {
|
||||
width: 65%;
|
||||
min-width: 600px;
|
||||
}
|
||||
.image-rename-modal .modal-content {
|
||||
padding: 10px 5px;
|
||||
}
|
||||
.image-rename-modal .image-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.image-rename-modal .info {
|
||||
padding: 10px 0;
|
||||
color: var(--text-muted);
|
||||
user-select: text;
|
||||
}
|
||||
.image-rename-modal .info li > span:nth-of-type(1) {
|
||||
display: inline-block;
|
||||
width: 6em;
|
||||
margin-right: .5em;
|
||||
}
|
||||
.image-rename-modal .info li > span:nth-of-type(1):after {
|
||||
content: ":";
|
||||
float: right;
|
||||
}
|
||||
.image-rename-modal .image-container img {
|
||||
display: block;
|
||||
max-height: 300px;
|
||||
box-shadow: var(--shadow-elevation-medium);
|
||||
}
|
||||
.image-rename-modal .setting-item-control input {
|
||||
min-width: 300px;
|
||||
}
|
||||
.image-rename-modal .error {
|
||||
border: 1px solid rgb(201, 90, 90);
|
||||
color: rgb(134, 22, 22);
|
||||
padding: 10px;
|
||||
}
|
||||
.image-rename-modal table {
|
||||
font-size: .9em;
|
||||
line-height: 1.8;
|
||||
margin-bottom: 1.5em;
|
||||
user-select: text;
|
||||
}
|
||||
.image-rename-modal table td {
|
||||
padding-right: 1em;
|
||||
}
|
||||
.image-rename-modal table thead td {
|
||||
font-weight: 700;
|
||||
}
|
||||
.image-rename-modal table tbody td .file-path {
|
||||
font-size: .8em;
|
||||
color: var(--text-faint);
|
||||
line-height: 1;
|
||||
}
|
||||
.long-description-setting-item {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.long-description-setting-item .setting-item-description {
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.3em;
|
||||
}
|
||||
.long-description-setting-item .setting-item-control {
|
||||
padding-top: 10px;
|
||||
}
|
||||
.long-description-setting-item .setting-item-control input {
|
||||
min-width: 300px;
|
||||
width: 50%;
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
"settings": {
|
||||
"flashcardTags": [
|
||||
"#flashcards"
|
||||
],
|
||||
"convertFoldersToDecks": false,
|
||||
"burySiblingCards": false,
|
||||
"flashcardCardOrder": "DueFirstRandom",
|
||||
"flashcardDeckOrder": "PrevDeckComplete_Sequential",
|
||||
"convertClozePatternsToInputs": false,
|
||||
"convertHighlightsToClozes": true,
|
||||
"convertBoldTextToClozes": false,
|
||||
"convertCurlyBracketsToClozes": false,
|
||||
"clozePatterns": [
|
||||
"==[123;;]answer[;;hint]=="
|
||||
],
|
||||
"singleLineCardSeparator": "::",
|
||||
"singleLineReversedCardSeparator": ":::",
|
||||
"multilineCardSeparator": "?",
|
||||
"multilineReversedCardSeparator": "??",
|
||||
"multilineCardEndMarker": "",
|
||||
"editLaterTag": "#edit-later",
|
||||
"enableNoteReviewPaneOnStartup": true,
|
||||
"tagsToReview": [
|
||||
"#review"
|
||||
],
|
||||
"noteFoldersToIgnore": [
|
||||
"**/*.excalidraw.md"
|
||||
],
|
||||
"openRandomNote": false,
|
||||
"autoNextNote": false,
|
||||
"showFileMenuReviewOptions": true,
|
||||
"deleteTagsOnSchedulingDataDeletion": false,
|
||||
"maxNDaysNotesReviewQueue": 365,
|
||||
"showRibbonIcon": true,
|
||||
"showStatusBar": true,
|
||||
"showCardStatusBarItem": true,
|
||||
"showNoteStatusBarItem": true,
|
||||
"showUpdateAvailableStatusBarItem": true,
|
||||
"initiallyExpandAllSubdecksInTree": true,
|
||||
"showContextInCards": true,
|
||||
"showIntervalInReviewButtons": true,
|
||||
"flashcardHeightPercentage": 60,
|
||||
"flashcardWidthPercentage": 60,
|
||||
"flashcardHeightPercentageMobile": 100,
|
||||
"flashcardWidthPercentageMobile": 100,
|
||||
"flashcardAgainText": "Again",
|
||||
"flashcardEasyText": "简单",
|
||||
"flashcardGoodText": "记得",
|
||||
"flashcardHardText": "较难",
|
||||
"reviewButtonDelay": 0,
|
||||
"showDeleteButtonInCardView": false,
|
||||
"showDeleteButtonInFileMenu": false,
|
||||
"openViewInNewTab": false,
|
||||
"openViewInNewTabMobile": false,
|
||||
"useCustomHotkeys": false,
|
||||
"algorithm": "SM-2-OSR",
|
||||
"baseEase": 250,
|
||||
"lapsesIntervalChange": 0.5,
|
||||
"easyBonus": 1.3,
|
||||
"loadBalance": true,
|
||||
"maximumInterval": 36525,
|
||||
"maxLinkFactor": 1,
|
||||
"startOfDay": "00:00:00",
|
||||
"dataStore": "NOTES",
|
||||
"cardCommentOnSameLine": false,
|
||||
"showSchedulingDebugMessages": false,
|
||||
"showParserDebugMessages": false
|
||||
},
|
||||
"buryDate": "2026-05-05",
|
||||
"buryList": [],
|
||||
"historyDeck": null
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"id": "obsidian-spaced-repetition",
|
||||
"name": "Spaced Repetition",
|
||||
"version": "1.14.1",
|
||||
"minAppVersion": "1.2.8",
|
||||
"description": "Fight the forgetting curve by reviewing flashcards & entire notes using spaced repetition. Organize your flashcards into decks and learn only the cards you need to recall.",
|
||||
"author": "Stephen Mwangi",
|
||||
"authorUrl": "https://github.com/st3v3nmw",
|
||||
"helpUrl": "https://stephenmwangi.com/obsidian-spaced-repetition/",
|
||||
"isDesktopOnly": false,
|
||||
"fundingUrl": "https://ko-fi.com/M4M44DEN6"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,124 @@
|
|||
{
|
||||
"manifest": {
|
||||
"version": "3.1.0"
|
||||
},
|
||||
"MergeParagraph_Newlines": true,
|
||||
"MergeParagraph_Spaces": true,
|
||||
"LowercaseFirst": true,
|
||||
"RemoveBlanksWhenChinese": false,
|
||||
"ZoteroNoteRegExp": "“(?<text>.*)” \\((?<item>.*?)\\) \\(\\[pdf\\]\\((?<pdf_url>.*?)\\)\\)",
|
||||
"ZoteroNoteTemplate": "{text} [🔖]({pdf_url})",
|
||||
"BulletPoints": "•–§",
|
||||
"WrapperList": [
|
||||
{
|
||||
"name": "underline",
|
||||
"prefix": "<u>",
|
||||
"suffix": "</u>",
|
||||
"id": "underline"
|
||||
}
|
||||
],
|
||||
"RequestList": [],
|
||||
"customReplaceList": [
|
||||
{
|
||||
"id": "remove-trailing-spaces",
|
||||
"name": "移除所有行末空格",
|
||||
"data": [
|
||||
{
|
||||
"search": "(\\s*)(?=\\n)|(\\s*)$",
|
||||
"replace": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "remove-blank-line",
|
||||
"name": "移除空行",
|
||||
"data": [
|
||||
{
|
||||
"search": "\\n\\s*\\n",
|
||||
"replace": "\\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "add-line-break",
|
||||
"name": "在段落间添加额外换行",
|
||||
"data": [
|
||||
{
|
||||
"search": "\\n",
|
||||
"replace": "\\n\\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "split-lines-by-blank",
|
||||
"name": "按空格分行",
|
||||
"data": [
|
||||
{
|
||||
"search": " ",
|
||||
"replace": "\\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"customReplaceBuiltInLog": {
|
||||
"remove-trailing-spaces": {
|
||||
"id": "remove-trailing-spaces",
|
||||
"modified": false,
|
||||
"data": [
|
||||
{
|
||||
"search": "(\\s*)(?=\\n)|(\\s*)$",
|
||||
"replace": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"remove-blank-line": {
|
||||
"id": "remove-blank-line",
|
||||
"modified": false,
|
||||
"data": [
|
||||
{
|
||||
"search": "\\n\\s*\\n",
|
||||
"replace": "\\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
"add-line-break": {
|
||||
"id": "add-line-break",
|
||||
"modified": false,
|
||||
"data": [
|
||||
{
|
||||
"search": "\\n",
|
||||
"replace": "\\n\\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
"split-lines-by-blank": {
|
||||
"id": "split-lines-by-blank",
|
||||
"modified": false,
|
||||
"data": [
|
||||
{
|
||||
"search": " ",
|
||||
"replace": "\\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"ToggleSequence": "titleCase\nlowerCase\nupperCase",
|
||||
"RemoveWikiURL2": false,
|
||||
"WikiLinkFormat": {
|
||||
"headingOnly": "{title} (> {heading})",
|
||||
"aliasOnly": "{alias} ({title})",
|
||||
"both": "{alias} ({title} > {heading})"
|
||||
},
|
||||
"UrlLinkFormat": "{text}",
|
||||
"ProperNoun": "",
|
||||
"OrderedListOtherSeparator": "",
|
||||
"Wikilink2mdRelativePath": "relative-obsidian",
|
||||
"calloutType": "NOTE",
|
||||
"debugMode": false,
|
||||
"headingLevelMin": 0,
|
||||
"calloutTypeDecider": "previous-content",
|
||||
"formatOnSaveSettings": {
|
||||
"enabled": false,
|
||||
"commandsString": ""
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"id": "obsidian-text-format",
|
||||
"name": "Text Format",
|
||||
"version": "3.1.0",
|
||||
"minAppVersion": "0.9.7",
|
||||
"description": "Format text such as lowercase/uppercase/capitalize/titlecase, converting order/bullet list, removing redundant spaces/newline characters.",
|
||||
"author": "Benature",
|
||||
"authorUrl": "https://github.com/Benature",
|
||||
"fundingUrl": {
|
||||
"Buy Me a Coffee": "https://www.buymeacoffee.com/benature",
|
||||
"爱发电": "https://afdian.net/a/Benature-K",
|
||||
"微信/支付宝": "https://s2.loli.net/2024/01/30/jQ9fTSyBxvXRoOM.png"
|
||||
},
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
.plugin-text-format H3,
|
||||
.plugin-text-format H4 {
|
||||
margin-bottom: 0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
.plugin-text-format H4{
|
||||
opacity: 0.7;
|
||||
}
|
||||
.plugin-text-format .heading-description {
|
||||
padding-top: 0px;
|
||||
color: var(--text-faint);
|
||||
}
|
||||
|
||||
.plugin-text-format .header-div:has(H3) + .tf-collapsible-content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.plugin-text-format .header-div:has(H4) + .tf-collapsible-content {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.plugin-text-format .setting-item > .setting-item-control > input {
|
||||
min-width: 145px;
|
||||
}
|
||||
|
||||
.plugin-text-format .setting-item.custom-replace input,
|
||||
.plugin-text-format .setting-item.wrapper input {
|
||||
width: 33%;
|
||||
}
|
||||
.plugin-text-format .setting-item.api-request input:first-child {
|
||||
width: 30%;
|
||||
}
|
||||
.plugin-text-format .setting-item.api-request input {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.tf-collapsible-content.is-active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tf-collapsible-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.plugin-text-format .header-div:hover {
|
||||
background-color: var(--interactive-hover, #363636);
|
||||
border-radius: var(--button-radius, 5px);
|
||||
}
|
||||
|
||||
.tf-collapsible-header {
|
||||
padding-bottom: 8px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
.tf-collapsible-icon {
|
||||
position: relative;
|
||||
top: 4px;
|
||||
left: 16px;
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"formatType": "normal",
|
||||
"showRibbonIcon": true,
|
||||
"bindEnter": true,
|
||||
"bindTab": true
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"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": "1.0.0",
|
||||
"version": "0.22.2",
|
||||
"fundingUrl": {
|
||||
"Github Sponsor": "https://github.com/sponsors/tgrosinger",
|
||||
"Buy me a Coffee": "https://buymeacoffee.com/tgrosinger",
|
||||
"Paypal": "https://paypal.me/tgrosinger"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
:root {
|
||||
--advanced-tables-helper-size: 28px;
|
||||
}
|
||||
|
||||
.HyperMD-table-row span.cm-inline-code {
|
||||
font-size: 100%;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.advanced-tables-buttons>div>.title {
|
||||
font-weight: var(--font-medium);
|
||||
font-size: var(--nav-item-size);
|
||||
color: var(--nav-item-color);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
[data-type="advanced-tables-toolbar"] .nav-buttons-container {
|
||||
column-gap: 0.2rem;
|
||||
margin: 0.2rem 0 0.2rem 0;
|
||||
justify-content: start;
|
||||
}
|
||||
|
||||
[data-type="advanced-tables-toolbar"] .nav-buttons-container::before {
|
||||
min-width: 2.6rem;
|
||||
line-height: var(--advanced-tables-helper-size);
|
||||
font-size: var(--nav-item-size);
|
||||
font-weight: var(--nav-item-weight);
|
||||
color: var(--nav-item-color);
|
||||
}
|
||||
|
||||
[data-type="advanced-tables-toolbar"] .nav-buttons-container>* {
|
||||
height: var(--advanced-tables-helper-size);
|
||||
line-height: var(--advanced-tables-helper-size);
|
||||
}
|
||||
|
||||
[data-type="advanced-tables-toolbar"] .nav-buttons-container .nav-action-button {
|
||||
width: var(--advanced-tables-helper-size);
|
||||
height: var(--advanced-tables-helper-size);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: var(--radius-s);
|
||||
}
|
||||
|
||||
[data-type="advanced-tables-toolbar"] .nav-buttons-container .nav-action-button:hover {
|
||||
background-color: var(--nav-item-background-hover);
|
||||
color: var(--nav-item-color-hover);
|
||||
font-weight: var(--nav-item-weight-hover);
|
||||
}
|
||||
|
||||
.advanced-tables-row-label {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"id": "templater-obsidian",
|
||||
"name": "Templater",
|
||||
"version": "2.18.1",
|
||||
"description": "Create and use templates",
|
||||
"minAppVersion": "1.5.0",
|
||||
"author": "SilentVoid",
|
||||
"authorUrl": "https://github.com/SilentVoid13",
|
||||
"helpUrl": "https://silentvoid13.github.io/Templater/",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
|
|
@ -0,0 +1,226 @@
|
|||
.templater_search {
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
|
||||
.templater_div {
|
||||
border-top: 1px solid var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.templater_div > .setting-item {
|
||||
border-top: none !important;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.templater_div > .setting-item > .setting-item-control {
|
||||
justify-content: space-around;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.templater_div
|
||||
> .setting-item
|
||||
> .setting-item-control
|
||||
> .setting-editor-extra-setting-button {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.templater_donating {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.templater_title {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-top: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.templater_template {
|
||||
align-self: center;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.templater_cmd {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.templater_div2 > .setting-item {
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.templater-prompt-div,
|
||||
.templater-multisuggester-div {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.templater-prompt-form {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.templater-prompt-input,
|
||||
.templater-multisuggester-input {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.templater-button-div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
textarea.templater-prompt-input {
|
||||
height: 10rem;
|
||||
}
|
||||
|
||||
textarea.templater-prompt-input:focus {
|
||||
border-color: var(--interactive-accent);
|
||||
}
|
||||
|
||||
.templater-multisuggester-list {
|
||||
margin: 1.5em 0;
|
||||
}
|
||||
|
||||
.cm-s-obsidian .templater-command-bg {
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
background-color: var(--background-primary-alt);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command {
|
||||
font-size: 0.85em;
|
||||
font-family: var(--font-monospace);
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.cm-s-obsidian .templater-inline .cm-templater-command {
|
||||
background-color: var(--background-primary-alt);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-templater-opening-tag {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-templater-closing-tag {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-templater-interpolation-tag {
|
||||
color: var(--code-property, #008bff);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-templater-execution-tag {
|
||||
color: var(--code-function, #c0d700);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-keyword {
|
||||
color: var(--code-keyword, #00a7aa);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-atom {
|
||||
color: var(--code-normal, #f39b35);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-value,
|
||||
.cm-s-obsidian .cm-templater-command.cm-number,
|
||||
.cm-s-obsidian .cm-templater-command.cm-type {
|
||||
color: var(--code-value, #a06fca);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-def,
|
||||
.cm-s-obsidian .cm-templater-command.cm-type.cm-def {
|
||||
color: var(--code-normal, var(--text-normal));
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-property,
|
||||
.cm-s-obsidian .cm-templater-command.cm-property.cm-def,
|
||||
.cm-s-obsidian .cm-templater-command.cm-attribute {
|
||||
color: var(--code-function, #98e342);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-variable,
|
||||
.cm-s-obsidian .cm-templater-command.cm-variable-2,
|
||||
.cm-s-obsidian .cm-templater-command.cm-variable-3,
|
||||
.cm-s-obsidian .cm-templater-command.cm-meta {
|
||||
color: var(--code-property, #d4d4d4);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-callee,
|
||||
.cm-s-obsidian .cm-templater-command.cm-operator,
|
||||
.cm-s-obsidian .cm-templater-command.cm-qualifier,
|
||||
.cm-s-obsidian .cm-templater-command.cm-builtin {
|
||||
color: var(--code-operator, #fc4384);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-tag {
|
||||
color: var(--code-tag, #fc4384);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-comment,
|
||||
.cm-s-obsidian .cm-templater-command.cm-comment.cm-tag,
|
||||
.cm-s-obsidian .cm-templater-command.cm-comment.cm-attribute {
|
||||
color: var(--code-comment, #696d70);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-string,
|
||||
.cm-s-obsidian .cm-templater-command.cm-string-2 {
|
||||
color: var(--code-string, #e6db74);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-header,
|
||||
.cm-s-obsidian .cm-templater-command.cm-hr {
|
||||
color: var(--code-keyword, #da7dae);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-link {
|
||||
color: var(--code-normal, #696d70);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-error {
|
||||
border-bottom: 1px solid #c42412;
|
||||
}
|
||||
|
||||
.CodeMirror-hints {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
|
||||
margin: 0;
|
||||
padding: 2px;
|
||||
|
||||
-webkit-box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.2);
|
||||
-moz-box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.2);
|
||||
border-radius: 3px;
|
||||
border: 1px solid silver;
|
||||
|
||||
background: white;
|
||||
font-size: 90%;
|
||||
font-family: monospace;
|
||||
|
||||
max-height: 20em;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-hint {
|
||||
margin: 0;
|
||||
padding: 0 4px;
|
||||
border-radius: 2px;
|
||||
white-space: pre;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
li.CodeMirror-hint-active {
|
||||
background: #08f;
|
||||
color: white;
|
||||
}
|
||||
|
|
@ -0,0 +1,242 @@
|
|||
{
|
||||
"main": {
|
||||
"id": "88e83fc9b1b3ed00",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "b2c6952e93605847",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "ffd8dfa82a9fd184",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "未命名.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "未命名"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "e34a0fe7171f0ff7",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "未命名 1 这不是必杀技.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "未命名 1 这不是必杀技"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "edd60ae5345c8049",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "未命名 1 这不是必杀技.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "未命名 1 这不是必杀技"
|
||||
}
|
||||
}
|
||||
],
|
||||
"currentTab": 2
|
||||
}
|
||||
],
|
||||
"direction": "vertical"
|
||||
},
|
||||
"left": {
|
||||
"id": "8823a2b73fe5d800",
|
||||
"type": "mobile-drawer",
|
||||
"children": [
|
||||
{
|
||||
"id": "04d315a1fecc18cc",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "file-explorer",
|
||||
"state": {
|
||||
"sortOrder": "alphabetical",
|
||||
"autoReveal": false
|
||||
},
|
||||
"icon": "lucide-folder-closed",
|
||||
"title": "文件列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "1a3e20f0f56dfec5",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "search",
|
||||
"state": {
|
||||
"query": "",
|
||||
"matchingCase": false,
|
||||
"explainSearch": false,
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical"
|
||||
},
|
||||
"icon": "lucide-search",
|
||||
"title": "搜索"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "c3d18926514f4ec0",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "tag",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"useHierarchy": true,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-tags",
|
||||
"title": "标签"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "f43c0f3202722ca3",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "all-properties",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-archive",
|
||||
"title": "添加笔记属性"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "f4217fe3df0ab0ec",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "bookmarks",
|
||||
"state": {},
|
||||
"icon": "lucide-bookmark",
|
||||
"title": "书签"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "3245e9d1f1c9c9ac",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "mk-path-view",
|
||||
"state": {},
|
||||
"icon": "layout-grid",
|
||||
"title": "Navigator"
|
||||
}
|
||||
}
|
||||
],
|
||||
"currentTab": 5
|
||||
},
|
||||
"right": {
|
||||
"id": "ef0111c1545c9edb",
|
||||
"type": "mobile-drawer",
|
||||
"children": [
|
||||
{
|
||||
"id": "cef64e2207c65f8d",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
"showSearch": false,
|
||||
"searchQuery": "",
|
||||
"backlinkCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-coming-in",
|
||||
"title": "反向链接"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "a3c8d3bb81aa17b2",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outgoing-link",
|
||||
"state": {
|
||||
"linksCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-going-out",
|
||||
"title": "出链"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "a84a68603192bca6",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {
|
||||
"followCursor": false,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-list",
|
||||
"title": "大纲"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "f10d9c64dbb15c2b",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "review-queue-list-view",
|
||||
"state": {},
|
||||
"icon": "SpacedRepIcon",
|
||||
"title": "笔记复习序列"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "3583122a83c35a00",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "advanced-tables-toolbar",
|
||||
"state": {},
|
||||
"icon": "spreadsheet",
|
||||
"title": "Advanced Tables"
|
||||
}
|
||||
}
|
||||
],
|
||||
"currentTab": 4
|
||||
},
|
||||
"left-ribbon": {
|
||||
"hiddenItems": {
|
||||
"switcher:打开快速切换": false,
|
||||
"graph:查看关系图谱": false,
|
||||
"canvas:新建白板": false,
|
||||
"daily-notes:打开/创建今天的日记": false,
|
||||
"templates:插入模板": false,
|
||||
"command-palette:打开命令面板": false,
|
||||
"bases:新建数据库": false,
|
||||
"table-editor-obsidian:Advanced Tables Toolbar": false,
|
||||
"bmo-chatbot:BMO Chatbot": false,
|
||||
"obsidian-git:Open Git source control": false,
|
||||
"obsidian-spaced-repetition:复习卡片": false,
|
||||
"templater-obsidian:Templater": false
|
||||
}
|
||||
},
|
||||
"active": "edd60ae5345c8049",
|
||||
"lastOpenFiles": [
|
||||
"专升本设计",
|
||||
"未命名 1 这不是必杀技.md",
|
||||
"BMO/Profiles/BMO.md",
|
||||
"未命名.md",
|
||||
"Tags",
|
||||
"BMO/Profiles",
|
||||
"BMO"
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,268 @@
|
|||
{
|
||||
"main": {
|
||||
"id": "d80ac0dade55bdf1",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "01bb0641367ee052",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "408d92308457d129",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "未命名.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "未命名"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "4c80988c796ffe93",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "mk-uri-view",
|
||||
"state": {
|
||||
"path": "https://www.make.md/static/latest.md"
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "https://www.make.md/static/latest.md"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "39145b1e018efe67",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "graph",
|
||||
"state": {},
|
||||
"icon": "lucide-git-fork",
|
||||
"title": "关系图谱"
|
||||
}
|
||||
}
|
||||
],
|
||||
"currentTab": 2
|
||||
}
|
||||
],
|
||||
"direction": "vertical"
|
||||
},
|
||||
"left": {
|
||||
"id": "58b4dbe4613b85a8",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "e53a651a3f6fbc89",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "54ae5ad1b89f84ca",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "file-explorer",
|
||||
"state": {
|
||||
"sortOrder": "alphabetical",
|
||||
"autoReveal": false
|
||||
},
|
||||
"icon": "lucide-folder-closed",
|
||||
"title": "文件列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "40e5722c2787cf59",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "search",
|
||||
"state": {
|
||||
"query": "",
|
||||
"matchingCase": false,
|
||||
"explainSearch": false,
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical"
|
||||
},
|
||||
"icon": "lucide-search",
|
||||
"title": "搜索"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "18f356cd6d568905",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "bookmarks",
|
||||
"state": {},
|
||||
"icon": "lucide-bookmark",
|
||||
"title": "书签"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "52ada03512511340",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "mk-path-view",
|
||||
"state": {},
|
||||
"icon": "layout-grid",
|
||||
"title": "Navigator"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 300
|
||||
},
|
||||
"right": {
|
||||
"id": "f220bb92bf00a3f9",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "d4483dbbaaf75523",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "a1fb6aaf9da0e6f4",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
"showSearch": false,
|
||||
"searchQuery": "",
|
||||
"backlinkCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-coming-in",
|
||||
"title": "反向链接"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "4bd7c45b05f43729",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outgoing-link",
|
||||
"state": {
|
||||
"linksCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-going-out",
|
||||
"title": "出链"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "f890baecab9b6ff6",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "tag",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"useHierarchy": true,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-tags",
|
||||
"title": "标签"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "54d8fe9ceea17b0b",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "all-properties",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-archive",
|
||||
"title": "添加笔记属性"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "6cc3007b4af88606",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {
|
||||
"followCursor": false,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-list",
|
||||
"title": "大纲"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cce8d82602968c3a",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "review-queue-list-view",
|
||||
"state": {},
|
||||
"icon": "SpacedRepIcon",
|
||||
"title": "笔记复习序列"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "55a7283a6a3f9c9c",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "chatbot-view",
|
||||
"state": {},
|
||||
"icon": "bot",
|
||||
"title": "BMO Chatbot"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "5fb92e7d1481288e",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "git-view",
|
||||
"state": {},
|
||||
"icon": "git-pull-request",
|
||||
"title": "Source Control"
|
||||
}
|
||||
}
|
||||
],
|
||||
"currentTab": 7
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 300
|
||||
},
|
||||
"left-ribbon": {
|
||||
"hiddenItems": {
|
||||
"switcher:打开快速切换": false,
|
||||
"graph:查看关系图谱": false,
|
||||
"canvas:新建白板": false,
|
||||
"daily-notes:打开/创建今天的日记": false,
|
||||
"templates:插入模板": false,
|
||||
"command-palette:打开命令面板": false,
|
||||
"bases:新建数据库": false,
|
||||
"table-editor-obsidian:Advanced Tables Toolbar": false,
|
||||
"bmo-chatbot:BMO Chatbot": false,
|
||||
"obsidian-git:Open Git source control": false,
|
||||
"obsidian-spaced-repetition:复习卡片": false,
|
||||
"templater-obsidian:Templater": false
|
||||
}
|
||||
},
|
||||
"active": "5fb92e7d1481288e",
|
||||
"lastOpenFiles": [
|
||||
"README.md",
|
||||
"未命名 1 这不是必杀技.md",
|
||||
"专升本设计/小程序功能设计.md",
|
||||
"专升本设计/概率算法 2.md",
|
||||
"专升本设计/概率算法 1.md",
|
||||
"专升本设计/待办任务.md",
|
||||
"未命名.md",
|
||||
"专升本设计/后台功能.md",
|
||||
"专升本设计",
|
||||
"BMO/Profiles/BMO.md",
|
||||
"BMO/Profiles",
|
||||
"BMO",
|
||||
"Tags",
|
||||
"未命名 1.md"
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{"name":"Home","sticker":"ui//home","paths":["/"]}]
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
model: ""
|
||||
max_tokens: .nan
|
||||
temperature: 1
|
||||
enable_reference_current_note: false
|
||||
prompt: ""
|
||||
user_name: YOU
|
||||
enable_header: true
|
||||
chatbot_container_background_color: --background-secondary
|
||||
message_container_background_color: --background-secondary
|
||||
user_message_font_color: --text-normal
|
||||
user_message_background_color: --background-primary
|
||||
bot_message_font_color: --text-normal
|
||||
chatbot_message_background_color: --background-secondary
|
||||
chatbox_font_color: --text-normal
|
||||
chatbox_background_color: --interactive-accent
|
||||
bmo_generate_background_color: 0c0a12
|
||||
bmo_generate_font_color: --text-normal
|
||||
systen_role: You are a helpful assistant.
|
||||
ollama_mirostat: 0
|
||||
ollama_mirostat_eta: 0.1
|
||||
ollama_mirostat_tau: 5
|
||||
ollama_num_ctx: 2048
|
||||
ollama_num_gqa: .nan
|
||||
ollama_num_thread: .nan
|
||||
ollama_repeat_last_n: 64
|
||||
ollama_repeat_penalty: 1.1
|
||||
ollama_seed: .nan
|
||||
ollama_stop: []
|
||||
ollama_tfs_z: 1
|
||||
ollama_top_k: 40
|
||||
ollama_top_p: 0.9
|
||||
ollama_min_p: 0
|
||||
ollama_keep_alive: ""
|
||||
---
|
||||
You are a helpful assistant.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
1、专业库(已录入)
|
||||
2、院校库(仅录入基础信息)
|
||||
3、本专科专业对照(仅录入26年数据)
|
||||
4、本科专业分数线(已录入24、25年数据)
|
||||
5、专业排名位次(已录入24、25年)
|
||||
6、专升本招生计划(仅录入25年)
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
##### 首页
|
||||
|
||||
- 跳转查询可报院校
|
||||
- 跳转招生计划
|
||||
- 跳转分位表
|
||||
- 跳转专升硕
|
||||
- 跳转专业对照表
|
||||
- 最新政策动态
|
||||
|
||||
|
||||
##### 专业查院校
|
||||
|
||||
输入**本科专业名称**,筛选院校标签(公办、民办、退役士兵),查询三年招录统计(年份、省控线、最高分、最低分、录取人数),显示此专业的招录院校(院校图标、院校名称、院校标签、学费、当前年预测分数、近两年最低分)
|
||||
|
||||
##### 一键查询可填报院校
|
||||
|
||||
筛选条件:专科专业,风险等级(冲、稳、保),院校类型
|
||||
查询:招录专业学校信息(院校图标、院校名称、院校代码、本科专业、往年录取分数/人数),当前年招录人数,查看详情。
|
||||
|
||||
|
||||
|
||||
##### 志愿单
|
||||
|
||||
|
||||
##### 个人中心
|
||||
|
||||
- 展示用户信息
|
||||
- 展示志愿数量,全省排名,录取概率
|
||||
- 我的志愿表
|
||||
- 我的订单
|
||||
- 成绩/排名记录
|
||||
- 激活会员卡
|
||||
- 商务合作
|
||||
- 填报指南/教程
|
||||
- 联系老师/客服
|
||||
- 关于小程序
|
||||
- 退出登录
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
- [ ] 小程序 一分一段表 公办/民办
|
||||
- [ ] 小程序 专业信息对接
|
||||
- [ ] 小程序 首页 专业查询院校
|
||||
输入本科专业名称,分数,概率(冲刺/稳健/保底),办学类型:公办/民办,页数,分页大小,查询符合的院校信息, 计算录取概率
|
||||
返回 冲刺院校、稳健院校、保底院校(数量)
|
||||
列表
|
||||
概率(冲刺/稳健/保底),院校代码,办学类型:公办/民办,院校名称,专业代码,专业名称,当前年计划数量,历年投档分[近3年]
|
||||
后端实现时,根据本科专业,分数,省份 计算出来后临时存储到 Redis(便于多个专业同时查询节省资源开销)
|
||||
- [ ] 小程序 一键生成志愿表,选择院校明细后,将志愿信息(列表数据中 院校名称,院校代码,专业名称,专业代码,概率,公办/民办,顺序), 分数,专业信息 记录到志愿表.
|
||||
- [ ] 小程序 志愿表信息, 院校明细, 分数,专业信息.
|
||||
|
||||
|
||||
|
||||
- [ ] 专业历年分数
|
||||
- [x] 专业库
|
||||
- [x] 专业大类
|
||||
- [x] 专业分数分数线
|
||||
- [x] 位次(~~25~~、24)
|
||||
- [x] 招生计划(~~25~~、24)
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
|
||||
出分前
|
||||
1.基础值 = 省控线_25 + (省控线_25 - 省控线_24)
|
||||
预估省控线_26 = 基础值 + difficulty_offset (试卷难易程度)+ policy_offset(招生计划扩招/缩招)(若用户手动修改,则以用户值为准)
|
||||
|
||||
2.Δ = 预估省控线_26 - 省控线_25
|
||||
等效分_25 = 预估分_26 - Δ
|
||||
预估位次_26 = 查表(等效分_25) × 总人数系数
|
||||
出分后
|
||||
排序键 = (软科综合排名, 软科专业排名, 招生计划数)
|
||||
累计计划 = 按排序累加招生计划
|
||||
命中院校 = 第一个累计计划 ≥ 用户位次的院校
|
||||
冲刺 = 命中院校及之前1-2所(若有)
|
||||
稳妥 = 命中院校后40%院校
|
||||
保底 = 剩余院校
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
|
||||
|
||||
第二部分:出分后——如何用真实分数和位次计算概率
|
||||
|
||||
2.1 数据获取
|
||||
|
||||
· 用户输入:真实分数_26
|
||||
· 系统获取:2026年一分一段表(官方发布,4月9日)
|
||||
· 查表得到:真实位次_26
|
||||
· 历史数据:2024年、2025年各院校专业的最低录取位次(及招生计划)
|
||||
|
||||
2.2 核心计算流程
|
||||
|
||||
步骤1:获取目标院校专业的历史录取位次
|
||||
|
||||
· 对于某院校专业,取 历史位次_2025 和 历史位次_2024。
|
||||
· 若两年都有,计算加权:历史位次_加权 = 0.7×位次_2025 + 0.3×位次_2024
|
||||
(权重可后台配置,默认最近一年权重大)
|
||||
· 若只有一年,则直接使用该年数据,并标注“数据较少”。
|
||||
|
||||
步骤2:招生计划修正(得到等效历史位次)
|
||||
|
||||
根据2026年招生计划与历史年份计划的变化,对历史位次进行修正:
|
||||
|
||||
变动 修正公式 说明
|
||||
扩招(计划增≥10%) 等效位次 = 历史位次 × (1 + 扩招系数) 门槛降低,位次数字变大
|
||||
缩招(计划减≥10%) 等效位次 = 历史位次 × (1 - 缩招系数) 门槛提高,位次数字变小
|
||||
稳定 等效位次 = 历史位次 不变
|
||||
|
||||
· 默认扩招系数=0.15,缩招系数=0.20,后台可调。
|
||||
|
||||
步骤3:对比用户真实位次与等效历史位次
|
||||
|
||||
```
|
||||
差值 = 用户位次 - 等效历史位次
|
||||
```
|
||||
|
||||
· 若 差值 ≤ 0:用户位次更靠前(数字小),录取希望更大。
|
||||
· 若 差值 > 0:用户位次更靠后,希望更小。
|
||||
|
||||
步骤4:计算录取概率
|
||||
|
||||
采用分段线性函数,将“用户位次相对于等效位次的偏离程度”映射到概率。
|
||||
|
||||
定义:
|
||||
|
||||
```
|
||||
相对位置 = (用户位次 - 等效位次) / 等效位次
|
||||
```
|
||||
|
||||
· 相对位置 = 0:用户位次等于等效位次 → 基准概率 50%(可调整)。
|
||||
· 相对位置为负(用户更优):概率提升。
|
||||
· 相对位置为正(用户更劣):概率降低。
|
||||
|
||||
概率映射公式(线性):
|
||||
|
||||
```
|
||||
概率 = 50% - 相对位置 × K
|
||||
```
|
||||
|
||||
· 当相对位置 = -0.15(用户位次比等效位次低15%)时,概率 = 50% + 0.15×K,设K=250,则概率≈87.5%。
|
||||
· 当相对位置 = +0.20(用户位次比等效位次高20%)时,概率 = 50% - 0.20×250 = 0%(保底5%)。
|
||||
|
||||
实际分段实现(更直观):
|
||||
|
||||
用户位次范围 概率 推荐等级
|
||||
≤ 等效位次 × 0.85 90% - 95% 稳妥
|
||||
(等效位次×0.85, 等效位次] 70% - 90% 可冲 / 稳妥
|
||||
(等效位次, 等效位次×1.15] 40% - 70% 谨慎冲刺
|
||||
等效位次×1.15 5% - 40% 风险较高
|
||||
|
||||
具体概率值可在区间内线性插值。例如:
|
||||
|
||||
· 用户位次 = 等效位次 × 0.92 → 属于第二档,概率下限70%,上限90%,按比例:70% + (0.92-0.85)/(1-0.85) × (90%-70%) = 70% + 0.07/0.15×20% ≈ 79.3%。
|
||||
|
||||
步骤5:输出结果
|
||||
|
||||
· 展示:录取概率 XX% + 推荐等级 + 填报建议。
|
||||
· 同时显示等效历史位次、用户位次、计划变动情况。
|
||||
|
||||
2.3 新增专业的概率计算(无历史位次)
|
||||
|
||||
当专业为2026年首次招生时,使用招生计划排名法(已在PRD中说明):
|
||||
|
||||
· 获取该专业大类的2026年一分一段表。
|
||||
· 获取公办招生总人数、民办招生总人数。
|
||||
· 根据用户位次与累计计划人数的关系,直接赋予基准概率(60%-80%等),无需与历史位次对比。
|
||||
|
||||
---
|
||||
|
||||
第三部分:完整计算示例
|
||||
|
||||
示例背景
|
||||
|
||||
· 用户:26年真实分数 210分,查26年一分一段表得位次 1050名。
|
||||
· 目标院校:XX学院计算机专业。
|
||||
· 2025年录取位次:1200名,招生60人。
|
||||
· 2024年录取位次:1150名,招生55人。
|
||||
· 2026年招生计划:75人(扩招25%)。
|
||||
· 系统参数:扩招系数0.15,加权权重0.7/0.3。
|
||||
|
||||
计算过程
|
||||
|
||||
1. 历史加权位次 = 0.7×1200 + 0.3×1150 = 840 + 345 = 1185名。
|
||||
2. 扩招修正:扩招25%(≥10%),等效位次 = 1185 × (1 + 0.15) = 1185 × 1.15 = 1362.75 ≈ 1363名。
|
||||
3. 用户位次 = 1050名,小于等效位次1363,用户更优。
|
||||
4. 相对位置 = (1050 - 1363) / 1363 = -313 / 1363 ≈ -0.2296。
|
||||
5. 落在第一档(≤ 0.85×1363=1158.55)?1050 ≤ 1158.55,是 → 概率区间 90%-95%。
|
||||
· 插值:90% + (1050-? 具体线性映射) 可简化直接给92%。
|
||||
6. 输出:录取概率 92%,等级“稳妥”,建议“可作为保底志愿”。
|
||||
|
||||
---
|
||||
|
||||
第四部分:前端与交互要点
|
||||
|
||||
4.1 出分前界面
|
||||
|
||||
· 显示“预估模式”标识。
|
||||
· 用户输入预估分后,系统展示推荐院校列表,仅显示等级(稳妥/可冲/谨慎冲刺/风险较高),不显示百分比概率。
|
||||
· 提示:“当前位次为估算值,4月9日后输入真实分数可获精准概率。”
|
||||
|
||||
4.2 出分后界面
|
||||
|
||||
· 用户输入真实分数,系统自动从26年一分一段表匹配位次(也可让用户手动输入位次)。
|
||||
· 展示每个院校的录取概率(百分比) + 等级 + 详细对比数据。
|
||||
· 对于新增专业,展示特殊标签“🆕新增专业”和基于计划人数的概率。
|
||||
|
||||
4.3 数据刷新
|
||||
|
||||
· 4月9日当天,系统后台导入官方26年一分一段表,前端自动启用真实位次模式。
|
||||
· 对于之前已输入预估分的用户,可提示“您的真实分数已公布,点击更新推荐”。
|
||||
|
||||
---
|
||||
|
||||
第五部分:公式与参数汇总表
|
||||
|
||||
用途 公式 参数
|
||||
预估位次(出分前) 调整分 = 预估分 - (预估省控线_26 - 省控线_25) 位次_25查表 预估位次 = 位次_25 × (总人数系数) 总人数系数默认1.0,后台可调
|
||||
历史位次加权 加权位次 = w×位次_25 + (1-w)×位次_24 w=0.7
|
||||
计划修正(扩招) 等效位次 = 加权位次 × (1 + 扩招系数) 扩招系数=0.15
|
||||
计划修正(缩招) 等效位次 = 加权位次 × (1 - 缩招系数) 缩招系数=0.20
|
||||
概率分段 见上文表格 阈值系数:0.85, 1.15
|
||||
新增专业概率 公办:70%,民办:60%,超计划:30% 后台可调
|
||||
|
|
@ -0,0 +1 @@
|
|||
这是在看
|
||||
Loading…
Reference in New Issue