ll-plus 2.10.24 → 2.10.25

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.
Files changed (191) hide show
  1. package/package.json +1 -1
  2. package/theme-chalk/code-editor-vue3/addon/comment/comment.js +211 -0
  3. package/theme-chalk/code-editor-vue3/addon/comment/continuecomment.js +114 -0
  4. package/theme-chalk/code-editor-vue3/addon/dialog/dialog.css +32 -0
  5. package/theme-chalk/code-editor-vue3/addon/dialog/dialog.js +163 -0
  6. package/theme-chalk/code-editor-vue3/addon/display/autorefresh.js +47 -0
  7. package/theme-chalk/code-editor-vue3/addon/display/fullscreen.css +6 -0
  8. package/theme-chalk/code-editor-vue3/addon/display/fullscreen.js +41 -0
  9. package/theme-chalk/code-editor-vue3/addon/display/panel.js +133 -0
  10. package/theme-chalk/code-editor-vue3/addon/display/placeholder.js +78 -0
  11. package/theme-chalk/code-editor-vue3/addon/display/rulers.js +51 -0
  12. package/theme-chalk/code-editor-vue3/addon/edit/closebrackets.js +201 -0
  13. package/theme-chalk/code-editor-vue3/addon/edit/closetag.js +185 -0
  14. package/theme-chalk/code-editor-vue3/addon/edit/continuelist.js +101 -0
  15. package/theme-chalk/code-editor-vue3/addon/edit/matchbrackets.js +160 -0
  16. package/theme-chalk/code-editor-vue3/addon/edit/matchtags.js +66 -0
  17. package/theme-chalk/code-editor-vue3/addon/edit/trailingspace.js +27 -0
  18. package/theme-chalk/code-editor-vue3/addon/fold/brace-fold.js +119 -0
  19. package/theme-chalk/code-editor-vue3/addon/fold/comment-fold.js +59 -0
  20. package/theme-chalk/code-editor-vue3/addon/fold/foldcode.js +159 -0
  21. package/theme-chalk/code-editor-vue3/addon/fold/foldgutter.css +20 -0
  22. package/theme-chalk/code-editor-vue3/addon/fold/foldgutter.js +169 -0
  23. package/theme-chalk/code-editor-vue3/addon/fold/indent-fold.js +48 -0
  24. package/theme-chalk/code-editor-vue3/addon/fold/markdown-fold.js +49 -0
  25. package/theme-chalk/code-editor-vue3/addon/fold/xml-fold.js +184 -0
  26. package/theme-chalk/code-editor-vue3/addon/hint/anyword-hint.js +41 -0
  27. package/theme-chalk/code-editor-vue3/addon/hint/css-hint.js +66 -0
  28. package/theme-chalk/code-editor-vue3/addon/hint/html-hint.js +351 -0
  29. package/theme-chalk/code-editor-vue3/addon/hint/javascript-hint.js +162 -0
  30. package/theme-chalk/code-editor-vue3/addon/hint/show-hint.css +37 -0
  31. package/theme-chalk/code-editor-vue3/addon/hint/show-hint.js +523 -0
  32. package/theme-chalk/code-editor-vue3/addon/hint/sql-hint.js +304 -0
  33. package/theme-chalk/code-editor-vue3/addon/hint/xml-hint.js +132 -0
  34. package/theme-chalk/code-editor-vue3/addon/lint/coffeescript-lint.js +47 -0
  35. package/theme-chalk/code-editor-vue3/addon/lint/css-lint.js +40 -0
  36. package/theme-chalk/code-editor-vue3/addon/lint/html-lint.js +59 -0
  37. package/theme-chalk/code-editor-vue3/addon/lint/javascript-lint.js +65 -0
  38. package/theme-chalk/code-editor-vue3/addon/lint/json-lint.js +40 -0
  39. package/theme-chalk/code-editor-vue3/addon/lint/lint.css +79 -0
  40. package/theme-chalk/code-editor-vue3/addon/lint/lint.js +288 -0
  41. package/theme-chalk/code-editor-vue3/addon/lint/yaml-lint.js +41 -0
  42. package/theme-chalk/code-editor-vue3/addon/merge/merge.css +119 -0
  43. package/theme-chalk/code-editor-vue3/addon/merge/merge.js +1018 -0
  44. package/theme-chalk/code-editor-vue3/addon/mode/loadmode.js +66 -0
  45. package/theme-chalk/code-editor-vue3/addon/mode/multiplex.js +136 -0
  46. package/theme-chalk/code-editor-vue3/addon/mode/multiplex_test.js +49 -0
  47. package/theme-chalk/code-editor-vue3/addon/mode/overlay.js +90 -0
  48. package/theme-chalk/code-editor-vue3/addon/mode/simple.js +216 -0
  49. package/theme-chalk/code-editor-vue3/addon/runmode/colorize.js +40 -0
  50. package/theme-chalk/code-editor-vue3/addon/runmode/runmode-standalone.js +334 -0
  51. package/theme-chalk/code-editor-vue3/addon/runmode/runmode.js +76 -0
  52. package/theme-chalk/code-editor-vue3/addon/runmode/runmode.node.js +329 -0
  53. package/theme-chalk/code-editor-vue3/addon/scroll/annotatescrollbar.js +128 -0
  54. package/theme-chalk/code-editor-vue3/addon/scroll/scrollpastend.js +48 -0
  55. package/theme-chalk/code-editor-vue3/addon/scroll/simplescrollbars.css +66 -0
  56. package/theme-chalk/code-editor-vue3/addon/scroll/simplescrollbars.js +152 -0
  57. package/theme-chalk/code-editor-vue3/addon/search/jump-to-line.js +53 -0
  58. package/theme-chalk/code-editor-vue3/addon/search/match-highlighter.js +167 -0
  59. package/theme-chalk/code-editor-vue3/addon/search/matchesonscrollbar.css +8 -0
  60. package/theme-chalk/code-editor-vue3/addon/search/matchesonscrollbar.js +97 -0
  61. package/theme-chalk/code-editor-vue3/addon/search/search.js +295 -0
  62. package/theme-chalk/code-editor-vue3/addon/search/searchcursor.js +305 -0
  63. package/theme-chalk/code-editor-vue3/addon/selection/active-line.js +72 -0
  64. package/theme-chalk/code-editor-vue3/addon/selection/mark-selection.js +119 -0
  65. package/theme-chalk/code-editor-vue3/addon/selection/selection-pointer.js +98 -0
  66. package/theme-chalk/code-editor-vue3/addon/tern/tern.css +87 -0
  67. package/theme-chalk/code-editor-vue3/addon/tern/tern.js +756 -0
  68. package/theme-chalk/code-editor-vue3/addon/tern/worker.js +44 -0
  69. package/theme-chalk/code-editor-vue3/addon/wrap/hardwrap.js +160 -0
  70. package/theme-chalk/code-editor-vue3/lib/codemirror.css +344 -0
  71. package/theme-chalk/code-editor-vue3/lib/codemirror.js +9884 -0
  72. package/theme-chalk/code-editor-vue3/mode/apl/apl.js +174 -0
  73. package/theme-chalk/code-editor-vue3/mode/asciiarmor/asciiarmor.js +74 -0
  74. package/theme-chalk/code-editor-vue3/mode/asn.1/asn.1.js +204 -0
  75. package/theme-chalk/code-editor-vue3/mode/asterisk/asterisk.js +220 -0
  76. package/theme-chalk/code-editor-vue3/mode/brainfuck/brainfuck.js +85 -0
  77. package/theme-chalk/code-editor-vue3/mode/clike/clike.js +942 -0
  78. package/theme-chalk/code-editor-vue3/mode/clojure/clojure.js +293 -0
  79. package/theme-chalk/code-editor-vue3/mode/cmake/cmake.js +97 -0
  80. package/theme-chalk/code-editor-vue3/mode/cobol/cobol.js +255 -0
  81. package/theme-chalk/code-editor-vue3/mode/coffeescript/coffeescript.js +359 -0
  82. package/theme-chalk/code-editor-vue3/mode/commonlisp/commonlisp.js +125 -0
  83. package/theme-chalk/code-editor-vue3/mode/crystal/crystal.js +433 -0
  84. package/theme-chalk/code-editor-vue3/mode/cypher/cypher.js +152 -0
  85. package/theme-chalk/code-editor-vue3/mode/d/d.js +223 -0
  86. package/theme-chalk/code-editor-vue3/mode/dart/dart.js +168 -0
  87. package/theme-chalk/code-editor-vue3/mode/diff/diff.js +47 -0
  88. package/theme-chalk/code-editor-vue3/mode/django/django.js +356 -0
  89. package/theme-chalk/code-editor-vue3/mode/dockerfile/dockerfile.js +211 -0
  90. package/theme-chalk/code-editor-vue3/mode/dtd/dtd.js +142 -0
  91. package/theme-chalk/code-editor-vue3/mode/dylan/dylan.js +352 -0
  92. package/theme-chalk/code-editor-vue3/mode/ebnf/ebnf.js +195 -0
  93. package/theme-chalk/code-editor-vue3/mode/ecl/ecl.js +206 -0
  94. package/theme-chalk/code-editor-vue3/mode/eiffel/eiffel.js +160 -0
  95. package/theme-chalk/code-editor-vue3/mode/elm/elm.js +245 -0
  96. package/theme-chalk/code-editor-vue3/mode/erlang/erlang.js +619 -0
  97. package/theme-chalk/code-editor-vue3/mode/factor/factor.js +85 -0
  98. package/theme-chalk/code-editor-vue3/mode/fcl/fcl.js +173 -0
  99. package/theme-chalk/code-editor-vue3/mode/forth/forth.js +180 -0
  100. package/theme-chalk/code-editor-vue3/mode/fortran/fortran.js +188 -0
  101. package/theme-chalk/code-editor-vue3/mode/gas/gas.js +353 -0
  102. package/theme-chalk/code-editor-vue3/mode/gfm/gfm.js +129 -0
  103. package/theme-chalk/code-editor-vue3/mode/gherkin/gherkin.js +178 -0
  104. package/theme-chalk/code-editor-vue3/mode/go/go.js +187 -0
  105. package/theme-chalk/code-editor-vue3/mode/groovy/groovy.js +245 -0
  106. package/theme-chalk/code-editor-vue3/mode/haml/haml.js +161 -0
  107. package/theme-chalk/code-editor-vue3/mode/handlebars/handlebars.js +70 -0
  108. package/theme-chalk/code-editor-vue3/mode/haskell/haskell.js +268 -0
  109. package/theme-chalk/code-editor-vue3/mode/haskell-literate/haskell-literate.js +43 -0
  110. package/theme-chalk/code-editor-vue3/mode/haxe/haxe.js +515 -0
  111. package/theme-chalk/code-editor-vue3/mode/htmlmixed/htmlmixed.js +153 -0
  112. package/theme-chalk/code-editor-vue3/mode/http/http.js +113 -0
  113. package/theme-chalk/code-editor-vue3/mode/idl/idl.js +290 -0
  114. package/theme-chalk/code-editor-vue3/mode/jinja2/jinja2.js +193 -0
  115. package/theme-chalk/code-editor-vue3/mode/julia/julia.js +390 -0
  116. package/theme-chalk/code-editor-vue3/mode/livescript/livescript.js +280 -0
  117. package/theme-chalk/code-editor-vue3/mode/lua/lua.js +160 -0
  118. package/theme-chalk/code-editor-vue3/mode/markdown/markdown.js +886 -0
  119. package/theme-chalk/code-editor-vue3/mode/mathematica/mathematica.js +176 -0
  120. package/theme-chalk/code-editor-vue3/mode/mbox/mbox.js +129 -0
  121. package/theme-chalk/code-editor-vue3/mode/meta.js +221 -0
  122. package/theme-chalk/code-editor-vue3/mode/mirc/mirc.js +193 -0
  123. package/theme-chalk/code-editor-vue3/mode/mllike/mllike.js +359 -0
  124. package/theme-chalk/code-editor-vue3/mode/modelica/modelica.js +245 -0
  125. package/theme-chalk/code-editor-vue3/mode/mscgen/mscgen.js +175 -0
  126. package/theme-chalk/code-editor-vue3/mode/mumps/mumps.js +148 -0
  127. package/theme-chalk/code-editor-vue3/mode/nginx/nginx.js +178 -0
  128. package/theme-chalk/code-editor-vue3/mode/nsis/nsis.js +95 -0
  129. package/theme-chalk/code-editor-vue3/mode/ntriples/ntriples.js +195 -0
  130. package/theme-chalk/code-editor-vue3/mode/octave/octave.js +139 -0
  131. package/theme-chalk/code-editor-vue3/mode/oz/oz.js +252 -0
  132. package/theme-chalk/code-editor-vue3/mode/pascal/pascal.js +136 -0
  133. package/theme-chalk/code-editor-vue3/mode/pegjs/pegjs.js +111 -0
  134. package/theme-chalk/code-editor-vue3/mode/perl/perl.js +836 -0
  135. package/theme-chalk/code-editor-vue3/mode/php/php.js +234 -0
  136. package/theme-chalk/code-editor-vue3/mode/pig/pig.js +178 -0
  137. package/theme-chalk/code-editor-vue3/mode/powershell/powershell.js +398 -0
  138. package/theme-chalk/code-editor-vue3/mode/properties/properties.js +78 -0
  139. package/theme-chalk/code-editor-vue3/mode/protobuf/protobuf.js +72 -0
  140. package/theme-chalk/code-editor-vue3/mode/pug/pug.js +591 -0
  141. package/theme-chalk/code-editor-vue3/mode/puppet/puppet.js +220 -0
  142. package/theme-chalk/code-editor-vue3/mode/python/python.js +402 -0
  143. package/theme-chalk/code-editor-vue3/mode/q/q.js +139 -0
  144. package/theme-chalk/code-editor-vue3/mode/r/r.js +190 -0
  145. package/theme-chalk/code-editor-vue3/mode/rpm/changes/index.html +66 -0
  146. package/theme-chalk/code-editor-vue3/mode/rpm/rpm.js +109 -0
  147. package/theme-chalk/code-editor-vue3/mode/rst/rst.js +557 -0
  148. package/theme-chalk/code-editor-vue3/mode/ruby/ruby.js +303 -0
  149. package/theme-chalk/code-editor-vue3/mode/rust/rust.js +72 -0
  150. package/theme-chalk/code-editor-vue3/mode/sas/sas.js +303 -0
  151. package/theme-chalk/code-editor-vue3/mode/sass/sass.js +459 -0
  152. package/theme-chalk/code-editor-vue3/mode/scheme/scheme.js +284 -0
  153. package/theme-chalk/code-editor-vue3/mode/shell/shell.js +168 -0
  154. package/theme-chalk/code-editor-vue3/mode/sieve/sieve.js +193 -0
  155. package/theme-chalk/code-editor-vue3/mode/slim/slim.js +575 -0
  156. package/theme-chalk/code-editor-vue3/mode/smalltalk/smalltalk.js +168 -0
  157. package/theme-chalk/code-editor-vue3/mode/smarty/smarty.js +225 -0
  158. package/theme-chalk/code-editor-vue3/mode/solr/solr.js +104 -0
  159. package/theme-chalk/code-editor-vue3/mode/soy/soy.js +665 -0
  160. package/theme-chalk/code-editor-vue3/mode/sparql/sparql.js +184 -0
  161. package/theme-chalk/code-editor-vue3/mode/spreadsheet/spreadsheet.js +112 -0
  162. package/theme-chalk/code-editor-vue3/mode/sql/sql.js +525 -0
  163. package/theme-chalk/code-editor-vue3/mode/stex/stex.js +264 -0
  164. package/theme-chalk/code-editor-vue3/mode/stylus/stylus.js +775 -0
  165. package/theme-chalk/code-editor-vue3/mode/swift/swift.js +221 -0
  166. package/theme-chalk/code-editor-vue3/mode/tcl/tcl.js +140 -0
  167. package/theme-chalk/code-editor-vue3/mode/textile/textile.js +469 -0
  168. package/theme-chalk/code-editor-vue3/mode/tiddlywiki/tiddlywiki.css +14 -0
  169. package/theme-chalk/code-editor-vue3/mode/tiddlywiki/tiddlywiki.js +308 -0
  170. package/theme-chalk/code-editor-vue3/mode/tiki/tiki.css +26 -0
  171. package/theme-chalk/code-editor-vue3/mode/tiki/tiki.js +312 -0
  172. package/theme-chalk/code-editor-vue3/mode/toml/toml.js +88 -0
  173. package/theme-chalk/code-editor-vue3/mode/tornado/tornado.js +68 -0
  174. package/theme-chalk/code-editor-vue3/mode/troff/troff.js +84 -0
  175. package/theme-chalk/code-editor-vue3/mode/ttcn/ttcn.js +283 -0
  176. package/theme-chalk/code-editor-vue3/mode/ttcn-cfg/ttcn-cfg.js +214 -0
  177. package/theme-chalk/code-editor-vue3/mode/turtle/turtle.js +162 -0
  178. package/theme-chalk/code-editor-vue3/mode/twig/twig.js +141 -0
  179. package/theme-chalk/code-editor-vue3/mode/vb/vb.js +275 -0
  180. package/theme-chalk/code-editor-vue3/mode/vbscript/vbscript.js +350 -0
  181. package/theme-chalk/code-editor-vue3/mode/velocity/velocity.js +202 -0
  182. package/theme-chalk/code-editor-vue3/mode/verilog/verilog.js +781 -0
  183. package/theme-chalk/code-editor-vue3/mode/vhdl/vhdl.js +189 -0
  184. package/theme-chalk/code-editor-vue3/mode/wast/wast.js +132 -0
  185. package/theme-chalk/code-editor-vue3/mode/webidl/webidl.js +195 -0
  186. package/theme-chalk/code-editor-vue3/mode/xml/xml.js +417 -0
  187. package/theme-chalk/code-editor-vue3/mode/xquery/xquery.js +448 -0
  188. package/theme-chalk/code-editor-vue3/mode/yacas/yacas.js +204 -0
  189. package/theme-chalk/code-editor-vue3/mode/yaml/yaml.js +120 -0
  190. package/theme-chalk/code-editor-vue3/mode/yaml-frontmatter/yaml-frontmatter.js +72 -0
  191. package/theme-chalk/code-editor-vue3/mode/z80/z80.js +116 -0
