ace-rails-ap 4.2 → 4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ace/rails/version.rb +1 -1
  3. data/update.sh +1 -1
  4. data/vendor/assets/javascripts/ace/ace.js +661 -160
  5. data/vendor/assets/javascripts/ace/ext-beautify.js +1 -0
  6. data/vendor/assets/javascripts/ace/ext-emmet.js +314 -218
  7. data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +37 -32
  8. data/vendor/assets/javascripts/ace/ext-language_tools.js +362 -225
  9. data/vendor/assets/javascripts/ace/ext-linking.js +1 -1
  10. data/vendor/assets/javascripts/ace/ext-modelist.js +6 -2
  11. data/vendor/assets/javascripts/ace/ext-options.js +45 -34
  12. data/vendor/assets/javascripts/ace/ext-prompt.js +2764 -0
  13. data/vendor/assets/javascripts/ace/ext-rtl.js +1 -3
  14. data/vendor/assets/javascripts/ace/ext-settings_menu.js +49 -38
  15. data/vendor/assets/javascripts/ace/ext-statusbar.js +2 -2
  16. data/vendor/assets/javascripts/ace/ext-whitespace.js +4 -0
  17. data/vendor/assets/javascripts/ace/keybinding-emacs.js +1 -0
  18. data/vendor/assets/javascripts/ace/keybinding-vim.js +296 -66
  19. data/vendor/assets/javascripts/ace/mode-aql.js +102 -0
  20. data/vendor/assets/javascripts/ace/mode-autohotkey.js +3 -1
  21. data/vendor/assets/javascripts/ace/mode-cirru.js +2 -2
  22. data/vendor/assets/javascripts/ace/mode-crystal.js +642 -0
  23. data/vendor/assets/javascripts/ace/mode-csound_document.js +42 -29
  24. data/vendor/assets/javascripts/ace/mode-csound_orchestra.js +35 -25
  25. data/vendor/assets/javascripts/ace/mode-csound_score.js +29 -21
  26. data/vendor/assets/javascripts/ace/mode-fsharp.js +2 -2
  27. data/vendor/assets/javascripts/ace/mode-gherkin.js +0 -2
  28. data/vendor/assets/javascripts/ace/mode-gobstones.js +252 -94
  29. data/vendor/assets/javascripts/ace/mode-io.js +1 -7
  30. data/vendor/assets/javascripts/ace/mode-jade.js +1 -1
  31. data/vendor/assets/javascripts/ace/mode-lua.js +30 -10
  32. data/vendor/assets/javascripts/ace/mode-luapage.js +30 -10
  33. data/vendor/assets/javascripts/ace/mode-lucene.js +77 -9
  34. data/vendor/assets/javascripts/ace/mode-markdown.js +2 -1
  35. data/vendor/assets/javascripts/ace/mode-mask.js +1 -1
  36. data/vendor/assets/javascripts/ace/mode-nginx.js +298 -0
  37. data/vendor/assets/javascripts/ace/mode-nim.js +363 -0
  38. data/vendor/assets/javascripts/ace/mode-pascal.js +84 -66
  39. data/vendor/assets/javascripts/ace/mode-php.js +1 -1
  40. data/vendor/assets/javascripts/ace/mode-php_laravel_blade.js +1 -1
  41. data/vendor/assets/javascripts/ace/mode-puppet.js +3 -3
  42. data/vendor/assets/javascripts/ace/mode-slim.js +2 -1
  43. data/vendor/assets/javascripts/ace/mode-tcl.js +3 -0
  44. data/vendor/assets/javascripts/ace/mode-terraform.js +4 -4
  45. data/vendor/assets/javascripts/ace/mode-yaml.js +44 -13
  46. data/vendor/assets/javascripts/ace/mode-zeek.js +539 -0
  47. data/vendor/assets/javascripts/ace/snippets/abap.js +8 -1
  48. data/vendor/assets/javascripts/ace/snippets/abc.js +8 -1
  49. data/vendor/assets/javascripts/ace/snippets/actionscript.js +8 -1
  50. data/vendor/assets/javascripts/ace/snippets/ada.js +8 -1
  51. data/vendor/assets/javascripts/ace/snippets/apache_conf.js +8 -1
  52. data/vendor/assets/javascripts/ace/snippets/apex.js +14 -0
  53. data/vendor/assets/javascripts/ace/snippets/applescript.js +8 -1
  54. data/vendor/assets/javascripts/ace/snippets/aql.js +14 -0
  55. data/vendor/assets/javascripts/ace/snippets/asciidoc.js +8 -1
  56. data/vendor/assets/javascripts/ace/snippets/asl.js +13 -0
  57. data/vendor/assets/javascripts/ace/snippets/assembly_x86.js +8 -1
  58. data/vendor/assets/javascripts/ace/snippets/autohotkey.js +8 -1
  59. data/vendor/assets/javascripts/ace/snippets/batchfile.js +8 -1
  60. data/vendor/assets/javascripts/ace/snippets/bro.js +8 -1
  61. data/vendor/assets/javascripts/ace/snippets/c9search.js +8 -1
  62. data/vendor/assets/javascripts/ace/snippets/c_cpp.js +8 -1
  63. data/vendor/assets/javascripts/ace/snippets/cirru.js +8 -1
  64. data/vendor/assets/javascripts/ace/snippets/clojure.js +8 -1
  65. data/vendor/assets/javascripts/ace/snippets/cobol.js +8 -1
  66. data/vendor/assets/javascripts/ace/snippets/coffee.js +8 -1
  67. data/vendor/assets/javascripts/ace/snippets/coldfusion.js +8 -1
  68. data/vendor/assets/javascripts/ace/snippets/crystal.js +14 -0
  69. data/vendor/assets/javascripts/ace/snippets/csharp.js +8 -1
  70. data/vendor/assets/javascripts/ace/snippets/csound_document.js +24 -0
  71. data/vendor/assets/javascripts/ace/snippets/csound_orchestra.js +61 -0
  72. data/vendor/assets/javascripts/ace/snippets/csound_score.js +14 -0
  73. data/vendor/assets/javascripts/ace/snippets/csp.js +14 -0
  74. data/vendor/assets/javascripts/ace/snippets/css.js +8 -1
  75. data/vendor/assets/javascripts/ace/snippets/curly.js +8 -1
  76. data/vendor/assets/javascripts/ace/snippets/d.js +8 -1
  77. data/vendor/assets/javascripts/ace/snippets/dart.js +8 -1
  78. data/vendor/assets/javascripts/ace/snippets/diff.js +8 -1
  79. data/vendor/assets/javascripts/ace/snippets/django.js +8 -1
  80. data/vendor/assets/javascripts/ace/snippets/dockerfile.js +8 -1
  81. data/vendor/assets/javascripts/ace/snippets/dot.js +8 -1
  82. data/vendor/assets/javascripts/ace/snippets/drools.js +8 -1
  83. data/vendor/assets/javascripts/ace/snippets/edifact.js +254 -0
  84. data/vendor/assets/javascripts/ace/snippets/eiffel.js +8 -1
  85. data/vendor/assets/javascripts/ace/snippets/ejs.js +8 -1
  86. data/vendor/assets/javascripts/ace/snippets/elixir.js +8 -1
  87. data/vendor/assets/javascripts/ace/snippets/elm.js +8 -1
  88. data/vendor/assets/javascripts/ace/snippets/erlang.js +8 -1
  89. data/vendor/assets/javascripts/ace/snippets/forth.js +8 -1
  90. data/vendor/assets/javascripts/ace/snippets/fortran.js +8 -1
  91. data/vendor/assets/javascripts/ace/snippets/fsharp.js +14 -0
  92. data/vendor/assets/javascripts/ace/snippets/fsl.js +14 -0
  93. data/vendor/assets/javascripts/ace/snippets/ftl.js +8 -1
  94. data/vendor/assets/javascripts/ace/snippets/gcode.js +8 -1
  95. data/vendor/assets/javascripts/ace/snippets/gherkin.js +8 -1
  96. data/vendor/assets/javascripts/ace/snippets/gitignore.js +8 -1
  97. data/vendor/assets/javascripts/ace/snippets/glsl.js +8 -1
  98. data/vendor/assets/javascripts/ace/snippets/gobstones.js +1701 -24
  99. data/vendor/assets/javascripts/ace/snippets/golang.js +8 -1
  100. data/vendor/assets/javascripts/ace/snippets/graphqlschema.js +8 -1
  101. data/vendor/assets/javascripts/ace/snippets/groovy.js +8 -1
  102. data/vendor/assets/javascripts/ace/snippets/haml.js +8 -1
  103. data/vendor/assets/javascripts/ace/snippets/handlebars.js +8 -1
  104. data/vendor/assets/javascripts/ace/snippets/haskell.js +8 -1
  105. data/vendor/assets/javascripts/ace/snippets/haskell_cabal.js +8 -1
  106. data/vendor/assets/javascripts/ace/snippets/haxe.js +8 -1
  107. data/vendor/assets/javascripts/ace/snippets/hjson.js +8 -1
  108. data/vendor/assets/javascripts/ace/snippets/html.js +36 -2
  109. data/vendor/assets/javascripts/ace/snippets/html_elixir.js +8 -1
  110. data/vendor/assets/javascripts/ace/snippets/html_ruby.js +8 -1
  111. data/vendor/assets/javascripts/ace/snippets/ini.js +8 -1
  112. data/vendor/assets/javascripts/ace/snippets/io.js +8 -1
  113. data/vendor/assets/javascripts/ace/snippets/jack.js +8 -1
  114. data/vendor/assets/javascripts/ace/snippets/jade.js +8 -1
  115. data/vendor/assets/javascripts/ace/snippets/java.js +8 -1
  116. data/vendor/assets/javascripts/ace/snippets/javascript.js +8 -1
  117. data/vendor/assets/javascripts/ace/snippets/json.js +8 -1
  118. data/vendor/assets/javascripts/ace/snippets/jsoniq.js +8 -1
  119. data/vendor/assets/javascripts/ace/snippets/jsp.js +8 -1
  120. data/vendor/assets/javascripts/ace/snippets/jssm.js +14 -0
  121. data/vendor/assets/javascripts/ace/snippets/jsx.js +8 -1
  122. data/vendor/assets/javascripts/ace/snippets/julia.js +8 -1
  123. data/vendor/assets/javascripts/ace/snippets/kotlin.js +8 -1
  124. data/vendor/assets/javascripts/ace/snippets/latex.js +8 -1
  125. data/vendor/assets/javascripts/ace/snippets/less.js +8 -1
  126. data/vendor/assets/javascripts/ace/snippets/liquid.js +890 -2
  127. data/vendor/assets/javascripts/ace/snippets/lisp.js +8 -1
  128. data/vendor/assets/javascripts/ace/snippets/livescript.js +8 -1
  129. data/vendor/assets/javascripts/ace/snippets/logiql.js +8 -1
  130. data/vendor/assets/javascripts/ace/snippets/logtalk.js +14 -0
  131. data/vendor/assets/javascripts/ace/snippets/lsl.js +8 -1
  132. data/vendor/assets/javascripts/ace/snippets/lua.js +8 -1
  133. data/vendor/assets/javascripts/ace/snippets/luapage.js +8 -1
  134. data/vendor/assets/javascripts/ace/snippets/lucene.js +8 -1
  135. data/vendor/assets/javascripts/ace/snippets/makefile.js +8 -1
  136. data/vendor/assets/javascripts/ace/snippets/markdown.js +8 -1
  137. data/vendor/assets/javascripts/ace/snippets/mask.js +8 -1
  138. data/vendor/assets/javascripts/ace/snippets/matlab.js +8 -1
  139. data/vendor/assets/javascripts/ace/snippets/maze.js +8 -1
  140. data/vendor/assets/javascripts/ace/snippets/mel.js +8 -1
  141. data/vendor/assets/javascripts/ace/snippets/mixal.js +14 -0
  142. data/vendor/assets/javascripts/ace/snippets/mushcode.js +8 -1
  143. data/vendor/assets/javascripts/ace/snippets/mysql.js +8 -1
  144. data/vendor/assets/javascripts/ace/snippets/nginx.js +14 -0
  145. data/vendor/assets/javascripts/ace/snippets/nim.js +14 -0
  146. data/vendor/assets/javascripts/ace/snippets/nix.js +8 -1
  147. data/vendor/assets/javascripts/ace/snippets/nsis.js +8 -1
  148. data/vendor/assets/javascripts/ace/snippets/objectivec.js +8 -1
  149. data/vendor/assets/javascripts/ace/snippets/ocaml.js +8 -1
  150. data/vendor/assets/javascripts/ace/snippets/pascal.js +8 -1
  151. data/vendor/assets/javascripts/ace/snippets/perl.js +8 -1
  152. data/vendor/assets/javascripts/ace/snippets/perl6.js +14 -0
  153. data/vendor/assets/javascripts/ace/snippets/pgsql.js +8 -1
  154. data/vendor/assets/javascripts/ace/snippets/php.js +49 -36
  155. data/vendor/assets/javascripts/ace/snippets/php_laravel_blade.js +14 -0
  156. data/vendor/assets/javascripts/ace/snippets/pig.js +8 -1
  157. data/vendor/assets/javascripts/ace/snippets/plain_text.js +8 -1
  158. data/vendor/assets/javascripts/ace/snippets/powershell.js +8 -1
  159. data/vendor/assets/javascripts/ace/snippets/praat.js +8 -1
  160. data/vendor/assets/javascripts/ace/snippets/prolog.js +8 -1
  161. data/vendor/assets/javascripts/ace/snippets/properties.js +8 -1
  162. data/vendor/assets/javascripts/ace/snippets/protobuf.js +8 -1
  163. data/vendor/assets/javascripts/ace/snippets/puppet.js +14 -0
  164. data/vendor/assets/javascripts/ace/snippets/python.js +8 -1
  165. data/vendor/assets/javascripts/ace/snippets/r.js +8 -1
  166. data/vendor/assets/javascripts/ace/snippets/razor.js +8 -1
  167. data/vendor/assets/javascripts/ace/snippets/rdoc.js +8 -1
  168. data/vendor/assets/javascripts/ace/snippets/red.js +14 -0
  169. data/vendor/assets/javascripts/ace/snippets/redshift.js +14 -0
  170. data/vendor/assets/javascripts/ace/snippets/rhtml.js +8 -1
  171. data/vendor/assets/javascripts/ace/snippets/rst.js +8 -1
  172. data/vendor/assets/javascripts/ace/snippets/ruby.js +8 -1
  173. data/vendor/assets/javascripts/ace/snippets/rust.js +8 -1
  174. data/vendor/assets/javascripts/ace/snippets/sass.js +8 -1
  175. data/vendor/assets/javascripts/ace/snippets/scad.js +8 -1
  176. data/vendor/assets/javascripts/ace/snippets/scala.js +8 -1
  177. data/vendor/assets/javascripts/ace/snippets/scheme.js +8 -1
  178. data/vendor/assets/javascripts/ace/snippets/scss.js +8 -1
  179. data/vendor/assets/javascripts/ace/snippets/sh.js +8 -1
  180. data/vendor/assets/javascripts/ace/snippets/sjs.js +8 -1
  181. data/vendor/assets/javascripts/ace/snippets/slim.js +14 -0
  182. data/vendor/assets/javascripts/ace/snippets/smarty.js +8 -1
  183. data/vendor/assets/javascripts/ace/snippets/snippets.js +8 -1
  184. data/vendor/assets/javascripts/ace/snippets/soy_template.js +8 -1
  185. data/vendor/assets/javascripts/ace/snippets/space.js +8 -1
  186. data/vendor/assets/javascripts/ace/snippets/sparql.js +8 -1
  187. data/vendor/assets/javascripts/ace/snippets/sql.js +8 -1
  188. data/vendor/assets/javascripts/ace/snippets/sqlserver.js +8 -1
  189. data/vendor/assets/javascripts/ace/snippets/stylus.js +8 -1
  190. data/vendor/assets/javascripts/ace/snippets/svg.js +8 -1
  191. data/vendor/assets/javascripts/ace/snippets/swift.js +8 -1
  192. data/vendor/assets/javascripts/ace/snippets/tcl.js +8 -1
  193. data/vendor/assets/javascripts/ace/snippets/terraform.js +14 -0
  194. data/vendor/assets/javascripts/ace/snippets/tex.js +8 -1
  195. data/vendor/assets/javascripts/ace/snippets/text.js +8 -1
  196. data/vendor/assets/javascripts/ace/snippets/textile.js +8 -1
  197. data/vendor/assets/javascripts/ace/snippets/toml.js +8 -1
  198. data/vendor/assets/javascripts/ace/snippets/tsx.js +8 -1
  199. data/vendor/assets/javascripts/ace/snippets/turtle.js +8 -1
  200. data/vendor/assets/javascripts/ace/snippets/twig.js +8 -1
  201. data/vendor/assets/javascripts/ace/snippets/typescript.js +8 -1
  202. data/vendor/assets/javascripts/ace/snippets/vala.js +8 -1
  203. data/vendor/assets/javascripts/ace/snippets/vbscript.js +8 -1
  204. data/vendor/assets/javascripts/ace/snippets/velocity.js +8 -1
  205. data/vendor/assets/javascripts/ace/snippets/verilog.js +8 -1
  206. data/vendor/assets/javascripts/ace/snippets/vhdl.js +8 -1
  207. data/vendor/assets/javascripts/ace/snippets/visualforce.js +14 -0
  208. data/vendor/assets/javascripts/ace/snippets/wollok.js +8 -1
  209. data/vendor/assets/javascripts/ace/snippets/xml.js +8 -1
  210. data/vendor/assets/javascripts/ace/snippets/xquery.js +8 -1
  211. data/vendor/assets/javascripts/ace/snippets/yaml.js +8 -1
  212. data/vendor/assets/javascripts/ace/snippets/zeek.js +14 -0
  213. data/vendor/assets/javascripts/ace/worker-coffee.js +2 -2
  214. data/vendor/assets/javascripts/ace/worker-css.js +9 -3
  215. data/vendor/assets/javascripts/ace/worker-html.js +2 -2
  216. data/vendor/assets/javascripts/ace/worker-javascript.js +2 -2
  217. data/vendor/assets/javascripts/ace/worker-json.js +2 -2
  218. data/vendor/assets/javascripts/ace/worker-lua.js +2 -2
  219. data/vendor/assets/javascripts/ace/worker-php.js +4 -4
  220. data/vendor/assets/javascripts/ace/worker-xml.js +2 -2
  221. data/vendor/assets/javascripts/ace/worker-xquery.js +2 -2
  222. metadata +34 -16
  223. data/vendor/assets/javascripts/ace/ext-chromevox.js +0 -540
  224. data/vendor/assets/javascripts/ace/ext-old_ie.js +0 -502
  225. data/vendor/assets/javascripts/ace/mode-bash.js +0 -247
  226. data/vendor/assets/javascripts/ace/mode-lean.js +0 -281
  227. data/vendor/assets/javascripts/ace/mode-live_script.js +0 -481
  228. data/vendor/assets/javascripts/ace/mode-mips_assembler.js +0 -235
  229. data/vendor/assets/javascripts/ace/mode-mipsassembler.js +0 -196
  230. data/vendor/assets/javascripts/ace/mode-swig.js +0 -1099
  231. data/vendor/assets/javascripts/ace/snippets/lean.js +0 -7
  232. data/vendor/assets/javascripts/ace/snippets/live_script.js +0 -7
  233. data/vendor/assets/javascripts/ace/snippets/mips_assembler.js +0 -7
  234. data/vendor/assets/javascripts/ace/snippets/mipsassembler.js +0 -7
  235. data/vendor/assets/javascripts/ace/snippets/swig.js +0 -7
