@standardnotes/community-cdn 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/entries/com.sncommunity.advanced-checklist.json +17 -0
- package/dist/entries/com.sncommunity.bold-editor.json +17 -0
- package/dist/entries/com.sncommunity.markdown-basic.json +17 -0
- package/dist/entries/com.sncommunity.markdown-math.json +17 -0
- package/dist/entries/com.sncommunity.minimal-markdown.json +17 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/asset-manifest.json +13 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/favicon.ico +0 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/index.html +1 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/logo192.png +0 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/logo512.png +0 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/manifest.json +25 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/robots.txt +3 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/sample.ext.json +12 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/static/css/main.339b1865.css +2 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/static/css/main.339b1865.css.map +1 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/static/js/main.js +3 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/static/js/main.js.LICENSE.txt +87 -0
- package/dist/static/com.sncommunity.advanced-checklist/build/static/js/main.js.map +1 -0
- package/dist/static/com.sncommunity.bold-editor/dist/dist.css +5 -0
- package/dist/static/com.sncommunity.bold-editor/dist/dist.min.js +2 -0
- package/dist/static/com.sncommunity.bold-editor/dist/dist.min.js.LICENSE.txt +42 -0
- package/dist/static/com.sncommunity.bold-editor/dist/filesafe-js/EncryptionWorker.js +2 -0
- package/dist/static/com.sncommunity.bold-editor/dist/filesafe-js/EncryptionWorker.js.LICENSE.txt +5 -0
- package/dist/static/com.sncommunity.bold-editor/dist/index.html +1 -0
- package/dist/static/com.sncommunity.bold-editor/dist/vendor.css +6 -0
- package/dist/static/com.sncommunity.bold-editor/dist/vendor.js +1 -0
- package/dist/static/com.sncommunity.markdown-basic/dist/dist.css +6 -0
- package/dist/static/com.sncommunity.markdown-basic/dist/dist.css.map +1 -0
- package/dist/static/com.sncommunity.markdown-basic/dist/dist.js +2 -0
- package/dist/static/com.sncommunity.markdown-basic/dist/dist.js.LICENSE.txt +32 -0
- package/dist/static/com.sncommunity.markdown-basic/dist/index.html +7 -0
- package/dist/static/com.sncommunity.markdown-math/dist/app.css +518 -0
- package/dist/static/com.sncommunity.markdown-math/dist/app.css.map +1 -0
- package/dist/static/com.sncommunity.markdown-math/dist/app.js +78 -0
- package/dist/static/com.sncommunity.markdown-math/dist/app.js.map +1 -0
- package/dist/static/com.sncommunity.markdown-math/dist/dist.css +523 -0
- package/dist/static/com.sncommunity.markdown-math/dist/dist.js +1 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/static/com.sncommunity.markdown-math/dist/lib.js +7485 -0
- package/dist/static/com.sncommunity.markdown-math/index.html +52 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/app.css +143 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/app.css.map +1 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/app.js +115 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/app.js.map +1 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/dist.css +490 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/dist.js +11211 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/lib.js +11096 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/dialog/dialog.css +46 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/dialog/dialog.js +161 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/search.js +258 -0
- package/dist/static/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/searchcursor.js +293 -0
- package/dist/static/com.sncommunity.minimal-markdown/index.html +23 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/asset-manifest.json +13 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/favicon.ico +0 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/index.html +1 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/logo192.png +0 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/logo512.png +0 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/manifest.json +25 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/robots.txt +3 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/sample.ext.json +12 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/static/css/main.339b1865.css +2 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/static/css/main.339b1865.css.map +1 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/static/js/main.js +3 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/static/js/main.js.LICENSE.txt +87 -0
- package/dist/zips/com.sncommunity.advanced-checklist/build/static/js/main.js.map +1 -0
- package/dist/zips/com.sncommunity.advanced-checklist/package.json +133 -0
- package/dist/zips/com.sncommunity.advanced-checklist.zip +0 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/dist.css +5 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/dist.min.js +2 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/dist.min.js.LICENSE.txt +42 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/filesafe-js/EncryptionWorker.js +2 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/filesafe-js/EncryptionWorker.js.LICENSE.txt +5 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/index.html +1 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/vendor.css +6 -0
- package/dist/zips/com.sncommunity.bold-editor/dist/vendor.js +1 -0
- package/dist/zips/com.sncommunity.bold-editor/package.json +52 -0
- package/dist/zips/com.sncommunity.bold-editor.zip +0 -0
- package/dist/zips/com.sncommunity.markdown-basic.zip +0 -0
- package/dist/zips/com.sncommunity.markdown-math.zip +0 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/app.css +143 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/app.css.map +1 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/app.js +115 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/app.js.map +1 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/dist.css +490 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/dist.js +11211 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/lib.js +11096 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/dialog/dialog.css +46 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/dialog/dialog.js +161 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/search.js +258 -0
- package/dist/zips/com.sncommunity.minimal-markdown/dist/sn-codemirror-search/searchcursor.js +293 -0
- package/dist/zips/com.sncommunity.minimal-markdown/index.html +23 -0
- package/dist/zips/com.sncommunity.minimal-markdown/package.json +39 -0
- package/dist/zips/com.sncommunity.minimal-markdown.zip +0 -0
- package/package.json +2 -2
- package/scripts/Compile.sh +12 -0
- package/scripts/Package.mjs +188 -0
- package/scripts/Readme.mjs +40 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@standardnotes/bold-editor",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.5.0",
|
|
5
|
+
"main": "dist/dist.js",
|
|
6
|
+
"author": "Standard Notes Retired",
|
|
7
|
+
"sn": {
|
|
8
|
+
"name": "Bold Editor",
|
|
9
|
+
"content_type": "SN|Component",
|
|
10
|
+
"area": "editor-editor",
|
|
11
|
+
"spellcheckControl": true,
|
|
12
|
+
"note_type": "rich-text",
|
|
13
|
+
"main": "dist/index.html",
|
|
14
|
+
"file_type": "html"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"lint": "eslint app/ --ext .js",
|
|
18
|
+
"lint:fix": "eslint app/ --ext .js --fix",
|
|
19
|
+
"build": "webpack --config webpack.prod.js",
|
|
20
|
+
"start": "webpack serve --config webpack.dev.js --progress --hot",
|
|
21
|
+
"test": "echo \"Error: no test specified\" && exit 0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@babel/core": "^7.13.14",
|
|
25
|
+
"@babel/eslint-parser": "^7.13.14",
|
|
26
|
+
"@babel/preset-env": "^7.13.12",
|
|
27
|
+
"@babel/preset-react": "^7.13.13",
|
|
28
|
+
"@standardnotes/editor-kit": "2.2.3",
|
|
29
|
+
"babel-loader": "^8.2.2",
|
|
30
|
+
"copy-webpack-plugin": "*",
|
|
31
|
+
"css-loader": "^5.2.0",
|
|
32
|
+
"dompurify": "^2.2.9",
|
|
33
|
+
"eslint": "*",
|
|
34
|
+
"eslint-plugin-react": "*",
|
|
35
|
+
"filesafe-embed": "1.0.13",
|
|
36
|
+
"filesafe-js": "1.0.5",
|
|
37
|
+
"html-webpack-plugin": "^5.3.1",
|
|
38
|
+
"mini-css-extract-plugin": "^1.4.0",
|
|
39
|
+
"node-sass": "*",
|
|
40
|
+
"react": "17.x",
|
|
41
|
+
"react-dom": "17.x",
|
|
42
|
+
"sass-loader": "^11.0.1",
|
|
43
|
+
"sn-stylekit": "3.0.1",
|
|
44
|
+
"style-loader": "~2.0.0",
|
|
45
|
+
"terser-webpack-plugin": "^5.1.1",
|
|
46
|
+
"webpack": "*",
|
|
47
|
+
"webpack-cli": "*",
|
|
48
|
+
"webpack-dev-server": "*",
|
|
49
|
+
"webpack-merge": "^5.7.3",
|
|
50
|
+
"webpack-merge-and-include-globally": "^2.3.4"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
body,
|
|
2
|
+
html {
|
|
3
|
+
font-family: sans-serif;
|
|
4
|
+
font-size: var(--sn-stylekit-base-font-size);
|
|
5
|
+
height: 100%;
|
|
6
|
+
margin: 0;
|
|
7
|
+
background-color: transparent;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
* {
|
|
11
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
#wrapper {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
position: relative;
|
|
18
|
+
height: 100%;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.CodeMirror-scroll {
|
|
23
|
+
padding: 8px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.CodeMirror {
|
|
27
|
+
background-color: var(--sn-stylekit-editor-background-color) !important;
|
|
28
|
+
color: var(--sn-stylekit-editor-foreground-color) !important;
|
|
29
|
+
border: 0 !important;
|
|
30
|
+
font-family: sans-serif;
|
|
31
|
+
-webkit-overflow-scrolling: touch;
|
|
32
|
+
flex: 1 1 auto;
|
|
33
|
+
height: 100%;
|
|
34
|
+
resize: none;
|
|
35
|
+
font-size: var(--sn-stylekit-font-size-editor);
|
|
36
|
+
padding: 0;
|
|
37
|
+
}
|
|
38
|
+
.CodeMirror .CodeMirror-code .cm-comment {
|
|
39
|
+
background: var(--sn-stylekit-contrast-background-color);
|
|
40
|
+
color: var(--sn-stylekit-info-color);
|
|
41
|
+
font-family: Consolas, monaco, "Ubuntu Mono", courier, monospace !important;
|
|
42
|
+
font-size: 90%;
|
|
43
|
+
}
|
|
44
|
+
.CodeMirror .CodeMirror-code .cm-comment.CodeMirror-selectedtext {
|
|
45
|
+
color: var(--sn-stylekit-info-contrast-color) !important;
|
|
46
|
+
background: var(--sn-stylekit-info-color) !important;
|
|
47
|
+
}
|
|
48
|
+
.CodeMirror .cm-header {
|
|
49
|
+
color: var(--sn-stylekit-editor-foreground-color);
|
|
50
|
+
}
|
|
51
|
+
.CodeMirror .cm-header.CodeMirror-selectedtext {
|
|
52
|
+
color: var(--sn-stylekit-info-contrast-color) !important;
|
|
53
|
+
background: var(--sn-stylekit-info-color) !important;
|
|
54
|
+
}
|
|
55
|
+
.CodeMirror .cm-formatting-header,
|
|
56
|
+
.CodeMirror .cm-formatting-strong,
|
|
57
|
+
.CodeMirror .cm-formatting-em {
|
|
58
|
+
opacity: 0.2;
|
|
59
|
+
}
|
|
60
|
+
.CodeMirror .cm-variable-2, .CodeMirror .cm-variable-3 {
|
|
61
|
+
color: var(--sn-stylekit-editor-foreground-color) !important;
|
|
62
|
+
}
|
|
63
|
+
.CodeMirror .cm-variable-2.CodeMirror-selectedtext, .CodeMirror .cm-variable-3.CodeMirror-selectedtext {
|
|
64
|
+
color: var(--sn-stylekit-info-contrast-color) !important;
|
|
65
|
+
background: transparent;
|
|
66
|
+
}
|
|
67
|
+
.CodeMirror .cm-variable-3 {
|
|
68
|
+
color: var(--sn-stylekit-editor-foreground-color) !important;
|
|
69
|
+
}
|
|
70
|
+
.CodeMirror .cm-variable-3.CodeMirror-selectedtext {
|
|
71
|
+
color: var(--sn-stylekit-info-contrast-color) !important;
|
|
72
|
+
background: transparent;
|
|
73
|
+
}
|
|
74
|
+
.CodeMirror .cm-link,
|
|
75
|
+
.CodeMirror .cm-string {
|
|
76
|
+
color: var(--sn-stylekit-info-color) !important;
|
|
77
|
+
}
|
|
78
|
+
.CodeMirror .cm-link.CodeMirror-selectedtext,
|
|
79
|
+
.CodeMirror .cm-string.CodeMirror-selectedtext {
|
|
80
|
+
color: var(--sn-stylekit-info-contrast-color) !important;
|
|
81
|
+
background: var(--sn-stylekit-info-color) !important;
|
|
82
|
+
}
|
|
83
|
+
.CodeMirror .CodeMirror-linenumber {
|
|
84
|
+
color: gray !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.CodeMirror-cursor {
|
|
88
|
+
border-color: var(--sn-stylekit-editor-foreground-color);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.CodeMirror-selected {
|
|
92
|
+
background: var(--sn-stylekit-info-color) !important;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.CodeMirror-selectedtext {
|
|
96
|
+
color: var(--sn-stylekit-info-contrast-color) !important;
|
|
97
|
+
background: var(--sn-stylekit-info-color) !important;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.CodeMirror-gutters {
|
|
101
|
+
background-color: var(--sn-stylekit-background-color) !important;
|
|
102
|
+
color: var(--sn-stylekit-editor-foreground-color) !important;
|
|
103
|
+
border-color: var(--sn-stylekit-border-color) !important;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.cm-header-1 {
|
|
107
|
+
font-size: 150%;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.cm-header-2 {
|
|
111
|
+
font-size: 130%;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.cm-header-3 {
|
|
115
|
+
font-size: 120%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.cm-header-4 {
|
|
119
|
+
font-size: 110%;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.cm-header-5 {
|
|
123
|
+
font-size: 100%;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.cm-header-6 {
|
|
127
|
+
font-size: 90%;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.CodeMirror .cm-quote {
|
|
131
|
+
color: var(--sn-stylekit-foreground-color);
|
|
132
|
+
opacity: 0.6;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {
|
|
136
|
+
color: var(--sn-stylekit-success-color) !important;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.CodeMirror .cm-link, .CodeMirror .cm-string, .CodeMirror .cm-keyword {
|
|
140
|
+
color: var(--sn-stylekit-info-color);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/*# sourceMappingURL=app.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../src/main.scss"],"names":[],"mappings":"AAAA;AAAA;EAEE;EACA;EACA;EACA;EACA;;;AAGF;EAEE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAIF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EAEA;EAEA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;;AAEA;EACE;EACA;;AAKJ;AAAA;AAAA;EAGE;;AAGF;EACE;;AAEA;EACE;EACA;;AAGJ;EACE;;AAEA;EACE;EACA;;AAIJ;AAAA;EAEE;;AAEA;AAAA;EACE;EACA;;AAIJ;EACE;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE","file":"app.css"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
document.addEventListener('DOMContentLoaded', function (event) {
|
|
5
|
+
var componentRelay;
|
|
6
|
+
var workingNote, clientData;
|
|
7
|
+
var lastValue, lastUUID;
|
|
8
|
+
var editor;
|
|
9
|
+
var ignoreTextChange = false;
|
|
10
|
+
var initialLoad = true;
|
|
11
|
+
|
|
12
|
+
function loadComponentRelay() {
|
|
13
|
+
var initialPermissions = [{
|
|
14
|
+
name: 'stream-context-item'
|
|
15
|
+
}];
|
|
16
|
+
componentRelay = new ComponentRelay({
|
|
17
|
+
initialPermissions: initialPermissions,
|
|
18
|
+
targetWindow: window,
|
|
19
|
+
onReady: function onReady() {
|
|
20
|
+
var platform = componentRelay.platform;
|
|
21
|
+
|
|
22
|
+
if (platform) {
|
|
23
|
+
document.body.classList.add(platform);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
loadEditor(); // only use CodeMirror selection color if we're not on mobile.
|
|
27
|
+
|
|
28
|
+
editor.setOption('styleSelectedText', !componentRelay.isMobile);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
componentRelay.streamContextItem(function (note) {
|
|
32
|
+
onReceivedNote(note);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function saveNote() {
|
|
37
|
+
if (workingNote) {
|
|
38
|
+
// Be sure to capture this object as a variable, as this.note may be reassigned in `streamContextItem`, so by the time
|
|
39
|
+
// you modify it in the presave block, it may not be the same object anymore, so the presave values will not be applied to
|
|
40
|
+
// the right object, and it will save incorrectly.
|
|
41
|
+
var note = workingNote;
|
|
42
|
+
componentRelay.saveItemWithPresave(note, function () {
|
|
43
|
+
lastValue = editor.getValue();
|
|
44
|
+
note.content.text = lastValue;
|
|
45
|
+
note.clientData = clientData; // clear previews
|
|
46
|
+
|
|
47
|
+
note.content.preview_plain = null;
|
|
48
|
+
note.content.preview_html = null;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function onReceivedNote(note) {
|
|
54
|
+
if (note.uuid !== lastUUID) {
|
|
55
|
+
// Note changed, reset last values
|
|
56
|
+
lastValue = null;
|
|
57
|
+
initialLoad = true;
|
|
58
|
+
lastUUID = note.uuid;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
workingNote = note; // Only update UI on non-metadata updates.
|
|
62
|
+
|
|
63
|
+
if (note.isMetadataUpdate) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
clientData = note.clientData;
|
|
68
|
+
|
|
69
|
+
if (editor) {
|
|
70
|
+
if (note.content.text !== lastValue) {
|
|
71
|
+
ignoreTextChange = true;
|
|
72
|
+
editor.getDoc().setValue(workingNote.content.text);
|
|
73
|
+
ignoreTextChange = false;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (initialLoad) {
|
|
77
|
+
initialLoad = false;
|
|
78
|
+
editor.getDoc().clearHistory();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
editor.setOption('spellcheck', workingNote.content.spellcheck);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function loadEditor() {
|
|
86
|
+
editor = CodeMirror.fromTextArea(document.getElementById('code'), {
|
|
87
|
+
mode: 'gfm',
|
|
88
|
+
lineWrapping: true,
|
|
89
|
+
extraKeys: {
|
|
90
|
+
'Alt-F': 'findPersistent'
|
|
91
|
+
},
|
|
92
|
+
inputStyle: getInputStyleForEnvironment()
|
|
93
|
+
});
|
|
94
|
+
editor.setSize(undefined, '100%');
|
|
95
|
+
editor.on('change', function () {
|
|
96
|
+
if (ignoreTextChange) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
saveNote();
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function getInputStyleForEnvironment() {
|
|
105
|
+
var _componentRelay$envir;
|
|
106
|
+
|
|
107
|
+
var environment = (_componentRelay$envir = componentRelay.environment) !== null && _componentRelay$envir !== void 0 ? _componentRelay$envir : 'web';
|
|
108
|
+
return environment === 'mobile' ? 'textarea' : 'contenteditable';
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
loadComponentRelay();
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
},{}]},{},[1]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","names":["document","addEventListener","event","componentRelay","workingNote","clientData","lastValue","lastUUID","editor","ignoreTextChange","initialLoad","loadComponentRelay","initialPermissions","name","ComponentRelay","targetWindow","window","onReady","platform","body","classList","add","loadEditor","setOption","isMobile","streamContextItem","note","onReceivedNote","saveNote","saveItemWithPresave","getValue","content","text","preview_plain","preview_html","uuid","isMetadataUpdate","getDoc","setValue","clearHistory","spellcheck","CodeMirror","fromTextArea","getElementById","mode","lineWrapping","extraKeys","inputStyle","getInputStyleForEnvironment","setSize","undefined","on","environment"],"sources":["app.js"],"sourcesContent":["document.addEventListener('DOMContentLoaded', function (event) {\n let componentRelay\n let workingNote, clientData\n let lastValue, lastUUID\n let editor\n let ignoreTextChange = false\n let initialLoad = true\n\n function loadComponentRelay() {\n const initialPermissions = [{ name: 'stream-context-item' }]\n componentRelay = new ComponentRelay({\n initialPermissions,\n targetWindow: window,\n onReady: function () {\n const platform = componentRelay.platform\n if (platform) {\n document.body.classList.add(platform)\n }\n\n loadEditor()\n\n // only use CodeMirror selection color if we're not on mobile.\n editor.setOption('styleSelectedText', !componentRelay.isMobile)\n },\n })\n\n componentRelay.streamContextItem((note) => {\n onReceivedNote(note)\n })\n }\n\n function saveNote() {\n if (workingNote) {\n // Be sure to capture this object as a variable, as this.note may be reassigned in `streamContextItem`, so by the time\n // you modify it in the presave block, it may not be the same object anymore, so the presave values will not be applied to\n // the right object, and it will save incorrectly.\n let note = workingNote\n\n componentRelay.saveItemWithPresave(note, () => {\n lastValue = editor.getValue()\n note.content.text = lastValue\n note.clientData = clientData\n\n // clear previews\n note.content.preview_plain = null\n note.content.preview_html = null\n })\n }\n }\n\n function onReceivedNote(note) {\n if (note.uuid !== lastUUID) {\n // Note changed, reset last values\n lastValue = null\n initialLoad = true\n lastUUID = note.uuid\n }\n\n workingNote = note\n\n // Only update UI on non-metadata updates.\n if (note.isMetadataUpdate) {\n return\n }\n\n clientData = note.clientData\n\n if (editor) {\n if (note.content.text !== lastValue) {\n ignoreTextChange = true\n editor.getDoc().setValue(workingNote.content.text)\n ignoreTextChange = false\n }\n\n if (initialLoad) {\n initialLoad = false\n editor.getDoc().clearHistory()\n }\n\n editor.setOption('spellcheck', workingNote.content.spellcheck)\n }\n }\n\n function loadEditor() {\n editor = CodeMirror.fromTextArea(document.getElementById('code'), {\n mode: 'gfm',\n lineWrapping: true,\n extraKeys: { 'Alt-F': 'findPersistent' },\n inputStyle: getInputStyleForEnvironment(),\n })\n editor.setSize(undefined, '100%')\n\n editor.on('change', function () {\n if (ignoreTextChange) {\n return\n }\n saveNote()\n })\n }\n\n function getInputStyleForEnvironment() {\n const environment = componentRelay.environment ?? 'web'\n return environment === 'mobile' ? 'textarea' : 'contenteditable'\n }\n\n loadComponentRelay()\n})\n"],"mappings":"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"}
|