Skip to content

Commit

Permalink
Merge pull request #11 from Zuoqiu-Yingyi/dev
Browse files Browse the repository at this point in the history
chore: release v0.2.0
  • Loading branch information
Zuoqiu-Yingyi authored Oct 6, 2023
2 parents e280b74 + 11b3d90 commit 31991d3
Show file tree
Hide file tree
Showing 57 changed files with 4,084 additions and 352 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:

env:
PACKAGE_NAME: monaco-editor
PACKAGE_VERSION: 0.1.2
PACKAGE_VERSION: 0.2.0

jobs:
release-please:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
* **custom-font:** 优化字体列表样式 | Optimize font list style. ([bcb99eb](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/commit/bcb99eb4ef253ad4b2c301866caac5d544fb215a))
* **monaco-editor:** 调整菜单文本 | Adjust menu text. ([46d702c](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/commit/46d702c542387b8bd4c8f6192c91abc8ccc36c89))


## 0.1.0 (2023-08-01)


Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[![GitHub License](https://img.shields.io/github/license/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/blob/main/LICENSE)
[![GitHub last commit](https://img.shields.io/github/last-commit/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/commits/main)
![GitHub repo size](https://img.shields.io/github/repo-size/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?style=flat-square)
![GitHub code size](https://img.shields.io/github/languages/code-size/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor.svg?style=flat-square)
![hits](https://hits.b3log.org/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor.svg)
[![GitHub all releases](https://img.shields.io/github/downloads/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/total?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/releases)

Expand Down
31 changes: 31 additions & 0 deletions iframes/vditor.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
Copyright (C) 2023 Zuoqiu Yingyi
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vditor</title>
<script async type="module" src="~/src/iframes/vditor.ts"></script>
</head>

<body>
</body>

</html>
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
{
"name": "monaco-editor",
"private": true,
"version": "0.1.2",
"version": "0.20",
"type": "module",
"scripts": {
"dev": "vite",
"build:dev": "npm run build:dev:plugin && npm run build:dev:iframes",
"build:dev:plugin": "vite build --mode plugin --sourcemap inline ",
"build:dev:iframes": "vite build --mode iframes --sourcemap inline ",
"build": "npm run build:icons && npm run build:plugin && npm run build:iframes",
"build:dev": "vite build --mode plugin --sourcemap inline && vite build --mode iframes --sourcemap inline",
"build:icons": "node --no-warnings=ExperimentalWarning --loader ts-node/esm ./scripts/build-icons.ts",
"build:plugin": "vite build --mode plugin",
"build:iframes": "vite build --mode iframes",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
"@monaco-editor/loader": "^1.3.3",
"@sveltejs/vite-plugin-svelte": "^2.4.5",
"@monaco-editor/loader": "^1.4.0",
"@siyuan-community/vditor": "^3.9.5",
"@sveltejs/vite-plugin-svelte": "^2.4.6",
"@tsconfig/svelte": "^4.0.1",
"@types/node": "^20.5.0",
"@types/streamsaver": "^2.0.1",
"@types/node": "^20.8.2",
"@types/streamsaver": "^2.0.2",
"deepmerge": "^4.3.1",
"less": "^4.2.0",
"material-icon-theme": "^4.29.0",
"material-icon-theme": "^4.31.0",
"monaco-editor": "^0.41.0",
"streamsaver": "^2.0.6",
"svelte": "^3.59.2",
"svelte-check": "^3.5.0",
"svelte": "^4.2.1",
"svelte-check": "^3.5.2",
"svelte-preprocess-less": "^0.4.0",
"ts-node": "^10.9.1",
"tslib": "^2.6.1",
"typescript": "^5.1.6",
"vite": "^4.4.9",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vite": "^4.4.11",
"vite-plugin-static-copy": "^0.16.0",
"xml-js": "^1.6.11"
},
Expand Down
33 changes: 33 additions & 0 deletions public/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![GitHub License](https://img.shields.io/github/license/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/blob/main/LICENSE)
[![GitHub last commit](https://img.shields.io/github/last-commit/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/commits/main)
![GitHub repo size](https://img.shields.io/github/repo-size/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?style=flat-square)
![GitHub code size](https://img.shields.io/github/languages/code-size/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor.svg?style=flat-square)
![hits](https://hits.b3log.org/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor.svg)
[![GitHub all releases](https://img.shields.io/github/downloads/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/total?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/releases)

Expand Down Expand Up @@ -107,6 +108,38 @@ This panel displays the markdown/kramdown source code of the currently edited bl
* This is a switch
* Default state: *enabled*
* This switch controls whether the right-click menu in the snapshot tab of the file history dialog is enabled. This menu allows you to open Monaco Editor in compare mode to view changes in snapshots
* `Editor Settings`

* `Global Settings`

* `Default Editor for Markdown Files`

* Set the default editor for opening `*.md` files
* Default is to open `*.md` files with the Vditor editor
* `Vditor Editor`

* `Resource File Saving Scheme`

* Specify the scheme for saving (image, etc.) resource files. Different schemes will save resource files in different directories. The actual saving directory will also be affected by the <kbd>Editor Settings > Vditor Editor > Resource File Saving Directory</kbd> option.
* `Resource File Saving Directory`

* Specify the exact directory for saving resource files. The actual saving directory will also be affected by the <kbd>Editor Settings > Vditor Editor > Resource File Saving Scheme</kbd> option.
* Examples

* `Resource File Saving Scheme`: `Upload to data/assets directory`

* `/assets/`: Save the resource files in the `workspace/data/assets/` directory
* `/assets/vditor/`: Save the resource files in the `workspace/data/assets/vditor/` directory
* `Resource File Saving Scheme`: `Specify directory using relative path`

* `./`: Save the resource files in the same directory as the current file
* `./../`: Save the resource files in the parent directory of the current file
* `./assets/`: Save the resource files in the `assets` folder of the current file's directory
* `Resource File Saving Scheme`: `Specify directory using absolute path`

* `/`: Save the resource files in the `workspace/` directory
* `/assets/`: Save the resource files in the `workspace/assets/` directory
* `/vditor/assets/`: Save the resource files in the `workspace/vditor/assets/` directory

## CHANGELOG

Expand Down
33 changes: 33 additions & 0 deletions public/README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![GitHub 许可证](https://img.shields.io/github/license/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/blob/main/LICENSE)
[![GitHub 最后一次提交时间](https://img.shields.io/github/last-commit/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/commits/main)
![GitHub 仓库大小](https://img.shields.io/github/repo-size/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?style=flat-square)
![GitHub 代码大小](https://img.shields.io/github/languages/code-size/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor.svg?style=flat-square)
![查看次数](https://hits.b3log.org/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor.svg)
[![GitHub 发行版本下载次数](https://img.shields.io/github/downloads/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/total?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/releases)

Expand Down Expand Up @@ -107,6 +108,38 @@
* 这是一个开关
* 默认状态: *打开*
* 该开关控制是否启用文件历史对话框中快照选项卡页签的右键菜单, 该菜单可以打开 Monaco Editor 以对比模式查看快照的更改
* `编辑器设置`

* `全局设置`

* `Markdown 文件默认编辑器`

* 设置打开 `*.md` 文件的默认编辑器
* 默认使用 `Vditor` 编辑器打开 `*.md` 文件
* `Vditor 编辑器`

* `资源文件保存方案`

* 指定保存(图片等)资源文件的方案, 不同的方案会将资源文件文件保存至不同的目录, 具体的保存目录还会受到 <kbd>编辑器设置 &gt; Vditor 编辑器 &gt; 资源文件保存目录</kbd> 设置项的影响
* `资源文件保存目录`

* 指定资源文件具体的保存目录, 实际的保存目录还受到 <kbd>编辑器设置 &gt; Vditor 编辑器 &gt; 资源文件保存方案</kbd> 设置项的影响
* 示例

* `资源文件保存方案`: `上传至 data/assets 目录`

* `/assets/`: 将资源文件保存至 `工作空间/data/assets/` 目录下
* `/assets/vditor/`: 将资源文件保存至 `工作空间/data/assets/vditor/` 目录下
* `资源文件保存方案`: `使用相对路径指定目录`

* `./`: 将资源文件保存至当前文件所在目录下
* `./../`: 将资源文件保存至当前文件所在目录的上层目录下
* `./assets/`: 将资源文件保存至当前文件所在目录的 `assets` 文件夹下
* `资源文件保存方案`: `使用绝对路径指定目录`

* `/`: 将资源文件保存至 `工作空间/` 目录下
* `/assets/`: 将资源文件保存至 `工作空间/assets/` 目录下
* `/vditor/assets/`: 将资源文件保存至 `工作空间/vditor/assets/` 目录下

## 更改日志

Expand Down
35 changes: 35 additions & 0 deletions public/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,41 @@
"openAnyway": "Open Anyway?"
},
"settings": {
"editorSettings": {
"globalTab": {
"defaultEditor": {
"markdown": {
"description": "Set the default editor for opening <code class='fn__code'>*.md</code> files",
"options": {
"monaco": "Monaco Editor",
"vditor": "Vditor Editor"
},
"title": "Default Editor for Markdown Files"
}
},
"title": "Global Settings"
},
"monacoTab": {
"title": "Monaco Editor"
},
"title": "Editor Settings",
"vditorTab": {
"assetsDirPath": {
"description": "Set the directory for saving resource files, the specific directory depends on the <code class='fn__code'>Resource File Saving Scheme</code> setting",
"title": "Resource File Saving Directory"
},
"assetsUploadMode": {
"description": "Save resource files to a specific directory, the specific directory depends on the <code class='fn__code'>Resource File Saving Directory</code> setting.<br/><code class='fn__code'>Upload to data/assets directory</code>: Upload files to the <code class='fn__code'>workspace/data/assets</code> directory, the specific directory is specified by the <code class='fn__code'>Resource File Saving Directory</code> setting.<br/><code class='fn__code'>Use relative path to specify directory</code>: Upload files to the directory specified by the <code class='fn__code'>Resource File Saving Directory</code> setting, with the working directory being the current file directory.<br/><code class='fn__code'>Use absolute path to specify directory</code>: Upload files to the directory specified by the <code class='fn__code'>Resource File Saving Directory</code> setting, with the working directory being the workspace directory.",
"options": {
"absolute": "Use absolute path to specify directory",
"assets": "Upload to data/assets directory",
"relative": "Use relative path to specify directory"
},
"title": "Resource File Saving Scheme"
},
"title": "Vditor Editor"
}
},
"generalSettings": {
"editor": {
"description": "Enable text editor sidebar panel",
Expand Down
35 changes: 35 additions & 0 deletions public/i18n/zh_CHT.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,41 @@
"openAnyway": "繼續開啟?"
},
"settings": {
"editorSettings": {
"globalTab": {
"defaultEditor": {
"markdown": {
"description": "設置打開 <code class='fn__code'>*.md</code> 文件所使用的默認編輯器",
"options": {
"monaco": "Monaco 編輯器",
"vditor": "Vditor 編輯器"
},
"title": "Markdown 文件默認編輯器"
}
},
"title": "全局設置"
},
"monacoTab": {
"title": "Monaco 編輯器"
},
"title": "編輯器設置",
"vditorTab": {
"assetsDirPath": {
"description": "設置保存資源文件的目錄,具體的目錄與設置項 <code class='fn__code'>資源文件保存方案</code> 有關",
"title": "資源文件保存目錄"
},
"assetsUploadMode": {
"description": "將資源文件保存至指定目錄,具體的目錄與設置項 <code class='fn__code'>資源文件保存目錄</code> 有關<br/><code class='fn__code'>上傳至 data/assets 目錄</code>:將文件上傳至 <code class='fn__code'>工作空間/data/assets</code> 目錄,具體的目錄由 <code class='fn__code'>資源文件保存目錄</code> 指定<br/><code class='fn__code'>使用相對路徑指定目錄</code>:將文件上傳至由設置項 <code class='fn__code'>資源文件保存目錄</code> 指定的目錄,工作目錄為當前文件所在目錄<br/><code class='fn__code'>使用絕對路徑指定目錄</code>:將文件上傳至由設置項 <code class='fn__code'>資源文件保存目錄</code> 指定的目錄,工作目錄為工作空間目錄",
"options": {
"absolute": "使用絕對路徑指定目錄",
"assets": "上傳至 data/assets 目錄",
"relative": "使用相對路徑指定目錄"
},
"title": "資源文件保存方案"
},
"title": "Vditor 編輯器"
}
},
"generalSettings": {
"editor": {
"description": "是否啟用文字編輯器側邊面板",
Expand Down
35 changes: 35 additions & 0 deletions public/i18n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,41 @@
"openAnyway": "仍然打开?"
},
"settings": {
"editorSettings": {
"globalTab": {
"defaultEditor": {
"markdown": {
"description": "设置打开 <code class='fn__code'>*.md</code> 文件所使用的默认编辑器",
"options": {
"monaco": "Monaco 编辑器",
"vditor": "Vditor 编辑器"
},
"title": "Markdown 文件默认编辑器"
}
},
"title": "全局设置"
},
"monacoTab": {
"title": "Monaco 编辑器"
},
"title": "编辑器设置",
"vditorTab": {
"assetsDirPath": {
"description": "设置保存资源文件的目录,具体的目录与设置项 <code class='fn__code'>资源文件保存方案</code> 有关",
"title": "资源文件保存目录"
},
"assetsUploadMode": {
"description": "将资源文件保存至指定目录,具体的目录与设置项 <code class='fn__code'>资源文件保存目录</code> 有关<br/><code class='fn__code'>上传至 data/assets 目录</code>:将文件上传至 <code class='fn__code'>工作空间/data/assets</code> 目录,具体的目录由 <code class='fn__code'>资源文件保存目录</code> 指定<br/><code class='fn__code'>使用相对路径指定目录</code>:将文件上传至由设置项 <code class='fn__code'>资源文件保存目录</code> 指定的目录,工作目录为当前文件所在目录<br/><code class='fn__code'>使用绝对路径指定目录</code>:将文件上传至由设置项 <code class='fn__code'>资源文件保存目录</code> 指定的目录,工作目录为工作空间目录",
"options": {
"absolute": "使用绝对路径指定目录",
"assets": "上传至 data/assets 目录",
"relative": "使用相对路径指定目录"
},
"title": "资源文件保存方案"
},
"title": "Vditor 编辑器"
}
},
"generalSettings": {
"editor": {
"description": "是否启用文本编辑器侧边面板",
Expand Down
4 changes: 2 additions & 2 deletions public/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "monaco-editor",
"author": "Zuoqiu Yingyi",
"url": "https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor",
"version": "0.1.2",
"minAppVersion": "2.10.0",
"version": "0.2.0",
"minAppVersion": "2.10.1",
"backends": [
"all"
],
Expand Down
Loading

0 comments on commit 31991d3

Please sign in to comment.