@@ -0,0 +1,79 @@
1
+ /* The lint marker gutter */
2
+ .CodeMirror-lint-markers {
3
+ width: 16px;
4
+ }
5
+
6
+ .CodeMirror-lint-tooltip {
7
+ background-color: #ffd;
8
+ border: 1px solid black;
9
+ border-radius: 4px 4px 4px 4px;
10
+ color: black;
11
+ font-family: monospace;
12
+ font-size: 10pt;
13
+ overflow: hidden;
14
+ padding: 2px 5px;
15
+ position: fixed;
16
+ white-space: pre;
17
+ white-space: pre-wrap;
18
+ z-index: 100;
19
+ max-width: 600px;
20
+ opacity: 0;
21
+ transition: opacity .4s;
22
+ -moz-transition: opacity .4s;
23
+ -webkit-transition: opacity .4s;
24
+ -o-transition: opacity .4s;
25
+ -ms-transition: opacity .4s;
26
+ }
27
+
28
+ .CodeMirror-lint-mark {
29
+ background-position: left bottom;
30
+ background-repeat: repeat-x;
31
+ }
32
+
33
+ .CodeMirror-lint-mark-warning {
34
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
35
+ }
36
+
37
+ .CodeMirror-lint-mark-error {
38
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==");
39
+ }
40
+
41
+ .CodeMirror-lint-marker {
42
+ background-position: center center;
43
+ background-repeat: no-repeat;
44
+ cursor: pointer;
45
+ display: inline-block;
46
+ height: 16px;
47
+ width: 16px;
48
+ vertical-align: middle;
49
+ position: relative;
50
+ }
51
+
52
+ .CodeMirror-lint-message {
53
+ padding-left: 18px;
54
+ background-position: top left;
55
+ background-repeat: no-repeat;
56
+ }
57
+
58
+ .CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {
59
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=");
60
+ }
61
+
62
+ .CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {
63
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=");
64
+ }
65
+
66
+ .CodeMirror-lint-marker-multiple {
67
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");
68
+ background-repeat: no-repeat;
69
+ background-position: right bottom;
70
+ width: 100%; height: 100%;
71
+ }
72
+
73
+ .CodeMirror-lint-line-error {
74
+ background-color: rgba(183, 76, 81, 0.08);
75
+ }
76
+
77
+ .CodeMirror-lint-line-warning {
78
+ background-color: rgba(255, 211, 0, 0.1);
79
+ }
@@ -0,0 +1,288 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: https://codemirror.net/5/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+ var GUTTER_ID = "CodeMirror-lint-markers";
14
+ var LINT_LINE_ID = "CodeMirror-lint-line-";
15
+
16
+ function showTooltip(cm, e, content) {
17
+ var tt = document.createElement("div");
18
+ tt.className = "CodeMirror-lint-tooltip cm-s-" + cm.options.theme;
19
+ tt.appendChild(content.cloneNode(true));
20
+ if (cm.state.lint.options.selfContain)
21
+ cm.getWrapperElement().appendChild(tt);
22
+ else
23
+ document.body.appendChild(tt);
24
+
25
+ function position(e) {
26
+ if (!tt.parentNode) return CodeMirror.off(document, "mousemove", position);
27
+ var top = Math.max(0, e.clientY - tt.offsetHeight - 5);
28
+ var left = Math.max(0, Math.min(e.clientX + 5, tt.ownerDocument.defaultView.innerWidth - tt.offsetWidth));
29
+ tt.style.top = top + "px"
30
+ tt.style.left = left + "px";
31
+ }
32
+ CodeMirror.on(document, "mousemove", position);
33
+ position(e);
34
+ if (tt.style.opacity != null) tt.style.opacity = 1;
35
+ return tt;
36
+ }
37
+ function rm(elt) {
38
+ if (elt.parentNode) elt.parentNode.removeChild(elt);
39
+ }
40
+ function hideTooltip(tt) {
41
+ if (!tt.parentNode) return;
42
+ if (tt.style.opacity == null) rm(tt);
43
+ tt.style.opacity = 0;
44
+ setTimeout(function() { rm(tt); }, 600);
45
+ }
46
+
47
+ function showTooltipFor(cm, e, content, node) {
48
+ var tooltip = showTooltip(cm, e, content);
49
+ function hide() {
50
+ CodeMirror.off(node, "mouseout", hide);
51
+ if (tooltip) { hideTooltip(tooltip); tooltip = null; }
52
+ }
53
+ var poll = setInterval(function() {
54
+ if (tooltip) for (var n = node;; n = n.parentNode) {
55
+ if (n && n.nodeType == 11) n = n.host;
56
+ if (n == document.body) return;
57
+ if (!n) { hide(); break; }
58
+ }
59
+ if (!tooltip) return clearInterval(poll);
60
+ }, 400);
61
+ CodeMirror.on(node, "mouseout", hide);
62
+ }
63
+
64
+ function LintState(cm, conf, hasGutter) {
65
+ this.marked = [];
66
+ if (conf instanceof Function) conf = {getAnnotations: conf};
67
+ if (!conf || conf === true) conf = {};
68
+ this.options = {};
69
+ this.linterOptions = conf.options || {};
70
+ for (var prop in defaults) this.options[prop] = defaults[prop];
71
+ for (var prop in conf) {
72
+ if (defaults.hasOwnProperty(prop)) {
73
+ if (conf[prop] != null) this.options[prop] = conf[prop];
74
+ } else if (!conf.options) {
75
+ this.linterOptions[prop] = conf[prop];
76
+ }
77
+ }
78
+ this.timeout = null;
79
+ this.hasGutter = hasGutter;
80
+ this.onMouseOver = function(e) { onMouseOver(cm, e); };
81
+ this.waitingFor = 0
82
+ }
83
+
84
+ var defaults = {
85
+ highlightLines: false,
86
+ tooltips: true,
87
+ delay: 500,
88
+ lintOnChange: true,
89
+ getAnnotations: null,
90
+ async: false,
91
+ selfContain: null,
92
+ formatAnnotation: null,
93
+ onUpdateLinting: null
94
+ }
95
+
96
+ function clearMarks(cm) {
97
+ var state = cm.state.lint;
98
+ if (state.hasGutter) cm.clearGutter(GUTTER_ID);
99
+ if (state.options.highlightLines) clearErrorLines(cm);
100
+ for (var i = 0; i < state.marked.length; ++i)
101
+ state.marked[i].clear();
102
+ state.marked.length = 0;
103
+ }
104
+
105
+ function clearErrorLines(cm) {
106
+ cm.eachLine(function(line) {
107
+ var has = line.wrapClass && /\bCodeMirror-lint-line-\w+\b/.exec(line.wrapClass);
108
+ if (has) cm.removeLineClass(line, "wrap", has[0]);
109
+ })
110
+ }
111
+
112
+ function makeMarker(cm, labels, severity, multiple, tooltips) {
113
+ var marker = document.createElement("div"), inner = marker;
114
+ marker.className = "CodeMirror-lint-marker CodeMirror-lint-marker-" + severity;
115
+ if (multiple) {
116
+ inner = marker.appendChild(document.createElement("div"));
117
+ inner.className = "CodeMirror-lint-marker CodeMirror-lint-marker-multiple";
118
+ }
119
+
120
+ if (tooltips != false) CodeMirror.on(inner, "mouseover", function(e) {
121
+ showTooltipFor(cm, e, labels, inner);
122
+ });
123
+
124
+ return marker;
125
+ }
126
+
127
+ function getMaxSeverity(a, b) {
128
+ if (a == "error") return a;
129
+ else return b;
130
+ }
131
+
132
+ function groupByLine(annotations) {
133
+ var lines = [];
134
+ for (var i = 0; i < annotations.length; ++i) {
135
+ var ann = annotations[i], line = ann.from.line;
136
+ (lines[line] || (lines[line] = [])).push(ann);
137
+ }
138
+ return lines;
139
+ }
140
+
141
+ function annotationTooltip(ann) {
142
+ var severity = ann.severity;
143
+ if (!severity) severity = "error";
144
+ var tip = document.createElement("div");
145
+ tip.className = "CodeMirror-lint-message CodeMirror-lint-message-" + severity;
146
+ if (typeof ann.messageHTML != 'undefined') {
147
+ tip.innerHTML = ann.messageHTML;
148
+ } else {
149
+ tip.appendChild(document.createTextNode(ann.message));
150
+ }
151
+ return tip;
152
+ }
153
+
154
+ function lintAsync(cm, getAnnotations) {
155
+ var state = cm.state.lint
156
+ var id = ++state.waitingFor
157
+ function abort() {
158
+ id = -1
159
+ cm.off("change", abort)
160
+ }
161
+ cm.on("change", abort)
162
+ getAnnotations(cm.getValue(), function(annotations, arg2) {
163
+ cm.off("change", abort)
164
+ if (state.waitingFor != id) return
165
+ if (arg2 && annotations instanceof CodeMirror) annotations = arg2
166
+ cm.operation(function() {updateLinting(cm, annotations)})
167
+ }, state.linterOptions, cm);
168
+ }
169
+
170
+ function startLinting(cm) {
171
+ var state = cm.state.lint;
172
+ if (!state) return;
173
+ var options = state.options;
174
+ /*
175
+ * Passing rules in `options` property prevents JSHint (and other linters) from complaining
176
+ * about unrecognized rules like `onUpdateLinting`, `delay`, `lintOnChange`, etc.
177
+ */
178
+ var getAnnotations = options.getAnnotations || cm.getHelper(CodeMirror.Pos(0, 0), "lint");
179
+ if (!getAnnotations) return;
180
+ if (options.async || getAnnotations.async) {
181
+ lintAsync(cm, getAnnotations)
182
+ } else {
183
+ var annotations = getAnnotations(cm.getValue(), state.linterOptions, cm);
184
+ if (!annotations) return;
185
+ if (annotations.then) annotations.then(function(issues) {
186
+ cm.operation(function() {updateLinting(cm, issues)})
187
+ });
188
+ else cm.operation(function() {updateLinting(cm, annotations)})
189
+ }
190
+ }
191
+
192
+ function updateLinting(cm, annotationsNotSorted) {
193
+ var state = cm.state.lint;
194
+ if (!state) return;
195
+ var options = state.options;
196
+ clearMarks(cm);
197
+
198
+ var annotations = groupByLine(annotationsNotSorted);
199
+
200
+ for (var line = 0; line < annotations.length; ++line) {
201
+ var anns = annotations[line];
202
+ if (!anns) continue;
203
+
204
+ var maxSeverity = null;
205
+ var tipLabel = state.hasGutter && document.createDocumentFragment();
206
+
207
+ for (var i = 0; i < anns.length; ++i) {
208
+ var ann = anns[i];
209
+ var severity = ann.severity;
210
+ if (!severity) severity = "error";
211
+ maxSeverity = getMaxSeverity(maxSeverity, severity);
212
+
213
+ if (options.formatAnnotation) ann = options.formatAnnotation(ann);
214
+ if (state.hasGutter) tipLabel.appendChild(annotationTooltip(ann));
215
+
216
+ if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, {
217
+ className: "CodeMirror-lint-mark CodeMirror-lint-mark-" + severity,
218
+ __annotation: ann
219
+ }));
220
+ }
221
+ if (state.hasGutter)
222
+ cm.setGutterMarker(line, GUTTER_ID, makeMarker(cm, tipLabel, maxSeverity, anns.length > 1,
223
+ options.tooltips));
224
+
225
+ if (options.highlightLines)
226
+ cm.addLineClass(line, "wrap", LINT_LINE_ID + maxSeverity);
227
+ }
228
+ if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, annotations, cm);
229
+ }
230
+
231
+ function onChange(cm) {
232
+ var state = cm.state.lint;
233
+ if (!state) return;
234
+ clearTimeout(state.timeout);
235
+ state.timeout = setTimeout(function(){startLinting(cm);}, state.options.delay);
236
+ }
237
+
238
+ function popupTooltips(cm, annotations, e) {
239
+ var target = e.target || e.srcElement;
240
+ var tooltip = document.createDocumentFragment();
241
+ for (var i = 0; i < annotations.length; i++) {
242
+ var ann = annotations[i];
243
+ tooltip.appendChild(annotationTooltip(ann));
244
+ }
245
+ showTooltipFor(cm, e, tooltip, target);
246
+ }
247
+
248
+ function onMouseOver(cm, e) {
249
+ var target = e.target || e.srcElement;
250
+ if (!/\bCodeMirror-lint-mark-/.test(target.className)) return;
251
+ var box = target.getBoundingClientRect(), x = (box.left + box.right) / 2, y = (box.top + box.bottom) / 2;
252
+ var spans = cm.findMarksAt(cm.coordsChar({left: x, top: y}, "client"));
253
+
254
+ var annotations = [];
255
+ for (var i = 0; i < spans.length; ++i) {
256
+ var ann = spans[i].__annotation;
257
+ if (ann) annotations.push(ann);
258
+ }
259
+ if (annotations.length) popupTooltips(cm, annotations, e);
260
+ }
261
+
262
+ CodeMirror.defineOption("lint", false, function(cm, val, old) {
263
+ if (old && old != CodeMirror.Init) {
264
+ clearMarks(cm);
265
+ if (cm.state.lint.options.lintOnChange !== false)
266
+ cm.off("change", onChange);
267
+ CodeMirror.off(cm.getWrapperElement(), "mouseover", cm.state.lint.onMouseOver);
268
+ clearTimeout(cm.state.lint.timeout);
269
+ delete cm.state.lint;
270
+ }
271
+
272
+ if (val) {
273
+ var gutters = cm.getOption("gutters"), hasLintGutter = false;
274
+ for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true;
275
+ var state = cm.state.lint = new LintState(cm, val, hasLintGutter);
276
+ if (state.options.lintOnChange)
277
+ cm.on("change", onChange);
278
+ if (state.options.tooltips != false && state.options.tooltips != "gutter")
279
+ CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver);
280
+
281
+ startLinting(cm);
282
+ }
283
+ });
284
+
285
+ CodeMirror.defineExtension("performLint", function() {
286
+ startLinting(this);
287
+ });
288
+ });
@@ -0,0 +1,41 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: https://codemirror.net/5/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+
14
+ // Depends on js-yaml.js from https://github.com/nodeca/js-yaml
15
+
16
+ // declare global: jsyaml
17
+
18
+ CodeMirror.registerHelper("lint", "yaml", function(text) {
19
+ var found = [];
20
+ if (!window.jsyaml) {
21
+ if (window.console) {
22
+ window.console.error("Error: window.jsyaml not defined, CodeMirror YAML linting cannot run.");
23
+ }
24
+ return found;
25
+ }
26
+ try { jsyaml.loadAll(text); }
27
+ catch(e) {
28
+ var loc = e.mark,
29
+ // js-yaml YAMLException doesn't always provide an accurate lineno
30
+ // e.g., when there are multiple yaml docs
31
+ // ---
32
+ // ---
33
+ // foo:bar
34
+ from = loc ? CodeMirror.Pos(loc.line, loc.column) : CodeMirror.Pos(0, 0),
35
+ to = from;
36
+ found.push({ from: from, to: to, message: e.message });
37
+ }
38
+ return found;
39
+ });
40
+
41
+ });
@@ -0,0 +1,119 @@
1
+ .CodeMirror-merge {
2
+ position: relative;
3
+ border: 1px solid #ddd;
4
+ white-space: pre;
5
+ }
6
+
7
+ .CodeMirror-merge, .CodeMirror-merge .CodeMirror {
8
+ height: 350px;
9
+ }
10
+
11
+ .CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 47%; }
12
+ .CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 6%; }
13
+ .CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; }
14
+ .CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; }
15
+
16
+ .CodeMirror-merge-pane {
17
+ display: inline-block;
18
+ white-space: normal;
19
+ vertical-align: top;
20
+ }
21
+ .CodeMirror-merge-pane-rightmost {
22
+ position: absolute;
23
+ right: 0px;
24
+ z-index: 1;
25
+ }
26
+
27
+ .CodeMirror-merge-gap {
28
+ z-index: 2;
29
+ display: inline-block;
30
+ height: 100%;
31
+ -moz-box-sizing: border-box;
32
+ box-sizing: border-box;
33
+ overflow: hidden;
34
+ border-left: 1px solid #ddd;
35
+ border-right: 1px solid #ddd;
36
+ position: relative;
37
+ background: #f8f8f8;
38
+ }
39
+
40
+ .CodeMirror-merge-scrolllock-wrap {
41
+ position: absolute;
42
+ bottom: 0; left: 50%;
43
+ }
44
+ .CodeMirror-merge-scrolllock {
45
+ position: relative;
46
+ left: -50%;
47
+ cursor: pointer;
48
+ color: #555;
49
+ line-height: 1;
50
+ }
51
+ .CodeMirror-merge-scrolllock:after {
52
+ content: "\21db\00a0\00a0\21da";
53
+ }
54
+ .CodeMirror-merge-scrolllock.CodeMirror-merge-scrolllock-enabled:after {
55
+ content: "\21db\21da";
56
+ }
57
+
58
+ .CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right {
59
+ position: absolute;
60
+ left: 0; top: 0;
61
+ right: 0; bottom: 0;
62
+ line-height: 1;
63
+ }
64
+
65
+ .CodeMirror-merge-copy {
66
+ position: absolute;
67
+ cursor: pointer;
68
+ color: #44c;
69
+ z-index: 3;
70
+ }
71
+
72
+ .CodeMirror-merge-copy-reverse {
73
+ position: absolute;
74
+ cursor: pointer;
75
+ color: #44c;
76
+ }
77
+
78
+ .CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }
79
+ .CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }
80
+
81
+ .CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted {
82
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);
83
+ background-position: bottom left;
84
+ background-repeat: repeat-x;
85
+ }
86
+
87
+ .CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted {
88
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);
89
+ background-position: bottom left;
90
+ background-repeat: repeat-x;
91
+ }
92
+
93
+ .CodeMirror-merge-r-chunk { background: #ffffe0; }
94
+ .CodeMirror-merge-r-chunk-start { border-top: 1px solid #ee8; }
95
+ .CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #ee8; }
96
+ .CodeMirror-merge-r-connect { fill: #ffffe0; stroke: #ee8; stroke-width: 1px; }
97
+
98
+ .CodeMirror-merge-l-chunk { background: #eef; }
99
+ .CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; }
100
+ .CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; }
101
+ .CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; }
102
+
103
+ .CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }
104
+ .CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }
105
+ .CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }
106
+
107
+ .CodeMirror-merge-collapsed-widget:before {
108
+ content: "(...)";
109
+ }
110
+ .CodeMirror-merge-collapsed-widget {
111
+ cursor: pointer;
112
+ color: #88b;
113
+ background: #eef;
114
+ border: 1px solid #ddf;
115
+ font-size: 90%;
116
+ padding: 0 3px;
117
+ border-radius: 4px;
118
+ }
119
+ .CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }