daftos 0.1.0 → 0.2.0

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 (307) hide show
  1. data/.DS_Store +0 -0
  2. data/Gemfile +1 -0
  3. data/Gemfile.lock +2 -0
  4. data/Rakefile +4 -0
  5. data/VERSION +1 -1
  6. data/bin/daftos +14 -0
  7. data/daftos.gemspec +363 -0
  8. data/lib/.DS_Store +0 -0
  9. data/lib/apis/.DS_Store +0 -0
  10. data/lib/apis/filesystem_api.rb +68 -0
  11. data/lib/apps/.DS_Store +0 -0
  12. data/lib/apps/apps/body.html +6 -0
  13. data/lib/apps/apps/options.json +7 -0
  14. data/lib/apps/filebrowser/.DS_Store +0 -0
  15. data/lib/apps/filebrowser/body.html +32 -0
  16. data/lib/apps/filebrowser/coffee/filebrowser.coffee +51 -0
  17. data/lib/apps/filebrowser/js/.DS_Store +0 -0
  18. data/lib/apps/filebrowser/js/daftos.js +1 -0
  19. data/lib/apps/filebrowser/options.json +7 -0
  20. data/lib/apps/photobooth/.DS_Store +0 -0
  21. data/lib/apps/photobooth/body.html +1 -0
  22. data/lib/apps/photobooth/coffee/photobooth.coffee +37 -0
  23. data/lib/apps/photobooth/coffee/test.html +278 -0
  24. data/lib/apps/photobooth/css/style.css +30 -0
  25. data/lib/apps/photobooth/js/.DS_Store +0 -0
  26. data/lib/apps/photobooth/js/daftos.js +1 -0
  27. data/lib/apps/photobooth/options.json +26 -0
  28. data/lib/apps/photobrowser/body.html +2 -0
  29. data/lib/apps/photobrowser/coffee/photobrowser.coffee +18 -0
  30. data/lib/apps/photobrowser/js/.DS_Store +0 -0
  31. data/lib/apps/photobrowser/options.json +16 -0
  32. data/lib/apps/texteditor/body.html +1 -0
  33. data/lib/apps/texteditor/coffee/texteditor.coffee +31 -0
  34. data/lib/apps/texteditor/js/.DS_Store +0 -0
  35. data/lib/apps/texteditor/js/ace-compat-noconflict.js +1 -0
  36. data/lib/apps/texteditor/js/ace-compat-uncompressed-noconflict.js +480 -0
  37. data/lib/apps/texteditor/js/ace-compat-uncompressed.js +480 -0
  38. data/lib/apps/texteditor/js/ace-compat.js +1 -0
  39. data/lib/apps/texteditor/js/ace-noconflict.js +10 -0
  40. data/lib/apps/texteditor/js/ace-uncompressed-noconflict.js +19559 -0
  41. data/lib/apps/texteditor/js/ace-uncompressed.js +19559 -0
  42. data/lib/apps/texteditor/js/ace.js +10 -0
  43. data/lib/apps/texteditor/js/keybinding-emacs-noconflict.js +1 -0
  44. data/lib/apps/texteditor/js/keybinding-emacs-uncompressed-noconflict.js +150 -0
  45. data/lib/apps/texteditor/js/keybinding-emacs-uncompressed.js +150 -0
  46. data/lib/apps/texteditor/js/keybinding-emacs.js +1 -0
  47. data/lib/apps/texteditor/js/keybinding-vim-noconflict.js +1 -0
  48. data/lib/apps/texteditor/js/keybinding-vim-uncompressed-noconflict.js +138 -0
  49. data/lib/apps/texteditor/js/keybinding-vim-uncompressed.js +138 -0
  50. data/lib/apps/texteditor/js/keybinding-vim.js +1 -0
  51. data/lib/apps/texteditor/js/mode-c_cpp-noconflict.js +1 -0
  52. data/lib/apps/texteditor/js/mode-c_cpp-uncompressed-noconflict.js +917 -0
  53. data/lib/apps/texteditor/js/mode-c_cpp-uncompressed.js +917 -0
  54. data/lib/apps/texteditor/js/mode-c_cpp.js +1 -0
  55. data/lib/apps/texteditor/js/mode-clojure-noconflict.js +1 -0
  56. data/lib/apps/texteditor/js/mode-clojure-uncompressed-noconflict.js +422 -0
  57. data/lib/apps/texteditor/js/mode-clojure-uncompressed.js +422 -0
  58. data/lib/apps/texteditor/js/mode-clojure.js +1 -0
  59. data/lib/apps/texteditor/js/mode-coffee-noconflict.js +1 -0
  60. data/lib/apps/texteditor/js/mode-coffee-uncompressed-noconflict.js +605 -0
  61. data/lib/apps/texteditor/js/mode-coffee-uncompressed.js +605 -0
  62. data/lib/apps/texteditor/js/mode-coffee.js +1 -0
  63. data/lib/apps/texteditor/js/mode-coldfusion-noconflict.js +1 -0
  64. data/lib/apps/texteditor/js/mode-coldfusion-uncompressed-noconflict.js +2454 -0
  65. data/lib/apps/texteditor/js/mode-coldfusion-uncompressed.js +2454 -0
  66. data/lib/apps/texteditor/js/mode-coldfusion.js +1 -0
  67. data/lib/apps/texteditor/js/mode-csharp-noconflict.js +1 -0
  68. data/lib/apps/texteditor/js/mode-csharp-uncompressed-noconflict.js +767 -0
  69. data/lib/apps/texteditor/js/mode-csharp-uncompressed.js +767 -0
  70. data/lib/apps/texteditor/js/mode-csharp.js +1 -0
  71. data/lib/apps/texteditor/js/mode-css-noconflict.js +1 -0
  72. data/lib/apps/texteditor/js/mode-css-uncompressed-noconflict.js +640 -0
  73. data/lib/apps/texteditor/js/mode-css-uncompressed.js +640 -0
  74. data/lib/apps/texteditor/js/mode-css.js +1 -0
  75. data/lib/apps/texteditor/js/mode-golang-noconflict.js +1 -0
  76. data/lib/apps/texteditor/js/mode-golang-uncompressed-noconflict.js +378 -0
  77. data/lib/apps/texteditor/js/mode-golang-uncompressed.js +378 -0
  78. data/lib/apps/texteditor/js/mode-golang.js +1 -0
  79. data/lib/apps/texteditor/js/mode-groovy-noconflict.js +1 -0
  80. data/lib/apps/texteditor/js/mode-groovy-uncompressed-noconflict.js +1391 -0
  81. data/lib/apps/texteditor/js/mode-groovy-uncompressed.js +1391 -0
  82. data/lib/apps/texteditor/js/mode-groovy.js +1 -0
  83. data/lib/apps/texteditor/js/mode-haxe-noconflict.js +1 -0
  84. data/lib/apps/texteditor/js/mode-haxe-uncompressed-noconflict.js +767 -0
  85. data/lib/apps/texteditor/js/mode-haxe-uncompressed.js +767 -0
  86. data/lib/apps/texteditor/js/mode-haxe.js +1 -0
  87. data/lib/apps/texteditor/js/mode-html-noconflict.js +1 -0
  88. data/lib/apps/texteditor/js/mode-html-uncompressed-noconflict.js +2470 -0
  89. data/lib/apps/texteditor/js/mode-html-uncompressed.js +2470 -0
  90. data/lib/apps/texteditor/js/mode-html.js +1 -0
  91. data/lib/apps/texteditor/js/mode-java-noconflict.js +1 -0
  92. data/lib/apps/texteditor/js/mode-java-uncompressed-noconflict.js +1393 -0
  93. data/lib/apps/texteditor/js/mode-java-uncompressed.js +1393 -0
  94. data/lib/apps/texteditor/js/mode-java.js +1 -0
  95. data/lib/apps/texteditor/js/mode-javascript-noconflict.js +1 -0
  96. data/lib/apps/texteditor/js/mode-javascript-uncompressed-noconflict.js +1224 -0
  97. data/lib/apps/texteditor/js/mode-javascript-uncompressed.js +1224 -0
  98. data/lib/apps/texteditor/js/mode-javascript.js +1 -0
  99. data/lib/apps/texteditor/js/mode-json-noconflict.js +1 -0
  100. data/lib/apps/texteditor/js/mode-json-uncompressed-noconflict.js +698 -0
  101. data/lib/apps/texteditor/js/mode-json-uncompressed.js +698 -0
  102. data/lib/apps/texteditor/js/mode-json.js +1 -0
  103. data/lib/apps/texteditor/js/mode-latex-noconflict.js +1 -0
  104. data/lib/apps/texteditor/js/mode-latex-uncompressed-noconflict.js +95 -0
  105. data/lib/apps/texteditor/js/mode-latex-uncompressed.js +95 -0
  106. data/lib/apps/texteditor/js/mode-latex.js +1 -0
  107. data/lib/apps/texteditor/js/mode-less-noconflict.js +1 -0
  108. data/lib/apps/texteditor/js/mode-less-uncompressed-noconflict.js +654 -0
  109. data/lib/apps/texteditor/js/mode-less-uncompressed.js +654 -0
  110. data/lib/apps/texteditor/js/mode-less.js +1 -0
  111. data/lib/apps/texteditor/js/mode-liquid-noconflict.js +1 -0
  112. data/lib/apps/texteditor/js/mode-liquid-uncompressed-noconflict.js +1353 -0
  113. data/lib/apps/texteditor/js/mode-liquid-uncompressed.js +1353 -0
  114. data/lib/apps/texteditor/js/mode-liquid.js +1 -0
  115. data/lib/apps/texteditor/js/mode-lua-noconflict.js +1 -0
  116. data/lib/apps/texteditor/js/mode-lua-uncompressed-noconflict.js +523 -0
  117. data/lib/apps/texteditor/js/mode-lua-uncompressed.js +523 -0
  118. data/lib/apps/texteditor/js/mode-lua.js +1 -0
  119. data/lib/apps/texteditor/js/mode-markdown-noconflict.js +1 -0
  120. data/lib/apps/texteditor/js/mode-markdown-uncompressed-noconflict.js +2918 -0
  121. data/lib/apps/texteditor/js/mode-markdown-uncompressed.js +2918 -0
  122. data/lib/apps/texteditor/js/mode-markdown.js +1 -0
  123. data/lib/apps/texteditor/js/mode-ocaml-noconflict.js +1 -0
  124. data/lib/apps/texteditor/js/mode-ocaml-uncompressed-noconflict.js +539 -0
  125. data/lib/apps/texteditor/js/mode-ocaml-uncompressed.js +539 -0
  126. data/lib/apps/texteditor/js/mode-ocaml.js +1 -0
  127. data/lib/apps/texteditor/js/mode-perl-noconflict.js +1 -0
  128. data/lib/apps/texteditor/js/mode-perl-uncompressed-noconflict.js +573 -0
  129. data/lib/apps/texteditor/js/mode-perl-uncompressed.js +573 -0
  130. data/lib/apps/texteditor/js/mode-perl.js +1 -0
  131. data/lib/apps/texteditor/js/mode-pgsql-noconflict.js +1 -0
  132. data/lib/apps/texteditor/js/mode-pgsql-uncompressed-noconflict.js +1104 -0
  133. data/lib/apps/texteditor/js/mode-pgsql-uncompressed.js +1104 -0
  134. data/lib/apps/texteditor/js/mode-pgsql.js +1 -0
  135. data/lib/apps/texteditor/js/mode-php-noconflict.js +1 -0
  136. data/lib/apps/texteditor/js/mode-php-uncompressed-noconflict.js +1883 -0
  137. data/lib/apps/texteditor/js/mode-php-uncompressed.js +1883 -0
  138. data/lib/apps/texteditor/js/mode-php.js +1 -0
  139. data/lib/apps/texteditor/js/mode-powershell-noconflict.js +1 -0
  140. data/lib/apps/texteditor/js/mode-powershell-uncompressed-noconflict.js +708 -0
  141. data/lib/apps/texteditor/js/mode-powershell-uncompressed.js +708 -0
  142. data/lib/apps/texteditor/js/mode-powershell.js +1 -0
  143. data/lib/apps/texteditor/js/mode-python-noconflict.js +1 -0
  144. data/lib/apps/texteditor/js/mode-python-uncompressed-noconflict.js +506 -0
  145. data/lib/apps/texteditor/js/mode-python-uncompressed.js +506 -0
  146. data/lib/apps/texteditor/js/mode-python.js +1 -0
  147. data/lib/apps/texteditor/js/mode-ruby-noconflict.js +1 -0
  148. data/lib/apps/texteditor/js/mode-ruby-uncompressed-noconflict.js +391 -0
  149. data/lib/apps/texteditor/js/mode-ruby-uncompressed.js +391 -0
  150. data/lib/apps/texteditor/js/mode-ruby.js +1 -0
  151. data/lib/apps/texteditor/js/mode-scad-noconflict.js +1 -0
  152. data/lib/apps/texteditor/js/mode-scad-uncompressed-noconflict.js +905 -0
  153. data/lib/apps/texteditor/js/mode-scad-uncompressed.js +905 -0
  154. data/lib/apps/texteditor/js/mode-scad.js +1 -0
  155. data/lib/apps/texteditor/js/mode-scala-noconflict.js +1 -0
  156. data/lib/apps/texteditor/js/mode-scala-uncompressed-noconflict.js +1393 -0
  157. data/lib/apps/texteditor/js/mode-scala-uncompressed.js +1393 -0
  158. data/lib/apps/texteditor/js/mode-scala.js +1 -0
  159. data/lib/apps/texteditor/js/mode-scss-noconflict.js +1 -0
  160. data/lib/apps/texteditor/js/mode-scss-uncompressed-noconflict.js +678 -0
  161. data/lib/apps/texteditor/js/mode-scss-uncompressed.js +678 -0
  162. data/lib/apps/texteditor/js/mode-scss.js +1 -0
  163. data/lib/apps/texteditor/js/mode-sh-noconflict.js +1 -0
  164. data/lib/apps/texteditor/js/mode-sh-uncompressed-noconflict.js +289 -0
  165. data/lib/apps/texteditor/js/mode-sh-uncompressed.js +289 -0
  166. data/lib/apps/texteditor/js/mode-sh.js +1 -0
  167. data/lib/apps/texteditor/js/mode-sql-noconflict.js +1 -0
  168. data/lib/apps/texteditor/js/mode-sql-uncompressed-noconflict.js +159 -0
  169. data/lib/apps/texteditor/js/mode-sql-uncompressed.js +159 -0
  170. data/lib/apps/texteditor/js/mode-sql.js +1 -0
  171. data/lib/apps/texteditor/js/mode-svg-noconflict.js +1 -0
  172. data/lib/apps/texteditor/js/mode-svg-uncompressed-noconflict.js +2133 -0
  173. data/lib/apps/texteditor/js/mode-svg-uncompressed.js +2133 -0
  174. data/lib/apps/texteditor/js/mode-svg.js +1 -0
  175. data/lib/apps/texteditor/js/mode-text-noconflict.js +0 -0
  176. data/lib/apps/texteditor/js/mode-text-uncompressed-noconflict.js +0 -0
  177. data/lib/apps/texteditor/js/mode-text-uncompressed.js +0 -0
  178. data/lib/apps/texteditor/js/mode-text.js +0 -0
  179. data/lib/apps/texteditor/js/mode-textile-noconflict.js +1 -0
  180. data/lib/apps/texteditor/js/mode-textile-uncompressed-noconflict.js +254 -0
  181. data/lib/apps/texteditor/js/mode-textile-uncompressed.js +254 -0
  182. data/lib/apps/texteditor/js/mode-textile.js +1 -0
  183. data/lib/apps/texteditor/js/mode-xml-noconflict.js +1 -0
  184. data/lib/apps/texteditor/js/mode-xml-uncompressed-noconflict.js +1009 -0
  185. data/lib/apps/texteditor/js/mode-xml-uncompressed.js +1009 -0
  186. data/lib/apps/texteditor/js/mode-xml.js +1 -0
  187. data/lib/apps/texteditor/js/mode-xquery-noconflict.js +1 -0
  188. data/lib/apps/texteditor/js/mode-xquery-uncompressed-noconflict.js +540 -0
  189. data/lib/apps/texteditor/js/mode-xquery-uncompressed.js +540 -0
  190. data/lib/apps/texteditor/js/mode-xquery.js +1 -0
  191. data/lib/apps/texteditor/js/theme-chrome-noconflict.js +1 -0
  192. data/lib/apps/texteditor/js/theme-chrome-uncompressed-noconflict.js +207 -0
  193. data/lib/apps/texteditor/js/theme-chrome-uncompressed.js +207 -0
  194. data/lib/apps/texteditor/js/theme-chrome.js +1 -0
  195. data/lib/apps/texteditor/js/theme-clouds-noconflict.js +1 -0
  196. data/lib/apps/texteditor/js/theme-clouds-uncompressed-noconflict.js +160 -0
  197. data/lib/apps/texteditor/js/theme-clouds-uncompressed.js +160 -0
  198. data/lib/apps/texteditor/js/theme-clouds.js +1 -0
  199. data/lib/apps/texteditor/js/theme-clouds_midnight-noconflict.js +1 -0
  200. data/lib/apps/texteditor/js/theme-clouds_midnight-uncompressed-noconflict.js +161 -0
  201. data/lib/apps/texteditor/js/theme-clouds_midnight-uncompressed.js +161 -0
  202. data/lib/apps/texteditor/js/theme-clouds_midnight.js +1 -0
  203. data/lib/apps/texteditor/js/theme-cobalt-noconflict.js +1 -0
  204. data/lib/apps/texteditor/js/theme-cobalt-uncompressed-noconflict.js +187 -0
  205. data/lib/apps/texteditor/js/theme-cobalt-uncompressed.js +187 -0
  206. data/lib/apps/texteditor/js/theme-cobalt.js +1 -0
  207. data/lib/apps/texteditor/js/theme-crimson_editor-noconflict.js +1 -0
  208. data/lib/apps/texteditor/js/theme-crimson_editor-uncompressed-noconflict.js +198 -0
  209. data/lib/apps/texteditor/js/theme-crimson_editor-uncompressed.js +198 -0
  210. data/lib/apps/texteditor/js/theme-crimson_editor.js +1 -0
  211. data/lib/apps/texteditor/js/theme-dawn-noconflict.js +1 -0
  212. data/lib/apps/texteditor/js/theme-dawn-uncompressed-noconflict.js +191 -0
  213. data/lib/apps/texteditor/js/theme-dawn-uncompressed.js +191 -0
  214. data/lib/apps/texteditor/js/theme-dawn.js +1 -0
  215. data/lib/apps/texteditor/js/theme-dreamweaver-noconflict.js +1 -0
  216. data/lib/apps/texteditor/js/theme-dreamweaver-uncompressed-noconflict.js +227 -0
  217. data/lib/apps/texteditor/js/theme-dreamweaver-uncompressed.js +227 -0
  218. data/lib/apps/texteditor/js/theme-dreamweaver.js +1 -0
  219. data/lib/apps/texteditor/js/theme-eclipse-noconflict.js +1 -0
  220. data/lib/apps/texteditor/js/theme-eclipse-uncompressed-noconflict.js +147 -0
  221. data/lib/apps/texteditor/js/theme-eclipse-uncompressed.js +147 -0
  222. data/lib/apps/texteditor/js/theme-eclipse.js +1 -0
  223. data/lib/apps/texteditor/js/theme-idle_fingers-noconflict.js +1 -0
  224. data/lib/apps/texteditor/js/theme-idle_fingers-uncompressed-noconflict.js +179 -0
  225. data/lib/apps/texteditor/js/theme-idle_fingers-uncompressed.js +179 -0
  226. data/lib/apps/texteditor/js/theme-idle_fingers.js +1 -0
  227. data/lib/apps/texteditor/js/theme-kr_theme-noconflict.js +1 -0
  228. data/lib/apps/texteditor/js/theme-kr_theme-uncompressed-noconflict.js +182 -0
  229. data/lib/apps/texteditor/js/theme-kr_theme-uncompressed.js +182 -0
  230. data/lib/apps/texteditor/js/theme-kr_theme.js +1 -0
  231. data/lib/apps/texteditor/js/theme-merbivore-noconflict.js +1 -0
  232. data/lib/apps/texteditor/js/theme-merbivore-uncompressed-noconflict.js +182 -0
  233. data/lib/apps/texteditor/js/theme-merbivore-uncompressed.js +182 -0
  234. data/lib/apps/texteditor/js/theme-merbivore.js +1 -0
  235. data/lib/apps/texteditor/js/theme-merbivore_soft-noconflict.js +1 -0
  236. data/lib/apps/texteditor/js/theme-merbivore_soft-uncompressed-noconflict.js +188 -0
  237. data/lib/apps/texteditor/js/theme-merbivore_soft-uncompressed.js +188 -0
  238. data/lib/apps/texteditor/js/theme-merbivore_soft.js +1 -0
  239. data/lib/apps/texteditor/js/theme-mono_industrial-noconflict.js +1 -0
  240. data/lib/apps/texteditor/js/theme-mono_industrial-uncompressed-noconflict.js +190 -0
  241. data/lib/apps/texteditor/js/theme-mono_industrial-uncompressed.js +190 -0
  242. data/lib/apps/texteditor/js/theme-mono_industrial.js +1 -0
  243. data/lib/apps/texteditor/js/theme-monokai-noconflict.js +1 -0
  244. data/lib/apps/texteditor/js/theme-monokai-uncompressed-noconflict.js +188 -0
  245. data/lib/apps/texteditor/js/theme-monokai-uncompressed.js +188 -0
  246. data/lib/apps/texteditor/js/theme-monokai.js +1 -0
  247. data/lib/apps/texteditor/js/theme-pastel_on_dark-noconflict.js +1 -0
  248. data/lib/apps/texteditor/js/theme-pastel_on_dark-uncompressed-noconflict.js +192 -0
  249. data/lib/apps/texteditor/js/theme-pastel_on_dark-uncompressed.js +192 -0
  250. data/lib/apps/texteditor/js/theme-pastel_on_dark.js +1 -0
  251. data/lib/apps/texteditor/js/theme-solarized_dark-noconflict.js +1 -0
  252. data/lib/apps/texteditor/js/theme-solarized_dark-uncompressed-noconflict.js +173 -0
  253. data/lib/apps/texteditor/js/theme-solarized_dark-uncompressed.js +173 -0
  254. data/lib/apps/texteditor/js/theme-solarized_dark.js +1 -0
  255. data/lib/apps/texteditor/js/theme-solarized_light-noconflict.js +1 -0
  256. data/lib/apps/texteditor/js/theme-solarized_light-uncompressed-noconflict.js +172 -0
  257. data/lib/apps/texteditor/js/theme-solarized_light-uncompressed.js +172 -0
  258. data/lib/apps/texteditor/js/theme-solarized_light.js +1 -0
  259. data/lib/apps/texteditor/js/theme-textmate-noconflict.js +0 -0
  260. data/lib/apps/texteditor/js/theme-textmate-uncompressed-noconflict.js +0 -0
  261. data/lib/apps/texteditor/js/theme-textmate-uncompressed.js +0 -0
  262. data/lib/apps/texteditor/js/theme-textmate.js +0 -0
  263. data/lib/apps/texteditor/js/theme-tomorrow-noconflict.js +1 -0
  264. data/lib/apps/texteditor/js/theme-tomorrow-uncompressed-noconflict.js +206 -0
  265. data/lib/apps/texteditor/js/theme-tomorrow-uncompressed.js +206 -0
  266. data/lib/apps/texteditor/js/theme-tomorrow.js +1 -0
  267. data/lib/apps/texteditor/js/theme-tomorrow_night-noconflict.js +1 -0
  268. data/lib/apps/texteditor/js/theme-tomorrow_night-uncompressed-noconflict.js +206 -0
  269. data/lib/apps/texteditor/js/theme-tomorrow_night-uncompressed.js +206 -0
  270. data/lib/apps/texteditor/js/theme-tomorrow_night.js +1 -0
  271. data/lib/apps/texteditor/js/theme-tomorrow_night_blue-noconflict.js +1 -0
  272. data/lib/apps/texteditor/js/theme-tomorrow_night_blue-uncompressed-noconflict.js +206 -0
  273. data/lib/apps/texteditor/js/theme-tomorrow_night_blue-uncompressed.js +206 -0
  274. data/lib/apps/texteditor/js/theme-tomorrow_night_blue.js +1 -0
  275. data/lib/apps/texteditor/js/theme-tomorrow_night_bright-noconflict.js +1 -0
  276. data/lib/apps/texteditor/js/theme-tomorrow_night_bright-uncompressed-noconflict.js +206 -0
  277. data/lib/apps/texteditor/js/theme-tomorrow_night_bright-uncompressed.js +206 -0
  278. data/lib/apps/texteditor/js/theme-tomorrow_night_bright.js +1 -0
  279. data/lib/apps/texteditor/js/theme-tomorrow_night_eighties-noconflict.js +1 -0
  280. data/lib/apps/texteditor/js/theme-tomorrow_night_eighties-uncompressed-noconflict.js +202 -0
  281. data/lib/apps/texteditor/js/theme-tomorrow_night_eighties-uncompressed.js +202 -0
  282. data/lib/apps/texteditor/js/theme-tomorrow_night_eighties.js +1 -0
  283. data/lib/apps/texteditor/js/theme-twilight-noconflict.js +1 -0
  284. data/lib/apps/texteditor/js/theme-twilight-uncompressed-noconflict.js +204 -0
  285. data/lib/apps/texteditor/js/theme-twilight-uncompressed.js +204 -0
  286. data/lib/apps/texteditor/js/theme-twilight.js +1 -0
  287. data/lib/apps/texteditor/js/theme-vibrant_ink-noconflict.js +1 -0
  288. data/lib/apps/texteditor/js/theme-vibrant_ink-uncompressed-noconflict.js +183 -0
  289. data/lib/apps/texteditor/js/theme-vibrant_ink-uncompressed.js +183 -0
  290. data/lib/apps/texteditor/js/theme-vibrant_ink.js +1 -0
  291. data/lib/apps/texteditor/js/worker-coffee.js +7991 -0
  292. data/lib/apps/texteditor/js/worker-css.js +12224 -0
  293. data/lib/apps/texteditor/js/worker-javascript.js +11124 -0
  294. data/lib/apps/texteditor/js/worker-json.js +3593 -0
  295. data/lib/apps/texteditor/options.json +16 -0
  296. data/lib/daftos/.DS_Store +0 -0
  297. data/lib/daftos/server.rb +106 -0
  298. data/lib/daftos/views/app_footer.erb +2 -0
  299. data/lib/daftos/views/app_header.erb +33 -0
  300. data/lib/daftos.rb +25 -2
  301. data/lib/libs/.DS_Store +0 -0
  302. data/lib/libs/coffee/daftos.coffee +36 -0
  303. data/lib/libs/css/bootstrap.css +3496 -0
  304. data/lib/libs/js/bootstrap.js +1720 -0
  305. data/lib/libs/js/jquery.js +4 -0
  306. data/myapp.pid +1 -0
  307. metadata +325 -12
