daftos 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.DS_Store +0 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +2 -0
- data/Rakefile +4 -0
- data/VERSION +1 -1
- data/bin/daftos +14 -0
- data/daftos.gemspec +363 -0
- data/lib/.DS_Store +0 -0
- data/lib/apis/.DS_Store +0 -0
- data/lib/apis/filesystem_api.rb +68 -0
- data/lib/apps/.DS_Store +0 -0
- data/lib/apps/apps/body.html +6 -0
- data/lib/apps/apps/options.json +7 -0
- data/lib/apps/filebrowser/.DS_Store +0 -0
- data/lib/apps/filebrowser/body.html +32 -0
- data/lib/apps/filebrowser/coffee/filebrowser.coffee +51 -0
- data/lib/apps/filebrowser/js/.DS_Store +0 -0
- data/lib/apps/filebrowser/js/daftos.js +1 -0
- data/lib/apps/filebrowser/options.json +7 -0
- data/lib/apps/photobooth/.DS_Store +0 -0
- data/lib/apps/photobooth/body.html +1 -0
- data/lib/apps/photobooth/coffee/photobooth.coffee +37 -0
- data/lib/apps/photobooth/coffee/test.html +278 -0
- data/lib/apps/photobooth/css/style.css +30 -0
- data/lib/apps/photobooth/js/.DS_Store +0 -0
- data/lib/apps/photobooth/js/daftos.js +1 -0
- data/lib/apps/photobooth/options.json +26 -0
- data/lib/apps/photobrowser/body.html +2 -0
- data/lib/apps/photobrowser/coffee/photobrowser.coffee +18 -0
- data/lib/apps/photobrowser/js/.DS_Store +0 -0
- data/lib/apps/photobrowser/options.json +16 -0
- data/lib/apps/texteditor/body.html +1 -0
- data/lib/apps/texteditor/coffee/texteditor.coffee +31 -0
- data/lib/apps/texteditor/js/.DS_Store +0 -0
- data/lib/apps/texteditor/js/ace-compat-noconflict.js +1 -0
- data/lib/apps/texteditor/js/ace-compat-uncompressed-noconflict.js +480 -0
- data/lib/apps/texteditor/js/ace-compat-uncompressed.js +480 -0
- data/lib/apps/texteditor/js/ace-compat.js +1 -0
- data/lib/apps/texteditor/js/ace-noconflict.js +10 -0
- data/lib/apps/texteditor/js/ace-uncompressed-noconflict.js +19559 -0
- data/lib/apps/texteditor/js/ace-uncompressed.js +19559 -0
- data/lib/apps/texteditor/js/ace.js +10 -0
- data/lib/apps/texteditor/js/keybinding-emacs-noconflict.js +1 -0
- data/lib/apps/texteditor/js/keybinding-emacs-uncompressed-noconflict.js +150 -0
- data/lib/apps/texteditor/js/keybinding-emacs-uncompressed.js +150 -0
- data/lib/apps/texteditor/js/keybinding-emacs.js +1 -0
- data/lib/apps/texteditor/js/keybinding-vim-noconflict.js +1 -0
- data/lib/apps/texteditor/js/keybinding-vim-uncompressed-noconflict.js +138 -0
- data/lib/apps/texteditor/js/keybinding-vim-uncompressed.js +138 -0
- data/lib/apps/texteditor/js/keybinding-vim.js +1 -0
- data/lib/apps/texteditor/js/mode-c_cpp-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-c_cpp-uncompressed-noconflict.js +917 -0
- data/lib/apps/texteditor/js/mode-c_cpp-uncompressed.js +917 -0
- data/lib/apps/texteditor/js/mode-c_cpp.js +1 -0
- data/lib/apps/texteditor/js/mode-clojure-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-clojure-uncompressed-noconflict.js +422 -0
- data/lib/apps/texteditor/js/mode-clojure-uncompressed.js +422 -0
- data/lib/apps/texteditor/js/mode-clojure.js +1 -0
- data/lib/apps/texteditor/js/mode-coffee-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-coffee-uncompressed-noconflict.js +605 -0
- data/lib/apps/texteditor/js/mode-coffee-uncompressed.js +605 -0
- data/lib/apps/texteditor/js/mode-coffee.js +1 -0
- data/lib/apps/texteditor/js/mode-coldfusion-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-coldfusion-uncompressed-noconflict.js +2454 -0
- data/lib/apps/texteditor/js/mode-coldfusion-uncompressed.js +2454 -0
- data/lib/apps/texteditor/js/mode-coldfusion.js +1 -0
- data/lib/apps/texteditor/js/mode-csharp-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-csharp-uncompressed-noconflict.js +767 -0
- data/lib/apps/texteditor/js/mode-csharp-uncompressed.js +767 -0
- data/lib/apps/texteditor/js/mode-csharp.js +1 -0
- data/lib/apps/texteditor/js/mode-css-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-css-uncompressed-noconflict.js +640 -0
- data/lib/apps/texteditor/js/mode-css-uncompressed.js +640 -0
- data/lib/apps/texteditor/js/mode-css.js +1 -0
- data/lib/apps/texteditor/js/mode-golang-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-golang-uncompressed-noconflict.js +378 -0
- data/lib/apps/texteditor/js/mode-golang-uncompressed.js +378 -0
- data/lib/apps/texteditor/js/mode-golang.js +1 -0
- data/lib/apps/texteditor/js/mode-groovy-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-groovy-uncompressed-noconflict.js +1391 -0
- data/lib/apps/texteditor/js/mode-groovy-uncompressed.js +1391 -0
- data/lib/apps/texteditor/js/mode-groovy.js +1 -0
- data/lib/apps/texteditor/js/mode-haxe-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-haxe-uncompressed-noconflict.js +767 -0
- data/lib/apps/texteditor/js/mode-haxe-uncompressed.js +767 -0
- data/lib/apps/texteditor/js/mode-haxe.js +1 -0
- data/lib/apps/texteditor/js/mode-html-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-html-uncompressed-noconflict.js +2470 -0
- data/lib/apps/texteditor/js/mode-html-uncompressed.js +2470 -0
- data/lib/apps/texteditor/js/mode-html.js +1 -0
- data/lib/apps/texteditor/js/mode-java-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-java-uncompressed-noconflict.js +1393 -0
- data/lib/apps/texteditor/js/mode-java-uncompressed.js +1393 -0
- data/lib/apps/texteditor/js/mode-java.js +1 -0
- data/lib/apps/texteditor/js/mode-javascript-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-javascript-uncompressed-noconflict.js +1224 -0
- data/lib/apps/texteditor/js/mode-javascript-uncompressed.js +1224 -0
- data/lib/apps/texteditor/js/mode-javascript.js +1 -0
- data/lib/apps/texteditor/js/mode-json-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-json-uncompressed-noconflict.js +698 -0
- data/lib/apps/texteditor/js/mode-json-uncompressed.js +698 -0
- data/lib/apps/texteditor/js/mode-json.js +1 -0
- data/lib/apps/texteditor/js/mode-latex-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-latex-uncompressed-noconflict.js +95 -0
- data/lib/apps/texteditor/js/mode-latex-uncompressed.js +95 -0
- data/lib/apps/texteditor/js/mode-latex.js +1 -0
- data/lib/apps/texteditor/js/mode-less-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-less-uncompressed-noconflict.js +654 -0
- data/lib/apps/texteditor/js/mode-less-uncompressed.js +654 -0
- data/lib/apps/texteditor/js/mode-less.js +1 -0
- data/lib/apps/texteditor/js/mode-liquid-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-liquid-uncompressed-noconflict.js +1353 -0
- data/lib/apps/texteditor/js/mode-liquid-uncompressed.js +1353 -0
- data/lib/apps/texteditor/js/mode-liquid.js +1 -0
- data/lib/apps/texteditor/js/mode-lua-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-lua-uncompressed-noconflict.js +523 -0
- data/lib/apps/texteditor/js/mode-lua-uncompressed.js +523 -0
- data/lib/apps/texteditor/js/mode-lua.js +1 -0
- data/lib/apps/texteditor/js/mode-markdown-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-markdown-uncompressed-noconflict.js +2918 -0
- data/lib/apps/texteditor/js/mode-markdown-uncompressed.js +2918 -0
- data/lib/apps/texteditor/js/mode-markdown.js +1 -0
- data/lib/apps/texteditor/js/mode-ocaml-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-ocaml-uncompressed-noconflict.js +539 -0
- data/lib/apps/texteditor/js/mode-ocaml-uncompressed.js +539 -0
- data/lib/apps/texteditor/js/mode-ocaml.js +1 -0
- data/lib/apps/texteditor/js/mode-perl-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-perl-uncompressed-noconflict.js +573 -0
- data/lib/apps/texteditor/js/mode-perl-uncompressed.js +573 -0
- data/lib/apps/texteditor/js/mode-perl.js +1 -0
- data/lib/apps/texteditor/js/mode-pgsql-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-pgsql-uncompressed-noconflict.js +1104 -0
- data/lib/apps/texteditor/js/mode-pgsql-uncompressed.js +1104 -0
- data/lib/apps/texteditor/js/mode-pgsql.js +1 -0
- data/lib/apps/texteditor/js/mode-php-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-php-uncompressed-noconflict.js +1883 -0
- data/lib/apps/texteditor/js/mode-php-uncompressed.js +1883 -0
- data/lib/apps/texteditor/js/mode-php.js +1 -0
- data/lib/apps/texteditor/js/mode-powershell-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-powershell-uncompressed-noconflict.js +708 -0
- data/lib/apps/texteditor/js/mode-powershell-uncompressed.js +708 -0
- data/lib/apps/texteditor/js/mode-powershell.js +1 -0
- data/lib/apps/texteditor/js/mode-python-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-python-uncompressed-noconflict.js +506 -0
- data/lib/apps/texteditor/js/mode-python-uncompressed.js +506 -0
- data/lib/apps/texteditor/js/mode-python.js +1 -0
- data/lib/apps/texteditor/js/mode-ruby-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-ruby-uncompressed-noconflict.js +391 -0
- data/lib/apps/texteditor/js/mode-ruby-uncompressed.js +391 -0
- data/lib/apps/texteditor/js/mode-ruby.js +1 -0
- data/lib/apps/texteditor/js/mode-scad-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-scad-uncompressed-noconflict.js +905 -0
- data/lib/apps/texteditor/js/mode-scad-uncompressed.js +905 -0
- data/lib/apps/texteditor/js/mode-scad.js +1 -0
- data/lib/apps/texteditor/js/mode-scala-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-scala-uncompressed-noconflict.js +1393 -0
- data/lib/apps/texteditor/js/mode-scala-uncompressed.js +1393 -0
- data/lib/apps/texteditor/js/mode-scala.js +1 -0
- data/lib/apps/texteditor/js/mode-scss-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-scss-uncompressed-noconflict.js +678 -0
- data/lib/apps/texteditor/js/mode-scss-uncompressed.js +678 -0
- data/lib/apps/texteditor/js/mode-scss.js +1 -0
- data/lib/apps/texteditor/js/mode-sh-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-sh-uncompressed-noconflict.js +289 -0
- data/lib/apps/texteditor/js/mode-sh-uncompressed.js +289 -0
- data/lib/apps/texteditor/js/mode-sh.js +1 -0
- data/lib/apps/texteditor/js/mode-sql-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-sql-uncompressed-noconflict.js +159 -0
- data/lib/apps/texteditor/js/mode-sql-uncompressed.js +159 -0
- data/lib/apps/texteditor/js/mode-sql.js +1 -0
- data/lib/apps/texteditor/js/mode-svg-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-svg-uncompressed-noconflict.js +2133 -0
- data/lib/apps/texteditor/js/mode-svg-uncompressed.js +2133 -0
- data/lib/apps/texteditor/js/mode-svg.js +1 -0
- data/lib/apps/texteditor/js/mode-text-noconflict.js +0 -0
- data/lib/apps/texteditor/js/mode-text-uncompressed-noconflict.js +0 -0
- data/lib/apps/texteditor/js/mode-text-uncompressed.js +0 -0
- data/lib/apps/texteditor/js/mode-text.js +0 -0
- data/lib/apps/texteditor/js/mode-textile-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-textile-uncompressed-noconflict.js +254 -0
- data/lib/apps/texteditor/js/mode-textile-uncompressed.js +254 -0
- data/lib/apps/texteditor/js/mode-textile.js +1 -0
- data/lib/apps/texteditor/js/mode-xml-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-xml-uncompressed-noconflict.js +1009 -0
- data/lib/apps/texteditor/js/mode-xml-uncompressed.js +1009 -0
- data/lib/apps/texteditor/js/mode-xml.js +1 -0
- data/lib/apps/texteditor/js/mode-xquery-noconflict.js +1 -0
- data/lib/apps/texteditor/js/mode-xquery-uncompressed-noconflict.js +540 -0
- data/lib/apps/texteditor/js/mode-xquery-uncompressed.js +540 -0
- data/lib/apps/texteditor/js/mode-xquery.js +1 -0
- data/lib/apps/texteditor/js/theme-chrome-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-chrome-uncompressed-noconflict.js +207 -0
- data/lib/apps/texteditor/js/theme-chrome-uncompressed.js +207 -0
- data/lib/apps/texteditor/js/theme-chrome.js +1 -0
- data/lib/apps/texteditor/js/theme-clouds-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-clouds-uncompressed-noconflict.js +160 -0
- data/lib/apps/texteditor/js/theme-clouds-uncompressed.js +160 -0
- data/lib/apps/texteditor/js/theme-clouds.js +1 -0
- data/lib/apps/texteditor/js/theme-clouds_midnight-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-clouds_midnight-uncompressed-noconflict.js +161 -0
- data/lib/apps/texteditor/js/theme-clouds_midnight-uncompressed.js +161 -0
- data/lib/apps/texteditor/js/theme-clouds_midnight.js +1 -0
- data/lib/apps/texteditor/js/theme-cobalt-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-cobalt-uncompressed-noconflict.js +187 -0
- data/lib/apps/texteditor/js/theme-cobalt-uncompressed.js +187 -0
- data/lib/apps/texteditor/js/theme-cobalt.js +1 -0
- data/lib/apps/texteditor/js/theme-crimson_editor-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-crimson_editor-uncompressed-noconflict.js +198 -0
- data/lib/apps/texteditor/js/theme-crimson_editor-uncompressed.js +198 -0
- data/lib/apps/texteditor/js/theme-crimson_editor.js +1 -0
- data/lib/apps/texteditor/js/theme-dawn-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-dawn-uncompressed-noconflict.js +191 -0
- data/lib/apps/texteditor/js/theme-dawn-uncompressed.js +191 -0
- data/lib/apps/texteditor/js/theme-dawn.js +1 -0
- data/lib/apps/texteditor/js/theme-dreamweaver-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-dreamweaver-uncompressed-noconflict.js +227 -0
- data/lib/apps/texteditor/js/theme-dreamweaver-uncompressed.js +227 -0
- data/lib/apps/texteditor/js/theme-dreamweaver.js +1 -0
- data/lib/apps/texteditor/js/theme-eclipse-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-eclipse-uncompressed-noconflict.js +147 -0
- data/lib/apps/texteditor/js/theme-eclipse-uncompressed.js +147 -0
- data/lib/apps/texteditor/js/theme-eclipse.js +1 -0
- data/lib/apps/texteditor/js/theme-idle_fingers-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-idle_fingers-uncompressed-noconflict.js +179 -0
- data/lib/apps/texteditor/js/theme-idle_fingers-uncompressed.js +179 -0
- data/lib/apps/texteditor/js/theme-idle_fingers.js +1 -0
- data/lib/apps/texteditor/js/theme-kr_theme-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-kr_theme-uncompressed-noconflict.js +182 -0
- data/lib/apps/texteditor/js/theme-kr_theme-uncompressed.js +182 -0
- data/lib/apps/texteditor/js/theme-kr_theme.js +1 -0
- data/lib/apps/texteditor/js/theme-merbivore-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-merbivore-uncompressed-noconflict.js +182 -0
- data/lib/apps/texteditor/js/theme-merbivore-uncompressed.js +182 -0
- data/lib/apps/texteditor/js/theme-merbivore.js +1 -0
- data/lib/apps/texteditor/js/theme-merbivore_soft-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-merbivore_soft-uncompressed-noconflict.js +188 -0
- data/lib/apps/texteditor/js/theme-merbivore_soft-uncompressed.js +188 -0
- data/lib/apps/texteditor/js/theme-merbivore_soft.js +1 -0
- data/lib/apps/texteditor/js/theme-mono_industrial-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-mono_industrial-uncompressed-noconflict.js +190 -0
- data/lib/apps/texteditor/js/theme-mono_industrial-uncompressed.js +190 -0
- data/lib/apps/texteditor/js/theme-mono_industrial.js +1 -0
- data/lib/apps/texteditor/js/theme-monokai-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-monokai-uncompressed-noconflict.js +188 -0
- data/lib/apps/texteditor/js/theme-monokai-uncompressed.js +188 -0
- data/lib/apps/texteditor/js/theme-monokai.js +1 -0
- data/lib/apps/texteditor/js/theme-pastel_on_dark-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-pastel_on_dark-uncompressed-noconflict.js +192 -0
- data/lib/apps/texteditor/js/theme-pastel_on_dark-uncompressed.js +192 -0
- data/lib/apps/texteditor/js/theme-pastel_on_dark.js +1 -0
- data/lib/apps/texteditor/js/theme-solarized_dark-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-solarized_dark-uncompressed-noconflict.js +173 -0
- data/lib/apps/texteditor/js/theme-solarized_dark-uncompressed.js +173 -0
- data/lib/apps/texteditor/js/theme-solarized_dark.js +1 -0
- data/lib/apps/texteditor/js/theme-solarized_light-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-solarized_light-uncompressed-noconflict.js +172 -0
- data/lib/apps/texteditor/js/theme-solarized_light-uncompressed.js +172 -0
- data/lib/apps/texteditor/js/theme-solarized_light.js +1 -0
- data/lib/apps/texteditor/js/theme-textmate-noconflict.js +0 -0
- data/lib/apps/texteditor/js/theme-textmate-uncompressed-noconflict.js +0 -0
- data/lib/apps/texteditor/js/theme-textmate-uncompressed.js +0 -0
- data/lib/apps/texteditor/js/theme-textmate.js +0 -0
- data/lib/apps/texteditor/js/theme-tomorrow-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-tomorrow-uncompressed-noconflict.js +206 -0
- data/lib/apps/texteditor/js/theme-tomorrow-uncompressed.js +206 -0
- data/lib/apps/texteditor/js/theme-tomorrow.js +1 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night-uncompressed-noconflict.js +206 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night-uncompressed.js +206 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night.js +1 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night_blue-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night_blue-uncompressed-noconflict.js +206 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night_blue-uncompressed.js +206 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night_blue.js +1 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night_bright-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night_bright-uncompressed-noconflict.js +206 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night_bright-uncompressed.js +206 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night_bright.js +1 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night_eighties-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night_eighties-uncompressed-noconflict.js +202 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night_eighties-uncompressed.js +202 -0
- data/lib/apps/texteditor/js/theme-tomorrow_night_eighties.js +1 -0
- data/lib/apps/texteditor/js/theme-twilight-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-twilight-uncompressed-noconflict.js +204 -0
- data/lib/apps/texteditor/js/theme-twilight-uncompressed.js +204 -0
- data/lib/apps/texteditor/js/theme-twilight.js +1 -0
- data/lib/apps/texteditor/js/theme-vibrant_ink-noconflict.js +1 -0
- data/lib/apps/texteditor/js/theme-vibrant_ink-uncompressed-noconflict.js +183 -0
- data/lib/apps/texteditor/js/theme-vibrant_ink-uncompressed.js +183 -0
- data/lib/apps/texteditor/js/theme-vibrant_ink.js +1 -0
- data/lib/apps/texteditor/js/worker-coffee.js +7991 -0
- data/lib/apps/texteditor/js/worker-css.js +12224 -0
- data/lib/apps/texteditor/js/worker-javascript.js +11124 -0
- data/lib/apps/texteditor/js/worker-json.js +3593 -0
- data/lib/apps/texteditor/options.json +16 -0
- data/lib/daftos/.DS_Store +0 -0
- data/lib/daftos/server.rb +106 -0
- data/lib/daftos/views/app_footer.erb +2 -0
- data/lib/daftos/views/app_header.erb +33 -0
- data/lib/daftos.rb +25 -2
- data/lib/libs/.DS_Store +0 -0
- data/lib/libs/coffee/daftos.coffee +36 -0
- data/lib/libs/css/bootstrap.css +3496 -0
- data/lib/libs/js/bootstrap.js +1720 -0
- data/lib/libs/js/jquery.js +4 -0
- data/myapp.pid +1 -0
- metadata +325 -12
@@ -0,0 +1 @@
|
|
1
|
+
ace.define("ace/keyboard/keybinding/emacs",["require","exports","module","ace/keyboard/state_handler"],function(a,b,c){"use strict";var d=a("../state_handler").StateHandler,e=a("../state_handler").matchCharacterOnly,f={start:[{key:"ctrl-x",then:"c-x"},{regex:["(?:command-([0-9]*))*","(down|ctrl-n)"],exec:"golinedown",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(right|ctrl-f)"],exec:"gotoright",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(up|ctrl-p)"],exec:"golineup",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(left|ctrl-b)"],exec:"gotoleft",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{comment:"This binding matches all printable characters except numbers as long as they are no numbers and print them n times.",regex:["(?:command-([0-9]*))","([^0-9]+)*"],match:e,exec:"inserttext",params:[{name:"times",match:1,type:"number",defaultValue:"1"},{name:"text",match:2}]},{comment:"This binding matches numbers as long as there is no meta_number in the buffer.",regex:["(command-[0-9]*)*","([0-9]+)"],match:e,disallowMatches:[1],exec:"inserttext",params:[{name:"text",match:2,type:"text"}]},{regex:["command-([0-9]*)","(command-[0-9]|[0-9])"],comment:"Stops execution if the regex /meta_[0-9]+/ matches to avoid resetting the buffer."}],"c-x":[{key:"ctrl-g",then:"start"},{key:"ctrl-s",exec:"save",then:"start"}]};b.Emacs=new d(f)})
|
@@ -0,0 +1,150 @@
|
|
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 Mozilla Skywriter.
|
15
|
+
*
|
16
|
+
* The Initial Developer of the Original Code is
|
17
|
+
* Mozilla.
|
18
|
+
* Portions created by the Initial Developer are Copyright (C) 2009
|
19
|
+
* the Initial Developer. All Rights Reserved.
|
20
|
+
*
|
21
|
+
* Contributor(s):
|
22
|
+
* Julian Viereck (julian.viereck@gmail.com)
|
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
|
+
ace.define('ace/keyboard/keybinding/emacs', ['require', 'exports', 'module' , 'ace/keyboard/state_handler'], function(require, exports, module) {
|
39
|
+
"use strict";
|
40
|
+
|
41
|
+
var StateHandler = require("../state_handler").StateHandler;
|
42
|
+
var matchCharacterOnly = require("../state_handler").matchCharacterOnly;
|
43
|
+
|
44
|
+
var emacsState = {
|
45
|
+
start: [
|
46
|
+
{
|
47
|
+
key: "ctrl-x",
|
48
|
+
then: "c-x"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
regex: [ "(?:command-([0-9]*))*", "(down|ctrl-n)" ],
|
52
|
+
exec: "golinedown",
|
53
|
+
params: [
|
54
|
+
{
|
55
|
+
name: "times",
|
56
|
+
match: 1,
|
57
|
+
type: "number",
|
58
|
+
defaultValue: 1
|
59
|
+
}
|
60
|
+
]
|
61
|
+
},
|
62
|
+
{
|
63
|
+
regex: [ "(?:command-([0-9]*))*", "(right|ctrl-f)" ],
|
64
|
+
exec: "gotoright",
|
65
|
+
params: [
|
66
|
+
{
|
67
|
+
name: "times",
|
68
|
+
match: 1,
|
69
|
+
type: "number",
|
70
|
+
defaultValue: 1
|
71
|
+
}
|
72
|
+
]
|
73
|
+
},
|
74
|
+
{
|
75
|
+
regex: [ "(?:command-([0-9]*))*", "(up|ctrl-p)" ],
|
76
|
+
exec: "golineup",
|
77
|
+
params: [
|
78
|
+
{
|
79
|
+
name: "times",
|
80
|
+
match: 1,
|
81
|
+
type: "number",
|
82
|
+
defaultValue: 1
|
83
|
+
}
|
84
|
+
]
|
85
|
+
},
|
86
|
+
{
|
87
|
+
regex: [ "(?:command-([0-9]*))*", "(left|ctrl-b)" ],
|
88
|
+
exec: "gotoleft",
|
89
|
+
params: [
|
90
|
+
{
|
91
|
+
name: "times",
|
92
|
+
match: 1,
|
93
|
+
type: "number",
|
94
|
+
defaultValue: 1
|
95
|
+
}
|
96
|
+
]
|
97
|
+
},
|
98
|
+
{
|
99
|
+
comment: "This binding matches all printable characters except numbers as long as they are no numbers and print them n times.",
|
100
|
+
regex: [ "(?:command-([0-9]*))", "([^0-9]+)*" ],
|
101
|
+
match: matchCharacterOnly,
|
102
|
+
exec: "inserttext",
|
103
|
+
params: [
|
104
|
+
{
|
105
|
+
name: "times",
|
106
|
+
match: 1,
|
107
|
+
type: "number",
|
108
|
+
defaultValue: "1"
|
109
|
+
},
|
110
|
+
{
|
111
|
+
name: "text",
|
112
|
+
match: 2
|
113
|
+
}
|
114
|
+
]
|
115
|
+
},
|
116
|
+
{
|
117
|
+
comment: "This binding matches numbers as long as there is no meta_number in the buffer.",
|
118
|
+
regex: [ "(command-[0-9]*)*", "([0-9]+)" ],
|
119
|
+
match: matchCharacterOnly,
|
120
|
+
disallowMatches: [ 1 ],
|
121
|
+
exec: "inserttext",
|
122
|
+
params: [
|
123
|
+
{
|
124
|
+
name: "text",
|
125
|
+
match: 2,
|
126
|
+
type: "text"
|
127
|
+
}
|
128
|
+
]
|
129
|
+
},
|
130
|
+
{
|
131
|
+
regex: [ "command-([0-9]*)", "(command-[0-9]|[0-9])" ],
|
132
|
+
comment: "Stops execution if the regex /meta_[0-9]+/ matches to avoid resetting the buffer."
|
133
|
+
}
|
134
|
+
],
|
135
|
+
"c-x": [
|
136
|
+
{
|
137
|
+
key: "ctrl-g",
|
138
|
+
then: "start"
|
139
|
+
},
|
140
|
+
{
|
141
|
+
key: "ctrl-s",
|
142
|
+
exec: "save",
|
143
|
+
then: "start"
|
144
|
+
}
|
145
|
+
]
|
146
|
+
};
|
147
|
+
|
148
|
+
exports.Emacs = new StateHandler(emacsState);
|
149
|
+
|
150
|
+
});
|
@@ -0,0 +1,150 @@
|
|
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 Mozilla Skywriter.
|
15
|
+
*
|
16
|
+
* The Initial Developer of the Original Code is
|
17
|
+
* Mozilla.
|
18
|
+
* Portions created by the Initial Developer are Copyright (C) 2009
|
19
|
+
* the Initial Developer. All Rights Reserved.
|
20
|
+
*
|
21
|
+
* Contributor(s):
|
22
|
+
* Julian Viereck (julian.viereck@gmail.com)
|
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/keyboard/keybinding/emacs', ['require', 'exports', 'module' , 'ace/keyboard/state_handler'], function(require, exports, module) {
|
39
|
+
"use strict";
|
40
|
+
|
41
|
+
var StateHandler = require("../state_handler").StateHandler;
|
42
|
+
var matchCharacterOnly = require("../state_handler").matchCharacterOnly;
|
43
|
+
|
44
|
+
var emacsState = {
|
45
|
+
start: [
|
46
|
+
{
|
47
|
+
key: "ctrl-x",
|
48
|
+
then: "c-x"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
regex: [ "(?:command-([0-9]*))*", "(down|ctrl-n)" ],
|
52
|
+
exec: "golinedown",
|
53
|
+
params: [
|
54
|
+
{
|
55
|
+
name: "times",
|
56
|
+
match: 1,
|
57
|
+
type: "number",
|
58
|
+
defaultValue: 1
|
59
|
+
}
|
60
|
+
]
|
61
|
+
},
|
62
|
+
{
|
63
|
+
regex: [ "(?:command-([0-9]*))*", "(right|ctrl-f)" ],
|
64
|
+
exec: "gotoright",
|
65
|
+
params: [
|
66
|
+
{
|
67
|
+
name: "times",
|
68
|
+
match: 1,
|
69
|
+
type: "number",
|
70
|
+
defaultValue: 1
|
71
|
+
}
|
72
|
+
]
|
73
|
+
},
|
74
|
+
{
|
75
|
+
regex: [ "(?:command-([0-9]*))*", "(up|ctrl-p)" ],
|
76
|
+
exec: "golineup",
|
77
|
+
params: [
|
78
|
+
{
|
79
|
+
name: "times",
|
80
|
+
match: 1,
|
81
|
+
type: "number",
|
82
|
+
defaultValue: 1
|
83
|
+
}
|
84
|
+
]
|
85
|
+
},
|
86
|
+
{
|
87
|
+
regex: [ "(?:command-([0-9]*))*", "(left|ctrl-b)" ],
|
88
|
+
exec: "gotoleft",
|
89
|
+
params: [
|
90
|
+
{
|
91
|
+
name: "times",
|
92
|
+
match: 1,
|
93
|
+
type: "number",
|
94
|
+
defaultValue: 1
|
95
|
+
}
|
96
|
+
]
|
97
|
+
},
|
98
|
+
{
|
99
|
+
comment: "This binding matches all printable characters except numbers as long as they are no numbers and print them n times.",
|
100
|
+
regex: [ "(?:command-([0-9]*))", "([^0-9]+)*" ],
|
101
|
+
match: matchCharacterOnly,
|
102
|
+
exec: "inserttext",
|
103
|
+
params: [
|
104
|
+
{
|
105
|
+
name: "times",
|
106
|
+
match: 1,
|
107
|
+
type: "number",
|
108
|
+
defaultValue: "1"
|
109
|
+
},
|
110
|
+
{
|
111
|
+
name: "text",
|
112
|
+
match: 2
|
113
|
+
}
|
114
|
+
]
|
115
|
+
},
|
116
|
+
{
|
117
|
+
comment: "This binding matches numbers as long as there is no meta_number in the buffer.",
|
118
|
+
regex: [ "(command-[0-9]*)*", "([0-9]+)" ],
|
119
|
+
match: matchCharacterOnly,
|
120
|
+
disallowMatches: [ 1 ],
|
121
|
+
exec: "inserttext",
|
122
|
+
params: [
|
123
|
+
{
|
124
|
+
name: "text",
|
125
|
+
match: 2,
|
126
|
+
type: "text"
|
127
|
+
}
|
128
|
+
]
|
129
|
+
},
|
130
|
+
{
|
131
|
+
regex: [ "command-([0-9]*)", "(command-[0-9]|[0-9])" ],
|
132
|
+
comment: "Stops execution if the regex /meta_[0-9]+/ matches to avoid resetting the buffer."
|
133
|
+
}
|
134
|
+
],
|
135
|
+
"c-x": [
|
136
|
+
{
|
137
|
+
key: "ctrl-g",
|
138
|
+
then: "start"
|
139
|
+
},
|
140
|
+
{
|
141
|
+
key: "ctrl-s",
|
142
|
+
exec: "save",
|
143
|
+
then: "start"
|
144
|
+
}
|
145
|
+
]
|
146
|
+
};
|
147
|
+
|
148
|
+
exports.Emacs = new StateHandler(emacsState);
|
149
|
+
|
150
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
define("ace/keyboard/keybinding/emacs",["require","exports","module","ace/keyboard/state_handler"],function(a,b,c){"use strict";var d=a("../state_handler").StateHandler,e=a("../state_handler").matchCharacterOnly,f={start:[{key:"ctrl-x",then:"c-x"},{regex:["(?:command-([0-9]*))*","(down|ctrl-n)"],exec:"golinedown",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(right|ctrl-f)"],exec:"gotoright",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(up|ctrl-p)"],exec:"golineup",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(left|ctrl-b)"],exec:"gotoleft",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{comment:"This binding matches all printable characters except numbers as long as they are no numbers and print them n times.",regex:["(?:command-([0-9]*))","([^0-9]+)*"],match:e,exec:"inserttext",params:[{name:"times",match:1,type:"number",defaultValue:"1"},{name:"text",match:2}]},{comment:"This binding matches numbers as long as there is no meta_number in the buffer.",regex:["(command-[0-9]*)*","([0-9]+)"],match:e,disallowMatches:[1],exec:"inserttext",params:[{name:"text",match:2,type:"text"}]},{regex:["command-([0-9]*)","(command-[0-9]|[0-9])"],comment:"Stops execution if the regex /meta_[0-9]+/ matches to avoid resetting the buffer."}],"c-x":[{key:"ctrl-g",then:"start"},{key:"ctrl-s",exec:"save",then:"start"}]};b.Emacs=new d(f)})
|
@@ -0,0 +1 @@
|
|
1
|
+
ace.define("ace/keyboard/keybinding/vim",["require","exports","module","ace/keyboard/state_handler"],function(a,b,c){"use strict";var d=a("../state_handler").StateHandler,e=a("../state_handler").matchCharacterOnly,f=function(a,b,c){return{regex:["([0-9]*)",a],exec:b,params:[{name:"times",match:1,type:"number",defaultValue:1}],then:c}},g={start:[{key:"i",then:"insertMode"},{key:"d",then:"deleteMode"},{key:"a",exec:"gotoright",then:"insertMode"},{key:"shift-i",exec:"gotolinestart",then:"insertMode"},{key:"shift-a",exec:"gotolineend",then:"insertMode"},{key:"shift-c",exec:"removetolineend",then:"insertMode"},{key:"shift-r",exec:"overwrite",then:"replaceMode"},f("(k|up)","golineup"),f("(j|down)","golinedown"),f("(l|right)","gotoright"),f("(h|left)","gotoleft"),{key:"shift-g",exec:"gotoend"},f("b","gotowordleft"),f("e","gotowordright"),f("x","del"),f("shift-x","backspace"),f("shift-d","removetolineend"),f("u","undo"),{comment:"Catch some keyboard input to stop it here",match:e}],insertMode:[{key:"esc",then:"start"}],replaceMode:[{key:"esc",exec:"overwrite",then:"start"}],deleteMode:[{key:"d",exec:"removeline",then:"start"}]};b.Vim=new d(g)})
|
@@ -0,0 +1,138 @@
|
|
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 Mozilla Skywriter.
|
15
|
+
*
|
16
|
+
* The Initial Developer of the Original Code is
|
17
|
+
* Mozilla.
|
18
|
+
* Portions created by the Initial Developer are Copyright (C) 2009
|
19
|
+
* the Initial Developer. All Rights Reserved.
|
20
|
+
*
|
21
|
+
* Contributor(s):
|
22
|
+
* Julian Viereck (julian.viereck@gmail.com)
|
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
|
+
ace.define('ace/keyboard/keybinding/vim', ['require', 'exports', 'module' , 'ace/keyboard/state_handler'], function(require, exports, module) {
|
39
|
+
"use strict";
|
40
|
+
|
41
|
+
var StateHandler = require("../state_handler").StateHandler;
|
42
|
+
var matchCharacterOnly = require("../state_handler").matchCharacterOnly;
|
43
|
+
|
44
|
+
var vimcommand = function(key, exec, then) {
|
45
|
+
return {
|
46
|
+
regex: [ "([0-9]*)", key ],
|
47
|
+
exec: exec,
|
48
|
+
params: [
|
49
|
+
{
|
50
|
+
name: "times",
|
51
|
+
match: 1,
|
52
|
+
type: "number",
|
53
|
+
defaultValue: 1
|
54
|
+
}
|
55
|
+
],
|
56
|
+
then: then
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
var vimStates = {
|
61
|
+
start: [
|
62
|
+
{
|
63
|
+
key: "i",
|
64
|
+
then: "insertMode"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
key: "d",
|
68
|
+
then: "deleteMode"
|
69
|
+
},
|
70
|
+
{
|
71
|
+
key: "a",
|
72
|
+
exec: "gotoright",
|
73
|
+
then: "insertMode"
|
74
|
+
},
|
75
|
+
{
|
76
|
+
key: "shift-i",
|
77
|
+
exec: "gotolinestart",
|
78
|
+
then: "insertMode"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
key: "shift-a",
|
82
|
+
exec: "gotolineend",
|
83
|
+
then: "insertMode"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
key: "shift-c",
|
87
|
+
exec: "removetolineend",
|
88
|
+
then: "insertMode"
|
89
|
+
},
|
90
|
+
{
|
91
|
+
key: "shift-r",
|
92
|
+
exec: "overwrite",
|
93
|
+
then: "replaceMode"
|
94
|
+
},
|
95
|
+
vimcommand("(k|up)", "golineup"),
|
96
|
+
vimcommand("(j|down)", "golinedown"),
|
97
|
+
vimcommand("(l|right)", "gotoright"),
|
98
|
+
vimcommand("(h|left)", "gotoleft"),
|
99
|
+
{
|
100
|
+
key: "shift-g",
|
101
|
+
exec: "gotoend"
|
102
|
+
},
|
103
|
+
vimcommand("b", "gotowordleft"),
|
104
|
+
vimcommand("e", "gotowordright"),
|
105
|
+
vimcommand("x", "del"),
|
106
|
+
vimcommand("shift-x", "backspace"),
|
107
|
+
vimcommand("shift-d", "removetolineend"),
|
108
|
+
vimcommand("u", "undo"), // [count] on this may/may not work, depending on browser implementation...
|
109
|
+
{
|
110
|
+
comment: "Catch some keyboard input to stop it here",
|
111
|
+
match: matchCharacterOnly
|
112
|
+
}
|
113
|
+
],
|
114
|
+
insertMode: [
|
115
|
+
{
|
116
|
+
key: "esc",
|
117
|
+
then: "start"
|
118
|
+
}
|
119
|
+
],
|
120
|
+
replaceMode: [
|
121
|
+
{
|
122
|
+
key: "esc",
|
123
|
+
exec: "overwrite",
|
124
|
+
then: "start"
|
125
|
+
}
|
126
|
+
],
|
127
|
+
deleteMode: [
|
128
|
+
{
|
129
|
+
key: "d",
|
130
|
+
exec: "removeline",
|
131
|
+
then: "start"
|
132
|
+
}
|
133
|
+
]
|
134
|
+
};
|
135
|
+
|
136
|
+
exports.Vim = new StateHandler(vimStates);
|
137
|
+
|
138
|
+
});
|
@@ -0,0 +1,138 @@
|
|
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 Mozilla Skywriter.
|
15
|
+
*
|
16
|
+
* The Initial Developer of the Original Code is
|
17
|
+
* Mozilla.
|
18
|
+
* Portions created by the Initial Developer are Copyright (C) 2009
|
19
|
+
* the Initial Developer. All Rights Reserved.
|
20
|
+
*
|
21
|
+
* Contributor(s):
|
22
|
+
* Julian Viereck (julian.viereck@gmail.com)
|
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/keyboard/keybinding/vim', ['require', 'exports', 'module' , 'ace/keyboard/state_handler'], function(require, exports, module) {
|
39
|
+
"use strict";
|
40
|
+
|
41
|
+
var StateHandler = require("../state_handler").StateHandler;
|
42
|
+
var matchCharacterOnly = require("../state_handler").matchCharacterOnly;
|
43
|
+
|
44
|
+
var vimcommand = function(key, exec, then) {
|
45
|
+
return {
|
46
|
+
regex: [ "([0-9]*)", key ],
|
47
|
+
exec: exec,
|
48
|
+
params: [
|
49
|
+
{
|
50
|
+
name: "times",
|
51
|
+
match: 1,
|
52
|
+
type: "number",
|
53
|
+
defaultValue: 1
|
54
|
+
}
|
55
|
+
],
|
56
|
+
then: then
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
var vimStates = {
|
61
|
+
start: [
|
62
|
+
{
|
63
|
+
key: "i",
|
64
|
+
then: "insertMode"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
key: "d",
|
68
|
+
then: "deleteMode"
|
69
|
+
},
|
70
|
+
{
|
71
|
+
key: "a",
|
72
|
+
exec: "gotoright",
|
73
|
+
then: "insertMode"
|
74
|
+
},
|
75
|
+
{
|
76
|
+
key: "shift-i",
|
77
|
+
exec: "gotolinestart",
|
78
|
+
then: "insertMode"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
key: "shift-a",
|
82
|
+
exec: "gotolineend",
|
83
|
+
then: "insertMode"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
key: "shift-c",
|
87
|
+
exec: "removetolineend",
|
88
|
+
then: "insertMode"
|
89
|
+
},
|
90
|
+
{
|
91
|
+
key: "shift-r",
|
92
|
+
exec: "overwrite",
|
93
|
+
then: "replaceMode"
|
94
|
+
},
|
95
|
+
vimcommand("(k|up)", "golineup"),
|
96
|
+
vimcommand("(j|down)", "golinedown"),
|
97
|
+
vimcommand("(l|right)", "gotoright"),
|
98
|
+
vimcommand("(h|left)", "gotoleft"),
|
99
|
+
{
|
100
|
+
key: "shift-g",
|
101
|
+
exec: "gotoend"
|
102
|
+
},
|
103
|
+
vimcommand("b", "gotowordleft"),
|
104
|
+
vimcommand("e", "gotowordright"),
|
105
|
+
vimcommand("x", "del"),
|
106
|
+
vimcommand("shift-x", "backspace"),
|
107
|
+
vimcommand("shift-d", "removetolineend"),
|
108
|
+
vimcommand("u", "undo"), // [count] on this may/may not work, depending on browser implementation...
|
109
|
+
{
|
110
|
+
comment: "Catch some keyboard input to stop it here",
|
111
|
+
match: matchCharacterOnly
|
112
|
+
}
|
113
|
+
],
|
114
|
+
insertMode: [
|
115
|
+
{
|
116
|
+
key: "esc",
|
117
|
+
then: "start"
|
118
|
+
}
|
119
|
+
],
|
120
|
+
replaceMode: [
|
121
|
+
{
|
122
|
+
key: "esc",
|
123
|
+
exec: "overwrite",
|
124
|
+
then: "start"
|
125
|
+
}
|
126
|
+
],
|
127
|
+
deleteMode: [
|
128
|
+
{
|
129
|
+
key: "d",
|
130
|
+
exec: "removeline",
|
131
|
+
then: "start"
|
132
|
+
}
|
133
|
+
]
|
134
|
+
};
|
135
|
+
|
136
|
+
exports.Vim = new StateHandler(vimStates);
|
137
|
+
|
138
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
define("ace/keyboard/keybinding/vim",["require","exports","module","ace/keyboard/state_handler"],function(a,b,c){"use strict";var d=a("../state_handler").StateHandler,e=a("../state_handler").matchCharacterOnly,f=function(a,b,c){return{regex:["([0-9]*)",a],exec:b,params:[{name:"times",match:1,type:"number",defaultValue:1}],then:c}},g={start:[{key:"i",then:"insertMode"},{key:"d",then:"deleteMode"},{key:"a",exec:"gotoright",then:"insertMode"},{key:"shift-i",exec:"gotolinestart",then:"insertMode"},{key:"shift-a",exec:"gotolineend",then:"insertMode"},{key:"shift-c",exec:"removetolineend",then:"insertMode"},{key:"shift-r",exec:"overwrite",then:"replaceMode"},f("(k|up)","golineup"),f("(j|down)","golinedown"),f("(l|right)","gotoright"),f("(h|left)","gotoleft"),{key:"shift-g",exec:"gotoend"},f("b","gotowordleft"),f("e","gotowordright"),f("x","del"),f("shift-x","backspace"),f("shift-d","removetolineend"),f("u","undo"),{comment:"Catch some keyboard input to stop it here",match:e}],insertMode:[{key:"esc",then:"start"}],replaceMode:[{key:"esc",exec:"overwrite",then:"start"}],deleteMode:[{key:"d",exec:"removeline",then:"start"}]};b.Vim=new d(g)})
|
@@ -0,0 +1 @@
|
|
1
|
+
ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./c_cpp_highlight_rules").c_cppHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("./behaviour/cstyle").CstyleBehaviour,k=a("./folding/cstyle").FoldMode,l=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new j,this.foldingRules=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(l.prototype),b.Mode=l}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("and|double|not_eq|throw|and_eq|dynamic_cast|operator|true|asm|else|or|try|auto|enum|or_eq|typedef|bitand|explicit|private|typeid|bitor|extern|protected|typename|bool|false|public|union|break|float|register|unsigned|case|fro|reinterpret-cast|using|catch|friend|return|virtual|char|goto|short|void|class|if|signed|volatile|compl|inline|sizeof|wchar_t|const|int|static|while|const-cast|long|static_cast|xor|continue|mutable|struct|xor_eq|default|namespace|switch|delete|new|template|do|not|this|for".split("|")),b=e.arrayToMap("NULL".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},f.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"},{token:function(c){return c=="this"?"variable.language":a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[f.getEndRule("start")])};d.inherits(h,g),b.c_cppHighlightRules=h}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),f.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},f.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}},b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'||e=="'"){var f=e,g=c.getSelectionRange(),h=d.doc.getTextRange(g);if(h!=="")return{text:f+h+f,selection:!1};var i=c.getCursorPosition(),j=d.doc.getLine(i.row),k=j.substring(i.column-1,i.column);if(k=="\\")return null;var l=d.getTokens(g.start.row,g.start.row)[0].tokens,m=0,n,o=-1;for(var p=0;p<l.length;p++){n=l[p],n.type=="string"?o=-1:o<0&&(o=n.value.indexOf(f));if(n.value.length+m>g.start.column)break;m+=l[p].value.length}if(!n||o<0&&n.type!=="comment"&&(n.type!=="string"||g.start.column!==n.value.length+m-1&&n.value.lastIndexOf(f)===n.value.length-1))return{text:f+f,selection:[1,1]};if(n&&n.type==="string"){var q=j.substring(i.column,i.column+1);if(q==f)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&(f=='"'||f=="'")){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}}).call(e.prototype)})
|