1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +00:00

Compare commits

...

136 Commits

Author SHA1 Message Date
Junyoung Choi
1195c77f7a v0.14.0 2020-01-03 11:28:19 -05:00
Flexo013
c373c207c0 Added link to downloads 2019-12-29 07:21:13 +09:00
Junyoung Choi
65e83e7017 Merge pull request #2585 from daiyam/fix-mermaid-height
fix height of mermaid diagrams
2019-12-25 05:07:07 -05:00
Abner Soares Alves Junior
3c12e0d119 Fix emoji render on notes list 2019-12-24 06:54:20 +09:00
Abner Soares Alves Junior
60d6c68e48 Add some translations 2019-12-24 06:53:26 +09:00
Abner Soares Alves Junior
d8605965a8 Add Ok button to export confirmation box 2019-12-24 06:53:26 +09:00
Yuki Furukawa
6d455fc286 remove redundant conditions of macOS in main-menu 2019-12-24 06:39:18 +09:00
Mayke
2882667e94 rebuilding test snapshots 2019-12-24 06:36:53 +09:00
Mayke
7fa578880e refactoring to use the new .markdownIt-TOC-wrapper div 2019-12-24 06:36:53 +09:00
Mayke
3f465df1cd configuring a div wrapper for TOC plugin to use overflow-y in <ul> and still use &:before on parent element 2019-12-24 06:36:53 +09:00
Mayke
c423784cc5 adding TOC UI 2019-12-24 06:36:53 +09:00
Nicholas Browning
ce853a7e3a Export: CSS: adjusted relative path 2019-12-24 06:23:51 +09:00
Nicholas Browning
099ebad06b Export: uses markdown preview dom. Supports diagrams 2019-12-24 06:23:51 +09:00
Junyoung Choi
75a1347ae1 Update readme and contributing 2019-12-23 10:02:41 +09:00
Baptiste Augrain
b83d3e5c33 Merge branch 'master' into fix-mermaid-height 2019-12-22 23:46:47 +01:00
Junyoung Choi
1a7c719a4e Update new BoostNote info 2019-11-26 14:03:57 +09:00
Jack Hsieh
d78f6b7aba Ability to stop auto update 2019-11-22 05:42:55 +09:00
dependabot[bot]
7d4d176bf4 Bump js-yaml from 3.12.0 to 3.13.1
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.0 to 3.13.1.
- [Release notes](https://github.com/nodeca/js-yaml/releases)
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.12.0...3.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2019-11-22 03:57:10 +09:00
hikerpig
52ea44ceaa Remove overcomplicated solution for scrollbar styling. 2019-11-22 03:55:39 +09:00
Nicholas Browning
132d04326b TOC: Scrolling: Fixed TOC links and scrolling 2019-11-22 03:55:39 +09:00
nam
9996b5d686 bump mermaid version to support state diagrams 2019-11-22 03:47:42 +09:00
Rafael Gonzaga
e9d9f49ff3 minor changes
just to improve reading file
2019-11-22 03:47:03 +09:00
Nicholas Browning
95300546dc Delete Dialog: typo for the "type" property 2019-11-22 03:46:45 +09:00
Itai Braude
489fc6578b changed webpack config back to original 2019-11-22 03:46:22 +09:00
Itai Braude
edebba6680 added more admonition styles 2019-11-22 03:46:22 +09:00
dependabot[bot]
72c2a20a74 Bump lodash from 4.17.10 to 4.17.13
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.10 to 4.17.13.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.10...4.17.13)

