Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
129 lines (129 loc) · 5.13 KB
/
Copy pathpackage.json
File metadata and controls
129 lines (129 loc) · 5.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"name": "marktext-vscode",
"displayName": "MarkText Editor",
"description": "WYSIWYG Markdown editor for VS Code, powered by MarkText's @muyajs/core (muya) engine.",
"version": "0.6.2",
"publisher": "marktext-vscode",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/acester822/marktext-vscode.git"
},
"engines": {
"vscode": "^1.85.0"
},
"categories": [
"Other"
],
"main": "./out/extension.js",
"activationEvents": [
"onCustomEditor:marktext-vscode.marktextEditor",
"onCommand:marktext-editor.open",
"onCommand:marktext-editor.reloadWebview"
],
"contributes": {
"customEditors": [
{
"viewType": "marktext-vscode.marktextEditor",
"displayName": "MarkText WYSIWYG",
"selector": [
{
"filenamePattern": "*.md"
}
],
"priority": "option"
}
],
"configuration": {
"title": "MarkText Editor",
"properties": {
"marktext.editor.defaultForMarkdown": {
"type": "boolean",
"default": false,
"description": "Open .md files in the MarkText WYSIWYG editor by default instead of the built-in Monaco text editor. Toggle this off to always use the classic editor (you can still switch per-file from the editor title bar)."
},
"marktext.editor.maxContentWidth": {
"type": "number",
"default": 125,
"minimum": 0,
"description": "Max width of the editing column, in characters (ch units). The column is capped at this width and centered in the webview (margins on both sides) while text stays left-aligned inside it. Default 125. Set to 0 to fill the webview's full width instead. Tables and fenced code blocks follow the same width."
},
"marktext.editor.tableMaxWidth": {
"type": "number",
"default": 1800,
"minimum": 0,
"description": "Max width, in pixels, that a table may grow to when its content exceeds the editing column and the webview has room. The table breaks out of the column and is recentered in the webview, leaving a ~200px gap on each side. Default 1800. Set to 0 to keep tables inside the text column (previous behavior)."
}
}
},
"commands": [
{
"command": "marktext-editor.open",
"title": "MarkText: Open WYSIWYG Editor"
},
{
"command": "marktext-editor.reloadWebview",
"title": "MarkText: Reload Webview"
},
{
"command": "marktext-editor.toggleDev",
"title": "MarkText: Toggle Dev Mode (verbose logging)"
},
{
"command": "marktext-editor.useClassic",
"title": "MarkText: Switch to Classic Editor",
"icon": "$(edit)"
},
{
"command": "marktext-editor.useWysiwyg",
"title": "MarkText: Switch to WYSIWYG Editor",
"icon": "$(markdown)"
}
],
"menus": {
"editor/title": [
{
"command": "marktext-editor.useClassic",
"when": "resourceExtname == .md && marktext.editor.isWysiwyg",
"group": "navigation"
},
{
"command": "marktext-editor.useWysiwyg",
"when": "resourceExtname == .md && !marktext.editor.isWysiwyg",
"group": "navigation"
}
],
"explorer/context": [
{
"command": "marktext-editor.open",
"when": "resourceExtname == .md"
}
]
}
},
"scripts": {
"vendor:muya": "bash scripts/vendor-muya.sh",
"build:host": "esbuild src/extension.ts --bundle --platform=node --external:vscode --format=cjs --outfile=out/extension.js --sourcemap",
"build:web": "esbuild webview/src/muya-styles.css --bundle --loader:.css=css --loader:.woff=dataurl --loader:.woff2=dataurl --loader:.ttf=dataurl --loader:.svg=dataurl --loader:.png=dataurl --outfile=out/webview/main.css --define:process.env.NODE_ENV='\"production\"' && esbuild webview/src/main.ts --bundle --format=iife --outfile=out/webview/main.js --sourcemap --alias:@muyajs/core=./vendor/muya/lib/es/index.js --loader:.png=dataurl --loader:.svg=dataurl --loader:.woff=dataurl --loader:.woff2=dataurl --loader:.ttf=dataurl --loader:.css=empty --define:process.env.NODE_ENV='\"production\"'",
"build:editor": "esbuild webview/src/excalidraw-editor.tsx --bundle --format=iife --outfile=out/webview/excalidraw-editor.js --sourcemap --loader:.css=empty --jsx=automatic --define:process.env.NODE_ENV='\"production\"'",
"build": "npm run build:host && npm run build:web && npm run build:editor",
"test": "vitest run",
"test:watch": "vitest",
"watch": "npm run build:host -- --watch=forever & npm run build:web -- --watch=forever & npm run build:editor -- --watch=forever & wait",
"dev": "npm run watch",
"vscode:prepublish": "npm run build"
},
"devDependencies": {
"@excalidraw/excalidraw": "^0.18.1",
"@types/node": "^20.19.43",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@types/vscode": "^1.85.0",
"esbuild": "^0.21.5",
"jsdom": "^30.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"typescript": "^5.4.5",
"vitest": "^3.2.7"
}
}