@@ -2337,10 +2337,10 @@ if (!Date.now) {
2337
2337
  return new Date().getTime();
2338
2338
  };
2339
2339
  }
2340
- var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
2340
+ var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003" +
2341
2341
  "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
2342
2342
  "\u2029\uFEFF";
2343
- if (!String.prototype.trim || ws.trim()) {
2343
+ if (!String.prototype.trim) {
2344
2344
  ws = "[" + ws + "]";
2345
2345
  var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
2346
2346
  trimEndRegexp = new RegExp(ws + ws + "*$");
@@ -3572,10 +3572,10 @@ if (!Date.now) {
3572
3572
  return new Date().getTime();
3573
3573
  };
3574
3574
  }
3575
- var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
3575
+ var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003" +
3576
3576
  "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
3577
3577
  "\u2029\uFEFF";
3578
- if (!String.prototype.trim || ws.trim()) {
3578
+ if (!String.prototype.trim) {
3579
3579
  ws = "[" + ws + "]";
3580
3580
  var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
3581
3581
  trimEndRegexp = new RegExp(ws + ws + "*$");
@@ -2394,7 +2394,7 @@ PHP.Lexer = function(src, ini) {
2394
2394
  };
2395
2395
 
2396
2396
 
2397
- PHP.Parser = function ( preprocessedTokens, eval ) {
2397
+ PHP.Parser = function ( preprocessedTokens, evaluate ) {
2398
2398
 
2399
2399
  var yybase = this.yybase,
2400
2400
  yydefault = this.yydefault,
@@ -2516,7 +2516,7 @@ PHP.Parser = function ( preprocessedTokens, eval ) {
2516
2516
  this.yyastk[ this.stackPos ] = this.yyval;
2517
2517
  attributeStack[ this.stackPos ] = this.startAttributes;
2518
2518
  } else {
2519
- if (eval !== true) {
2519
+ if (evaluate !== true) {
2520
2520
 
2521
2521
  var expected = [];
2522
2522
 
@@ -4241,10 +4241,10 @@ if (!Date.now) {
4241
4241
  return new Date().getTime();
4242
4242
  };
4243
4243
  }
4244
- var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
4244
+ var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003" +
4245
4245
  "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
4246
4246
  "\u2029\uFEFF";
4247
- if (!String.prototype.trim || ws.trim()) {
4247
+ if (!String.prototype.trim) {
4248
4248
  ws = "[" + ws + "]";
4249
4249
  var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
4250
4250
  trimEndRegexp = new RegExp(ws + ws + "*$");
@@ -3825,10 +3825,10 @@ if (!Date.now) {
3825
3825
  return new Date().getTime();
3826
3826
  };
3827
3827
  }
3828
- var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
3828
+ var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003" +
3829
3829
  "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
3830
3830
  "\u2029\uFEFF";
3831
- if (!String.prototype.trim || ws.trim()) {
3831
+ if (!String.prototype.trim) {
3832
3832
  ws = "[" + ws + "]";
3833
3833
  var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
3834
3834
  trimEndRegexp = new RegExp(ws + ws + "*$");
@@ -58290,10 +58290,10 @@ if (!Date.now) {
58290
58290
  return new Date().getTime();
58291
58291
  };
58292
58292
  }
58293
- var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
58293
+ var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003" +
58294
58294
  "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
58295
58295
  "\u2029\uFEFF";
58296
- if (!String.prototype.trim || ws.trim()) {
58296
+ if (!String.prototype.trim) {
58297
58297
  ws = "[" + ws + "]";
58298
58298
  var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
58299
58299
  trimEndRegexp = new RegExp(ws + ws + "*$");
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ace-rails-ap
3
3
  version: !ruby/object:Gem::Version
4
- version: '4.2'
4
+ version: '4.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Krieger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-16 00:00:00.000000000 Z
11
+ date: 2020-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -60,7 +60,6 @@ files:
60
60
  - vendor/assets/javascripts/ace-rails-ap.js
61
61
  - vendor/assets/javascripts/ace/ace.js
62
62
  - vendor/assets/javascripts/ace/ext-beautify.js
63
- - vendor/assets/javascripts/ace/ext-chromevox.js
64
63
  - vendor/assets/javascripts/ace/ext-elastic_tabstops_lite.js
65
64
  - vendor/assets/javascripts/ace/ext-emmet.js
66
65
  - vendor/assets/javascripts/ace/ext-error_marker.js
@@ -68,8 +67,8 @@ files:
68
67
  - vendor/assets/javascripts/ace/ext-language_tools.js
69
68
  - vendor/assets/javascripts/ace/ext-linking.js
70
69
  - vendor/assets/javascripts/ace/ext-modelist.js
71
- - vendor/assets/javascripts/ace/ext-old_ie.js
72
70
  - vendor/assets/javascripts/ace/ext-options.js
71
+ - vendor/assets/javascripts/ace/ext-prompt.js
73
72
  - vendor/assets/javascripts/ace/ext-rtl.js
74
73
  - vendor/assets/javascripts/ace/ext-searchbox.js
75
74
  - vendor/assets/javascripts/ace/ext-settings_menu.js
@@ -90,11 +89,11 @@ files:
90
89
  - vendor/assets/javascripts/ace/mode-apache_conf.js
91
90
  - vendor/assets/javascripts/ace/mode-apex.js
92
91
  - vendor/assets/javascripts/ace/mode-applescript.js
92
+ - vendor/assets/javascripts/ace/mode-aql.js
93
93
  - vendor/assets/javascripts/ace/mode-asciidoc.js
94
94
  - vendor/assets/javascripts/ace/mode-asl.js
95
95
  - vendor/assets/javascripts/ace/mode-assembly_x86.js
96
96
  - vendor/assets/javascripts/ace/mode-autohotkey.js
97
- - vendor/assets/javascripts/ace/mode-bash.js
98
97
  - vendor/assets/javascripts/ace/mode-batchfile.js
99
98
  - vendor/assets/javascripts/ace/mode-bro.js
100
99
  - vendor/assets/javascripts/ace/mode-c9search.js
@@ -104,6 +103,7 @@ files:
104
103
  - vendor/assets/javascripts/ace/mode-cobol.js
105
104
  - vendor/assets/javascripts/ace/mode-coffee.js
106
105
  - vendor/assets/javascripts/ace/mode-coldfusion.js
106
+ - vendor/assets/javascripts/ace/mode-crystal.js
107
107
  - vendor/assets/javascripts/ace/mode-csharp.js
108
108
  - vendor/assets/javascripts/ace/mode-csound_document.js
109
109
  - vendor/assets/javascripts/ace/mode-csound_orchestra.js
@@ -160,11 +160,9 @@ files:
160
160
  - vendor/assets/javascripts/ace/mode-julia.js
161
161
  - vendor/assets/javascripts/ace/mode-kotlin.js
162
162
  - vendor/assets/javascripts/ace/mode-latex.js
163
- - vendor/assets/javascripts/ace/mode-lean.js
164
163
  - vendor/assets/javascripts/ace/mode-less.js
165
164
  - vendor/assets/javascripts/ace/mode-liquid.js
166
165
  - vendor/assets/javascripts/ace/mode-lisp.js
167
- - vendor/assets/javascripts/ace/mode-live_script.js
168
166
  - vendor/assets/javascripts/ace/mode-livescript.js
169
167
  - vendor/assets/javascripts/ace/mode-logiql.js
170
168
  - vendor/assets/javascripts/ace/mode-logtalk.js
@@ -178,11 +176,11 @@ files:
178
176
  - vendor/assets/javascripts/ace/mode-matlab.js
179
177
  - vendor/assets/javascripts/ace/mode-maze.js
180
178
  - vendor/assets/javascripts/ace/mode-mel.js
181
- - vendor/assets/javascripts/ace/mode-mips_assembler.js
182
- - vendor/assets/javascripts/ace/mode-mipsassembler.js
183
179
  - vendor/assets/javascripts/ace/mode-mixal.js
184
180
  - vendor/assets/javascripts/ace/mode-mushcode.js
185
181
  - vendor/assets/javascripts/ace/mode-mysql.js
182
+ - vendor/assets/javascripts/ace/mode-nginx.js
183
+ - vendor/assets/javascripts/ace/mode-nim.js
186
184
  - vendor/assets/javascripts/ace/mode-nix.js
187
185
  - vendor/assets/javascripts/ace/mode-nsis.js
188
186
  - vendor/assets/javascripts/ace/mode-objectivec.js
@@ -229,7 +227,6 @@ files:
229
227
  - vendor/assets/javascripts/ace/mode-stylus.js
230
228
  - vendor/assets/javascripts/ace/mode-svg.js
231
229
  - vendor/assets/javascripts/ace/mode-swift.js
232
- - vendor/assets/javascripts/ace/mode-swig.js
233
230
  - vendor/assets/javascripts/ace/mode-tcl.js
234
231
  - vendor/assets/javascripts/ace/mode-terraform.js
235
232
  - vendor/assets/javascripts/ace/mode-tex.js
@@ -250,13 +247,17 @@ files:
250
247
  - vendor/assets/javascripts/ace/mode-xml.js
251
248
  - vendor/assets/javascripts/ace/mode-xquery.js
252
249
  - vendor/assets/javascripts/ace/mode-yaml.js
250
+ - vendor/assets/javascripts/ace/mode-zeek.js
253
251
  - vendor/assets/javascripts/ace/snippets/abap.js
254
252
  - vendor/assets/javascripts/ace/snippets/abc.js
255
253
  - vendor/assets/javascripts/ace/snippets/actionscript.js
256
254
  - vendor/assets/javascripts/ace/snippets/ada.js
257
255
  - vendor/assets/javascripts/ace/snippets/apache_conf.js
256
+ - vendor/assets/javascripts/ace/snippets/apex.js
258
257
  - vendor/assets/javascripts/ace/snippets/applescript.js
258
+ - vendor/assets/javascripts/ace/snippets/aql.js
259
259
  - vendor/assets/javascripts/ace/snippets/asciidoc.js
260
+ - vendor/assets/javascripts/ace/snippets/asl.js
260
261
  - vendor/assets/javascripts/ace/snippets/assembly_x86.js
261
262
  - vendor/assets/javascripts/ace/snippets/autohotkey.js
262
263
  - vendor/assets/javascripts/ace/snippets/batchfile.js
@@ -268,7 +269,12 @@ files:
268
269
  - vendor/assets/javascripts/ace/snippets/cobol.js
269
270
  - vendor/assets/javascripts/ace/snippets/coffee.js
270
271
  - vendor/assets/javascripts/ace/snippets/coldfusion.js
272
+ - vendor/assets/javascripts/ace/snippets/crystal.js
271
273
  - vendor/assets/javascripts/ace/snippets/csharp.js
274
+ - vendor/assets/javascripts/ace/snippets/csound_document.js
275
+ - vendor/assets/javascripts/ace/snippets/csound_orchestra.js
276
+ - vendor/assets/javascripts/ace/snippets/csound_score.js
277
+ - vendor/assets/javascripts/ace/snippets/csp.js
272
278
  - vendor/assets/javascripts/ace/snippets/css.js
273
279
  - vendor/assets/javascripts/ace/snippets/curly.js
274
280
  - vendor/assets/javascripts/ace/snippets/d.js
@@ -278,6 +284,7 @@ files:
278
284
  - vendor/assets/javascripts/ace/snippets/dockerfile.js
279
285
  - vendor/assets/javascripts/ace/snippets/dot.js
280
286
  - vendor/assets/javascripts/ace/snippets/drools.js
287
+ - vendor/assets/javascripts/ace/snippets/edifact.js
281
288
  - vendor/assets/javascripts/ace/snippets/eiffel.js
282
289
  - vendor/assets/javascripts/ace/snippets/ejs.js
283
290
  - vendor/assets/javascripts/ace/snippets/elixir.js
@@ -285,6 +292,8 @@ files:
285
292
  - vendor/assets/javascripts/ace/snippets/erlang.js
286
293
  - vendor/assets/javascripts/ace/snippets/forth.js
287
294
  - vendor/assets/javascripts/ace/snippets/fortran.js
295
+ - vendor/assets/javascripts/ace/snippets/fsharp.js
296
+ - vendor/assets/javascripts/ace/snippets/fsl.js
288
297
  - vendor/assets/javascripts/ace/snippets/ftl.js
289
298
  - vendor/assets/javascripts/ace/snippets/gcode.js
290
299
  - vendor/assets/javascripts/ace/snippets/gherkin.js
@@ -312,17 +321,17 @@ files:
312
321
  - vendor/assets/javascripts/ace/snippets/json.js
313
322
  - vendor/assets/javascripts/ace/snippets/jsoniq.js
314
323
  - vendor/assets/javascripts/ace/snippets/jsp.js
324
+ - vendor/assets/javascripts/ace/snippets/jssm.js
315
325
  - vendor/assets/javascripts/ace/snippets/jsx.js
316
326
  - vendor/assets/javascripts/ace/snippets/julia.js
317
327
  - vendor/assets/javascripts/ace/snippets/kotlin.js
318
328
  - vendor/assets/javascripts/ace/snippets/latex.js
319
- - vendor/assets/javascripts/ace/snippets/lean.js
320
329
  - vendor/assets/javascripts/ace/snippets/less.js
321
330
  - vendor/assets/javascripts/ace/snippets/liquid.js
322
331
  - vendor/assets/javascripts/ace/snippets/lisp.js
323
- - vendor/assets/javascripts/ace/snippets/live_script.js
324
332
  - vendor/assets/javascripts/ace/snippets/livescript.js
325
333
  - vendor/assets/javascripts/ace/snippets/logiql.js
334
+ - vendor/assets/javascripts/ace/snippets/logtalk.js
326
335
  - vendor/assets/javascripts/ace/snippets/lsl.js
327
336
  - vendor/assets/javascripts/ace/snippets/lua.js
328
337
  - vendor/assets/javascripts/ace/snippets/luapage.js
@@ -333,18 +342,21 @@ files:
333
342
  - vendor/assets/javascripts/ace/snippets/matlab.js
334
343
  - vendor/assets/javascripts/ace/snippets/maze.js
335
344
  - vendor/assets/javascripts/ace/snippets/mel.js
336
- - vendor/assets/javascripts/ace/snippets/mips_assembler.js
337
- - vendor/assets/javascripts/ace/snippets/mipsassembler.js
345
+ - vendor/assets/javascripts/ace/snippets/mixal.js
338
346
  - vendor/assets/javascripts/ace/snippets/mushcode.js
339
347
  - vendor/assets/javascripts/ace/snippets/mysql.js
348
+ - vendor/assets/javascripts/ace/snippets/nginx.js
349
+ - vendor/assets/javascripts/ace/snippets/nim.js
340
350
  - vendor/assets/javascripts/ace/snippets/nix.js
341
351
  - vendor/assets/javascripts/ace/snippets/nsis.js
342
352
  - vendor/assets/javascripts/ace/snippets/objectivec.js
343
353
  - vendor/assets/javascripts/ace/snippets/ocaml.js
344
354
  - vendor/assets/javascripts/ace/snippets/pascal.js
345
355
  - vendor/assets/javascripts/ace/snippets/perl.js
356
+ - vendor/assets/javascripts/ace/snippets/perl6.js
346
357
  - vendor/assets/javascripts/ace/snippets/pgsql.js
347
358
  - vendor/assets/javascripts/ace/snippets/php.js
359
+ - vendor/assets/javascripts/ace/snippets/php_laravel_blade.js
348
360
  - vendor/assets/javascripts/ace/snippets/pig.js
349
361
  - vendor/assets/javascripts/ace/snippets/plain_text.js
350
362
  - vendor/assets/javascripts/ace/snippets/powershell.js
@@ -352,10 +364,13 @@ files:
352
364
  - vendor/assets/javascripts/ace/snippets/prolog.js
353
365
  - vendor/assets/javascripts/ace/snippets/properties.js
354
366
  - vendor/assets/javascripts/ace/snippets/protobuf.js
367
+ - vendor/assets/javascripts/ace/snippets/puppet.js
355
368
  - vendor/assets/javascripts/ace/snippets/python.js
356
369
  - vendor/assets/javascripts/ace/snippets/r.js
357
370
  - vendor/assets/javascripts/ace/snippets/razor.js
358
371
  - vendor/assets/javascripts/ace/snippets/rdoc.js
372
+ - vendor/assets/javascripts/ace/snippets/red.js
373
+ - vendor/assets/javascripts/ace/snippets/redshift.js
359
374
  - vendor/assets/javascripts/ace/snippets/rhtml.js
360
375
  - vendor/assets/javascripts/ace/snippets/rst.js
361
376
  - vendor/assets/javascripts/ace/snippets/ruby.js
@@ -367,6 +382,7 @@ files:
367
382
  - vendor/assets/javascripts/ace/snippets/scss.js
368
383
  - vendor/assets/javascripts/ace/snippets/sh.js
369
384
  - vendor/assets/javascripts/ace/snippets/sjs.js
385
+ - vendor/assets/javascripts/ace/snippets/slim.js
370
386
  - vendor/assets/javascripts/ace/snippets/smarty.js
371
387
  - vendor/assets/javascripts/ace/snippets/snippets.js
372
388
  - vendor/assets/javascripts/ace/snippets/soy_template.js
@@ -377,8 +393,8 @@ files:
377
393
  - vendor/assets/javascripts/ace/snippets/stylus.js
378
394
  - vendor/assets/javascripts/ace/snippets/svg.js
379
395
  - vendor/assets/javascripts/ace/snippets/swift.js
380
- - vendor/assets/javascripts/ace/snippets/swig.js
381
396
  - vendor/assets/javascripts/ace/snippets/tcl.js
397
+ - vendor/assets/javascripts/ace/snippets/terraform.js
382
398
  - vendor/assets/javascripts/ace/snippets/tex.js
383
399
  - vendor/assets/javascripts/ace/snippets/text.js
384
400
  - vendor/assets/javascripts/ace/snippets/textile.js
@@ -392,10 +408,12 @@ files:
392
408
  - vendor/assets/javascripts/ace/snippets/velocity.js
393
409
  - vendor/assets/javascripts/ace/snippets/verilog.js
394
410
  - vendor/assets/javascripts/ace/snippets/vhdl.js
411
+ - vendor/assets/javascripts/ace/snippets/visualforce.js
395
412
  - vendor/assets/javascripts/ace/snippets/wollok.js
396
413
  - vendor/assets/javascripts/ace/snippets/xml.js
397
414
  - vendor/assets/javascripts/ace/snippets/xquery.js
398
415
  - vendor/assets/javascripts/ace/snippets/yaml.js
416
+ - vendor/assets/javascripts/ace/snippets/zeek.js
399
417
  - vendor/assets/javascripts/ace/theme-ambiance.js
400
418
  - vendor/assets/javascripts/ace/theme-chaos.js
401
419
  - vendor/assets/javascripts/ace/theme-chrome.js
@@ -462,7 +480,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
462
480
  - !ruby/object:Gem::Version
463
481
  version: '0'
464
482
  requirements: []
465
- rubygems_version: 3.0.1
483
+ rubygems_version: 3.1.2
466
484
  signing_key:
467
485
  specification_version: 4
468
486
  summary: The Ajax.org Cloud9 Editor (Ace) for the Rails 3.1 asset pipeline.
@@ -1,540 +0,0 @@
1
- define("ace/ext/chromevox",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) {
2
- var cvoxAce = {};
3
- cvoxAce.SpeechProperty;
4
- cvoxAce.Cursor;
5
- cvoxAce.Token;
6
- cvoxAce.Annotation;
7
- var CONSTANT_PROP = {
8
- 'rate': 0.8,
9
- 'pitch': 0.4,
10
- 'volume': 0.9
11
- };
12
- var DEFAULT_PROP = {
13
- 'rate': 1,
14
- 'pitch': 0.5,
15
- 'volume': 0.9
16
- };
17
- var ENTITY_PROP = {
18
- 'rate': 0.8,
19
- 'pitch': 0.8,
20
- 'volume': 0.9
21
- };
22
- var KEYWORD_PROP = {
23
- 'rate': 0.8,
24
- 'pitch': 0.3,
25
- 'volume': 0.9
26
- };
27
- var STORAGE_PROP = {
28
- 'rate': 0.8,
29
- 'pitch': 0.7,
30
- 'volume': 0.9
31
- };
32
- var VARIABLE_PROP = {
33
- 'rate': 0.8,
34
- 'pitch': 0.8,
35
- 'volume': 0.9
36
- };
37
- var DELETED_PROP = {
38
- 'punctuationEcho': 'none',
39
- 'relativePitch': -0.6
40
- };
41
- var ERROR_EARCON = 'ALERT_NONMODAL';
42
- var MODE_SWITCH_EARCON = 'ALERT_MODAL';
43
- var NO_MATCH_EARCON = 'INVALID_KEYPRESS';
44
- var INSERT_MODE_STATE = 'insertMode';
45
- var COMMAND_MODE_STATE = 'start';
46
-
47
- var REPLACE_LIST = [
48
- {
49
- substr: ';',
50
- newSubstr: ' semicolon '
51
- },
52
- {
53
- substr: ':',
54
- newSubstr: ' colon '
55
- }
56
- ];
57
- var Command = {
58
- SPEAK_ANNOT: 'annots',
59
- SPEAK_ALL_ANNOTS: 'all_annots',
60
- TOGGLE_LOCATION: 'toggle_location',
61
- SPEAK_MODE: 'mode',
62
- SPEAK_ROW_COL: 'row_col',
63
- TOGGLE_DISPLACEMENT: 'toggle_displacement',
64
- FOCUS_TEXT: 'focus_text'
65
- };
66
- var KEY_PREFIX = 'CONTROL + SHIFT ';
67
- cvoxAce.editor = null;
68
- var lastCursor = null;
69
- var annotTable = {};
70
- var shouldSpeakRowLocation = false;
71
- var shouldSpeakDisplacement = false;
72
- var changed = false;
73
- var vimState = null;
74
- var keyCodeToShortcutMap = {};
75
- var cmdToShortcutMap = {};
76
- var getKeyShortcutString = function(keyCode) {
77
- return KEY_PREFIX + String.fromCharCode(keyCode);
78
- };
79
- var isVimMode = function() {
80
- var keyboardHandler = cvoxAce.editor.keyBinding.getKeyboardHandler();
81
- return keyboardHandler.$id === 'ace/keyboard/vim';
82
- };
83
- var getCurrentToken = function(cursor) {
84
- return cvoxAce.editor.getSession().getTokenAt(cursor.row, cursor.column + 1);
85
- };
86
- var getCurrentLine = function(cursor) {
87
- return cvoxAce.editor.getSession().getLine(cursor.row);
88
- };
89
- var onRowChange = function(currCursor) {
90
- if (annotTable[currCursor.row]) {
91
- cvox.Api.playEarcon(ERROR_EARCON);
92
- }
93
- if (shouldSpeakRowLocation) {
94
- cvox.Api.stop();
95
- speakChar(currCursor);
96
- speakTokenQueue(getCurrentToken(currCursor));
97
- speakLine(currCursor.row, 1);
98
- } else {
99
- speakLine(currCursor.row, 0);
100
- }
101
- };
102
- var isWord = function(cursor) {
103
- var line = getCurrentLine(cursor);
104
- var lineSuffix = line.substr(cursor.column - 1);
105
- if (cursor.column === 0) {
106
- lineSuffix = ' ' + line;
107
- }
108
- var firstWordRegExp = /^\W(\w+)/;
109
- var words = firstWordRegExp.exec(lineSuffix);
110
- return words !== null;
111
- };
112
- var rules = {
113
- 'constant': {
114
- prop: CONSTANT_PROP
115
- },
116
- 'entity': {
117
- prop: ENTITY_PROP
118
- },
119
- 'keyword': {
120
- prop: KEYWORD_PROP
121
- },
122
- 'storage': {
123
- prop: STORAGE_PROP
124
- },
125
- 'variable': {
126
- prop: VARIABLE_PROP
127
- },
128
- 'meta': {
129
- prop: DEFAULT_PROP,
130
- replace: [
131
- {
132
- substr: '</',
133
- newSubstr: ' closing tag '
134
- },
135
- {
136
- substr: '/>',
137
- newSubstr: ' close tag '
138
- },
139
- {
140
- substr: '<',
141
- newSubstr: ' tag start '
142
- },
143
- {
144
- substr: '>',
145
- newSubstr: ' tag end '
146
- }
147
- ]
148
- }
149
- };
150
- var DEFAULT_RULE = {
151
- prop: DEFAULT_RULE
152
- };
153
- var expand = function(value, replaceRules) {
154
- var newValue = value;
155
- for (var i = 0; i < replaceRules.length; i++) {
156
- var replaceRule = replaceRules[i];
157
- var regexp = new RegExp(replaceRule.substr, 'g');
158
- newValue = newValue.replace(regexp, replaceRule.newSubstr);
159
- }
160
- return newValue;
161
- };
162
- var mergeTokens = function(tokens, start, end) {
163
- var newToken = {};
164
- newToken.value = '';
165
- newToken.type = tokens[start].type;
166
- for (var j = start; j < end; j++) {
167
- newToken.value += tokens[j].value;
168
- }
169
- return newToken;
170
- };
171
- var mergeLikeTokens = function(tokens) {
172
- if (tokens.length <= 1) {
173
- return tokens;
174
- }
175
- var newTokens = [];
176
- var lastLikeIndex = 0;
177
- for (var i = 1; i < tokens.length; i++) {
178
- var lastLikeToken = tokens[lastLikeIndex];
179
- var currToken = tokens[i];
180
- if (getTokenRule(lastLikeToken) !== getTokenRule(currToken)) {
181
- newTokens.push(mergeTokens(tokens, lastLikeIndex, i));
182
- lastLikeIndex = i;
183
- }
184
- }
185
- newTokens.push(mergeTokens(tokens, lastLikeIndex, tokens.length));
186
- return newTokens;
187
- };
188
- var isRowWhiteSpace = function(row) {
189
- var line = cvoxAce.editor.getSession().getLine(row);
190
- var whiteSpaceRegexp = /^\s*$/;
191
- return whiteSpaceRegexp.exec(line) !== null;
192
- };
193
- var speakLine = function(row, queue) {
194
- var tokens = cvoxAce.editor.getSession().getTokens(row);
195
- if (tokens.length === 0 || isRowWhiteSpace(row)) {
196
- cvox.Api.playEarcon('EDITABLE_TEXT');
197
- return;
198
- }
199
- tokens = mergeLikeTokens(tokens);
200
- var firstToken = tokens[0];
201
- tokens = tokens.filter(function(token) {
202
- return token !== firstToken;
203
- });
204
- speakToken_(firstToken, queue);
205
- tokens.forEach(speakTokenQueue);
206
- };
207
- var speakTokenFlush = function(token) {
208
- speakToken_(token, 0);
209
- };
210
- var speakTokenQueue = function(token) {
211
- speakToken_(token, 1);
212
- };
213
- var getTokenRule = function(token) {
214
- if (!token || !token.type) {
215
- return;
216
- }
217
- var split = token.type.split('.');
218
- if (split.length === 0) {
219
- return;
220
- }
221
- var type = split[0];
222
- var rule = rules[type];
223
- if (!rule) {
224
- return DEFAULT_RULE;
225
- }
226
- return rule;
227
- };
228
- var speakToken_ = function(token, queue) {
229
- var rule = getTokenRule(token);
230
- var value = expand(token.value, REPLACE_LIST);
231
- if (rule.replace) {
232
- value = expand(value, rule.replace);
233
- }
234
- cvox.Api.speak(value, queue, rule.prop);
235
- };
236
- var speakChar = function(cursor) {
237
- var line = getCurrentLine(cursor);
238
- cvox.Api.speak(line[cursor.column], 1);
239
- };
240
- var speakDisplacement = function(lastCursor, currCursor) {
241
- var line = getCurrentLine(currCursor);
242
- var displace = line.substring(lastCursor.column, currCursor.column);
243
- displace = displace.replace(/ /g, ' space ');
244
- cvox.Api.speak(displace);
245
- };
246
- var speakCharOrWordOrLine = function(lastCursor, currCursor) {
247
- if (Math.abs(lastCursor.column - currCursor.column) !== 1) {
248
- var currLineLength = getCurrentLine(currCursor).length;
249
- if (currCursor.column === 0 || currCursor.column === currLineLength) {
250
- speakLine(currCursor.row, 0);
251
- return;
252
- }
253
- if (isWord(currCursor)) {
254
- cvox.Api.stop();
255
- speakTokenQueue(getCurrentToken(currCursor));
256
- return;
257
- }
258
- }
259
- speakChar(currCursor);
260
- };
261
- var onColumnChange = function(lastCursor, currCursor) {
262
- if (!cvoxAce.editor.selection.isEmpty()) {
263
- speakDisplacement(lastCursor, currCursor);
264
- cvox.Api.speak('selected', 1);
265
- }
266
- else if (shouldSpeakDisplacement) {
267
- speakDisplacement(lastCursor, currCursor);
268
- } else {
269
- speakCharOrWordOrLine(lastCursor, currCursor);
270
- }
271
- };
272
- var onCursorChange = function(evt) {
273
- if (changed) {
274
- changed = false;
275
- return;
276
- }
277
- var currCursor = cvoxAce.editor.selection.getCursor();
278
- if (currCursor.row !== lastCursor.row) {
279
- onRowChange(currCursor);
280
- } else {
281
- onColumnChange(lastCursor, currCursor);
282
- }
283
- lastCursor = currCursor;
284
- };
285
- var onSelectionChange = function(evt) {
286
- if (cvoxAce.editor.selection.isEmpty()) {
287
- cvox.Api.speak('unselected');
288
- }
289
- };
290
- var onChange = function(delta) {
291
- switch (delta.action) {
292
- case 'remove':
293
- cvox.Api.speak(delta.text, 0, DELETED_PROP);
294
- changed = true;
295
- break;
296
- case 'insert':
297
- cvox.Api.speak(delta.text, 0);
298
- changed = true;
299
- break;
300
- }
301
- };
302
- var isNewAnnotation = function(annot) {
303
- var row = annot.row;
304
- var col = annot.column;
305
- return !annotTable[row] || !annotTable[row][col];
306
- };
307
- var populateAnnotations = function(annotations) {
308
- annotTable = {};
309
- for (var i = 0; i < annotations.length; i++) {
310
- var annotation = annotations[i];
311
- var row = annotation.row;
312
- var col = annotation.column;
313
- if (!annotTable[row]) {
314
- annotTable[row] = {};
315
- }
316
- annotTable[row][col] = annotation;
317
- }
318
- };
319
- var onAnnotationChange = function(evt) {
320
- var annotations = cvoxAce.editor.getSession().getAnnotations();
321
- var newAnnotations = annotations.filter(isNewAnnotation);
322
- if (newAnnotations.length > 0) {
323
- cvox.Api.playEarcon(ERROR_EARCON);
324
- }
325
- populateAnnotations(annotations);
326
- };
327
- var speakAnnot = function(annot) {
328
- var annotText = annot.type + ' ' + annot.text + ' on ' +
329
- rowColToString(annot.row, annot.column);
330
- annotText = annotText.replace(';', 'semicolon');
331
- cvox.Api.speak(annotText, 1);
332
- };
333
- var speakAnnotsByRow = function(row) {
334
- var annots = annotTable[row];
335
- for (var col in annots) {
336
- speakAnnot(annots[col]);
337
- }
338
- };
339
- var rowColToString = function(row, col) {
340
- return 'row ' + (row + 1) + ' column ' + (col + 1);
341
- };
342
- var speakCurrRowAndCol = function() {
343
- cvox.Api.speak(rowColToString(lastCursor.row, lastCursor.column));
344
- };
345
- var speakAllAnnots = function() {
346
- for (var row in annotTable) {
347
- speakAnnotsByRow(row);
348
- }
349
- };
350
- var speakMode = function() {
351
- if (!isVimMode()) {
352
- return;
353
- }
354
- switch (cvoxAce.editor.keyBinding.$data.state) {
355
- case INSERT_MODE_STATE:
356
- cvox.Api.speak('Insert mode');
357
- break;
358
- case COMMAND_MODE_STATE:
359
- cvox.Api.speak('Command mode');
360
- break;
361
- }
362
- };
363
- var toggleSpeakRowLocation = function() {
364
- shouldSpeakRowLocation = !shouldSpeakRowLocation;
365
- if (shouldSpeakRowLocation) {
366
- cvox.Api.speak('Speak location on row change enabled.');
367
- } else {
368
- cvox.Api.speak('Speak location on row change disabled.');
369
- }
370
- };
371
- var toggleSpeakDisplacement = function() {
372
- shouldSpeakDisplacement = !shouldSpeakDisplacement;
373
- if (shouldSpeakDisplacement) {
374
- cvox.Api.speak('Speak displacement on column changes.');
375
- } else {
376
- cvox.Api.speak('Speak current character or word on column changes.');
377
- }
378
- };
379
- var onKeyDown = function(evt) {
380
- if (evt.ctrlKey && evt.shiftKey) {
381
- var shortcut = keyCodeToShortcutMap[evt.keyCode];
382
- if (shortcut) {
383
- shortcut.func();
384
- }
385
- }
386
- };
387
- var onChangeStatus = function(evt, editor) {
388
- if (!isVimMode()) {
389
- return;
390
- }
391
- var state = editor.keyBinding.$data.state;
392
- if (state === vimState) {
393
- return;
394
- }
395
- switch (state) {
396
- case INSERT_MODE_STATE:
397
- cvox.Api.playEarcon(MODE_SWITCH_EARCON);
398
- cvox.Api.setKeyEcho(true);
399
- break;
400
- case COMMAND_MODE_STATE:
401
- cvox.Api.playEarcon(MODE_SWITCH_EARCON);
402
- cvox.Api.setKeyEcho(false);
403
- break;
404
- }
405
- vimState = state;
406
- };
407
- var contextMenuHandler = function(evt) {
408
- var cmd = evt.detail['customCommand'];
409
- var shortcut = cmdToShortcutMap[cmd];
410
- if (shortcut) {
411
- shortcut.func();
412
- cvoxAce.editor.focus();
413
- }
414
- };
415
- var initContextMenu = function() {
416
- var ACTIONS = SHORTCUTS.map(function(shortcut) {
417
- return {
418
- desc: shortcut.desc + getKeyShortcutString(shortcut.keyCode),
419
- cmd: shortcut.cmd
420
- };
421
- });
422
- var body = document.querySelector('body');
423
- body.setAttribute('contextMenuActions', JSON.stringify(ACTIONS));
424
- body.addEventListener('ATCustomEvent', contextMenuHandler, true);
425
- };
426
- var onFindSearchbox = function(evt) {
427
- if (evt.match) {
428
- speakLine(lastCursor.row, 0);
429
- } else {
430
- cvox.Api.playEarcon(NO_MATCH_EARCON);
431
- }
432
- };
433
- var focus = function() {
434
- cvoxAce.editor.focus();
435
- };
436
- var SHORTCUTS = [
437
- {
438
- keyCode: 49,
439
- func: function() {
440
- speakAnnotsByRow(lastCursor.row);
441
- },
442
- cmd: Command.SPEAK_ANNOT,
443
- desc: 'Speak annotations on line'
444
- },
445
- {
446
- keyCode: 50,
447
- func: speakAllAnnots,
448
- cmd: Command.SPEAK_ALL_ANNOTS,
449
- desc: 'Speak all annotations'
450
- },
451
- {
452
- keyCode: 51,
453
- func: speakMode,
454
- cmd: Command.SPEAK_MODE,
455
- desc: 'Speak Vim mode'
456
- },
457
- {
458
- keyCode: 52,
459
- func: toggleSpeakRowLocation,
460
- cmd: Command.TOGGLE_LOCATION,
461
- desc: 'Toggle speak row location'
462
- },
463
- {
464
- keyCode: 53,
465
- func: speakCurrRowAndCol,
466
- cmd: Command.SPEAK_ROW_COL,
467
- desc: 'Speak row and column'
468
- },
469
- {
470
- keyCode: 54,
471
- func: toggleSpeakDisplacement,
472
- cmd: Command.TOGGLE_DISPLACEMENT,
473
- desc: 'Toggle speak displacement'
474
- },
475
- {
476
- keyCode: 55,
477
- func: focus,
478
- cmd: Command.FOCUS_TEXT,
479
- desc: 'Focus text'
480
- }
481
- ];
482
- var onFocus = function(_, editor) {
483
- cvoxAce.editor = editor;
484
- editor.getSession().selection.on('changeCursor', onCursorChange);
485
- editor.getSession().selection.on('changeSelection', onSelectionChange);
486
- editor.getSession().on('change', onChange);
487
- editor.getSession().on('changeAnnotation', onAnnotationChange);
488
- editor.on('changeStatus', onChangeStatus);
489
- editor.on('findSearchBox', onFindSearchbox);
490
- editor.container.addEventListener('keydown', onKeyDown);
491
-
492
- lastCursor = editor.selection.getCursor();
493
- };
494
- var init = function(editor) {
495
- onFocus(null, editor);
496
- SHORTCUTS.forEach(function(shortcut) {
497
- keyCodeToShortcutMap[shortcut.keyCode] = shortcut;
498
- cmdToShortcutMap[shortcut.cmd] = shortcut;
499
- });
500
-
501
- editor.on('focus', onFocus);
502
- if (isVimMode()) {
503
- cvox.Api.setKeyEcho(false);
504
- }
505
- initContextMenu();
506
- };
507
- function cvoxApiExists() {
508
- return (typeof(cvox) !== 'undefined') && cvox && cvox.Api;
509
- }
510
- var tries = 0;
511
- var MAX_TRIES = 15;
512
- function watchForCvoxLoad(editor) {
513
- if (cvoxApiExists()) {
514
- init(editor);
515
- } else {
516
- tries++;
517
- if (tries >= MAX_TRIES) {
518
- return;
519
- }
520
- window.setTimeout(watchForCvoxLoad, 500, editor);
521
- }
522
- }
523
-
524
- var Editor = require('../editor').Editor;
525
- require('../config').defineOptions(Editor.prototype, 'editor', {
526
- enableChromevoxEnhancements: {
527
- set: function(val) {
528
- if (val) {
529
- watchForCvoxLoad(this);
530
- }
531
- },
532
- value: true // turn it on by default or check for window.cvox
533
- }
534
- });
535
-
536
- });
537
- (function() {
538
- window.require(["ace/ext/chromevox"], function() {});
539
- })();
540
-