daftos 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
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,767 @@
1
+ define('ace/mode/csharp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/csharp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
2
+ "use strict";
3
+
4
+ var oop = require("../lib/oop");
5
+ var TextMode = require("./text").Mode;
6
+ var Tokenizer = require("../tokenizer").Tokenizer;
7
+ var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules;
8
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
9
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
10
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
11
+
12
+ var Mode = function() {
13
+ this.$tokenizer = new Tokenizer(new CSharpHighlightRules().getRules());
14
+ this.$outdent = new MatchingBraceOutdent();
15
+ this.$behaviour = new CstyleBehaviour();
16
+ this.foldingRules = new CStyleFoldMode();
17
+ };
18
+ oop.inherits(Mode, TextMode);
19
+
20
+ (function() {
21
+
22
+ this.getNextLineIndent = function(state, line, tab) {
23
+ var indent = this.$getIndent(line);
24
+
25
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
26
+ var tokens = tokenizedLine.tokens;
27
+
28
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
29
+ return indent;
30
+ }
31
+
32
+ if (state == "start") {
33
+ var match = line.match(/^.*[\{\(\[]\s*$/);
34
+ if (match) {
35
+ indent += tab;
36
+ }
37
+ }
38
+
39
+ return indent;
40
+ };
41
+
42
+ this.checkOutdent = function(state, line, input) {
43
+ return this.$outdent.checkOutdent(line, input);
44
+ };
45
+
46
+ this.autoOutdent = function(state, doc, row) {
47
+ this.$outdent.autoOutdent(doc, row);
48
+ };
49
+
50
+
51
+ this.createWorker = function(session) {
52
+ return null;
53
+ };
54
+
55
+ }).call(Mode.prototype);
56
+
57
+ exports.Mode = Mode;
58
+ });
59
+ define('ace/mode/csharp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
60
+ "use strict";
61
+
62
+ var oop = require("../lib/oop");
63
+ var lang = require("../lib/lang");
64
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
65
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
66
+
67
+ var CSharpHighlightRules = function() {
68
+
69
+ var keywords = lang.arrayToMap(
70
+ ("abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic").split("|")
71
+ );
72
+
73
+ var buildinConstants = lang.arrayToMap(
74
+ ("null|true|false").split("|")
75
+ );
76
+
77
+
78
+ // regexp must not have capturing parentheses. Use (?:) instead.
79
+ // regexps are ordered -> the first match is used
80
+
81
+ this.$rules = {
82
+ "start" : [
83
+ {
84
+ token : "comment",
85
+ regex : "\\/\\/.*$"
86
+ },
87
+ new DocCommentHighlightRules().getStartRule("doc-start"),
88
+ {
89
+ token : "comment", // multi line comment
90
+ regex : "\\/\\*",
91
+ merge : true,
92
+ next : "comment"
93
+ }, {
94
+ token : "string.regexp",
95
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
96
+ }, {
97
+ token : "string", // single line
98
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
99
+ }, {
100
+ token : "string", // single line
101
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
102
+ }, {
103
+ token : "constant.numeric", // hex
104
+ regex : "0[xX][0-9a-fA-F]+\\b"
105
+ }, {
106
+ token : "constant.numeric", // float
107
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
108
+ }, {
109
+ token : "constant.language.boolean",
110
+ regex : "(?:true|false)\\b"
111
+ }, {
112
+ token : function(value) {
113
+ if (value == "this")
114
+ return "variable.language";
115
+ else if (keywords.hasOwnProperty(value))
116
+ return "keyword";
117
+ else if (buildinConstants.hasOwnProperty(value))
118
+ return "constant.language";
119
+ else
120
+ return "identifier";
121
+ },
122
+ // TODO: Unicode escape sequences
123
+ // TODO: Unicode identifiers
124
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
125
+ }, {
126
+ token : "keyword.operator",
127
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
128
+ }, {
129
+ token : "punctuation.operator",
130
+ regex : "\\?|\\:|\\,|\\;|\\."
131
+ }, {
132
+ token : "paren.lparen",
133
+ regex : "[[({]"
134
+ }, {
135
+ token : "paren.rparen",
136
+ regex : "[\\])}]"
137
+ }, {
138
+ token : "text",
139
+ regex : "\\s+"
140
+ }
141
+ ],
142
+ "comment" : [
143
+ {
144
+ token : "comment", // closing comment
145
+ regex : ".*?\\*\\/",
146
+ next : "start"
147
+ }, {
148
+ token : "comment", // comment spanning whole line
149
+ merge : true,
150
+ regex : ".+"
151
+ }
152
+ ]
153
+ };
154
+
155
+ this.embedRules(DocCommentHighlightRules, "doc-",
156
+ [ new DocCommentHighlightRules().getEndRule("start") ]);
157
+ };
158
+
159
+ oop.inherits(CSharpHighlightRules, TextHighlightRules);
160
+
161
+ exports.CSharpHighlightRules = CSharpHighlightRules;
162
+ });
163
+ /* ***** BEGIN LICENSE BLOCK *****
164
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
165
+ *
166
+ * The contents of this file are subject to the Mozilla Public License Version
167
+ * 1.1 (the "License"); you may not use this file except in compliance with
168
+ * the License. You may obtain a copy of the License at
169
+ * http://www.mozilla.org/MPL/
170
+ *
171
+ * Software distributed under the License is distributed on an "AS IS" basis,
172
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
173
+ * for the specific language governing rights and limitations under the
174
+ * License.
175
+ *
176
+ * The Original Code is Ajax.org Code Editor (ACE).
177
+ *
178
+ * The Initial Developer of the Original Code is
179
+ * Ajax.org B.V.
180
+ * Portions created by the Initial Developer are Copyright (C) 2010
181
+ * the Initial Developer. All Rights Reserved.
182
+ *
183
+ * Contributor(s):
184
+ * Fabian Jakobs <fabian AT ajax DOT org>
185
+ *
186
+ * Alternatively, the contents of this file may be used under the terms of
187
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
188
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
189
+ * in which case the provisions of the GPL or the LGPL are applicable instead
190
+ * of those above. If you wish to allow use of your version of this file only
191
+ * under the terms of either the GPL or the LGPL, and not to allow others to
192
+ * use your version of this file under the terms of the MPL, indicate your
193
+ * decision by deleting the provisions above and replace them with the notice
194
+ * and other provisions required by the GPL or the LGPL. If you do not delete
195
+ * the provisions above, a recipient may use your version of this file under
196
+ * the terms of any one of the MPL, the GPL or the LGPL.
197
+ *
198
+ * ***** END LICENSE BLOCK ***** */
199
+
200
+ define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
201
+ "use strict";
202
+
203
+ var oop = require("../lib/oop");
204
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
205
+
206
+ var DocCommentHighlightRules = function() {
207
+
208
+ this.$rules = {
209
+ "start" : [ {
210
+ token : "comment.doc.tag",
211
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
212
+ }, {
213
+ token : "comment.doc",
214
+ merge : true,
215
+ regex : "\\s+"
216
+ }, {
217
+ token : "comment.doc",
218
+ merge : true,
219
+ regex : "TODO"
220
+ }, {
221
+ token : "comment.doc",
222
+ merge : true,
223
+ regex : "[^@\\*]+"
224
+ }, {
225
+ token : "comment.doc",
226
+ merge : true,
227
+ regex : "."
228
+ }]
229
+ };
230
+ };
231
+
232
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
233
+
234
+ DocCommentHighlightRules.getStartRule = function(start) {
235
+ return {
236
+ token : "comment.doc", // doc comment
237
+ merge : true,
238
+ regex : "\\/\\*(?=\\*)",
239
+ next : start
240
+ };
241
+ };
242
+
243
+ DocCommentHighlightRules.getEndRule = function (start) {
244
+ return {
245
+ token : "comment.doc", // closing comment
246
+ merge : true,
247
+ regex : "\\*\\/",
248
+ next : start
249
+ };
250
+ };
251
+
252
+
253
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
254
+
255
+ });
256
+ /* ***** BEGIN LICENSE BLOCK *****
257
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
258
+ *
259
+ * The contents of this file are subject to the Mozilla Public License Version
260
+ * 1.1 (the "License"); you may not use this file except in compliance with
261
+ * the License. You may obtain a copy of the License at
262
+ * http://www.mozilla.org/MPL/
263
+ *
264
+ * Software distributed under the License is distributed on an "AS IS" basis,
265
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
266
+ * for the specific language governing rights and limitations under the
267
+ * License.
268
+ *
269
+ * The Original Code is Ajax.org Code Editor (ACE).
270
+ *
271
+ * The Initial Developer of the Original Code is
272
+ * Ajax.org B.V.
273
+ * Portions created by the Initial Developer are Copyright (C) 2010
274
+ * the Initial Developer. All Rights Reserved.
275
+ *
276
+ * Contributor(s):
277
+ * Fabian Jakobs <fabian AT ajax DOT org>
278
+ *
279
+ * Alternatively, the contents of this file may be used under the terms of
280
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
281
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
282
+ * in which case the provisions of the GPL or the LGPL are applicable instead
283
+ * of those above. If you wish to allow use of your version of this file only
284
+ * under the terms of either the GPL or the LGPL, and not to allow others to
285
+ * use your version of this file under the terms of the MPL, indicate your
286
+ * decision by deleting the provisions above and replace them with the notice
287
+ * and other provisions required by the GPL or the LGPL. If you do not delete
288
+ * the provisions above, a recipient may use your version of this file under
289
+ * the terms of any one of the MPL, the GPL or the LGPL.
290
+ *
291
+ * ***** END LICENSE BLOCK ***** */
292
+
293
+ define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
294
+ "use strict";
295
+
296
+ var Range = require("../range").Range;
297
+
298
+ var MatchingBraceOutdent = function() {};
299
+
300
+ (function() {
301
+
302
+ this.checkOutdent = function(line, input) {
303
+ if (! /^\s+$/.test(line))
304
+ return false;
305
+
306
+ return /^\s*\}/.test(input);
307
+ };
308
+
309
+ this.autoOutdent = function(doc, row) {
310
+ var line = doc.getLine(row);
311
+ var match = line.match(/^(\s*\})/);
312
+
313
+ if (!match) return 0;
314
+
315
+ var column = match[1].length;
316
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
317
+
318
+ if (!openBracePos || openBracePos.row == row) return 0;
319
+
320
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
321
+ doc.replace(new Range(row, 0, row, column-1), indent);
322
+ };
323
+
324
+ this.$getIndent = function(line) {
325
+ var match = line.match(/^(\s+)/);
326
+ if (match) {
327
+ return match[1];
328
+ }
329
+
330
+ return "";
331
+ };
332
+
333
+ }).call(MatchingBraceOutdent.prototype);
334
+
335
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
336
+ });
337
+ /* vim:ts=4:sts=4:sw=4:
338
+ * ***** BEGIN LICENSE BLOCK *****
339
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
340
+ *
341
+ * The contents of this file are subject to the Mozilla Public License Version
342
+ * 1.1 (the "License"); you may not use this file except in compliance with
343
+ * the License. You may obtain a copy of the License at
344
+ * http://www.mozilla.org/MPL/
345
+ *
346
+ * Software distributed under the License is distributed on an "AS IS" basis,
347
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
348
+ * for the specific language governing rights and limitations under the
349
+ * License.
350
+ *
351
+ * The Original Code is Ajax.org Code Editor (ACE).
352
+ *
353
+ * The Initial Developer of the Original Code is
354
+ * Ajax.org B.V.
355
+ * Portions created by the Initial Developer are Copyright (C) 2010
356
+ * the Initial Developer. All Rights Reserved.
357
+ *
358
+ * Contributor(s):
359
+ * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
360
+ *
361
+ * Alternatively, the contents of this file may be used under the terms of
362
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
363
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
364
+ * in which case the provisions of the GPL or the LGPL are applicable instead
365
+ * of those above. If you wish to allow use of your version of this file only
366
+ * under the terms of either the GPL or the LGPL, and not to allow others to
367
+ * use your version of this file under the terms of the MPL, indicate your
368
+ * decision by deleting the provisions above and replace them with the notice
369
+ * and other provisions required by the GPL or the LGPL. If you do not delete
370
+ * the provisions above, a recipient may use your version of this file under
371
+ * the terms of any one of the MPL, the GPL or the LGPL.
372
+ *
373
+ * ***** END LICENSE BLOCK ***** */
374
+
375
+ define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
376
+ "use strict";
377
+
378
+ var oop = require("../../lib/oop");
379
+ var Behaviour = require('../behaviour').Behaviour;
380
+
381
+ var CstyleBehaviour = function () {
382
+
383
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
384
+ if (text == '{') {
385
+ var selection = editor.getSelectionRange();
386
+ var selected = session.doc.getTextRange(selection);
387
+ if (selected !== "") {
388
+ return {
389
+ text: '{' + selected + '}',
390
+ selection: false
391
+ };
392
+ } else {
393
+ return {
394
+ text: '{}',
395
+ selection: [1, 1]
396
+ };
397
+ }
398
+ } else if (text == '}') {
399
+ var cursor = editor.getCursorPosition();
400
+ var line = session.doc.getLine(cursor.row);
401
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
402
+ if (rightChar == '}') {
403
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
404
+ if (matching !== null) {
405
+ return {
406
+ text: '',
407
+ selection: [1, 1]
408
+ };
409
+ }
410
+ }
411
+ } else if (text == "\n") {
412
+ var cursor = editor.getCursorPosition();
413
+ var line = session.doc.getLine(cursor.row);
414
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
415
+ if (rightChar == '}') {
416
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
417
+ if (!openBracePos)
418
+ return null;
419
+
420
+ var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
421
+ var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
422
+
423
+ return {
424
+ text: '\n' + indent + '\n' + next_indent,
425
+ selection: [1, indent.length, 1, indent.length]
426
+ };
427
+ }
428
+ }
429
+ });
430
+
431
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
432
+ var selected = session.doc.getTextRange(range);
433
+ if (!range.isMultiLine() && selected == '{') {
434
+ var line = session.doc.getLine(range.start.row);
435
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
436
+ if (rightChar == '}') {
437
+ range.end.column++;
438
+ return range;
439
+ }
440
+ }
441
+ });
442
+
443
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
444
+ if (text == '(') {
445
+ var selection = editor.getSelectionRange();
446
+ var selected = session.doc.getTextRange(selection);
447
+ if (selected !== "") {
448
+ return {
449
+ text: '(' + selected + ')',
450
+ selection: false
451
+ };
452
+ } else {
453
+ return {
454
+ text: '()',
455
+ selection: [1, 1]
456
+ };
457
+ }
458
+ } else if (text == ')') {
459
+ var cursor = editor.getCursorPosition();
460
+ var line = session.doc.getLine(cursor.row);
461
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
462
+ if (rightChar == ')') {
463
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
464
+ if (matching !== null) {
465
+ return {
466
+ text: '',
467
+ selection: [1, 1]
468
+ };
469
+ }
470
+ }
471
+ }
472
+ });
473
+
474
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
475
+ var selected = session.doc.getTextRange(range);
476
+ if (!range.isMultiLine() && selected == '(') {
477
+ var line = session.doc.getLine(range.start.row);
478
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
479
+ if (rightChar == ')') {
480
+ range.end.column++;
481
+ return range;
482
+ }
483
+ }
484
+ });
485
+
486
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
487
+ if (text == '"' || text == "'") {
488
+ var quote = text;
489
+ var selection = editor.getSelectionRange();
490
+ var selected = session.doc.getTextRange(selection);
491
+ if (selected !== "") {
492
+ return {
493
+ text: quote + selected + quote,
494
+ selection: false
495
+ };
496
+ } else {
497
+ var cursor = editor.getCursorPosition();
498
+ var line = session.doc.getLine(cursor.row);
499
+ var leftChar = line.substring(cursor.column-1, cursor.column);
500
+
501
+ // We're escaped.
502
+ if (leftChar == '\\') {
503
+ return null;
504
+ }
505
+
506
+ // Find what token we're inside.
507
+ var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
508
+ var col = 0, token;
509
+ var quotepos = -1; // Track whether we're inside an open quote.
510
+
511
+ for (var x = 0; x < tokens.length; x++) {
512
+ token = tokens[x];
513
+ if (token.type == "string") {
514
+ quotepos = -1;
515
+ } else if (quotepos < 0) {
516
+ quotepos = token.value.indexOf(quote);
517
+ }
518
+ if ((token.value.length + col) > selection.start.column) {
519
+ break;
520
+ }
521
+ col += tokens[x].value.length;
522
+ }
523
+
524
+ // Try and be smart about when we auto insert.
525
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
526
+ return {
527
+ text: quote + quote,
528
+ selection: [1,1]
529
+ };
530
+ } else if (token && token.type === "string") {
531
+ // Ignore input and move right one if we're typing over the closing quote.
532
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
533
+ if (rightChar == quote) {
534
+ return {
535
+ text: '',
536
+ selection: [1, 1]
537
+ };
538
+ }
539
+ }
540
+ }
541
+ }
542
+ });
543
+
544
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
545
+ var selected = session.doc.getTextRange(range);
546
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
547
+ var line = session.doc.getLine(range.start.row);
548
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
549
+ if (rightChar == '"') {
550
+ range.end.column++;
551
+ return range;
552
+ }
553
+ }
554
+ });
555
+
556
+ };
557
+
558
+ oop.inherits(CstyleBehaviour, Behaviour);
559
+
560
+ exports.CstyleBehaviour = CstyleBehaviour;
561
+ });/* ***** BEGIN LICENSE BLOCK *****
562
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
563
+ *
564
+ * The contents of this file are subject to the Mozilla Public License Version
565
+ * 1.1 (the "License"); you may not use this file except in compliance with
566
+ * the License. You may obtain a copy of the License at
567
+ * http://www.mozilla.org/MPL/
568
+ *
569
+ * Software distributed under the License is distributed on an "AS IS" basis,
570
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
571
+ * for the specific language governing rights and limitations under the
572
+ * License.
573
+ *
574
+ * The Original Code is Ajax.org Code Editor (ACE).
575
+ *
576
+ * The Initial Developer of the Original Code is
577
+ * Ajax.org B.V.
578
+ * Portions created by the Initial Developer are Copyright (C) 2010
579
+ * the Initial Developer. All Rights Reserved.
580
+ *
581
+ * Contributor(s):
582
+ * Fabian Jakobs <fabian AT ajax DOT org>
583
+ *
584
+ * Alternatively, the contents of this file may be used under the terms of
585
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
586
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
587
+ * in which case the provisions of the GPL or the LGPL are applicable instead
588
+ * of those above. If you wish to allow use of your version of this file only
589
+ * under the terms of either the GPL or the LGPL, and not to allow others to
590
+ * use your version of this file under the terms of the MPL, indicate your
591
+ * decision by deleting the provisions above and replace them with the notice
592
+ * and other provisions required by the GPL or the LGPL. If you do not delete
593
+ * the provisions above, a recipient may use your version of this file under
594
+ * the terms of any one of the MPL, the GPL or the LGPL.
595
+ *
596
+ * ***** END LICENSE BLOCK ***** */
597
+
598
+ define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
599
+ "use strict";
600
+
601
+ var oop = require("../../lib/oop");
602
+ var Range = require("../../range").Range;
603
+ var BaseFoldMode = require("./fold_mode").FoldMode;
604
+
605
+ var FoldMode = exports.FoldMode = function() {};
606
+ oop.inherits(FoldMode, BaseFoldMode);
607
+
608
+ (function() {
609
+
610
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
611
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
612
+
613
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
614
+ var line = session.getLine(row);
615
+ var match = line.match(this.foldingStartMarker);
616
+ if (match) {
617
+ var i = match.index;
618
+
619
+ if (match[1])
620
+ return this.openingBracketBlock(session, match[1], row, i);
621
+
622
+ var range = session.getCommentFoldRange(row, i + match[0].length);
623
+ range.end.column -= 2;
624
+ return range;
625
+ }
626
+
627
+ if (foldStyle !== "markbeginend")
628
+ return;
629
+
630
+ var match = line.match(this.foldingStopMarker);
631
+ if (match) {
632
+ var i = match.index + match[0].length;
633
+
634
+ if (match[2]) {
635
+ var range = session.getCommentFoldRange(row, i);
636
+ range.end.column -= 2;
637
+ return range;
638
+ }
639
+
640
+ var end = {row: row, column: i};
641
+ var start = session.$findOpeningBracket(match[1], end);
642
+
643
+ if (!start)
644
+ return;
645
+
646
+ start.column++;
647
+ end.column--;
648
+
649
+ return Range.fromPoints(start, end);
650
+ }
651
+ };
652
+
653
+ }).call(FoldMode.prototype);
654
+
655
+ });/* ***** BEGIN LICENSE BLOCK *****
656
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
657
+ *
658
+ * The contents of this file are subject to the Mozilla Public License Version
659
+ * 1.1 (the "License"); you may not use this file except in compliance with
660
+ * the License. You may obtain a copy of the License at
661
+ * http://www.mozilla.org/MPL/
662
+ *
663
+ * Software distributed under the License is distributed on an "AS IS" basis,
664
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
665
+ * for the specific language governing rights and limitations under the
666
+ * License.
667
+ *
668
+ * The Original Code is Ajax.org Code Editor (ACE).
669
+ *
670
+ * The Initial Developer of the Original Code is
671
+ * Ajax.org B.V.
672
+ * Portions created by the Initial Developer are Copyright (C) 2010
673
+ * the Initial Developer. All Rights Reserved.
674
+ *
675
+ * Contributor(s):
676
+ * Fabian Jakobs <fabian AT ajax DOT org>
677
+ *
678
+ * Alternatively, the contents of this file may be used under the terms of
679
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
680
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
681
+ * in which case the provisions of the GPL or the LGPL are applicable instead
682
+ * of those above. If you wish to allow use of your version of this file only
683
+ * under the terms of either the GPL or the LGPL, and not to allow others to
684
+ * use your version of this file under the terms of the MPL, indicate your
685
+ * decision by deleting the provisions above and replace them with the notice
686
+ * and other provisions required by the GPL or the LGPL. If you do not delete
687
+ * the provisions above, a recipient may use your version of this file under
688
+ * the terms of any one of the MPL, the GPL or the LGPL.
689
+ *
690
+ * ***** END LICENSE BLOCK ***** */
691
+
692
+ define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
693
+ "use strict";
694
+
695
+ var Range = require("../../range").Range;
696
+
697
+ var FoldMode = exports.FoldMode = function() {};
698
+
699
+ (function() {
700
+
701
+ this.foldingStartMarker = null;
702
+ this.foldingStopMarker = null;
703
+
704
+ // must return "" if there's no fold, to enable caching
705
+ this.getFoldWidget = function(session, foldStyle, row) {
706
+ var line = session.getLine(row);
707
+ if (this.foldingStartMarker.test(line))
708
+ return "start";
709
+ if (foldStyle == "markbeginend"
710
+ && this.foldingStopMarker
711
+ && this.foldingStopMarker.test(line))
712
+ return "end";
713
+ return "";
714
+ };
715
+
716
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
717
+ return null;
718
+ };
719
+
720
+ this.indentationBlock = function(session, row, column) {
721
+ var re = /^\s*/;
722
+ var startRow = row;
723
+ var endRow = row;
724
+ var line = session.getLine(row);
725
+ var startColumn = column || line.length;
726
+ var startLevel = line.match(re)[0].length;
727
+ var maxRow = session.getLength()
728
+
729
+ while (++row < maxRow) {
730
+ line = session.getLine(row);
731
+ var level = line.match(re)[0].length;
732
+
733
+ if (level == line.length)
734
+ continue;
735
+
736
+ if (level <= startLevel)
737
+ break;
738
+
739
+ endRow = row;
740
+ }
741
+
742
+ if (endRow > startRow) {
743
+ var endColumn = session.getLine(endRow).length;
744
+ return new Range(startRow, startColumn, endRow, endColumn);
745
+ }
746
+ };
747
+
748
+ this.openingBracketBlock = function(session, bracket, row, column) {
749
+ var start = {row: row, column: column + 1};
750
+ var end = session.$findClosingBracket(bracket, start);
751
+ if (!end)
752
+ return;
753
+
754
+ var fw = session.foldWidgets[end.row];
755
+ if (fw == null)
756
+ fw = this.getFoldWidget(session, end.row);
757
+
758
+ if (fw == "start") {
759
+ end.row --;
760
+ end.column = session.getLine(end.row).length;
761
+ }
762
+ return Range.fromPoints(start, end);
763
+ };
764
+
765
+ }).call(FoldMode.prototype);
766
+
767
+ });