@@ -0,0 +1,1353 @@
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3
+ *
4
+ * The contents of this file are subject to the Mozilla Public License Version
5
+ * 1.1 (the "License"); you may not use this file except in compliance with
6
+ * the License. You may obtain a copy of the License at
7
+ * http://www.mozilla.org/MPL/
8
+ *
9
+ * Software distributed under the License is distributed on an "AS IS" basis,
10
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11
+ * for the specific language governing rights and limitations under the
12
+ * License.
13
+ *
14
+ * The Original Code is Ajax.org Code Editor (ACE).
15
+ *
16
+ * The Initial Developer of the Original Code is
17
+ * Ajax.org B.V.
18
+ * Portions created by the Initial Developer are Copyright (C) 2010
19
+ * the Initial Developer. All Rights Reserved.
20
+ *
21
+ * Contributor(s):
22
+ * Fabian Jakobs <fabian AT ajax DOT org>
23
+ *
24
+ * Alternatively, the contents of this file may be used under the terms of
25
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
26
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27
+ * in which case the provisions of the GPL or the LGPL are applicable instead
28
+ * of those above. If you wish to allow use of your version of this file only
29
+ * under the terms of either the GPL or the LGPL, and not to allow others to
30
+ * use your version of this file under the terms of the MPL, indicate your
31
+ * decision by deleting the provisions above and replace them with the notice
32
+ * and other provisions required by the GPL or the LGPL. If you do not delete
33
+ * the provisions above, a recipient may use your version of this file under
34
+ * the terms of any one of the MPL, the GPL or the LGPL.
35
+ *
36
+ * ***** END LICENSE BLOCK ***** */
37
+
38
+ define('ace/mode/liquid', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/liquid_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(require, exports, module) {
39
+
40
+ var oop = require("../lib/oop");
41
+ var TextMode = require("./text").Mode;
42
+ var Tokenizer = require("../tokenizer").Tokenizer;
43
+ var LiquidHighlightRules = require("./liquid_highlight_rules").LiquidHighlightRules;
44
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
45
+ var Range = require("../range").Range;
46
+
47
+ var Mode = function() {
48
+ this.$tokenizer = new Tokenizer(new LiquidHighlightRules().getRules());
49
+ this.$outdent = new MatchingBraceOutdent();
50
+ };
51
+ oop.inherits(Mode, TextMode);
52
+
53
+ (function() {
54
+
55
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
56
+ var outdent = true;
57
+ var outentedRows = [];
58
+ var re = /^(\s*)#/;
59
+
60
+ for (var i=startRow; i<= endRow; i++) {
61
+ if (!re.test(doc.getLine(i))) {
62
+ outdent = false;
63
+ break;
64
+ }
65
+ }
66
+
67
+ if (outdent) {
68
+ var deleteRange = new Range(0, 0, 0, 0);
69
+ for (var i=startRow; i<= endRow; i++)
70
+ {
71
+ var line = doc.getLine(i);
72
+ var m = line.match(re);
73
+ deleteRange.start.row = i;
74
+ deleteRange.end.row = i;
75
+ deleteRange.end.column = m[0].length;
76
+ doc.replace(deleteRange, m[1]);
77
+ }
78
+ }
79
+ else {
80
+ doc.indentRows(startRow, endRow, "#");
81
+ }
82
+ };
83
+
84
+ this.getNextLineIndent = function(state, line, tab) {
85
+ var indent = this.$getIndent(line);
86
+
87
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
88
+ var tokens = tokenizedLine.tokens;
89
+ var endState = tokenizedLine.state;
90
+
91
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
92
+ return indent;
93
+ }
94
+
95
+ if (state == "start") {
96
+ var match = line.match(/^.*[\{\(\[]\s*$/);
97
+ if (match) {
98
+ indent += tab;
99
+ }
100
+ }
101
+
102
+ return indent;
103
+ };
104
+
105
+ this.checkOutdent = function(state, line, input) {
106
+ return this.$outdent.checkOutdent(line, input);
107
+ };
108
+
109
+ this.autoOutdent = function(state, doc, row) {
110
+ this.$outdent.autoOutdent(doc, row);
111
+ };
112
+
113
+ }).call(Mode.prototype);
114
+
115
+ exports.Mode = Mode;
116
+ });
117
+ /* ***** BEGIN LICENSE BLOCK *****
118
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
119
+ *
120
+ * The contents of this file are subject to the Mozilla Public License Version
121
+ * 1.1 (the "License"); you may not use this file except in compliance with
122
+ * the License. You may obtain a copy of the License at
123
+ * http://www.mozilla.org/MPL/
124
+ *
125
+ * Software distributed under the License is distributed on an "AS IS" basis,
126
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
127
+ * for the specific language governing rights and limitations under the
128
+ * License.
129
+ *
130
+ * The Original Code is Ajax.org Code Editor (ACE).
131
+ *
132
+ * The Initial Developer of the Original Code is
133
+ * Ajax.org B.V.
134
+ * Portions created by the Initial Developer are Copyright (C) 2010
135
+ * the Initial Developer. All Rights Reserved.
136
+ *
137
+ * Contributor(s):
138
+ * Fabian Jakobs <fabian AT ajax DOT org>
139
+ *
140
+ * Alternatively, the contents of this file may be used under the terms of
141
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
142
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
143
+ * in which case the provisions of the GPL or the LGPL are applicable instead
144
+ * of those above. If you wish to allow use of your version of this file only
145
+ * under the terms of either the GPL or the LGPL, and not to allow others to
146
+ * use your version of this file under the terms of the MPL, indicate your
147
+ * decision by deleting the provisions above and replace them with the notice
148
+ * and other provisions required by the GPL or the LGPL. If you do not delete
149
+ * the provisions above, a recipient may use your version of this file under
150
+ * the terms of any one of the MPL, the GPL or the LGPL.
151
+ *
152
+ * ***** END LICENSE BLOCK ***** */
153
+
154
+ define('ace/mode/liquid_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/lib/lang', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
155
+ "use strict";
156
+
157
+ var oop = require("../lib/oop");
158
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
159
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
160
+ var lang = require("../lib/lang");
161
+ var xmlUtil = require("./xml_util");
162
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
163
+
164
+ var LiquidHighlightRules = function() {
165
+
166
+ // see: https://developer.mozilla.org/en/Liquid/Reference/Global_Objects
167
+ var functions = lang.arrayToMap(
168
+ // Standard Filters
169
+ ("date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|" +
170
+ "escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|" +
171
+ "truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split"
172
+ ).split("|")
173
+ );
174
+
175
+ var keywords = lang.arrayToMap(
176
+ // Standard Tags
177
+ ("capture|endcapture|case|endcase|when|comment|endcomment|" +
178
+ "cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|" +
179
+ // Commonly used tags
180
+ "style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow").split("|")
181
+ );
182
+
183
+ var builtinVariables = lang.arrayToMap(
184
+ ['forloop']
185
+ // ("forloop\\.(length|index|index0|rindex|rindex0|first|last)|limit|offset|range" +
186
+ // "tablerowloop\\.(length|index|index0|rindex|rindex0|first|last|col|col0|"+
187
+ // "col_first|col_last)").split("|")
188
+ );
189
+
190
+ var definitions = lang.arrayToMap(("assign").split("|"));
191
+
192
+ // regexp must not have capturing parentheses. Use (?:) instead.
193
+ // regexps are ordered -> the first match is used
194
+
195
+ this.$rules = {
196
+ start : [{
197
+ token : "variable",
198
+ regex : "{%",
199
+ next : "liquid_start"
200
+ }, {
201
+ token : "variable",
202
+ regex : "{{",
203
+ next : "liquid_start"
204
+ }, {
205
+ token : "meta.tag",
206
+ merge : true,
207
+ regex : "<\\!\\[CDATA\\[",
208
+ next : "cdata"
209
+ }, {
210
+ token : "xml_pe",
211
+ regex : "<\\?.*?\\?>"
212
+ }, {
213
+ token : "comment",
214
+ merge : true,
215
+ regex : "<\\!--",
216
+ next : "comment"
217
+ }, {
218
+ token : "meta.tag",
219
+ regex : "<(?=\\s*script\\b)",
220
+ next : "script"
221
+ }, {
222
+ token : "meta.tag",
223
+ regex : "<(?=\\s*style\\b)",
224
+ next : "style"
225
+ }, {
226
+ token : "meta.tag", // opening tag
227
+ regex : "<\\/?",
228
+ next : "tag"
229
+ }, {
230
+ token : "text",
231
+ regex : "\\s+"
232
+ }, {
233
+ token : "text",
234
+ regex : "[^<]+"
235
+ } ],
236
+
237
+ cdata : [ {
238
+ token : "text",
239
+ regex : "\\]\\]>",
240
+ next : "start"
241
+ }, {
242
+ token : "text",
243
+ merge : true,
244
+ regex : "\\s+"
245
+ }, {
246
+ token : "text",
247
+ merge : true,
248
+ regex : ".+"
249
+ } ],
250
+
251
+ comment : [ {
252
+ token : "comment",
253
+ regex : ".*?-->",
254
+ next : "start"
255
+ }, {
256
+ token : "comment",
257
+ merge : true,
258
+ regex : ".+"
259
+ } ] ,
260
+
261
+ liquid_start : [{
262
+ token: "variable",
263
+ regex: "}}",
264
+ next: "start"
265
+ }, {
266
+ token: "variable",
267
+ regex: "%}",
268
+ next: "start"
269
+ }, {
270
+ token : "string", // single line
271
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
272
+ }, {
273
+ token : "string", // single line
274
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
275
+ }, {
276
+ token : "constant.numeric", // hex
277
+ regex : "0[xX][0-9a-fA-F]+\\b"
278
+ }, {
279
+ token : "constant.numeric", // float
280
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
281
+ }, {
282
+ token : "constant.language.boolean",
283
+ regex : "(?:true|false)\\b"
284
+ }, {
285
+ token : function(value) {
286
+ if (functions.hasOwnProperty(value))
287
+ return "support.function";
288
+ else if (keywords.hasOwnProperty(value))
289
+ return "keyword";
290
+ else if (builtinVariables.hasOwnProperty(value))
291
+ return "variable.language";
292
+ else if (definitions.hasOwnProperty(value))
293
+ return "keyword.definition";
294
+ else
295
+ return "identifier";
296
+ },
297
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
298
+ }, {
299
+ token : "keyword.operator",
300
+ regex : "\/|\\*|\\-|\\+|=|!=|\\?\\:"
301
+ }, {
302
+ token : "paren.lparen",
303
+ regex : /[\[\({]/
304
+ }, {
305
+ token : "paren.rparen",
306
+ regex : /[\])}]/
307
+ }, {
308
+ token : "text",
309
+ regex : "\\s+"
310
+ }]
311
+ };
312
+
313
+ xmlUtil.tag(this.$rules, "tag", "start");
314
+ xmlUtil.tag(this.$rules, "style", "css-start");
315
+ xmlUtil.tag(this.$rules, "script", "js-start");
316
+
317
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
318
+ token: "comment",
319
+ regex: "\\/\\/.*(?=<\\/script>)",
320
+ next: "tag"
321
+ }, {
322
+ token: "meta.tag",
323
+ regex: "<\\/(?=script)",
324
+ next: "tag"
325
+ }]);
326
+
327
+ this.embedRules(CssHighlightRules, "css-", [{
328
+ token: "meta.tag",
329
+ regex: "<\\/(?=style)",
330
+ next: "tag"
331
+ }]);
332
+ };
333
+ oop.inherits(LiquidHighlightRules, TextHighlightRules);
334
+
335
+ exports.LiquidHighlightRules = LiquidHighlightRules;
336
+ });
337
+ /* ***** BEGIN LICENSE BLOCK *****
338
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
339
+ *
340
+ * The contents of this file are subject to the Mozilla Public License Version
341
+ * 1.1 (the "License"); you may not use this file except in compliance with
342
+ * the License. You may obtain a copy of the License at
343
+ * http://www.mozilla.org/MPL/
344
+ *
345
+ * Software distributed under the License is distributed on an "AS IS" basis,
346
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
347
+ * for the specific language governing rights and limitations under the
348
+ * License.
349
+ *
350
+ * The Original Code is Ajax.org Code Editor (ACE).
351
+ *
352
+ * The Initial Developer of the Original Code is
353
+ * Ajax.org B.V.
354
+ * Portions created by the Initial Developer are Copyright (C) 2010
355
+ * the Initial Developer. All Rights Reserved.
356
+ *
357
+ * Contributor(s):
358
+ * Fabian Jakobs <fabian AT ajax DOT org>
359
+ *
360
+ * Alternatively, the contents of this file may be used under the terms of
361
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
362
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
363
+ * in which case the provisions of the GPL or the LGPL are applicable instead
364
+ * of those above. If you wish to allow use of your version of this file only
365
+ * under the terms of either the GPL or the LGPL, and not to allow others to
366
+ * use your version of this file under the terms of the MPL, indicate your
367
+ * decision by deleting the provisions above and replace them with the notice
368
+ * and other provisions required by the GPL or the LGPL. If you do not delete
369
+ * the provisions above, a recipient may use your version of this file under
370
+ * the terms of any one of the MPL, the GPL or the LGPL.
371
+ *
372
+ * ***** END LICENSE BLOCK ***** */
373
+
374
+ define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
375
+ "use strict";
376
+
377
+ var oop = require("../lib/oop");
378
+ var lang = require("../lib/lang");
379
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
380
+
381
+ var CssHighlightRules = function() {
382
+
383
+ var properties = lang.arrayToMap(
384
+ ("animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index").split("|")
385
+ );
386
+
387
+ var functions = lang.arrayToMap(
388
+ ("rgb|rgba|url|attr|counter|counters").split("|")
389
+ );
390
+
391
+ var constants = lang.arrayToMap(
392
+ ("absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|font-size|font|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero").split("|")
393
+ );
394
+
395
+ var colors = lang.arrayToMap(
396
+ ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
397
+ "purple|red|silver|teal|white|yellow").split("|")
398
+ );
399
+
400
+ var fonts = lang.arrayToMap(
401
+ ("arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|" +
402
+ "symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|" +
403
+ "serif|monospace").split("|")
404
+ );
405
+
406
+ // regexp must not have capturing parentheses. Use (?:) instead.
407
+ // regexps are ordered -> the first match is used
408
+
409
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
410
+ var pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
411
+ var pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
412
+
413
+ var base_ruleset = [
414
+ {
415
+ token : "comment", // multi line comment
416
+ merge : true,
417
+ regex : "\\/\\*",
418
+ next : "ruleset_comment"
419
+ }, {
420
+ token : "string", // single line
421
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
422
+ }, {
423
+ token : "string", // single line
424
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
425
+ }, {
426
+ token : ["constant.numeric", "keyword"],
427
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
428
+ }, {
429
+ token : ["constant.numeric"],
430
+ regex : "([0-9]+)"
431
+ }, {
432
+ token : "constant.numeric", // hex6 color
433
+ regex : "#[a-f0-9]{6}"
434
+ }, {
435
+ token : "constant.numeric", // hex3 color
436
+ regex : "#[a-f0-9]{3}"
437
+ }, {
438
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
439
+ regex : pseudoElements
440
+ }, {
441
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
442
+ regex : pseudoClasses
443
+ }, {
444
+ token : function(value) {
445
+ if (properties.hasOwnProperty(value.toLowerCase())) {
446
+ return "support.type";
447
+ }
448
+ else if (functions.hasOwnProperty(value.toLowerCase())) {
449
+ return "support.function";
450
+ }
451
+ else if (constants.hasOwnProperty(value.toLowerCase())) {
452
+ return "support.constant";
453
+ }
454
+ else if (colors.hasOwnProperty(value.toLowerCase())) {
455
+ return "support.constant.color";
456
+ }
457
+ else if (fonts.hasOwnProperty(value.toLowerCase())) {
458
+ return "support.constant.fonts";
459
+ }
460
+ else {
461
+ return "text";
462
+ }
463
+ },
464
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
465
+ }
466
+ ];
467
+
468
+ var ruleset = lang.copyArray(base_ruleset);
469
+ ruleset.unshift({
470
+ token : "paren.rparen",
471
+ regex : "\\}",
472
+ next: "start"
473
+ });
474
+
475
+ var media_ruleset = lang.copyArray( base_ruleset );
476
+ media_ruleset.unshift({
477
+ token : "paren.rparen",
478
+ regex : "\\}",
479
+ next: "media"
480
+ });
481
+
482
+ var base_comment = [{
483
+ token : "comment", // comment spanning whole line
484
+ merge : true,
485
+ regex : ".+"
486
+ }];
487
+
488
+ var comment = lang.copyArray(base_comment);
489
+ comment.unshift({
490
+ token : "comment", // closing comment
491
+ regex : ".*?\\*\\/",
492
+ next : "start"
493
+ });
494
+
495
+ var media_comment = lang.copyArray(base_comment);
496
+ media_comment.unshift({
497
+ token : "comment", // closing comment
498
+ regex : ".*?\\*\\/",
499
+ next : "media"
500
+ });
501
+
502
+ var ruleset_comment = lang.copyArray(base_comment);
503
+ ruleset_comment.unshift({
504
+ token : "comment", // closing comment
505
+ regex : ".*?\\*\\/",
506
+ next : "ruleset"
507
+ });
508
+
509
+ this.$rules = {
510
+ "start" : [{
511
+ token : "comment", // multi line comment
512
+ merge : true,
513
+ regex : "\\/\\*",
514
+ next : "comment"
515
+ }, {
516
+ token: "paren.lparen",
517
+ regex: "\\{",
518
+ next: "ruleset"
519
+ }, {
520
+ token: "string",
521
+ regex: "@.*?{",
522
+ next: "media"
523
+ },{
524
+ token: "keyword",
525
+ regex: "#[a-z0-9-_]+"
526
+ },{
527
+ token: "variable",
528
+ regex: "\\.[a-z0-9-_]+"
529
+ },{
530
+ token: "string",
531
+ regex: ":[a-z0-9-_]+"
532
+ },{
533
+ token: "constant",
534
+ regex: "[a-z0-9-_]+"
535
+ }],
536
+
537
+ "media" : [ {
538
+ token : "comment", // multi line comment
539
+ merge : true,
540
+ regex : "\\/\\*",
541
+ next : "media_comment"
542
+ }, {
543
+ token: "paren.lparen",
544
+ regex: "\\{",
545
+ next: "media_ruleset"
546
+ },{
547
+ token: "string",
548
+ regex: "\\}",
549
+ next: "start"
550
+ },{
551
+ token: "keyword",
552
+ regex: "#[a-z0-9-_]+"
553
+ },{
554
+ token: "variable",
555
+ regex: "\\.[a-z0-9-_]+"
556
+ },{
557
+ token: "string",
558
+ regex: ":[a-z0-9-_]+"
559
+ },{
560
+ token: "constant",
561
+ regex: "[a-z0-9-_]+"
562
+ }],
563
+
564
+ "comment" : comment,
565
+
566
+ "ruleset" : ruleset,
567
+ "ruleset_comment" : ruleset_comment,
568
+
569
+ "media_ruleset" : media_ruleset,
570
+ "media_comment" : media_comment
571
+ };
572
+ };
573
+
574
+ oop.inherits(CssHighlightRules, TextHighlightRules);
575
+
576
+ exports.CssHighlightRules = CssHighlightRules;
577
+
578
+ });
579
+ /* ***** BEGIN LICENSE BLOCK *****
580
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
581
+ *
582
+ * The contents of this file are subject to the Mozilla Public License Version
583
+ * 1.1 (the "License"); you may not use this file except in compliance with
584
+ * the License. You may obtain a copy of the License at
585
+ * http://www.mozilla.org/MPL/
586
+ *
587
+ * Software distributed under the License is distributed on an "AS IS" basis,
588
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
589
+ * for the specific language governing rights and limitations under the
590
+ * License.
591
+ *
592
+ * The Original Code is Ajax.org Code Editor (ACE).
593
+ *
594
+ * The Initial Developer of the Original Code is
595
+ * Ajax.org B.V.
596
+ * Portions created by the Initial Developer are Copyright (C) 2010
597
+ * the Initial Developer. All Rights Reserved.
598
+ *
599
+ * Contributor(s):
600
+ * Fabian Jakobs <fabian AT ajax DOT org>
601
+ * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
602
+ *
603
+ * Alternatively, the contents of this file may be used under the terms of
604
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
605
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
606
+ * in which case the provisions of the GPL or the LGPL are applicable instead
607
+ * of those above. If you wish to allow use of your version of this file only
608
+ * under the terms of either the GPL or the LGPL, and not to allow others to
609
+ * use your version of this file under the terms of the MPL, indicate your
610
+ * decision by deleting the provisions above and replace them with the notice
611
+ * and other provisions required by the GPL or the LGPL. If you do not delete
612
+ * the provisions above, a recipient may use your version of this file under
613
+ * the terms of any one of the MPL, the GPL or the LGPL.
614
+ *
615
+ * ***** END LICENSE BLOCK ***** */
616
+
617
+ define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
618
+ "use strict";
619
+
620
+ var oop = require("../lib/oop");
621
+ var lang = require("../lib/lang");
622
+ var unicode = require("../unicode");
623
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
624
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
625
+
626
+ var JavaScriptHighlightRules = function() {
627
+
628
+ // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
629
+ var globals = lang.arrayToMap(
630
+ // Constructors
631
+ ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
632
+ // E4X
633
+ "Namespace|QName|XML|XMLList|" +
634
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
635
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
636
+ // Errors
637
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
638
+ "SyntaxError|TypeError|URIError|" +
639
+ // Non-constructor functions
640
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
641
+ "isNaN|parseFloat|parseInt|" +
642
+ // Other
643
+ "JSON|Math|" +
644
+ // Pseudo
645
+ "this|arguments|prototype|window|document"
646
+ ).split("|")
647
+ );
648
+
649
+ var keywords = lang.arrayToMap(
650
+ ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
651
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
652
+ "const|yield|import|get|set").split("|")
653
+ );
654
+
655
+ // keywords which can be followed by regular expressions
656
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
657
+
658
+ var deprecated = lang.arrayToMap(
659
+ ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
660
+ );
661
+
662
+ var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
663
+
664
+ var buildinConstants = lang.arrayToMap(
665
+ ("null|Infinity|NaN|undefined").split("|")
666
+ );
667
+
668
+ var futureReserved = lang.arrayToMap(
669
+ ("class|enum|extends|super|export|implements|private|" +
670
+ "public|interface|package|protected|static").split("|")
671
+ );
672
+
673
+ // TODO: Unicode escape sequences
674
+ var identifierRe = "[" + unicode.packages.L + "\\$_]["
675
+ + unicode.packages.L
676
+ + unicode.packages.Mn + unicode.packages.Mc
677
+ + unicode.packages.Nd
678
+ + unicode.packages.Pc + "\\$_]*\\b";
679
+
680
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
681
+ "u[0-9a-fA-F]{4}|" + // unicode
682
+ "[0-2][0-7]{0,2}|" + // oct
683
+ "3[0-6][0-7]?|" + // oct
684
+ "37[0-7]?|" + // oct
685
+ "[4-7][0-7]?|" + //oct
686
+ ".)";
687
+
688
+ // regexp must not have capturing parentheses. Use (?:) instead.
689
+ // regexps are ordered -> the first match is used
690
+
691
+ this.$rules = {
692
+ "start" : [
693
+ {
694
+ token : "comment",
695
+ regex : /\/\/.*$/
696
+ },
697
+ DocCommentHighlightRules.getStartRule("doc-start"),
698
+ {
699
+ token : "comment", // multi line comment
700
+ merge : true,
701
+ regex : /\/\*/,
702
+ next : "comment"
703
+ }, {
704
+ token : "string",
705
+ regex : "'(?=.)",
706
+ next : "qstring"
707
+ }, {
708
+ token : "string",
709
+ regex : '"(?=.)',
710
+ next : "qqstring"
711
+ }, {
712
+ token : "constant.numeric", // hex
713
+ regex : /0[xX][0-9a-fA-F]+\b/
714
+ }, {
715
+ token : "constant.numeric", // float
716
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
717
+ }, { // match stuff like: Sound.prototype.play = function() { }
718
+ token : [
719
+ "storage.type",
720
+ "punctuation.operator",
721
+ "support.function",
722
+ "punctuation.operator",
723
+ "entity.name.function",
724
+ "text",
725
+ "keyword.operator",
726
+ "text",
727
+ "storage.type",
728
+ "text",
729
+ "paren.lparen"
730
+ ],
731
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
732
+ next: "function_arguments"
733
+ }, { // match stuff like: Sound.prototype.play = myfunc
734
+ token : [
735
+ "storage.type",
736
+ "punctuation.operator",
737
+ "support.function",
738
+ "punctuation.operator",
739
+ "entity.name.function",
740
+ "text",
741
+ "keyword.operator",
742
+ "text"
743
+ ],
744
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)",
745
+ next: "function_arguments"
746
+ }, { // match stuff like: Sound.play = function() { }
747
+ token : [
748
+ "storage.type",
749
+ "punctuation.operator",
750
+ "entity.name.function",
751
+ "text",
752
+ "keyword.operator",
753
+ "text",
754
+ "storage.type",
755
+ "text",
756
+ "paren.lparen"
757
+ ],
758
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
759
+ next: "function_arguments"
760
+ }, { // match stuff like: play = function() { }
761
+ token : [
762
+ "entity.name.function",
763
+ "text",
764
+ "keyword.operator",
765
+ "text",
766
+ "storage.type",
767
+ "text",
768
+ "paren.lparen"
769
+ ],
770
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
771
+ next: "function_arguments"
772
+ }, { // match regular function like: function myFunc(arg) { }
773
+ token : [
774
+ "storage.type",
775
+ "text",
776
+ "entity.name.function",
777
+ "text",
778
+ "paren.lparen"
779
+ ],
780
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
781
+ next: "function_arguments"
782
+ }, { // match stuff like: foobar: function() { }
783
+ token : [
784
+ "entity.name.function",
785
+ "text",
786
+ "punctuation.operator",
787
+ "text",
788
+ "storage.type",
789
+ "text",
790
+ "paren.lparen"
791
+ ],
792
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
793
+ next: "function_arguments"
794
+ }, { // Attempt to match : function() { } (this is for issues with 'foo': function() { })
795
+ token : [
796
+ "text",
797
+ "text",
798
+ "storage.type",
799
+ "text",
800
+ "paren.lparen"
801
+ ],
802
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
803
+ next: "function_arguments"
804
+ }, {
805
+ token : "constant.language.boolean",
806
+ regex : /(?:true|false)\b/
807
+ }, {
808
+ token : "keyword",
809
+ regex : "(?:" + kwBeforeRe + ")\\b",
810
+ next : "regex_allowed"
811
+ }, {
812
+ token : ["punctuation.operator", "support.function"],
813
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
814
+ }, {
815
+ token : ["punctuation.operator", "support.function.dom"],
816
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
817
+ }, {
818
+ token : ["punctuation.operator", "support.constant"],
819
+ regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
820
+ }, {
821
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
822
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
823
+ }, {
824
+ token : function(value) {
825
+ if (globals.hasOwnProperty(value))
826
+ return "variable.language";
827
+ else if (deprecated.hasOwnProperty(value))
828
+ return "invalid.deprecated";
829
+ else if (definitions.hasOwnProperty(value))
830
+ return "storage.type";
831
+ else if (keywords.hasOwnProperty(value))
832
+ return "keyword";
833
+ else if (buildinConstants.hasOwnProperty(value))
834
+ return "constant.language";
835
+ else if (futureReserved.hasOwnProperty(value))
836
+ return "invalid.illegal";
837
+ else if (value == "debugger")
838
+ return "invalid.deprecated";
839
+ else
840
+ return "identifier";
841
+ },
842
+ regex : identifierRe
843
+ }, {
844
+ token : "keyword.operator",
845
+ regex : /!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,
846
+ next : "regex_allowed"
847
+ }, {
848
+ token : "punctuation.operator",
849
+ regex : /\?|\:|\,|\;|\./,
850
+ next : "regex_allowed"
851
+ }, {
852
+ token : "paren.lparen",
853
+ regex : /[\[({]/,
854
+ next : "regex_allowed"
855
+ }, {
856
+ token : "paren.rparen",
857
+ regex : /[\])}]/
858
+ }, {
859
+ token : "keyword.operator",
860
+ regex : /\/=?/,
861
+ next : "regex_allowed"
862
+ }, {
863
+ token: "comment",
864
+ regex: /^#!.*$/
865
+ }, {
866
+ token : "text",
867
+ regex : /\s+/
868
+ }
869
+ ],
870
+ // regular expressions are only allowed after certain tokens. This
871
+ // makes sure we don't mix up regexps with the divison operator
872
+ "regex_allowed": [
873
+ DocCommentHighlightRules.getStartRule("doc-start"),
874
+ {
875
+ token : "comment", // multi line comment
876
+ merge : true,
877
+ regex : "\\/\\*",
878
+ next : "comment_regex_allowed"
879
+ }, {
880
+ token : "comment",
881
+ regex : "\\/\\/.*$"
882
+ }, {
883
+ token: "string.regexp",
884
+ regex: "\\/",
885
+ next: "regex",
886
+ merge: true
887
+ }, {
888
+ token : "text",
889
+ regex : "\\s+"
890
+ }, {
891
+ // immediately return to the start mode without matching
892
+ // anything
893
+ token: "empty",
894
+ regex: "",
895
+ next: "start"
896
+ }
897
+ ],
898
+ "regex": [
899
+ {
900
+ token: "regexp.keyword.operator",
901
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
902
+ }, {
903
+ // flag
904
+ token: "string.regexp",
905
+ regex: "/\\w*",
906
+ next: "start",
907
+ merge: true
908
+ }, {
909
+ token: "string.regexp",
910
+ regex: "[^\\\\/\\[]+",
911
+ merge: true
912
+ }, {
913
+ token: "string.regexp.charachterclass",
914
+ regex: "\\[",
915
+ next: "regex_character_class",
916
+ merge: true
917
+ }, {
918
+ token: "empty",
919
+ regex: "",
920
+ next: "start"
921
+ }
922
+ ],
923
+ "regex_character_class": [
924
+ {
925
+ token: "regexp.keyword.operator",
926
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
927
+ }, {
928
+ token: "string.regexp.charachterclass",
929
+ regex: "]",
930
+ next: "regex",
931
+ merge: true
932
+ }, {
933
+ token: "string.regexp.charachterclass",
934
+ regex: "[^\\\\\\]]+",
935
+ merge: true
936
+ }, {
937
+ token: "empty",
938
+ regex: "",
939
+ next: "start"
940
+ }
941
+ ],
942
+ "function_arguments": [
943
+ {
944
+ token: "variable.parameter",
945
+ regex: identifierRe,
946
+ }, {
947
+ token: "punctuation.operator",
948
+ regex: "[, ]+",
949
+ merge: true
950
+ }, {
951
+ token: "punctuation.operator",
952
+ regex: "$",
953
+ merge: true
954
+ }, {
955
+ token: "empty",
956
+ regex: "",
957
+ next: "start"
958
+ }
959
+ ],
960
+ "comment_regex_allowed" : [
961
+ {
962
+ token : "comment", // closing comment
963
+ regex : ".*?\\*\\/",
964
+ merge : true,
965
+ next : "regex_allowed"
966
+ }, {
967
+ token : "comment", // comment spanning whole line
968
+ merge : true,
969
+ regex : ".+"
970
+ }
971
+ ],
972
+ "comment" : [
973
+ {
974
+ token : "comment", // closing comment
975
+ regex : ".*?\\*\\/",
976
+ merge : true,
977
+ next : "start"
978
+ }, {
979
+ token : "comment", // comment spanning whole line
980
+ merge : true,
981
+ regex : ".+"
982
+ }
983
+ ],
984
+ "qqstring" : [
985
+ {
986
+ token : "constant.language.escape",
987
+ regex : escapedRe
988
+ }, {
989
+ token : "string",
990
+ regex : '[^"\\\\]+',
991
+ merge : true
992
+ }, {
993
+ token : "string",
994
+ regex : "\\\\$",
995
+ next : "qqstring",
996
+ merge : true
997
+ }, {
998
+ token : "string",
999
+ regex : '"|$',
1000
+ next : "start",
1001
+ merge : true
1002
+ }
1003
+ ],
1004
+ "qstring" : [
1005
+ {
1006
+ token : "constant.language.escape",
1007
+ regex : escapedRe
1008
+ }, {
1009
+ token : "string",
1010
+ regex : "[^'\\\\]+",
1011
+ merge : true
1012
+ }, {
1013
+ token : "string",
1014
+ regex : "\\\\$",
1015
+ next : "qstring",
1016
+ merge : true
1017
+ }, {
1018
+ token : "string",
1019
+ regex : "'|$",
1020
+ next : "start",
1021
+ merge : true
1022
+ }
1023
+ ]
1024
+ };
1025
+
1026
+ this.embedRules(DocCommentHighlightRules, "doc-",
1027
+ [ DocCommentHighlightRules.getEndRule("start") ]);
1028
+ };
1029
+
1030
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
1031
+
1032
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
1033
+ });
1034
+ /* ***** BEGIN LICENSE BLOCK *****
1035
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1036
+ *
1037
+ * The contents of this file are subject to the Mozilla Public License Version
1038
+ * 1.1 (the "License"); you may not use this file except in compliance with
1039
+ * the License. You may obtain a copy of the License at
1040
+ * http://www.mozilla.org/MPL/
1041
+ *
1042
+ * Software distributed under the License is distributed on an "AS IS" basis,
1043
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1044
+ * for the specific language governing rights and limitations under the
1045
+ * License.
1046
+ *
1047
+ * The Original Code is Ajax.org Code Editor (ACE).
1048
+ *
1049
+ * The Initial Developer of the Original Code is
1050
+ * Ajax.org B.V.
1051
+ * Portions created by the Initial Developer are Copyright (C) 2010
1052
+ * the Initial Developer. All Rights Reserved.
1053
+ *
1054
+ * Contributor(s):
1055
+ * Fabian Jakobs <fabian AT ajax DOT org>
1056
+ *
1057
+ * Alternatively, the contents of this file may be used under the terms of
1058
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
1059
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1060
+ * in which case the provisions of the GPL or the LGPL are applicable instead
1061
+ * of those above. If you wish to allow use of your version of this file only
1062
+ * under the terms of either the GPL or the LGPL, and not to allow others to
1063
+ * use your version of this file under the terms of the MPL, indicate your
1064
+ * decision by deleting the provisions above and replace them with the notice
1065
+ * and other provisions required by the GPL or the LGPL. If you do not delete
1066
+ * the provisions above, a recipient may use your version of this file under
1067
+ * the terms of any one of the MPL, the GPL or the LGPL.
1068
+ *
1069
+ * ***** END LICENSE BLOCK ***** */
1070
+
1071
+ define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1072
+ "use strict";
1073
+
1074
+ var oop = require("../lib/oop");
1075
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1076
+
1077
+ var DocCommentHighlightRules = function() {
1078
+
1079
+ this.$rules = {
1080
+ "start" : [ {
1081
+ token : "comment.doc.tag",
1082
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
1083
+ }, {
1084
+ token : "comment.doc",
1085
+ merge : true,
1086
+ regex : "\\s+"
1087
+ }, {
1088
+ token : "comment.doc",
1089
+ merge : true,
1090
+ regex : "TODO"
1091
+ }, {
1092
+ token : "comment.doc",
1093
+ merge : true,
1094
+ regex : "[^@\\*]+"
1095
+ }, {
1096
+ token : "comment.doc",
1097
+ merge : true,
1098
+ regex : "."
1099
+ }]
1100
+ };
1101
+ };
1102
+
1103
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
1104
+
1105
+ DocCommentHighlightRules.getStartRule = function(start) {
1106
+ return {
1107
+ token : "comment.doc", // doc comment
1108
+ merge : true,
1109
+ regex : "\\/\\*(?=\\*)",
1110
+ next : start
1111
+ };
1112
+ };
1113
+
1114
+ DocCommentHighlightRules.getEndRule = function (start) {
1115
+ return {
1116
+ token : "comment.doc", // closing comment
1117
+ merge : true,
1118
+ regex : "\\*\\/",
1119
+ next : start
1120
+ };
1121
+ };
1122
+
1123
+
1124
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
1125
+
1126
+ });
1127
+ /* ***** BEGIN LICENSE BLOCK *****
1128
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1129
+ *
1130
+ * The contents of this file are subject to the Mozilla Public License Version
1131
+ * 1.1 (the "License"); you may not use this file except in compliance with
1132
+ * the License. You may obtain a copy of the License at
1133
+ * http://www.mozilla.org/MPL/
1134
+ *
1135
+ * Software distributed under the License is distributed on an "AS IS" basis,
1136
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1137
+ * for the specific language governing rights and limitations under the
1138
+ * License.
1139
+ *
1140
+ * The Original Code is Ajax.org Code Editor (ACE).
1141
+ *
1142
+ * The Initial Developer of the Original Code is
1143
+ * Ajax.org B.V.
1144
+ * Portions created by the Initial Developer are Copyright (C) 2010
1145
+ * the Initial Developer. All Rights Reserved.
1146
+ *
1147
+ * Contributor(s):
1148
+ * Fabian Jakobs <fabian AT ajax DOT org>
1149
+ *
1150
+ * Alternatively, the contents of this file may be used under the terms of
1151
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
1152
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1153
+ * in which case the provisions of the GPL or the LGPL are applicable instead
1154
+ * of those above. If you wish to allow use of your version of this file only
1155
+ * under the terms of either the GPL or the LGPL, and not to allow others to
1156
+ * use your version of this file under the terms of the MPL, indicate your
1157
+ * decision by deleting the provisions above and replace them with the notice
1158
+ * and other provisions required by the GPL or the LGPL. If you do not delete
1159
+ * the provisions above, a recipient may use your version of this file under
1160
+ * the terms of any one of the MPL, the GPL or the LGPL.
1161
+ *
1162
+ * ***** END LICENSE BLOCK ***** */
1163
+
1164
+ define('ace/mode/xml_util', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
1165
+ "use strict";
1166
+
1167
+ var lang = require("../lib/lang");
1168
+
1169
+ var formTags = lang.arrayToMap(
1170
+ ("button|form|input|label|select|textarea").split("|")
1171
+ );
1172
+
1173
+ var tableTags = lang.arrayToMap(
1174
+ ("table|tbody|td|tfoot|th|tr").split("|")
1175
+ );
1176
+
1177
+ function string(state) {
1178
+ return [{
1179
+ token : "string",
1180
+ regex : '".*?"'
1181
+ }, {
1182
+ token : "string", // multi line string start
1183
+ merge : true,
1184
+ regex : '["].*',
1185
+ next : state + "_qqstring"
1186
+ }, {
1187
+ token : "string",
1188
+ regex : "'.*?'"
1189
+ }, {
1190
+ token : "string", // multi line string start
1191
+ merge : true,
1192
+ regex : "['].*",
1193
+ next : state + "_qstring"
1194
+ }];
1195
+ }
1196
+
1197
+ function multiLineString(quote, state) {
1198
+ return [{
1199
+ token : "string",
1200
+ merge : true,
1201
+ regex : ".*?" + quote,
1202
+ next : state
1203
+ }, {
1204
+ token : "string",
1205
+ merge : true,
1206
+ regex : '.+'
1207
+ }];
1208
+ }
1209
+
1210
+ exports.tag = function(states, name, nextState) {
1211
+ states[name] = [{
1212
+ token : "text",
1213
+ regex : "\\s+"
1214
+ }, {
1215
+ //token : "meta.tag",
1216
+
1217
+ token : function(value) {
1218
+ if ( value==='a' ) {
1219
+ return "meta.tag.anchor";
1220
+ }
1221
+ else if ( value==='img' ) {
1222
+ return "meta.tag.image";
1223
+ }
1224
+ else if ( value==='script' ) {
1225
+ return "meta.tag.script";
1226
+ }
1227
+ else if ( value==='style' ) {
1228
+ return "meta.tag.style";
1229
+ }
1230
+ else if (formTags.hasOwnProperty(value.toLowerCase())) {
1231
+ return "meta.tag.form";
1232
+ }
1233
+ else if (tableTags.hasOwnProperty(value.toLowerCase())) {
1234
+ return "meta.tag.table";
1235
+ }
1236
+ else {
1237
+ return "meta.tag";
1238
+ }
1239
+ },
1240
+ merge : true,
1241
+ regex : "[-_a-zA-Z0-9:]+",
1242
+ next : name + "_embed_attribute_list"
1243
+ }, {
1244
+ token: "empty",
1245
+ regex: "",
1246
+ next : name + "_embed_attribute_list"
1247
+ }];
1248
+
1249
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
1250
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
1251
+
1252
+ states[name + "_embed_attribute_list"] = [{
1253
+ token : "meta.tag",
1254
+ merge : true,
1255
+ regex : "\/?>",
1256
+ next : nextState
1257
+ }, {
1258
+ token : "keyword.operator",
1259
+ regex : "="
1260
+ }, {
1261
+ token : "entity.other.attribute-name",
1262
+ regex : "[-_a-zA-Z0-9:]+"
1263
+ }, {
1264
+ token : "constant.numeric", // float
1265
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
1266
+ }, {
1267
+ token : "text",
1268
+ regex : "\\s+"
1269
+ }].concat(string(name));
1270
+ };
1271
+
1272
+ });
1273
+ /* ***** BEGIN LICENSE BLOCK *****
1274
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1275
+ *
1276
+ * The contents of this file are subject to the Mozilla Public License Version
1277
+ * 1.1 (the "License"); you may not use this file except in compliance with
1278
+ * the License. You may obtain a copy of the License at
1279
+ * http://www.mozilla.org/MPL/
1280
+ *
1281
+ * Software distributed under the License is distributed on an "AS IS" basis,
1282
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1283
+ * for the specific language governing rights and limitations under the
1284
+ * License.
1285
+ *
1286
+ * The Original Code is Ajax.org Code Editor (ACE).
1287
+ *
1288
+ * The Initial Developer of the Original Code is
1289
+ * Ajax.org B.V.
1290
+ * Portions created by the Initial Developer are Copyright (C) 2010
1291
+ * the Initial Developer. All Rights Reserved.
1292
+ *
1293
+ * Contributor(s):
1294
+ * Fabian Jakobs <fabian AT ajax DOT org>
1295
+ *
1296
+ * Alternatively, the contents of this file may be used under the terms of
1297
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
1298
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1299
+ * in which case the provisions of the GPL or the LGPL are applicable instead
1300
+ * of those above. If you wish to allow use of your version of this file only
1301
+ * under the terms of either the GPL or the LGPL, and not to allow others to
1302
+ * use your version of this file under the terms of the MPL, indicate your
1303
+ * decision by deleting the provisions above and replace them with the notice
1304
+ * and other provisions required by the GPL or the LGPL. If you do not delete
1305
+ * the provisions above, a recipient may use your version of this file under
1306
+ * the terms of any one of the MPL, the GPL or the LGPL.
1307
+ *
1308
+ * ***** END LICENSE BLOCK ***** */
1309
+
1310
+ define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
1311
+ "use strict";
1312
+
1313
+ var Range = require("../range").Range;
1314
+
1315
+ var MatchingBraceOutdent = function() {};
1316
+
1317
+ (function() {
1318
+
1319
+ this.checkOutdent = function(line, input) {
1320
+ if (! /^\s+$/.test(line))
1321
+ return false;
1322
+
1323
+ return /^\s*\}/.test(input);
1324
+ };
1325
+
1326
+ this.autoOutdent = function(doc, row) {
1327
+ var line = doc.getLine(row);
1328
+ var match = line.match(/^(\s*\})/);
1329
+
1330
+ if (!match) return 0;
1331
+
1332
+ var column = match[1].length;
1333
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
1334
+
1335
+ if (!openBracePos || openBracePos.row == row) return 0;
1336
+
1337
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
1338
+ doc.replace(new Range(row, 0, row, column-1), indent);
1339
+ };
1340
+
1341
+ this.$getIndent = function(line) {
1342
+ var match = line.match(/^(\s+)/);
1343
+ if (match) {
1344
+ return match[1];
1345
+ }
1346
+
1347
+ return "";
1348
+ };
1349
+
1350
+ }).call(MatchingBraceOutdent.prototype);
1351
+
1352
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
1353
+ });