@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,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/** @license React v0.19.1
|
|
8
|
+
* scheduler.production.min.js
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/** @license React v16.14.0
|
|
17
|
+
* react-dom.production.min.js
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the MIT license found in the
|
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/** @license React v16.14.0
|
|
26
|
+
* react.production.min.js
|
|
27
|
+
*
|
|
28
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/
|
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
html {
|
|
2
|
+
font-size: var(--sn-stylekit-base-font-size);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
body {
|
|
6
|
+
font-size: var(--sn-stylekit-font-size-editor);
|
|
7
|
+
font-family: Calibri, "Trebuchet MS", sans-serif;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
* {
|
|
11
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.full-height,
|
|
15
|
+
.ldt label,
|
|
16
|
+
body,
|
|
17
|
+
html {
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ldt,
|
|
22
|
+
.ldt label.ldt-label {
|
|
23
|
+
padding: 4px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ldt pre,
|
|
27
|
+
.ldt textarea {
|
|
28
|
+
font-size: var(--sn-stylekit-font-size-editor);
|
|
29
|
+
font-family: monospace;
|
|
30
|
+
color: var(--sn-stylekit-editor-foreground-color);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ldt {
|
|
34
|
+
overflow: auto;
|
|
35
|
+
position: relative;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
pre.ldt-pre {
|
|
39
|
+
-moz-padding-start: 1px;
|
|
40
|
+
white-space: pre-wrap;
|
|
41
|
+
word-wrap: break-word;
|
|
42
|
+
margin: 0;
|
|
43
|
+
border: 0;
|
|
44
|
+
-webkit-nbsp-mode: space;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@supports (-webkit-overflow-scrolling: touch) {
|
|
48
|
+
/* CSS specific to iOS devices */
|
|
49
|
+
.ldt pre {
|
|
50
|
+
margin-left: 3px !important;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
body,
|
|
54
|
+
hr {
|
|
55
|
+
padding: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.container,
|
|
59
|
+
.copyright,
|
|
60
|
+
.demo-control,
|
|
61
|
+
.open-control {
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ldt label {
|
|
66
|
+
position: absolute;
|
|
67
|
+
top: 0;
|
|
68
|
+
left: 0;
|
|
69
|
+
width: 100%;
|
|
70
|
+
display: inline;
|
|
71
|
+
cursor: text;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
body,
|
|
75
|
+
sub,
|
|
76
|
+
sup {
|
|
77
|
+
position: relative;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.hljs,
|
|
81
|
+
.ldt textarea,
|
|
82
|
+
hr {
|
|
83
|
+
display: block;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ldt textarea {
|
|
87
|
+
font-size: var(--sn-stylekit-editor-foreground-color);
|
|
88
|
+
color: transparent !important;
|
|
89
|
+
color: rgba(0, 0, 0, 0.3) !important;
|
|
90
|
+
margin: 0;
|
|
91
|
+
border: 0;
|
|
92
|
+
background: 0 0;
|
|
93
|
+
outline: 0;
|
|
94
|
+
resize: none;
|
|
95
|
+
min-width: 100%;
|
|
96
|
+
width: 100%;
|
|
97
|
+
min-height: 100%;
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
filter: alpha(opacity=30);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.hljs {
|
|
103
|
+
overflow-x: auto;
|
|
104
|
+
color: #657b83;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.hljs-comment,
|
|
108
|
+
.hljs-quote {
|
|
109
|
+
color: #93a1a1;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.hljs-addition,
|
|
113
|
+
.hljs-keyword,
|
|
114
|
+
.hljs-selector-tag {
|
|
115
|
+
color: #859900;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.hljs-doctag,
|
|
119
|
+
.hljs-literal,
|
|
120
|
+
.hljs-meta .hljs-meta-string,
|
|
121
|
+
.hljs-number,
|
|
122
|
+
.hljs-regexp,
|
|
123
|
+
.hljs-string {
|
|
124
|
+
color: #2aa198;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.hljs-name,
|
|
128
|
+
.hljs-section,
|
|
129
|
+
.hljs-selector-class,
|
|
130
|
+
.hljs-selector-id,
|
|
131
|
+
.hljs-title {
|
|
132
|
+
color: #268bd2;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.hljs-attr,
|
|
136
|
+
.hljs-attribute,
|
|
137
|
+
.hljs-class .hljs-title,
|
|
138
|
+
.hljs-template-variable,
|
|
139
|
+
.hljs-type,
|
|
140
|
+
.hljs-variable {
|
|
141
|
+
color: #b58900;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.hljs-bullet,
|
|
145
|
+
.hljs-link,
|
|
146
|
+
.hljs-meta,
|
|
147
|
+
.hljs-meta .hljs-keyword,
|
|
148
|
+
.hljs-selector-attr,
|
|
149
|
+
.hljs-selector-pseudo,
|
|
150
|
+
.hljs-subst,
|
|
151
|
+
.hljs-symbol {
|
|
152
|
+
color: #cb4b16;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.hljs-built_in,
|
|
156
|
+
.hljs-deletion {
|
|
157
|
+
color: #dc322f;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.hljs-formula {
|
|
161
|
+
background: #eee8d5;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.hljs-emphasis {
|
|
165
|
+
font-style: italic;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.hljs-strong {
|
|
169
|
+
font-weight: 700;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@viewport {
|
|
173
|
+
width: device-width;
|
|
174
|
+
}
|
|
175
|
+
@-ms-viewport {
|
|
176
|
+
width: device-width;
|
|
177
|
+
}
|
|
178
|
+
* {
|
|
179
|
+
-webkit-box-sizing: border-box;
|
|
180
|
+
-moz-box-sizing: border-box;
|
|
181
|
+
box-sizing: border-box;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
body {
|
|
185
|
+
min-width: 320px;
|
|
186
|
+
margin: 0;
|
|
187
|
+
background-color: transparent;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
button,
|
|
191
|
+
textarea {
|
|
192
|
+
font: var(--sn-stylekit-font-size-editor) Calibri, "Trebuchet MS", sans-serif;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
sub,
|
|
196
|
+
sup {
|
|
197
|
+
vertical-align: baseline;
|
|
198
|
+
top: -0.4em;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
sub {
|
|
202
|
+
top: 0.4em;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
hr {
|
|
206
|
+
height: 1px;
|
|
207
|
+
border: 0;
|
|
208
|
+
border-top: 1px solid #ccc;
|
|
209
|
+
margin: 1em 0;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
h1,
|
|
213
|
+
h2,
|
|
214
|
+
h3 {
|
|
215
|
+
font: var(--sn-stylekit-font-size-editor) Cambria, Georgia, serif;
|
|
216
|
+
margin: 1em 0 0;
|
|
217
|
+
font-weight: 400;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.ldt .bold,
|
|
221
|
+
.ldt .latexBlock.delimeter,
|
|
222
|
+
.ldt .list-mark {
|
|
223
|
+
font-weight: 700;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
h1 {
|
|
227
|
+
margin: 0.5em 0 0.25em;
|
|
228
|
+
font-size: 225%;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
h2 {
|
|
232
|
+
margin: 1em 0 0.25em;
|
|
233
|
+
font-size: 175%;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
h3 {
|
|
237
|
+
font-size: 125%;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
div.header {
|
|
241
|
+
background: var(--sn-stylekit-contrast-background-color);
|
|
242
|
+
color: var(--sn-stylekit-contrast-foreground-color);
|
|
243
|
+
border-bottom: 1px solid var(--sn-stylekit-contrast-border-color);
|
|
244
|
+
padding: 0 16px;
|
|
245
|
+
margin: 0;
|
|
246
|
+
height: 48px;
|
|
247
|
+
position: absolute;
|
|
248
|
+
top: 0;
|
|
249
|
+
left: 0;
|
|
250
|
+
right: 0;
|
|
251
|
+
display: flex;
|
|
252
|
+
align-items: center;
|
|
253
|
+
justify-content: space-between;
|
|
254
|
+
z-index: 20;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.header-item {
|
|
258
|
+
flex: 0 0 auto;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.header a.link {
|
|
262
|
+
color: #fff;
|
|
263
|
+
text-decoration: none;
|
|
264
|
+
border-bottom: thin solid rgba(255, 255, 255, 0.7);
|
|
265
|
+
height: 16px;
|
|
266
|
+
display: inline-block;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.demo-control,
|
|
270
|
+
.open-control {
|
|
271
|
+
text-align: center;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.demo-control .control-item,
|
|
275
|
+
.header .toolbar-button {
|
|
276
|
+
display: inline-block;
|
|
277
|
+
vertical-align: middle;
|
|
278
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
279
|
+
color: #fff;
|
|
280
|
+
background-clip: padding-box;
|
|
281
|
+
border-color: transparent;
|
|
282
|
+
border-style: solid;
|
|
283
|
+
border-width: 9px 1px;
|
|
284
|
+
height: 48px;
|
|
285
|
+
min-width: 30px;
|
|
286
|
+
line-height: 30px;
|
|
287
|
+
padding: 0 4px;
|
|
288
|
+
text-align: center;
|
|
289
|
+
cursor: pointer;
|
|
290
|
+
cursor: hand;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.demo-control .control-item {
|
|
294
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
295
|
+
display: inline-block;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.demo-control .control-input {
|
|
299
|
+
display: none;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.demo-control .control-input:checked + .control-item {
|
|
303
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
@media screen and (min-width: 825px) {
|
|
307
|
+
.demo-control {
|
|
308
|
+
text-align: left;
|
|
309
|
+
padding-left: 16px;
|
|
310
|
+
}
|
|
311
|
+
.open-control {
|
|
312
|
+
text-align: right;
|
|
313
|
+
padding-right: 20px;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
.container {
|
|
317
|
+
padding-top: 48px;
|
|
318
|
+
overflow: hidden;
|
|
319
|
+
-webkit-overflow-scrolling: touch;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.half-width,
|
|
323
|
+
.slider {
|
|
324
|
+
display: inline-block;
|
|
325
|
+
vertical-align: top;
|
|
326
|
+
white-space: normal;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.half-width {
|
|
330
|
+
position: relative;
|
|
331
|
+
width: 50%;
|
|
332
|
+
width: calc(50% - 3px);
|
|
333
|
+
background-color: transparent;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.slider {
|
|
337
|
+
width: 6px;
|
|
338
|
+
cursor: ew-resize;
|
|
339
|
+
background: radial-gradient(rgba(0, 0, 0, 0.1) 21%, transparent 22%) 3px 3px, radial-gradient(rgba(0, 0, 0, 0.1) 21%, transparent 22%);
|
|
340
|
+
background-size: 6px 6px;
|
|
341
|
+
left: 0 !important;
|
|
342
|
+
top: 0 !important;
|
|
343
|
+
transform: none !important;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.opt__strict .not-strict {
|
|
347
|
+
opacity: 0.3;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.ldt label.ldt-label,
|
|
351
|
+
.source {
|
|
352
|
+
padding: 0;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.ldt pre,
|
|
356
|
+
.ldt textarea,
|
|
357
|
+
textarea.source {
|
|
358
|
+
padding: 16px 16px 0;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.ldt pre.ldt-pre,
|
|
362
|
+
.ldt textarea {
|
|
363
|
+
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
364
|
+
font-size: var(--sn-stylekit-font-size-editor);
|
|
365
|
+
line-height: calc(var(--sn-stylekit-font-size-editor) + 0.2rem);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
pre.ldt-pre span {
|
|
369
|
+
vertical-align: top;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
textarea.source {
|
|
373
|
+
width: 100%;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
textarea {
|
|
377
|
+
resize: none;
|
|
378
|
+
display: block;
|
|
379
|
+
outline: 0;
|
|
380
|
+
border: 0;
|
|
381
|
+
margin: 0;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.result-html .svg-preview,
|
|
385
|
+
.result-html img {
|
|
386
|
+
max-width: 100%;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.result-html,
|
|
390
|
+
.result-src {
|
|
391
|
+
display: none;
|
|
392
|
+
padding: 16px 16px 16px 13px;
|
|
393
|
+
margin: 0;
|
|
394
|
+
overflow: auto;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.result-src,
|
|
398
|
+
.result-src-content {
|
|
399
|
+
white-space: pre-wrap;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.result-as-debug .result-src,
|
|
403
|
+
.result-as-habr .result-src,
|
|
404
|
+
.result-as-html .result-html,
|
|
405
|
+
.result-as-htmltex .result-src,
|
|
406
|
+
.result-as-md .result-src,
|
|
407
|
+
.result-as-src .result-src {
|
|
408
|
+
display: block;
|
|
409
|
+
color: var(--sn-stylekit-editor-foreground-color);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.result-html {
|
|
413
|
+
padding-top: 0;
|
|
414
|
+
padding-bottom: 0;
|
|
415
|
+
}
|
|
416
|
+
.result-html a {
|
|
417
|
+
color: var(--sn-stylekit-info-color);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.result-html .svg-preview {
|
|
421
|
+
overflow: visible;
|
|
422
|
+
-webkit-transition: opacity 0.4s ease-in-out;
|
|
423
|
+
-moz-transition: opacity 0.4s ease-in-out;
|
|
424
|
+
transition: opacity 0.4s ease-in-out;
|
|
425
|
+
fill: var(--sn-stylekit-info-color);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.hljs {
|
|
429
|
+
background: 0 0;
|
|
430
|
+
padding: 0;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
::-webkit-scrollbar {
|
|
434
|
+
width: 12px;
|
|
435
|
+
height: 12px;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
::-webkit-scrollbar-track {
|
|
439
|
+
background: rgba(0, 0, 0, 0.1);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
::-webkit-scrollbar-thumb {
|
|
443
|
+
background: rgba(0, 0, 0, 0.2);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
::-webkit-scrollbar-corner {
|
|
447
|
+
background: #e5cda5;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.ldt .header, .ldt .header2 {
|
|
451
|
+
font-weight: 700;
|
|
452
|
+
color: var(--sn-stylekit-info-color);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.ldt .quote {
|
|
456
|
+
background: var(--sn-stylekit-secondary-contrast-background-color);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.ldt .list {
|
|
460
|
+
background: var(--sn-stylekit-secondary-contrast-background-color);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.ldt .code, .ldt .fence {
|
|
464
|
+
background: var(--sn-stylekit-secondary-contrast-background-color);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.ldt .sub, .ldt .sup {
|
|
468
|
+
color: var(--sn-stylekit-warning-color);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.ldt .link {
|
|
472
|
+
color: var(--sn-stylekit-info-color);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.ldt .latex {
|
|
476
|
+
color: var(--sn-stylekit-success-color);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.ldt .italic {
|
|
480
|
+
color: var(--sn-stylekit-warning-color);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.ldt .strike {
|
|
484
|
+
text-decoration: line-through;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.ldt .latexBlock.keyword {
|
|
488
|
+
color: var(--sn-stylekit-info-color);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.ldt .latexBlock.keyword2 {
|
|
492
|
+
color: var(--sn-stylekit-info-color);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.ldt .latexBlock.keyword3 {
|
|
496
|
+
color: var(--sn-stylekit-success-color);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.ldt .latexBlock.bracket {
|
|
500
|
+
color: var(--sn-stylekit-danger-color);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.ldt .latexBlock.comment {
|
|
504
|
+
color: var(--sn-stylekit-neutral-color-color);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.ldt .latexBlock.index {
|
|
508
|
+
color: var(--sn-stylekit-warning-color);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
@media screen and (-webkit-min-device-pixel-ratio: 0) {
|
|
512
|
+
.ldt textarea::-webkit-input-placeholder {
|
|
513
|
+
text-shadow: none;
|
|
514
|
+
-webkit-text-fill-color: initial;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/*# sourceMappingURL=app.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../src/main.scss"],"names":[],"mappings":"AAAA;EACE;;;AAGF;EACE;EACA;;;AAGF;EAEE;;;AAGF;AAAA;AAAA;AAAA;EAII;;;AAGJ;AAAA;EAEI;;;AAGJ;AAAA;EAEE;EACA;EACA;;;AAIF;EACI;EACA;;;AAGJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;AACE;EACA;IACE;;;AAIJ;AAAA;EAEI;;;AAGJ;AAAA;AAAA;AAAA;EAII;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;AAAA;AAAA;EAGI;;;AAGJ;AAAA;AAAA;EAGI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;AAAA;EAEI;;;AAGJ;AAAA;AAAA;EAGI;;;AAGJ;AAAA;AAAA;AAAA;AAAA;AAAA;EAMI;;;AAGJ;AAAA;AAAA;AAAA;AAAA;EAKI;;;AAGJ;AAAA;AAAA;AAAA;AAAA;AAAA;EAMI;;;AAGJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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F;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACE;;;AAIF;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EAII;IACI;IACA","file":"app.css"}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 editor = document.getElementById('editor-source');
|
|
6
|
+
var workingNote;
|
|
7
|
+
var componentRelay = new ComponentRelay({
|
|
8
|
+
targetWindow: window,
|
|
9
|
+
onReady: function onReady() {
|
|
10
|
+
var platform = componentRelay.platform;
|
|
11
|
+
|
|
12
|
+
if (platform) {
|
|
13
|
+
document.body.classList.add(platform);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
componentRelay.streamContextItem(function (note) {
|
|
18
|
+
workingNote = note;
|
|
19
|
+
|
|
20
|
+
if (note.isMetadataUpdate) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
editor.value = note.content.text;
|
|
25
|
+
window.upmath.updateText();
|
|
26
|
+
editor.setAttribute('spellcheck', JSON.stringify(workingNote.content.spellcheck));
|
|
27
|
+
});
|
|
28
|
+
editor.addEventListener('input', function (event) {
|
|
29
|
+
var text = editor.value || '';
|
|
30
|
+
|
|
31
|
+
function strip(html) {
|
|
32
|
+
var tmp = document.implementation.createHTMLDocument('New').body;
|
|
33
|
+
tmp.innerHTML = html;
|
|
34
|
+
return tmp.textContent || tmp.innerText || '';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function truncateString(string) {
|
|
38
|
+
var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 90;
|
|
39
|
+
|
|
40
|
+
if (string.length <= limit) {
|
|
41
|
+
return string;
|
|
42
|
+
} else {
|
|
43
|
+
return string.substring(0, limit) + '...';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (workingNote) {
|
|
48
|
+
var note = workingNote;
|
|
49
|
+
componentRelay.saveItemWithPresave(note, function () {
|
|
50
|
+
window.upmath.updateText();
|
|
51
|
+
var html = window.upmath.getHTML();
|
|
52
|
+
var strippedHtml = truncateString(strip(html));
|
|
53
|
+
note.content.preview_plain = strippedHtml;
|
|
54
|
+
note.content.preview_html = null;
|
|
55
|
+
note.content.text = text;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
editor.addEventListener('keydown', function (event) {
|
|
61
|
+
if (!event.shiftKey && event.which == 9) {
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
|
|
64
|
+
if (!document.execCommand('insertText', false, '\t')) {
|
|
65
|
+
var start = this.selectionStart;
|
|
66
|
+
var end = this.selectionEnd;
|
|
67
|
+
var spaces = ' ';
|
|
68
|
+
|
|
69
|
+
this.value = this.value.substring(0, start) + spaces + this.value.substring(end);
|
|
70
|
+
|
|
71
|
+
this.selectionStart = this.selectionEnd = start + 4;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
},{}]},{},[1]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","names":["document","addEventListener","event","editor","getElementById","workingNote","componentRelay","ComponentRelay","targetWindow","window","onReady","platform","body","classList","add","streamContextItem","note","isMetadataUpdate","value","content","text","upmath","updateText","setAttribute","JSON","stringify","spellcheck","strip","html","tmp","implementation","createHTMLDocument","innerHTML","textContent","innerText","truncateString","string","limit","length","substring","saveItemWithPresave","getHTML","strippedHtml","preview_plain","preview_html","shiftKey","which","preventDefault","execCommand","start","selectionStart","end","selectionEnd","spaces"],"sources":["app.js"],"sourcesContent":["document.addEventListener('DOMContentLoaded', function (event) {\n const editor = document.getElementById('editor-source')\n\n let workingNote\n\n const componentRelay = new ComponentRelay({\n targetWindow: window,\n onReady: () => {\n const platform = componentRelay.platform\n if (platform) {\n document.body.classList.add(platform)\n }\n },\n })\n\n componentRelay.streamContextItem((note) => {\n workingNote = note\n\n // Only update UI on non-metadata updates.\n if (note.isMetadataUpdate) {\n return\n }\n\n editor.value = note.content.text\n window.upmath.updateText()\n\n editor.setAttribute('spellcheck', JSON.stringify(workingNote.content.spellcheck))\n })\n\n editor.addEventListener('input', function (event) {\n const text = editor.value || ''\n\n function strip(html) {\n const tmp = document.implementation.createHTMLDocument('New').body\n tmp.innerHTML = html\n return tmp.textContent || tmp.innerText || ''\n }\n\n function truncateString(string, limit = 90) {\n if (string.length <= limit) {\n return string\n } else {\n return string.substring(0, limit) + '...'\n }\n }\n\n if (workingNote) {\n // Be sure to capture this object as a variable, as workingNote 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 const note = workingNote\n\n componentRelay.saveItemWithPresave(note, () => {\n window.upmath.updateText()\n\n const html = window.upmath.getHTML()\n const strippedHtml = truncateString(strip(html))\n\n note.content.preview_plain = strippedHtml\n note.content.preview_html = null\n note.content.text = text\n })\n }\n })\n\n // Tab handler\n editor.addEventListener('keydown', function (event) {\n if (!event.shiftKey && event.which == 9) {\n event.preventDefault()\n\n // Using document.execCommand gives us undo support\n if (!document.execCommand('insertText', false, '\\t')) {\n // document.execCommand works great on Chrome/Safari but not Firefox\n const start = this.selectionStart\n const end = this.selectionEnd\n const spaces = ' '\n\n // Insert 4 spaces\n this.value = this.value.substring(0, start) + spaces + this.value.substring(end)\n\n // Place cursor 4 spaces away from where\n // the tab key was pressed\n this.selectionStart = this.selectionEnd = start + 4\n }\n }\n })\n})\n"],"mappings":";;AAAAA,QAAQ,CAACC,gBAAT,CAA0B,kBAA1B,EAA8C,UAAUC,KAAV,EAAiB;EAC7D,IAAMC,MAAM,GAAGH,QAAQ,CAACI,cAAT,CAAwB,eAAxB,CAAf;EAEA,IAAIC,WAAJ;EAEA,IAAMC,cAAc,GAAG,IAAIC,cAAJ,CAAmB;IACxCC,YAAY,EAAEC,MAD0B;IAExCC,OAAO,EAAE,mBAAM;MACb,IAAMC,QAAQ,GAAGL,cAAc,CAACK,QAAhC;;MACA,IAAIA,QAAJ,EAAc;QACZX,QAAQ,CAACY,IAAT,CAAcC,SAAd,CAAwBC,GAAxB,CAA4BH,QAA5B;MACD;IACF;EAPuC,CAAnB,CAAvB;EAUAL,cAAc,CAACS,iBAAf,CAAiC,UAACC,IAAD,EAAU;IACzCX,WAAW,GAAGW,IAAd,CADyC,CAGzC;;IACA,IAAIA,IAAI,CAACC,gBAAT,EAA2B;MACzB;IACD;;IAEDd,MAAM,CAACe,KAAP,GAAeF,IAAI,CAACG,OAAL,CAAaC,IAA5B;IACAX,MAAM,CAACY,MAAP,CAAcC,UAAd;IAEAnB,MAAM,CAACoB,YAAP,CAAoB,YAApB,EAAkCC,IAAI,CAACC,SAAL,CAAepB,WAAW,CAACc,OAAZ,CAAoBO,UAAnC,CAAlC;EACD,CAZD;EAcAvB,MAAM,CAACF,gBAAP,CAAwB,OAAxB,EAAiC,UAAUC,KAAV,EAAiB;IAChD,IAAMkB,IAAI,GAAGjB,MAAM,CAACe,KAAP,IAAgB,EAA7B;;IAEA,SAASS,KAAT,CAAeC,IAAf,EAAqB;MACnB,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