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
@@ -1,502 +0,0 @@
1
- define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) {
2
- "use strict";
3
-
4
- var dom = require("../lib/dom");
5
- var lang = require("../lib/lang");
6
- var event = require("../lib/event");
7
- var searchboxCss = "\
8
- .ace_search {\
9
- background-color: #ddd;\
10
- border: 1px solid #cbcbcb;\
11
- border-top: 0 none;\
12
- max-width: 325px;\
13
- overflow: hidden;\
14
- margin: 0;\
15
- padding: 4px;\
16
- padding-right: 6px;\
17
- padding-bottom: 0;\
18
- position: absolute;\
19
- top: 0px;\
20
- z-index: 99;\
21
- white-space: normal;\
22
- }\
23
- .ace_search.left {\
24
- border-left: 0 none;\
25
- border-radius: 0px 0px 5px 0px;\
26
- left: 0;\
27
- }\
28
- .ace_search.right {\
29
- border-radius: 0px 0px 0px 5px;\
30
- border-right: 0 none;\
31
- right: 0;\
32
- }\
33
- .ace_search_form, .ace_replace_form {\
34
- border-radius: 3px;\
35
- border: 1px solid #cbcbcb;\
36
- float: left;\
37
- margin-bottom: 4px;\
38
- overflow: hidden;\
39
- }\
40
- .ace_search_form.ace_nomatch {\
41
- outline: 1px solid red;\
42
- }\
43
- .ace_search_field {\
44
- background-color: white;\
45
- color: black;\
46
- border-right: 1px solid #cbcbcb;\
47
- border: 0 none;\
48
- -webkit-box-sizing: border-box;\
49
- -moz-box-sizing: border-box;\
50
- box-sizing: border-box;\
51
- float: left;\
52
- height: 22px;\
53
- outline: 0;\
54
- padding: 0 7px;\
55
- width: 214px;\
56
- margin: 0;\
57
- }\
58
- .ace_searchbtn,\
59
- .ace_replacebtn {\
60
- background: #fff;\
61
- border: 0 none;\
62
- border-left: 1px solid #dcdcdc;\
63
- cursor: pointer;\
64
- float: left;\
65
- height: 22px;\
66
- margin: 0;\
67
- position: relative;\
68
- }\
69
- .ace_searchbtn:last-child,\
70
- .ace_replacebtn:last-child {\
71
- border-top-right-radius: 3px;\
72
- border-bottom-right-radius: 3px;\
73
- }\
74
- .ace_searchbtn:disabled {\
75
- background: none;\
76
- cursor: default;\
77
- }\
78
- .ace_searchbtn {\
79
- background-position: 50% 50%;\
80
- background-repeat: no-repeat;\
81
- width: 27px;\
82
- }\
83
- .ace_searchbtn.prev {\
84
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); \
85
- }\
86
- .ace_searchbtn.next {\
87
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); \
88
- }\
89
- .ace_searchbtn_close {\
90
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\
91
- border-radius: 50%;\
92
- border: 0 none;\
93
- color: #656565;\
94
- cursor: pointer;\
95
- float: right;\
96
- font: 16px/16px Arial;\
97
- height: 14px;\
98
- margin: 5px 1px 9px 5px;\
99
- padding: 0;\
100
- text-align: center;\
101
- width: 14px;\
102
- }\
103
- .ace_searchbtn_close:hover {\
104
- background-color: #656565;\
105
- background-position: 50% 100%;\
106
- color: white;\
107
- }\
108
- .ace_replacebtn.prev {\
109
- width: 54px\
110
- }\
111
- .ace_replacebtn.next {\
112
- width: 27px\
113
- }\
114
- .ace_button {\
115
- margin-left: 2px;\
116
- cursor: pointer;\
117
- -webkit-user-select: none;\
118
- -moz-user-select: none;\
119
- -o-user-select: none;\
120
- -ms-user-select: none;\
121
- user-select: none;\
122
- overflow: hidden;\
123
- opacity: 0.7;\
124
- border: 1px solid rgba(100,100,100,0.23);\
125
- padding: 1px;\
126
- -moz-box-sizing: border-box;\
127
- box-sizing: border-box;\
128
- color: black;\
129
- }\
130
- .ace_button:hover {\
131
- background-color: #eee;\
132
- opacity:1;\
133
- }\
134
- .ace_button:active {\
135
- background-color: #ddd;\
136
- }\
137
- .ace_button.checked {\
138
- border-color: #3399ff;\
139
- opacity:1;\
140
- }\
141
- .ace_search_options{\
142
- margin-bottom: 3px;\
143
- text-align: right;\
144
- -webkit-user-select: none;\
145
- -moz-user-select: none;\
146
- -o-user-select: none;\
147
- -ms-user-select: none;\
148
- user-select: none;\
149
- }";
150
- var HashHandler = require("../keyboard/hash_handler").HashHandler;
151
- var keyUtil = require("../lib/keys");
152
-
153
- dom.importCssString(searchboxCss, "ace_searchbox");
154
-
155
- var html = '<div class="ace_search right">\
156
- <button type="button" action="hide" class="ace_searchbtn_close"></button>\
157
- <div class="ace_search_form">\
158
- <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>\
159
- <button type="button" action="findNext" class="ace_searchbtn next"></button>\
160
- <button type="button" action="findPrev" class="ace_searchbtn prev"></button>\
161
- <button type="button" action="findAll" class="ace_searchbtn" title="Alt-Enter">All</button>\
162
- </div>\
163
- <div class="ace_replace_form">\
164
- <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>\
165
- <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>\
166
- <button type="button" action="replaceAll" class="ace_replacebtn">All</button>\
167
- </div>\
168
- <div class="ace_search_options">\
169
- <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>\
170
- <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>\
171
- <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>\
172
- </div>\
173
- </div>'.replace(/>\s+/g, ">");
174
-
175
- var SearchBox = function(editor, range, showReplaceForm) {
176
- var div = dom.createElement("div");
177
- div.innerHTML = html;
178
- this.element = div.firstChild;
179
-
180
- this.$init();
181
- this.setEditor(editor);
182
- };
183
-
184
- (function() {
185
- this.setEditor = function(editor) {
186
- editor.searchBox = this;
187
- editor.container.appendChild(this.element);
188
- this.editor = editor;
189
- };
190
-
191
- this.$initElements = function(sb) {
192
- this.searchBox = sb.querySelector(".ace_search_form");
193
- this.replaceBox = sb.querySelector(".ace_replace_form");
194
- this.searchOptions = sb.querySelector(".ace_search_options");
195
- this.regExpOption = sb.querySelector("[action=toggleRegexpMode]");
196
- this.caseSensitiveOption = sb.querySelector("[action=toggleCaseSensitive]");
197
- this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]");
198
- this.searchInput = this.searchBox.querySelector(".ace_search_field");
199
- this.replaceInput = this.replaceBox.querySelector(".ace_search_field");
200
- };
201
-
202
- this.$init = function() {
203
- var sb = this.element;
204
-
205
- this.$initElements(sb);
206
-
207
- var _this = this;
208
- event.addListener(sb, "mousedown", function(e) {
209
- setTimeout(function(){
210
- _this.activeInput.focus();
211
- }, 0);
212
- event.stopPropagation(e);
213
- });
214
- event.addListener(sb, "click", function(e) {
215
- var t = e.target || e.srcElement;
216
- var action = t.getAttribute("action");
217
- if (action && _this[action])
218
- _this[action]();
219
- else if (_this.$searchBarKb.commands[action])
220
- _this.$searchBarKb.commands[action].exec(_this);
221
- event.stopPropagation(e);
222
- });
223
-
224
- event.addCommandKeyListener(sb, function(e, hashId, keyCode) {
225
- var keyString = keyUtil.keyCodeToString(keyCode);
226
- var command = _this.$searchBarKb.findKeyCommand(hashId, keyString);
227
- if (command && command.exec) {
228
- command.exec(_this);
229
- event.stopEvent(e);
230
- }
231
- });
232
-
233
- this.$onChange = lang.delayedCall(function() {
234
- _this.find(false, false);
235
- });
236
-
237
- event.addListener(this.searchInput, "input", function() {
238
- _this.$onChange.schedule(20);
239
- });
240
- event.addListener(this.searchInput, "focus", function() {
241
- _this.activeInput = _this.searchInput;
242
- _this.searchInput.value && _this.highlight();
243
- });
244
- event.addListener(this.replaceInput, "focus", function() {
245
- _this.activeInput = _this.replaceInput;
246
- _this.searchInput.value && _this.highlight();
247
- });
248
- };
249
- this.$closeSearchBarKb = new HashHandler([{
250
- bindKey: "Esc",
251
- name: "closeSearchBar",
252
- exec: function(editor) {
253
- editor.searchBox.hide();
254
- }
255
- }]);
256
- this.$searchBarKb = new HashHandler();
257
- this.$searchBarKb.bindKeys({
258
- "Ctrl-f|Command-f": function(sb) {
259
- var isReplace = sb.isReplace = !sb.isReplace;
260
- sb.replaceBox.style.display = isReplace ? "" : "none";
261
- sb.searchInput.focus();
262
- },
263
- "Ctrl-H|Command-Option-F": function(sb) {
264
- sb.replaceBox.style.display = "";
265
- sb.replaceInput.focus();
266
- },
267
- "Ctrl-G|Command-G": function(sb) {
268
- sb.findNext();
269
- },
270
- "Ctrl-Shift-G|Command-Shift-G": function(sb) {
271
- sb.findPrev();
272
- },
273
- "esc": function(sb) {
274
- setTimeout(function() { sb.hide();});
275
- },
276
- "Return": function(sb) {
277
- if (sb.activeInput == sb.replaceInput)
278
- sb.replace();
279
- sb.findNext();
280
- },
281
- "Shift-Return": function(sb) {
282
- if (sb.activeInput == sb.replaceInput)
283
- sb.replace();
284
- sb.findPrev();
285
- },
286
- "Alt-Return": function(sb) {
287
- if (sb.activeInput == sb.replaceInput)
288
- sb.replaceAll();
289
- sb.findAll();
290
- },
291
- "Tab": function(sb) {
292
- (sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus();
293
- }
294
- });
295
-
296
- this.$searchBarKb.addCommands([{
297
- name: "toggleRegexpMode",
298
- bindKey: {win: "Alt-R|Alt-/", mac: "Ctrl-Alt-R|Ctrl-Alt-/"},
299
- exec: function(sb) {
300
- sb.regExpOption.checked = !sb.regExpOption.checked;
301
- sb.$syncOptions();
302
- }
303
- }, {
304
- name: "toggleCaseSensitive",
305
- bindKey: {win: "Alt-C|Alt-I", mac: "Ctrl-Alt-R|Ctrl-Alt-I"},
306
- exec: function(sb) {
307
- sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked;
308
- sb.$syncOptions();
309
- }
310
- }, {
311
- name: "toggleWholeWords",
312
- bindKey: {win: "Alt-B|Alt-W", mac: "Ctrl-Alt-B|Ctrl-Alt-W"},
313
- exec: function(sb) {
314
- sb.wholeWordOption.checked = !sb.wholeWordOption.checked;
315
- sb.$syncOptions();
316
- }
317
- }]);
318
-
319
- this.$syncOptions = function() {
320
- dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked);
321
- dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked);
322
- dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked);
323
- this.find(false, false);
324
- };
325
-
326
- this.highlight = function(re) {
327
- this.editor.session.highlight(re || this.editor.$search.$options.re);
328
- this.editor.renderer.updateBackMarkers()
329
- };
330
- this.find = function(skipCurrent, backwards, preventScroll) {
331
- var range = this.editor.find(this.searchInput.value, {
332
- skipCurrent: skipCurrent,
333
- backwards: backwards,
334
- wrap: true,
335
- regExp: this.regExpOption.checked,
336
- caseSensitive: this.caseSensitiveOption.checked,
337
- wholeWord: this.wholeWordOption.checked,
338
- preventScroll: preventScroll
339
- });
340
- var noMatch = !range && this.searchInput.value;
341
- dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
342
- this.editor._emit("findSearchBox", { match: !noMatch });
343
- this.highlight();
344
- };
345
- this.findNext = function() {
346
- this.find(true, false);
347
- };
348
- this.findPrev = function() {
349
- this.find(true, true);
350
- };
351
- this.findAll = function(){
352
- var range = this.editor.findAll(this.searchInput.value, {
353
- regExp: this.regExpOption.checked,
354
- caseSensitive: this.caseSensitiveOption.checked,
355
- wholeWord: this.wholeWordOption.checked
356
- });
357
- var noMatch = !range && this.searchInput.value;
358
- dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
359
- this.editor._emit("findSearchBox", { match: !noMatch });
360
- this.highlight();
361
- this.hide();
362
- };
363
- this.replace = function() {
364
- if (!this.editor.getReadOnly())
365
- this.editor.replace(this.replaceInput.value);
366
- };
367
- this.replaceAndFindNext = function() {
368
- if (!this.editor.getReadOnly()) {
369
- this.editor.replace(this.replaceInput.value);
370
- this.findNext()
371
- }
372
- };
373
- this.replaceAll = function() {
374
- if (!this.editor.getReadOnly())
375
- this.editor.replaceAll(this.replaceInput.value);
376
- };
377
-
378
- this.hide = function() {
379
- this.element.style.display = "none";
380
- this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb);
381
- this.editor.focus();
382
- };
383
- this.show = function(value, isReplace) {
384
- this.element.style.display = "";
385
- this.replaceBox.style.display = isReplace ? "" : "none";
386
-
387
- this.isReplace = isReplace;
388
-
389
- if (value)
390
- this.searchInput.value = value;
391
-
392
- this.find(false, false, true);
393
-
394
- this.searchInput.focus();
395
- this.searchInput.select();
396
-
397
- this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb);
398
- };
399
-
400
- this.isFocused = function() {
401
- var el = document.activeElement;
402
- return el == this.searchInput || el == this.replaceInput;
403
- }
404
- }).call(SearchBox.prototype);
405
-
406
- exports.SearchBox = SearchBox;
407
-
408
- exports.Search = function(editor, isReplace) {
409
- var sb = editor.searchBox || new SearchBox(editor);
410
- sb.show(editor.session.getTextRange(), isReplace);
411
- };
412
-
413
- });
414
-
415
- define("ace/ext/old_ie",["require","exports","module","ace/lib/useragent","ace/tokenizer","ace/ext/searchbox","ace/mode/text"], function(require, exports, module) {
416
- "use strict";
417
- var MAX_TOKEN_COUNT = 1000;
418
- var useragent = require("../lib/useragent");
419
- var TokenizerModule = require("../tokenizer");
420
-
421
- function patch(obj, name, regexp, replacement) {
422
- eval("obj['" + name + "']=" + obj[name].toString().replace(
423
- regexp, replacement
424
- ));
425
- }
426
-
427
- if (useragent.isIE && useragent.isIE < 10 && window.top.document.compatMode === "BackCompat")
428
- useragent.isOldIE = true;
429
-
430
- if (typeof document != "undefined" && !document.documentElement.querySelector) {
431
- useragent.isOldIE = true;
432
- var qs = function(el, selector) {
433
- if (selector.charAt(0) == ".") {
434
- var classNeme = selector.slice(1);
435
- } else {
436
- var m = selector.match(/(\w+)=(\w+)/);
437
- var attr = m && m[1];
438
- var attrVal = m && m[2];
439
- }
440
- for (var i = 0; i < el.all.length; i++) {
441
- var ch = el.all[i];
442
- if (classNeme) {
443
- if (ch.className.indexOf(classNeme) != -1)
444
- return ch;
445
- } else if (attr) {
446
- if (ch.getAttribute(attr) == attrVal)
447
- return ch;
448
- }
449
- }
450
- };
451
- var sb = require("./searchbox").SearchBox.prototype;
452
- patch(
453
- sb, "$initElements",
454
- /([^\s=]*).querySelector\((".*?")\)/g,
455
- "qs($1, $2)"
456
- );
457
- }
458
-
459
- var compliantExecNpcg = /()??/.exec("")[1] === undefined;
460
- if (compliantExecNpcg)
461
- return;
462
- var proto = TokenizerModule.Tokenizer.prototype;
463
- TokenizerModule.Tokenizer_orig = TokenizerModule.Tokenizer;
464
- proto.getLineTokens_orig = proto.getLineTokens;
465
-
466
- patch(
467
- TokenizerModule, "Tokenizer",
468
- "ruleRegExps.push(adjustedregex);\n",
469
- function(m) {
470
- return m + '\
471
- if (state[i].next && RegExp(adjustedregex).test(""))\n\
472
- rule._qre = RegExp(adjustedregex, "g");\n\
473
- ';
474
- }
475
- );
476
- TokenizerModule.Tokenizer.prototype = proto;
477
- patch(
478
- proto, "getLineTokens",
479
- /if \(match\[i \+ 1\] === undefined\)\s*continue;/,
480
- "if (!match[i + 1]) {\n\
481
- if (value)continue;\n\
482
- var qre = state[mapping[i]]._qre;\n\
483
- if (!qre) continue;\n\
484
- qre.lastIndex = lastIndex;\n\
485
- if (!qre.exec(line) || qre.lastIndex != lastIndex)\n\
486
- continue;\n\
487
- }"
488
- );
489
-
490
- patch(
491
- require("../mode/text").Mode.prototype, "getTokenizer",
492
- /Tokenizer/,
493
- "TokenizerModule.Tokenizer"
494
- );
495
-
496
- useragent.isOldIE = true;
497
-
498
- });
499
- (function() {
500
- window.require(["ace/ext/old_ie"], function() {});
501
- })();
502
-