mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 19:59:41 +08:00

* opti: prevent the duplicated header text error * scroll error in toc * delay the change event when init muya, so that the change event listener can handle change event. * opti: style * almost finished need last check * style in table * clear up some unused codes * clear up theme hard code * add no search data picture and new Folder new File * move search and replace to top of editor * add: no data image when there is no TOC * update structure * little bug fix * update styles * update un_draw icons * update style of editor * add animation when make open folder collapse. * remove theme props in editor component, deprecated lightColor and darkColor * add Ulysses Light * theme: graphite * update Ulysses blockquote * update emoji style * update titleBar height * change theme color * Support macOs dark mode * update style of tooltip in editor * update styles * fix: TOC auto expand all * patch added
80 lines
1.3 KiB
JavaScript
80 lines
1.3 KiB
JavaScript
import path from 'path'
|
|
|
|
export const isOsx = process.platform === 'darwin'
|
|
export const isWindows = process.platform === 'win32'
|
|
export const isLinux = process.platform === 'linux'
|
|
|
|
export const defaultWinOptions = {
|
|
icon: path.join(__static, 'logo-96px.png'),
|
|
minWidth: 450,
|
|
minHeight: 220,
|
|
webPreferences: {
|
|
nodeIntegration: true,
|
|
webSecurity: false
|
|
},
|
|
useContentSize: true,
|
|
show: false,
|
|
frame: false,
|
|
titleBarStyle: 'hiddenInset'
|
|
}
|
|
|
|
export const EXTENSIONS = [
|
|
'markdown',
|
|
'mdown',
|
|
'mkdn',
|
|
'md',
|
|
'mkd',
|
|
'mdwn',
|
|
'mdtxt',
|
|
'mdtext',
|
|
'text',
|
|
'txt'
|
|
]
|
|
|
|
export const IMAGE_EXTENSIONS = [
|
|
'jpeg',
|
|
'jpg',
|
|
'png',
|
|
'gif',
|
|
'svg',
|
|
'webp'
|
|
]
|
|
|
|
export const PANDOC_EXTENSIONS = [
|
|
'html',
|
|
'docx',
|
|
'latex',
|
|
'tex',
|
|
'ltx',
|
|
'rst',
|
|
'rest',
|
|
'org',
|
|
'wiki',
|
|
'dokuwiki',
|
|
'textile',
|
|
'opml',
|
|
'epub'
|
|
]
|
|
|
|
// export const PROJECT_BLACK_LIST = [
|
|
// 'node_modules',
|
|
// '.git',
|
|
// '.DS_Store'
|
|
// ]
|
|
|
|
export const BLACK_LIST = [
|
|
'$RECYCLE.BIN'
|
|
]
|
|
|
|
export const EXTENSION_HASN = {
|
|
styledHtml: '.html',
|
|
pdf: '.pdf'
|
|
}
|
|
|
|
export const TITLE_BAR_HEIGHT = isOsx ? 21 : 25
|
|
export const LINE_ENDING_REG = /(?:\r\n|\n)/g
|
|
export const LF_LINE_ENDING_REG = /(?:[^\r]\n)|(?:^\n$)/
|
|
export const CRLF_LINE_ENDING_REG = /\r\n/
|
|
|
|
export const GITHUB_REPO_URL = 'https://github.com/marktext/marktext'
|