Signed-off-by: dependabot[bot] <support@github.com>
2019-11-22 03:30:33 +09:00
PetrTodorov
abef6c5fee Added Czech translation (#3264)
* Added Czech translation

* Update locales/de.json

Fixed german translation as suggested.

Co-Authored-By: Simon <simon81186@aol.com>
2019-11-04 14:44:09 +09:00
Junyoung Choi
662ae73637 Upgrade electron to v4 2019-10-29 13:28:51 +09:00
roottool
3ef485548a Removed a single quotation 2019-10-28 18:16:59 +09:00
roottool
a90c10ef3e removed single quotation 2019-10-28 18:16:59 +09:00
roottool
d43fe8db75 #3147 fix: added script tag and stylesheet 2019-10-28 18:16:59 +09:00
AWolf81
1d84cac922 Rephrase error messages 2019-10-28 18:10:21 +09:00
AWolf81
5280b6ed63 Add error handling 2019-10-28 18:10:21 +09:00
hikerpig
77833ff980 Fix preview-window's scroll behavior, #3289 2019-10-28 18:09:29 +09:00
Junyoung Choi
d010c5532d v0.13.0 2019-10-16 20:18:47 +09:00
hikerpig
f2dc8b8020 optimize: npm 'test' script should contain jest tests 2019-10-15 13:24:44 +09:00
Junyoung Choi
1798353eac Merge pull request #3173 from hikerpig/feature/toc
Suppport auto generating toc content for the [TOC] tag
2019-10-15 13:24:30 +09:00
Kazumasa Yokomizo
772a8b2383 Updated the readme 2019-10-14 13:34:27 +09:00
hikerpig
5690c8361a 🔥 remove obsolete snap file 2019-10-11 10:41:38 +08:00
hikerpig
6d09cf227c Merge remote-tracking branch 'origin/master' into feature/toc
Fix conflicts
2019-10-10 18:23:39 +08:00
Junyoung Choi
8736666e91 Fix default prettier hotkey 2019-10-10 18:01:27 +09:00
Junyoung Choi
d1fd5cfb45 Set prettier external deps 2019-10-10 18:01:09 +09:00
hikerpig
3eabf95fb3 optimize implementation for a0c15182 2019-10-10 16:34:28 +09:00
hikerpig
8ea920ef91 fix: Can't open external browser in Markdown Preview with external link containing '#', close #3213 2019-10-10 16:34:28 +09:00
jhdcruz
3c0f20f364 Single Instance fix #3241
Fixes single instance depreciation
2019-10-10 16:33:21 +09:00
alwxkxk
59f8425c97 fix #2935 2019-10-10 16:29:55 +09:00
hikerpig
f181a7e459 more strict regex pattern in pathname matching, fix #3183 2019-10-10 16:29:27 +09:00
MSSandroid
6b1c595f87 add test for PlantUml Ditaa 2019-10-10 16:26:57 +09:00
MSSandroid
0003de8f08 remove code redundancy in parsing of PlantUml 2019-10-10 16:26:57 +09:00
MSSandroid
5357d8dc04 remove code redundancy in parsing of PlantUml 2019-10-10 16:26:57 +09:00
MSSandroid
d069722bf9 require(\'markdown-it-plantuml\') only once 2019-10-10 16:26:57 +09:00
MSSandroid
3f4dd49a8f added missing newline at end of document 2019-10-10 16:26:57 +09:00
Michael Schuldes
be06b3f7e8 Added plantUML Gantt support 2019-10-10 16:26:57 +09:00
Michael Schuldes
5044bdda00 Added plantUML wbs support 2019-10-10 16:26:57 +09:00
Michael Schuldes
fbeffb0b5d Added plantUML mindmap support 2019-10-10 16:26:57 +09:00
Olcod
ef0af39aa7 Added package-lock file to the gitignore 2019-10-10 16:13:45 +09:00
Olcod
0697bc0a74 Add ability to sort lines with a hot key combination 2019-10-10 16:13:45 +09:00
Aleksei Seletskiy
43d8ebb3c4 Dracula theme buttons in storage settings fix 2019-09-14 13:20:50 +09:00
Robert Weber
68175cd71b Add sidebar collapse button to sidebar while viewing the tags list
Fixes #2097
2019-09-14 13:20:37 +09:00
amedora
f4d87f64ae Fix #3190 - App blanks out after setting HotKey (#3193)
* fix lack of hotkey properties

* Update HotkeyTab.js
2019-09-03 02:24:09 +09:00
Junyoung Choi
68b3077651 Merge pull request #3099 from AWolf81/html-to-md
Html to md feature
2019-09-03 02:03:51 +09:00
Junyoung Choi
1332b337f3 Merge pull request #3136 from hikerpig/feature/scrollbarAppearance
tweak MarkdownPreview style to optimize overflow scrollbar display
2019-09-03 02:03:23 +09:00
hikerpig
e9975d1ea5 fix: HotkeyTab accidentally set incomplete hotkey, related #3190 2019-09-03 01:59:59 +09:00
Thamara Andrade
2c103aca3d Fix #888 - Wrong word count due splitting 2019-09-03 01:54:53 +09:00
Thamara Andrade
c0a5eb0d2b Fix #888 - Wrong word count due splitting 2019-09-03 01:54:53 +09:00
霸气千秋
ff7c4495f0 format locale files 2019-09-03 01:53:45 +09:00
minbaby.zhang
35fe639cd2 optimize translate 2019-09-03 01:53:45 +09:00
minbaby.zhang
59add8982e update lang 2019-09-03 01:53:45 +09:00
minbaby.zhang
8d9c514097 update lang 2019-09-03 01:53:45 +09:00
minbaby.zhang
6f880d0f02 更新翻译 2019-09-03 01:53:45 +09:00
AWolf81
ec47ee8110 Remove manual script tag filter and use turndown remove filter 2019-08-31 21:35:09 +02:00
Nguyễn Việt Hưng
28b8141c6b fixed test 2019-08-30 12:46:40 +09:00
Nguyễn Việt Hưng
5b0b309c49 added test for getAttachmentsPathAndStatus 2019-08-30 12:46:40 +09:00
Nguyễn Việt Hưng
0b84a372f6 re-organize attachment functions and updated comments doc 2019-08-30 12:46:40 +09:00
Nguyễn Việt Hưng
8355e1e006 updated function name and return type 2019-08-30 12:46:40 +09:00
Nguyễn Việt Hưng
c7d33fbd83 Allow user to view attachments and clear unused attachments 2019-08-30 12:46:40 +09:00
ehhc
cf324d93fe Add option to disable the automiatic deletion of un-referenced attachments -> might fix #3203 2019-08-30 12:46:40 +09:00
hikerpig
9a704a2bcb Merge branch 'master' into feature/scrollbarAppearance 2019-08-26 10:38:26 +08:00
hikerpig
1e00651541 feature/toc: upgrade "@hikerpig/markdown-it-toc-and-anchor" package to avoid default anchor lowercase casting 2019-08-25 18:25:17 +08:00
AWolf81
857e75594d Disable Javascript for printout window 2019-08-24 13:43:36 +09:00
AWolf81
2f1dadfc3e Change drag disable styles to be more specific 2019-08-24 13:43:14 +09:00
AWolf81
7d0404657e Fix routing for tag filtering 2019-08-24 13:42:09 +09:00
Junyoung Choi
b9dd651fc1 Merge pull request #3093 from nathan-castlehow/feat-run-prettier-on-markdown
Feat run prettier on markdown
2019-08-24 13:41:41 +09:00
hikerpig
25ef456af2 feat: should scroll to top after selecting another note, also fix #3023 2019-08-24 13:39:28 +09:00
hikerpig
084decaa85 improvement: MarkdownPreview, rewriteIframe attempt can be combined to one call 2019-08-24 13:39:28 +09:00
hikerpig
330a444fc5 optimize: should highlight any non-empty search query, fix #3164 2019-08-24 13:38:28 +09:00
alwxkxk
a47dac2854 fix #3159 2019-08-24 13:38:09 +09:00
Ronald Walker
08070f3e2d fix #3144 2019-08-24 13:37:43 +09:00
hikerpig
2352c78cb6 Add CodeEditor::setLineContent method to manipulate line contents, related #3163
Avoid changing all CodeMirror instance's contents
2019-08-24 13:36:56 +09:00
Antonio Cangiano
6ef9c3865f Fix JavaScript hello world example
The current snippet note example references a non-existent element with id `enjoy`. I updated it to reference the correct id (i.e., `hello`).
2019-08-24 13:36:29 +09:00
sirrah23
ff9789b5a7 Fix 3060
Right now there are only two export types that are using a special
output formatter, pdf and html. Both of these formatters currently populate the
`/html/head/base` portion of the associated html document with the name
of the target directory for the file that the user is exporting.

In order for internal links within the exported document to work
correctly, the value of base must also include the filename. This fix
removes the call to `path.dirname`, which gets rid of the necessary
filename.
2019-08-24 13:36:05 +09:00
Jack Hsieh
f09297f406 Fix 2636 (#3206)
* Fix 2636 Can't scroll to bottom of editor pane

* Fix minor lint issues
2019-08-11 23:22:53 +09:00
nathan-castlehow
2d3c69d178 Fixed eslint issue 2019-08-01 20:13:46 +08:00
nathan-castlehow
b837653cf1 Merged Master into feature branch and fixed conflicts 2019-08-01 20:12:58 +08:00
nathan-castlehow
eeca031c86 Merge upstream into master 2019-08-01 19:56:38 +08:00
nathan-castlehow
918a8627e9 Merge upstream into master 2019-08-01 19:55:21 +08:00
nathan-castlehow
86370edd1e Merge branch 'feat-run-prettier-on-markdown' of https://github.com/nathan-castlehow/Boostnote into feat-run-prettier-on-markdown 2019-08-01 18:36:40 +08:00
nathan-castlehow
1173631255 feat(prettierOnMarkdown): Forced prettier options to always have parser set to markdown when used. 2019-08-01 18:36:22 +08:00
nathan-castlehow
911fd9a004 feat(prettierOnMarkdown): Changed Prettier require to use import 2019-08-01 18:36:21 +08:00
nathan-castlehow
0ad3da5bbc feat(prettierOnMarkdown): Changed default hotkey value 2019-08-01 18:36:21 +08:00
nathan-castlehow
89ae2a9516 feat(prettierOnMarkdown):Fixed incorrect options passed to code mirror instance 2019-08-01 18:36:20 +08:00
nathan-castlehow
70892cae05 feat(prettierOnMarkdown):Tweaked spacing on default Prettier Config Value 2019-08-01 18:36:19 +08:00
nathan-castlehow
de0af153bc feat(prettierOnMarkdown):Added prettier config default to config manager 2019-08-01 18:36:19 +08:00
nathan-castlehow
33161e46e6 feat(prettierOnMarkdown): Added support for prettyifing markdown as well as added hot key option. Partial Implementation of Prettier config in configuration screen. TODO Fix defaulting of prettier configuration 2019-08-01 18:36:18 +08:00
nathan-castlehow
7e3c662374 feat(prettierOnMarkdown): Added Reference to prettier in Code Editor and created config file 2019-08-01 18:36:17 +08:00
nathan-castlehow
a39e9c2da6 feat(prettierOnMarkdown): Added Reference To Prettier 2019-08-01 18:36:16 +08:00
AWolf81
72b8d56245 Merge remote-tracking branch 'upstream/master' into html-to-md 2019-07-28 15:49:16 +02:00
AWolf81
0d36f59036 Create turndown service & use gfm turndown plugin 2019-07-28 15:02:17 +02:00
AWolf81
a3f7d2287a Add dracula theme styles 2019-07-28 11:00:40 +02:00
hikerpig
8edfbd28ed feat: suppport auto generating toc content for the '[TOC]' placeholder, related #3022 2019-07-27 16:55:32 +08:00
amedora
606be4304d Fix 3007 (#3028)
* fix code fences never sanitized

* fix mermaid xss

* Revert "fix mermaid xss"

This reverts commit 1ff179a1bd.

* configuable mermaid HTML label

* add locales for mermaid configuration
2019-07-27 12:39:12 +09:00
Junyoung Choi
329066719e 0.12.1 2019-07-27 11:51:40 +09:00
hikerpig
c2a26a8547 improvement: refactor buildStyle to NamedParameters style, and add some jsdoc 2019-07-21 15:28:12 +08:00
hikerpig
addf9b920f tweak MarkdownPreview style to optimize overflow scrollbar display, fix #2902 2019-07-21 15:28:12 +08:00
AWolf81
aeb77e5a40 Remove package-lock file & use startsWith for https check 2019-07-08 00:05:26 +02:00
nathan-castlehow
1d59d89588 feat(prettierOnMarkdown): Forced prettier options to always have parser set to markdown when used. 2019-07-03 09:28:36 +08:00
nathan-castlehow
bde357f952 feat(prettierOnMarkdown): Changed Prettier require to use import 2019-07-03 09:03:24 +08:00
AWolf81
558c091205 fix linting 2019-06-30 00:18:52 +02:00
AWolf81
f67175e628 fix test 2019-06-30 00:03:54 +02:00
AWolf81
390f6d545f fix PropTypes 2019-06-30 00:03:25 +02:00
AWolf81
44efb0178c Merge branch 'master' into html-to-md
# Conflicts:
#	browser/main/modals/NewNoteModal.js
#	package-lock.json
#	package.json
#	yarn.lock
2019-06-29 23:25:52 +02:00
AWolf81
37eee26bdf fix linting & routing 2019-06-29 23:21:32 +02:00
nathan-castlehow
ed4a670f0a feat(prettierOnMarkdown): Changed default hotkey value 2019-06-23 13:54:17 +08:00
nathan-castlehow
fbb9afe34f feat(prettierOnMarkdown):Fixed incorrect options passed to code mirror instance 2019-06-23 13:42:14 +08:00
nathan-castlehow
020bc11bd7 feat(prettierOnMarkdown):Tweaked spacing on default Prettier Config Value 2019-06-23 13:41:52 +08:00
nathan-castlehow
ae0837e29b feat(prettierOnMarkdown):Added prettier config default to config manager 2019-06-23 13:41:34 +08:00
nathan-castlehow
f0380ef733 feat(prettierOnMarkdown): Added support for prettyifing markdown as well as added hot key option. Partial Implementation of Prettier config in configuration screen. TODO Fix defaulting of prettier configuration 2019-06-23 13:40:20 +08:00
nathan-castlehow
25bdaf9f00 feat(prettierOnMarkdown): Added Reference to prettier in Code Editor and created config file 2019-06-23 13:34:47 +08:00
nathan-castlehow
ef1809305c feat(prettierOnMarkdown): Added Reference To Prettier 2019-06-23 13:34:47 +08:00
nathan-castlehow
090b5c32f0 feat: Added Context Menu for markdown preview mode and copy url when hyperlink 2019-06-09 13:28:53 +08:00
Baptiste Augrain
a58b6f1b49 Merge branch 'master' into fix-mermaid-height 2018-12-24 10:06:15 +01:00
Baptiste Augrain
b6b29e02f3 fix lint error 2018-11-08 14:41:25 +01:00
Baptiste Augrain
2fc37d54f2 fix height of mermaid's diagrams 2018-11-08 13:19:46 +01:00
Storm Burpee
18aae8cf7b getting very close 2018-05-28 22:12:04 +09:30
Storm Burpee
4a9bc69ac2 starting to write a test 2018-05-28 19:45:09 +09:30
Storm Burpee
d97e62f864 Import note from url with markdown 2018-05-26 17:00:12 +09:30
89 changed files with 5794 additions and 3855 deletions

View File

@@ -18,7 +18,9 @@
"globals": {
"FileReader": true,
"localStorage": true,
"fetch": true
"fetch": true,
"Image": true,
"MutationObserver": true
},
"env": {
"jest": true

1
.gitignore vendored
View File

@@ -10,3 +10,4 @@ node_modules/*
*.log
.idea
.vscode
package-lock.json

View File

@@ -3,7 +3,6 @@ node_js:
- 8
script:
- npm run lint && npm run test
- yarn jest
- 'if [[ ${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} = "master" ]]; then npm install -g grunt npm@6.4 && grunt pre-build; fi'
after_success:
- openssl aes-256-cbc -K $encrypted_440d7f9a3c38_key -iv $encrypted_440d7f9a3c38_iv

View File

@@ -21,13 +21,14 @@ const { ipcRenderer, remote, clipboard } = require('electron')
import normalizeEditorFontFamily from 'browser/lib/normalizeEditorFontFamily'
const spellcheck = require('browser/lib/spellcheck')
const buildEditorContextMenu = require('browser/lib/contextMenuBuilder').buildEditorContextMenu
import TurndownService from 'turndown'
import { createTurndownService } from '../lib/turndown'
import {languageMaps} from '../lib/CMLanguageList'
import snippetManager from '../lib/SnippetManager'
import {generateInEditor, tocExistsInEditor} from 'browser/lib/markdown-toc-generator'
import markdownlint from 'markdownlint'
import Jsonlint from 'jsonlint-mod'
import { DEFAULT_CONFIG } from '../main/lib/ConfigManager'
import prettier from 'prettier'
CodeMirror.modeURL = '../node_modules/codemirror/mode/%N/%N.js'
@@ -69,8 +70,10 @@ export default class CodeEditor extends React.Component {
storageKey,
noteKey
} = this.props
if (this.props.deleteUnusedAttachments === true) {
debouncedDeletionOfAttachments(this.editor.getValue(), storageKey, noteKey)
}
}
this.pasteHandler = (editor, e) => {
e.preventDefault()
@@ -98,7 +101,7 @@ export default class CodeEditor extends React.Component {
this.editorActivityHandler = () => this.handleEditorActivity()
this.turndownService = new TurndownService()
this.turndownService = createTurndownService()
}
handleSearch (msg) {
@@ -106,7 +109,7 @@ export default class CodeEditor extends React.Component {
const component = this
if (component.searchState) cm.removeOverlay(component.searchState)
if (msg.length < 3) return
if (msg.length < 1) return
cm.operation(function () {
component.searchState = makeOverlay(msg, 'searching')
@@ -216,6 +219,37 @@ export default class CodeEditor extends React.Component {
}
return CodeMirror.Pass
},
[translateHotkey(hotkey.prettifyMarkdown)]: cm => {
// Default / User configured prettier options
const currentConfig = JSON.parse(self.props.prettierConfig)
// Parser type will always need to be markdown so we override the option before use
currentConfig.parser = 'markdown'
// Get current cursor position
const cursorPos = cm.getCursor()
currentConfig.cursorOffset = cm.doc.indexFromPos(cursorPos)
// Prettify contents of editor
const formattedTextDetails = prettier.formatWithCursor(cm.doc.getValue(), currentConfig)
const formattedText = formattedTextDetails.formatted
const formattedCursorPos = formattedTextDetails.cursorOffset
cm.doc.setValue(formattedText)
// Reset Cursor position to be at the same markdown as was before prettifying
const newCursorPos = cm.doc.posFromIndex(formattedCursorPos)
cm.doc.setCursor(newCursorPos)
},
[translateHotkey(hotkey.sortLines)]: cm => {
const selection = cm.doc.getSelection()
const appendLineBreak = /\n$/.test(selection)
const sorted = _.split(selection.trim(), '\n').sort()
const sortedString = _.join(sorted, '\n') + (appendLineBreak ? '\n' : '')
cm.doc.replaceSelection(sortedString)
},
[translateHotkey(hotkey.pasteSmartly)]: cm => {
this.handlePaste(cm, true)
}
@@ -269,7 +303,8 @@ export default class CodeEditor extends React.Component {
explode: this.props.explodingPairs,
override: true
},
extraKeys: this.defaultKeyMap
extraKeys: this.defaultKeyMap,
prettierConfig: this.props.prettierConfig
})
document.querySelector('.CodeMirror-lint-markers').style.display = enableMarkdownLint ? 'inline-block' : 'none'
@@ -608,6 +643,9 @@ export default class CodeEditor extends React.Component {
this.editor.addPanel(this.createSpellCheckPanel(), {position: 'bottom'})
}
}
if (prevProps.deleteUnusedAttachments !== this.props.deleteUnusedAttachments) {
this.editor.setOption('deleteUnusedAttachments', this.props.deleteUnusedAttachments)
}
if (needRefresh) {
this.editor.refresh()
@@ -619,8 +657,8 @@ export default class CodeEditor extends React.Component {
const checkMarkdownNoteIsOpen = mode === 'Boost Flavored Markdown'
return checkMarkdownNoteIsOpen ? {
'getAnnotations': this.validatorOfMarkdown,
'async': true
getAnnotations: this.validatorOfMarkdown,
async: true
} : false
}
@@ -635,10 +673,10 @@ export default class CodeEditor extends React.Component {
return
}
const lintOptions = {
'strings': {
'content': text
strings: {
content: text
},
'config': lintConfigJson
config: lintConfigJson
}
return markdownlint(lintOptions, (err, result) => {
@@ -836,6 +874,17 @@ export default class CodeEditor extends React.Component {
this.editor.setCursor(cursor)
}
/**
* Update content of one line
* @param {Number} lineNumber
* @param {String} content
*/
setLineContent (lineNumber, content) {
const prevContent = this.editor.getLine(lineNumber)
const prevContentLength = prevContent ? prevContent.length : 0
this.editor.replaceRange(content, { line: lineNumber, ch: 0 }, { line: lineNumber, ch: prevContentLength })
}
handleDropImage (dropEvent) {
dropEvent.preventDefault()
const {
@@ -1169,7 +1218,8 @@ CodeEditor.propTypes = {
autoDetect: PropTypes.bool,
spellCheck: PropTypes.bool,
enableMarkdownLint: PropTypes.bool,
customMarkdownLintConfig: PropTypes.string
customMarkdownLintConfig: PropTypes.string,
deleteUnusedAttachments: PropTypes.bool
}
CodeEditor.defaultProps = {
@@ -1183,5 +1233,7 @@ CodeEditor.defaultProps = {
autoDetect: false,
spellCheck: false,
enableMarkdownLint: DEFAULT_CONFIG.editor.enableMarkdownLint,
customMarkdownLintConfig: DEFAULT_CONFIG.editor.customMarkdownLintConfig
customMarkdownLintConfig: DEFAULT_CONFIG.editor.customMarkdownLintConfig,
prettierConfig: DEFAULT_CONFIG.editor.prettierConfig,
deleteUnusedAttachments: DEFAULT_CONFIG.editor.deleteUnusedAttachments
}

View File

@@ -119,7 +119,7 @@ class MarkdownEditor extends React.Component {
status: 'PREVIEW'
}, () => {
this.refs.preview.focus()
this.refs.preview.scrollTo(cursorPosition.line)
this.refs.preview.scrollToRow(cursorPosition.line)
})
eventEmitter.emit('topbar:togglelockbutton', this.state.status)
}
@@ -169,14 +169,15 @@ class MarkdownEditor extends React.Component {
.split('\n')
const targetLine = lines[lineIndex]
let newLine = targetLine
if (targetLine.match(checkedMatch)) {
lines[lineIndex] = targetLine.replace(checkReplace, '[ ]')
newLine = targetLine.replace(checkReplace, '[ ]')
}
if (targetLine.match(uncheckedMatch)) {
lines[lineIndex] = targetLine.replace(uncheckReplace, '[x]')
newLine = targetLine.replace(uncheckReplace, '[x]')
}
this.refs.code.setValue(lines.join('\n'))
this.refs.code.setLineContent(lineIndex, newLine)
}
}
@@ -322,6 +323,8 @@ class MarkdownEditor extends React.Component {
switchPreview={config.editor.switchPreview}
enableMarkdownLint={config.editor.enableMarkdownLint}
customMarkdownLintConfig={config.editor.customMarkdownLintConfig}
prettierConfig={config.editor.prettierConfig}
deleteUnusedAttachments={config.editor.deleteUnusedAttachments}
/>
<MarkdownPreview styleName={this.state.status === 'PREVIEW'
? 'preview'
@@ -341,6 +344,7 @@ class MarkdownEditor extends React.Component {
smartArrows={config.preview.smartArrows}
breaks={config.preview.breaks}
sanitize={config.preview.sanitize}
mermaidHTMLLabel={config.preview.mermaidHTMLLabel}
ref='preview'
onContextMenu={(e) => this.handleContextMenu(e)}
onDoubleClick={(e) => this.handleDoubleClick(e)}

View File

@@ -21,6 +21,7 @@ import yaml from 'js-yaml'
import { render } from 'react-dom'
import Carousel from 'react-image-carousel'
import ConfigManager from '../main/lib/ConfigManager'
import i18n from 'browser/lib/i18n'
const { remote, shell } = require('electron')
const attachmentManagement = require('../main/lib/dataApi/attachmentManagement')
@@ -41,9 +42,21 @@ const CSS_FILES = [
`${appPath}/node_modules/codemirror/lib/codemirror.css`,
`${appPath}/node_modules/react-image-carousel/lib/css/main.min.css`
]
const win = global.process.platform === 'win32'
function buildStyle (
/**
* @param {Object} opts
* @param {String} opts.fontFamily
* @param {Numberl} opts.fontSize
* @param {String} opts.codeBlockFontFamily
* @param {String} opts.theme
* @param {Boolean} [opts.lineNumber] Should show line number
* @param {Boolean} [opts.scrollPastEnd]
* @param {Boolean} [opts.allowCustomCSS] Should add custom css
* @param {String} [opts.customCSS] Will be added to bottom, only if `opts.allowCustomCSS` is truthy
* @returns {String}
*/
function buildStyle (opts) {
const {
fontFamily,
fontSize,
codeBlockFontFamily,
@@ -52,7 +65,7 @@ function buildStyle (
theme,
allowCustomCSS,
customCSS
) {
} = opts
return `
@font-face {
font-family: 'Lato';
@@ -82,12 +95,17 @@ function buildStyle (
url('${appPath}/resources/fonts/MaterialIcons-Regular.woff') format('woff'),
url('${appPath}/resources/fonts/MaterialIcons-Regular.ttf') format('truetype');
}
${markdownStyle}
body {
font-family: '${fontFamily.join("','")}';
font-size: ${fontSize}px;
${scrollPastEnd && 'padding-bottom: 90vh;'}
${scrollPastEnd ? `
padding-bottom: 90vh;
box-sizing: border-box;
`
: ''}
}
@media print {
body {
@@ -163,6 +181,10 @@ const scrollBarStyle = `
::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.15);
}
::-webkit-scrollbar-track-piece {
background-color: inherit;
}
`
const scrollBarDarkStyle = `
::-webkit-scrollbar {
@@ -172,6 +194,10 @@ const scrollBarDarkStyle = `
::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-track-piece {
background-color: inherit;
}
`
const OSX = global.process.platform === 'darwin'
@@ -220,6 +246,7 @@ export default class MarkdownPreview extends React.Component {
this.saveAsHtmlHandler = () => this.handleSaveAsHtml()
this.saveAsPdfHandler = () => this.handleSaveAsPdf()
this.printHandler = () => this.handlePrint()
this.resizeHandler = _.throttle(this.handleResize.bind(this), 100)
this.linkClickHandler = this.handleLinkClick.bind(this)
this.initMarkdown = this.initMarkdown.bind(this)
@@ -247,8 +274,11 @@ export default class MarkdownPreview extends React.Component {
handleContextMenu (event) {
const menu = buildMarkdownPreviewContextMenu(this, event)
if (menu != null) {
const switchPreview = ConfigManager.get().editor.switchPreview
if (menu != null && switchPreview !== 'RIGHTCLICK') {
menu.popup(remote.getCurrentWindow())
} else if (_.isFunction(this.props.onContextMenu)) {
this.props.onContextMenu(event)
}
}
@@ -310,7 +340,7 @@ export default class MarkdownPreview extends React.Component {
customCSS
} = this.getStyleParams()
const inlineStyles = buildStyle(
const inlineStyles = buildStyle({
fontFamily,
fontSize,
codeBlockFontFamily,
@@ -319,8 +349,8 @@ export default class MarkdownPreview extends React.Component {
theme,
allowCustomCSS,
customCSS
)
let body = this.markdown.render(noteContent)
})
let body = this.refs.root.contentWindow.document.body.innerHTML
body = attachmentManagement.fixLocalURLS(
body,
this.props.storagePath
@@ -340,7 +370,7 @@ export default class MarkdownPreview extends React.Component {
let styles = ''
files.forEach(file => {
styles += `<link rel="stylesheet" href="css/${path.basename(file)}">`
styles += `<link rel="stylesheet" href="../css/${path.basename(file)}">`
})
return `<html>
@@ -361,7 +391,7 @@ export default class MarkdownPreview extends React.Component {
handleSaveAsPdf () {
this.exportAsDocument('pdf', (noteContent, exportTasks, targetDir) => {
const printout = new remote.BrowserWindow({show: false, webPreferences: {webSecurity: false}})
const printout = new remote.BrowserWindow({show: false, webPreferences: {webSecurity: false, javascript: false}})
printout.loadURL('data:text/html;charset=UTF-8,' + this.htmlContentFormatter(noteContent, exportTasks, targetDir))
return new Promise((resolve, reject) => {
printout.webContents.on('did-finish-load', () => {
@@ -395,7 +425,8 @@ export default class MarkdownPreview extends React.Component {
.then(res => {
dialog.showMessageBox(remote.getCurrentWindow(), {
type: 'info',
message: `Exported to ${filename}`
message: `Exported to ${filename}`,
buttons: [i18n.__('Ok')]
})
})
.catch(err => {
@@ -510,6 +541,10 @@ export default class MarkdownPreview extends React.Component {
'scroll',
this.scrollHandler
)
this.refs.root.contentWindow.addEventListener(
'resize',
this.resizeHandler
)
eventEmitter.on('export:save-text', this.saveAsTextHandler)
eventEmitter.on('export:save-md', this.saveAsMdHandler)
eventEmitter.on('export:save-html', this.saveAsHtmlHandler)
@@ -548,6 +583,10 @@ export default class MarkdownPreview extends React.Component {
'scroll',
this.scrollHandler
)
this.refs.root.contentWindow.removeEventListener(
'resize',
this.resizeHandler
)
eventEmitter.off('export:save-text', this.saveAsTextHandler)
eventEmitter.off('export:save-md', this.saveAsMdHandler)
eventEmitter.off('export:save-html', this.saveAsHtmlHandler)
@@ -556,16 +595,19 @@ export default class MarkdownPreview extends React.Component {
}
componentDidUpdate (prevProps) {
if (prevProps.value !== this.props.value) this.rewriteIframe()
// actual rewriteIframe function should be called only once
let needsRewriteIframe = false
if (prevProps.value !== this.props.value) needsRewriteIframe = true
if (
prevProps.smartQuotes !== this.props.smartQuotes ||
prevProps.sanitize !== this.props.sanitize ||
prevProps.mermaidHTMLLabel !== this.props.mermaidHTMLLabel ||
prevProps.smartArrows !== this.props.smartArrows ||
prevProps.breaks !== this.props.breaks ||
prevProps.lineThroughCheckbox !== this.props.lineThroughCheckbox
) {
this.initMarkdown()
this.rewriteIframe()
needsRewriteIframe = true
}
if (
prevProps.fontFamily !== this.props.fontFamily ||
@@ -580,8 +622,17 @@ export default class MarkdownPreview extends React.Component {
prevProps.customCSS !== this.props.customCSS
) {
this.applyStyle()
needsRewriteIframe = true
}
if (needsRewriteIframe) {
this.rewriteIframe()
}
// Should scroll to top after selecting another note
if (prevProps.noteKey !== this.props.noteKey) {
this.scrollTo(0, 0)
}
}
getStyleParams () {
@@ -638,7 +689,7 @@ export default class MarkdownPreview extends React.Component {
this.getWindow().document.getElementById(
'codeTheme'
).href = this.getCodeThemeLink(codeBlockTheme)
this.getWindow().document.getElementById('style').innerHTML = buildStyle(
this.getWindow().document.getElementById('style').innerHTML = buildStyle({
fontFamily,
fontSize,
codeBlockFontFamily,
@@ -647,7 +698,7 @@ export default class MarkdownPreview extends React.Component {
theme,
allowCustomCSS,
customCSS
)
})
}
getCodeThemeLink (name) {
@@ -681,7 +732,8 @@ export default class MarkdownPreview extends React.Component {
showCopyNotification,
storagePath,
noteKey,
sanitize
sanitize,
mermaidHTMLLabel
} = this.props
let { value, codeBlockTheme } = this.props
@@ -813,6 +865,7 @@ export default class MarkdownPreview extends React.Component {
canvas.height = height.value + 'vh'
}
// eslint-disable-next-line no-unused-vars
const chart = new Chart(canvas, chartConfig)
} catch (e) {
el.className = 'chart-error'
@@ -823,7 +876,7 @@ export default class MarkdownPreview extends React.Component {
_.forEach(
this.refs.root.contentWindow.document.querySelectorAll('.mermaid'),
el => {
mermaidRender(el, htmlTextHelper.decodeEntities(el.innerHTML), theme)
mermaidRender(el, htmlTextHelper.decodeEntities(el.innerHTML), theme, mermaidHTMLLabel)
}
)
@@ -951,8 +1004,15 @@ export default class MarkdownPreview extends React.Component {
overlay.appendChild(zoomImg)
document.body.appendChild(overlay)
}
}
this.getWindow().scrollTo(0, 0)
handleResize () {
_.forEach(
this.refs.root.contentWindow.document.querySelectorAll('svg[ratio]'),
el => {
el.setAttribute('height', el.clientWidth / el.getAttribute('ratio'))
}
)
}
focus () {
@@ -963,7 +1023,11 @@ export default class MarkdownPreview extends React.Component {
return this.refs.root.contentWindow
}
scrollTo (targetRow) {
/**
* @public
* @param {Number} targetRow
*/
scrollToRow (targetRow) {
const blocks = this.getWindow().document.querySelectorAll(
'body>[data-line]'
)
@@ -973,12 +1037,21 @@ export default class MarkdownPreview extends React.Component {
const row = parseInt(block.getAttribute('data-line'))
if (row > targetRow || index === blocks.length - 1) {
block = blocks[index - 1]
block != null && this.getWindow().scrollTo(0, block.offsetTop)
block != null && this.scrollTo(0, block.offsetTop)
break
}
}
}
/**
* `document.body.scrollTo`
* @param {Number} x
* @param {Number} y
*/
scrollTo (x, y) {
this.getWindow().document.body.scrollTo(x, y)
}
preventImageDroppedHandler (e) {
e.preventDefault()
e.stopPropagation()
@@ -1000,26 +1073,32 @@ export default class MarkdownPreview extends React.Component {
e.stopPropagation()
const rawHref = e.target.getAttribute('href')
const parser = document.createElement('a')
parser.href = e.target.getAttribute('href')
const { href, hash } = parser
const linkHash = hash === '' ? rawHref : hash // needed because we're having special link formats that are removed by parser e.g. :line:10
if (!rawHref) return // not checked href because parser will create file://... string for [empty link]()
const extractId = /(main.html)?#/
const regexNoteInternalLink = new RegExp(`${extractId.source}(.+)`)
if (regexNoteInternalLink.test(linkHash)) {
const targetId = mdurl.encode(linkHash.replace(extractId, ''))
const targetElement = this.refs.root.contentWindow.document.getElementById(
const parser = document.createElement('a')
parser.href = rawHref
const isStartWithHash = rawHref[0] === '#'
const { href, hash } = parser
const linkHash = hash === '' ? rawHref : hash // needed because we're having special link formats that are removed by parser e.g. :line:10
const extractIdRegex = /file:\/\/.*main.?\w*.html#/ // file://path/to/main(.development.)html
const regexNoteInternalLink = new RegExp(`${extractIdRegex.source}(.+)`)
if (isStartWithHash || regexNoteInternalLink.test(rawHref)) {
const posOfHash = linkHash.indexOf('#')
if (posOfHash > -1) {
const extractedId = linkHash.slice(posOfHash + 1)
const targetId = mdurl.encode(extractedId)
const targetElement = this.getWindow().document.getElementById(
targetId
)
if (targetElement != null) {
this.getWindow().scrollTo(0, targetElement.offsetTop)
this.scrollTo(0, targetElement.offsetTop)
}
return
}
}
// this will match the new uuid v4 hash and the old hash
// e.g.

View File

@@ -88,14 +88,15 @@ class MarkdownSplitEditor extends React.Component {
.split('\n')
const targetLine = lines[lineIndex]
let newLine = targetLine
if (targetLine.match(checkedMatch)) {
lines[lineIndex] = targetLine.replace(checkReplace, '[ ]')
newLine = targetLine.replace(checkReplace, '[ ]')
}
if (targetLine.match(uncheckedMatch)) {
lines[lineIndex] = targetLine.replace(uncheckReplace, '[x]')
newLine = targetLine.replace(uncheckReplace, '[x]')
}
this.refs.code.setValue(lines.join('\n'))
this.refs.code.setLineContent(lineIndex, newLine)
}
}
@@ -181,6 +182,7 @@ class MarkdownSplitEditor extends React.Component {
switchPreview={config.editor.switchPreview}
enableMarkdownLint={config.editor.enableMarkdownLint}
customMarkdownLintConfig={config.editor.customMarkdownLintConfig}
deleteUnusedAttachments={config.editor.deleteUnusedAttachments}
/>
<div styleName='slider' style={{left: this.state.codeEditorWidthInPercent + '%'}} onMouseDown={e => this.handleMouseDown(e)} >
<div styleName='slider-hitbox' />
@@ -199,6 +201,7 @@ class MarkdownSplitEditor extends React.Component {
smartArrows={config.preview.smartArrows}
breaks={config.preview.breaks}
sanitize={config.preview.sanitize}
mermaidHTMLLabel={config.preview.mermaidHTMLLabel}
ref='preview'
tabInde='0'
value={value}

View File

@@ -3,8 +3,9 @@
*/
import PropTypes from 'prop-types'
import React from 'react'
import { isArray } from 'lodash'
import { isArray, sortBy } from 'lodash'
import invertColor from 'invert-color'
import Emoji from 'react-emoji-render'
import CSSModules from 'browser/lib/CSSModules'
import { getTodoStatus } from 'browser/lib/getTodoStatus'
import styles from './NoteItem.styl'
@@ -43,7 +44,7 @@ const TagElementList = (tags, showTagsAlphabetically, coloredTags) => {
}
if (showTagsAlphabetically) {
return _.sortBy(tags).map(tag => TagElement({ tagName: tag, color: coloredTags[tag] }))
return sortBy(tags).map(tag => TagElement({ tagName: tag, color: coloredTags[tag] }))
} else {
return tags.map(tag => TagElement({ tagName: tag, color: coloredTags[tag] }))
}
@@ -87,7 +88,7 @@ const NoteItem = ({
: <i styleName='item-title-icon' className='fa fa-fw fa-file-text-o' />}
<div styleName='item-title'>
{note.title.trim().length > 0
? note.title
? <Emoji text={note.title} />
: <span styleName='item-title-empty'>{i18n.__('Empty note')}</span>}
</div>
<div styleName='item-middle'>

View File

@@ -363,7 +363,10 @@ admonition_types = {
danger: {color: #c2185b, icon: "block"},
caution: {color: #ffa726, icon: "warning"},
error: {color: #d32f2f, icon: "error_outline"},
attention: {color: #455a64, icon: "priority_high"}
question: {color: #64dd17, icon: "help_outline"},
quote: {color: #9e9e9e, icon: "format_quote"},
abstract: {color: #00b0ff, icon: "subject"},
attention: {color: #455a64, icon: "priority_high"},
}
for name, val in admonition_types
@@ -424,6 +427,9 @@ pre.fence
canvas, svg
max-width 100% !important
svg[ratio]
width 100%
.gallery
width 100%
height 50vh
@@ -444,6 +450,44 @@ pre.fence
color $ui-text-color
background-color $ui-tag-backgroundColor
.markdownIt-TOC-wrapper
list-style none
position fixed
right 0
top 0
margin-left 15px
z-index 1000
transition transform .2s ease-in-out
transform translateX(100%)
.markdownIt-TOC
display block
max-height 90vh
overflow-y auto
padding 25px
padding-left 38px
&,
&:before
background-color $ui-dark-backgroundColor
color: $ui-dark-text-color
&:hover
transform translateX(-15px)
&:before
content 'TOC'
position absolute
width 60px
height 30px
top 60px
left -29px
display flex
align-items center
justify-content center
transform-origin top left
transform rotate(-90deg)
themeDarkBackground = darken(#21252B, 10%)
themeDarkText = #f9f9f9
themeDarkBorder = lighten(themeDarkBackground, 20%)
@@ -511,6 +555,14 @@ body[data-theme="dark"]
color $ui-dark-text-color
background-color $ui-dark-tag-backgroundColor
.markdownIt-TOC-wrapper
&,
&:before
background-color darken(themeDarkBackground, 5%)
color themeDarkText
themeSolarizedDarkBackground = $ui-solarized-dark-noteDetail-backgroundColor
themeSolarizedDarkTableOdd = $ui-solarized-dark-noteDetail-backgroundColor
themeSolarizedDarkTableEven = darken($ui-solarized-dark-noteDetail-backgroundColor, 10%)
themeSolarizedDarkTableHead = themeSolarizedDarkTableEven
@@ -519,7 +571,7 @@ themeSolarizedDarkTableBorder = themeDarkBorder
body[data-theme="solarized-dark"]
color $ui-solarized-dark-text-color
border-color themeDarkBorder
background-color $ui-solarized-dark-noteDetail-backgroundColor
background-color themeSolarizedDarkBackground
table
thead
tr
@@ -554,6 +606,13 @@ body[data-theme="solarized-dark"]
color $ui-solarized-dark-button--active-color
background-color $ui-solarized-dark-button-backgroundColor
.markdownIt-TOC-wrapper
&,
&:before
background-color darken(themeSolarizedDarkBackground, 15%)
color themeDarkText
themeMonokaiBackground = $ui-monokai-noteDetail-backgroundColor
themeMonokaiTableOdd = $ui-monokai-noteDetail-backgroundColor
themeMonokaiTableEven = darken($ui-monokai-noteDetail-backgroundColor, 10%)
themeMonokaiTableHead = themeMonokaiTableEven
@@ -562,7 +621,7 @@ themeMonokaiTableBorder = themeDarkBorder
body[data-theme="monokai"]
color $ui-monokai-text-color
border-color themeDarkBorder
background-color $ui-monokai-noteDetail-backgroundColor
background-color themeMonokaiBackground
table
thead
tr
@@ -600,6 +659,13 @@ body[data-theme="monokai"]
color $ui-monokai-button--active-color
background-color $ui-monokai-button-backgroundColor
.markdownIt-TOC-wrapper
&,
&:before
background-color darken(themeMonokaiBackground, 15%)
color themeDarkText
themeDraculaBackground = $ui-dracula-noteDetail-backgroundColor
themeDraculaTableOdd = $ui-dracula-noteDetail-backgroundColor
themeDraculaTableEven = darken($ui-dracula-noteDetail-backgroundColor, 10%)
themeDraculaTableHead = themeDraculaTableEven
@@ -608,7 +674,7 @@ themeDraculaTableBorder = themeDarkBorder
body[data-theme="dracula"]
color $ui-dracula-text-color
border-color themeDarkBorder
background-color $ui-dracula-noteDetail-backgroundColor
background-color themeDraculaBackground
table
thead
tr
@@ -645,3 +711,9 @@ body[data-theme="dracula"]
.prev, .next
color $ui-dracula-button--active-color
background-color $ui-dracula-button-backgroundColor
.markdownIt-TOC-wrapper
&,
&:before
background-color darken(themeDraculaBackground, 15%)
color themeDarkText

View File

@@ -19,20 +19,43 @@ function getId () {
return id
}
function render (element, content, theme) {
function render (element, content, theme, enableHTMLLabel) {
try {
const height = element.attributes.getNamedItem('data-height')
if (height && height.value !== 'undefined') {
const isPredefined = height && height.value !== 'undefined'
if (isPredefined) {
element.style.height = height.value + 'vh'
}
const isDarkTheme = theme === 'dark' || theme === 'solarized-dark' || theme === 'monokai' || theme === 'dracula'
mermaidAPI.initialize({
theme: isDarkTheme ? 'dark' : 'default',
themeCSS: isDarkTheme ? darkThemeStyling : '',
useMaxWidth: false
flowchart: {
htmlLabels: enableHTMLLabel
},
gantt: {
useWidth: element.clientWidth
}
})
mermaidAPI.render(getId(), content, (svgGraph) => {
element.innerHTML = svgGraph
if (!isPredefined) {
const el = element.firstChild
const viewBox = el.getAttribute('viewBox').split(' ')
let ratio = viewBox[2] / viewBox[3]
if (el.style.maxWidth) {
const maxWidth = parseFloat(el.style.maxWidth)
ratio *= el.parentNode.clientWidth / maxWidth
}
el.setAttribute('ratio', ratio)
el.setAttribute('height', el.parentNode.clientWidth / ratio)
console.log(el)
}
})
} catch (e) {
element.className = 'mermaid-error'

View File

@@ -11,6 +11,10 @@ const languages = [
name: 'Chinese (zh-TW)',
locale: 'zh-TW'
},
{
name: 'Czech',
locale: 'cs'
},
{
name: 'Danish',
locale: 'da'

View File

@@ -6,7 +6,7 @@ const { dialog } = remote
export function confirmDeleteNote (confirmDeletion, permanent) {
if (confirmDeletion || permanent) {
const alertConfig = {
ype: 'warning',
type: 'warning',
message: i18n.__('Confirm note deletion'),
detail: i18n.__('This will permanently remove this note.'),
buttons: [i18n.__('Confirm'), i18n.__('Cancel')]

View File

@@ -1,5 +1,4 @@
const crypto = require('crypto')
const _ = require('lodash')
const uuidv4 = require('uuid/v4')
module.exports = function (uuid) {

View File

@@ -15,7 +15,7 @@ module.exports = function sanitizePlugin (md, options) {
options
)
}
if (state.tokens[tokenIdx].type === '_fence') {
if (state.tokens[tokenIdx].type.match(/.*_fence$/)) {
// escapeHtmlCharacters has better performance
state.tokens[tokenIdx].content = escapeHtmlCharacters(
state.tokens[tokenIdx].content,
@@ -96,6 +96,10 @@ function sanitizeInline (html, options) {
function naughtyHRef (href, options) {
// href = href.replace(/[\x00-\x20]+/g, '')
if (!href) {
// No href
return false
}
href = href.replace(/<\!\-\-.*?\-\-\>/g, '')
const matches = href.match(/^([a-zA-Z]+)\:/)

View File

@@ -4,6 +4,7 @@ import emoji from 'markdown-it-emoji'
import math from '@rokt33r/markdown-it-math'
import mdurl from 'mdurl'
import smartArrows from 'markdown-it-smartarrows'
import markdownItTocAndAnchor from '@hikerpig/markdown-it-toc-and-anchor'
import _ from 'lodash'
import ConfigManager from 'browser/main/lib/ConfigManager'
import katex from 'katex'
@@ -123,10 +124,23 @@ class Markdown {
slugify: require('./slugify')
})
this.md.use(require('markdown-it-kbd'))
this.md.use(require('markdown-it-admonition'), {types: ['note', 'hint', 'attention', 'caution', 'danger', 'error']})
this.md.use(require('markdown-it-admonition'), {types: ['note', 'hint', 'attention', 'caution', 'danger', 'error', 'quote', 'abstract', 'question']})
this.md.use(require('markdown-it-abbr'))
this.md.use(require('markdown-it-sub'))
this.md.use(require('markdown-it-sup'))
this.md.use(md => {
markdownItTocAndAnchor(md, {
toc: true,
tocPattern: /\[TOC\]/i,
anchorLink: false,
appendIdToHeading: false
})
md.renderer.rules.toc_open = () => '<div class="markdownIt-TOC-wrapper">'
md.renderer.rules.toc_close = () => '</div>'
})
this.md.use(require('./markdown-it-deflist'))
this.md.use(require('./markdown-it-frontmatter'))
@@ -183,32 +197,47 @@ class Markdown {
})
const deflate = require('markdown-it-plantuml/lib/deflate')
this.md.use(require('markdown-it-plantuml'), {
generateSource: function (umlCode) {
const stripTrailingSlash = (url) => url.endsWith('/') ? url.slice(0, -1) : url
const serverAddress = stripTrailingSlash(config.preview.plantUMLServerAddress) + '/svg'
const plantuml = require('markdown-it-plantuml')
const plantUmlStripTrailingSlash = (url) => url.endsWith('/') ? url.slice(0, -1) : url
const plantUmlServerAddress = plantUmlStripTrailingSlash(config.preview.plantUMLServerAddress)
const parsePlantUml = function (umlCode, openMarker, closeMarker, type) {
const s = unescape(encodeURIComponent(umlCode))
const zippedCode = deflate.encode64(
deflate.zip_deflate(`@startuml\n${s}\n@enduml`, 9)
deflate.zip_deflate(`${openMarker}\n${s}\n${closeMarker}`, 9)
)
return `${serverAddress}/${zippedCode}`
return `${plantUmlServerAddress}/${type}/${zippedCode}`
}
this.md.use(plantuml, {
generateSource: (umlCode) => parsePlantUml(umlCode, '@startuml', '@enduml', 'svg')
})
// Ditaa support
this.md.use(require('markdown-it-plantuml'), {
// Ditaa support. PlantUML server doesn't support Ditaa in SVG, so we set the format as PNG at the moment.
this.md.use(plantuml, {
openMarker: '@startditaa',
closeMarker: '@endditaa',
generateSource: function (umlCode) {
const stripTrailingSlash = (url) => url.endsWith('/') ? url.slice(0, -1) : url
// Currently PlantUML server doesn't support Ditaa in SVG, so we set the format as PNG at the moment.
const serverAddress = stripTrailingSlash(config.preview.plantUMLServerAddress) + '/png'
const s = unescape(encodeURIComponent(umlCode))
const zippedCode = deflate.encode64(
deflate.zip_deflate(`@startditaa\n${s}\n@endditaa`, 9)
)
return `${serverAddress}/${zippedCode}`
}
generateSource: (umlCode) => parsePlantUml(umlCode, '@startditaa', '@endditaa', 'png')
})
// Mindmap support
this.md.use(plantuml, {
openMarker: '@startmindmap',
closeMarker: '@endmindmap',
generateSource: (umlCode) => parsePlantUml(umlCode, '@startmindmap', '@endmindmap', 'svg')
})
// WBS support
this.md.use(plantuml, {
openMarker: '@startwbs',
closeMarker: '@endwbs',
generateSource: (umlCode) => parsePlantUml(umlCode, '@startwbs', '@endwbs', 'svg')
})
// Gantt support
this.md.use(plantuml, {
openMarker: '@startgantt',
closeMarker: '@endgantt',
generateSource: (umlCode) => parsePlantUml(umlCode, '@startgantt', '@endgantt', 'svg')
})
// Override task item

9
browser/lib/turndown.js Normal file
View File

@@ -0,0 +1,9 @@
const TurndownService = require('turndown')
const { gfm } = require('turndown-plugin-gfm')
export const createTurndownService = function () {
const turndown = new TurndownService()
turndown.use(gfm)
turndown.remove('script')
return turndown
}

View File

@@ -136,9 +136,24 @@ export function isMarkdownTitleURL (str) {
return /(^#{1,6}\s)(?:\w+:|^)\/\/(?:[^\s\.]+\.\S{2}|localhost[\:?\d]*)/.test(str)
}
export function humanFileSize (bytes) {
const threshold = 1000
if (Math.abs(bytes) < threshold) {
return bytes + ' B'
}
var units = ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
var u = -1
do {
bytes /= threshold
++u
} while (Math.abs(bytes) >= threshold && u < units.length - 1)
return bytes.toFixed(1) + ' ' + units[u]
}
export default {
lastFindInArray,
escapeHtmlCharacters,
isObjectEqual,
isMarkdownTitleURL
isMarkdownTitleURL,
humanFileSize
}

View File

@@ -0,0 +1,69 @@
import PropTypes from 'prop-types'
import React from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './FromUrlButton.styl'
import _ from 'lodash'
import i18n from 'browser/lib/i18n'
class FromUrlButton extends React.Component {
constructor (props) {
super(props)
this.state = {
isActive: false
}
}
handleMouseDown (e) {
this.setState({
isActive: true
})
}
handleMouseUp (e) {
this.setState({
isActive: false
})
}
handleMouseLeave (e) {
this.setState({
isActive: false
})
}
render () {
const { className } = this.props
return (
<button className={_.isString(className)
? 'FromUrlButton ' + className
: 'FromUrlButton'
}
styleName={this.state.isActive || this.props.isActive
? 'root--active'
: 'root'
}
onMouseDown={(e) => this.handleMouseDown(e)}
onMouseUp={(e) => this.handleMouseUp(e)}
onMouseLeave={(e) => this.handleMouseLeave(e)}
onClick={this.props.onClick}>
<img styleName='icon'
src={this.state.isActive || this.props.isActive
? '../resources/icon/icon-external.svg'
: '../resources/icon/icon-external.svg'
}
/>
<span styleName='tooltip'>{i18n.__('Convert URL to Markdown')}</span>
</button>
)
}
}
FromUrlButton.propTypes = {
isActive: PropTypes.bool,
onClick: PropTypes.func,
className: PropTypes.string
}
export default CSSModules(FromUrlButton, styles)

View File

@@ -0,0 +1,41 @@
.root
top 45px
topBarButtonRight()
&:hover
transition 0.2s
color alpha($ui-favorite-star-button-color, 0.6)
&:hover .tooltip
opacity 1
.tooltip
tooltip()
position absolute
pointer-events none
top 50px
right 125px
width 90px
z-index 200
padding 5px
line-height normal
border-radius 2px
opacity 0
transition 0.1s
.root--active
@extend .root
transition 0.15s
color $ui-favorite-star-button-color
&:hover
transition 0.2s
color alpha($ui-favorite-star-button-color, 0.6)
.icon
transition transform 0.15s
height 13px
body[data-theme="dark"]
.root
topBarButtonDark()
&:hover
transition 0.2s
color alpha($ui-favorite-star-button-color, 0.6)

View File

@@ -152,7 +152,6 @@ class MarkdownNoteDetail extends React.Component {
}
handleFolderChange (e) {
const { dispatch } = this.props
const { note } = this.state
const value = this.refs.folder.value
const splitted = value.split('-')
@@ -410,7 +409,7 @@ class MarkdownNoteDetail extends React.Component {
}
render () {
const { data, location, config } = this.props
const { data, dispatch, location, config } = this.props
const { note, editorType } = this.state
const storageKey = note.storage
const folderKey = note.folder
@@ -465,6 +464,7 @@ class MarkdownNoteDetail extends React.Component {
saveTagsAlphabetically={config.ui.saveTagsAlphabetically}
showTagsAlphabetically={config.ui.showTagsAlphabetically}
data={data}
dispatch={dispatch}
onChange={this.handleUpdateTag.bind(this)}
coloredTags={config.coloredTags}
/>
@@ -472,6 +472,7 @@ class MarkdownNoteDetail extends React.Component {
</div>
<div styleName='info-right'>
<ToggleModeButton onClick={(e) => this.handleSwitchMode(e)} editorType={editorType} />
<StarButton
onClick={(e) => this.handleStarButtonClick(e)}
isActive={note.isStarred}
@@ -511,7 +512,7 @@ class MarkdownNoteDetail extends React.Component {
exportAsTxt={this.exportAsTxt}
exportAsHtml={this.exportAsHtml}
exportAsPdf={this.exportAsPdf}
wordCount={note.content.split(' ').length}
wordCount={note.content.trim().split(/\s+/g).length}
letterCount={note.content.replace(/\r?\n/g, '').length}
type={note.type}
print={this.print}

View File

@@ -82,10 +82,3 @@ body[data-theme="dracula"]
border-left 1px solid $ui-dracula-borderColor
background-color $ui-dracula-noteDetail-backgroundColor
div
> button, div
-webkit-user-drag none
user-select none
> img, span
-webkit-user-drag none
user-select none

View File

@@ -108,3 +108,11 @@ body[data-theme="dracula"]
.info
border-color $ui-dracula-borderColor
background-color $ui-dracula-noteDetail-backgroundColor
.info > div
> button
-webkit-user-drag none
user-select none
> img, span
-webkit-user-drag none
user-select none

View File

@@ -699,7 +699,7 @@ class SnippetNoteDetail extends React.Component {
}
render () {
const { data, config, location } = this.props
const { data, dispatch, config, location } = this.props
const { note } = this.state
const storageKey = note.storage
@@ -823,6 +823,7 @@ class SnippetNoteDetail extends React.Component {
saveTagsAlphabetically={config.ui.saveTagsAlphabetically}
showTagsAlphabetically={config.ui.showTagsAlphabetically}
data={data}
dispatch={dispatch}
onChange={(e) => this.handleChange(e)}
coloredTags={config.coloredTags}
/>

View File

@@ -8,6 +8,7 @@ import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
import i18n from 'browser/lib/i18n'
import ee from 'browser/main/lib/eventEmitter'
import Autosuggest from 'react-autosuggest'
import { push } from 'connected-react-router'
class TagSelect extends React.Component {
constructor (props) {
@@ -96,8 +97,11 @@ class TagSelect extends React.Component {
}
handleTagLabelClick (tag) {
const { router } = this.context
router.push(`/tags/${tag}`)
const { dispatch } = this.props
// Note: `tag` requires encoding later.
// E.g. % in tag is a problem (see issue #3170) - encodeURIComponent(tag) is not working.
dispatch(push(`/tags/${tag}`))
}
handleTagRemoveButtonClick (tag) {
@@ -255,11 +259,8 @@ class TagSelect extends React.Component {
}
}
TagSelect.contextTypes = {
router: PropTypes.shape({})
}
TagSelect.propTypes = {
dispatch: PropTypes.func,
className: PropTypes.string,
value: PropTypes.arrayOf(PropTypes.string),
onChange: PropTypes.func,

View File

@@ -75,3 +75,10 @@ body[data-theme="dracula"]
.active
background-color #bd93f9
box-shadow 2px 0px 7px #222222
.control-toggleModeButton
-webkit-user-drag none
user-select none
> div img
-webkit-user-drag none
user-select none

View File

@@ -50,16 +50,14 @@ class Detail extends React.Component {
const searchStr = params.searchword
displayedNotes = searchStr === undefined || searchStr === '' ? allNotes
: searchFromNotes(allNotes, searchStr)
}
if (location.pathname.match(/\/tags/)) {
} else if (location.pathname.match(/^\/tags/)) {
const listOfTags = params.tagname.split(' ')
displayedNotes = data.noteMap.map(note => note).filter(note =>
listOfTags.every(tag => note.tags.includes(tag))
)
}
if (location.pathname.match(/\/trashed/)) {
if (location.pathname.match(/^\/trashed/)) {
displayedNotes = trashedNotes
} else {
displayedNotes = _.differenceWith(displayedNotes, trashedNotes, (note, trashed) => note.key === trashed.key)

View File

@@ -102,7 +102,7 @@ class Main extends React.Component {
{
name: 'example.js',
mode: 'javascript',
content: "var boostnote = document.getElementById('enjoy').innerHTML\n\nconsole.log(boostnote)",
content: "var boostnote = document.getElementById('hello').innerHTML\n\nconsole.log(boostnote)",
linesHighlighted: []
}
]
@@ -169,6 +169,7 @@ class Main extends React.Component {
}
})
// eslint-disable-next-line no-undef
delete CodeMirror.keyMap.emacs['Ctrl-V']
eventEmitter.on('editor:fullscreen', this.toggleFullScreen)

View File

@@ -88,6 +88,7 @@ class NoteList extends React.Component {
this.importFromFileHandler = this.importFromFile.bind(this)
this.jumpNoteByHash = this.jumpNoteByHashHandler.bind(this)
this.handleNoteListKeyUp = this.handleNoteListKeyUp.bind(this)
this.handleNoteListBlur = this.handleNoteListBlur.bind(this)
this.getNoteKeyFromTargetIndex = this.getNoteKeyFromTargetIndex.bind(this)
this.cloneNote = this.cloneNote.bind(this)
this.deleteNote = this.deleteNote.bind(this)
@@ -348,6 +349,13 @@ class NoteList extends React.Component {
}
}
handleNoteListBlur () {
this.setState({
shiftKeyDown: false,
ctrlKeyDown: false
})
}
getNotes () {
const { data, match: { params }, location } = this.props
if (location.pathname.match(/\/home/) || location.pathname.match(/alltags/)) {
@@ -1155,6 +1163,7 @@ class NoteList extends React.Component {
tabIndex='-1'
onKeyDown={(e) => this.handleNoteListKeyDown(e)}
onKeyUp={this.handleNoteListKeyUp}
onBlur={this.handleNoteListBlur}
>
{noteList}
</div>

View File

@@ -22,9 +22,10 @@ import context from 'browser/lib/context'
import { remote } from 'electron'
import { confirmDeleteNote } from 'browser/lib/confirmDeleteNote'
import ColorPicker from 'browser/components/ColorPicker'
import { every, sortBy } from 'lodash'
function matchActiveTags (tags, activeTags) {
return _.every(activeTags, v => tags.indexOf(v) >= 0)
return every(activeTags, v => tags.indexOf(v) >= 0)
}
class SideNav extends React.Component {
@@ -56,7 +57,7 @@ class SideNav extends React.Component {
deleteTag (tag) {
const selectedButton = remote.dialog.showMessageBox(remote.getCurrentWindow(), {
ype: 'warning',
type: 'warning',
message: i18n.__('Confirm tag deletion'),
detail: i18n.__('This will permanently remove this tag.'),
buttons: [i18n.__('Confirm'), i18n.__('Cancel')]
@@ -271,6 +272,7 @@ class SideNav extends React.Component {
<div styleName='tagList'>
{this.tagListComponent(data)}
</div>
<NavToggleButton isFolded={isFolded} handleToggleButtonClick={this.handleToggleButtonClick.bind(this)} />
</div>
)
}
@@ -283,7 +285,7 @@ class SideNav extends React.Component {
const { colorPicker } = this.state
const activeTags = this.getActiveTags(location.pathname)
const relatedTags = this.getRelatedTags(activeTags, data.noteMap)
let tagList = _.sortBy(data.tagNoteMap.map(
let tagList = sortBy(data.tagNoteMap.map(
(tag, name) => ({ name, size: tag.size, related: relatedTags.has(name) })
).filter(
tag => tag.size > 0
@@ -296,7 +298,7 @@ class SideNav extends React.Component {
})
}
if (config.sortTagsBy === 'COUNTER') {
tagList = _.sortBy(tagList, item => (0 - item.size))
tagList = sortBy(tagList, item => (0 - item.size))
}
if (config.ui.showOnlyRelatedTags && (relatedTags.size > 0)) {
tagList = tagList.filter(

View File

@@ -8,6 +8,7 @@ const win = global.process.platform === 'win32'
const electron = require('electron')
const { ipcRenderer } = electron
const consts = require('browser/lib/consts')
const electronConfig = new (require('electron-config'))()
let isInitialized = false
@@ -26,11 +27,14 @@ export const DEFAULT_CONFIG = {
sortTagsBy: 'ALPHABETICAL', // 'ALPHABETICAL', 'COUNTER'
listStyle: 'DEFAULT', // 'DEFAULT', 'SMALL'
amaEnabled: true,
autoUpdateEnabled: true,
hotkey: {
toggleMain: OSX ? 'Command + Alt + L' : 'Super + Alt + E',
toggleMode: OSX ? 'Command + Alt + M' : 'Ctrl + M',
deleteNote: OSX ? 'Command + Shift + Backspace' : 'Ctrl + Shift + Backspace',
pasteSmartly: OSX ? 'Command + Shift + V' : 'Ctrl + Shift + V',
prettifyMarkdown: OSX ? 'Command + Shift + F' : 'Ctrl + Shift + F',
sortLines: OSX ? 'Command + Shift + S' : 'Ctrl + Shift + S',
insertDate: OSX ? 'Command + /' : 'Ctrl + /',
insertDateTime: OSX ? 'Command + Alt + /' : 'Ctrl + Shift + /',
toggleMenuBar: 'Alt'
@@ -68,7 +72,14 @@ export const DEFAULT_CONFIG = {
spellcheck: false,
enableSmartPaste: false,
enableMarkdownLint: false,
customMarkdownLintConfig: DEFAULT_MARKDOWN_LINT_CONFIG
customMarkdownLintConfig: DEFAULT_MARKDOWN_LINT_CONFIG,
prettierConfig: ` {
"trailingComma": "es5",
"tabWidth": 4,
"semi": false,
"singleQuote": true
}`,
deleteUnusedAttachments: true
},
preview: {
fontSize: '14',
@@ -86,8 +97,10 @@ export const DEFAULT_CONFIG = {
breaks: true,
smartArrows: false,
allowCustomCSS: false,
customCSS: '/* Drop Your Custom CSS Code Here */',
sanitize: 'STRICT', // 'STRICT', 'ALLOW_STYLES', 'NONE'
mermaidHTMLLabel: false,
lineThroughCheckbox: true
},
blog: {
@@ -130,6 +143,8 @@ function get () {
_save(config)
}
config.autoUpdateEnabled = electronConfig.get('autoUpdateEnabled', config.autoUpdateEnabled)
if (!isInitialized) {
isInitialized = true
let editorTheme = document.getElementById('editorTheme')
@@ -194,6 +209,8 @@ function set (updates) {
editorTheme.setAttribute('href', newTheme.path)
}
electronConfig.set('autoUpdateEnabled', newConfig.autoUpdateEnabled)
ipcRenderer.send('config-renew', {
config: get()
})

View File

@@ -8,6 +8,7 @@ const escapeStringRegexp = require('escape-string-regexp')
const sander = require('sander')
const url = require('url')
import i18n from 'browser/lib/i18n'
import { isString } from 'lodash'
const STORAGE_FOLDER_PLACEHOLDER = ':storage'
const DESTINATION_FOLDER = 'attachments'
@@ -19,7 +20,7 @@ const PATH_SEPARATORS = escapeStringRegexp(path.posix.sep) + escapeStringRegexp(
* @returns {Promise<Image>} Image element created
*/
function getImage (file) {
if (_.isString(file)) {
if (isString(file)) {
return new Promise(resolve => {
const img = new Image()
img.onload = () => resolve(img)
@@ -623,6 +624,76 @@ function deleteAttachmentsNotPresentInNote (markdownContent, storageKey, noteKey
}
}
/**
* @description Get all existing attachments related to a specific note
including their status (in use or not) and their path. Return null if there're no attachment related to note or specified parametters are invalid
* @param markdownContent markdownContent of the current note
* @param storageKey StorageKey of the current note
* @param noteKey NoteKey of the currentNote
* @return {Promise<Array<{path: String, isInUse: bool}>>} Promise returning the
list of attachments with their properties */
function getAttachmentsPathAndStatus (markdownContent, storageKey, noteKey) {
if (storageKey == null || noteKey == null || markdownContent == null) {
return null
}
const targetStorage = findStorage.findStorage(storageKey)
const attachmentFolder = path.join(targetStorage.path, DESTINATION_FOLDER, noteKey)
const attachmentsInNote = getAttachmentsInMarkdownContent(markdownContent)
const attachmentsInNoteOnlyFileNames = []
if (attachmentsInNote) {
for (let i = 0; i < attachmentsInNote.length; i++) {
attachmentsInNoteOnlyFileNames.push(attachmentsInNote[i].replace(new RegExp(STORAGE_FOLDER_PLACEHOLDER + escapeStringRegexp(path.sep) + noteKey + escapeStringRegexp(path.sep), 'g'), ''))
}
}
if (fs.existsSync(attachmentFolder)) {
return new Promise((resolve, reject) => {
fs.readdir(attachmentFolder, (err, files) => {
if (err) {
console.error('Error reading directory "' + attachmentFolder + '". Error:')
console.error(err)
reject(err)
return
}
const attachments = []
for (const file of files) {
const absolutePathOfFile = path.join(targetStorage.path, DESTINATION_FOLDER, noteKey, file)
if (!attachmentsInNoteOnlyFileNames.includes(file)) {
attachments.push({ path: absolutePathOfFile, isInUse: false })
} else {
attachments.push({ path: absolutePathOfFile, isInUse: true })
}
}
resolve(attachments)
})
})
} else {
return null
}
}
/**
* @description Remove all specified attachment paths
* @param attachments attachment paths
* @return {Promise} Promise after all attachments are removed */
function removeAttachmentsByPaths (attachments) {
const promises = []
for (const attachment of attachments) {
const promise = new Promise((resolve, reject) => {
fs.unlink(attachment, (err) => {
if (err) {
console.error('Could not delete "%s"', attachment)
console.error(err)
reject(err)
return
}
resolve()
})
})
promises.push(promise)
}
return Promise.all(promises)
}
/**
* Clones the attachments of a given note.
* Copies the attachments to their new destination and updates the content of the new note so that the attachment-links again point to the correct destination.
@@ -725,8 +796,10 @@ module.exports = {
getAbsolutePathsOfAttachmentsInContent,
importAttachments,
removeStorageAndNoteReferences,
removeAttachmentsByPaths,
deleteAttachmentFolder,
deleteAttachmentsNotPresentInNote,
getAttachmentsPathAndStatus,
moveAttachments,
cloneAttachments,
isAttachmentLink,

View File

@@ -0,0 +1,86 @@
const http = require('http')
const https = require('https')
const { createTurndownService } = require('../../../lib/turndown')
const createNote = require('./createNote')
import { push } from 'connected-react-router'
import ee from 'browser/main/lib/eventEmitter'
function validateUrl (str) {
if (/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(str)) {
return true
} else {
return false
}
}
const ERROR_MESSAGES = {
ENOTFOUND: 'URL not found. Please check the URL, or your internet connection and try again.',
VALIDATION_ERROR: 'Please check if the URL follows this format: https://www.google.com',
UNEXPECTED: 'Unexpected error! Please check console for details!'
}
function createNoteFromUrl (url, storage, folder, dispatch = null, location = null) {
return new Promise((resolve, reject) => {
const td = createTurndownService()
if (!validateUrl(url)) {
reject({result: false, error: ERROR_MESSAGES.VALIDATION_ERROR})
}
const request = url.startsWith('https') ? https : http
const req = request.request(url, (res) => {
let data = ''
res.on('data', (chunk) => {
data += chunk
})
res.on('end', () => {
const markdownHTML = td.turndown(data)
if (dispatch !== null) {
createNote(storage, {
type: 'MARKDOWN_NOTE',
folder: folder,
title: '',
content: markdownHTML
})
.then((note) => {
const noteHash = note.key
dispatch({
type: 'UPDATE_NOTE',
note: note
})
dispatch(push({
pathname: location.pathname,
query: {key: noteHash}
}))
ee.emit('list:jump', noteHash)
ee.emit('detail:focus')
resolve({result: true, error: null})
})
} else {
createNote(storage, {
type: 'MARKDOWN_NOTE',
folder: folder,
title: '',
content: markdownHTML
}).then((note) => {
resolve({result: true, note, error: null})
})
}
})
})
req.on('error', (e) => {
console.error('error in parsing URL', e)
reject({result: false, error: ERROR_MESSAGES[e.code] || ERROR_MESSAGES.UNEXPECTED})
})
req.end()
})
}
module.exports = createNoteFromUrl

View File

@@ -3,7 +3,6 @@ const path = require('path')
const resolveStorageData = require('./resolveStorageData')
const resolveStorageNotes = require('./resolveStorageNotes')
const CSON = require('@rokt33r/season')
const sander = require('sander')
const { findStorage } = require('browser/lib/findStorage')
const deleteSingleNote = require('./deleteNote')

View File

@@ -43,7 +43,7 @@ function exportNote (nodeKey, storageKey, noteContent, targetPath, outputFormatt
)
if (outputFormatter) {
exportedData = outputFormatter(exportedData, exportTasks, path.dirname(targetPath))
exportedData = outputFormatter(exportedData, exportTasks, targetPath)
} else {
exportedData = Promise.resolve(exportedData)
}

View File

@@ -11,6 +11,7 @@ const dataApi = {
exportFolder: require('./exportFolder'),
exportStorage: require('./exportStorage'),
createNote: require('./createNote'),
createNoteFromUrl: require('./createNoteFromUrl'),
updateNote: require('./updateNote'),
deleteNote: require('./deleteNote'),
moveNote: require('./moveNote'),

View File

@@ -1,7 +1,6 @@
const resolveStorageData = require('./resolveStorageData')
const _ = require('lodash')
const path = require('path')
const fs = require('fs')
const CSON = require('@rokt33r/season')
const keygen = require('browser/lib/keygen')
const sander = require('sander')

View File

@@ -0,0 +1,118 @@
import PropTypes from 'prop-types'
import React from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './CreateMarkdownFromURLModal.styl'
import dataApi from 'browser/main/lib/dataApi'
import ModalEscButton from 'browser/components/ModalEscButton'
import i18n from 'browser/lib/i18n'
class CreateMarkdownFromURLModal extends React.Component {
constructor (props) {
super(props)
this.state = {
name: '',
showerror: false,
errormessage: ''
}
}
componentDidMount () {
this.refs.name.focus()
this.refs.name.select()
}
handleCloseButtonClick (e) {
this.props.close()
}
handleChange (e) {
this.setState({
name: this.refs.name.value
})
}
handleKeyDown (e) {
if (e.keyCode === 27) {
this.props.close()
}
}
handleInputKeyDown (e) {
switch (e.keyCode) {
case 13:
this.confirm()
}
}
handleConfirmButtonClick (e) {
this.confirm()
}
showError (message) {
this.setState({
showerror: true,
errormessage: message
})
}
hideError () {
this.setState({
showerror: false,
errormessage: ''
})
}
confirm () {
this.hideError()
const { storage, folder, dispatch, location } = this.props
dataApi.createNoteFromUrl(this.state.name, storage, folder, dispatch, location).then((result) => {
this.props.close()
}).catch((result) => {
this.showError(result.error)
})
}
render () {
return (
<div styleName='root'
tabIndex='-1'
onKeyDown={(e) => this.handleKeyDown(e)}
>
<div styleName='header'>
<div styleName='title'>{i18n.__('Import Markdown From URL')}</div>
</div>
<ModalEscButton handleEscButtonClick={(e) => this.handleCloseButtonClick(e)} />
<div styleName='control'>
<div styleName='control-folder'>
<div styleName='control-folder-label'>{i18n.__('Insert URL Here')}</div>
<input styleName='control-folder-input'
ref='name'
value={this.state.name}
onChange={(e) => this.handleChange(e)}
onKeyDown={(e) => this.handleInputKeyDown(e)}
/>
</div>
<button styleName='control-confirmButton'
onClick={(e) => this.handleConfirmButtonClick(e)}
>
{i18n.__('Import')}
</button>
<div className='error' styleName='error'>{this.state.errormessage}</div>
</div>
</div>
)
}
}
CreateMarkdownFromURLModal.propTypes = {
storage: PropTypes.string,
folder: PropTypes.string,
dispatch: PropTypes.func,
location: PropTypes.shape({
pathname: PropTypes.string
})
}
export default CSSModules(CreateMarkdownFromURLModal, styles)

View File

@@ -0,0 +1,160 @@
.root
modal()
width 500px
height 270px
overflow hidden
position relative
.header
height 80px
margin-bottom 10px
margin-top 20px
font-size 18px
line-height 50px
background-color $ui-backgroundColor
color $ui-text-color
.title
font-size 36px
font-weight 600
.control-folder-label
text-align left
font-size 14px
color $ui-text-color
.control-folder-input
display block
height 40px
width 490px
padding 0 5px
margin 10px 0
border 1px solid $ui-input--create-folder-modal
border-radius 2px
background-color transparent
outline none
vertical-align middle
font-size 16px
&:disabled
background-color $ui-input--disabled-backgroundColor
&:focus, &:active
border-color $ui-active-color
.control-confirmButton
display block
height 35px
width 140px
border none
border-radius 2px
padding 0 25px
margin 20px auto
font-size 14px
colorPrimaryButton()
body[data-theme="dark"]
.root
modalDark()
width 500px
height 270px
overflow hidden
position relative
.header
background-color transparent
border-color $ui-dark-borderColor
color $ui-dark-text-color
.control-folder-label
color $ui-dark-text-color
.control-folder-input
border 1px solid $ui-input--create-folder-modal
color white
.description
color $ui-inactive-text-color
.control-confirmButton
colorDarkPrimaryButton()
body[data-theme="solarized-dark"]
.root
modalSolarizedDark()
width 500px
height 270px
overflow hidden
position relative
.header
background-color transparent
border-color $ui-dark-borderColor
color $ui-solarized-dark-text-color
.control-folder-label
color $ui-solarized-dark-text-color
.control-folder-input
border 1px solid $ui-input--create-folder-modal
color white
.description
color $ui-inactive-text-color
.control-confirmButton
colorSolarizedDarkPrimaryButton()
.error
text-align center
color #F44336
body[data-theme="monokai"]
.root
modalMonokai()
width 500px
height 270px
overflow hidden
position relative
.header
background-color transparent
border-color $ui-dark-borderColor
color $ui-monokai-text-color
.control-folder-label
color $ui-monokai-text-color
.control-folder-input
border 1px solid $ui-input--create-folder-modal
color white
.description
color $ui-inactive-text-color
.control-confirmButton
colorMonokaiPrimaryButton()
body[data-theme="dracula"]
.root
modalDracula()
width 500px
height 270px
overflow hidden
position relative
.header
background-color transparent
border-color $ui-dracula-borderColor
color $ui-dracula-text-color
.control-folder-label
color $ui-dracula-text-color
.control-folder-input
border 1px solid $ui-input--create-folder-modal
color white
.description
color $ui-inactive-text-color
.control-confirmButton
colorDraculaPrimaryButton()

View File

@@ -3,6 +3,8 @@ import CSSModules from 'browser/lib/CSSModules'
import styles from './NewNoteModal.styl'
import ModalEscButton from 'browser/components/ModalEscButton'
import i18n from 'browser/lib/i18n'
import { openModal } from 'browser/main/lib/modal'
import CreateMarkdownFromURLModal from '../modals/CreateMarkdownFromURLModal'
import { createMarkdownNote, createSnippetNote } from 'browser/lib/newNote'
import queryString from 'query-string'
@@ -21,6 +23,18 @@ class NewNoteModal extends React.Component {
this.props.close()
}
handleCreateMarkdownFromUrlClick (e) {
this.props.close()
const { storage, folder, dispatch, location } = this.props
openModal(CreateMarkdownFromURLModal, {
storage: storage,
folder: folder,
dispatch,
location
})
}
handleMarkdownNoteButtonClick (e) {
const { storage, folder, dispatch, location, config } = this.props
const params = location.search !== '' && queryString.parse(location.search)
@@ -115,10 +129,8 @@ class NewNoteModal extends React.Component {
</button>
</div>
<div styleName='description'>
<i className='fa fa-arrows-h' />{i18n.__('Tab to switch format')}
</div>
<div styleName='description'><i className='fa fa-arrows-h' />{i18n.__('Tab to switch format')}</div>
<div styleName='from-url' onClick={(e) => this.handleCreateMarkdownFromUrlClick(e)}>Or, create a new markdown note from a URL</div>
</div>
)
}

View File

@@ -48,6 +48,12 @@
text-align center
margin-bottom 25px
.from-url
color $ui-inactive-text-color
text-align center
margin-bottom 25px
cursor pointer
body[data-theme="dark"]
.root
modalDark()
@@ -62,7 +68,7 @@ body[data-theme="dark"]
&:focus
colorDarkPrimaryButton()
.description
.description, .from-url
color $ui-inactive-text-color
body[data-theme="solarized-dark"]
@@ -79,7 +85,7 @@ body[data-theme="solarized-dark"]
&:focus
colorDarkPrimaryButton()
.description
.description, .from-url
color $ui-solarized-dark-text-color
body[data-theme="monokai"]
@@ -96,7 +102,7 @@ body[data-theme="monokai"]
&:focus
colorDarkPrimaryButton()
.description
.description, .from-url
color $ui-monokai-text-color
body[data-theme="dracula"]

View File

@@ -76,13 +76,16 @@ class HotkeyTab extends React.Component {
handleHotkeyChange (e) {
const { config } = this.state
config.hotkey = {
config.hotkey = Object.assign({}, config.hotkey, {
toggleMain: this.refs.toggleMain.value,
toggleMode: this.refs.toggleMode.value,
deleteNote: this.refs.deleteNote.value,
pasteSmartly: this.refs.pasteSmartly.value,
toggleMenuBar: this.refs.toggleMenuBar.value
}
prettifyMarkdown: this.refs.prettifyMarkdown.value,
toggleMenuBar: this.refs.toggleMenuBar.value,
insertDate: this.refs.insertDate.value,
insertDateTime: this.refs.insertDateTime.value
})
this.setState({
config
})
@@ -173,10 +176,21 @@ class HotkeyTab extends React.Component {
/>
</div>
</div>
<div styleName='group-section'>
<div styleName='group-section-label'>{i18n.__('Prettify Markdown')}</div>
<div styleName='group-section-control'>
<input styleName='group-section-control-input'
onChange={(e) => this.handleHotkeyChange(e)}
ref='prettifyMarkdown'
value={config.hotkey.prettifyMarkdown}
type='text' />
</div>
</div>
<div styleName='group-section'>
<div styleName='group-section-label'>{i18n.__('Insert Current Date')}</div>
<div styleName='group-section-control'>
<input styleName='group-section-control-input'
ref='insertDate'
value={config.hotkey.insertDate}
type='text'
disabled='true'
@@ -187,6 +201,7 @@ class HotkeyTab extends React.Component {
<div styleName='group-section-label'>{i18n.__('Insert Current Date and Time')}</div>
<div styleName='group-section-control'>
<input styleName='group-section-control-input'
ref='insertDateTime'
value={config.hotkey.insertDateTime}
type='text'
disabled='true'

View File

@@ -61,6 +61,15 @@ class InfoTab extends React.Component {
})
}
toggleAutoUpdate () {
const newConfig = {
autoUpdateEnabled: !this.state.config.autoUpdateEnabled
}
this.setState({ config: newConfig })
ConfigManager.set(newConfig)
}
infoMessage () {
const { amaMessage } = this.state
return amaMessage ? <p styleName='policy-confirm'>{amaMessage}</p> : null
@@ -140,6 +149,8 @@ class InfoTab extends React.Component {
</li>
</ul>
<div><label><input type='checkbox' onChange={this.toggleAutoUpdate.bind(this)} checked={this.state.config.autoUpdateEnabled} />{i18n.__('Enable Auto Update')}</label></div>
<hr styleName='separate-line' />
<div styleName='group-header2--sub'>{i18n.__('Analytics')}</div>

View File

@@ -102,3 +102,11 @@ body[data-theme="solarized-dark"]
border-color $ui-solarized-dark-button-backgroundColor
background-color $ui-solarized-dark-button-backgroundColor
color $ui-solarized-dark-text-color
body[data-theme="dracula"]
.header
border-color $ui-dracula-borderColor
.header-control-button
colorDraculaDefaultButton()
border-color $ui-dracula-borderColor

View File

@@ -3,8 +3,11 @@ import React from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './StoragesTab.styl'
import dataApi from 'browser/main/lib/dataApi'
import attachmentManagement from 'browser/main/lib/dataApi/attachmentManagement'
import StorageItem from './StorageItem'
import i18n from 'browser/lib/i18n'
import { humanFileSize } from 'browser/lib/utils'
import fs from 'fs'
const electron = require('electron')
const { shell, remote } = electron
@@ -35,8 +38,29 @@ class StoragesTab extends React.Component {
name: 'Unnamed',
type: 'FILESYSTEM',
path: ''
},
attachments: []
}
this.loadAttachmentStorage()
}
loadAttachmentStorage () {
const promises = []
this.props.data.noteMap.map(note => {
const promise = attachmentManagement.getAttachmentsPathAndStatus(
note.content,
note.storage,
note.key
)
if (promise) promises.push(promise)
})
Promise.all(promises)
.then(data => {
const result = data.reduce((acc, curr) => acc.concat(curr), [])
this.setState({attachments: result})
})
.catch(console.error)
}
handleAddStorageButton (e) {
@@ -57,8 +81,39 @@ class StoragesTab extends React.Component {
e.preventDefault()
}
handleRemoveUnusedAttachments (attachments) {
attachmentManagement.removeAttachmentsByPaths(attachments)
.then(() => this.loadAttachmentStorage())
.catch(console.error)
}
renderList () {
const { data, boundingBox } = this.props
const { attachments } = this.state
const unusedAttachments = attachments.filter(attachment => !attachment.isInUse)
const inUseAttachments = attachments.filter(attachment => attachment.isInUse)
const totalUnusedAttachments = unusedAttachments.length
const totalInuseAttachments = inUseAttachments.length
const totalAttachments = totalUnusedAttachments + totalInuseAttachments
const totalUnusedAttachmentsSize = unusedAttachments
.reduce((acc, curr) => {
const stats = fs.statSync(curr.path)
const fileSizeInBytes = stats.size
return acc + fileSizeInBytes
}, 0)
const totalInuseAttachmentsSize = inUseAttachments
.reduce((acc, curr) => {
const stats = fs.statSync(curr.path)
const fileSizeInBytes = stats.size
return acc + fileSizeInBytes
}, 0)
const totalAttachmentsSize = totalUnusedAttachmentsSize + totalInuseAttachmentsSize
const unusedAttachmentPaths = unusedAttachments
.reduce((acc, curr) => acc.concat(curr.path), [])
if (!boundingBox) { return null }
const storageList = data.storageMap.map((storage) => {
@@ -82,6 +137,20 @@ class StoragesTab extends React.Component {
<i className='fa fa-plus' /> {i18n.__('Add Storage Location')}
</button>
</div>
<div styleName='header'>{i18n.__('Attachment storage')}</div>
<p styleName='list-attachment-label'>
Unused attachments size: {humanFileSize(totalUnusedAttachmentsSize)} ({totalUnusedAttachments} items)
</p>
<p styleName='list-attachment-label'>
In use attachments size: {humanFileSize(totalInuseAttachmentsSize)} ({totalInuseAttachments} items)
</p>
<p styleName='list-attachment-label'>
Total attachments size: {humanFileSize(totalAttachmentsSize)} ({totalAttachments} items)
</p>
<button styleName='list-attachement-clear-button'
onClick={() => this.handleRemoveUnusedAttachments(unusedAttachmentPaths)}>
{i18n.__('Clear unused attachments')}
</button>
</div>
)
}

View File

@@ -33,6 +33,17 @@
colorDefaultButton()
font-size $tab--button-font-size
border-radius 2px
.list-attachment-label
margin-bottom 10px
color $ui-text-color
.list-attachement-clear-button
height 30px
border none
border-top-right-radius 2px
border-bottom-right-radius 2px
colorPrimaryButton()
vertical-align middle
padding 0 20px
.addStorage
margin-bottom 15px
@@ -154,8 +165,8 @@ body[data-theme="dark"]
.addStorage-body-control-cancelButton
colorDarkDefaultButton()
border-color $ui-dark-borderColor
.list-attachement-clear-button
colorDarkPrimaryButton()
body[data-theme="solarized-dark"]
.root
@@ -194,6 +205,8 @@ body[data-theme="solarized-dark"]
.addStorage-body-control-cancelButton
colorDarkDefaultButton()
border-color $ui-solarized-dark-borderColor
.list-attachement-clear-button
colorSolarizedDarkPrimaryButton()
body[data-theme="monokai"]
.root
@@ -232,6 +245,8 @@ body[data-theme="monokai"]
.addStorage-body-control-cancelButton
colorDarkDefaultButton()
border-color $ui-monokai-borderColor
.list-attachement-clear-button
colorMonokaiPrimaryButton()
body[data-theme="dracula"]
.root
@@ -270,3 +285,5 @@ body[data-theme="dracula"]
.addStorage-body-control-cancelButton
colorDarkDefaultButton()
border-color $ui-dracula-borderColor
.list-attachement-clear-button
colorDraculaPrimaryButton()

View File

@@ -14,7 +14,6 @@ import { getLanguages } from 'browser/lib/Languages'
import normalizeEditorFontFamily from 'browser/lib/normalizeEditorFontFamily'
const OSX = global.process.platform === 'darwin'
const WIN = global.process.platform === 'win32'
const electron = require('electron')
const ipc = electron.ipcRenderer
@@ -32,8 +31,12 @@ class UiTab extends React.Component {
CodeMirror.autoLoadMode(this.codeMirrorInstance.getCodeMirror(), 'javascript')
CodeMirror.autoLoadMode(this.customCSSCM.getCodeMirror(), 'css')
CodeMirror.autoLoadMode(this.customMarkdownLintConfigCM.getCodeMirror(), 'javascript')
CodeMirror.autoLoadMode(this.prettierConfigCM.getCodeMirror(), 'javascript')
// Set CM editor Sizes
this.customCSSCM.getCodeMirror().setSize('400px', '400px')
this.prettierConfigCM.getCodeMirror().setSize('400px', '400px')
this.customMarkdownLintConfigCM.getCodeMirror().setSize('400px', '200px')
this.handleSettingDone = () => {
this.setState({UiAlert: {
type: 'success',
@@ -107,7 +110,9 @@ class UiTab extends React.Component {
spellcheck: this.refs.spellcheck.checked,
enableSmartPaste: this.refs.enableSmartPaste.checked,
enableMarkdownLint: this.refs.enableMarkdownLint.checked,
customMarkdownLintConfig: this.customMarkdownLintConfigCM.getCodeMirror().getValue()
customMarkdownLintConfig: this.customMarkdownLintConfigCM.getCodeMirror().getValue(),
prettierConfig: this.prettierConfigCM.getCodeMirror().getValue(),
deleteUnusedAttachments: this.refs.deleteUnusedAttachments.checked
},
preview: {
fontSize: this.refs.previewFontSize.value,
@@ -125,6 +130,7 @@ class UiTab extends React.Component {
breaks: this.refs.previewBreaks.checked,
smartArrows: this.refs.previewSmartArrows.checked,
sanitize: this.refs.previewSanitize.value,
mermaidHTMLLabel: this.refs.previewMermaidHTMLLabel.checked,
allowCustomCSS: this.refs.previewAllowCustomCSS.checked,
lineThroughCheckbox: this.refs.lineThroughCheckbox.checked,
customCSS: this.customCSSCM.getCodeMirror().getValue()
@@ -612,6 +618,16 @@ class UiTab extends React.Component {
{i18n.__('Enable spellcheck - Experimental feature!! :)')}
</label>
</div>
<div styleName='group-checkBoxSection'>
<label>
<input onChange={(e) => this.handleUIChange(e)}
checked={this.state.config.editor.deleteUnusedAttachments}
ref='deleteUnusedAttachments'
type='checkbox'
/>&nbsp;
{i18n.__('Delete attachments, that are not referenced in the text anymore')}
</label>
</div>
<div styleName='group-section'>
<div styleName='group-section-label'>
@@ -813,6 +829,16 @@ class UiTab extends React.Component {
</select>
</div>
</div>
<div styleName='group-checkBoxSection'>
<label>
<input onChange={(e) => this.handleUIChange(e)}
checked={this.state.config.preview.mermaidHTMLLabel}
ref='previewMermaidHTMLLabel'
type='checkbox'
/>&nbsp;
{i18n.__('Enable HTML label in mermaid flowcharts')}
</label>
</div>
<div styleName='group-section'>
<div styleName='group-section-label'>
{i18n.__('LaTeX Inline Open Delimiter')}
@@ -904,7 +930,27 @@ class UiTab extends React.Component {
</div>
</div>
</div>
<div styleName='group-section'>
<div styleName='group-section-label'>
{i18n.__('Prettier Config')}
</div>
<div styleName='group-section-control'>
<div style={{fontFamily}}>
<ReactCodeMirror
width='400px'
height='400px'
onChange={e => this.handleUIChange(e)}
ref={e => (this.prettierConfigCM = e)}
value={config.editor.prettierConfig}
options={{
lineNumbers: true,
mode: 'application/json',
lint: true,
theme: codemirrorTheme
}} />
</div>
</div>
</div>
<div styleName='group-control'>
<button styleName='group-control-rightButton'
onClick={(e) => this.handleSaveUIClick(e)}>{i18n.__('Save')}

View File

@@ -410,6 +410,15 @@ $ui-dracula-button--active-color = #f8f8f2
$ui-dracula-button--active-backgroundColor = #bd93f9
$ui-dracula-button--hover-backgroundColor = lighten($ui-dracula-backgroundColor, 10%)
$ui-dracula-button--focus-borderColor = lighten(#44475a, 25%)
colorDraculaDefaultButton()
border-color $ui-dracula-borderColor
color $ui-dracula-text-color
background-color $ui-dracula-button-backgroundColor
&:hover
background-color $ui-dracula-button--hover-backgroundColor
&:active
&:active:hover
background-color $ui-dracula-button--active-backgroundColor
modalDracula()
position relative

View File

@@ -1,3 +1,5 @@
> [Please consider to contribute to the new Boost Note app too!](https://github.com/BoostIO/BoostNote.next)
# Contributing to Boostnote (English)
### When you open an issue or a bug report

View File

@@ -42,7 +42,9 @@ Então nós preparamos um _script_ separado, o qual somente cria um executável.
grunt pre-build
```
Você irá encontrar o executável na pasta `dist`. Nota: o atualizador automático não funciona porque o app não está certificado.
Você irá encontrar o executável na pasta `dist`.
**Nota:** o atualizador automático não funciona porque o app não está certificado.
Se você achar isto necessário, você pode usar o _codesign_ ou o _authenticode_ com esse executável.
@@ -50,7 +52,7 @@ Se você achar isto necessário, você pode usar o _codesign_ ou o _authenticode
Pacotes de distribuição são gerados através do comando `grunt build` em plataforma Linux (e.g. Ubuntu, Fedora).
> Nota: você pode criar `.deb` e `.rpm` em um mesmo ambiente.
**Nota:** você pode criar `.deb` e `.rpm` em um mesmo ambiente.
Depois de instalar uma versão suportada do `node` e do `npm`, deve-se instalar as dependências para gerar os pacotes.

View File

@@ -4,25 +4,25 @@ const Menu = electron.Menu
const ipc = electron.ipcMain
const GhReleases = require('electron-gh-releases')
const { isPackaged } = app
const electronConfig = new (require('electron-config'))()
// electron.crashReporter.start()
const singleInstance = app.requestSingleInstanceLock()
var ipcServer = null
var mainWindow = null
var shouldQuit = app.makeSingleInstance(function (commandLine, workingDirectory) {
// Single Instance Lock
if (!singleInstance) {
app.quit()
} else {
app.on('second-instance', () => {
// Someone tried to run a second instance, it should focus the existing instance.
if (mainWindow) {
if (process.platform === 'win32') {
mainWindow.minimize()
mainWindow.restore()
}
if (!mainWindow.isVisible()) mainWindow.show()
mainWindow.focus()
}
return true
})
if (shouldQuit) {
app.quit()
})
}
var isUpdateReady = false
@@ -41,6 +41,7 @@ function checkUpdate () {
console.log('Updates are disabled in Development mode, see main-app.js')
return true
}
if (!electronConfig.get('autoUpdateEnabled', true)) return
if (process.platform === 'linux' || isUpdateReady) {
return true
}

View File

@@ -86,21 +86,21 @@ const file = {
},
{
label: 'Focus Note',
accelerator: macOS ? 'Command+E' : 'Control+E',
accelerator: 'CommandOrControl+E',
click () {
mainWindow.webContents.send('detail:focus')
}
},
{
label: 'Delete Note',
accelerator: macOS ? 'Command+Shift+Backspace' : 'Control+Shift+Backspace',
accelerator: 'CommandOrControl+Shift+Backspace',
click () {
mainWindow.webContents.send('detail:delete')
}
},
{
label: 'Clone Note',
accelerator: macOS ? 'Command+D' : 'Control+D',
accelerator: 'CommandOrControl+D',
click () {
mainWindow.webContents.send('list:clone')
}
@@ -260,7 +260,7 @@ const view = {
},
{
label: 'Toggle Developer Tools',
accelerator: macOS ? 'Command+Alt+I' : 'Control+Shift+I',
accelerator: 'CommandOrControl+Alt+I',
click () {
BrowserWindow.getFocusedWindow().toggleDevTools()
}
@@ -314,21 +314,21 @@ const view = {
},
{
label: 'Actual Size',
accelerator: macOS ? 'CommandOrControl+0' : 'Control+0',
accelerator: 'CommandOrControl+0',
click () {
mainWindow.webContents.send('status:zoomreset')
}
},
{
label: 'Zoom In',
accelerator: macOS ? 'CommandOrControl+=' : 'Control+=',
accelerator: 'CommandOrControl+=',
click () {
mainWindow.webContents.send('status:zoomin')
}
},
{
label: 'Zoom Out',
accelerator: macOS ? 'CommandOrControl+-' : 'Control+-',
accelerator: 'CommandOrControl+-',
click () {
mainWindow.webContents.send('status:zoomout')
}

View File

@@ -73,6 +73,11 @@
mix-blend-mode: difference;
}
.CodeMirror-scroll {
margin-bottom: 0;
padding-bottom: 0;
}
.CodeMirror-lint-tooltip {
z-index: 1003;
}

View File

@@ -10,6 +10,7 @@
<link rel="stylesheet" href="../node_modules/codemirror/lib/codemirror.css">
<link rel="stylesheet" href="../node_modules/katex/dist/katex.min.css">
<link rel="stylesheet" href="../node_modules/codemirror/addon/dialog/dialog.css">
<link rel="stylesheet" href="../node_modules/codemirror/addon/lint/lint.css">
<link rel="stylesheet" href="../extra_scripts/codemirror/mode/bfm/bfm.css">
<title>Boostnote</title>
@@ -71,6 +72,11 @@
border-left-color: rgba(142, 142, 142, 0.5);
mix-blend-mode: difference;
}
.CodeMirror-scroll {
margin-bottom: 0;
padding-bottom: 0;
}
</style>
</head>
@@ -124,6 +130,10 @@
<script src="../node_modules/codemirror/addon/dialog/dialog.js"></script>
<script src="../node_modules/codemirror/addon/display/rulers.js"></script>
<script src="../node_modules/jsonlint-mod/lib/jsonlint.js"></script>
<script src="../node_modules/codemirror/addon/lint/lint.js"></script>
<script src="../node_modules/codemirror/addon/lint/json-lint.js"></script>
<script src="../node_modules/raphael/raphael.min.js"></script>
<script src="../node_modules/flowchart.js/release/flowchart.min.js"></script>
<script>

194
locales/cs.json Normal file
View File

@@ -0,0 +1,194 @@
{
"Notes": "Poznámky",
"Tags": "Štítky",
"Preferences": "Předvolby",
"Make a note": "Vytvořit poznámku",
"Ctrl": "Ctrl",
"Ctrl(^)": "Ctrl(^)",
"to create a new note": " pro vytvoření nové poznámky",
"Toggle Mode": "Přepnout režim",
"Add tag...": "Přidat štítek...",
"Trash": "Koš",
"Ok": "Ok",
"MODIFICATION DATE": "DATUM ZMĚNY",
"Words": "Slova",
"Letters": "Písmena",
"STORAGE": "ÚLOŽIŠTĚ",
"FOLDER": "SLOŽKA",
"CREATION DATE": "DATUM VYTVOŘENÍ",
"NOTE LINK": "ODKAZ NA POZNÁMKU",
".md": ".md",
".txt": ".txt",
".html": ".html",
".pdf": ".pdf",
"Print": "Tisk",
"Your preferences for Boostnote": "Vaše předvolby pro Boostnote",
"Help": "Nápověda",
"Hide Help": "Skrýt nápovědu",
"Storage Locations": "Umístění úložiště",
"Add Storage Location": "Přidat umístění úložiště",
"Add Folder": "Přidat složku",
"Select Folder": "Vybrat složku",
"Open Storage folder": "Otevřít složku úložiště",
"Unlink": "Zrušit odkaz",
"Edit": "Editovat",
"Delete": "Odstranit",
"Interface": "Rozhraní",
"Interface Theme": "Téma vzhledu rozhraní",
"Default": "Výchozí",
"White": "Bílé",
"Solarized Dark": "Solarizovaně tmavé",
"Dark": "Tmavé",
"Show a confirmation dialog when deleting notes": "Zobrazovat při odstraňování poznámek dialog pro potvrzení",
"Disable Direct Write (It will be applied after restarting)": "Zakázat přímý zápis (Bude aplikováno po restartu)",
"Show only related tags": "Zobrazit pouze související štítky",
"Editor Theme": "Téma vzhledu editoru",
"Editor Font Size": "Velikost písma editoru",
"Editor Font Family": "Rodiny písma editoru",
"Editor Indent Style": "Styl odsazení editoru",
"Spaces": "Mezery",
"Tabs": "Tabulátory",
"Switch to Preview": "Přepnout na náhled",
"When Editor Blurred": "Když se editor rozostří",
"When Editor Blurred, Edit On Double Click": "Při rozostření editoru, editovat po dvojím kliknutí",
"On Right Click": "Po kliknutí pravým tlačítkem myši",
"Editor Keymap": "Mapa kláves editoru",
"default": "výchozí",
"vim": "vim",
"emacs": "emacs",
"⚠️ Please restart boostnote after you change the keymap": "⚠️ Prosím restartujte boostnote po změně mapy kláves",
"Show line numbers in the editor": "Zobrazit v editoru čísla řádků",
"Allow editor to scroll past the last line": "Povolit v editoru scrolování za poslední řádek",
"Enable smart quotes": "Povolit chytré komentáře",
"Bring in web page title when pasting URL on editor": "Vložit název webové stránky při zkopírování URL do editoru",
"Preview": "Náhled",
"Preview Font Size": "Velikost písma v náhledu",
"Preview Font Family": "Rodina písma v náhledu",
"Code Block Theme": "Téma bloku kódu",
"Allow preview to scroll past the last line": "Povolit v náhledu scrolování za poslední řádek",
"Show line numbers for preview code blocks": "Zobrazit čísla řádků v náhledu bloků kódu",
"LaTeX Inline Open Delimiter": "inline otevírací oddělovač v LaTeX",
"LaTeX Inline Close Delimiter": "inline uzavírací oddělovač v LaTeX",
"LaTeX Block Open Delimiter": "otevírací oddělovač bloku v LaTeX",
"LaTeX Block Close Delimiter": "uzavírací oddělovač bloku v LaTeX",
"PlantUML Server": "PlantUML server",
"Community": "Komunita",
"Subscribe to Newsletter": "Přihlásit se k odběru novinek",
"GitHub": "GitHub",
"Blog": "Blog",
"Facebook Group": "Facebook Skupina",
"Twitter": "Twitter",
"About": "O aplikaci",
"Boostnote": "Boostnote",
"An open source note-taking app made for programmers just like you.": "Open source aplikace pro tvorbu poznámek vytvořená programátory jako jste vy.",
"Website": "Webová stránka",
"Development": "Vývoj",
" : Development configurations for Boostnote.": " : Vývojové konfigurace pro Boostnote.",
"Copyright (C) 2017 - 2019 BoostIO": "Copyright (C) 2017 - 2019 BoostIO",
"License: GPL v3": "License: GPL v3",
"Analytics": "Analytika",
"Boostnote collects anonymous data for the sole purpose of improving the application, and strictly does not collect any personal information such the contents of your notes.": "Boostnote sbírá anonymní data pouze pro účely zlepšování aplikace, a v žádném případě nesbírá žádné osobní údaje, jako je například obsah vašich poznámek.",
"You can see how it works on ": "Můžete se podívat, jak to funguje ",
"You can choose to enable or disable this option.": "Tuto možnost můžete povolit nebo zakázat.",
"Enable analytics to help improve Boostnote": "Povolit analytiku pro další zlepšování Boostnote",
"Crowdfunding": "Crowdfunding",
"Dear Boostnote users,": "Vážení uživatelé Boostnote,",
"Thank you for using Boostnote!": "Děkujeme, že používáte Boostnote!",
"Boostnote is used in about 200 different countries and regions by an awesome community of developers.": "Boostnote je používán v přibližně 200 různých zemích a regionech úžasnou komunitou vývojářů.",
"To support our growing userbase, and satisfy community expectations,": "Abychom podpořili rostoucí uživatelskou základnu a naplnili očekávání komunity,",
"we would like to invest more time and resources in this project.": "rádi bychom do tohoto projektu investovali více času a zdrojů.",
"If you use Boostnote and see its potential, help us out by supporting the project on OpenCollective!": "Pokud používáte Boostnote a vidíte jeho potenciál, pomozte nám podporou projektu na OpenCollective!",
"Thanks,": "Děkujeme,",
"The Boostnote Team": "Tým Boostnote",
"Support via OpenCollective": "Podpořit přes OpenCollective",
"Language": "Jazyk",
"Default New Note": "Výchozí nová poznámka",
"English": "Angličtina",
"German": "Němčina",
"French": "Francouzština",
"Show \"Saved to Clipboard\" notification when copying": "Zobrazit při kopírování upozornění \"Uloženo do schránky\"",
"All Notes": "Všechny poznámky",
"Starred": "Oblíbené",
"Are you sure to ": "Opravdu ",
" delete": " odstranit",
"this folder?": "tuto složku?",
"Confirm": "Potvrdit",
"Cancel": "Storno",
"Markdown Note": "Markdown poznámka",
"This format is for creating text documents. Checklists, code blocks and Latex blocks are available.": "Tento formát je pro tvorbu textových dokumentů. Zaškrtávací seznamy, bloky kódu a Latex bloky jsou dostupné.",
"Snippet Note": "Útržek kódu",
"This format is for creating code snippets. Multiple snippets can be grouped into a single note.": "Tento formát je pro tvorbu útržků kódu. Do jedné poznámky lze seskupit více útržků.",
"Tab to switch format": "Pro přepnutí formátu zmáčkněte Tab",
"Updated": "Aktualizováno",
"Created": "Vytvořeno",
"Alphabetically": "Abecedně",
"Counter": "Počítadlo",
"Default View": "Výchozí zobrazení",
"Compressed View": "Komprimované zobrazení",
"Search": "Vyhledat",
"Blog Type": "Typ blogu",
"Blog Address": "Adresa blogu",
"Save": "Uložit",
"Auth": "Autentizace",
"Authentication Method": "Autentizační metoda",
"JWT": "JWT",
"USER": "UŽIVATEL",
"Token": "Token",
"Storage": "Uložiště",
"Hotkeys": "Klávesové zkratky",
"Show/Hide Boostnote": "Zobrazit/skrýt Boostnote",
"Toggle Editor Mode": "Přepnout režim editoru",
"Delete Note": "Odstranit poznámku",
"Restore": "Obnovit",
"Permanent Delete": "Trvale odstranit",
"Confirm note deletion": "Potvrdit odstranění poznámky",
"This will permanently remove this note.": "Tato akce trvale odstraní poznámku.",
"Successfully applied!": "Úspěšně aplikováno!",
"Albanian": "Albánština",
"Chinese (zh-CN)": "Čínština (zjednodušená)",
"Chinese (zh-TW)": "Čínština (tradiční)",
"Danish": "Dánština",
"Japanese": "Japonština",
"Korean": "Korejština",
"Norwegian": "Norština",
"Polish": "Polština",
"Portuguese": "Portugalština",
"Spanish": "Španělština",
"Unsaved Changes!": "Neuložené změny!",
"UserName": "Uživatelské jméno",
"Password": "Heslo",
"Russian": "Rusky",
"Hungarian": "Maďarsky",
"Thai": "Thajština (ภาษาไทย)",
"Command(⌘)": "Command(⌘)",
"Add Storage": "Přidat úložiště",
"Name": "Jméno",
"Type": "Typ",
"File System": "Souborový systém",
"Setting up 3rd-party cloud storage integration:": "Nastavení integrace s úložištěm třetí strany:",
"Cloud-Syncing-and-Backup": "Synchronizace a záloha do cloudu",
"Location": "Umístění",
"Add": "Přidat",
"Unlink Storage": "Odpojit úložiště",
"Unlinking removes this linked storage from Boostnote. No data is removed, please manually delete the folder from your hard drive if needed.": "Odpojení odstraní toto připojené úložiště z Boostnote. Žádná data nebudou odstraněna, prosím odstraňte složku z vašeho pevného disku manuálně.",
"Editor Rulers": "Pravítka v editoru",
"Enable": "Povolit",
"Disable": "Zakázat",
"Sanitization": "Sanitace",
"Only allow secure html tags (recommended)": "Povolit pouze bezpečné html tagy (doporučeno)",
"Render newlines in Markdown paragraphs as <br>": "Vykreslit konce řádků v Markdown jako <br>",
"Allow styles": "Povolit styly",
"Allow dangerous html tags": "Povolit nebezpečné html tagy",
"Convert textual arrows to beautiful signs. ⚠ This will interfere with using HTML comments in your Markdown.": "Převést textové šipky do překrásných symbolů. ⚠ Toto bude kolidovat s použitím HTML komentářů ve vašem Markdown.",
"⚠ You have pasted a link referring an attachment that could not be found in the storage location of this note. Pasting links referring attachments is only supported if the source and destination location is the same storage. Please Drag&Drop the attachment instead! ⚠": "⚠ Vložili jste odkaz směrující na přílohu, kterou nebylo možné v umístění úložiště této poznámky najít. Vložením odkazu směrujícího na přílohy je podporováno pouze v případě, že se zdrojové a cílového úložiště shodují. Raději sem prosím přílohu přetáhněte! ⚠",
"Spellcheck disabled": "Kontrola pravopisu zakázána",
"Save tags of a note in alphabetical order": "Uložit štítky poznámky v abecedním pořadí",
"Enable live count of notes": "Povolit zobrazení aktuálního počtu poznámek",
"Enable smart table editor": "Povolit chytrý editor tabulek",
"Snippet Default Language": "Výchozí jazyk kódu",
"New notes are tagged with the filtering tags": "Nové poznámky jsou opatřeny štítky z filtru",
"Show menu bar": "Zobrazit lištu menu",
"Auto Detect": "Automatická detekce",
"Enable HTML label in mermaid flowcharts": "Povolit HTML label v mermaid flowcharts ⚠ Tato možnost je potenciálním zdrojem XSS.",
"Wrap line in Snippet Note": "Ukončovat řádky v útržcích kódu"
}

View File

@@ -8,6 +8,7 @@
"to create a new note": "to create a new note",
"Toggle Mode": "Toggle Mode",
"Trash": "Trash",
"Ok": "Ok",
"MODIFICATION DATE": "MODIFICATION DATE",
"Words": "Words",
"Letters": "Letters",
@@ -135,6 +136,7 @@
"Albanian": "Albanian",
"Chinese (zh-CN)": "Chinese (zh-CN)",
"Chinese (zh-TW)": "Chinese (zh-TW)",
"Czech": "Czech",
"Danish": "Danish",
"Japanese": "Japanese",
"Korean": "Korean",
@@ -157,5 +159,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -8,6 +8,7 @@
"to create a new note": "um eine neue Notiz zu erstellen",
"Toggle Mode": "Modus umschalten",
"Trash": "Papierkorb",
"Ok": "Ok",
"MODIFICATION DATE": "ÄNDERUNGSDATUM",
"Words": "Wörter",
"Letters": "Buchstaben",
@@ -133,6 +134,7 @@
"This will permanently remove this note.": "Diese Notiz wird dauerhaft gelöscht.",
"Unsaved Changes!": "Speichern notwendig!",
"Albanian": "Albanisch",
"Czech": "Tschechisch",
"Danish": "Dänisch",
"Japanese": "Japanisch",
"Korean": "Koreanisch",
@@ -213,5 +215,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -9,6 +9,7 @@
"Toggle Mode": "Toggle Mode",
"Add tag...": "Add tag...",
"Trash": "Trash",
"Ok": "Ok",
"MODIFICATION DATE": "MODIFICATION DATE",
"Words": "Words",
"Letters": "Letters",
@@ -146,6 +147,7 @@
"Albanian": "Albanian",
"Chinese (zh-CN)": "Chinese (zh-CN)",
"Chinese (zh-TW)": "Chinese (zh-TW)",
"Czech": "Czech",
"Danish": "Danish",
"Japanese": "Japanese",
"Korean": "Korean",
@@ -188,5 +190,7 @@
"New notes are tagged with the filtering tags": "New notes are tagged with the filtering tags",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note",
"Enable Auto Update": "Enable Auto Update"
}

View File

@@ -1,4 +1,4 @@
{
{
"Notes": "Notas",
"Tags": "Etiquetas",
"Preferences": "Preferencias",
@@ -8,6 +8,7 @@
"to create a new note": "para crear una nueva nota",
"Toggle Mode": "Alternar modo",
"Trash": "Basura",
"Ok": "Ok",
"MODIFICATION DATE": "FECHA DE MODIFICACIÓN",
"Words": "Palabras",
"Letters": "Letras",
@@ -135,6 +136,7 @@
"Albanian": "Albanés",
"Chinese (zh-CN)": "Chino - China",
"Chinese (zh-TW)": "Chino - Taiwán",
"Czech": "Checo",
"Danish": "Danés",
"Japanese": "Japonés",
"Korean": "Coreano",
@@ -159,5 +161,6 @@
"Show menu bar": "Mostrar barra del menú",
"Auto Detect": "Detección automática",
"Snippet Default Language": "Lenguaje por defecto de los fragmentos de código",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -82,7 +82,7 @@
"Boostnote collects anonymous data for the sole purpose of improving the application, and strictly does not collect any personal information such the contents of your notes.": "Bosstnote اطلاعات ناشناس را برای بهبود عملکرد برنامه جمع آوری می‌کند.اطلاعات شخصی شما مثل محتوای یادداشت ها هرگز برای هیچ هدفی جمع آوری نمی‌شوند",
"You can see how it works on ": "میتوانید ببینید چگونه کار میکند. ",
"You can choose to enable or disable this option.": "میتوانید این گزینه را فعال یا غیرفعال کنید.",
"Enable analytics to help improve Boostnote":".تجزیه تحلیل داده ها را برای کمک به بهبود برنامه فعال کن",
"Enable analytics to help improve Boostnote": ".تجزیه تحلیل داده ها را برای کمک به بهبود برنامه فعال کن",
"Crowdfunding": "جمع سپاری (سرمایه گذاری جمعی )",
"Dear Boostnote users,": "عزیزان,",
"Thank you for using Boostnote!": "از شما بخاطر استفاده از boostnote ممنونیم!",
@@ -136,6 +136,7 @@
"Albanian": "آلبانی",
"Chinese (zh-CN)": "چینی (zh-CN)",
"Chinese (zh-TW)": "چینی (zh-TW)",
"Czech": "Czech",
"Danish": "دانمارکی",
"Japanese": "ژاپنی",
"Korean": "کره ای",
@@ -161,5 +162,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -8,6 +8,7 @@
"to create a new note": "pour créer une nouvelle note",
"Toggle Mode": "Toggle Mode",
"Trash": "Poubelle",
"Ok": "Ok",
"MODIFICATION DATE": "DATE DE MODIFICATION",
"Words": "Mots",
"Letters": "Lettres",
@@ -137,6 +138,7 @@
"Albanian": "Albanais",
"Chinese (zh-CN)": "Chinois (zh-CN)",
"Chinese (zh-TW)": "Chinois (zh-TW)",
"Czech": "Tchèque",
"Toggle Editor Mode": "Basculer en mode éditeur",
"Danish": "Danois",
"Japanese": "Japonais",
@@ -173,5 +175,6 @@
"Snippet prefix": "Préfixe du snippet",
"Delete Note": "Supprimer la note",
"New notes are tagged with the filtering tags": "Les nouvelles notes sont taggées avec les tags de filtrage",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -143,6 +143,7 @@
"Albanian": "Albanian",
"Chinese (zh-CN)": "Chinese (zh-CN)",
"Chinese (zh-TW)": "Chinese (zh-TW)",
"Czech": "Czech",
"Danish": "Danish",
"Japanese": "Japanese",
"Korean": "Korean",
@@ -181,5 +182,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -8,6 +8,7 @@
"to create a new note": "per creare una nuova nota",
"Toggle Mode": "Cambia Modalità",
"Trash": "Cestino",
"Ok": "Ok",
"MODIFICATION DATE": "DATA DI MODIFICA",
"Words": "Parole",
"Letters": "Lettere",
@@ -136,6 +137,7 @@
"Albanian": "Albanese",
"Chinese (zh-CN)": "Cinese (zh-CN)",
"Chinese (zh-TW)": "Cinese (zh-TW)",
"Czech": "Ceco",
"Danish": "Danese",
"Japanese": "Giapponese",
"Korean": "Koreano",
@@ -161,5 +163,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -182,6 +182,7 @@
"Albanian": "アルバニア語",
"Chinese (zh-CN)": "簡体字中国語 (zh-CN)",
"Chinese (zh-TW)": "繁体字中国語 (zh-TW)",
"Czech": "チェコ語",
"Danish": "デンマーク語",
"Japanese": "日本語",
"Korean": "韓国語",
@@ -220,5 +221,6 @@
"Spellcheck disabled": "スペルチェック無効",
"Show menu bar": "メニューバーを表示",
"Auto Detect": "自動検出",
"Enable HTML label in mermaid flowcharts": "mermaid flowchartでHTMLラベルを有効にする ⚠ このオプションには潜在的なXSSの危険性があります。",
"Wrap line in Snippet Note": "行を右端で折り返すSnippet Note"
}

View File

@@ -135,6 +135,7 @@
"Albanian": "Albanian",
"Chinese (zh-CN)": "Chinese (zh-CN)",
"Chinese (zh-TW)": "Chinese (zh-TW)",
"Czech": "체코 어",
"Danish": "Danish",
"Japanese": "Japanese",
"Korean": "Korean",
@@ -164,5 +165,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -135,6 +135,7 @@
"Albanian": "Albanian",
"Chinese (zh-CN)": "Chinese (zh-CN)",
"Chinese (zh-TW)": "Chinese (zh-TW)",
"Czech": "Czech",
"Danish": "Danish",
"Japanese": "Japanese",
"Korean": "Korean",
@@ -157,5 +158,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -141,6 +141,7 @@
"Albanian": "Albański",
"Chinese (zh-CN)": "Chiński (zh-CN)",
"Chinese (zh-TW)": "Chiński (zh-TW)",
"Czech": "Czeski",
"Danish": "Duński",
"Japanese": "Japoński",
"Korean": "Koreański",
@@ -166,5 +167,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -8,6 +8,7 @@
"to create a new note": "para criar uma nova nota",
"Toggle Mode": "Modo de alternância",
"Trash": "Lixeira",
"Ok": "Ok",
"MODIFICATION DATE": "DATA DE MODIFICAÇÃO",
"Words": "Palavras",
"Letters": "Letras",
@@ -135,6 +136,7 @@
"Albanian": "Albanês",
"Chinese (zh-CN)": "Chinês (zh-CN)",
"Chinese (zh-TW)": "Chinês (zh-TW)",
"Czech": "Tcheco",
"Danish": "Dinamarquês",
"Japanese": "Japonês",
"Korean": "Coreano",
@@ -157,5 +159,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -8,6 +8,7 @@
"to create a new note": "para criar uma nova nota",
"Toggle Mode": "Alternar Modo",
"Trash": "Lixo",
"Ok": "Ok",
"MODIFICATION DATE": "DATA DE MODIFICAÇÃO",
"Words": "Palavras",
"Letters": "Letras",
@@ -135,6 +136,7 @@
"Albanian": "Albanês",
"Chinese (zh-CN)": "Chinês (zh-CN)",
"Chinese (zh-TW)": "Chinês (zh-TW)",
"Czech": "Tcheco",
"Danish": "Dinamarquês",
"Japanese": "Japonês",
"Korean": "Coreano",
@@ -156,5 +158,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -134,6 +134,7 @@
"Albanian": "Албанский",
"Chinese (zh-CN)": "Китайский (zh-CN)",
"Chinese (zh-TW)": "Китайский (zh-TW)",
"Czech": "чешский",
"Danish": "Датский",
"Japanese": "Японский",
"Korean": "Корейский",
@@ -154,5 +155,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -8,6 +8,7 @@
"to create a new note": "to create a new note",
"Toggle Mode": "Toggle Mode",
"Trash": "Trash",
"Ok": "Ok",
"MODIFICATION DATE": "MODIFICATION DATE",
"Words": "Words",
"Letters": "Letters",
@@ -134,6 +135,7 @@
"Albanian": "Albanian",
"Chinese (zh-CN)": "Chinese (zh-CN)",
"Chinese (zh-TW)": "Chinese (zh-TW)",
"Czech": "Czech",
"Danish": "Danish",
"Japanese": "Japanese",
"Korean": "Korean",
@@ -156,5 +158,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -144,6 +144,7 @@
"Albanian": "Albanian",
"Chinese (zh-CN)": "Chinese (zh-CN)",
"Chinese (zh-TW)": "Chinese (zh-TW)",
"Czech": "Czech",
"Danish": "Danish",
"Japanese": "Japanese",
"Korean": "Korean",
@@ -183,5 +184,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -134,6 +134,7 @@
"Albanian": "Arnavutça",
"Chinese (zh-CN)": "Çince (zh-CN)",
"Chinese (zh-TW)": "Çince (zh-TW)",
"Czech": "Çek",
"Danish": "Danca",
"Japanese": "Japonca",
"Korean": "Korean",
@@ -156,5 +157,6 @@
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -4,7 +4,7 @@
"Preferences": "首选项",
"Make a note": "新建笔记",
"Ctrl": "Ctrl",
"Ctrl(^)": "Ctrl",
"Ctrl(^)": "Ctrl(^)",
"to create a new note": "新建笔记",
"Toggle Mode": "切换模式",
"Trash": "废纸篓",
@@ -114,7 +114,7 @@
"Updated": "更新时间",
"Created": "创建时间",
"Alphabetically": "A~Z 排序",
"Counter":"标签下文章数量排序",
"Counter": "标签下文章数量排序",
"Default View": "默认视图",
"Compressed View": "列表视图",
"Search": "搜索",
@@ -137,6 +137,7 @@
"Albanian": "Albanian",
"Chinese (zh-CN)": "简体中文",
"Chinese (zh-TW)": "繁體中文",
"Czech": "捷克文",
"Danish": "Danish",
"Japanese": "Japanese",
"Korean": "Korean",
@@ -155,9 +156,9 @@
"Allow dangerous html tags": "允许危险的 html 标签",
"Select filter mode": "选择过滤模式",
"Add tag...": "添加标签...",
"Star":"星标",
"Star": "星标",
"Fullscreen": "全屏",
"Info":"详情",
"Info": "详情",
"Remove pin": "取消置顶",
"Pin to Top": "置顶",
"Delete Note": "删除笔记",
@@ -183,7 +184,7 @@
"Help": "帮助",
"Hungarian": "匈牙利语",
"Hide Help": "隐藏帮助",
"wordpress": "Wordpress",
"wordpress": "wordpress",
"Add Storage": "添加存储",
"Name": "名称",
"Type": "类型",
@@ -202,13 +203,13 @@
"Unlink Storage": "取消存储链接",
"Unlinking removes this linked storage from Boostnote. No data is removed, please manually delete the folder from your hard drive if needed.": "取消链接会移除存储和 Boostnote 的链接。文件将不会被删除,如果你需要的话可以手动删除此目录。",
"Empty note": "空笔记",
"Unnamed":"未命名",
"Unnamed": "未命名",
"Rename": "重命名",
"Folder Name": "文件夹名称",
"No tags":"无标签",
"No tags": "无标签",
"Convert textual arrows to beautiful signs. ⚠ This will interfere with using HTML comments in your Markdown.": "将文本箭头转换为完整符号。 ⚠ 注意这会影响 Markdown 的 HTML 注释。",
"⚠ You have pasted a link referring an attachment that could not be found in the storage location of this note. Pasting links referring attachments is only supported if the source and destination location is the same storage. Please Drag&Drop the attachment instead! ⚠": "⚠ You have pasted a link referring an attachment that could not be found in the storage location of this note. Pasting links referring attachments is only supported if the source and destination location is the same storage. Please Drag&Drop the attachment instead! ⚠",
"Default New Note":"预设新笔记类型",
"Default New Note": "预设新笔记类型",
"Show only related tags": "只显示相关标签",
"Snippet Default Language": "程式码片段预设语言",
"Disable Direct Write (It will be applied after restarting)": "停用直接编辑 (重启后生效)",
@@ -217,9 +218,31 @@
"Allow line through checkbox": "替标示为完成的选框添加删除线",
"Custom CSS": "自定义 CSS",
"Allow custom CSS for preview": "允许预览自定义 CSS",
"Render newlines in Markdown paragraphs as <br>":"在 Markdown 段落中使用 <br> 换行",
"Render newlines in Markdown paragraphs as <br>": "在 Markdown 段落中使用 <br> 换行",
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Show menu bar": "显示菜单栏",
"Auto Detect": "Auto Detect",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
"Enable HTML label in mermaid flowcharts": "在 mermaid flowcharts 中启用 HTML 标签 ⚠ 这个选项可能会产生 XSS",
"Wrap line in Snippet Note": "在 Snippet Note 里换行",
"Toggle Editor Mode": "切换编辑模式",
"Insert Current Date": "插入当前日期",
"Insert Current Date and Time": "插入当前日期和时间",
"Paste HTML": "粘贴 HTML",
"Show/Hide Menu Bar": "显示/隐藏 菜单栏",
"Save tags of a note in alphabetical order": "按字母顺序存储标签",
"Show tags of a note in alphabetical order": "按字母顺序显示标签",
"Enable live count of notes": "实时统计标签下笔记个数",
"New notes are tagged with the filtering tags": "新建的笔记带有在标签列表过滤的标签",
"Front matter title field": "从 front-matter 中抽取标题的字段名",
"Extract title from front matter": "启用从 front-matter 抽取标题",
"Enable HTML paste": "启用 HTML 粘贴(自动转换 html 到 md",
"Enable spellcheck - Experimental feature!! :)": "启用拼写检查 - 实验性功能!! :)",
"Matching character pairs": "Matching character pairs",
"Matching character triples": "Matching character triples",
"Exploding character pairs": "Exploding character pairs",
"Custom MarkdownLint Rules": "自定义 MarkdownLint 规则",
"Enable MarkdownLint": "启用 MarkdownLint",
"When scrolling, synchronize preview with editor": "滚动编辑页时同步滚动预览页",
"This will delete all notes in the folder and can not be undone.": "即将删除文件夹中所有笔记,并且不能撤销。",
"Always Ask": "每次询问"
}

View File

@@ -134,6 +134,7 @@
"Albanian": "Albanian",
"Chinese (zh-CN)": "简体中文",
"Chinese (zh-TW)": "繁體中文",
"Czech": "捷克文",
"Danish": "Danish",
"Japanese": "Japanese",
"Korean": "Korean",
@@ -151,7 +152,7 @@
"Allow styles": "允許樣式",
"Allow dangerous html tags": "允許危險的 HTML 標籤",
"Convert textual arrows to beautiful signs. ⚠ This will interfere with using HTML comments in your Markdown.": "將文本箭頭轉換為完整符號。 ⚠ 注意這會影響 Markdown 的 HTML 注釋。",
"Default New Note":"預設新筆記類型",
"Default New Note": "預設新筆記類型",
"Show only related tags": "只顯示相關標籤",
"Snippet Default Language": "程式碼片段預設語言",
"Disable Direct Write (It will be applied after restarting)": "停用直接編輯 (重啟後生效)",
@@ -160,10 +161,11 @@
"Allow line through checkbox": "替標示為完成的選框添加刪除線",
"Custom CSS": "自定義 CSS",
"Allow custom CSS for preview": "允許預覽自定義 CSS",
"Render newlines in Markdown paragraphs as <br>":"在 Markdown 段落中使用 <br> 換行",
"Render newlines in Markdown paragraphs as <br>": "在 Markdown 段落中使用 <br> 換行",
"⚠ You have pasted a link referring an attachment that could not be found in the storage location of this note. Pasting links referring attachments is only supported if the source and destination location is the same storage. Please Drag&Drop the attachment instead! ⚠": "⚠ You have pasted a link referring an attachment that could not be found in the storage location of this note. Pasting links referring attachments is only supported if the source and destination location is the same storage. Please Drag&Drop the attachment instead! ⚠",
"Spellcheck disabled": "Spellcheck disabled",
"Show menu bar": "Show menu bar",
"Auto Detect": "Auto Detect",
"Enable HTML label in mermaid flowcharts": "Enable HTML label in mermaid flowcharts ⚠ This option potentially has a risk of XSS.",
"Wrap line in Snippet Note": "Wrap line in Snippet Note"
}

View File

@@ -1,14 +1,15 @@
{
"name": "boost",
"productName": "Boostnote",
"version": "0.12.1-1",
"version": "0.14.0",
"main": "index.js",
"description": "Boostnote",
"license": "GPL-3.0",
"scripts": {
"start": "electron ./index.js",
"compile": "grunt compile",
"test": "cross-env NODE_ENV=test ava --serial",
"test": "npm run ava && npm run jest",
"ava": "cross-env NODE_ENV=test ava --serial",
"jest": "jest",
"fix": "eslint . --fix",
"lint": "eslint .",
@@ -16,7 +17,7 @@
"watch": "webpack-dev-server --hot"
},
"config": {
"electron-version": "3.0.8"
"electron-version": "4.2.12"
},
"repository": {
"type": "git",
@@ -50,6 +51,7 @@
"homepage": "https://boostnote.io",
"dependencies": {
"@enyaxu/markdown-it-anchor": "^5.0.2",
"@hikerpig/markdown-it-toc-and-anchor": "^4.5.0",
"@rokt33r/js-sequence-diagrams": "^2.0.6-2",
"@rokt33r/markdown-it-math": "^4.0.1",
"@rokt33r/season": "^5.3.0",
@@ -74,10 +76,10 @@
"iconv-lite": "^0.4.19",
"immutable": "^3.8.1",
"invert-color": "^2.0.0",
"js-yaml": "^3.12.0",
"js-yaml": "^3.13.1",
"jsonlint-mod": "^1.7.4",
"katex": "^0.10.1",
"lodash": "^4.11.1",
"lodash": "^4.17.13",
"lodash-move": "^1.1.1",
"markdown-it": "^6.0.1",
"markdown-it-abbr": "^1.0.4",
@@ -93,11 +95,12 @@
"markdown-it-sup": "^1.0.0",
"markdown-toc": "^1.2.0",
"mdurl": "^1.0.1",
"mermaid": "^8.0.0-rc.8",
"mermaid": "^8.4.2",
"moment": "^2.10.3",
"mousetrap": "^1.6.2",
"mousetrap-global-bind": "^1.1.0",
"node-ipc": "^8.1.0",
"prettier": "^1.18.2",
"prop-types": "^15.7.2",
"query-string": "^6.5.0",
"raphael": "^2.2.7",
@@ -108,6 +111,7 @@
"react-composition-input": "^1.1.1",
"react-debounce-render": "^4.0.1",
"react-dom": "^16.8.6",
"react-emoji-render": "^1.1.0",
"react-image-carousel": "^2.0.18",
"react-redux": "^7.0.3",
"react-router-dom": "^5.0.0",
@@ -144,7 +148,7 @@
"css-loader": "^0.19.0",
"devtron": "^1.1.0",
"dom-storage": "^2.0.2",
"electron": "3.0.8",
"electron": "4",
"electron-debug": "^2.2.0",
"electron-devtools-installer": "^2.2.4",
"electron-packager": "^12.2.0",

6
prettier.config Normal file
View File

@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": false,
"singleQuote": true
}

View File

@@ -1,4 +1,4 @@
:mega: The Boostnote team uses [IssueHunt](https://issuehunt.io/) for a sustainable open-source ecosystem.
> [We've launched desktop app of the new Boost Note now. We'll release its mobile app too in January 2020.](https://github.com/BoostIO/BoostNote.next)
![Boostnote app screenshot](./resources/repository/top.png)
@@ -11,10 +11,13 @@
</a>
</p>
## Download
[Find the latest release of Boostnote here!](https://github.com/BoostIO/boost-releases/releases/)
## Authors & Maintainers
- [Rokt33r](https://github.com/rokt33r)
- [Sosuke](https://github.com/sosukesuzuki)
- [Kazz](https://github.com/kazup01)
- [ZeroX-DG](https://github.com/ZeroX-DG)
@@ -33,7 +36,7 @@ Issues on Boostnote can be funded by anyone and the money will be distributed to
## Community
- [Facebook Group](https://www.facebook.com/groups/boostnote/)
- [Twitter](https://twitter.com/boostnoteapp)
- [Slack Group](https://join.slack.com/t/boostnote-group/shared_invite/enQtMzkxOTk4ODkyNzc0LThkNmMzY2VlZjVhYTNiYjE5YjQyZGVjNTJlYTY1OGMyZTFjNGU5YTUyYjUzOWZhYTU4OTVlNDYyNDFjYWMzNDM)
- [Slack Group](https://join.slack.com/t/boostnote-group/shared_invite/enQtMzkxOTk4ODkyNzc0LWQxZTQwNjBlMDI4YjkyYjg2MTRiZGJhNzA1YjQ5ODA5M2M0M2NlMjI5YjhiYWQzNzgzYmU0MDMwOTlmZmZmMGE)
- [Blog](https://medium.com/boostnote)
- [Reddit](https://www.reddit.com/r/Boostnote/)

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<title>icon-external</title>
<defs>
<filter x="0.0%" y="0.0%" width="100.0%" height="100.0%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" type="matrix" in="shadowOffsetOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
</defs>
<g id="Artboard-4" stroke="none" stroke-width="1" fill="#c7c7c7" fill-rule="evenodd" transform="" stroke-linecap="round" stroke-linejoin="round">
<g>
<g>
<path d="M412.88,261.464c-11.423,0-20.682,9.259-20.682,20.682v156.879c0,17.43-14.181,31.611-31.612,31.611H72.975
c-17.43,0-31.611-14.181-31.611-31.611V151.414c0-17.43,14.181-31.611,31.611-31.611h156.879c11.422,0,20.682-9.26,20.682-20.682
c0-11.422-9.26-20.682-20.682-20.682H72.975C32.737,78.439,0,111.176,0,151.414v287.611C0,479.264,32.737,512,72.975,512h287.61
c40.239,0,72.976-32.736,72.977-72.975V282.146C433.562,270.723,424.303,261.464,412.88,261.464z"/>
</g>
</g>
<g>
<g>
<path d="M491.318,0H334.439c-11.423,0-20.682,9.26-20.682,20.682c0,11.422,9.259,20.682,20.682,20.682h136.197v136.197
c0,11.422,9.259,20.682,20.682,20.682c11.423,0,20.682-9.26,20.682-20.682V20.682C512,9.26,502.741,0,491.318,0z"/>
</g>
</g>
<g>
<g>
<path d="M505.942,6.058c-8.077-8.076-21.172-8.076-29.249,0L189.082,293.668c-8.077,8.077-8.077,21.172,0,29.249
c4.038,4.039,9.332,6.058,14.625,6.058c5.294,0,10.587-2.02,14.625-6.058L505.942,35.307
C514.019,27.23,514.019,14.135,505.942,6.058z"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 394 KiB

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@@ -578,6 +578,72 @@ it('should test that deleteAttachmentsNotPresentInNote does nothing if noteKey,
expect(fs.unlink).not.toHaveBeenCalled()
})
it('should test that getAttachmentsPathAndStatus return null if noteKey, storageKey or noteContent was undefined', function () {
const noteKey = undefined
const storageKey = undefined
const markdownContent = ''
const result = systemUnderTest.getAttachmentsPathAndStatus(markdownContent, storageKey, noteKey)
expect(result).toBeNull()
})
it('should test that getAttachmentsPathAndStatus return null if noteKey, storageKey or noteContent was null', function () {
const noteKey = null
const storageKey = null
const markdownContent = ''
const result = systemUnderTest.getAttachmentsPathAndStatus(markdownContent, storageKey, noteKey)
expect(result).toBeNull()
})
it('should test that getAttachmentsPathAndStatus return the correct path and status for attachments', async function () {
const dummyStorage = {path: 'dummyStoragePath'}
const noteKey = 'noteKey'
const storageKey = 'storageKey'
const markdownContent =
'Test input' +
'![' + systemUnderTest.STORAGE_FOLDER_PLACEHOLDER + path.win32.sep + noteKey + path.win32.sep + 'file2.pdf](file2.pdf) \n'
const dummyFilesInFolder = ['file1.txt', 'file2.pdf', 'file3.jpg']
findStorage.findStorage = jest.fn(() => dummyStorage)
fs.existsSync = jest.fn(() => true)
fs.readdir = jest.fn((paht, callback) => callback(undefined, dummyFilesInFolder))
fs.unlink = jest.fn()
const targetStorage = findStorage.findStorage(storageKey)
const attachments = await systemUnderTest.getAttachmentsPathAndStatus(markdownContent, storageKey, noteKey)
expect(attachments.length).toBe(3)
expect(attachments[0].isInUse).toBe(false)
expect(attachments[1].isInUse).toBe(true)
expect(attachments[2].isInUse).toBe(false)
expect(attachments[0].path).toBe(
path.join(
targetStorage.path,
systemUnderTest.DESTINATION_FOLDER,
noteKey,
dummyFilesInFolder[0]
)
)
expect(attachments[1].path).toBe(
path.join(
targetStorage.path,
systemUnderTest.DESTINATION_FOLDER,
noteKey,
dummyFilesInFolder[1]
)
)
expect(attachments[2].path).toBe(
path.join(
targetStorage.path,
systemUnderTest.DESTINATION_FOLDER,
noteKey,
dummyFilesInFolder[2]
)
)
})
it('should test that moveAttachments moves attachments only if the source folder existed', function () {
fse.existsSync = jest.fn(() => false)
fse.moveSync = jest.fn()

View File

@@ -0,0 +1,43 @@
const test = require('ava')
const createNoteFromUrl = require('browser/main/lib/dataApi/createNoteFromUrl')
global.document = require('jsdom').jsdom('<body></body>')
global.window = document.defaultView
global.navigator = window.navigator
const Storage = require('dom-storage')
const localStorage = window.localStorage = global.localStorage = new Storage(null, { strict: true })
const path = require('path')
const TestDummy = require('../fixtures/TestDummy')
const sander = require('sander')
const os = require('os')
const CSON = require('@rokt33r/season')
const storagePath = path.join(os.tmpdir(), 'test/create-note-from-url')
test.beforeEach((t) => {
t.context.storage = TestDummy.dummyStorage(storagePath)
localStorage.setItem('storages', JSON.stringify([t.context.storage.cache]))
})
test.serial('Create a note from URL', (t) => {
const storageKey = t.context.storage.cache.key
const folderKey = t.context.storage.json.folders[0].key
const url = 'https://shapeshed.com/writing-cross-platform-node/'
return createNoteFromUrl(url, storageKey, folderKey)
.then(function assert ({ note }) {
t.is(storageKey, note.storage)
const jsonData = CSON.readFileSync(path.join(storagePath, 'notes', note.key + '.cson'))
// Test if saved content is matching the created in memory note
t.is(note.content, jsonData.content)
t.is(note.tags.length, jsonData.tags.length)
})
})
test.after(function after () {
localStorage.clear()
sander.rimrafSync(storagePath)
})

View File

@@ -109,6 +109,84 @@ const footnote = `
hello-world: https://github.com/BoostIO/Boostnote/
`
const tocPlaceholder = `
[TOC]
# H1
## H2
### H3
###$ H4
`
const plantUmlMindMap = `
@startmindmap
* Debian
** Ubuntu
*** Linux Mint
*** Kubuntu
*** Lubuntu
*** KDE Neon
** LMDE
** SolydXK
** SteamOS
** Raspbian with a very long name
*** <s>Raspmbc</s> => OSMC
*** <s>Raspyfi</s> => Volumio
@endmindmap
`
const plantUmlGantt = `
@startgantt
[Prototype design] lasts 15 days
[Test prototype] lasts 10 days
[Test prototype] starts at [Prototype design]'s end
@endgantt
`
const plantUmlWbs = `
@startwbs
* Business Process Modelling WBS
** Launch the project
*** Complete Stakeholder Research
*** Initial Implementation Plan
** Design phase
*** Model of AsIs Processes Completed
**** Model of AsIs Processes Completed1
**** Model of AsIs Processes Completed2
*** Measure AsIs performance metrics
*** Identify Quick Wins
** Complete innovate phase
@endwbs
`
const plantUmlUml = `
@startuml
left to right direction
skinparam packageStyle rectangle
actor customer
actor clerk
rectangle checkout {
customer -- (checkout)
(checkout) .> (payment) : include
(help) .> (checkout) : extends
(checkout) -- clerk
}
@enduml
`
const plantUmlDitaa = `
@startditaa
+--------+ +-------+ +-------+
| +---+ ditaa +--> | |
| Text | +-------+ |Diagram|
|Dokument| |!Magie!| | |
| {d}| | | | |
+---+----+ +-------+ +-------+
: ^
| Ein Haufen Arbeit |
+-------------------------+
@endditaa
`
export default {
basic,
codeblock,
@@ -121,5 +199,11 @@ export default {
supTexts,
deflists,
shortcuts,
footnote
footnote,
tocPlaceholder,
plantUmlMindMap,
plantUmlGantt,
plantUmlWbs,
plantUmlDitaa,
plantUmlUml
}

View File

@@ -5,7 +5,8 @@ const noop = () => {}
mock('electron', {
remote: {
app: {
getAppPath: noop
getAppPath: noop,
getPath: noop
}
}
})

View File

@@ -73,3 +73,33 @@ test('Markdown.render() should render footnote correctly', t => {
const rendered = md.render(markdownFixtures.footnote)
t.snapshot(rendered)
})
test('Markdown.render() should renders [TOC] placholder correctly', t => {
const rendered = md.render(markdownFixtures.tocPlaceholder)
t.snapshot(rendered)
})
test('Markdown.render() should render PlantUML MindMaps correctly', t => {
const rendered = md.render(markdownFixtures.plantUmlMindMap)
t.snapshot(rendered)
})
test('Markdown.render() should render PlantUML Gantt correctly', t => {
const rendered = md.render(markdownFixtures.plantUmlGantt)
t.snapshot(rendered)
})
test('Markdown.render() should render PlantUML WBS correctly', t => {
const rendered = md.render(markdownFixtures.plantUmlWbs)
t.snapshot(rendered)
})
test('Markdown.render() should render PlantUML Umls correctly', t => {
const rendered = md.render(markdownFixtures.plantUmlUml)
t.snapshot(rendered)
})
test('Markdown.render() should render PlantUML Ditaa correctly', t => {
const rendered = md.render(markdownFixtures.plantUmlDitaa)
t.snapshot(rendered)
})

View File

@@ -4,6 +4,41 @@ The actual snapshot is saved in `markdown-test.js.snap`.
Generated by [AVA](https://ava.li).
## Markdown.render() should render PlantUML Ditaa correctly
> Snapshot 1
`<img src="http://www.plantuml.com/plantuml/png/SoWkIImgISaiIKpaqjQ50cq51GLj93Q2mrMZ00NQO3cmHX3RJW4cKmDI4v9QKQ805a8nfyObCp6zA34NgCObFxiqDpMl1AIcHj4tCJqpLH5i18evG52TKbk3B8og1kmC0cvMKB1Im0NYkA2ckMRcANWabgQbvYau5YMbPfP0p4UOWmcqkHnIyrB0GG00" alt="uml diagram" />␊
`
## Markdown.render() should render PlantUML Gantt correctly
> Snapshot 1
`<img src="http://www.plantuml.com/plantuml/svg/SoWkIImgIK_CAodXYWueoY_9BwaiI5L8IItEJC-BLSX9B2ufLZ0qLKX9h2pcYWv9BIvHA82fWaiRu906crsia5YYW6cqUh52QbuAbmEG0DiE0000" alt="uml diagram" />␊
`
## Markdown.render() should render PlantUML MindMaps correctly
> Snapshot 1
`<img src="http://www.plantuml.com/plantuml/svg/JOzD3e8m44Rtd6BMtNW192IM5I29HEDsAbKdeLD2MvNRIsjCMCsRlFd9LpgFipV4Wy4f4o2r8kHC23Yhm3wi9A0X3XzeYNrgwx1H6wvb1KTjqtRJoYhMtexBSAqJUescwoEUq4tn3xp9Fm7XfUS5HiiFO3Gw7SjT4QUCkkKxLy2-WAvl3rkrtEclBdOCXcnMwZN7ByiN" alt="uml diagram" />␊
`
## Markdown.render() should render PlantUML Umls correctly
> Snapshot 1
`<img src="http://www.plantuml.com/plantuml/svg/LOzD2eCm44RtESMtj0jx01V5E_G4Gvngo2_912gbTsz4LBfylCV7p5Y4ibJlbEENG2AocHV1P39hCJ6eOar8bCaZaROqyrDMnzWqXTcn8YqnGzSYqNC-q76sweoW5zOsLi57uMpHz-WESslY0jmVw1AjdaE30IPeLoVUceLTslrL3-2tS9ZA_qZRtm_vgh7PzkOF" alt="uml diagram" />␊
`
## Markdown.render() should render PlantUML WBS correctly
> Snapshot 1
`<img src="http://www.plantuml.com/plantuml/svg/ZP2_JiD03CRtFeNdRF04fR140gdGeREv-z8plVYYimFYxSabKbaxsR9-ylTdRyxLVpvjrz5XDb6OqR6MqEPRYSXPz4BdmsdNTVJAiuP4da1JBLy8lbmxUYxZbE6Wa_CLgUI8IXymS0rf9NeL5yxKDt24EhiKfMDcRNzVO79HcX8RLdvLfZBGa_KtFx2RKcpK7TZ3dTpZfWgskMAZ9jIXr94rW4PubM1RbBZOb-6NtcS9LpgBjlj_1w9QldbPjZHxQ5pg_GC0" alt="uml diagram" />␊
`
## Markdown.render() should render footnote correctly
> Snapshot 1
@@ -48,6 +83,28 @@ Generated by [AVA](https://ava.li).
`<span class="katex-display"><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>c</mi><mo>=</mo><mi>p</mi><mi>m</mi><mi>s</mi><mi>q</mi><mi>r</mi><mi>t</mi><mrow><msup><mi>a</mi><mn>2</mn></msup><mo>+</mo><msup><mi>b</mi><mn>2</mn></msup></mrow></mrow><annotation encoding="application/x-tex">c = pmsqrt{a^2 + b^2}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.43056em;vertical-align:0em;"></span><span class="mord mathdefault">c</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1.0585479999999998em;vertical-align:-0.19444em;"></span><span class="mord mathdefault">p</span><span class="mord mathdefault">m</span><span class="mord mathdefault">s</span><span class="mord mathdefault" style="margin-right:0.03588em;">q</span><span class="mord mathdefault" style="margin-right:0.02778em;">r</span><span class="mord mathdefault">t</span><span class="mord"><span class="mord"><span class="mord mathdefault">a</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8641079999999999em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mord"><span class="mord mathdefault">b</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8641079999999999em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span></span></span>␊
`
## Markdown.render() should renders [TOC] placholder correctly
> Snapshot 1
`<p data-line="1"><div class="markdownIt-TOC-wrapper"><ul class="markdownIt-TOC">␊
<li><a href="#H1">H1</a>␊
<ul>␊
<li><a href="#H2">H2</a>␊
<ul>␊
<li><a href="#H3">H3</a></li>␊
</ul>␊
</li>␊
</ul>␊
</li>␊
</ul>␊
</div></p>␊
<h1 id="H1" data-line="2">H1</h1>␊
<h2 id="H2" data-line="3">H2</h2>␊
<h3 id="H3" data-line="4">H3</h3>␊
<p data-line="5">###$ H4</p>␊
`
## Markdown.render() should renders abbrevations correctly
> Snapshot 1

View File

@@ -30,6 +30,7 @@ var config = {
]
},
externals: [
'prettier',
'node-ipc',
'electron',
'lodash',

591
yarn.lock
View File

@@ -64,6 +64,11 @@
dependencies:
regenerator-runtime "^0.13.2"
"@braintree/sanitize-url@^3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-3.1.0.tgz#8ff71d51053cd5ee4981e5a501d80a536244f7fd"
integrity sha512-GcIY79elgB+azP74j8vqkiXz8xLFfIzbQJdlwOPisgbKT00tviJQuEghOXSMVxJ00HoYJbGswr4kcllUc4xCcg==
"@concordance/react@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@concordance/react/-/react-1.0.0.tgz#fcf3cad020e5121bfd1c61d05bc3516aac25f734"
@@ -74,6 +79,14 @@
version "5.0.2"
resolved "https://registry.yarnpkg.com/@enyaxu/markdown-it-anchor/-/markdown-it-anchor-5.0.2.tgz#d173f7b60b492aabc17dfba864c4d071f5595f72"
"@hikerpig/markdown-it-toc-and-anchor@^4.5.0":
version "4.5.0"
resolved "https://registry.npmjs.org/@hikerpig/markdown-it-toc-and-anchor/-/markdown-it-toc-and-anchor-4.5.0.tgz#c1652bdebfd07d41c9738254891515d759b054f0"
integrity sha512-PaYl/v9/ViceXm+fC+WoQOD/8lvYf76SnA3s8b/BQ6s3NpZdk/W/aW0dg5YHquQNcdaLfz3lmQTt6iafbe5tbg==
dependencies:
clone "^2.1.0"
uslug "^1.0.4"
"@ladjs/time-require@^0.1.4":
version "0.1.4"
resolved "https://registry.yarnpkg.com/@ladjs/time-require/-/time-require-0.1.4.tgz#5c615d75fd647ddd5de9cf6922649558856b21a1"
@@ -109,9 +122,10 @@
dependencies:
meaw "^2.0.0"
"@types/node@^8.0.24":
version "8.10.17"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.17.tgz#d48cf10f0dc6dcf59f827f5a3fc7a4a6004318d3"
"@types/node@^10.12.18":
version "10.17.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.0.tgz#537c61a1df699a8331c79dab2ccc2c8799873c66"
integrity sha512-wuJwN2KV4tIRz1bu9vq5kSPasJ8IsEjZaP1ZR7KlmdUZvGF/rXy8DmXOVwUD0kAtvtJ7aqMKPqUXC0NUTDbrDg==
"JSV@>= 4.0.x":
version "4.0.2"
@@ -1561,6 +1575,14 @@ callsites@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50"
camel-case@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73"
integrity sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=
dependencies:
no-case "^2.2.0"
upper-case "^1.1.1"
camelcase-keys@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
@@ -1747,6 +1769,13 @@ classnames@^2.2.5:
version "2.2.5"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d"
clean-css@^4.1.6, clean-css@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17"
integrity sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==
dependencies:
source-map "~0.6.0"
clean-stack@^1.1.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-1.3.0.tgz#9e821501ae979986c46b1d66d2d432db2fd4ae31"
@@ -1814,6 +1843,11 @@ clone@^1.0.2:
version "1.0.4"
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
clone@^2.1.0:
version "2.1.2"
resolved "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=
co-with-promise@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co-with-promise/-/co-with-promise-4.6.0.tgz#413e7db6f5893a60b942cf492c4bec93db415ab7"
@@ -1966,6 +2000,11 @@ commander@^2.19.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
commander@^2.20.0, commander@~2.20.3:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
commander@^2.8.1, commander@^2.9.0:
version "2.15.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
@@ -1998,7 +2037,7 @@ compressible@~2.0.13:
compression@^1.5.2:
version "1.7.2"
resolved "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69"
resolved "https://registry.npmjs.org/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69"
dependencies:
accepts "~1.3.4"
bytes "3.0.0"
@@ -2236,12 +2275,24 @@ crypto-random-string@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e"
crypto-random-string@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-3.0.1.tgz#29d7dc759d577a768afb3b7b2765dd9bd7ffe36a"
integrity sha512-dUL0cJ4PBLanJGJQBHQUkvZ3C4q13MXzl54oRqAIiJGiNkOZ4JDwkg/SBo7daGghzlJv16yW1p/4lIQukmbedA==
dependencies:
type-fest "^0.5.2"
cson-parser@1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/cson-parser/-/cson-parser-1.3.4.tgz#55f10d5aa9f960ccaa385551ae085cb3c8d284fc"
dependencies:
coffee-script "^1.10.0"
css-b64-images@~0.2.5:
version "0.2.5"
resolved "https://registry.yarnpkg.com/css-b64-images/-/css-b64-images-0.2.5.tgz#42005d83204b2b4a5d93b6b1a5644133b5927a02"
integrity sha1-QgBdgyBLK0pdk7axpWRBM7WSegI=
css-color-names@0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0"
@@ -2367,17 +2418,24 @@ currently-unhandled@^0.4.1:
dependencies:
array-find-index "^1.0.1"
d3-array@1, d3-array@1.2.1, d3-array@^1.2.0:
d3-array@1, d3-array@^1.2.0:
version "1.2.1"
resolved "http://registry.npm.taobao.org/d3-array/download/d3-array-1.2.1.tgz#d1ca33de2f6ac31efadb8e050a021d7e2396d5dc"
d3-axis@1.0.8:
version "1.0.8"
resolved "http://registry.npm.taobao.org/d3-axis/download/d3-axis-1.0.8.tgz#31a705a0b535e65759de14173a31933137f18efa"
d3-array@^1.1.1:
version "1.2.4"
resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-1.2.4.tgz#635ce4d5eea759f6f605863dbcfc30edc737f71f"
integrity sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw==
d3-brush@1.0.4:
version "1.0.4"
resolved "http://registry.npm.taobao.org/d3-brush/download/d3-brush-1.0.4.tgz#00c2f238019f24f6c0a194a26d41a1530ffe7bc4"
d3-axis@1:
version "1.0.12"
resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-1.0.12.tgz#cdf20ba210cfbb43795af33756886fb3638daac9"
integrity sha512-ejINPfPSNdGFKEOAtnBtdkpr24c4d4jsei6Lg98mxf424ivoDP2956/5HDpIAtmHo85lqT4pruy+zEgvRUBqaQ==
d3-brush@1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-1.1.3.tgz#a04900a71fa5390f7f7afe1504b02a382709f380"
integrity sha512-v8bbYyCFKjyCzFk/tdWqXwDykY8YWqhXYjcYxfILIit085VZOpj4XJKOMccTsvWxgzSLMJQg5SiqHjslsipEDg==
dependencies:
d3-dispatch "1"
d3-drag "1"
@@ -2385,14 +2443,15 @@ d3-brush@1.0.4:
d3-selection "1"
d3-transition "1"
d3-chord@1.0.4:
version "1.0.4"
resolved "http://registry.npm.taobao.org/d3-chord/download/d3-chord-1.0.4.tgz#7dec4f0ba886f713fe111c45f763414f6f74ca2c"
d3-chord@1:
version "1.0.6"
resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-1.0.6.tgz#309157e3f2db2c752f0280fedd35f2067ccbb15f"
integrity sha512-JXA2Dro1Fxw9rJe33Uv+Ckr5IrAa74TlfDEhE/jfLOaXegMQFQTAgAw9WnZL8+HxVBRXaRGCkrNU7pJeylRIuA==
dependencies:
d3-array "1"
d3-path "1"
d3-collection@1, d3-collection@1.0.4:
d3-collection@1:
version "1.0.4"
resolved "http://registry.npm.taobao.org/d3-collection/download/d3-collection-1.0.4.tgz#342dfd12837c90974f33f1cc0a785aea570dcdc2"
@@ -2400,22 +2459,25 @@ d3-color@1:
version "1.2.0"
resolved "http://registry.npm.taobao.org/d3-color/download/d3-color-1.2.0.tgz#d1ea19db5859c86854586276ec892cf93148459a"
d3-color@1.0.3:
version "1.0.3"
resolved "http://registry.npm.taobao.org/d3-color/download/d3-color-1.0.3.tgz#bc7643fca8e53a8347e2fbdaffa236796b58509b"
d3-contour@1:
version "1.3.2"
resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-1.3.2.tgz#652aacd500d2264cb3423cee10db69f6f59bead3"
integrity sha512-hoPp4K/rJCu0ladiH6zmJUEz6+u3lgR+GSm/QdM2BBvDraU39Vr7YdDCicJcxP1z8i9B/2dJLgDC1NcvlF8WCg==
dependencies:
d3-array "^1.1.1"
d3-dispatch@1, d3-dispatch@1.0.3:
d3-dispatch@1:
version "1.0.3"
resolved "http://registry.npm.taobao.org/d3-dispatch/download/d3-dispatch-1.0.3.tgz#46e1491eaa9b58c358fce5be4e8bed626e7871f8"
d3-drag@1, d3-drag@1.2.1:
d3-drag@1:
version "1.2.1"
resolved "http://registry.npm.taobao.org/d3-drag/download/d3-drag-1.2.1.tgz#df8dd4c502fb490fc7462046a8ad98a5c479282d"
dependencies:
d3-dispatch "1"
d3-selection "1"
d3-dsv@1, d3-dsv@1.0.8:
d3-dsv@1:
version "1.0.8"
resolved "http://registry.npm.taobao.org/d3-dsv/download/d3-dsv-1.0.8.tgz#907e240d57b386618dc56468bacfe76bf19764ae"
dependencies:
@@ -2423,13 +2485,21 @@ d3-dsv@1, d3-dsv@1.0.8:
iconv-lite "0.4"
rw "1"
d3-ease@1, d3-ease@1.0.3:
d3-ease@1:
version "1.0.3"
resolved "http://registry.npm.taobao.org/d3-ease/download/d3-ease-1.0.3.tgz#68bfbc349338a380c44d8acc4fbc3304aa2d8c0e"
d3-force@1.1.0:
version "1.1.0"
resolved "http://registry.npm.taobao.org/d3-force/download/d3-force-1.1.0.tgz#cebf3c694f1078fcc3d4daf8e567b2fbd70d4ea3"
d3-fetch@1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-1.1.2.tgz#957c8fbc6d4480599ba191b1b2518bf86b3e1be2"
integrity sha512-S2loaQCV/ZeyTyIF2oP8D1K9Z4QizUzW7cWeAOAS4U88qOt3Ucf6GsmgthuYSdyB2HyEm4CeGvkQxWsmInsIVA==
dependencies:
d3-dsv "1"
d3-force@1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-1.2.1.tgz#fd29a5d1ff181c9e7f0669e4bd72bdb0e914ec0b"
integrity sha512-HHvehyaiUlVo5CxBJ0yF/xny4xoaxFxDnBXNvNcfW9adORGZfyNF1dj6DGLKyk4Yh3brP/1h3rnDzdIAwL08zg==
dependencies:
d3-collection "1"
d3-dispatch "1"
@@ -2440,19 +2510,17 @@ d3-format@1:
version "1.3.0"
resolved "http://registry.npm.taobao.org/d3-format/download/d3-format-1.3.0.tgz#a3ac44269a2011cdb87c7b5693040c18cddfff11"
d3-format@1.2.2:
version "1.2.2"
resolved "http://registry.npm.taobao.org/d3-format/download/d3-format-1.2.2.tgz#1a39c479c8a57fe5051b2e67a3bee27061a74e7a"
d3-geo@1.9.1:
version "1.9.1"
resolved "http://registry.npm.taobao.org/d3-geo/download/d3-geo-1.9.1.tgz#157e3b0f917379d0f73bebfff3be537f49fa7356"
d3-geo@1:
version "1.11.8"
resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-1.11.8.tgz#46f8ba5a68ead5e26512ec8d9d7cc36f6e522acc"
integrity sha512-F3pQWcgN/dChcXDrQzH0ZSkz14aAesitITc6CNzt7ZhOKj41LElZrhAM6P5EBEv/sliKBIZJl+gmY/jKgtmrxA==
dependencies:
d3-array "1"
d3-hierarchy@1.1.5:
version "1.1.5"
resolved "http://registry.npm.taobao.org/d3-hierarchy/download/d3-hierarchy-1.1.5.tgz#a1c845c42f84a206bcf1c01c01098ea4ddaa7a26"
d3-hierarchy@1:
version "1.1.8"
resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-1.1.8.tgz#7a6317bd3ed24e324641b6f1e76e978836b008cc"
integrity sha512-L+GHMSZNwTpiq4rt9GEsNcpLa4M96lXMR8M/nMG9p5hBE0jy6C+3hWtyZMenPQdwla249iJy7Nx0uKt3n+u9+w==
d3-interpolate@1:
version "1.2.0"
@@ -2460,78 +2528,70 @@ d3-interpolate@1:
dependencies:
d3-color "1"
d3-interpolate@1.1.6:
version "1.1.6"
resolved "http://registry.npm.taobao.org/d3-interpolate/download/d3-interpolate-1.1.6.tgz#2cf395ae2381804df08aa1bf766b7f97b5f68fb6"
dependencies:
d3-color "1"
d3-path@1, d3-path@1.0.5:
d3-path@1:
version "1.0.5"
resolved "http://registry.npm.taobao.org/d3-path/download/d3-path-1.0.5.tgz#241eb1849bd9e9e8021c0d0a799f8a0e8e441764"
d3-polygon@1.0.3:
version "1.0.3"
resolved "http://registry.npm.taobao.org/d3-polygon/download/d3-polygon-1.0.3.tgz#16888e9026460933f2b179652ad378224d382c62"
d3-polygon@1:
version "1.0.5"
resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-1.0.5.tgz#9a645a0a64ff6cbf9efda96ee0b4a6909184c363"
integrity sha512-RHhh1ZUJZfhgoqzWWuRhzQJvO7LavchhitSTHGu9oj6uuLFzYZVeBzaWTQ2qSO6bz2w55RMoOCf0MsLCDB6e0w==
d3-quadtree@1, d3-quadtree@1.0.3:
d3-quadtree@1:
version "1.0.3"
resolved "http://registry.npm.taobao.org/d3-quadtree/download/d3-quadtree-1.0.3.tgz#ac7987e3e23fe805a990f28e1b50d38fcb822438"
d3-queue@3.0.7:
version "3.0.7"
resolved "http://registry.npm.taobao.org/d3-queue/download/d3-queue-3.0.7.tgz#c93a2e54b417c0959129d7d73f6cf7d4292e7618"
d3-random@1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-1.1.2.tgz#2833be7c124360bf9e2d3fd4f33847cfe6cab291"
integrity sha512-6AK5BNpIFqP+cx/sreKzNjWbwZQCSUatxq+pPRmFIQaWuoD+NrbVWw7YWpHiXpCQ/NanKdtGDuB+VQcZDaEmYQ==
d3-random@1.1.0:
version "1.1.0"
resolved "http://registry.npm.taobao.org/d3-random/download/d3-random-1.1.0.tgz#6642e506c6fa3a648595d2b2469788a8d12529d3"
d3-request@1.0.6:
version "1.0.6"
resolved "http://registry.npm.taobao.org/d3-request/download/d3-request-1.0.6.tgz#a1044a9ef4ec28c824171c9379fae6d79474b19f"
d3-scale-chromatic@1:
version "1.5.0"
resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-1.5.0.tgz#54e333fc78212f439b14641fb55801dd81135a98"
integrity sha512-ACcL46DYImpRFMBcpk9HhtIyC7bTBR4fNOPxwVSl0LfulDAwyiHyPOTqcDG1+t5d4P9W7t/2NAuWu59aKko/cg==
dependencies:
d3-collection "1"
d3-dispatch "1"
d3-dsv "1"
xmlhttprequest "1"
d3-color "1"
d3-interpolate "1"
d3-scale@1.0.7:
version "1.0.7"
resolved "http://registry.npm.taobao.org/d3-scale/download/d3-scale-1.0.7.tgz#fa90324b3ea8a776422bd0472afab0b252a0945d"
d3-scale@2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-2.2.2.tgz#4e880e0b2745acaaddd3ede26a9e908a9e17b81f"
integrity sha512-LbeEvGgIb8UMcAa0EATLNX0lelKWGYDQiPdHj+gLblGVhGLyNbaCn3EvrJf0A3Y/uOOU5aD6MTh5ZFCdEwGiCw==
dependencies:
d3-array "^1.2.0"
d3-collection "1"
d3-color "1"
d3-format "1"
d3-interpolate "1"
d3-time "1"
d3-time-format "2"
d3-selection@1, d3-selection@1.3.0, d3-selection@^1.1.0:
d3-selection@1, d3-selection@^1.1.0:
version "1.3.0"
resolved "http://registry.npm.taobao.org/d3-selection/download/d3-selection-1.3.0.tgz#d53772382d3dc4f7507bfb28bcd2d6aed2a0ad6d"
d3-shape@1.2.0:
version "1.2.0"
resolved "http://registry.npm.taobao.org/d3-shape/download/d3-shape-1.2.0.tgz#45d01538f064bafd05ea3d6d2cb748fd8c41f777"
d3-shape@1:
version "1.3.5"
resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.5.tgz#e81aea5940f59f0a79cfccac012232a8987c6033"
integrity sha512-VKazVR3phgD+MUCldapHD7P9kcrvPcexeX/PkMJmkUov4JM8IxsSg1DvbYoYich9AtdTsa5nNk2++ImPiDiSxg==
dependencies:
d3-path "1"
d3-time-format@2, d3-time-format@2.1.1:
d3-time-format@2:
version "2.1.1"
resolved "http://registry.npm.taobao.org/d3-time-format/download/d3-time-format-2.1.1.tgz#85b7cdfbc9ffca187f14d3c456ffda268081bb31"
dependencies:
d3-time "1"
d3-time@1, d3-time@1.0.8:
d3-time@1:
version "1.0.8"
resolved "http://registry.npm.taobao.org/d3-time/download/d3-time-1.0.8.tgz#dbd2d6007bf416fe67a76d17947b784bffea1e84"
d3-timer@1, d3-timer@1.0.7:
d3-timer@1:
version "1.0.7"
resolved "http://registry.npm.taobao.org/d3-timer/download/d3-timer-1.0.7.tgz#df9650ca587f6c96607ff4e60cc38229e8dd8531"
d3-transition@1, d3-transition@1.1.1:
d3-transition@1:
version "1.1.1"
resolved "http://registry.npm.taobao.org/d3-transition/download/d3-transition-1.1.1.tgz#d8ef89c3b848735b060e54a39b32aaebaa421039"
dependencies:
@@ -2542,13 +2602,15 @@ d3-transition@1, d3-transition@1.1.1:
d3-selection "^1.1.0"
d3-timer "1"
d3-voronoi@1.1.2:
version "1.1.2"
resolved "http://registry.npm.taobao.org/d3-voronoi/download/d3-voronoi-1.1.2.tgz#1687667e8f13a2d158c80c1480c5a29cb0d8973c"
d3-voronoi@1:
version "1.1.4"
resolved "https://registry.yarnpkg.com/d3-voronoi/-/d3-voronoi-1.1.4.tgz#dd3c78d7653d2bb359284ae478645d95944c8297"
integrity sha512-dArJ32hchFsrQ8uMiTBLq256MpnZjeuBtdHpaDlYuQyjU0CVzCJl/BVW+SkszaAeH95D/8gxqAhgx0ouAWAfRg==
d3-zoom@1.7.1:
version "1.7.1"
resolved "http://registry.npm.taobao.org/d3-zoom/download/d3-zoom-1.7.1.tgz#02f43b3c3e2db54f364582d7e4a236ccc5506b63"
d3-zoom@1:
version "1.8.3"
resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-1.8.3.tgz#b6a3dbe738c7763121cd05b8a7795ffe17f4fc0a"
integrity sha512-VoLXTK4wvy1a0JpH2Il+F2CiOhVu7VRXWF5M/LroMIh3/zBAC3WAt7QoIvPibOavVo20hN6/37vwAsdBejLyKQ==
dependencies:
d3-dispatch "1"
d3-drag "1"
@@ -2556,40 +2618,42 @@ d3-zoom@1.7.1:
d3-selection "1"
d3-transition "1"
d3@^4.13.0:
version "4.13.0"
resolved "http://registry.npm.taobao.org/d3/download/d3-4.13.0.tgz#ab236ff8cf0cfc27a81e69bf2fb7518bc9b4f33d"
d3@^5.12, d3@^5.7.0:
version "5.12.0"
resolved "https://registry.yarnpkg.com/d3/-/d3-5.12.0.tgz#0ddeac879c28c882317cd439b495290acd59ab61"
integrity sha512-flYVMoVuhPFHd9zVCe2BxIszUWqBcd5fvQGMNRmSiBrgdnh6Vlruh60RJQTouAK9xPbOB0plxMvBm4MoyODXNg==
dependencies:
d3-array "1.2.1"
d3-axis "1.0.8"
d3-brush "1.0.4"
d3-chord "1.0.4"
d3-collection "1.0.4"
d3-color "1.0.3"
d3-dispatch "1.0.3"
d3-drag "1.2.1"
d3-dsv "1.0.8"
d3-ease "1.0.3"
d3-force "1.1.0"
d3-format "1.2.2"
d3-geo "1.9.1"
d3-hierarchy "1.1.5"
d3-interpolate "1.1.6"
d3-path "1.0.5"
d3-polygon "1.0.3"
d3-quadtree "1.0.3"
d3-queue "3.0.7"
d3-random "1.1.0"
d3-request "1.0.6"
d3-scale "1.0.7"
d3-selection "1.3.0"
d3-shape "1.2.0"
d3-time "1.0.8"
d3-time-format "2.1.1"
d3-timer "1.0.7"
d3-transition "1.1.1"
d3-voronoi "1.1.2"
d3-zoom "1.7.1"
d3-array "1"
d3-axis "1"
d3-brush "1"
d3-chord "1"
d3-collection "1"
d3-color "1"
d3-contour "1"
d3-dispatch "1"
d3-drag "1"
d3-dsv "1"
d3-ease "1"
d3-fetch "1"
d3-force "1"
d3-format "1"
d3-geo "1"
d3-hierarchy "1"
d3-interpolate "1"
d3-path "1"
d3-polygon "1"
d3-quadtree "1"
d3-random "1"
d3-scale "2"
d3-scale-chromatic "1"
d3-selection "1"
d3-shape "1"
d3-time "1"
d3-time-format "2"
d3-timer "1"
d3-transition "1"
d3-voronoi "1"
d3-zoom "1"
d@1:
version "1.0.0"
@@ -2597,19 +2661,22 @@ d@1:
dependencies:
es5-ext "^0.10.9"
dagre-d3-renderer@^0.5.8:
version "0.5.8"
resolved "http://registry.npm.taobao.org/dagre-d3-renderer/download/dagre-d3-renderer-0.5.8.tgz#aa071bb71d3c4d67426925906f3f6ddead49c1a3"
dagre-d3@dagrejs/dagre-d3:
version "0.6.4-pre"
resolved "https://codeload.github.com/dagrejs/dagre-d3/tar.gz/e1a00e5cb518f5d2304a35647e024f31d178e55b"
dependencies:
dagre-layout "^0.8.8"
lodash "^4.17.5"
d3 "^5.12"
dagre "^0.8.4"
graphlib "^2.1.7"
lodash "^4.17.15"
dagre-layout@^0.8.8:
version "0.8.8"
resolved "http://registry.npm.taobao.org/dagre-layout/download/dagre-layout-0.8.8.tgz#9b6792f24229f402441c14162c1049e3f261f6d9"
dagre@^0.8.4:
version "0.8.4"
resolved "https://registry.yarnpkg.com/dagre/-/dagre-0.8.4.tgz#26b9fb8f7bdc60c6110a0458c375261836786061"
integrity sha512-Dj0csFDrWYKdavwROb9FccHfTC4fJbyF/oJdL9LNZJ8WUvl968P6PAKEriGqfbdArVJEmmfA+UyumgWEwcHU6A==
dependencies:
graphlibrary "^2.2.0"
lodash "^4.17.5"
graphlib "^2.1.7"
lodash "^4.17.4"
dashdash@^1.12.0:
version "1.14.1"
@@ -2663,6 +2730,13 @@ debug@2.6.9, debug@^2.1.1, debug@^2.1.2, debug@^2.1.3, debug@^2.2.0, debug@^2.3.
dependencies:
ms "2.0.0"
debug@^4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
dependencies:
ms "^2.1.1"
decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
@@ -3059,14 +3133,20 @@ electron-winstaller@^2.2.0:
lodash.template "^4.2.2"
temp "^0.8.3"
electron@3.0.8:
version "3.0.8"
resolved "https://registry.yarnpkg.com/electron/-/electron-3.0.8.tgz#7905806ebaead4c693531e11cda6568c32efa7bb"
electron@4:
version "4.2.12"
resolved "https://registry.yarnpkg.com/electron/-/electron-4.2.12.tgz#8e8926a6a6654cde5eb0612952fed98a56941875"
integrity sha512-EES8eMztoW8gEP5E4GQLP8slrfS2jqTYtHbu36mlu3k1xYAaNPyQQr6mCILkYxqj4l3la4CT2Vcs89CUG62vcQ==
dependencies:
"@types/node" "^8.0.24"
"@types/node" "^10.12.18"
electron-download "^4.1.0"
extract-zip "^1.0.3"
emoji-regex@^6.4.1:
version "6.5.1"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.5.1.tgz#9baea929b155565c11ea41c6626eaa65cef992c2"
integrity sha512-PAHp6TxrCy7MGMFidro8uikr+zlJJKJ/Q6mm2ExZ7HwkyR9lSVFfE3kt36qcwa24BQL7y0G9axycGjK1A/0uNQ==
emojis-list@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
@@ -3213,6 +3293,11 @@ escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2, escape-string-regexp@^
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
escaper@^2.5.3:
version "2.5.3"
resolved "https://registry.yarnpkg.com/escaper/-/escaper-2.5.3.tgz#8b8fe90ba364054151ab7eff18b4ce43b1e13ab5"
integrity sha512-QGb9sFxBVpbzMggrKTX0ry1oiI4CSDAl9vIL702hzl1jGW8VZs7qfqTRX7WDOjoNDoEVGcEtu1ZOQgReSfT2kQ==
escodegen@^1.6.1, escodegen@^1.9.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2"
@@ -4235,9 +4320,10 @@ graceful-fs@~1.2.0:
version "1.2.3"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364"
graphlibrary@^2.2.0:
version "2.2.0"
resolved "http://registry.npm.taobao.org/graphlibrary/download/graphlibrary-2.2.0.tgz#017a14899775228dec4497a39babfdd6bf56eac6"
graphlib@^2.1.7:
version "2.1.7"
resolved "https://registry.yarnpkg.com/graphlib/-/graphlib-2.1.7.tgz#b6a69f9f44bd9de3963ce6804a2fc9e73d86aecc"
integrity sha512-TyI9jIy2J4j0qgPmOOrHTCtpPqJGN/aurBwc6ZT+bRii+di1I+Wv3obRhVrmBEXet+qkMaEX67dXrwsd3QQM6w==
dependencies:
lodash "^4.17.5"
@@ -4445,9 +4531,10 @@ hawk@~2.3.0:
hoek "2.x.x"
sntp "1.x.x"
he@^1.1.1:
version "1.1.1"
resolved "http://registry.npm.taobao.org/he/download/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
he@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
highlight.js@^9.13.1:
version "9.13.1"
@@ -4511,6 +4598,19 @@ html-encoding-sniffer@^1.0.1, html-encoding-sniffer@^1.0.2:
dependencies:
whatwg-encoding "^1.0.1"
html-minifier@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-4.0.0.tgz#cca9aad8bce1175e02e17a8c33e46d8988889f56"
integrity sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==
dependencies:
camel-case "^3.0.0"
clean-css "^4.2.1"
commander "^2.19.0"
he "^1.2.0"
param-case "^2.1.1"
relateurl "^0.2.7"
uglify-js "^3.5.1"
htmlparser2@^3.9.0:
version "3.9.2"
resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338"
@@ -5059,6 +5159,11 @@ is-regex@^1.0.4:
dependencies:
has "^1.0.1"
is-regexp@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069"
integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk=
is-resolvable@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
@@ -5503,16 +5608,10 @@ js-tokens@^3.0.0, js-tokens@^3.0.2:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
js-yaml@^3.10.0, js-yaml@^3.5.1, js-yaml@^3.7.0:
version "3.11.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef"
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
js-yaml@^3.12.0, js-yaml@^3.8.1, js-yaml@^3.9.0:
version "3.12.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
js-yaml@^3.10.0, js-yaml@^3.13.1, js-yaml@^3.5.1, js-yaml@^3.7.0, js-yaml@^3.8.1, js-yaml@^3.9.0:
version "3.13.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
@@ -5951,7 +6050,7 @@ lodash.escaperegexp@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347"
lodash.flatten@^4.2.0:
lodash.flatten@^4.2.0, lodash.flatten@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f"
@@ -6017,14 +6116,15 @@ lodash.uniq@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
lodash@^4.0.0, lodash@^4.0.1, lodash@^4.11.1, lodash@^4.12.0, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.1, lodash@^4.6.1:
version "4.17.10"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
lodash@^4.0.0, lodash@^4.0.1, lodash@^4.12.0, lodash@^4.13.1, lodash@^4.16.6, lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.1, lodash@^4.6.1:
version "4.17.13"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.13.tgz#0bdc3a6adc873d2f4e0c4bac285df91b64fc7b93"
integrity sha512-vm3/XWXfWtRua0FkUyEHBZy8kCPjErNBT9fJx8Zvs+U6zjqPbTUOpkaoum3O5uiA8sm+yNMHXfYkTUHFoMxFNA==
lodash@^4.16.6, lodash@^4.2.0:
version "4.17.11"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
lodash@^4.17.11, lodash@^4.17.15:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
lodash@~0.9.2:
version "0.9.2"
@@ -6057,6 +6157,11 @@ loud-rejection@^1.0.0, loud-rejection@^1.2.0:
currently-unhandled "^0.4.1"
signal-exit "^3.0.0"
lower-case@^1.1.1:
version "1.1.4"
resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac"
integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw=
lowercase-keys@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
@@ -6302,18 +6407,23 @@ merge@^1.1.3:
version "1.2.0"
resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da"
mermaid@^8.0.0-rc.8:
version "8.0.0-rc.8"
resolved "http://registry.npm.taobao.org/mermaid/download/mermaid-8.0.0-rc.8.tgz#74ed54d0d46e9ee71c4db2730b2d83d516a21e72"
mermaid@^8.4.2:
version "8.4.2"
resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-8.4.2.tgz#91d3d8e9541e72eed7a78d0e882db11564fab3bb"
integrity sha512-vYSCP2u4XkOnjliWz/QIYwvzF/znQAq22vWJJ3YV40SnwV2JQyHblnwwNYXCprkXw7XfwBKDpSNaJ3HP4WfnZw==
dependencies:
d3 "^4.13.0"
dagre-d3-renderer "^0.5.8"
dagre-layout "^0.8.8"
graphlibrary "^2.2.0"
he "^1.1.1"
lodash "^4.17.5"
moment "^2.21.0"
scope-css "^1.0.5"
"@braintree/sanitize-url" "^3.1.0"
crypto-random-string "^3.0.1"
d3 "^5.7.0"
dagre "^0.8.4"
dagre-d3 dagrejs/dagre-d3
graphlib "^2.1.7"
he "^1.2.0"
lodash "^4.17.11"
minify "^4.1.1"
moment-mini "^2.22.1"
prettier "^1.18.2"
scope-css "^1.2.1"
methods@~1.1.2:
version "1.1.2"
@@ -6393,6 +6503,19 @@ min-document@^2.19.0:
dependencies:
dom-walk "^0.1.0"
minify@^4.1.1:
version "4.1.3"
resolved "https://registry.yarnpkg.com/minify/-/minify-4.1.3.tgz#58467922d14303f55a3a28fa79641371955b8fbd"
integrity sha512-ykuscavxivSmVpcCzsXmsVTukWYLUUtPhHj0w2ILvHDGqC+hsuTCihBn9+PJBd58JNvWTNg9132J9nrrI2anzA==
dependencies:
clean-css "^4.1.6"
css-b64-images "~0.2.5"
debug "^4.1.0"
html-minifier "^4.0.0"
terser "^4.0.0"
try-catch "^2.0.0"
try-to-catch "^1.0.2"
minimatch@0.3:
version "0.3.0"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.3.0.tgz#275d8edaac4f1bb3326472089e7949c8394699dd"
@@ -6484,7 +6607,12 @@ mock-require@^3.0.1:
get-caller-file "^1.0.2"
normalize-path "^2.1.1"
moment@^2.10.2, moment@^2.21.0:
moment-mini@^2.22.1:
version "2.22.1"
resolved "https://registry.yarnpkg.com/moment-mini/-/moment-mini-2.22.1.tgz#bc32d73e43a4505070be6b53494b17623183420d"
integrity sha512-OUCkHOz7ehtNMYuZjNciXUfwTuz8vmF1MTbAy59ebf+ZBYZO5/tZKuChVWCX+uDo+4idJBpGltNfV8st+HwsGw==
moment@^2.10.2:
version "2.22.2"
resolved "http://registry.npm.taobao.org/moment/download/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66"
@@ -6509,6 +6637,11 @@ ms@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
ms@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
multimatch@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b"
@@ -6578,6 +6711,13 @@ nice-try@^1.0.4:
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
no-case@^2.2.0:
version "2.3.2"
resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac"
integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==
dependencies:
lower-case "^1.1.1"
node-fetch@^1.0.1:
version "1.7.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
@@ -6771,8 +6911,8 @@ number-is-nan@^1.0.0:
resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz#2285631f34a95f0d0395cd900c96ed39b58f346e"
nwsapi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.0.tgz#7c8faf4ad501e1d17a651ebc5547f966b547c5c7"
version "2.0.1"
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.1.tgz#a50d59a2dcb14b6931401171713ced2d0eb3468f"
nwsapi@^2.0.7:
version "2.0.8"
@@ -6866,7 +7006,7 @@ once@^1.3.0, once@^1.4.0:
onetime@^1.0.0:
version "1.1.0"
resolved "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
resolved "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
onetime@^2.0.0:
version "2.0.1"
@@ -7009,6 +7149,13 @@ pako@~0.2.0:
version "0.2.9"
resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75"
param-case@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247"
integrity sha1-35T9jPZTHs915r75oIWPvHK+Ikc=
dependencies:
no-case "^2.2.0"
parse-author@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/parse-author/-/parse-author-2.0.0.tgz#d3460bf1ddd0dfaeed42da754242e65fb684a81f"
@@ -7482,6 +7629,11 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
prettier@^1.18.2:
version "1.18.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea"
integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==
pretty-bytes@^1.0.2:
version "1.0.4"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-1.0.4.tgz#0a22e8210609ad35542f8c8d5d2159aff0751c84"
@@ -7790,6 +7942,17 @@ react-dom@^16.8.6:
prop-types "^15.6.2"
scheduler "^0.13.6"
react-emoji-render@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/react-emoji-render/-/react-emoji-render-1.1.0.tgz#af494619bf1012083bc20ad18eb0a6d92d04228c"
integrity sha512-HIHIrtWd8Jel4qDgIBRQnPPFChJakuRkMFl5N5wObYjYsL7a4pkwK5P9wrEKxQWqlbviTrjGOANAfFldnVuRIQ==
dependencies:
classnames "^2.2.5"
emoji-regex "^6.4.1"
lodash.flatten "^4.4.0"
prop-types "^15.5.8"
string-replace-to-array "^1.0.1"
react-image-carousel@^2.0.18:
version "2.0.18"
resolved "https://registry.yarnpkg.com/react-image-carousel/-/react-image-carousel-2.0.18.tgz#5868ea09bd9cca09c4467d3d02695cd4e7792f28"
@@ -8187,6 +8350,11 @@ regjsparser@^0.1.4:
dependencies:
jsesc "~0.5.0"
relateurl@^0.2.7:
version "0.2.7"
resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"
integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=
release-zalgo@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730"
@@ -8487,9 +8655,14 @@ scheduler@^0.13.6:
loose-envify "^1.1.0"
object-assign "^4.1.1"
scope-css@^1.0.5:
version "1.1.0"
resolved "http://registry.npm.taobao.org/scope-css/download/scope-css-1.1.0.tgz#74eff45461bc9d3f3b29ed575b798cd722fa1256"
scope-css@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/scope-css/-/scope-css-1.2.1.tgz#c35768bc900cad030a3e0d663a818c0f6a57f40e"
integrity sha512-UjLRmyEYaDNiOS673xlVkZFlVCtckJR/dKgr434VMm7Lb+AOOqXKdAcY7PpGlJYErjXXJzKN7HWo4uRPiZZG0Q==
dependencies:
escaper "^2.5.3"
slugify "^1.3.1"
strip-css-comments "^3.0.0"
seamless-immutable@^7.1.3:
version "7.1.4"
@@ -8686,6 +8859,11 @@ slide@^1.1.5:
version "1.1.6"
resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707"
slugify@^1.3.1:
version "1.3.6"
resolved "https://registry.yarnpkg.com/slugify/-/slugify-1.3.6.tgz#ba5fd6159b570fe4811d02ea9b1f4906677638c3"
integrity sha512-wA9XS475ZmGNlEnYYLPReSfuz/c3VQsEMoU43mi6OnKMCdbnFXd4/Yg7J0lBv8jkPolacMpOrWEaoYxuE1+hoQ==
snapdragon-node@^2.0.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
@@ -8776,6 +8954,14 @@ source-map-support@^0.5.0:
buffer-from "^1.0.0"
source-map "^0.6.0"
source-map-support@~0.5.12:
version "0.5.16"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042"
integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
source-map-url@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
@@ -8800,7 +8986,7 @@ source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, sour
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
@@ -8967,6 +9153,15 @@ string-length@^2.0.0:
astral-regex "^1.0.0"
strip-ansi "^4.0.0"
string-replace-to-array@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/string-replace-to-array/-/string-replace-to-array-1.0.3.tgz#c93eba999a5ee24d731aebbaf5aba36b5f18f7bf"
integrity sha1-yT66mZpe4k1zGuu69auja18Y978=
dependencies:
invariant "^2.2.1"
lodash.flatten "^4.2.0"
lodash.isstring "^4.0.1"
string-width@^1.0.1, string-width@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
@@ -9038,6 +9233,13 @@ strip-color@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/strip-color/-/strip-color-0.1.0.tgz#106f65d3d3e6a2d9401cac0eb0ce8b8a702b4f7b"
strip-css-comments@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/strip-css-comments/-/strip-css-comments-3.0.0.tgz#7a5625eff8a2b226cf8947a11254da96e13dae89"
integrity sha1-elYl7/iisibPiUehElTaluE9rok=
dependencies:
is-regexp "^1.0.0"
strip-eof@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
@@ -9202,6 +9404,15 @@ term-size@^1.2.0:
dependencies:
execa "^0.7.0"
terser@^4.0.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.4.0.tgz#22c46b4817cf4c9565434bfe6ad47336af259ac3"
integrity sha512-oDG16n2WKm27JO8h4y/w3iqBGAOSCtq7k8dRmrn4Wf9NouL0b2WpMHGChFGZq4nFAQy1FsNJrVQHfurXOSTmOA==
dependencies:
commander "^2.20.0"
source-map "~0.6.1"
source-map-support "~0.5.12"
test-exclude@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa"
@@ -9387,6 +9598,16 @@ truncate-utf8-bytes@^1.0.0:
dependencies:
utf8-byte-length "^1.0.1"
try-catch@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/try-catch/-/try-catch-2.0.1.tgz#a35d354187c422f291a0bcfd9eb77e3a4f90c1e5"
integrity sha512-LsOrmObN/2WdM+y2xG+t16vhYrQsnV8wftXIcIOWZhQcBJvKGYuamJGwnU98A7Jxs2oZNkJztXlphEOoA0DWqg==
try-to-catch@^1.0.2:
version "1.1.1"
resolved "https://registry.yarnpkg.com/try-to-catch/-/try-to-catch-1.1.1.tgz#770162dd13b9a0e55da04db5b7f888956072038a"
integrity sha512-ikUlS+/BcImLhNYyIgZcEmq4byc31QpC+46/6Jm5ECWkVFhf8SM2Fp/0pMVXPX6vk45SMCwrP4Taxucne8I0VA==
tty-browserify@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
@@ -9421,6 +9642,11 @@ type-check@~0.3.2:
dependencies:
prelude-ls "~1.1.2"
type-fest@^0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.5.2.tgz#d6ef42a0356c6cd45f49485c3b6281fc148e48a2"
integrity sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==
type-is@~1.6.15, type-is@~1.6.16:
version "1.6.16"
resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194"
@@ -9463,6 +9689,14 @@ uglify-js@^2.6:
optionalDependencies:
uglify-to-browserify "~1.0.0"
uglify-js@^3.5.1:
version "3.6.9"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.9.tgz#85d353edb6ddfb62a9d798f36e91792249320611"
integrity sha512-pcnnhaoG6RtrvHJ1dFncAe8Od6Nuy30oaJ82ts6//sGSXOP5UjBMEthiProjXmMNHOfd93sqlkztifFMcb+4yw==
dependencies:
commander "~2.20.3"
source-map "~0.6.1"
uglify-js@~2.7.3:
version "2.7.5"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8"
@@ -9552,6 +9786,11 @@ universalify@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
"unorm@>= 1.0.0":
version "1.6.0"
resolved "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz#029b289661fba714f1a9af439eb51d9b16c205af"
integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==
unpipe@1.0.0, unpipe@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
@@ -9586,6 +9825,11 @@ update-notifier@^2.3.0:
semver-diff "^2.0.0"
xdg-basedir "^3.0.0"
upper-case@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598"
integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=
urix@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
@@ -9629,6 +9873,13 @@ user-home@^2.0.0:
dependencies:
os-homedir "^1.0.0"
uslug@^1.0.4:
version "1.0.4"
resolved "https://registry.npmjs.org/uslug/-/uslug-1.0.4.tgz#b9a22f0914e0a86140633dacc302e5f4fa450677"
integrity sha1-uaIvCRTgqGFAYz2swwLl9PpFBnc=
dependencies:
unorm ">= 1.0.0"
utf8-byte-length@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz#f45f150c4c66eee968186505ab93fcbb8ad6bf61"
@@ -9995,10 +10246,6 @@ xmldom@0.1.x:
version "0.1.27"
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9"
xmlhttprequest@1:
version "1.8.0"
resolved "http://registry.npm.taobao.org/xmlhttprequest/download/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc"
xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"