mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
NEW Upgrade ACE editor to v1.4.6
This commit is contained in:
parent
a19fd8507e
commit
2b57d486dc
|
|
@ -37,6 +37,7 @@ TCPDF 6.2.25 LGPL-3+ Yes
|
|||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
|
||||
JS libraries:
|
||||
Ace 1.4.6 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
jQuery 3.4.1 MIT License Yes JS library
|
||||
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
|
||||
jQuery select2 4.0.5 GPL and Apache License Yes JS library plugin for sexier multiselect
|
||||
|
|
@ -54,7 +55,6 @@ jQuery Timepicker 1.1.0 GPL and MIT License Yes
|
|||
jsGanttImproved 1.7.5.4 BSD License Yes JS library (to build Gantt reports)
|
||||
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone
|
||||
SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer
|
||||
Ace 1.2.8 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
|
||||
Image libraries:
|
||||
Octicons 8.1 MIT Yes
|
||||
|
|
|
|||
|
|
@ -716,10 +716,10 @@ $htmlother = new FormOther($db);
|
|||
$help_url='EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing';
|
||||
llxHeader('', $langs->trans("Mailing"), $help_url, '', 0, 0,
|
||||
array(
|
||||
'/includes/ace/ace.js',
|
||||
'/includes/ace/ext-statusbar.js',
|
||||
'/includes/ace/ext-language_tools.js',
|
||||
//'/includes/ace/ext-chromevox.js'
|
||||
'/includes/ace/src/ace.js',
|
||||
'/includes/ace/src/ext-statusbar.js',
|
||||
'/includes/ace/src/ext-language_tools.js',
|
||||
//'/includes/ace/src/ext-chromevox.js'
|
||||
), array());
|
||||
|
||||
if ($action == 'create')
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ class DolEditor
|
|||
if ($titlecontent)
|
||||
{
|
||||
$out.= '<div class="aceeditorstatusbar" id="statusBar'.$this->htmlname.'">'.$titlecontent;
|
||||
$out.= ' - <a id="morelines" href="#" class="right morelines'.$this->htmlname.'">'.dol_escape_htmltag($langs->trans("ShowMoreLines")).'</a> ';
|
||||
$out.= ' - <a id="morelines" href="#" class="right morelines'.$this->htmlname.' reposition">'.dol_escape_htmltag($langs->trans("ShowMoreLines")).'</a> ';
|
||||
$out.= '</div>';
|
||||
$out.= '<script type="text/javascript" language="javascript">'."\n";
|
||||
$out.= 'jQuery(document).ready(function() {'."\n";
|
||||
|
|
|
|||
4
htdocs/includes/ace/CODE_OF_CONDUCT.md
Normal file
4
htdocs/includes/ace/CODE_OF_CONDUCT.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
## Code of Conduct
|
||||
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
|
||||
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
|
||||
opensource-codeofconduct@amazon.com with any additional questions or comments.
|
||||
61
htdocs/includes/ace/CONTRIBUTING.md
Normal file
61
htdocs/includes/ace/CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
# Contributing Guidelines
|
||||
|
||||
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
|
||||
documentation, we greatly value feedback and contributions from our community.
|
||||
|
||||
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
|
||||
information to effectively respond to your bug report or contribution.
|
||||
|
||||
|
||||
## Reporting Bugs/Feature Requests
|
||||
|
||||
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
|
||||
|
||||
When filing an issue, please check [existing open](https://github.com/ajaxorg/ace-builds/issues), or [recently closed](https://github.com/ajaxorg/ace-builds/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
|
||||
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
|
||||
|
||||
* A reproducible test case or series of steps
|
||||
* The version of our code being used
|
||||
* Any modifications you've made relevant to the bug
|
||||
* Anything unusual about your environment or deployment
|
||||
|
||||
|
||||
## Contributing via Pull Requests
|
||||
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
|
||||
|
||||
1. You are working against the latest source on the *master* branch.
|
||||
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
|
||||
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
|
||||
|
||||
To send us a pull request, please:
|
||||
|
||||
1. Fork the repository.
|
||||
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
|
||||
3. Ensure local tests pass.
|
||||
4. Commit to your fork using clear commit messages.
|
||||
5. Send us a pull request, answering any default questions in the pull request interface.
|
||||
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
|
||||
|
||||
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
|
||||
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
|
||||
|
||||
|
||||
## Finding contributions to work on
|
||||
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/ajaxorg/ace-builds/labels/help%20wanted) issues is a great place to start.
|
||||
|
||||
|
||||
## Code of Conduct
|
||||
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
|
||||
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
|
||||
opensource-codeofconduct@amazon.com with any additional questions or comments.
|
||||
|
||||
|
||||
## Security issue notifications
|
||||
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
|
||||
|
||||
|
||||
## Licensing
|
||||
|
||||
See the [LICENSE](https://github.com/ajaxorg/ace-builds/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
|
||||
|
||||
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
|
||||
450
htdocs/includes/ace/ChangeLog.txt
Normal file
450
htdocs/includes/ace/ChangeLog.txt
Normal file
|
|
@ -0,0 +1,450 @@
|
|||
2019.09.08 Version 1.4.6
|
||||
* restore native behavior of ctrl-p on mac (jumptomatching command is moved to cmd-\)
|
||||
* improve snippet manager
|
||||
* fix backspace handling on mobile
|
||||
|
||||
2019.06.17 Version 1.4.5
|
||||
* improve scrolling and selection on mobile
|
||||
* improve type definitions
|
||||
|
||||
2019.04.24 Version 1.4.4
|
||||
* add experimental command prompt
|
||||
* add chrystal, nim and nginx highlight rules
|
||||
* fix regression in vim mode on ios
|
||||
|
||||
2019.02.21 Version 1.4.3
|
||||
* add sublime keybindings
|
||||
* add rtl option
|
||||
* implement ` and < textobjects in vim mode
|
||||
|
||||
2018.11.21 Version 1.4.2
|
||||
* fix regression in vim mode
|
||||
* improve keyboard input handling on ipad and IE
|
||||
* add new syntax highlighters
|
||||
|
||||
2018.08.07 Version 1.4.1
|
||||
* fix regression in autocomplete
|
||||
|
||||
2018.08.06 Version 1.4.0
|
||||
|
||||
* remove usage of innerHTML
|
||||
* improved handling of textinput for IME and mobile
|
||||
* add support for relative line numbers
|
||||
* improve autocompletion popup
|
||||
|
||||
2018.03.26 Version 1.3.3
|
||||
* fix regession in static-highlight extension
|
||||
* use css animation for cursor blinking
|
||||
|
||||
2018.03.21 Version 1.3.2
|
||||
* add experimental support for using ace-builds with webpack
|
||||
|
||||
2018.02.11 Version 1.3.1
|
||||
|
||||
* fixed regression with selectionChange event not firing some times
|
||||
* improved handling of non-ascii characters in vim normal mode
|
||||
|
||||
2018.01.31 Version 1.3.0
|
||||
|
||||
* added copy copyWithEmptySelection option
|
||||
* improved undoManager
|
||||
* improved settings_menu plugin
|
||||
* improved handling of files with very long lines
|
||||
* fixed bug with scrolling editor out of view in transformed elements
|
||||
|
||||
2017.10.17 Version 1.2.9
|
||||
|
||||
* added support for bidirectional text, with monospace font (Alex Shensis)
|
||||
* added support for emoji 😊
|
||||
|
||||
* new language modes
|
||||
- Red (Toomas Vooglaid)
|
||||
- CSound (Nathan Whetsell)
|
||||
- JSSM (John Haugeland)
|
||||
|
||||
* New Themes
|
||||
- Dracula (Austin Schwartz)
|
||||
|
||||
2017.07.02 Version 1.2.8
|
||||
* Fixed small bugs in searchbox and autocompleter
|
||||
|
||||
2017.06.18 Version 1.2.7
|
||||
|
||||
* Added Support for arrow keys on external IPad keyboard (Emanuele Tamponi)
|
||||
* added match counter to searchbox extension
|
||||
|
||||
- implemented higlighting of multiline strings in yaml mode (Maxim Trushin)
|
||||
- improved haml syntax highlighter (Andrés Álvarez)
|
||||
|
||||
2016.12.03 Version 1.2.6
|
||||
|
||||
* Fixed IME handling on new Chrome
|
||||
* Support for php 7 in the syntax checker
|
||||
|
||||
2016.08.16 Version 1.2.5
|
||||
|
||||
* Fixed regression in noconflict mode
|
||||
|
||||
2016.07.27 Version 1.2.4
|
||||
|
||||
* Maintenance release with several new modes and small bugfixes
|
||||
|
||||
2016.01.17 Version 1.2.3
|
||||
|
||||
* Bugfixes
|
||||
- fix memory leak in setSession (Tyler Stalder)
|
||||
- double click not working on linux/mac
|
||||
|
||||
* new language modes
|
||||
- reStructuredText (Robin Jarry)
|
||||
- NSIS (Jan T. Sott)
|
||||
|
||||
|
||||
2015.10.28 Version 1.2.1
|
||||
|
||||
* new language modes
|
||||
- Swift
|
||||
- JSX
|
||||
|
||||
2015.07.11 Version 1.2.0
|
||||
|
||||
* New Features
|
||||
- Indented soft wrap (danyaPostfactum)
|
||||
- Rounded borders on selections
|
||||
|
||||
* API Changes
|
||||
- unified delta types `{start, end, action, lines}` (Alden Daniels https://github.com/ajaxorg/ace/pull/1745)
|
||||
- "change" event listeners on session and editor get delta objects directly
|
||||
|
||||
* new language modes
|
||||
- SQLServer (Morgan Yarbrough)
|
||||
|
||||
2015.04.03 Version 1.1.9
|
||||
|
||||
- Small Enhancements and Bugfixes
|
||||
|
||||
2014.11.08 Version 1.1.8
|
||||
|
||||
* API Changes
|
||||
- `editor.commands.commandKeyBinding` now contains direct map from keys to commands instead of grouping them by hashid
|
||||
|
||||
* New Features
|
||||
- Improved autoindent for html and php modes (Adam Jimenez)
|
||||
- Find All from searchbox (Colton Voege)
|
||||
|
||||
* new language modes
|
||||
- Elixir, Elm
|
||||
|
||||
2014.09.21 Version 1.1.7
|
||||
|
||||
* Bugfixes
|
||||
- fix several bugs in autocompletion
|
||||
- workaround for inaccurate getBoundingClientRect on chrome 37
|
||||
|
||||
2014.08.17 Version 1.1.6
|
||||
|
||||
* Bugfixes
|
||||
- fix regression in double tap to highlight
|
||||
- Improved Latex Mode (Daniel Felder)
|
||||
|
||||
* API Changes
|
||||
- editor.destroy destroys editor.session too (call editor.setSession(null) to prevent that)
|
||||
|
||||
* new language modes
|
||||
- Praat (José Joaquín Atria)
|
||||
- Eiffel (Victorien Elvinger)
|
||||
- G-code (Adam Joseph Cook)
|
||||
|
||||
2014.07.09 Version 1.1.5
|
||||
|
||||
* Bugfixes
|
||||
- fix regression in autocomplete popup
|
||||
|
||||
* new language modes
|
||||
- gitignore (Devon Carew)
|
||||
|
||||
2014.07.01 Version 1.1.4
|
||||
|
||||
* New Features
|
||||
- Highlight matching tags (Adam Jimenez)
|
||||
- Improved jump to matching command (Adam Jimenez)
|
||||
|
||||
* new language modes
|
||||
- AppleScript (Yaogang Lian)
|
||||
- Vala
|
||||
|
||||
2014.03.08 Version 1.1.3
|
||||
|
||||
* New Features
|
||||
- Allow syntax checkers to be loaded from CDN (Derk-Jan Hartman)
|
||||
- Add ColdFusion behavior (Abram Adams)
|
||||
- add showLineNumbers option
|
||||
- Add html syntax checker (danyaPostfactum)
|
||||
|
||||
* new language modes
|
||||
- Gherkin (Patrick Nevels)
|
||||
- Smarty
|
||||
|
||||
2013.12.02 Version 1.1.2
|
||||
|
||||
* New Features
|
||||
- Accessibility Theme for Ace (Peter Xiao)
|
||||
- use snipetManager for expanding emmet snippets
|
||||
- update jshint to 2.1.4
|
||||
- improve php syntax checker (jdalegonzalez)
|
||||
- add option for autoresizing
|
||||
- add option for autohiding vertical scrollbar
|
||||
- improvements to highlighting of xml like languages (danyaPostfactum)
|
||||
- add support for autocompletion and snippets (gjtorikyan danyaPostfactum and others)
|
||||
- add option to merge similar changes in undo history
|
||||
- add scrollPastEnd option
|
||||
- use html5 dragndrop for text dragging (danyaPostfactum)
|
||||
|
||||
* API Changes
|
||||
- fixed typo in HashHandler commmandManager
|
||||
|
||||
* new language modes
|
||||
- Nix (Zef Hemel)
|
||||
- Protobuf (Zef Hemel)
|
||||
- Soy
|
||||
- Handlebars
|
||||
|
||||
2013.06.04 Version 1.1.1
|
||||
|
||||
- Improved emacs keybindings (Robert Krahn)
|
||||
- Added markClean, isClean methods to UndoManager (Joonsoo Jeon)
|
||||
- Do not allow `Toggle comments` command to remove spaces from indentation
|
||||
- Softer colors for indent guides in dark themes
|
||||
|
||||
* new language modes
|
||||
- Ada
|
||||
- Assembly_x86
|
||||
- Cobol
|
||||
- D
|
||||
- ejs
|
||||
- MATLAB
|
||||
- MySQL
|
||||
- Twig
|
||||
- Verilog
|
||||
|
||||
2013.05.01, Version 1.1.0
|
||||
|
||||
* API Changes
|
||||
- Default position of the editor container is changed to relative. Add `.ace_editor {position: absolute}` css rule to restore old behavior
|
||||
- Changed default line-height to `normal` to not conflict with bootstrap. Use `line-height: inherit` for old behavior.
|
||||
- Changed marker types accepted by session.addMarker. It now accepts "text"|"line"|"fullLine"|"screenLine"
|
||||
- Internal classnames used by editor were made more consistent
|
||||
- Introduced `editor.setOption/getOption/setOptions/getOptions` methods
|
||||
- Introduced positionToIndex, indexToPosition methods
|
||||
|
||||
* New Features
|
||||
- Improved emacs mode (chetstone)
|
||||
with Incremental search and Occur modes (Robert Krahn)
|
||||
|
||||
- Improved ime handling
|
||||
- Searchbox (Vlad Zinculescu)
|
||||
|
||||
- Added elastic tabstops lite extension (Garen Torikian)
|
||||
- Added extension for whitespace manipulation
|
||||
- Added extension for enabling spellchecking from contextmenu
|
||||
- Added extension for displaying available keyboard shortcuts (Matthew Christopher Kastor-Inare III)
|
||||
- Added extension for displaying options panel (Matthew Christopher Kastor-Inare III)
|
||||
- Added modelist extension (Matthew Christopher Kastor-Inare III)
|
||||
|
||||
- Improved toggleCommentLines and added ToggleCommentBlock command
|
||||
- `:;` pairing in CSS mode (danyaPostfactum)
|
||||
|
||||
- Added suppoert for Delete and SelectAll from context menu (danyaPostfactum)
|
||||
|
||||
- Make wrapping behavior optional
|
||||
- Selective bracket insertion/skipping
|
||||
|
||||
- Added commands for increase/decrease numbers, sort lines (Vlad Zinculescu)
|
||||
- Folding for Markdown, Lua, LaTeX
|
||||
- Selective bracket insertion/skipping for C-like languages
|
||||
|
||||
* Many new languages
|
||||
- Scheme (Mu Lei)
|
||||
- Dot (edwardsp)
|
||||
- FreeMarker (nguillaumin)
|
||||
- Tiny Mushcode (h3rb)
|
||||
- Velocity (Ryan Griffith)
|
||||
- TOML (Garen Torikian)
|
||||
- LSL (Nemurimasu Neiro, Builders Brewery)
|
||||
- Curly (Libo Cannici)
|
||||
- vbScript (Jan Jongboom)
|
||||
- R (RStudio)
|
||||
- ABAP
|
||||
- Lucene (Graham Scott)
|
||||
- Haml (Garen Torikian)
|
||||
- Objective-C (Garen Torikian)
|
||||
- Makefile (Garen Torikian)
|
||||
- TypeScript (Garen Torikian)
|
||||
- Lisp (Garen Torikian)
|
||||
- Stylus (Garen Torikian)
|
||||
- Dart (Garen Torikian)
|
||||
|
||||
* Live syntax checks
|
||||
- PHP (danyaPostfactum)
|
||||
- Lua
|
||||
|
||||
* New Themes
|
||||
- Chaos
|
||||
- Terminal
|
||||
|
||||
2012.09.17, Version 1.0.0
|
||||
|
||||
* New Features
|
||||
- Multiple cursors and selections (https://c9.io/site/blog/2012/08/be-an-armenian-warrior-with-block-selection-on-steroids/)
|
||||
- Fold buttons displayed in the gutter
|
||||
- Indent Guides
|
||||
- Completely reworked vim mode (Sergi Mansilla)
|
||||
- Improved emacs keybindings
|
||||
- Autoclosing of html tags (danyaPostfactum)
|
||||
|
||||
* 20 New language modes
|
||||
- Coldfusion (Russ)
|
||||
- Diff
|
||||
- GLSL (Ed Mackey)
|
||||
- Go (Davide Saurino)
|
||||
- Haxe (Jason O'Neil)
|
||||
- Jade (Garen Torikian)
|
||||
- jsx (Syu Kato)
|
||||
- LaTeX (James Allen)
|
||||
- Less (John Roepke)
|
||||
- Liquid (Bernie Telles)
|
||||
- Lua (Lee Gao)
|
||||
- LuaPage (Choonster)
|
||||
- Markdown (Chris Spencer)
|
||||
- PostgreSQL (John DeSoi)
|
||||
- Powershell (John Kane)
|
||||
- Sh (Richo Healey)
|
||||
- SQL (Jonathan Camile)
|
||||
- Tcl (Cristoph Hochreiner)
|
||||
- XQuery (William Candillion)
|
||||
- Yaml (Meg Sharkey)
|
||||
|
||||
* Live syntax checks
|
||||
- for XQuery and JSON
|
||||
|
||||
* New Themes
|
||||
- Ambiance (Irakli Gozalishvili)
|
||||
- Dreamweaver (Adam Jimenez)
|
||||
- Github (bootstraponline)
|
||||
- Tommorrow themes (https://github.com/chriskempson/tomorrow-theme)
|
||||
- XCode
|
||||
|
||||
* Many Small Enhancements and Bugfixes
|
||||
|
||||
2011.08.02, Version 0.2.0
|
||||
|
||||
* Split view (Julian Viereck)
|
||||
- split editor area horizontally or vertivally to show two files at the same
|
||||
time
|
||||
|
||||
* Code Folding (Julian Viereck)
|
||||
- Unstructured code folding
|
||||
- Will be the basis for language aware folding
|
||||
|
||||
* Mode behaviours (Chris Spencer)
|
||||
- Adds mode specific hooks which allow transformations of entered text
|
||||
- Autoclosing of braces, paranthesis and quotation marks in C style modes
|
||||
- Autoclosing of angular brackets in XML style modes
|
||||
|
||||
* New language modes
|
||||
- Clojure (Carin Meier)
|
||||
- C# (Rob Conery)
|
||||
- Groovy (Ben Tilford)
|
||||
- Scala (Ben Tilford)
|
||||
- JSON
|
||||
- OCaml (Sergi Mansilla)
|
||||
- Perl (Panagiotis Astithas)
|
||||
- SCSS/SASS (Andreas Madsen)
|
||||
- SVG
|
||||
- Textile (Kelley van Evert)
|
||||
- SCAD (Jacob Hansson)
|
||||
|
||||
* Live syntax checks
|
||||
- Lint for CSS using CSS Lint <http://csslint.net/>
|
||||
- CoffeeScript
|
||||
|
||||
* New Themes
|
||||
- Crimson Editor (iebuggy)
|
||||
- Merbivore (Michael Schwartz)
|
||||
- Merbivore soft (Michael Schwartz)
|
||||
- Solarized dark/light <http://ethanschoonover.com/solarized> (David Alan Hjelle)
|
||||
- Vibrant Ink (Michael Schwartz)
|
||||
|
||||
* Small Features/Enhancements
|
||||
- Lots of render performance optimizations (Harutyun Amirjanyan)
|
||||
- Improved Ruby highlighting (Chris Wanstrath, Trent Ogren)
|
||||
- Improved PHP highlighting (Thomas Hruska)
|
||||
- Improved CSS highlighting (Sean Kellogg)
|
||||
- Clicks which cause the editor to be focused don't reset the selection
|
||||
- Make padding text layer specific so that print margin and active line
|
||||
highlight are not affected (Irakli Gozalishvili)
|
||||
- Added setFontSize method
|
||||
- Improved vi keybindings (Trent Ogren)
|
||||
- When unfocused make cursor transparent instead of removing it (Harutyun Amirjanyan)
|
||||
- Support for matching groups in tokenizer with arrays of tokens (Chris Spencer)
|
||||
|
||||
* Bug fixes
|
||||
- Add support for the new OSX scroll bars
|
||||
- Properly highlight JavaScript regexp literals
|
||||
- Proper handling of unicode characters in JavaScript identifiers
|
||||
- Fix remove lines command on last line (Harutyun Amirjanyan)
|
||||
- Fix scroll wheel sluggishness in Safari
|
||||
- Make keyboard infrastructure route keys like []^$ the right way (Julian Viereck)
|
||||
|
||||
2011.02.14, Version 0.1.6
|
||||
|
||||
* Floating Anchors
|
||||
- An Anchor is a floating pointer in the document.
|
||||
- Whenever text is inserted or deleted before the cursor, the position of
|
||||
the cursor is updated
|
||||
- Usesd for the cursor and selection
|
||||
- Basis for bookmarks, multiple cursors and snippets in the future
|
||||
* Extensive support for Cocoa style keybindings on the Mac <https://github.com/ajaxorg/ace/issues/closed#issue/116/comment/767803>
|
||||
* New commands:
|
||||
- center selection in viewport
|
||||
- remove to end/start of line
|
||||
- split line
|
||||
- transpose letters
|
||||
* Refator markers
|
||||
- Custom code can be used to render markers
|
||||
- Markers can be in front or behind the text
|
||||
- Markers are now stored in the session (was in the renderer)
|
||||
* Lots of IE8 fixes including copy, cut and selections
|
||||
* Unit tests can also be run in the browser
|
||||
<https://github.com/ajaxorg/ace/blob/master/lib/ace/test/tests.html>
|
||||
* Soft wrap can adapt to the width of the editor (Mike Ratcliffe, Joe Cheng)
|
||||
* Add minimal node server server.js to run the Ace demo in Chrome
|
||||
* The top level editor.html demo has been renamed to index.html
|
||||
* Bug fixes
|
||||
- Fixed gotoLine to consider wrapped lines when calculating where to scroll to (James Allen)
|
||||
- Fixed isues when the editor was scrolled in the web page (Eric Allam)
|
||||
- Highlighting of Python string literals
|
||||
- Syntax rule for PHP comments
|
||||
|
||||
2011.02.08, Version 0.1.5
|
||||
|
||||
* Add Coffeescript Mode (Satoshi Murakami)
|
||||
* Fix word wrap bug (Julian Viereck)
|
||||
* Fix packaged version of the Eclipse mode
|
||||
* Loading of workers is more robust
|
||||
* Fix "click selection"
|
||||
* Allow tokizing empty lines (Daniel Krech)
|
||||
* Make PageUp/Down behavior more consistent with native OS (Joe Cheng)
|
||||
|
||||
2011.02.04, Version 0.1.4
|
||||
|
||||
* Add C/C++ mode contributed by Gastón Kleiman
|
||||
* Fix exception in key input
|
||||
|
||||
2011.02.04, Version 0.1.3
|
||||
|
||||
* Let the packaged version play nice with requireJS
|
||||
* Add Ruby mode contributed by Shlomo Zalman Heigh
|
||||
* Add Java mode contributed by Tom Tasche
|
||||
* Fix annotation bug
|
||||
* Changing a document added a new empty line at the end
|
||||
24
htdocs/includes/ace/LICENSE
Normal file
24
htdocs/includes/ace/LICENSE
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
Copyright (c) 2010, Ajax.org B.V.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Ajax.org B.V. nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
23
htdocs/includes/ace/README.md
Normal file
23
htdocs/includes/ace/README.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
Ace (Ajax.org Cloud9 Editor)
|
||||
============================
|
||||
[](https://cdnjs.com/libraries/ace)
|
||||
[](https://www.npmjs.com/package/ace-builds)
|
||||
|
||||
Ace is a code editor written in JavaScript.
|
||||
|
||||
This repository has only generated files.
|
||||
If you want to work on ace please go to https://github.com/ajaxorg/ace instead.
|
||||
|
||||
|
||||
here you can find pre-built files for convenience of embedding.
|
||||
it contains 4 versions
|
||||
* [src](https://github.com/ajaxorg/ace-builds/tree/master/src) concatenated but not minified
|
||||
* [src-min](https://github.com/ajaxorg/ace-builds/tree/master/src-min) concatenated and minified with uglify.js
|
||||
* [src-noconflict](https://github.com/ajaxorg/ace-builds/tree/master/src-noconflict) uses ace.require instead of require
|
||||
* [src-min-noconflict](https://github.com/ajaxorg/ace-builds/tree/master/src-min-noconflict) concatenated, minified with uglify.js, and uses ace.require instead of require
|
||||
|
||||
|
||||
For a simple way of embedding ace into webpage see [editor.html](https://github.com/ajaxorg/ace-builds/blob/master/editor.html) or list of other [simple examples](https://github.com/ajaxorg/ace-builds/tree/master/demo)
|
||||
To see ace in action go to [kitchen-sink-demo](http://ajaxorg.github.com/ace-builds/kitchen-sink.html), [scrollable-page-demo](http://ajaxorg.github.com/ace-builds/demo/scrollable-page.html) or [minimal demo](http://ajaxorg.github.com/ace-builds/editor.html),
|
||||
|
||||
|
||||
393
htdocs/includes/ace/ace-modules.d.ts
vendored
Normal file
393
htdocs/includes/ace/ace-modules.d.ts
vendored
Normal file
|
|
@ -0,0 +1,393 @@
|
|||
declare module 'ace-builds/src-noconflict/ext-beautify';
|
||||
declare module 'ace-builds/src-noconflict/ext-elastic_tabstops_lite';
|
||||
declare module 'ace-builds/src-noconflict/ext-emmet';
|
||||
declare module 'ace-builds/src-noconflict/ext-error_marker';
|
||||
declare module 'ace-builds/src-noconflict/ext-keybinding_menu';
|
||||
declare module 'ace-builds/src-noconflict/ext-language_tools';
|
||||
declare module 'ace-builds/src-noconflict/ext-linking';
|
||||
declare module 'ace-builds/src-noconflict/ext-modelist';
|
||||
declare module 'ace-builds/src-noconflict/ext-options';
|
||||
declare module 'ace-builds/src-noconflict/ext-prompt';
|
||||
declare module 'ace-builds/src-noconflict/ext-rtl';
|
||||
declare module 'ace-builds/src-noconflict/ext-searchbox';
|
||||
declare module 'ace-builds/src-noconflict/ext-settings_menu';
|
||||
declare module 'ace-builds/src-noconflict/ext-spellcheck';
|
||||
declare module 'ace-builds/src-noconflict/ext-split';
|
||||
declare module 'ace-builds/src-noconflict/ext-static_highlight';
|
||||
declare module 'ace-builds/src-noconflict/ext-statusbar';
|
||||
declare module 'ace-builds/src-noconflict/ext-textarea';
|
||||
declare module 'ace-builds/src-noconflict/ext-themelist';
|
||||
declare module 'ace-builds/src-noconflict/ext-whitespace';
|
||||
declare module 'ace-builds/src-noconflict/keybinding-emacs';
|
||||
declare module 'ace-builds/src-noconflict/keybinding-sublime';
|
||||
declare module 'ace-builds/src-noconflict/keybinding-vim';
|
||||
declare module 'ace-builds/src-noconflict/mode-abap';
|
||||
declare module 'ace-builds/src-noconflict/mode-abc';
|
||||
declare module 'ace-builds/src-noconflict/mode-actionscript';
|
||||
declare module 'ace-builds/src-noconflict/mode-ada';
|
||||
declare module 'ace-builds/src-noconflict/mode-apache_conf';
|
||||
declare module 'ace-builds/src-noconflict/mode-apex';
|
||||
declare module 'ace-builds/src-noconflict/mode-applescript';
|
||||
declare module 'ace-builds/src-noconflict/mode-aql';
|
||||
declare module 'ace-builds/src-noconflict/mode-asciidoc';
|
||||
declare module 'ace-builds/src-noconflict/mode-asl';
|
||||
declare module 'ace-builds/src-noconflict/mode-assembly_x86';
|
||||
declare module 'ace-builds/src-noconflict/mode-autohotkey';
|
||||
declare module 'ace-builds/src-noconflict/mode-batchfile';
|
||||
declare module 'ace-builds/src-noconflict/mode-bro';
|
||||
declare module 'ace-builds/src-noconflict/mode-c9search';
|
||||
declare module 'ace-builds/src-noconflict/mode-cirru';
|
||||
declare module 'ace-builds/src-noconflict/mode-clojure';
|
||||
declare module 'ace-builds/src-noconflict/mode-cobol';
|
||||
declare module 'ace-builds/src-noconflict/mode-coffee';
|
||||
declare module 'ace-builds/src-noconflict/mode-coldfusion';
|
||||
declare module 'ace-builds/src-noconflict/mode-crystal';
|
||||
declare module 'ace-builds/src-noconflict/mode-csharp';
|
||||
declare module 'ace-builds/src-noconflict/mode-csound_document';
|
||||
declare module 'ace-builds/src-noconflict/mode-csound_orchestra';
|
||||
declare module 'ace-builds/src-noconflict/mode-csound_score';
|
||||
declare module 'ace-builds/src-noconflict/mode-csp';
|
||||
declare module 'ace-builds/src-noconflict/mode-css';
|
||||
declare module 'ace-builds/src-noconflict/mode-curly';
|
||||
declare module 'ace-builds/src-noconflict/mode-c_cpp';
|
||||
declare module 'ace-builds/src-noconflict/mode-d';
|
||||
declare module 'ace-builds/src-noconflict/mode-dart';
|
||||
declare module 'ace-builds/src-noconflict/mode-diff';
|
||||
declare module 'ace-builds/src-noconflict/mode-django';
|
||||
declare module 'ace-builds/src-noconflict/mode-dockerfile';
|
||||
declare module 'ace-builds/src-noconflict/mode-dot';
|
||||
declare module 'ace-builds/src-noconflict/mode-drools';
|
||||
declare module 'ace-builds/src-noconflict/mode-edifact';
|
||||
declare module 'ace-builds/src-noconflict/mode-eiffel';
|
||||
declare module 'ace-builds/src-noconflict/mode-ejs';
|
||||
declare module 'ace-builds/src-noconflict/mode-elixir';
|
||||
declare module 'ace-builds/src-noconflict/mode-elm';
|
||||
declare module 'ace-builds/src-noconflict/mode-erlang';
|
||||
declare module 'ace-builds/src-noconflict/mode-forth';
|
||||
declare module 'ace-builds/src-noconflict/mode-fortran';
|
||||
declare module 'ace-builds/src-noconflict/mode-fsharp';
|
||||
declare module 'ace-builds/src-noconflict/mode-fsl';
|
||||
declare module 'ace-builds/src-noconflict/mode-ftl';
|
||||
declare module 'ace-builds/src-noconflict/mode-gcode';
|
||||
declare module 'ace-builds/src-noconflict/mode-gherkin';
|
||||
declare module 'ace-builds/src-noconflict/mode-gitignore';
|
||||
declare module 'ace-builds/src-noconflict/mode-glsl';
|
||||
declare module 'ace-builds/src-noconflict/mode-gobstones';
|
||||
declare module 'ace-builds/src-noconflict/mode-golang';
|
||||
declare module 'ace-builds/src-noconflict/mode-graphqlschema';
|
||||
declare module 'ace-builds/src-noconflict/mode-groovy';
|
||||
declare module 'ace-builds/src-noconflict/mode-haml';
|
||||
declare module 'ace-builds/src-noconflict/mode-handlebars';
|
||||
declare module 'ace-builds/src-noconflict/mode-haskell';
|
||||
declare module 'ace-builds/src-noconflict/mode-haskell_cabal';
|
||||
declare module 'ace-builds/src-noconflict/mode-haxe';
|
||||
declare module 'ace-builds/src-noconflict/mode-hjson';
|
||||
declare module 'ace-builds/src-noconflict/mode-html';
|
||||
declare module 'ace-builds/src-noconflict/mode-html_elixir';
|
||||
declare module 'ace-builds/src-noconflict/mode-html_ruby';
|
||||
declare module 'ace-builds/src-noconflict/mode-ini';
|
||||
declare module 'ace-builds/src-noconflict/mode-io';
|
||||
declare module 'ace-builds/src-noconflict/mode-jack';
|
||||
declare module 'ace-builds/src-noconflict/mode-jade';
|
||||
declare module 'ace-builds/src-noconflict/mode-java';
|
||||
declare module 'ace-builds/src-noconflict/mode-javascript';
|
||||
declare module 'ace-builds/src-noconflict/mode-json';
|
||||
declare module 'ace-builds/src-noconflict/mode-jsoniq';
|
||||
declare module 'ace-builds/src-noconflict/mode-jsp';
|
||||
declare module 'ace-builds/src-noconflict/mode-jssm';
|
||||
declare module 'ace-builds/src-noconflict/mode-jsx';
|
||||
declare module 'ace-builds/src-noconflict/mode-julia';
|
||||
declare module 'ace-builds/src-noconflict/mode-kotlin';
|
||||
declare module 'ace-builds/src-noconflict/mode-latex';
|
||||
declare module 'ace-builds/src-noconflict/mode-less';
|
||||
declare module 'ace-builds/src-noconflict/mode-liquid';
|
||||
declare module 'ace-builds/src-noconflict/mode-lisp';
|
||||
declare module 'ace-builds/src-noconflict/mode-livescript';
|
||||
declare module 'ace-builds/src-noconflict/mode-logiql';
|
||||
declare module 'ace-builds/src-noconflict/mode-logtalk';
|
||||
declare module 'ace-builds/src-noconflict/mode-lsl';
|
||||
declare module 'ace-builds/src-noconflict/mode-lua';
|
||||
declare module 'ace-builds/src-noconflict/mode-luapage';
|
||||
declare module 'ace-builds/src-noconflict/mode-lucene';
|
||||
declare module 'ace-builds/src-noconflict/mode-makefile';
|
||||
declare module 'ace-builds/src-noconflict/mode-markdown';
|
||||
declare module 'ace-builds/src-noconflict/mode-mask';
|
||||
declare module 'ace-builds/src-noconflict/mode-matlab';
|
||||
declare module 'ace-builds/src-noconflict/mode-maze';
|
||||
declare module 'ace-builds/src-noconflict/mode-mel';
|
||||
declare module 'ace-builds/src-noconflict/mode-mixal';
|
||||
declare module 'ace-builds/src-noconflict/mode-mushcode';
|
||||
declare module 'ace-builds/src-noconflict/mode-mysql';
|
||||
declare module 'ace-builds/src-noconflict/mode-nginx';
|
||||
declare module 'ace-builds/src-noconflict/mode-nim';
|
||||
declare module 'ace-builds/src-noconflict/mode-nix';
|
||||
declare module 'ace-builds/src-noconflict/mode-nsis';
|
||||
declare module 'ace-builds/src-noconflict/mode-objectivec';
|
||||
declare module 'ace-builds/src-noconflict/mode-ocaml';
|
||||
declare module 'ace-builds/src-noconflict/mode-pascal';
|
||||
declare module 'ace-builds/src-noconflict/mode-perl';
|
||||
declare module 'ace-builds/src-noconflict/mode-perl6';
|
||||
declare module 'ace-builds/src-noconflict/mode-pgsql';
|
||||
declare module 'ace-builds/src-noconflict/mode-php';
|
||||
declare module 'ace-builds/src-noconflict/mode-php_laravel_blade';
|
||||
declare module 'ace-builds/src-noconflict/mode-pig';
|
||||
declare module 'ace-builds/src-noconflict/mode-plain_text';
|
||||
declare module 'ace-builds/src-noconflict/mode-powershell';
|
||||
declare module 'ace-builds/src-noconflict/mode-praat';
|
||||
declare module 'ace-builds/src-noconflict/mode-prolog';
|
||||
declare module 'ace-builds/src-noconflict/mode-properties';
|
||||
declare module 'ace-builds/src-noconflict/mode-protobuf';
|
||||
declare module 'ace-builds/src-noconflict/mode-puppet';
|
||||
declare module 'ace-builds/src-noconflict/mode-python';
|
||||
declare module 'ace-builds/src-noconflict/mode-r';
|
||||
declare module 'ace-builds/src-noconflict/mode-razor';
|
||||
declare module 'ace-builds/src-noconflict/mode-rdoc';
|
||||
declare module 'ace-builds/src-noconflict/mode-red';
|
||||
declare module 'ace-builds/src-noconflict/mode-redshift';
|
||||
declare module 'ace-builds/src-noconflict/mode-rhtml';
|
||||
declare module 'ace-builds/src-noconflict/mode-rst';
|
||||
declare module 'ace-builds/src-noconflict/mode-ruby';
|
||||
declare module 'ace-builds/src-noconflict/mode-rust';
|
||||
declare module 'ace-builds/src-noconflict/mode-sass';
|
||||
declare module 'ace-builds/src-noconflict/mode-scad';
|
||||
declare module 'ace-builds/src-noconflict/mode-scala';
|
||||
declare module 'ace-builds/src-noconflict/mode-scheme';
|
||||
declare module 'ace-builds/src-noconflict/mode-scss';
|
||||
declare module 'ace-builds/src-noconflict/mode-sh';
|
||||
declare module 'ace-builds/src-noconflict/mode-sjs';
|
||||
declare module 'ace-builds/src-noconflict/mode-slim';
|
||||
declare module 'ace-builds/src-noconflict/mode-smarty';
|
||||
declare module 'ace-builds/src-noconflict/mode-snippets';
|
||||
declare module 'ace-builds/src-noconflict/mode-soy_template';
|
||||
declare module 'ace-builds/src-noconflict/mode-space';
|
||||
declare module 'ace-builds/src-noconflict/mode-sparql';
|
||||
declare module 'ace-builds/src-noconflict/mode-sql';
|
||||
declare module 'ace-builds/src-noconflict/mode-sqlserver';
|
||||
declare module 'ace-builds/src-noconflict/mode-stylus';
|
||||
declare module 'ace-builds/src-noconflict/mode-svg';
|
||||
declare module 'ace-builds/src-noconflict/mode-swift';
|
||||
declare module 'ace-builds/src-noconflict/mode-tcl';
|
||||
declare module 'ace-builds/src-noconflict/mode-terraform';
|
||||
declare module 'ace-builds/src-noconflict/mode-tex';
|
||||
declare module 'ace-builds/src-noconflict/mode-text';
|
||||
declare module 'ace-builds/src-noconflict/mode-textile';
|
||||
declare module 'ace-builds/src-noconflict/mode-toml';
|
||||
declare module 'ace-builds/src-noconflict/mode-tsx';
|
||||
declare module 'ace-builds/src-noconflict/mode-turtle';
|
||||
declare module 'ace-builds/src-noconflict/mode-twig';
|
||||
declare module 'ace-builds/src-noconflict/mode-typescript';
|
||||
declare module 'ace-builds/src-noconflict/mode-vala';
|
||||
declare module 'ace-builds/src-noconflict/mode-vbscript';
|
||||
declare module 'ace-builds/src-noconflict/mode-velocity';
|
||||
declare module 'ace-builds/src-noconflict/mode-verilog';
|
||||
declare module 'ace-builds/src-noconflict/mode-vhdl';
|
||||
declare module 'ace-builds/src-noconflict/mode-visualforce';
|
||||
declare module 'ace-builds/src-noconflict/mode-wollok';
|
||||
declare module 'ace-builds/src-noconflict/mode-xml';
|
||||
declare module 'ace-builds/src-noconflict/mode-xquery';
|
||||
declare module 'ace-builds/src-noconflict/mode-yaml';
|
||||
declare module 'ace-builds/src-noconflict/mode-zeek';
|
||||
declare module 'ace-builds/src-noconflict/theme-ambiance';
|
||||
declare module 'ace-builds/src-noconflict/theme-chaos';
|
||||
declare module 'ace-builds/src-noconflict/theme-chrome';
|
||||
declare module 'ace-builds/src-noconflict/theme-clouds';
|
||||
declare module 'ace-builds/src-noconflict/theme-clouds_midnight';
|
||||
declare module 'ace-builds/src-noconflict/theme-cobalt';
|
||||
declare module 'ace-builds/src-noconflict/theme-crimson_editor';
|
||||
declare module 'ace-builds/src-noconflict/theme-dawn';
|
||||
declare module 'ace-builds/src-noconflict/theme-dracula';
|
||||
declare module 'ace-builds/src-noconflict/theme-dreamweaver';
|
||||
declare module 'ace-builds/src-noconflict/theme-eclipse';
|
||||
declare module 'ace-builds/src-noconflict/theme-github';
|
||||
declare module 'ace-builds/src-noconflict/theme-gob';
|
||||
declare module 'ace-builds/src-noconflict/theme-gruvbox';
|
||||
declare module 'ace-builds/src-noconflict/theme-idle_fingers';
|
||||
declare module 'ace-builds/src-noconflict/theme-iplastic';
|
||||
declare module 'ace-builds/src-noconflict/theme-katzenmilch';
|
||||
declare module 'ace-builds/src-noconflict/theme-kr_theme';
|
||||
declare module 'ace-builds/src-noconflict/theme-kuroir';
|
||||
declare module 'ace-builds/src-noconflict/theme-merbivore';
|
||||
declare module 'ace-builds/src-noconflict/theme-merbivore_soft';
|
||||
declare module 'ace-builds/src-noconflict/theme-monokai';
|
||||
declare module 'ace-builds/src-noconflict/theme-mono_industrial';
|
||||
declare module 'ace-builds/src-noconflict/theme-pastel_on_dark';
|
||||
declare module 'ace-builds/src-noconflict/theme-solarized_dark';
|
||||
declare module 'ace-builds/src-noconflict/theme-solarized_light';
|
||||
declare module 'ace-builds/src-noconflict/theme-sqlserver';
|
||||
declare module 'ace-builds/src-noconflict/theme-terminal';
|
||||
declare module 'ace-builds/src-noconflict/theme-textmate';
|
||||
declare module 'ace-builds/src-noconflict/theme-tomorrow';
|
||||
declare module 'ace-builds/src-noconflict/theme-tomorrow_night';
|
||||
declare module 'ace-builds/src-noconflict/theme-tomorrow_night_blue';
|
||||
declare module 'ace-builds/src-noconflict/theme-tomorrow_night_bright';
|
||||
declare module 'ace-builds/src-noconflict/theme-tomorrow_night_eighties';
|
||||
declare module 'ace-builds/src-noconflict/theme-twilight';
|
||||
declare module 'ace-builds/src-noconflict/theme-vibrant_ink';
|
||||
declare module 'ace-builds/src-noconflict/theme-xcode';
|
||||
declare module 'ace-builds/src-noconflict/snippets/abap';
|
||||
declare module 'ace-builds/src-noconflict/snippets/abc';
|
||||
declare module 'ace-builds/src-noconflict/snippets/actionscript';
|
||||
declare module 'ace-builds/src-noconflict/snippets/ada';
|
||||
declare module 'ace-builds/src-noconflict/snippets/apache_conf';
|
||||
declare module 'ace-builds/src-noconflict/snippets/apex';
|
||||
declare module 'ace-builds/src-noconflict/snippets/applescript';
|
||||
declare module 'ace-builds/src-noconflict/snippets/aql';
|
||||
declare module 'ace-builds/src-noconflict/snippets/asciidoc';
|
||||
declare module 'ace-builds/src-noconflict/snippets/asl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/assembly_x86';
|
||||
declare module 'ace-builds/src-noconflict/snippets/autohotkey';
|
||||
declare module 'ace-builds/src-noconflict/snippets/batchfile';
|
||||
declare module 'ace-builds/src-noconflict/snippets/bro';
|
||||
declare module 'ace-builds/src-noconflict/snippets/c9search';
|
||||
declare module 'ace-builds/src-noconflict/snippets/cirru';
|
||||
declare module 'ace-builds/src-noconflict/snippets/clojure';
|
||||
declare module 'ace-builds/src-noconflict/snippets/cobol';
|
||||
declare module 'ace-builds/src-noconflict/snippets/coffee';
|
||||
declare module 'ace-builds/src-noconflict/snippets/coldfusion';
|
||||
declare module 'ace-builds/src-noconflict/snippets/crystal';
|
||||
declare module 'ace-builds/src-noconflict/snippets/csharp';
|
||||
declare module 'ace-builds/src-noconflict/snippets/csound_document';
|
||||
declare module 'ace-builds/src-noconflict/snippets/csound_orchestra';
|
||||
declare module 'ace-builds/src-noconflict/snippets/csound_score';
|
||||
declare module 'ace-builds/src-noconflict/snippets/csp';
|
||||
declare module 'ace-builds/src-noconflict/snippets/css';
|
||||
declare module 'ace-builds/src-noconflict/snippets/curly';
|
||||
declare module 'ace-builds/src-noconflict/snippets/c_cpp';
|
||||
declare module 'ace-builds/src-noconflict/snippets/d';
|
||||
declare module 'ace-builds/src-noconflict/snippets/dart';
|
||||
declare module 'ace-builds/src-noconflict/snippets/diff';
|
||||
declare module 'ace-builds/src-noconflict/snippets/django';
|
||||
declare module 'ace-builds/src-noconflict/snippets/dockerfile';
|
||||
declare module 'ace-builds/src-noconflict/snippets/dot';
|
||||
declare module 'ace-builds/src-noconflict/snippets/drools';
|
||||
declare module 'ace-builds/src-noconflict/snippets/edifact';
|
||||
declare module 'ace-builds/src-noconflict/snippets/eiffel';
|
||||
declare module 'ace-builds/src-noconflict/snippets/ejs';
|
||||
declare module 'ace-builds/src-noconflict/snippets/elixir';
|
||||
declare module 'ace-builds/src-noconflict/snippets/elm';
|
||||
declare module 'ace-builds/src-noconflict/snippets/erlang';
|
||||
declare module 'ace-builds/src-noconflict/snippets/forth';
|
||||
declare module 'ace-builds/src-noconflict/snippets/fortran';
|
||||
declare module 'ace-builds/src-noconflict/snippets/fsharp';
|
||||
declare module 'ace-builds/src-noconflict/snippets/fsl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/ftl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/gcode';
|
||||
declare module 'ace-builds/src-noconflict/snippets/gherkin';
|
||||
declare module 'ace-builds/src-noconflict/snippets/gitignore';
|
||||
declare module 'ace-builds/src-noconflict/snippets/glsl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/gobstones';
|
||||
declare module 'ace-builds/src-noconflict/snippets/golang';
|
||||
declare module 'ace-builds/src-noconflict/snippets/graphqlschema';
|
||||
declare module 'ace-builds/src-noconflict/snippets/groovy';
|
||||
declare module 'ace-builds/src-noconflict/snippets/haml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/handlebars';
|
||||
declare module 'ace-builds/src-noconflict/snippets/haskell';
|
||||
declare module 'ace-builds/src-noconflict/snippets/haskell_cabal';
|
||||
declare module 'ace-builds/src-noconflict/snippets/haxe';
|
||||
declare module 'ace-builds/src-noconflict/snippets/hjson';
|
||||
declare module 'ace-builds/src-noconflict/snippets/html';
|
||||
declare module 'ace-builds/src-noconflict/snippets/html_elixir';
|
||||
declare module 'ace-builds/src-noconflict/snippets/html_ruby';
|
||||
declare module 'ace-builds/src-noconflict/snippets/ini';
|
||||
declare module 'ace-builds/src-noconflict/snippets/io';
|
||||
declare module 'ace-builds/src-noconflict/snippets/jack';
|
||||
declare module 'ace-builds/src-noconflict/snippets/jade';
|
||||
declare module 'ace-builds/src-noconflict/snippets/java';
|
||||
declare module 'ace-builds/src-noconflict/snippets/javascript';
|
||||
declare module 'ace-builds/src-noconflict/snippets/json';
|
||||
declare module 'ace-builds/src-noconflict/snippets/jsoniq';
|
||||
declare module 'ace-builds/src-noconflict/snippets/jsp';
|
||||
declare module 'ace-builds/src-noconflict/snippets/jssm';
|
||||
declare module 'ace-builds/src-noconflict/snippets/jsx';
|
||||
declare module 'ace-builds/src-noconflict/snippets/julia';
|
||||
declare module 'ace-builds/src-noconflict/snippets/kotlin';
|
||||
declare module 'ace-builds/src-noconflict/snippets/latex';
|
||||
declare module 'ace-builds/src-noconflict/snippets/less';
|
||||
declare module 'ace-builds/src-noconflict/snippets/liquid';
|
||||
declare module 'ace-builds/src-noconflict/snippets/lisp';
|
||||
declare module 'ace-builds/src-noconflict/snippets/livescript';
|
||||
declare module 'ace-builds/src-noconflict/snippets/logiql';
|
||||
declare module 'ace-builds/src-noconflict/snippets/logtalk';
|
||||
declare module 'ace-builds/src-noconflict/snippets/lsl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/lua';
|
||||
declare module 'ace-builds/src-noconflict/snippets/luapage';
|
||||
declare module 'ace-builds/src-noconflict/snippets/lucene';
|
||||
declare module 'ace-builds/src-noconflict/snippets/makefile';
|
||||
declare module 'ace-builds/src-noconflict/snippets/markdown';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mask';
|
||||
declare module 'ace-builds/src-noconflict/snippets/matlab';
|
||||
declare module 'ace-builds/src-noconflict/snippets/maze';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mel';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mixal';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mushcode';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mysql';
|
||||
declare module 'ace-builds/src-noconflict/snippets/nginx';
|
||||
declare module 'ace-builds/src-noconflict/snippets/nim';
|
||||
declare module 'ace-builds/src-noconflict/snippets/nix';
|
||||
declare module 'ace-builds/src-noconflict/snippets/nsis';
|
||||
declare module 'ace-builds/src-noconflict/snippets/objectivec';
|
||||
declare module 'ace-builds/src-noconflict/snippets/ocaml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/pascal';
|
||||
declare module 'ace-builds/src-noconflict/snippets/perl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/perl6';
|
||||
declare module 'ace-builds/src-noconflict/snippets/pgsql';
|
||||
declare module 'ace-builds/src-noconflict/snippets/php';
|
||||
declare module 'ace-builds/src-noconflict/snippets/php_laravel_blade';
|
||||
declare module 'ace-builds/src-noconflict/snippets/pig';
|
||||
declare module 'ace-builds/src-noconflict/snippets/plain_text';
|
||||
declare module 'ace-builds/src-noconflict/snippets/powershell';
|
||||
declare module 'ace-builds/src-noconflict/snippets/praat';
|
||||
declare module 'ace-builds/src-noconflict/snippets/prolog';
|
||||
declare module 'ace-builds/src-noconflict/snippets/properties';
|
||||
declare module 'ace-builds/src-noconflict/snippets/protobuf';
|
||||
declare module 'ace-builds/src-noconflict/snippets/puppet';
|
||||
declare module 'ace-builds/src-noconflict/snippets/python';
|
||||
declare module 'ace-builds/src-noconflict/snippets/r';
|
||||
declare module 'ace-builds/src-noconflict/snippets/razor';
|
||||
declare module 'ace-builds/src-noconflict/snippets/rdoc';
|
||||
declare module 'ace-builds/src-noconflict/snippets/red';
|
||||
declare module 'ace-builds/src-noconflict/snippets/redshift';
|
||||
declare module 'ace-builds/src-noconflict/snippets/rhtml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/rst';
|
||||
declare module 'ace-builds/src-noconflict/snippets/ruby';
|
||||
declare module 'ace-builds/src-noconflict/snippets/rust';
|
||||
declare module 'ace-builds/src-noconflict/snippets/sass';
|
||||
declare module 'ace-builds/src-noconflict/snippets/scad';
|
||||
declare module 'ace-builds/src-noconflict/snippets/scala';
|
||||
declare module 'ace-builds/src-noconflict/snippets/scheme';
|
||||
declare module 'ace-builds/src-noconflict/snippets/scss';
|
||||
declare module 'ace-builds/src-noconflict/snippets/sh';
|
||||
declare module 'ace-builds/src-noconflict/snippets/sjs';
|
||||
declare module 'ace-builds/src-noconflict/snippets/slim';
|
||||
declare module 'ace-builds/src-noconflict/snippets/smarty';
|
||||
declare module 'ace-builds/src-noconflict/snippets/snippets';
|
||||
declare module 'ace-builds/src-noconflict/snippets/soy_template';
|
||||
declare module 'ace-builds/src-noconflict/snippets/space';
|
||||
declare module 'ace-builds/src-noconflict/snippets/sparql';
|
||||
declare module 'ace-builds/src-noconflict/snippets/sql';
|
||||
declare module 'ace-builds/src-noconflict/snippets/sqlserver';
|
||||
declare module 'ace-builds/src-noconflict/snippets/stylus';
|
||||
declare module 'ace-builds/src-noconflict/snippets/svg';
|
||||
declare module 'ace-builds/src-noconflict/snippets/swift';
|
||||
declare module 'ace-builds/src-noconflict/snippets/tcl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/terraform';
|
||||
declare module 'ace-builds/src-noconflict/snippets/tex';
|
||||
declare module 'ace-builds/src-noconflict/snippets/text';
|
||||
declare module 'ace-builds/src-noconflict/snippets/textile';
|
||||
declare module 'ace-builds/src-noconflict/snippets/toml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/tsx';
|
||||
declare module 'ace-builds/src-noconflict/snippets/turtle';
|
||||
declare module 'ace-builds/src-noconflict/snippets/twig';
|
||||
declare module 'ace-builds/src-noconflict/snippets/typescript';
|
||||
declare module 'ace-builds/src-noconflict/snippets/vala';
|
||||
declare module 'ace-builds/src-noconflict/snippets/vbscript';
|
||||
declare module 'ace-builds/src-noconflict/snippets/velocity';
|
||||
declare module 'ace-builds/src-noconflict/snippets/verilog';
|
||||
declare module 'ace-builds/src-noconflict/snippets/vhdl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/visualforce';
|
||||
declare module 'ace-builds/src-noconflict/snippets/wollok';
|
||||
declare module 'ace-builds/src-noconflict/snippets/xml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/xquery';
|
||||
declare module 'ace-builds/src-noconflict/snippets/yaml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/zeek';
|
||||
declare module 'ace-builds/webpack-resolver';
|
||||
886
htdocs/includes/ace/ace.d.ts
vendored
Normal file
886
htdocs/includes/ace/ace.d.ts
vendored
Normal file
|
|
@ -0,0 +1,886 @@
|
|||
/// <reference path="./ace-modules.d.ts" />
|
||||
export namespace Ace {
|
||||
export type NewLineMode = 'auto' | 'unix' | 'windows';
|
||||
|
||||
export interface Anchor extends EventEmitter {
|
||||
getPosition(): Point;
|
||||
getDocument(): Document;
|
||||
setPosition(row: number, column: number, noClip?: boolean): void;
|
||||
detach(): void;
|
||||
attach(doc: Document): void;
|
||||
}
|
||||
|
||||
export interface Document extends EventEmitter {
|
||||
setValue(text: string): void;
|
||||
getValue(): string;
|
||||
createAnchor(row: number, column: number): Anchor;
|
||||
getNewLineCharacter(): string;
|
||||
setNewLineMode(newLineMode: NewLineMode): void;
|
||||
getNewLineMode(): NewLineMode;
|
||||
isNewLine(text: string): boolean;
|
||||
getLine(row: number): string;
|
||||
getLines(firstRow: number, lastRow: number): string[];
|
||||
getAllLines(): string[];
|
||||
getTextRange(range: Range): string;
|
||||
getLinesForRange(range: Range): string[];
|
||||
insert(position: Point, text: string): Point;
|
||||
insertInLine(position: Point, text: string): Point;
|
||||
clippedPos(row: number, column: number): Point;
|
||||
clonePos(pos: Point): Point;
|
||||
pos(row: number, column: number): Point;
|
||||
insertFullLines(row: number, lines: string[]): void;
|
||||
insertMergedLines(position: Point, lines: string[]): Point;
|
||||
remove(range: Range): Point;
|
||||
removeInLine(row: number, startColumn: number, endColumn: number): Point;
|
||||
removeFullLines(firstRow: number, lastRow: number): string[];
|
||||
removeNewLine(row: number): void;
|
||||
replace(range: Range, text: string): Point;
|
||||
applyDeltas(deltas: Delta[]): void;
|
||||
revertDeltas(deltas: Delta[]): void;
|
||||
applyDelta(delta: Delta, doNotValidate?: boolean): void;
|
||||
revertDelta(delta: Delta): void;
|
||||
indexToPosition(index: number, startRow: number): Point;
|
||||
positionToIndex(pos: Point, startRow?: number): number;
|
||||
}
|
||||
|
||||
export interface FoldLine {
|
||||
folds: Fold[];
|
||||
range: Range;
|
||||
start: Point;
|
||||
end: Point;
|
||||
|
||||
shiftRow(shift: number): void;
|
||||
addFold(fold: Fold): void;
|
||||
containsRow(row: number): boolean;
|
||||
walk(callback: Function, endRow?: number, endColumn?: number): void;
|
||||
getNextFoldTo(row: number, column: number): null | { fold: Fold, kind: string };
|
||||
addRemoveChars(row: number, column: number, len: number): void;
|
||||
split(row: number, column: number): FoldLine;
|
||||
merge(foldLineNext: FoldLine): void;
|
||||
idxToPosition(idx: number): Point;
|
||||
}
|
||||
|
||||
export interface Fold {
|
||||
range: Range;
|
||||
start: Point;
|
||||
end: Point;
|
||||
foldLine?: FoldLine;
|
||||
sameRow: boolean;
|
||||
subFolds: Fold[];
|
||||
|
||||
setFoldLine(foldLine: FoldLine): void;
|
||||
clone(): Fold;
|
||||
addSubFold(fold: Fold): Fold;
|
||||
restoreRange(range: Range): void;
|
||||
}
|
||||
|
||||
interface Folding {
|
||||
getFoldAt(row: number, column: number, side: number): Fold;
|
||||
getFoldsInRange(range: Range): Fold[];
|
||||
getFoldsInRangeList(ranges: Range[]): Fold[];
|
||||
getAllFolds(): Fold[];
|
||||
getFoldStringAt(row: number,
|
||||
column: number,
|
||||
trim?: number,
|
||||
foldLine?: FoldLine): string | null;
|
||||
getFoldLine(docRow: number, startFoldLine?: FoldLine): FoldLine | null;
|
||||
getNextFoldLine(docRow: number, startFoldLine?: FoldLine): FoldLine | null;
|
||||
getFoldedRowCount(first: number, last: number): number;
|
||||
addFold(placeholder: string | Fold, range?: Range): Fold;
|
||||
addFolds(folds: Fold[]): void;
|
||||
removeFold(fold: Fold): void;
|
||||
removeFolds(folds: Fold[]): void;
|
||||
expandFold(fold: Fold): void;
|
||||
expandFolds(folds: Fold[]): void;
|
||||
unfold(location: null | number | Point | Range,
|
||||
expandInner?: boolean): Fold[] | undefined;
|
||||
isRowFolded(docRow: number, startFoldRow?: FoldLine): boolean;
|
||||
getFoldRowEnd(docRow: number, startFoldRow?: FoldLine): number;
|
||||
getFoldRowStart(docRow: number, startFoldRow?: FoldLine): number;
|
||||
getFoldDisplayLine(foldLine: FoldLine,
|
||||
endRow: number | null,
|
||||
endColumn: number | null,
|
||||
startRow: number | null,
|
||||
startColumn: number | null): string;
|
||||
getDisplayLine(row: number,
|
||||
endColumn: number | null,
|
||||
startRow: number | null,
|
||||
startColumn: number | null): string;
|
||||
toggleFold(tryToUnfold?: boolean): void;
|
||||
getCommentFoldRange(row: number,
|
||||
column: number,
|
||||
dir: number): Range | undefined;
|
||||
foldAll(startRow?: number, endRow?: number, depth?: number): void;
|
||||
setFoldStyle(style: string): void;
|
||||
getParentFoldRangeData(row: number, ignoreCurrent?: boolean): {
|
||||
range?: Range,
|
||||
firstRange: Range
|
||||
};
|
||||
toggleFoldWidget(toggleParent?: boolean): void;
|
||||
updateFoldWidgets(delta: Delta): void;
|
||||
}
|
||||
|
||||
export interface Range {
|
||||
start: Point;
|
||||
end: Point;
|
||||
|
||||
isEqual(range: Range): boolean;
|
||||
toString(): string;
|
||||
contains(row: number, column: number): boolean;
|
||||
compareRange(range: Range): number;
|
||||
comparePoint(p: Point): number;
|
||||
containsRange(range: Range): boolean;
|
||||
intersects(range: Range): boolean;
|
||||
isEnd(row: number, column: number): boolean;
|
||||
isStart(row: number, column: number): boolean;
|
||||
setStart(row: number, column: number): void;
|
||||
setEnd(row: number, column: number): void;
|
||||
inside(row: number, column: number): boolean;
|
||||
insideStart(row: number, column: number): boolean;
|
||||
insideEnd(row: number, column: number): boolean;
|
||||
compare(row: number, column: number): number;
|
||||
compareStart(row: number, column: number): number;
|
||||
compareEnd(row: number, column: number): number;
|
||||
compareInside(row: number, column: number): number;
|
||||
clipRows(firstRow: number, lastRow: number): Range;
|
||||
extend(row: number, column: number): Range;
|
||||
isEmpty(): boolean;
|
||||
isMultiLine(): boolean;
|
||||
clone(): Range;
|
||||
collapseRows(): Range;
|
||||
toScreenRange(session: EditSession): Range;
|
||||
moveBy(row: number, column: number): void;
|
||||
}
|
||||
|
||||
export interface EditSessionOptions {
|
||||
wrap: string | number;
|
||||
wrapMethod: 'code' | 'text' | 'auto';
|
||||
indentedSoftWrap: boolean;
|
||||
firstLineNumber: number;
|
||||
useWorker: boolean;
|
||||
useSoftTabs: boolean;
|
||||
tabSize: number;
|
||||
navigateWithinSoftTabs: boolean;
|
||||
foldStyle: 'markbegin' | 'markbeginend' | 'manual';
|
||||
overwrite: boolean;
|
||||
newLineMode: NewLineMode;
|
||||
mode: string;
|
||||
}
|
||||
|
||||
export interface VirtualRendererOptions {
|
||||
animatedScroll: boolean;
|
||||
showInvisibles: boolean;
|
||||
showPrintMargin: boolean;
|
||||
printMarginColumn: number;
|
||||
printMargin: boolean | number;
|
||||
showGutter: boolean;
|
||||
fadeFoldWidgets: boolean;
|
||||
showFoldWidgets: boolean;
|
||||
showLineNumbers: boolean;
|
||||
displayIndentGuides: boolean;
|
||||
highlightGutterLine: boolean;
|
||||
hScrollBarAlwaysVisible: boolean;
|
||||
vScrollBarAlwaysVisible: boolean;
|
||||
fontSize: number;
|
||||
fontFamily: string;
|
||||
maxLines: number;
|
||||
minLines: number;
|
||||
scrollPastEnd: boolean;
|
||||
fixedWidthGutter: boolean;
|
||||
theme: string;
|
||||
hasCssTransforms: boolean;
|
||||
maxPixelHeight: number;
|
||||
}
|
||||
|
||||
export interface MouseHandlerOptions {
|
||||
scrollSpeed: number;
|
||||
dragDelay: number;
|
||||
dragEnabled: boolean;
|
||||
focusTimeout: number;
|
||||
tooltipFollowsMouse: boolean;
|
||||
}
|
||||
|
||||
export interface EditorOptions extends EditSessionOptions,
|
||||
MouseHandlerOptions,
|
||||
VirtualRendererOptions {
|
||||
selectionStyle: string;
|
||||
highlightActiveLine: boolean;
|
||||
highlightSelectedWord: boolean;
|
||||
readOnly: boolean;
|
||||
copyWithEmptySelection: boolean;
|
||||
cursorStyle: 'ace' | 'slim' | 'smooth' | 'wide';
|
||||
mergeUndoDeltas: true | false | 'always';
|
||||
behavioursEnabled: boolean;
|
||||
wrapBehavioursEnabled: boolean;
|
||||
autoScrollEditorIntoView: boolean;
|
||||
keyboardHandler: string;
|
||||
value: string;
|
||||
session: EditSession;
|
||||
}
|
||||
|
||||
export interface SearchOptions {
|
||||
needle: string | RegExp;
|
||||
preventScroll: boolean;
|
||||
backwards: boolean;
|
||||
start: Range;
|
||||
skipCurrent: boolean;
|
||||
range: Range;
|
||||
preserveCase: boolean;
|
||||
regExp: RegExp;
|
||||
wholeWord: string;
|
||||
caseSensitive: boolean;
|
||||
wrap: boolean;
|
||||
}
|
||||
|
||||
export interface EventEmitter {
|
||||
once(name: string, callback: Function): void;
|
||||
setDefaultHandler(name: string, callback: Function): void;
|
||||
removeDefaultHandler(name: string, callback: Function): void;
|
||||
on(name: string, callback: Function, capturing?: boolean): void;
|
||||
addEventListener(name: string, callback: Function, capturing?: boolean): void;
|
||||
off(name: string, callback: Function): void;
|
||||
removeListener(name: string, callback: Function): void;
|
||||
removeEventListener(name: string, callback: Function): void;
|
||||
}
|
||||
|
||||
export interface Point {
|
||||
row: number;
|
||||
column: number;
|
||||
}
|
||||
|
||||
export interface Delta {
|
||||
action: 'insert' | 'remove';
|
||||
start: Point;
|
||||
end: Point;
|
||||
lines: string[];
|
||||
}
|
||||
|
||||
export interface Annotation {
|
||||
row?: number;
|
||||
column?: number;
|
||||
text: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface Command {
|
||||
name?: string;
|
||||
bindKey?: string | { mac?: string, win?: string };
|
||||
readOnly?: boolean;
|
||||
exec: (editor: Editor, args?: any) => void;
|
||||
}
|
||||
|
||||
export type CommandLike = Command | ((editor: Editor) => void);
|
||||
|
||||
export interface KeyboardHandler {
|
||||
handleKeyboard: Function;
|
||||
}
|
||||
|
||||
export interface MarkerLike {
|
||||
range: Range;
|
||||
type: string;
|
||||
renderer?: MarkerRenderer;
|
||||
clazz: string;
|
||||
inFront: boolean;
|
||||
id: number;
|
||||
update?: (html: string[],
|
||||
// TODO maybe define Marker class
|
||||
marker: any,
|
||||
session: EditSession,
|
||||
config: any) => void;
|
||||
}
|
||||
|
||||
export type MarkerRenderer = (html: string[],
|
||||
range: Range,
|
||||
left: number,
|
||||
top: number,
|
||||
config: any) => void;
|
||||
|
||||
export interface Token {
|
||||
type: string;
|
||||
value: string;
|
||||
index?: number;
|
||||
start?: number;
|
||||
}
|
||||
|
||||
export interface Completion {
|
||||
value: string;
|
||||
score: number;
|
||||
meta?: string;
|
||||
name?: string;
|
||||
caption?: string;
|
||||
}
|
||||
|
||||
export interface Tokenizer {
|
||||
removeCapturingGroups(src: string): string;
|
||||
createSplitterRegexp(src: string, flag?: string): RegExp;
|
||||
getLineTokens(line: string, startState: string | string[]): Token[];
|
||||
}
|
||||
|
||||
interface TokenIterator {
|
||||
getCurrentToken(): Token;
|
||||
getCurrentTokenColumn(): number;
|
||||
getCurrentTokenRow(): number;
|
||||
getCurrentTokenPosition(): Point;
|
||||
getCurrentTokenRange(): Range;
|
||||
stepBackward(): Token;
|
||||
stepForward(): Token;
|
||||
}
|
||||
|
||||
export interface SyntaxMode {
|
||||
getTokenizer(): Tokenizer;
|
||||
toggleCommentLines(state: any,
|
||||
session: EditSession,
|
||||
startRow: number,
|
||||
endRow: number): void;
|
||||
toggleBlockComment(state: any,
|
||||
session: EditSession,
|
||||
range: Range,
|
||||
cursor: Point): void;
|
||||
getNextLineIndent(state: any, line: string, tab: string): string;
|
||||
checkOutdent(state: any, line: string, input: string): boolean;
|
||||
autoOutdent(state: any, doc: Document, row: number): void;
|
||||
// TODO implement WorkerClient types
|
||||
createWorker(session: EditSession): any;
|
||||
createModeDelegates(mapping: { [key: string]: string }): void;
|
||||
transformAction(state: string,
|
||||
action: string,
|
||||
editor: Editor,
|
||||
session: EditSession,
|
||||
text: string): any;
|
||||
getKeywords(append?: boolean): Array<string | RegExp>;
|
||||
getCompletions(state: string,
|
||||
session: EditSession,
|
||||
pos: Point,
|
||||
prefix: string): Completion[];
|
||||
}
|
||||
|
||||
export interface Config {
|
||||
get(key: string): any;
|
||||
set(key: string, value: any): void;
|
||||
all(): { [key: string]: any };
|
||||
moduleUrl(name: string, component?: string): string;
|
||||
setModuleUrl(name: string, subst: string): string;
|
||||
loadModule(moduleName: string | [string, string],
|
||||
onLoad: (module: any) => void): void;
|
||||
init(packaged: any): any;
|
||||
defineOptions(obj: any, path: string, options: { [key: string]: any }): Config;
|
||||
resetOptions(obj: any): void;
|
||||
setDefaultValue(path: string, name: string, value: any): void;
|
||||
setDefaultValues(path: string, optionHash: { [key: string]: any }): void;
|
||||
}
|
||||
|
||||
export interface OptionsProvider {
|
||||
setOptions(optList: { [key: string]: any }): void;
|
||||
getOptions(optionNames?: string[] | { [key: string]: any }): { [key: string]: any };
|
||||
setOption(name: string, value: any): void;
|
||||
getOption(name: string): any;
|
||||
}
|
||||
|
||||
export interface UndoManager {
|
||||
addSession(session: EditSession): void;
|
||||
add(delta: Delta, allowMerge: boolean, session: EditSession): void;
|
||||
addSelection(selection: string, rev?: number): void;
|
||||
startNewGroup(): void;
|
||||
markIgnored(from: number, to?: number): void;
|
||||
getSelection(rev: number, after?: boolean): { value: string, rev: number };
|
||||
getRevision(): number;
|
||||
getDeltas(from: number, to?: number): Delta[];
|
||||
undo(session: EditSession, dontSelect?: boolean): void;
|
||||
redo(session: EditSession, dontSelect?: boolean): void;
|
||||
reset(): void;
|
||||
canUndo(): boolean;
|
||||
canRedo(): boolean;
|
||||
bookmark(rev?: number): void;
|
||||
isAtBookmark(): boolean;
|
||||
}
|
||||
|
||||
export interface EditSession extends EventEmitter, OptionsProvider, Folding {
|
||||
selection: Selection;
|
||||
|
||||
on(name: 'changeFold',
|
||||
callback: (obj: { data: Fold, action: string }) => void): Function;
|
||||
on(name: 'changeScrollLeft', callback: (scrollLeft: number) => void): Function;
|
||||
on(name: 'changeScrollTop', callback: (scrollTop: number) => void): Function;
|
||||
on(name: 'tokenizerUpdate',
|
||||
callback: (obj: { data: { first: number, last: number } }) => void): Function;
|
||||
|
||||
|
||||
setOption<T extends keyof EditSessionOptions>(name: T, value: EditSessionOptions[T]): void;
|
||||
getOption<T extends keyof EditSessionOptions>(name: T): EditSessionOptions[T];
|
||||
|
||||
setDocument(doc: Document): void;
|
||||
getDocument(): Document;
|
||||
resetCaches(): void;
|
||||
setValue(text: string): void;
|
||||
getValue(): string;
|
||||
getSelection(): Selection;
|
||||
getState(row: number): string;
|
||||
getTokens(row: number): Token[];
|
||||
getTokenAt(row: number, column: number): Token | null;
|
||||
setUndoManager(undoManager: UndoManager): void;
|
||||
markUndoGroup(): void;
|
||||
getUndoManager(): UndoManager;
|
||||
getTabString(): string;
|
||||
setUseSoftTabs(val: boolean): void;
|
||||
getUseSoftTabs(): boolean;
|
||||
setTabSize(tabSize: number): void;
|
||||
getTabSize(): number;
|
||||
isTabStop(position: Point): boolean;
|
||||
setNavigateWithinSoftTabs(navigateWithinSoftTabs: boolean): void;
|
||||
getNavigateWithinSoftTabs(): boolean;
|
||||
setOverwrite(overwrite: boolean): void;
|
||||
getOverwrite(): boolean;
|
||||
toggleOverwrite(): void;
|
||||
addGutterDecoration(row: number, className: string): void;
|
||||
removeGutterDecoration(row: number, className: string): void;
|
||||
getBreakpoints(): string[];
|
||||
setBreakpoints(rows: number[]): void;
|
||||
clearBreakpoints(): void;
|
||||
setBreakpoint(row: number, className: string): void;
|
||||
clearBreakpoint(row: number): void;
|
||||
addMarker(range: Range,
|
||||
className: string,
|
||||
type: "fullLine" | "screenLine" | "text" | MarkerRenderer,
|
||||
inFront?: boolean): number;
|
||||
addDynamicMarker(marker: MarkerLike, inFront: boolean): MarkerLike;
|
||||
removeMarker(markerId: number): void;
|
||||
getMarkers(inFront?: boolean): MarkerLike[];
|
||||
highlight(re: RegExp): void;
|
||||
highlightLines(startRow: number,
|
||||
endRow: number,
|
||||
className: string,
|
||||
inFront?: boolean): Range;
|
||||
setAnnotations(annotations: Annotation[]): void;
|
||||
getAnnotations(): Annotation[];
|
||||
clearAnnotations(): void;
|
||||
getWordRange(row: number, column: number): Range;
|
||||
getAWordRange(row: number, column: number): Range;
|
||||
setNewLineMode(newLineMode: NewLineMode): void;
|
||||
getNewLineMode(): NewLineMode;
|
||||
setUseWorker(useWorker: boolean): void;
|
||||
getUseWorker(): boolean;
|
||||
setMode(mode: string | SyntaxMode, callback?: () => void): void;
|
||||
getMode(): SyntaxMode;
|
||||
setScrollTop(scrollTop: number): void;
|
||||
getScrollTop(): number;
|
||||
setScrollLeft(scrollLeft: number): void;
|
||||
getScrollLeft(): number;
|
||||
getScreenWidth(): number;
|
||||
getLineWidgetMaxWidth(): number;
|
||||
getLine(row: number): string;
|
||||
getLines(firstRow: number, lastRow: number): string[];
|
||||
getLength(): number;
|
||||
getTextRange(range: Range): string;
|
||||
insert(position: Point, text: string): void;
|
||||
remove(range: Range): void;
|
||||
removeFullLines(firstRow: number, lastRow: number): void;
|
||||
undoChanges(deltas: Delta[], dontSelect?: boolean): void;
|
||||
redoChanges(deltas: Delta[], dontSelect?: boolean): void;
|
||||
setUndoSelect(enable: boolean): void;
|
||||
replace(range: Range, text: string): void;
|
||||
moveText(fromRange: Range, toPosition: Point, copy?: boolean): void;
|
||||
indentRows(startRow: number, endRow: number, indentString: string): void;
|
||||
outdentRows(range: Range): void;
|
||||
moveLinesUp(firstRow: number, lastRow: number): void;
|
||||
moveLinesDown(firstRow: number, lastRow: number): void;
|
||||
duplicateLines(firstRow: number, lastRow: number): void;
|
||||
setUseWrapMode(useWrapMode: boolean): void;
|
||||
getUseWrapMode(): boolean;
|
||||
setWrapLimitRange(min: number, max: number): void;
|
||||
adjustWrapLimit(desiredLimit: number): boolean;
|
||||
getWrapLimit(): number;
|
||||
setWrapLimit(limit: number): void;
|
||||
getWrapLimitRange(): { min: number, max: number };
|
||||
getRowLineCount(row: number): number;
|
||||
getRowWrapIndent(screenRow: number): number;
|
||||
getScreenLastRowColumn(screenRow: number): number;
|
||||
getDocumentLastRowColumn(docRow: number, docColumn: number): number;
|
||||
getdocumentLastRowColumnPosition(docRow: number, docColumn: number): Point;
|
||||
getRowSplitData(row: number): string | undefined;
|
||||
getScreenTabSize(screenColumn: number): number;
|
||||
screenToDocumentRow(screenRow: number, screenColumn: number): number;
|
||||
screenToDocumentColumn(screenRow: number, screenColumn: number): number;
|
||||
screenToDocumentPosition(screenRow: number,
|
||||
screenColumn: number,
|
||||
offsetX?: number): Point;
|
||||
documentToScreenPosition(docRow: number, docColumn: number): Point;
|
||||
documentToScreenPosition(position: Point): Point;
|
||||
documentToScreenColumn(row: number, docColumn: number): number;
|
||||
documentToScreenRow(docRow: number, docColumn: number): number;
|
||||
getScreenLength(): number;
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
export interface KeyBinding {
|
||||
setDefaultHandler(handler: KeyboardHandler): void;
|
||||
setKeyboardHandler(handler: KeyboardHandler): void;
|
||||
addKeyboardHandler(handler: KeyboardHandler, pos: number): void;
|
||||
removeKeyboardHandler(handler: KeyboardHandler): boolean;
|
||||
getKeyboardHandler(): KeyboardHandler;
|
||||
getStatusText(): string;
|
||||
}
|
||||
|
||||
interface CommandMap {
|
||||
[name: string]: Command;
|
||||
}
|
||||
|
||||
type execEventHandler = (obj: {
|
||||
editor: Editor,
|
||||
command: Command,
|
||||
args: any[]
|
||||
}) => void;
|
||||
|
||||
export interface CommandManager extends EventEmitter {
|
||||
byName: CommandMap,
|
||||
commands: CommandMap,
|
||||
on(name: 'exec', callback: execEventHandler): Function;
|
||||
on(name: 'afterExec', callback: execEventHandler): Function;
|
||||
once(name: string, callback: Function): void;
|
||||
setDefaultHandler(name: string, callback: Function): void;
|
||||
removeDefaultHandler(name: string, callback: Function): void;
|
||||
on(name: string, callback: Function, capturing?: boolean): Function;
|
||||
addEventListener(name: string, callback: Function, capturing?: boolean): void;
|
||||
off(name: string, callback: Function): void;
|
||||
removeListener(name: string, callback: Function): void;
|
||||
removeEventListener(name: string, callback: Function): void;
|
||||
|
||||
exec(command: string, editor: Editor, args: any): boolean;
|
||||
toggleRecording(editor: Editor): void;
|
||||
replay(editor: Editor): void;
|
||||
addCommand(command: Command): void;
|
||||
removeCommand(command: Command, keepCommand?: boolean): void;
|
||||
bindKey(key: string | { mac?: string, win?: string },
|
||||
command: CommandLike,
|
||||
position?: number): void;
|
||||
}
|
||||
|
||||
export interface VirtualRenderer extends OptionsProvider, EventEmitter {
|
||||
container: HTMLElement;
|
||||
|
||||
setOption<T extends keyof VirtualRendererOptions>(name: T, value: VirtualRendererOptions[T]): void;
|
||||
getOption<T extends keyof VirtualRendererOptions>(name: T): VirtualRendererOptions[T];
|
||||
|
||||
setSession(session: EditSession): void;
|
||||
updateLines(firstRow: number, lastRow: number, force?: boolean): void;
|
||||
updateText(): void;
|
||||
updateFull(force?: boolean): void;
|
||||
updateFontSize(): void;
|
||||
adjustWrapLimit(): boolean;
|
||||
setAnimatedScroll(shouldAnimate: boolean): void;
|
||||
getAnimatedScroll(): boolean;
|
||||
setShowInvisibles(showInvisibles: boolean): void;
|
||||
getShowInvisibles(): boolean;
|
||||
setDisplayIndentGuides(display: boolean): void;
|
||||
getDisplayIndentGuides(): boolean;
|
||||
setShowPrintMargin(showPrintMargin: boolean): void;
|
||||
getShowPrintMargin(): boolean;
|
||||
setPrintMarginColumn(showPrintMargin: boolean): void;
|
||||
getPrintMarginColumn(): boolean;
|
||||
setShowGutter(show: boolean): void;
|
||||
getShowGutter(): boolean;
|
||||
setFadeFoldWidgets(show: boolean): void;
|
||||
getFadeFoldWidgets(): boolean;
|
||||
setHighlightGutterLine(shouldHighlight: boolean): void;
|
||||
getHighlightGutterLine(): boolean;
|
||||
getContainerElement(): HTMLElement;
|
||||
getMouseEventTarget(): HTMLElement;
|
||||
getTextAreaContainer(): HTMLElement;
|
||||
getFirstVisibleRow(): number;
|
||||
getFirstFullyVisibleRow(): number;
|
||||
getLastFullyVisibleRow(): number;
|
||||
getLastVisibleRow(): number;
|
||||
setPadding(padding: number): void;
|
||||
setScrollMargin(top: number,
|
||||
bottom: number,
|
||||
left: number,
|
||||
right: number): void;
|
||||
setHScrollBarAlwaysVisible(alwaysVisible: boolean): void;
|
||||
getHScrollBarAlwaysVisible(): boolean;
|
||||
setVScrollBarAlwaysVisible(alwaysVisible: boolean): void;
|
||||
getVScrollBarAlwaysVisible(): boolean;
|
||||
freeze(): void;
|
||||
unfreeze(): void;
|
||||
updateFrontMarkers(): void;
|
||||
updateBackMarkers(): void;
|
||||
updateBreakpoints(): void;
|
||||
setAnnotations(annotations: Annotation[]): void;
|
||||
updateCursor(): void;
|
||||
hideCursor(): void;
|
||||
showCursor(): void;
|
||||
scrollSelectionIntoView(anchor: Point,
|
||||
lead: Point,
|
||||
offset?: number): void;
|
||||
scrollCursorIntoView(cursor: Point, offset?: number): void;
|
||||
getScrollTop(): number;
|
||||
getScrollLeft(): number;
|
||||
getScrollTopRow(): number;
|
||||
getScrollBottomRow(): number;
|
||||
scrollToRow(row: number): void;
|
||||
alignCursor(cursor: Point | number, alignment: number): number;
|
||||
scrollToLine(line: number,
|
||||
center: boolean,
|
||||
animate: boolean,
|
||||
callback: () => void): void;
|
||||
animateScrolling(fromValue: number, callback: () => void): void;
|
||||
scrollToY(scrollTop: number): void;
|
||||
scrollToX(scrollLeft: number): void;
|
||||
scrollTo(x: number, y: number): void;
|
||||
scrollBy(deltaX: number, deltaY: number): void;
|
||||
isScrollableBy(deltaX: number, deltaY: number): boolean;
|
||||
textToScreenCoordinates(row: number, column: number): { pageX: number, pageY: number };
|
||||
visualizeFocus(): void;
|
||||
visualizeBlur(): void;
|
||||
showComposition(position: number): void;
|
||||
setCompositionText(text: string): void;
|
||||
hideComposition(): void;
|
||||
setTheme(theme: string, callback?: () => void): void;
|
||||
getTheme(): string;
|
||||
setStyle(style: string, include?: boolean): void;
|
||||
unsetStyle(style: string): void;
|
||||
setCursorStyle(style: string): void;
|
||||
setMouseCursor(cursorStyle: string): void;
|
||||
attachToShadowRoot(): void;
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
|
||||
export interface Selection extends EventEmitter {
|
||||
moveCursorWordLeft(): void;
|
||||
moveCursorWordRight(): void;
|
||||
fromOrientedRange(range: Range): void;
|
||||
setSelectionRange(match: any): void;
|
||||
getAllRanges(): Range[];
|
||||
addRange(range: Range): void;
|
||||
isEmpty(): boolean;
|
||||
isMultiLine(): boolean;
|
||||
setCursor(row: number, column: number): void;
|
||||
setAnchor(row: number, column: number): void;
|
||||
getAnchor(): Point;
|
||||
getCursor(): Point;
|
||||
isBackwards(): boolean;
|
||||
getRange(): Range;
|
||||
clearSelection(): void;
|
||||
selectAll(): void;
|
||||
setRange(range: Range, reverse?: boolean): void;
|
||||
selectTo(row: number, column: number): void;
|
||||
selectToPosition(pos: any): void;
|
||||
selectUp(): void;
|
||||
selectDown(): void;
|
||||
selectRight(): void;
|
||||
selectLeft(): void;
|
||||
selectLineStart(): void;
|
||||
selectLineEnd(): void;
|
||||
selectFileEnd(): void;
|
||||
selectFileStart(): void;
|
||||
selectWordRight(): void;
|
||||
selectWordLeft(): void;
|
||||
getWordRange(): void;
|
||||
selectWord(): void;
|
||||
selectAWord(): void;
|
||||
selectLine(): void;
|
||||
moveCursorUp(): void;
|
||||
moveCursorDown(): void;
|
||||
moveCursorLeft(): void;
|
||||
moveCursorRight(): void;
|
||||
moveCursorLineStart(): void;
|
||||
moveCursorLineEnd(): void;
|
||||
moveCursorFileEnd(): void;
|
||||
moveCursorFileStart(): void;
|
||||
moveCursorLongWordRight(): void;
|
||||
moveCursorLongWordLeft(): void;
|
||||
moveCursorBy(rows: number, chars: number): void;
|
||||
moveCursorToPosition(position: any): void;
|
||||
moveCursorTo(row: number, column: number, keepDesiredColumn?: boolean): void;
|
||||
moveCursorToScreen(row: number, column: number, keepDesiredColumn: boolean): void;
|
||||
|
||||
toJSON(): SavedSelection | SavedSelection[];
|
||||
fromJSON(selection: SavedSelection | SavedSelection[]): void;
|
||||
}
|
||||
interface SavedSelection {
|
||||
start: Point;
|
||||
end: Point;
|
||||
isBackwards: boolean;
|
||||
}
|
||||
|
||||
var Selection: {
|
||||
new(session: EditSession): Selection;
|
||||
}
|
||||
|
||||
export interface Editor extends OptionsProvider, EventEmitter {
|
||||
container: HTMLElement;
|
||||
renderer: VirtualRenderer;
|
||||
id: string;
|
||||
commands: CommandManager;
|
||||
keyBinding: KeyBinding;
|
||||
session: EditSession;
|
||||
selection: Selection;
|
||||
|
||||
on(name: 'blur', callback: (e: Event) => void): Function;
|
||||
on(name: 'input', callback: () => void): Function;
|
||||
on(name: 'change', callback: (delta: Delta) => void): Function;
|
||||
on(name: 'changeSelectionStyle', callback: (obj: { data: string }) => void): Function;
|
||||
on(name: 'changeSession',
|
||||
callback: (obj: { session: EditSession, oldSession: EditSession }) => void
|
||||
): Function;
|
||||
on(name: 'copy', callback: (obj: { text: string }) => void): Function;
|
||||
on(name: 'focus', callback: (e: Event) => void): Function;
|
||||
on(name: 'paste', callback: (obj: { text: string }) => void): Function;
|
||||
|
||||
setOption<T extends keyof EditorOptions>(name: T, value: EditorOptions[T]): void;
|
||||
getOption<T extends keyof EditorOptions>(name: T): EditorOptions[T];
|
||||
|
||||
setKeyboardHandler(keyboardHandler: string, callback?: () => void): void;
|
||||
getKeyboardHandler(): string;
|
||||
setSession(session: EditSession): void;
|
||||
getSession(): EditSession;
|
||||
setValue(val: string, cursorPos?: number): string;
|
||||
getValue(): string;
|
||||
getSelection(): Selection;
|
||||
resize(force?: boolean): void;
|
||||
setTheme(theme: string, callback?: () => void): void;
|
||||
getTheme(): string;
|
||||
setStyle(style: string): void;
|
||||
unsetStyle(style: string): void;
|
||||
getFontSize(): string;
|
||||
setFontSize(size: string): void;
|
||||
focus(): void;
|
||||
isFocused(): boolean;
|
||||
flur(): void;
|
||||
getSelectedText(): string;
|
||||
getCopyText(): string;
|
||||
execCommand(command: string | string[], args?: any): boolean;
|
||||
insert(text: string, pasted?: boolean): void;
|
||||
setOverwrite(overwrite: boolean): void;
|
||||
getOverwrite(): boolean;
|
||||
toggleOverwrite(): void;
|
||||
setScrollSpeed(speed: number): void;
|
||||
getScrollSpeed(): number;
|
||||
setDragDelay(dragDelay: number): void;
|
||||
getDragDelay(): number;
|
||||
setSelectionStyle(val: string): void;
|
||||
getSelectionStyle(): string;
|
||||
setHighlightActiveLine(shouldHighlight: boolean): void;
|
||||
getHighlightActiveLine(): boolean;
|
||||
setHighlightGutterLine(shouldHighlight: boolean): void;
|
||||
getHighlightGutterLine(): boolean;
|
||||
setHighlightSelectedWord(shouldHighlight: boolean): void;
|
||||
getHighlightSelectedWord(): boolean;
|
||||
setAnimatedScroll(shouldAnimate: boolean): void;
|
||||
getAnimatedScroll(): boolean;
|
||||
setShowInvisibles(showInvisibles: boolean): void;
|
||||
getShowInvisibles(): boolean;
|
||||
setDisplayIndentGuides(display: boolean): void;
|
||||
getDisplayIndentGuides(): boolean;
|
||||
setShowPrintMargin(showPrintMargin: boolean): void;
|
||||
getShowPrintMargin(): boolean;
|
||||
setPrintMarginColumn(showPrintMargin: number): void;
|
||||
getPrintMarginColumn(): number;
|
||||
setReadOnly(readOnly: boolean): void;
|
||||
getReadOnly(): boolean;
|
||||
setBehavioursEnabled(enabled: boolean): void;
|
||||
getBehavioursEnabled(): boolean;
|
||||
setWrapBehavioursEnabled(enabled: boolean): void;
|
||||
getWrapBehavioursEnabled(): boolean;
|
||||
setShowFoldWidgets(show: boolean): void;
|
||||
getShowFoldWidgets(): boolean;
|
||||
setFadeFoldWidgets(fade: boolean): void;
|
||||
getFadeFoldWidgets(): boolean;
|
||||
remove(dir?: 'left' | 'right'): void;
|
||||
removeWordRight(): void;
|
||||
removeWordLeft(): void;
|
||||
removeLineToEnd(): void;
|
||||
splitLine(): void;
|
||||
transposeLetters(): void;
|
||||
toLowerCase(): void;
|
||||
toUpperCase(): void;
|
||||
indent(): void;
|
||||
blockIndent(): void;
|
||||
blockOutdent(): void;
|
||||
sortLines(): void;
|
||||
toggleCommentLines(): void;
|
||||
toggleBlockComment(): void;
|
||||
modifyNumber(amount: number): void;
|
||||
removeLines(): void;
|
||||
duplicateSelection(): void;
|
||||
moveLinesDown(): void;
|
||||
moveLinesUp(): void;
|
||||
moveText(range: Range, toPosition: Point, copy?: boolean): Range;
|
||||
copyLinesUp(): void;
|
||||
copyLinesDown(): void;
|
||||
getFirstVisibleRow(): number;
|
||||
getLastVisibleRow(): number;
|
||||
isRowVisible(row: number): boolean;
|
||||
isRowFullyVisible(row: number): boolean;
|
||||
selectPageDown(): void;
|
||||
selectPageUp(): void;
|
||||
gotoPageDown(): void;
|
||||
gotoPageUp(): void;
|
||||
scrollPageDown(): void;
|
||||
scrollPageUp(): void;
|
||||
scrollToRow(row: number): void;
|
||||
scrollToLine(line: number, center: boolean, animate: boolean, callback: () => void): void;
|
||||
centerSelection(): void;
|
||||
getCursorPosition(): Point;
|
||||
getCursorPositionScreen(): Point;
|
||||
getSelectionRange(): Range;
|
||||
selectAll(): void;
|
||||
clearSelection(): void;
|
||||
moveCursorTo(row: number, column: number): void;
|
||||
moveCursorToPosition(pos: Point): void;
|
||||
jumpToMatching(select: boolean, expand: boolean): void;
|
||||
gotoLine(lineNumber: number, column: number, animate: boolean): void;
|
||||
navigateTo(row: number, column: number): void;
|
||||
navigateUp(): void;
|
||||
navigateDown(): void;
|
||||
navigateLeft(): void;
|
||||
navigateRight(): void;
|
||||
navigateLineStart(): void;
|
||||
navigateLineEnd(): void;
|
||||
navigateFileEnd(): void;
|
||||
navigateFileStart(): void;
|
||||
navigateWordRight(): void;
|
||||
navigateWordLeft(): void;
|
||||
replace(replacement: string, options?: Partial<SearchOptions>): number;
|
||||
replaceAll(replacement: string, options?: Partial<SearchOptions>): number;
|
||||
getLastSearchOptions(): Partial<SearchOptions>;
|
||||
find(needle: string, options?: Partial<SearchOptions>, animate?: boolean): void;
|
||||
findNext(options?: Partial<SearchOptions>, animate?: boolean): void;
|
||||
findPrevious(options?: Partial<SearchOptions>, animate?: boolean): void;
|
||||
undo(): void;
|
||||
redo(): void;
|
||||
destroy(): void;
|
||||
setAutoScrollEditorIntoView(enable: boolean): void;
|
||||
completers: Completer[];
|
||||
}
|
||||
|
||||
type CompleterCallback = (error: any, completions: Completion[]) => void;
|
||||
|
||||
interface Completer {
|
||||
getCompletions(editor: Editor,
|
||||
session: EditSession,
|
||||
position: Point,
|
||||
prefix: string,
|
||||
callback: CompleterCallback): void;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const version: string;
|
||||
export const config: Ace.Config;
|
||||
export function require(name: string): any;
|
||||
export function edit(el: Element | string, options?: Partial<Ace.EditorOptions>): Ace.Editor;
|
||||
export function createEditSession(text: Ace.Document | string, mode: Ace.SyntaxMode): Ace.EditSession;
|
||||
export const VirtualRenderer: {
|
||||
new(container: HTMLElement, theme?: string): Ace.VirtualRenderer;
|
||||
};
|
||||
export const EditSession: {
|
||||
new(text: string | Document, mode?: Ace.SyntaxMode): Ace.EditSession;
|
||||
};
|
||||
export const UndoManager: {
|
||||
new(): Ace.UndoManager;
|
||||
};
|
||||
export const Range: {
|
||||
new(startRow: number, startColumn: number, endRow: number, endColumn: number): Ace.Range;
|
||||
fromPoints(start: Ace.Point, end: Ace.Point): Ace.Range;
|
||||
comparePoints(p1: Ace.Point, p2: Ace.Point): number;
|
||||
};
|
||||
20
htdocs/includes/ace/bower.json
Normal file
20
htdocs/includes/ace/bower.json
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "ace-builds",
|
||||
"description": "Ace (Ajax.org Cloud9 Editor)",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"ignore": [
|
||||
"demo"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ajaxorg/ace-builds.git"
|
||||
},
|
||||
"author": "",
|
||||
"license": "BSD",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ajaxorg/ace-builds/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ajaxorg/ace-builds"
|
||||
}
|
||||
39
htdocs/includes/ace/editor.html
Normal file
39
htdocs/includes/ace/editor.html
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>Editor</title>
|
||||
<style type="text/css" media="screen">
|
||||
body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#editor {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<pre id="editor">function foo(items) {
|
||||
var i;
|
||||
for (i = 0; i < items.length; i++) {
|
||||
alert("Ace Rocks " + items[i]);
|
||||
}
|
||||
}</pre>
|
||||
|
||||
<script src="src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
var editor = ace.edit("editor");
|
||||
editor.setTheme("ace/theme/twilight");
|
||||
editor.session.setMode("ace/mode/javascript");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,334 +0,0 @@
|
|||
ace.define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var TokenIterator = require("ace/token_iterator").TokenIterator;
|
||||
exports.newLines = [{
|
||||
type: 'support.php_tag',
|
||||
value: '<?php'
|
||||
}, {
|
||||
type: 'support.php_tag',
|
||||
value: '<?'
|
||||
}, {
|
||||
type: 'support.php_tag',
|
||||
value: '?>'
|
||||
}, {
|
||||
type: 'paren.lparen',
|
||||
value: '{',
|
||||
indent: true
|
||||
}, {
|
||||
type: 'paren.rparen',
|
||||
breakBefore: true,
|
||||
value: '}',
|
||||
indent: false
|
||||
}, {
|
||||
type: 'paren.rparen',
|
||||
breakBefore: true,
|
||||
value: '})',
|
||||
indent: false,
|
||||
dontBreak: true
|
||||
}, {
|
||||
type: 'comment'
|
||||
}, {
|
||||
type: 'text',
|
||||
value: ';'
|
||||
}, {
|
||||
type: 'text',
|
||||
value: ':',
|
||||
context: 'php'
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'case',
|
||||
indent: true,
|
||||
dontBreak: true
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'default',
|
||||
indent: true,
|
||||
dontBreak: true
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'break',
|
||||
indent: false,
|
||||
dontBreak: true
|
||||
}, {
|
||||
type: 'punctuation.doctype.end',
|
||||
value: '>'
|
||||
}, {
|
||||
type: 'meta.tag.punctuation.end',
|
||||
value: '>'
|
||||
}, {
|
||||
type: 'meta.tag.punctuation.begin',
|
||||
value: '<',
|
||||
blockTag: true,
|
||||
indent: true,
|
||||
dontBreak: true
|
||||
}, {
|
||||
type: 'meta.tag.punctuation.begin',
|
||||
value: '</',
|
||||
indent: false,
|
||||
breakBefore: true,
|
||||
dontBreak: true
|
||||
}, {
|
||||
type: 'punctuation.operator',
|
||||
value: ';'
|
||||
}];
|
||||
|
||||
exports.spaces = [{
|
||||
type: 'xml-pe',
|
||||
prepend: true
|
||||
},{
|
||||
type: 'entity.other.attribute-name',
|
||||
prepend: true
|
||||
}, {
|
||||
type: 'storage.type',
|
||||
value: 'var',
|
||||
append: true
|
||||
}, {
|
||||
type: 'storage.type',
|
||||
value: 'function',
|
||||
append: true
|
||||
}, {
|
||||
type: 'keyword.operator',
|
||||
value: '='
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'as',
|
||||
prepend: true,
|
||||
append: true
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'function',
|
||||
append: true
|
||||
}, {
|
||||
type: 'support.function',
|
||||
next: /[^\(]/,
|
||||
append: true
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'or',
|
||||
append: true,
|
||||
prepend: true
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'and',
|
||||
append: true,
|
||||
prepend: true
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'case',
|
||||
append: true
|
||||
}, {
|
||||
type: 'keyword.operator',
|
||||
value: '||',
|
||||
append: true,
|
||||
prepend: true
|
||||
}, {
|
||||
type: 'keyword.operator',
|
||||
value: '&&',
|
||||
append: true,
|
||||
prepend: true
|
||||
}];
|
||||
exports.singleTags = ['!doctype','area','base','br','hr','input','img','link','meta'];
|
||||
|
||||
exports.transform = function(iterator, maxPos, context) {
|
||||
var token = iterator.getCurrentToken();
|
||||
|
||||
var newLines = exports.newLines;
|
||||
var spaces = exports.spaces;
|
||||
var singleTags = exports.singleTags;
|
||||
|
||||
var code = '';
|
||||
|
||||
var indentation = 0;
|
||||
var dontBreak = false;
|
||||
var tag;
|
||||
var lastTag;
|
||||
var lastToken = {};
|
||||
var nextTag;
|
||||
var nextToken = {};
|
||||
var breakAdded = false;
|
||||
var value = '';
|
||||
|
||||
while (token!==null) {
|
||||
console.log(token);
|
||||
|
||||
if( !token ){
|
||||
token = iterator.stepForward();
|
||||
continue;
|
||||
}
|
||||
if( token.type == 'support.php_tag' && token.value != '?>' ){
|
||||
context = 'php';
|
||||
}
|
||||
else if( token.type == 'support.php_tag' && token.value == '?>' ){
|
||||
context = 'html';
|
||||
}
|
||||
else if( token.type == 'meta.tag.name.style' && context != 'css' ){
|
||||
context = 'css';
|
||||
}
|
||||
else if( token.type == 'meta.tag.name.style' && context == 'css' ){
|
||||
context = 'html';
|
||||
}
|
||||
else if( token.type == 'meta.tag.name.script' && context != 'js' ){
|
||||
context = 'js';
|
||||
}
|
||||
else if( token.type == 'meta.tag.name.script' && context == 'js' ){
|
||||
context = 'html';
|
||||
}
|
||||
|
||||
nextToken = iterator.stepForward();
|
||||
if (nextToken && nextToken.type.indexOf('meta.tag.name') == 0) {
|
||||
nextTag = nextToken.value;
|
||||
}
|
||||
if ( lastToken.type == 'support.php_tag' && lastToken.value == '<?=') {
|
||||
dontBreak = true;
|
||||
}
|
||||
if (token.type == 'meta.tag.name') {
|
||||
token.value = token.value.toLowerCase();
|
||||
}
|
||||
if (token.type == 'text') {
|
||||
token.value = token.value.trim();
|
||||
}
|
||||
if (!token.value) {
|
||||
token = nextToken;
|
||||
continue;
|
||||
}
|
||||
value = token.value;
|
||||
for (var i in spaces) {
|
||||
if (
|
||||
token.type == spaces[i].type &&
|
||||
(!spaces[i].value || token.value == spaces[i].value) &&
|
||||
(
|
||||
nextToken &&
|
||||
(!spaces[i].next || spaces[i].next.test(nextToken.value))
|
||||
)
|
||||
) {
|
||||
if (spaces[i].prepend) {
|
||||
value = ' ' + token.value;
|
||||
}
|
||||
|
||||
if (spaces[i].append) {
|
||||
value += ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
if (token.type.indexOf('meta.tag.name') == 0) {
|
||||
tag = token.value;
|
||||
}
|
||||
breakAdded = false;
|
||||
for (i in newLines) {
|
||||
if (
|
||||
token.type == newLines[i].type &&
|
||||
(
|
||||
!newLines[i].value ||
|
||||
token.value == newLines[i].value
|
||||
) &&
|
||||
(
|
||||
!newLines[i].blockTag ||
|
||||
singleTags.indexOf(nextTag) === -1
|
||||
) &&
|
||||
(
|
||||
!newLines[i].context ||
|
||||
newLines[i].context === context
|
||||
)
|
||||
) {
|
||||
if (newLines[i].indent === false) {
|
||||
indentation--;
|
||||
}
|
||||
|
||||
if (
|
||||
newLines[i].breakBefore &&
|
||||
( !newLines[i].prev || newLines[i].prev.test(lastToken.value) )
|
||||
) {
|
||||
code += "\n";
|
||||
breakAdded = true;
|
||||
for (i = 0; i < indentation; i++) {
|
||||
code += "\t";
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (dontBreak===false) {
|
||||
for (i in newLines) {
|
||||
if (
|
||||
lastToken.type == newLines[i].type &&
|
||||
(
|
||||
!newLines[i].value || lastToken.value == newLines[i].value
|
||||
) &&
|
||||
(
|
||||
!newLines[i].blockTag ||
|
||||
singleTags.indexOf(tag) === -1
|
||||
) &&
|
||||
(
|
||||
!newLines[i].context ||
|
||||
newLines[i].context === context
|
||||
)
|
||||
) {
|
||||
if (newLines[i].indent === true) {
|
||||
indentation++;
|
||||
}
|
||||
|
||||
if (!newLines[i].dontBreak && !breakAdded) {
|
||||
code += "\n";
|
||||
for (i = 0; i < indentation; i++) {
|
||||
code += "\t";
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
code += value;
|
||||
if ( lastToken.type == 'support.php_tag' && lastToken.value == '?>' ) {
|
||||
dontBreak = false;
|
||||
}
|
||||
lastTag = tag;
|
||||
|
||||
lastToken = token;
|
||||
|
||||
token = nextToken;
|
||||
|
||||
if (token===null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return code;
|
||||
};
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var TokenIterator = require("ace/token_iterator").TokenIterator;
|
||||
|
||||
var phpTransform = require("./beautify/php_rules").transform;
|
||||
|
||||
exports.beautify = function(session) {
|
||||
var iterator = new TokenIterator(session, 0, 0);
|
||||
var token = iterator.getCurrentToken();
|
||||
|
||||
var context = session.$modeId.split("/").pop();
|
||||
|
||||
var code = phpTransform(iterator, context);
|
||||
session.doc.setValue(code);
|
||||
};
|
||||
|
||||
exports.commands = [{
|
||||
name: "beautify",
|
||||
exec: function(editor) {
|
||||
exports.beautify(editor.session);
|
||||
},
|
||||
bindKey: "Ctrl-Shift-B"
|
||||
}]
|
||||
|
||||
});
|
||||
(function() {
|
||||
ace.require(["ace/ext/beautify"], function() {});
|
||||
})();
|
||||
|
||||
|
|
@ -1,540 +0,0 @@
|
|||
ace.define("ace/ext/chromevox",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) {
|
||||
var cvoxAce = {};
|
||||
cvoxAce.SpeechProperty;
|
||||
cvoxAce.Cursor;
|
||||
cvoxAce.Token;
|
||||
cvoxAce.Annotation;
|
||||
var CONSTANT_PROP = {
|
||||
'rate': 0.8,
|
||||
'pitch': 0.4,
|
||||
'volume': 0.9
|
||||
};
|
||||
var DEFAULT_PROP = {
|
||||
'rate': 1,
|
||||
'pitch': 0.5,
|
||||
'volume': 0.9
|
||||
};
|
||||
var ENTITY_PROP = {
|
||||
'rate': 0.8,
|
||||
'pitch': 0.8,
|
||||
'volume': 0.9
|
||||
};
|
||||
var KEYWORD_PROP = {
|
||||
'rate': 0.8,
|
||||
'pitch': 0.3,
|
||||
'volume': 0.9
|
||||
};
|
||||
var STORAGE_PROP = {
|
||||
'rate': 0.8,
|
||||
'pitch': 0.7,
|
||||
'volume': 0.9
|
||||
};
|
||||
var VARIABLE_PROP = {
|
||||
'rate': 0.8,
|
||||
'pitch': 0.8,
|
||||
'volume': 0.9
|
||||
};
|
||||
var DELETED_PROP = {
|
||||
'punctuationEcho': 'none',
|
||||
'relativePitch': -0.6
|
||||
};
|
||||
var ERROR_EARCON = 'ALERT_NONMODAL';
|
||||
var MODE_SWITCH_EARCON = 'ALERT_MODAL';
|
||||
var NO_MATCH_EARCON = 'INVALID_KEYPRESS';
|
||||
var INSERT_MODE_STATE = 'insertMode';
|
||||
var COMMAND_MODE_STATE = 'start';
|
||||
|
||||
var REPLACE_LIST = [
|
||||
{
|
||||
substr: ';',
|
||||
newSubstr: ' semicolon '
|
||||
},
|
||||
{
|
||||
substr: ':',
|
||||
newSubstr: ' colon '
|
||||
}
|
||||
];
|
||||
var Command = {
|
||||
SPEAK_ANNOT: 'annots',
|
||||
SPEAK_ALL_ANNOTS: 'all_annots',
|
||||
TOGGLE_LOCATION: 'toggle_location',
|
||||
SPEAK_MODE: 'mode',
|
||||
SPEAK_ROW_COL: 'row_col',
|
||||
TOGGLE_DISPLACEMENT: 'toggle_displacement',
|
||||
FOCUS_TEXT: 'focus_text'
|
||||
};
|
||||
var KEY_PREFIX = 'CONTROL + SHIFT ';
|
||||
cvoxAce.editor = null;
|
||||
var lastCursor = null;
|
||||
var annotTable = {};
|
||||
var shouldSpeakRowLocation = false;
|
||||
var shouldSpeakDisplacement = false;
|
||||
var changed = false;
|
||||
var vimState = null;
|
||||
var keyCodeToShortcutMap = {};
|
||||
var cmdToShortcutMap = {};
|
||||
var getKeyShortcutString = function(keyCode) {
|
||||
return KEY_PREFIX + String.fromCharCode(keyCode);
|
||||
};
|
||||
var isVimMode = function() {
|
||||
var keyboardHandler = cvoxAce.editor.keyBinding.getKeyboardHandler();
|
||||
return keyboardHandler.$id === 'ace/keyboard/vim';
|
||||
};
|
||||
var getCurrentToken = function(cursor) {
|
||||
return cvoxAce.editor.getSession().getTokenAt(cursor.row, cursor.column + 1);
|
||||
};
|
||||
var getCurrentLine = function(cursor) {
|
||||
return cvoxAce.editor.getSession().getLine(cursor.row);
|
||||
};
|
||||
var onRowChange = function(currCursor) {
|
||||
if (annotTable[currCursor.row]) {
|
||||
cvox.Api.playEarcon(ERROR_EARCON);
|
||||
}
|
||||
if (shouldSpeakRowLocation) {
|
||||
cvox.Api.stop();
|
||||
speakChar(currCursor);
|
||||
speakTokenQueue(getCurrentToken(currCursor));
|
||||
speakLine(currCursor.row, 1);
|
||||
} else {
|
||||
speakLine(currCursor.row, 0);
|
||||
}
|
||||
};
|
||||
var isWord = function(cursor) {
|
||||
var line = getCurrentLine(cursor);
|
||||
var lineSuffix = line.substr(cursor.column - 1);
|
||||
if (cursor.column === 0) {
|
||||
lineSuffix = ' ' + line;
|
||||
}
|
||||
var firstWordRegExp = /^\W(\w+)/;
|
||||
var words = firstWordRegExp.exec(lineSuffix);
|
||||
return words !== null;
|
||||
};
|
||||
var rules = {
|
||||
'constant': {
|
||||
prop: CONSTANT_PROP
|
||||
},
|
||||
'entity': {
|
||||
prop: ENTITY_PROP
|
||||
},
|
||||
'keyword': {
|
||||
prop: KEYWORD_PROP
|
||||
},
|
||||
'storage': {
|
||||
prop: STORAGE_PROP
|
||||
},
|
||||
'variable': {
|
||||
prop: VARIABLE_PROP
|
||||
},
|
||||
'meta': {
|
||||
prop: DEFAULT_PROP,
|
||||
replace: [
|
||||
{
|
||||
substr: '</',
|
||||
newSubstr: ' closing tag '
|
||||
},
|
||||
{
|
||||
substr: '/>',
|
||||
newSubstr: ' close tag '
|
||||
},
|
||||
{
|
||||
substr: '<',
|
||||
newSubstr: ' tag start '
|
||||
},
|
||||
{
|
||||
substr: '>',
|
||||
newSubstr: ' tag end '
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
var DEFAULT_RULE = {
|
||||
prop: DEFAULT_RULE
|
||||
};
|
||||
var expand = function(value, replaceRules) {
|
||||
var newValue = value;
|
||||
for (var i = 0; i < replaceRules.length; i++) {
|
||||
var replaceRule = replaceRules[i];
|
||||
var regexp = new RegExp(replaceRule.substr, 'g');
|
||||
newValue = newValue.replace(regexp, replaceRule.newSubstr);
|
||||
}
|
||||
return newValue;
|
||||
};
|
||||
var mergeTokens = function(tokens, start, end) {
|
||||
var newToken = {};
|
||||
newToken.value = '';
|
||||
newToken.type = tokens[start].type;
|
||||
for (var j = start; j < end; j++) {
|
||||
newToken.value += tokens[j].value;
|
||||
}
|
||||
return newToken;
|
||||
};
|
||||
var mergeLikeTokens = function(tokens) {
|
||||
if (tokens.length <= 1) {
|
||||
return tokens;
|
||||
}
|
||||
var newTokens = [];
|
||||
var lastLikeIndex = 0;
|
||||
for (var i = 1; i < tokens.length; i++) {
|
||||
var lastLikeToken = tokens[lastLikeIndex];
|
||||
var currToken = tokens[i];
|
||||
if (getTokenRule(lastLikeToken) !== getTokenRule(currToken)) {
|
||||
newTokens.push(mergeTokens(tokens, lastLikeIndex, i));
|
||||
lastLikeIndex = i;
|
||||
}
|
||||
}
|
||||
newTokens.push(mergeTokens(tokens, lastLikeIndex, tokens.length));
|
||||
return newTokens;
|
||||
};
|
||||
var isRowWhiteSpace = function(row) {
|
||||
var line = cvoxAce.editor.getSession().getLine(row);
|
||||
var whiteSpaceRegexp = /^\s*$/;
|
||||
return whiteSpaceRegexp.exec(line) !== null;
|
||||
};
|
||||
var speakLine = function(row, queue) {
|
||||
var tokens = cvoxAce.editor.getSession().getTokens(row);
|
||||
if (tokens.length === 0 || isRowWhiteSpace(row)) {
|
||||
cvox.Api.playEarcon('EDITABLE_TEXT');
|
||||
return;
|
||||
}
|
||||
tokens = mergeLikeTokens(tokens);
|
||||
var firstToken = tokens[0];
|
||||
tokens = tokens.filter(function(token) {
|
||||
return token !== firstToken;
|
||||
});
|
||||
speakToken_(firstToken, queue);
|
||||
tokens.forEach(speakTokenQueue);
|
||||
};
|
||||
var speakTokenFlush = function(token) {
|
||||
speakToken_(token, 0);
|
||||
};
|
||||
var speakTokenQueue = function(token) {
|
||||
speakToken_(token, 1);
|
||||
};
|
||||
var getTokenRule = function(token) {
|
||||
if (!token || !token.type) {
|
||||
return;
|
||||
}
|
||||
var split = token.type.split('.');
|
||||
if (split.length === 0) {
|
||||
return;
|
||||
}
|
||||
var type = split[0];
|
||||
var rule = rules[type];
|
||||
if (!rule) {
|
||||
return DEFAULT_RULE;
|
||||
}
|
||||
return rule;
|
||||
};
|
||||
var speakToken_ = function(token, queue) {
|
||||
var rule = getTokenRule(token);
|
||||
var value = expand(token.value, REPLACE_LIST);
|
||||
if (rule.replace) {
|
||||
value = expand(value, rule.replace);
|
||||
}
|
||||
cvox.Api.speak(value, queue, rule.prop);
|
||||
};
|
||||
var speakChar = function(cursor) {
|
||||
var line = getCurrentLine(cursor);
|
||||
cvox.Api.speak(line[cursor.column], 1);
|
||||
};
|
||||
var speakDisplacement = function(lastCursor, currCursor) {
|
||||
var line = getCurrentLine(currCursor);
|
||||
var displace = line.substring(lastCursor.column, currCursor.column);
|
||||
displace = displace.replace(/ /g, ' space ');
|
||||
cvox.Api.speak(displace);
|
||||
};
|
||||
var speakCharOrWordOrLine = function(lastCursor, currCursor) {
|
||||
if (Math.abs(lastCursor.column - currCursor.column) !== 1) {
|
||||
var currLineLength = getCurrentLine(currCursor).length;
|
||||
if (currCursor.column === 0 || currCursor.column === currLineLength) {
|
||||
speakLine(currCursor.row, 0);
|
||||
return;
|
||||
}
|
||||
if (isWord(currCursor)) {
|
||||
cvox.Api.stop();
|
||||
speakTokenQueue(getCurrentToken(currCursor));
|
||||
return;
|
||||
}
|
||||
}
|
||||
speakChar(currCursor);
|
||||
};
|
||||
var onColumnChange = function(lastCursor, currCursor) {
|
||||
if (!cvoxAce.editor.selection.isEmpty()) {
|
||||
speakDisplacement(lastCursor, currCursor);
|
||||
cvox.Api.speak('selected', 1);
|
||||
}
|
||||
else if (shouldSpeakDisplacement) {
|
||||
speakDisplacement(lastCursor, currCursor);
|
||||
} else {
|
||||
speakCharOrWordOrLine(lastCursor, currCursor);
|
||||
}
|
||||
};
|
||||
var onCursorChange = function(evt) {
|
||||
if (changed) {
|
||||
changed = false;
|
||||
return;
|
||||
}
|
||||
var currCursor = cvoxAce.editor.selection.getCursor();
|
||||
if (currCursor.row !== lastCursor.row) {
|
||||
onRowChange(currCursor);
|
||||
} else {
|
||||
onColumnChange(lastCursor, currCursor);
|
||||
}
|
||||
lastCursor = currCursor;
|
||||
};
|
||||
var onSelectionChange = function(evt) {
|
||||
if (cvoxAce.editor.selection.isEmpty()) {
|
||||
cvox.Api.speak('unselected');
|
||||
}
|
||||
};
|
||||
var onChange = function(delta) {
|
||||
switch (delta.action) {
|
||||
case 'remove':
|
||||
cvox.Api.speak(delta.text, 0, DELETED_PROP);
|
||||
changed = true;
|
||||
break;
|
||||
case 'insert':
|
||||
cvox.Api.speak(delta.text, 0);
|
||||
changed = true;
|
||||
break;
|
||||
}
|
||||
};
|
||||
var isNewAnnotation = function(annot) {
|
||||
var row = annot.row;
|
||||
var col = annot.column;
|
||||
return !annotTable[row] || !annotTable[row][col];
|
||||
};
|
||||
var populateAnnotations = function(annotations) {
|
||||
annotTable = {};
|
||||
for (var i = 0; i < annotations.length; i++) {
|
||||
var annotation = annotations[i];
|
||||
var row = annotation.row;
|
||||
var col = annotation.column;
|
||||
if (!annotTable[row]) {
|
||||
annotTable[row] = {};
|
||||
}
|
||||
annotTable[row][col] = annotation;
|
||||
}
|
||||
};
|
||||
var onAnnotationChange = function(evt) {
|
||||
var annotations = cvoxAce.editor.getSession().getAnnotations();
|
||||
var newAnnotations = annotations.filter(isNewAnnotation);
|
||||
if (newAnnotations.length > 0) {
|
||||
cvox.Api.playEarcon(ERROR_EARCON);
|
||||
}
|
||||
populateAnnotations(annotations);
|
||||
};
|
||||
var speakAnnot = function(annot) {
|
||||
var annotText = annot.type + ' ' + annot.text + ' on ' +
|
||||
rowColToString(annot.row, annot.column);
|
||||
annotText = annotText.replace(';', 'semicolon');
|
||||
cvox.Api.speak(annotText, 1);
|
||||
};
|
||||
var speakAnnotsByRow = function(row) {
|
||||
var annots = annotTable[row];
|
||||
for (var col in annots) {
|
||||
speakAnnot(annots[col]);
|
||||
}
|
||||
};
|
||||
var rowColToString = function(row, col) {
|
||||
return 'row ' + (row + 1) + ' column ' + (col + 1);
|
||||
};
|
||||
var speakCurrRowAndCol = function() {
|
||||
cvox.Api.speak(rowColToString(lastCursor.row, lastCursor.column));
|
||||
};
|
||||
var speakAllAnnots = function() {
|
||||
for (var row in annotTable) {
|
||||
speakAnnotsByRow(row);
|
||||
}
|
||||
};
|
||||
var speakMode = function() {
|
||||
if (!isVimMode()) {
|
||||
return;
|
||||
}
|
||||
switch (cvoxAce.editor.keyBinding.$data.state) {
|
||||
case INSERT_MODE_STATE:
|
||||
cvox.Api.speak('Insert mode');
|
||||
break;
|
||||
case COMMAND_MODE_STATE:
|
||||
cvox.Api.speak('Command mode');
|
||||
break;
|
||||
}
|
||||
};
|
||||
var toggleSpeakRowLocation = function() {
|
||||
shouldSpeakRowLocation = !shouldSpeakRowLocation;
|
||||
if (shouldSpeakRowLocation) {
|
||||
cvox.Api.speak('Speak location on row change enabled.');
|
||||
} else {
|
||||
cvox.Api.speak('Speak location on row change disabled.');
|
||||
}
|
||||
};
|
||||
var toggleSpeakDisplacement = function() {
|
||||
shouldSpeakDisplacement = !shouldSpeakDisplacement;
|
||||
if (shouldSpeakDisplacement) {
|
||||
cvox.Api.speak('Speak displacement on column changes.');
|
||||
} else {
|
||||
cvox.Api.speak('Speak current character or word on column changes.');
|
||||
}
|
||||
};
|
||||
var onKeyDown = function(evt) {
|
||||
if (evt.ctrlKey && evt.shiftKey) {
|
||||
var shortcut = keyCodeToShortcutMap[evt.keyCode];
|
||||
if (shortcut) {
|
||||
shortcut.func();
|
||||
}
|
||||
}
|
||||
};
|
||||
var onChangeStatus = function(evt, editor) {
|
||||
if (!isVimMode()) {
|
||||
return;
|
||||
}
|
||||
var state = editor.keyBinding.$data.state;
|
||||
if (state === vimState) {
|
||||
return;
|
||||
}
|
||||
switch (state) {
|
||||
case INSERT_MODE_STATE:
|
||||
cvox.Api.playEarcon(MODE_SWITCH_EARCON);
|
||||
cvox.Api.setKeyEcho(true);
|
||||
break;
|
||||
case COMMAND_MODE_STATE:
|
||||
cvox.Api.playEarcon(MODE_SWITCH_EARCON);
|
||||
cvox.Api.setKeyEcho(false);
|
||||
break;
|
||||
}
|
||||
vimState = state;
|
||||
};
|
||||
var contextMenuHandler = function(evt) {
|
||||
var cmd = evt.detail['customCommand'];
|
||||
var shortcut = cmdToShortcutMap[cmd];
|
||||
if (shortcut) {
|
||||
shortcut.func();
|
||||
cvoxAce.editor.focus();
|
||||
}
|
||||
};
|
||||
var initContextMenu = function() {
|
||||
var ACTIONS = SHORTCUTS.map(function(shortcut) {
|
||||
return {
|
||||
desc: shortcut.desc + getKeyShortcutString(shortcut.keyCode),
|
||||
cmd: shortcut.cmd
|
||||
};
|
||||
});
|
||||
var body = document.querySelector('body');
|
||||
body.setAttribute('contextMenuActions', JSON.stringify(ACTIONS));
|
||||
body.addEventListener('ATCustomEvent', contextMenuHandler, true);
|
||||
};
|
||||
var onFindSearchbox = function(evt) {
|
||||
if (evt.match) {
|
||||
speakLine(lastCursor.row, 0);
|
||||
} else {
|
||||
cvox.Api.playEarcon(NO_MATCH_EARCON);
|
||||
}
|
||||
};
|
||||
var focus = function() {
|
||||
cvoxAce.editor.focus();
|
||||
};
|
||||
var SHORTCUTS = [
|
||||
{
|
||||
keyCode: 49,
|
||||
func: function() {
|
||||
speakAnnotsByRow(lastCursor.row);
|
||||
},
|
||||
cmd: Command.SPEAK_ANNOT,
|
||||
desc: 'Speak annotations on line'
|
||||
},
|
||||
{
|
||||
keyCode: 50,
|
||||
func: speakAllAnnots,
|
||||
cmd: Command.SPEAK_ALL_ANNOTS,
|
||||
desc: 'Speak all annotations'
|
||||
},
|
||||
{
|
||||
keyCode: 51,
|
||||
func: speakMode,
|
||||
cmd: Command.SPEAK_MODE,
|
||||
desc: 'Speak Vim mode'
|
||||
},
|
||||
{
|
||||
keyCode: 52,
|
||||
func: toggleSpeakRowLocation,
|
||||
cmd: Command.TOGGLE_LOCATION,
|
||||
desc: 'Toggle speak row location'
|
||||
},
|
||||
{
|
||||
keyCode: 53,
|
||||
func: speakCurrRowAndCol,
|
||||
cmd: Command.SPEAK_ROW_COL,
|
||||
desc: 'Speak row and column'
|
||||
},
|
||||
{
|
||||
keyCode: 54,
|
||||
func: toggleSpeakDisplacement,
|
||||
cmd: Command.TOGGLE_DISPLACEMENT,
|
||||
desc: 'Toggle speak displacement'
|
||||
},
|
||||
{
|
||||
keyCode: 55,
|
||||
func: focus,
|
||||
cmd: Command.FOCUS_TEXT,
|
||||
desc: 'Focus text'
|
||||
}
|
||||
];
|
||||
var onFocus = function(_, editor) {
|
||||
cvoxAce.editor = editor;
|
||||
editor.getSession().selection.on('changeCursor', onCursorChange);
|
||||
editor.getSession().selection.on('changeSelection', onSelectionChange);
|
||||
editor.getSession().on('change', onChange);
|
||||
editor.getSession().on('changeAnnotation', onAnnotationChange);
|
||||
editor.on('changeStatus', onChangeStatus);
|
||||
editor.on('findSearchBox', onFindSearchbox);
|
||||
editor.container.addEventListener('keydown', onKeyDown);
|
||||
|
||||
lastCursor = editor.selection.getCursor();
|
||||
};
|
||||
var init = function(editor) {
|
||||
onFocus(null, editor);
|
||||
SHORTCUTS.forEach(function(shortcut) {
|
||||
keyCodeToShortcutMap[shortcut.keyCode] = shortcut;
|
||||
cmdToShortcutMap[shortcut.cmd] = shortcut;
|
||||
});
|
||||
|
||||
editor.on('focus', onFocus);
|
||||
if (isVimMode()) {
|
||||
cvox.Api.setKeyEcho(false);
|
||||
}
|
||||
initContextMenu();
|
||||
};
|
||||
function cvoxApiExists() {
|
||||
return (typeof(cvox) !== 'undefined') && cvox && cvox.Api;
|
||||
}
|
||||
var tries = 0;
|
||||
var MAX_TRIES = 15;
|
||||
function watchForCvoxLoad(editor) {
|
||||
if (cvoxApiExists()) {
|
||||
init(editor);
|
||||
} else {
|
||||
tries++;
|
||||
if (tries >= MAX_TRIES) {
|
||||
return;
|
||||
}
|
||||
window.setTimeout(watchForCvoxLoad, 500, editor);
|
||||
}
|
||||
}
|
||||
|
||||
var Editor = require('../editor').Editor;
|
||||
require('../config').defineOptions(Editor.prototype, 'editor', {
|
||||
enableChromevoxEnhancements: {
|
||||
set: function(val) {
|
||||
if (val) {
|
||||
watchForCvoxLoad(this);
|
||||
}
|
||||
},
|
||||
value: true // turn it on by default or check for window.cvox
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
(function() {
|
||||
ace.require(["ace/ext/chromevox"], function() {});
|
||||
})();
|
||||
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
|
||||
;
|
||||
(function() {
|
||||
ace.require(["ace/ext/error_marker"], function() {});
|
||||
})();
|
||||
|
||||
|
|
@ -1,502 +0,0 @@
|
|||
ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var dom = require("../lib/dom");
|
||||
var lang = require("../lib/lang");
|
||||
var event = require("../lib/event");
|
||||
var searchboxCss = "\
|
||||
.ace_search {\
|
||||
background-color: #ddd;\
|
||||
border: 1px solid #cbcbcb;\
|
||||
border-top: 0 none;\
|
||||
max-width: 325px;\
|
||||
overflow: hidden;\
|
||||
margin: 0;\
|
||||
padding: 4px;\
|
||||
padding-right: 6px;\
|
||||
padding-bottom: 0;\
|
||||
position: absolute;\
|
||||
top: 0px;\
|
||||
z-index: 99;\
|
||||
white-space: normal;\
|
||||
}\
|
||||
.ace_search.left {\
|
||||
border-left: 0 none;\
|
||||
border-radius: 0px 0px 5px 0px;\
|
||||
left: 0;\
|
||||
}\
|
||||
.ace_search.right {\
|
||||
border-radius: 0px 0px 0px 5px;\
|
||||
border-right: 0 none;\
|
||||
right: 0;\
|
||||
}\
|
||||
.ace_search_form, .ace_replace_form {\
|
||||
border-radius: 3px;\
|
||||
border: 1px solid #cbcbcb;\
|
||||
float: left;\
|
||||
margin-bottom: 4px;\
|
||||
overflow: hidden;\
|
||||
}\
|
||||
.ace_search_form.ace_nomatch {\
|
||||
outline: 1px solid red;\
|
||||
}\
|
||||
.ace_search_field {\
|
||||
background-color: white;\
|
||||
color: black;\
|
||||
border-right: 1px solid #cbcbcb;\
|
||||
border: 0 none;\
|
||||
-webkit-box-sizing: border-box;\
|
||||
-moz-box-sizing: border-box;\
|
||||
box-sizing: border-box;\
|
||||
float: left;\
|
||||
height: 22px;\
|
||||
outline: 0;\
|
||||
padding: 0 7px;\
|
||||
width: 214px;\
|
||||
margin: 0;\
|
||||
}\
|
||||
.ace_searchbtn,\
|
||||
.ace_replacebtn {\
|
||||
background: #fff;\
|
||||
border: 0 none;\
|
||||
border-left: 1px solid #dcdcdc;\
|
||||
cursor: pointer;\
|
||||
float: left;\
|
||||
height: 22px;\
|
||||
margin: 0;\
|
||||
position: relative;\
|
||||
}\
|
||||
.ace_searchbtn:last-child,\
|
||||
.ace_replacebtn:last-child {\
|
||||
border-top-right-radius: 3px;\
|
||||
border-bottom-right-radius: 3px;\
|
||||
}\
|
||||
.ace_searchbtn:disabled {\
|
||||
background: none;\
|
||||
cursor: default;\
|
||||
}\
|
||||
.ace_searchbtn {\
|
||||
background-position: 50% 50%;\
|
||||
background-repeat: no-repeat;\
|
||||
width: 27px;\
|
||||
}\
|
||||
.ace_searchbtn.prev {\
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); \
|
||||
}\
|
||||
.ace_searchbtn.next {\
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); \
|
||||
}\
|
||||
.ace_searchbtn_close {\
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\
|
||||
border-radius: 50%;\
|
||||
border: 0 none;\
|
||||
color: #656565;\
|
||||
cursor: pointer;\
|
||||
float: right;\
|
||||
font: 16px/16px Arial;\
|
||||
height: 14px;\
|
||||
margin: 5px 1px 9px 5px;\
|
||||
padding: 0;\
|
||||
text-align: center;\
|
||||
width: 14px;\
|
||||
}\
|
||||
.ace_searchbtn_close:hover {\
|
||||
background-color: #656565;\
|
||||
background-position: 50% 100%;\
|
||||
color: white;\
|
||||
}\
|
||||
.ace_replacebtn.prev {\
|
||||
width: 54px\
|
||||
}\
|
||||
.ace_replacebtn.next {\
|
||||
width: 27px\
|
||||
}\
|
||||
.ace_button {\
|
||||
margin-left: 2px;\
|
||||
cursor: pointer;\
|
||||
-webkit-user-select: none;\
|
||||
-moz-user-select: none;\
|
||||
-o-user-select: none;\
|
||||
-ms-user-select: none;\
|
||||
user-select: none;\
|
||||
overflow: hidden;\
|
||||
opacity: 0.7;\
|
||||
border: 1px solid rgba(100,100,100,0.23);\
|
||||
padding: 1px;\
|
||||
-moz-box-sizing: border-box;\
|
||||
box-sizing: border-box;\
|
||||
color: black;\
|
||||
}\
|
||||
.ace_button:hover {\
|
||||
background-color: #eee;\
|
||||
opacity:1;\
|
||||
}\
|
||||
.ace_button:active {\
|
||||
background-color: #ddd;\
|
||||
}\
|
||||
.ace_button.checked {\
|
||||
border-color: #3399ff;\
|
||||
opacity:1;\
|
||||
}\
|
||||
.ace_search_options{\
|
||||
margin-bottom: 3px;\
|
||||
text-align: right;\
|
||||
-webkit-user-select: none;\
|
||||
-moz-user-select: none;\
|
||||
-o-user-select: none;\
|
||||
-ms-user-select: none;\
|
||||
user-select: none;\
|
||||
}";
|
||||
var HashHandler = require("../keyboard/hash_handler").HashHandler;
|
||||
var keyUtil = require("../lib/keys");
|
||||
|
||||
dom.importCssString(searchboxCss, "ace_searchbox");
|
||||
|
||||
var html = '<div class="ace_search right">\
|
||||
<button type="button" action="hide" class="ace_searchbtn_close"></button>\
|
||||
<div class="ace_search_form">\
|
||||
<input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>\
|
||||
<button type="button" action="findNext" class="ace_searchbtn next"></button>\
|
||||
<button type="button" action="findPrev" class="ace_searchbtn prev"></button>\
|
||||
<button type="button" action="findAll" class="ace_searchbtn" title="Alt-Enter">All</button>\
|
||||
</div>\
|
||||
<div class="ace_replace_form">\
|
||||
<input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>\
|
||||
<button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>\
|
||||
<button type="button" action="replaceAll" class="ace_replacebtn">All</button>\
|
||||
</div>\
|
||||
<div class="ace_search_options">\
|
||||
<span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>\
|
||||
<span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>\
|
||||
<span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>\
|
||||
</div>\
|
||||
</div>'.replace(/>\s+/g, ">");
|
||||
|
||||
var SearchBox = function(editor, range, showReplaceForm) {
|
||||
var div = dom.createElement("div");
|
||||
div.innerHTML = html;
|
||||
this.element = div.firstChild;
|
||||
|
||||
this.$init();
|
||||
this.setEditor(editor);
|
||||
};
|
||||
|
||||
(function() {
|
||||
this.setEditor = function(editor) {
|
||||
editor.searchBox = this;
|
||||
editor.container.appendChild(this.element);
|
||||
this.editor = editor;
|
||||
};
|
||||
|
||||
this.$initElements = function(sb) {
|
||||
this.searchBox = sb.querySelector(".ace_search_form");
|
||||
this.replaceBox = sb.querySelector(".ace_replace_form");
|
||||
this.searchOptions = sb.querySelector(".ace_search_options");
|
||||
this.regExpOption = sb.querySelector("[action=toggleRegexpMode]");
|
||||
this.caseSensitiveOption = sb.querySelector("[action=toggleCaseSensitive]");
|
||||
this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]");
|
||||
this.searchInput = this.searchBox.querySelector(".ace_search_field");
|
||||
this.replaceInput = this.replaceBox.querySelector(".ace_search_field");
|
||||
};
|
||||
|
||||
this.$init = function() {
|
||||
var sb = this.element;
|
||||
|
||||
this.$initElements(sb);
|
||||
|
||||
var _this = this;
|
||||
event.addListener(sb, "mousedown", function(e) {
|
||||
setTimeout(function(){
|
||||
_this.activeInput.focus();
|
||||
}, 0);
|
||||
event.stopPropagation(e);
|
||||
});
|
||||
event.addListener(sb, "click", function(e) {
|
||||
var t = e.target || e.srcElement;
|
||||
var action = t.getAttribute("action");
|
||||
if (action && _this[action])
|
||||
_this[action]();
|
||||
else if (_this.$searchBarKb.commands[action])
|
||||
_this.$searchBarKb.commands[action].exec(_this);
|
||||
event.stopPropagation(e);
|
||||
});
|
||||
|
||||
event.addCommandKeyListener(sb, function(e, hashId, keyCode) {
|
||||
var keyString = keyUtil.keyCodeToString(keyCode);
|
||||
var command = _this.$searchBarKb.findKeyCommand(hashId, keyString);
|
||||
if (command && command.exec) {
|
||||
command.exec(_this);
|
||||
event.stopEvent(e);
|
||||
}
|
||||
});
|
||||
|
||||
this.$onChange = lang.delayedCall(function() {
|
||||
_this.find(false, false);
|
||||
});
|
||||
|
||||
event.addListener(this.searchInput, "input", function() {
|
||||
_this.$onChange.schedule(20);
|
||||
});
|
||||
event.addListener(this.searchInput, "focus", function() {
|
||||
_this.activeInput = _this.searchInput;
|
||||
_this.searchInput.value && _this.highlight();
|
||||
});
|
||||
event.addListener(this.replaceInput, "focus", function() {
|
||||
_this.activeInput = _this.replaceInput;
|
||||
_this.searchInput.value && _this.highlight();
|
||||
});
|
||||
};
|
||||
this.$closeSearchBarKb = new HashHandler([{
|
||||
bindKey: "Esc",
|
||||
name: "closeSearchBar",
|
||||
exec: function(editor) {
|
||||
editor.searchBox.hide();
|
||||
}
|
||||
}]);
|
||||
this.$searchBarKb = new HashHandler();
|
||||
this.$searchBarKb.bindKeys({
|
||||
"Ctrl-f|Command-f": function(sb) {
|
||||
var isReplace = sb.isReplace = !sb.isReplace;
|
||||
sb.replaceBox.style.display = isReplace ? "" : "none";
|
||||
sb.searchInput.focus();
|
||||
},
|
||||
"Ctrl-H|Command-Option-F": function(sb) {
|
||||
sb.replaceBox.style.display = "";
|
||||
sb.replaceInput.focus();
|
||||
},
|
||||
"Ctrl-G|Command-G": function(sb) {
|
||||
sb.findNext();
|
||||
},
|
||||
"Ctrl-Shift-G|Command-Shift-G": function(sb) {
|
||||
sb.findPrev();
|
||||
},
|
||||
"esc": function(sb) {
|
||||
setTimeout(function() { sb.hide();});
|
||||
},
|
||||
"Return": function(sb) {
|
||||
if (sb.activeInput == sb.replaceInput)
|
||||
sb.replace();
|
||||
sb.findNext();
|
||||
},
|
||||
"Shift-Return": function(sb) {
|
||||
if (sb.activeInput == sb.replaceInput)
|
||||
sb.replace();
|
||||
sb.findPrev();
|
||||
},
|
||||
"Alt-Return": function(sb) {
|
||||
if (sb.activeInput == sb.replaceInput)
|
||||
sb.replaceAll();
|
||||
sb.findAll();
|
||||
},
|
||||
"Tab": function(sb) {
|
||||
(sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus();
|
||||
}
|
||||
});
|
||||
|
||||
this.$searchBarKb.addCommands([{
|
||||
name: "toggleRegexpMode",
|
||||
bindKey: {win: "Alt-R|Alt-/", mac: "Ctrl-Alt-R|Ctrl-Alt-/"},
|
||||
exec: function(sb) {
|
||||
sb.regExpOption.checked = !sb.regExpOption.checked;
|
||||
sb.$syncOptions();
|
||||
}
|
||||
}, {
|
||||
name: "toggleCaseSensitive",
|
||||
bindKey: {win: "Alt-C|Alt-I", mac: "Ctrl-Alt-R|Ctrl-Alt-I"},
|
||||
exec: function(sb) {
|
||||
sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked;
|
||||
sb.$syncOptions();
|
||||
}
|
||||
}, {
|
||||
name: "toggleWholeWords",
|
||||
bindKey: {win: "Alt-B|Alt-W", mac: "Ctrl-Alt-B|Ctrl-Alt-W"},
|
||||
exec: function(sb) {
|
||||
sb.wholeWordOption.checked = !sb.wholeWordOption.checked;
|
||||
sb.$syncOptions();
|
||||
}
|
||||
}]);
|
||||
|
||||
this.$syncOptions = function() {
|
||||
dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked);
|
||||
dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked);
|
||||
dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked);
|
||||
this.find(false, false);
|
||||
};
|
||||
|
||||
this.highlight = function(re) {
|
||||
this.editor.session.highlight(re || this.editor.$search.$options.re);
|
||||
this.editor.renderer.updateBackMarkers()
|
||||
};
|
||||
this.find = function(skipCurrent, backwards, preventScroll) {
|
||||
var range = this.editor.find(this.searchInput.value, {
|
||||
skipCurrent: skipCurrent,
|
||||
backwards: backwards,
|
||||
wrap: true,
|
||||
regExp: this.regExpOption.checked,
|
||||
caseSensitive: this.caseSensitiveOption.checked,
|
||||
wholeWord: this.wholeWordOption.checked,
|
||||
preventScroll: preventScroll
|
||||
});
|
||||
var noMatch = !range && this.searchInput.value;
|
||||
dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
|
||||
this.editor._emit("findSearchBox", { match: !noMatch });
|
||||
this.highlight();
|
||||
};
|
||||
this.findNext = function() {
|
||||
this.find(true, false);
|
||||
};
|
||||
this.findPrev = function() {
|
||||
this.find(true, true);
|
||||
};
|
||||
this.findAll = function(){
|
||||
var range = this.editor.findAll(this.searchInput.value, {
|
||||
regExp: this.regExpOption.checked,
|
||||
caseSensitive: this.caseSensitiveOption.checked,
|
||||
wholeWord: this.wholeWordOption.checked
|
||||
});
|
||||
var noMatch = !range && this.searchInput.value;
|
||||
dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
|
||||
this.editor._emit("findSearchBox", { match: !noMatch });
|
||||
this.highlight();
|
||||
this.hide();
|
||||
};
|
||||
this.replace = function() {
|
||||
if (!this.editor.getReadOnly())
|
||||
this.editor.replace(this.replaceInput.value);
|
||||
};
|
||||
this.replaceAndFindNext = function() {
|
||||
if (!this.editor.getReadOnly()) {
|
||||
this.editor.replace(this.replaceInput.value);
|
||||
this.findNext()
|
||||
}
|
||||
};
|
||||
this.replaceAll = function() {
|
||||
if (!this.editor.getReadOnly())
|
||||
this.editor.replaceAll(this.replaceInput.value);
|
||||
};
|
||||
|
||||
this.hide = function() {
|
||||
this.element.style.display = "none";
|
||||
this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb);
|
||||
this.editor.focus();
|
||||
};
|
||||
this.show = function(value, isReplace) {
|
||||
this.element.style.display = "";
|
||||
this.replaceBox.style.display = isReplace ? "" : "none";
|
||||
|
||||
this.isReplace = isReplace;
|
||||
|
||||
if (value)
|
||||
this.searchInput.value = value;
|
||||
|
||||
this.find(false, false, true);
|
||||
|
||||
this.searchInput.focus();
|
||||
this.searchInput.select();
|
||||
|
||||
this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb);
|
||||
};
|
||||
|
||||
this.isFocused = function() {
|
||||
var el = document.activeElement;
|
||||
return el == this.searchInput || el == this.replaceInput;
|
||||
}
|
||||
}).call(SearchBox.prototype);
|
||||
|
||||
exports.SearchBox = SearchBox;
|
||||
|
||||
exports.Search = function(editor, isReplace) {
|
||||
var sb = editor.searchBox || new SearchBox(editor);
|
||||
sb.show(editor.session.getTextRange(), isReplace);
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/ext/old_ie",["require","exports","module","ace/lib/useragent","ace/tokenizer","ace/ext/searchbox","ace/mode/text"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var MAX_TOKEN_COUNT = 1000;
|
||||
var useragent = require("../lib/useragent");
|
||||
var TokenizerModule = require("../tokenizer");
|
||||
|
||||
function patch(obj, name, regexp, replacement) {
|
||||
eval("obj['" + name + "']=" + obj[name].toString().replace(
|
||||
regexp, replacement
|
||||
));
|
||||
}
|
||||
|
||||
if (useragent.isIE && useragent.isIE < 10 && window.top.document.compatMode === "BackCompat")
|
||||
useragent.isOldIE = true;
|
||||
|
||||
if (typeof document != "undefined" && !document.documentElement.querySelector) {
|
||||
useragent.isOldIE = true;
|
||||
var qs = function(el, selector) {
|
||||
if (selector.charAt(0) == ".") {
|
||||
var classNeme = selector.slice(1);
|
||||
} else {
|
||||
var m = selector.match(/(\w+)=(\w+)/);
|
||||
var attr = m && m[1];
|
||||
var attrVal = m && m[2];
|
||||
}
|
||||
for (var i = 0; i < el.all.length; i++) {
|
||||
var ch = el.all[i];
|
||||
if (classNeme) {
|
||||
if (ch.className.indexOf(classNeme) != -1)
|
||||
return ch;
|
||||
} else if (attr) {
|
||||
if (ch.getAttribute(attr) == attrVal)
|
||||
return ch;
|
||||
}
|
||||
}
|
||||
};
|
||||
var sb = require("./searchbox").SearchBox.prototype;
|
||||
patch(
|
||||
sb, "$initElements",
|
||||
/([^\s=]*).querySelector\((".*?")\)/g,
|
||||
"qs($1, $2)"
|
||||
);
|
||||
}
|
||||
|
||||
var compliantExecNpcg = /()??/.exec("")[1] === undefined;
|
||||
if (compliantExecNpcg)
|
||||
return;
|
||||
var proto = TokenizerModule.Tokenizer.prototype;
|
||||
TokenizerModule.Tokenizer_orig = TokenizerModule.Tokenizer;
|
||||
proto.getLineTokens_orig = proto.getLineTokens;
|
||||
|
||||
patch(
|
||||
TokenizerModule, "Tokenizer",
|
||||
"ruleRegExps.push(adjustedregex);\n",
|
||||
function(m) {
|
||||
return m + '\
|
||||
if (state[i].next && RegExp(adjustedregex).test(""))\n\
|
||||
rule._qre = RegExp(adjustedregex, "g");\n\
|
||||
';
|
||||
}
|
||||
);
|
||||
TokenizerModule.Tokenizer.prototype = proto;
|
||||
patch(
|
||||
proto, "getLineTokens",
|
||||
/if \(match\[i \+ 1\] === undefined\)\s*continue;/,
|
||||
"if (!match[i + 1]) {\n\
|
||||
if (value)continue;\n\
|
||||
var qre = state[mapping[i]]._qre;\n\
|
||||
if (!qre) continue;\n\
|
||||
qre.lastIndex = lastIndex;\n\
|
||||
if (!qre.exec(line) || qre.lastIndex != lastIndex)\n\
|
||||
continue;\n\
|
||||
}"
|
||||
);
|
||||
|
||||
patch(
|
||||
require("../mode/text").Mode.prototype, "getTokenizer",
|
||||
/Tokenizer/,
|
||||
"TokenizerModule.Tokenizer"
|
||||
);
|
||||
|
||||
useragent.isOldIE = true;
|
||||
|
||||
});
|
||||
(function() {
|
||||
ace.require(["ace/ext/old_ie"], function() {});
|
||||
})();
|
||||
|
||||
|
|
@ -1,663 +0,0 @@
|
|||
ace.define("ace/ext/menu_tools/element_generator",["require","exports","module"], function(require, exports, module) {
|
||||
'use strict';
|
||||
module.exports.createOption = function createOption (obj) {
|
||||
var attribute;
|
||||
var el = document.createElement('option');
|
||||
for(attribute in obj) {
|
||||
if(obj.hasOwnProperty(attribute)) {
|
||||
if(attribute === 'selected') {
|
||||
el.setAttribute(attribute, obj[attribute]);
|
||||
} else {
|
||||
el[attribute] = obj[attribute];
|
||||
}
|
||||
}
|
||||
}
|
||||
return el;
|
||||
};
|
||||
module.exports.createCheckbox = function createCheckbox (id, checked, clss) {
|
||||
var el = document.createElement('input');
|
||||
el.setAttribute('type', 'checkbox');
|
||||
el.setAttribute('id', id);
|
||||
el.setAttribute('name', id);
|
||||
el.setAttribute('value', checked);
|
||||
el.setAttribute('class', clss);
|
||||
if(checked) {
|
||||
el.setAttribute('checked', 'checked');
|
||||
}
|
||||
return el;
|
||||
};
|
||||
module.exports.createInput = function createInput (id, value, clss) {
|
||||
var el = document.createElement('input');
|
||||
el.setAttribute('type', 'text');
|
||||
el.setAttribute('id', id);
|
||||
el.setAttribute('name', id);
|
||||
el.setAttribute('value', value);
|
||||
el.setAttribute('class', clss);
|
||||
return el;
|
||||
};
|
||||
module.exports.createLabel = function createLabel (text, labelFor) {
|
||||
var el = document.createElement('label');
|
||||
el.setAttribute('for', labelFor);
|
||||
el.textContent = text;
|
||||
return el;
|
||||
};
|
||||
module.exports.createSelection = function createSelection (id, values, clss) {
|
||||
var el = document.createElement('select');
|
||||
el.setAttribute('id', id);
|
||||
el.setAttribute('name', id);
|
||||
el.setAttribute('class', clss);
|
||||
values.forEach(function(item) {
|
||||
el.appendChild(module.exports.createOption(item));
|
||||
});
|
||||
return el;
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var modes = [];
|
||||
function getModeForPath(path) {
|
||||
var mode = modesByName.text;
|
||||
var fileName = path.split(/[\/\\]/).pop();
|
||||
for (var i = 0; i < modes.length; i++) {
|
||||
if (modes[i].supportsFile(fileName)) {
|
||||
mode = modes[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return mode;
|
||||
}
|
||||
|
||||
var Mode = function(name, caption, extensions) {
|
||||
this.name = name;
|
||||
this.caption = caption;
|
||||
this.mode = "ace/mode/" + name;
|
||||
this.extensions = extensions;
|
||||
var re;
|
||||
if (/\^/.test(extensions)) {
|
||||
re = extensions.replace(/\|(\^)?/g, function(a, b){
|
||||
return "$|" + (b ? "^" : "^.*\\.");
|
||||
}) + "$";
|
||||
} else {
|
||||
re = "^.*\\.(" + extensions + ")$";
|
||||
}
|
||||
|
||||
this.extRe = new RegExp(re, "gi");
|
||||
};
|
||||
|
||||
Mode.prototype.supportsFile = function(filename) {
|
||||
return filename.match(this.extRe);
|
||||
};
|
||||
var supportedModes = {
|
||||
ABAP: ["abap"],
|
||||
ABC: ["abc"],
|
||||
ActionScript:["as"],
|
||||
ADA: ["ada|adb"],
|
||||
Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],
|
||||
AsciiDoc: ["asciidoc|adoc"],
|
||||
Assembly_x86:["asm|a"],
|
||||
AutoHotKey: ["ahk"],
|
||||
BatchFile: ["bat|cmd"],
|
||||
Bro: ["bro"],
|
||||
C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"],
|
||||
C9Search: ["c9search_results"],
|
||||
Cirru: ["cirru|cr"],
|
||||
Clojure: ["clj|cljs"],
|
||||
Cobol: ["CBL|COB"],
|
||||
coffee: ["coffee|cf|cson|^Cakefile"],
|
||||
ColdFusion: ["cfm"],
|
||||
CSharp: ["cs"],
|
||||
CSS: ["css"],
|
||||
Curly: ["curly"],
|
||||
D: ["d|di"],
|
||||
Dart: ["dart"],
|
||||
Diff: ["diff|patch"],
|
||||
Dockerfile: ["^Dockerfile"],
|
||||
Dot: ["dot"],
|
||||
Drools: ["drl"],
|
||||
Dummy: ["dummy"],
|
||||
DummySyntax: ["dummy"],
|
||||
Eiffel: ["e|ge"],
|
||||
EJS: ["ejs"],
|
||||
Elixir: ["ex|exs"],
|
||||
Elm: ["elm"],
|
||||
Erlang: ["erl|hrl"],
|
||||
Forth: ["frt|fs|ldr|fth|4th"],
|
||||
Fortran: ["f|f90"],
|
||||
FTL: ["ftl"],
|
||||
Gcode: ["gcode"],
|
||||
Gherkin: ["feature"],
|
||||
Gitignore: ["^.gitignore"],
|
||||
Glsl: ["glsl|frag|vert"],
|
||||
Gobstones: ["gbs"],
|
||||
golang: ["go"],
|
||||
GraphQLSchema: ["gql"],
|
||||
Groovy: ["groovy"],
|
||||
HAML: ["haml"],
|
||||
Handlebars: ["hbs|handlebars|tpl|mustache"],
|
||||
Haskell: ["hs"],
|
||||
Haskell_Cabal: ["cabal"],
|
||||
haXe: ["hx"],
|
||||
Hjson: ["hjson"],
|
||||
HTML: ["html|htm|xhtml"],
|
||||
HTML_Elixir: ["eex|html.eex"],
|
||||
HTML_Ruby: ["erb|rhtml|html.erb"],
|
||||
INI: ["ini|conf|cfg|prefs"],
|
||||
Io: ["io"],
|
||||
Jack: ["jack"],
|
||||
Jade: ["jade|pug"],
|
||||
Java: ["java"],
|
||||
JavaScript: ["js|jsm|jsx"],
|
||||
JSON: ["json"],
|
||||
JSONiq: ["jq"],
|
||||
JSP: ["jsp"],
|
||||
JSX: ["jsx"],
|
||||
Julia: ["jl"],
|
||||
Kotlin: ["kt|kts"],
|
||||
LaTeX: ["tex|latex|ltx|bib"],
|
||||
LESS: ["less"],
|
||||
Liquid: ["liquid"],
|
||||
Lisp: ["lisp"],
|
||||
LiveScript: ["ls"],
|
||||
LogiQL: ["logic|lql"],
|
||||
LSL: ["lsl"],
|
||||
Lua: ["lua"],
|
||||
LuaPage: ["lp"],
|
||||
Lucene: ["lucene"],
|
||||
Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],
|
||||
Markdown: ["md|markdown"],
|
||||
Mask: ["mask"],
|
||||
MATLAB: ["matlab"],
|
||||
Maze: ["mz"],
|
||||
MEL: ["mel"],
|
||||
MUSHCode: ["mc|mush"],
|
||||
MySQL: ["mysql"],
|
||||
Nix: ["nix"],
|
||||
NSIS: ["nsi|nsh"],
|
||||
ObjectiveC: ["m|mm"],
|
||||
OCaml: ["ml|mli"],
|
||||
Pascal: ["pas|p"],
|
||||
Perl: ["pl|pm"],
|
||||
pgSQL: ["pgsql"],
|
||||
PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
|
||||
Pig: ["pig"],
|
||||
Powershell: ["ps1"],
|
||||
Praat: ["praat|praatscript|psc|proc"],
|
||||
Prolog: ["plg|prolog"],
|
||||
Properties: ["properties"],
|
||||
Protobuf: ["proto"],
|
||||
Python: ["py"],
|
||||
R: ["r"],
|
||||
Razor: ["cshtml|asp"],
|
||||
RDoc: ["Rd"],
|
||||
RHTML: ["Rhtml"],
|
||||
RST: ["rst"],
|
||||
Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],
|
||||
Rust: ["rs"],
|
||||
SASS: ["sass"],
|
||||
SCAD: ["scad"],
|
||||
Scala: ["scala"],
|
||||
Scheme: ["scm|sm|rkt|oak|scheme"],
|
||||
SCSS: ["scss"],
|
||||
SH: ["sh|bash|^.bashrc"],
|
||||
SJS: ["sjs"],
|
||||
Smarty: ["smarty|tpl"],
|
||||
snippets: ["snippets"],
|
||||
Soy_Template:["soy"],
|
||||
Space: ["space"],
|
||||
SQL: ["sql"],
|
||||
SQLServer: ["sqlserver"],
|
||||
Stylus: ["styl|stylus"],
|
||||
SVG: ["svg"],
|
||||
Swift: ["swift"],
|
||||
Tcl: ["tcl"],
|
||||
Tex: ["tex"],
|
||||
Text: ["txt"],
|
||||
Textile: ["textile"],
|
||||
Toml: ["toml"],
|
||||
TSX: ["tsx"],
|
||||
Twig: ["twig|swig"],
|
||||
Typescript: ["ts|typescript|str"],
|
||||
Vala: ["vala"],
|
||||
VBScript: ["vbs|vb"],
|
||||
Velocity: ["vm"],
|
||||
Verilog: ["v|vh|sv|svh"],
|
||||
VHDL: ["vhd|vhdl"],
|
||||
Wollok: ["wlk|wpgm|wtest"],
|
||||
XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],
|
||||
XQuery: ["xq"],
|
||||
YAML: ["yaml|yml"],
|
||||
Django: ["html"]
|
||||
};
|
||||
|
||||
var nameOverrides = {
|
||||
ObjectiveC: "Objective-C",
|
||||
CSharp: "C#",
|
||||
golang: "Go",
|
||||
C_Cpp: "C and C++",
|
||||
coffee: "CoffeeScript",
|
||||
HTML_Ruby: "HTML (Ruby)",
|
||||
HTML_Elixir: "HTML (Elixir)",
|
||||
FTL: "FreeMarker"
|
||||
};
|
||||
var modesByName = {};
|
||||
for (var name in supportedModes) {
|
||||
var data = supportedModes[name];
|
||||
var displayName = (nameOverrides[name] || name).replace(/_/g, " ");
|
||||
var filename = name.toLowerCase();
|
||||
var mode = new Mode(filename, displayName, data[0]);
|
||||
modesByName[filename] = mode;
|
||||
modes.push(mode);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getModeForPath: getModeForPath,
|
||||
modes: modes,
|
||||
modesByName: modesByName
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"], function(require, exports, module) {
|
||||
"use strict";
|
||||
require("ace/lib/fixoldbrowsers");
|
||||
|
||||
var themeData = [
|
||||
["Chrome" ],
|
||||
["Clouds" ],
|
||||
["Crimson Editor" ],
|
||||
["Dawn" ],
|
||||
["Dreamweaver" ],
|
||||
["Eclipse" ],
|
||||
["GitHub" ],
|
||||
["IPlastic" ],
|
||||
["Solarized Light"],
|
||||
["TextMate" ],
|
||||
["Tomorrow" ],
|
||||
["XCode" ],
|
||||
["Kuroir"],
|
||||
["KatzenMilch"],
|
||||
["SQL Server" ,"sqlserver" , "light"],
|
||||
["Ambiance" ,"ambiance" , "dark"],
|
||||
["Chaos" ,"chaos" , "dark"],
|
||||
["Clouds Midnight" ,"clouds_midnight" , "dark"],
|
||||
["Cobalt" ,"cobalt" , "dark"],
|
||||
["Gruvbox" ,"gruvbox" , "dark"],
|
||||
["Green on Black" ,"gob" , "dark"],
|
||||
["idle Fingers" ,"idle_fingers" , "dark"],
|
||||
["krTheme" ,"kr_theme" , "dark"],
|
||||
["Merbivore" ,"merbivore" , "dark"],
|
||||
["Merbivore Soft" ,"merbivore_soft" , "dark"],
|
||||
["Mono Industrial" ,"mono_industrial" , "dark"],
|
||||
["Monokai" ,"monokai" , "dark"],
|
||||
["Pastel on dark" ,"pastel_on_dark" , "dark"],
|
||||
["Solarized Dark" ,"solarized_dark" , "dark"],
|
||||
["Terminal" ,"terminal" , "dark"],
|
||||
["Tomorrow Night" ,"tomorrow_night" , "dark"],
|
||||
["Tomorrow Night Blue" ,"tomorrow_night_blue" , "dark"],
|
||||
["Tomorrow Night Bright","tomorrow_night_bright" , "dark"],
|
||||
["Tomorrow Night 80s" ,"tomorrow_night_eighties" , "dark"],
|
||||
["Twilight" ,"twilight" , "dark"],
|
||||
["Vibrant Ink" ,"vibrant_ink" , "dark"]
|
||||
];
|
||||
|
||||
|
||||
exports.themesByName = {};
|
||||
exports.themes = themeData.map(function(data) {
|
||||
var name = data[1] || data[0].replace(/ /g, "_").toLowerCase();
|
||||
var theme = {
|
||||
caption: data[0],
|
||||
theme: "ace/theme/" + name,
|
||||
isDark: data[2] == "dark",
|
||||
name: name
|
||||
};
|
||||
exports.themesByName[name] = theme;
|
||||
return theme;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/ext/menu_tools/add_editor_menu_options",["require","exports","module","ace/ext/modelist","ace/ext/themelist"], function(require, exports, module) {
|
||||
'use strict';
|
||||
module.exports.addEditorMenuOptions = function addEditorMenuOptions (editor) {
|
||||
var modelist = require('../modelist');
|
||||
var themelist = require('../themelist');
|
||||
editor.menuOptions = {
|
||||
setNewLineMode: [{
|
||||
textContent: "unix",
|
||||
value: "unix"
|
||||
}, {
|
||||
textContent: "windows",
|
||||
value: "windows"
|
||||
}, {
|
||||
textContent: "auto",
|
||||
value: "auto"
|
||||
}],
|
||||
setTheme: [],
|
||||
setMode: [],
|
||||
setKeyboardHandler: [{
|
||||
textContent: "ace",
|
||||
value: ""
|
||||
}, {
|
||||
textContent: "vim",
|
||||
value: "ace/keyboard/vim"
|
||||
}, {
|
||||
textContent: "emacs",
|
||||
value: "ace/keyboard/emacs"
|
||||
}, {
|
||||
textContent: "textarea",
|
||||
value: "ace/keyboard/textarea"
|
||||
}, {
|
||||
textContent: "sublime",
|
||||
value: "ace/keyboard/sublime"
|
||||
}]
|
||||
};
|
||||
|
||||
editor.menuOptions.setTheme = themelist.themes.map(function(theme) {
|
||||
return {
|
||||
textContent: theme.caption,
|
||||
value: theme.theme
|
||||
};
|
||||
});
|
||||
|
||||
editor.menuOptions.setMode = modelist.modes.map(function(mode) {
|
||||
return {
|
||||
textContent: mode.name,
|
||||
value: mode.mode
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/ext/menu_tools/get_set_functions",["require","exports","module"], function(require, exports, module) {
|
||||
'use strict';
|
||||
module.exports.getSetFunctions = function getSetFunctions (editor) {
|
||||
var out = [];
|
||||
var my = {
|
||||
'editor' : editor,
|
||||
'session' : editor.session,
|
||||
'renderer' : editor.renderer
|
||||
};
|
||||
var opts = [];
|
||||
var skip = [
|
||||
'setOption',
|
||||
'setUndoManager',
|
||||
'setDocument',
|
||||
'setValue',
|
||||
'setBreakpoints',
|
||||
'setScrollTop',
|
||||
'setScrollLeft',
|
||||
'setSelectionStyle',
|
||||
'setWrapLimitRange'
|
||||
];
|
||||
['renderer', 'session', 'editor'].forEach(function(esra) {
|
||||
var esr = my[esra];
|
||||
var clss = esra;
|
||||
for(var fn in esr) {
|
||||
if(skip.indexOf(fn) === -1) {
|
||||
if(/^set/.test(fn) && opts.indexOf(fn) === -1) {
|
||||
opts.push(fn);
|
||||
out.push({
|
||||
'functionName' : fn,
|
||||
'parentObj' : esr,
|
||||
'parentName' : clss
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return out;
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/ext/menu_tools/generate_settings_menu",["require","exports","module","ace/ext/menu_tools/element_generator","ace/ext/menu_tools/add_editor_menu_options","ace/ext/menu_tools/get_set_functions","ace/ace"], function(require, exports, module) {
|
||||
'use strict';
|
||||
var egen = require('./element_generator');
|
||||
var addEditorMenuOptions = require('./add_editor_menu_options').addEditorMenuOptions;
|
||||
var getSetFunctions = require('./get_set_functions').getSetFunctions;
|
||||
module.exports.generateSettingsMenu = function generateSettingsMenu (editor) {
|
||||
var elements = [];
|
||||
function cleanupElementsList() {
|
||||
elements.sort(function(a, b) {
|
||||
var x = a.getAttribute('contains');
|
||||
var y = b.getAttribute('contains');
|
||||
return x.localeCompare(y);
|
||||
});
|
||||
}
|
||||
function wrapElements() {
|
||||
var topmenu = document.createElement('div');
|
||||
topmenu.setAttribute('id', 'ace_settingsmenu');
|
||||
elements.forEach(function(element) {
|
||||
topmenu.appendChild(element);
|
||||
});
|
||||
|
||||
var el = topmenu.appendChild(document.createElement('div'));
|
||||
var version = require("../../ace").version;
|
||||
el.style.padding = "1em";
|
||||
el.textContent = "Ace version " + version;
|
||||
|
||||
return topmenu;
|
||||
}
|
||||
function createNewEntry(obj, clss, item, val) {
|
||||
var el;
|
||||
var div = document.createElement('div');
|
||||
div.setAttribute('contains', item);
|
||||
div.setAttribute('class', 'ace_optionsMenuEntry');
|
||||
div.setAttribute('style', 'clear: both;');
|
||||
|
||||
div.appendChild(egen.createLabel(
|
||||
item.replace(/^set/, '').replace(/([A-Z])/g, ' $1').trim(),
|
||||
item
|
||||
));
|
||||
|
||||
if (Array.isArray(val)) {
|
||||
el = egen.createSelection(item, val, clss);
|
||||
el.addEventListener('change', function(e) {
|
||||
try{
|
||||
editor.menuOptions[e.target.id].forEach(function(x) {
|
||||
if(x.textContent !== e.target.textContent) {
|
||||
delete x.selected;
|
||||
}
|
||||
});
|
||||
obj[e.target.id](e.target.value);
|
||||
} catch (err) {
|
||||
throw new Error(err);
|
||||
}
|
||||
});
|
||||
} else if(typeof val === 'boolean') {
|
||||
el = egen.createCheckbox(item, val, clss);
|
||||
el.addEventListener('change', function(e) {
|
||||
try{
|
||||
obj[e.target.id](!!e.target.checked);
|
||||
} catch (err) {
|
||||
throw new Error(err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
el = egen.createInput(item, val, clss);
|
||||
el.addEventListener('change', function(e) {
|
||||
try{
|
||||
if(e.target.value === 'true') {
|
||||
obj[e.target.id](true);
|
||||
} else if(e.target.value === 'false') {
|
||||
obj[e.target.id](false);
|
||||
} else {
|
||||
obj[e.target.id](e.target.value);
|
||||
}
|
||||
} catch (err) {
|
||||
throw new Error(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
el.style.cssText = 'float:right;';
|
||||
div.appendChild(el);
|
||||
return div;
|
||||
}
|
||||
function makeDropdown(item, esr, clss, fn) {
|
||||
var val = editor.menuOptions[item];
|
||||
var currentVal = esr[fn]();
|
||||
if (typeof currentVal == 'object')
|
||||
currentVal = currentVal.$id;
|
||||
val.forEach(function(valuex) {
|
||||
if (valuex.value === currentVal)
|
||||
valuex.selected = 'selected';
|
||||
});
|
||||
return createNewEntry(esr, clss, item, val);
|
||||
}
|
||||
function handleSet(setObj) {
|
||||
var item = setObj.functionName;
|
||||
var esr = setObj.parentObj;
|
||||
var clss = setObj.parentName;
|
||||
var val;
|
||||
var fn = item.replace(/^set/, 'get');
|
||||
if(editor.menuOptions[item] !== undefined) {
|
||||
elements.push(makeDropdown(item, esr, clss, fn));
|
||||
} else if(typeof esr[fn] === 'function') {
|
||||
try {
|
||||
val = esr[fn]();
|
||||
if(typeof val === 'object') {
|
||||
val = val.$id;
|
||||
}
|
||||
elements.push(
|
||||
createNewEntry(esr, clss, item, val)
|
||||
);
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
addEditorMenuOptions(editor);
|
||||
getSetFunctions(editor).forEach(function(setObj) {
|
||||
handleSet(setObj);
|
||||
});
|
||||
cleanupElementsList();
|
||||
return wrapElements();
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
|
||||
'use strict';
|
||||
var dom = require("../../lib/dom");
|
||||
var cssText = "#ace_settingsmenu, #kbshortcutmenu {\
|
||||
background-color: #F7F7F7;\
|
||||
color: black;\
|
||||
box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\
|
||||
padding: 1em 0.5em 2em 1em;\
|
||||
overflow: auto;\
|
||||
position: absolute;\
|
||||
margin: 0;\
|
||||
bottom: 0;\
|
||||
right: 0;\
|
||||
top: 0;\
|
||||
z-index: 9991;\
|
||||
cursor: default;\
|
||||
}\
|
||||
.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\
|
||||
box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\
|
||||
background-color: rgba(255, 255, 255, 0.6);\
|
||||
color: black;\
|
||||
}\
|
||||
.ace_optionsMenuEntry:hover {\
|
||||
background-color: rgba(100, 100, 100, 0.1);\
|
||||
-webkit-transition: all 0.5s;\
|
||||
transition: all 0.3s\
|
||||
}\
|
||||
.ace_closeButton {\
|
||||
background: rgba(245, 146, 146, 0.5);\
|
||||
border: 1px solid #F48A8A;\
|
||||
border-radius: 50%;\
|
||||
padding: 7px;\
|
||||
position: absolute;\
|
||||
right: -8px;\
|
||||
top: -8px;\
|
||||
z-index: 1000;\
|
||||
}\
|
||||
.ace_closeButton{\
|
||||
background: rgba(245, 146, 146, 0.9);\
|
||||
}\
|
||||
.ace_optionsMenuKey {\
|
||||
color: darkslateblue;\
|
||||
font-weight: bold;\
|
||||
}\
|
||||
.ace_optionsMenuCommand {\
|
||||
color: darkcyan;\
|
||||
font-weight: normal;\
|
||||
}";
|
||||
dom.importCssString(cssText);
|
||||
module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) {
|
||||
top = top ? 'top: ' + top + ';' : '';
|
||||
bottom = bottom ? 'bottom: ' + bottom + ';' : '';
|
||||
right = right ? 'right: ' + right + ';' : '';
|
||||
left = left ? 'left: ' + left + ';' : '';
|
||||
|
||||
var closer = document.createElement('div');
|
||||
var contentContainer = document.createElement('div');
|
||||
|
||||
function documentEscListener(e) {
|
||||
if (e.keyCode === 27) {
|
||||
closer.click();
|
||||
}
|
||||
}
|
||||
|
||||
closer.style.cssText = 'margin: 0; padding: 0; ' +
|
||||
'position: fixed; top:0; bottom:0; left:0; right:0;' +
|
||||
'z-index: 9990; ' +
|
||||
'background-color: rgba(0, 0, 0, 0.3);';
|
||||
closer.addEventListener('click', function() {
|
||||
document.removeEventListener('keydown', documentEscListener);
|
||||
closer.parentNode.removeChild(closer);
|
||||
editor.focus();
|
||||
closer = null;
|
||||
});
|
||||
document.addEventListener('keydown', documentEscListener);
|
||||
|
||||
contentContainer.style.cssText = top + right + bottom + left;
|
||||
contentContainer.addEventListener('click', function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
var wrapper = dom.createElement("div");
|
||||
wrapper.style.position = "relative";
|
||||
|
||||
var closeButton = dom.createElement("div");
|
||||
closeButton.className = "ace_closeButton";
|
||||
closeButton.addEventListener('click', function() {
|
||||
closer.click();
|
||||
});
|
||||
|
||||
wrapper.appendChild(closeButton);
|
||||
contentContainer.appendChild(wrapper);
|
||||
|
||||
contentContainer.appendChild(contentElement);
|
||||
closer.appendChild(contentContainer);
|
||||
document.body.appendChild(closer);
|
||||
editor.blur();
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/ext/settings_menu",["require","exports","module","ace/ext/menu_tools/generate_settings_menu","ace/ext/menu_tools/overlay_page","ace/editor"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var generateSettingsMenu = require('./menu_tools/generate_settings_menu').generateSettingsMenu;
|
||||
var overlayPage = require('./menu_tools/overlay_page').overlayPage;
|
||||
function showSettingsMenu(editor) {
|
||||
var sm = document.getElementById('ace_settingsmenu');
|
||||
if (!sm)
|
||||
overlayPage(editor, generateSettingsMenu(editor), '0', '0', '0');
|
||||
}
|
||||
module.exports.init = function(editor) {
|
||||
var Editor = require("ace/editor").Editor;
|
||||
Editor.prototype.showSettingsMenu = function() {
|
||||
showSettingsMenu(this);
|
||||
};
|
||||
};
|
||||
});
|
||||
(function() {
|
||||
ace.require(["ace/ext/settings_menu"], function() {});
|
||||
})();
|
||||
|
||||
56
htdocs/includes/ace/kitchen-sink.html
Normal file
56
htdocs/includes/ace/kitchen-sink.html
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width,height=device-height" />
|
||||
<title>Ace Kitchen Sink</title>
|
||||
<meta name="author" content="Fabian Jakobs">
|
||||
<!--
|
||||
Ace
|
||||
version 1.4.6
|
||||
commit
|
||||
-->
|
||||
|
||||
<link rel="stylesheet" href="demo/kitchen-sink/styles.css" type="text/css" media="screen" charset="utf-8">
|
||||
|
||||
<script async="true" src="https://use.edgefonts.net/source-code-pro.js"></script>
|
||||
|
||||
|
||||
<link href="./doc/site/images/favicon.ico" rel="icon" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
<div id="sidePanel" style="position:absolute;height:100%;">
|
||||
<div class="toggleButton">
|
||||
<div></div><div></div><div></div>
|
||||
</div>
|
||||
<a href="https://c9.io" title="Cloud9 IDE | Your code anywhere, anytime">
|
||||
<img id="c9-logo" src="demo/kitchen-sink/logo.png" style="width: 172px;margin: -9px 30px -12px 51px;">
|
||||
</a>
|
||||
<div style="position: absolute; overflow: hidden; top:100px; bottom:0">
|
||||
<div id="optionsPanel" style="width: 120%; height:100%; overflow-y: scroll">
|
||||
|
||||
|
||||
<a href="https://ace.c9.io">
|
||||
<img id="ace-logo" src="demo/kitchen-sink/ace-logo.png" style="width: 134px;margin: 46px 0px 4px 66px;">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="editor-container"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="src/ace.js" data-ace-base="src" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="src/keybinding-vim.js"></script>
|
||||
<script src="src/keybinding-emacs.js"></script>
|
||||
<script src="demo/kitchen-sink/demo.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
require("kitchen-sink/demo");
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,281 +0,0 @@
|
|||
ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var DocCommentHighlightRules = function() {
|
||||
this.$rules = {
|
||||
"start" : [ {
|
||||
token : "comment.doc.tag",
|
||||
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
||||
},
|
||||
DocCommentHighlightRules.getTagRule(),
|
||||
{
|
||||
defaultToken : "comment.doc",
|
||||
caseInsensitive: true
|
||||
}]
|
||||
};
|
||||
};
|
||||
|
||||
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
||||
|
||||
DocCommentHighlightRules.getTagRule = function(start) {
|
||||
return {
|
||||
token : "comment.doc.tag.storage.type",
|
||||
regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
|
||||
};
|
||||
}
|
||||
|
||||
DocCommentHighlightRules.getStartRule = function(start) {
|
||||
return {
|
||||
token : "comment.doc", // doc comment
|
||||
regex : "\\/\\*(?=\\*)",
|
||||
next : start
|
||||
};
|
||||
};
|
||||
|
||||
DocCommentHighlightRules.getEndRule = function (start) {
|
||||
return {
|
||||
token : "comment.doc", // closing comment
|
||||
regex : "\\*\\/",
|
||||
next : start
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/mode/lean_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var leanHighlightRules = function() {
|
||||
|
||||
var keywordControls = (
|
||||
[ "add_rewrite", "alias", "as", "assume", "attribute",
|
||||
"begin", "by", "calc", "calc_refl", "calc_subst", "calc_trans", "check",
|
||||
"classes", "coercions", "conjecture", "constants", "context",
|
||||
"corollary", "else", "end", "environment", "eval", "example",
|
||||
"exists", "exit", "export", "exposing", "extends", "fields", "find_decl",
|
||||
"forall", "from", "fun", "have", "help", "hiding", "if",
|
||||
"import", "in", "infix", "infixl", "infixr", "instances",
|
||||
"let", "local", "match", "namespace", "notation", "obtain", "obtains",
|
||||
"omit", "opaque", "open", "options", "parameter", "parameters", "postfix",
|
||||
"precedence", "prefix", "premise", "premises", "print", "private", "proof",
|
||||
"protected", "qed", "raw", "renaming", "section", "set_option",
|
||||
"show", "tactic_hint", "take", "then", "universe",
|
||||
"universes", "using", "variable", "variables", "with"].join("|")
|
||||
);
|
||||
|
||||
var nameProviders = (
|
||||
["inductive", "structure", "record", "theorem", "axiom",
|
||||
"axioms", "lemma", "hypothesis", "definition", "constant"].join("|")
|
||||
);
|
||||
|
||||
var storageType = (
|
||||
["Prop", "Type", "Type'", "Type₊", "Type₁", "Type₂", "Type₃"].join("|")
|
||||
);
|
||||
|
||||
var storageModifiers = (
|
||||
"\\[(" +
|
||||
["abbreviations", "all-transparent", "begin-end-hints", "class", "classes", "coercion",
|
||||
"coercions", "declarations", "decls", "instance", "irreducible",
|
||||
"multiple-instances", "notation", "notations", "parsing-only", "persistent",
|
||||
"reduce-hints", "reducible", "tactic-hints", "visible", "wf", "whnf"
|
||||
].join("|") +
|
||||
")\\]"
|
||||
);
|
||||
|
||||
var keywordOperators = (
|
||||
[].join("|")
|
||||
);
|
||||
|
||||
var keywordMapper = this.$keywords = this.createKeywordMapper({
|
||||
"keyword.control" : keywordControls,
|
||||
"storage.type" : storageType,
|
||||
"keyword.operator" : keywordOperators,
|
||||
"variable.language": "sorry"
|
||||
}, "identifier");
|
||||
|
||||
var identifierRe = "[A-Za-z_\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2100-\u214f][A-Za-z0-9_'\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2070-\u2079\u207f-\u2089\u2090-\u209c\u2100-\u214f]*";
|
||||
var operatorRe = new RegExp(["#", "@", "->", "∼", "↔", "/", "==", "=", ":=", "<->",
|
||||
"/\\", "\\/", "∧", "∨", "≠", "<", ">", "≤", "≥", "¬",
|
||||
"<=", ">=", "⁻¹", "⬝", "▸", "\\+", "\\*", "-", "/",
|
||||
"λ", "→", "∃", "∀", ":="].join("|"));
|
||||
|
||||
this.$rules = {
|
||||
"start" : [
|
||||
{
|
||||
token : "comment", // single line comment "--"
|
||||
regex : "--.*$"
|
||||
},
|
||||
DocCommentHighlightRules.getStartRule("doc-start"),
|
||||
{
|
||||
token : "comment", // multi line comment "/-"
|
||||
regex : "\\/-",
|
||||
next : "comment"
|
||||
}, {
|
||||
stateName: "qqstring",
|
||||
token : "string.start", regex : '"', next : [
|
||||
{token : "string.end", regex : '"', next : "start"},
|
||||
{token : "constant.language.escape", regex : /\\[n"\\]/},
|
||||
{defaultToken: "string"}
|
||||
]
|
||||
}, {
|
||||
token : "keyword.control", regex : nameProviders, next : [
|
||||
{token : "variable.language", regex : identifierRe, next : "start"} ]
|
||||
}, {
|
||||
token : "constant.numeric", // hex
|
||||
regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
|
||||
}, {
|
||||
token : "constant.numeric", // float
|
||||
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
|
||||
}, {
|
||||
token : "storage.modifier",
|
||||
regex : storageModifiers
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : identifierRe
|
||||
}, {
|
||||
token : "operator",
|
||||
regex : operatorRe
|
||||
}, {
|
||||
token : "punctuation.operator",
|
||||
regex : "\\?|\\:|\\,|\\;|\\."
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[[({]"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "[\\])}]"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
}
|
||||
],
|
||||
"comment" : [ {token: "comment", regex: "-/", next: "start"},
|
||||
{defaultToken: "comment"} ]
|
||||
};
|
||||
|
||||
this.embedRules(DocCommentHighlightRules, "doc-",
|
||||
[ DocCommentHighlightRules.getEndRule("start") ]);
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(leanHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.leanHighlightRules = leanHighlightRules;
|
||||
});
|
||||
|
||||
ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var Range = require("../range").Range;
|
||||
|
||||
var MatchingBraceOutdent = function() {};
|
||||
|
||||
(function() {
|
||||
|
||||
this.checkOutdent = function(line, input) {
|
||||
if (! /^\s+$/.test(line))
|
||||
return false;
|
||||
|
||||
return /^\s*\}/.test(input);
|
||||
};
|
||||
|
||||
this.autoOutdent = function(doc, row) {
|
||||
var line = doc.getLine(row);
|
||||
var match = line.match(/^(\s*\})/);
|
||||
|
||||
if (!match) return 0;
|
||||
|
||||
var column = match[1].length;
|
||||
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
||||
|
||||
if (!openBracePos || openBracePos.row == row) return 0;
|
||||
|
||||
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
||||
doc.replace(new Range(row, 0, row, column-1), indent);
|
||||
};
|
||||
|
||||
this.$getIndent = function(line) {
|
||||
return line.match(/^\s*/)[0];
|
||||
};
|
||||
|
||||
}).call(MatchingBraceOutdent.prototype);
|
||||
|
||||
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
||||
});
|
||||
|
||||
ace.define("ace/mode/lean",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lean_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var leanHighlightRules = require("./lean_highlight_rules").leanHighlightRules;
|
||||
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
||||
var Range = require("../range").Range;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = leanHighlightRules;
|
||||
|
||||
this.$outdent = new MatchingBraceOutdent();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.lineCommentStart = "--";
|
||||
this.blockComment = {start: "/-", end: "-/"};
|
||||
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
var indent = this.$getIndent(line);
|
||||
|
||||
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
|
||||
var tokens = tokenizedLine.tokens;
|
||||
var endState = tokenizedLine.state;
|
||||
|
||||
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
||||
return indent;
|
||||
}
|
||||
|
||||
if (state == "start") {
|
||||
var match = line.match(/^.*[\{\(\[]\s*$/);
|
||||
if (match) {
|
||||
indent += tab;
|
||||
}
|
||||
} else if (state == "doc-start") {
|
||||
if (endState == "start") {
|
||||
return "";
|
||||
}
|
||||
var match = line.match(/^\s*(\/?)\*/);
|
||||
if (match) {
|
||||
if (match[1]) {
|
||||
indent += " ";
|
||||
}
|
||||
indent += "- ";
|
||||
}
|
||||
}
|
||||
|
||||
return indent;
|
||||
};
|
||||
|
||||
this.checkOutdent = function(state, line, input) {
|
||||
return this.$outdent.checkOutdent(line, input);
|
||||
};
|
||||
|
||||
this.autoOutdent = function(state, doc, row) {
|
||||
this.$outdent.autoOutdent(doc, row);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/lean";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,481 +0,0 @@
|
|||
ace.define("ace/mode/live_script_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var LiveScriptHighlightRules = function() {
|
||||
|
||||
this.$rules = { start:
|
||||
[ { token: 'punctuation.definition.comment.livescript',
|
||||
regex: '\\/\\*',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.comment.livescript',
|
||||
regex: '\\*\\/',
|
||||
next: 'pop' },
|
||||
{ token: 'storage.type.annotation.livescriptscript',
|
||||
regex: '@\\w*' },
|
||||
{ defaultToken: 'comment.block.livescript' } ] },
|
||||
{ token:
|
||||
[ 'punctuation.definition.comment.livescript',
|
||||
'comment.line.number-sign.livescript' ],
|
||||
regex: '(#)(?!\\{)(.*$)' },
|
||||
{ token:
|
||||
[ 'variable.parameter.function.livescript',
|
||||
'meta.inline.function.livescript',
|
||||
'storage.type.function.livescript',
|
||||
'meta.inline.function.livescript',
|
||||
'variable.parameter.function.livescript',
|
||||
'meta.inline.function.livescript',
|
||||
'storage.type.function.livescript' ],
|
||||
regex: '(\\s*\\!?\\(\\s*[^()]*?\\))(\\s*)(!?[~-]{1,2}>)|(\\s*\\!?)(\\(?[^()]*?\\)?)(\\s*)(<[~-]{1,2}!?)',
|
||||
comment: 'match stuff like: a -> … ' },
|
||||
{ token:
|
||||
[ 'keyword.operator.new.livescript',
|
||||
'meta.class.instance.constructor',
|
||||
'entity.name.type.instance.livescript' ],
|
||||
regex: '(new)(\\s+)(\\w+(?:\\.\\w*)*)' },
|
||||
{ token: 'keyword.illegal.livescript',
|
||||
regex: '\\bp(?:ackage|r(?:ivate|otected)|ublic)|interface|enum|static|yield\\b' },
|
||||
{ token: 'punctuation.definition.string.begin.livescript',
|
||||
regex: '\'\'\'',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.livescript',
|
||||
regex: '\'\'\'',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'string.quoted.heredoc.livescript' } ] },
|
||||
{ token: 'punctuation.definition.string.begin.livescript',
|
||||
regex: '"""',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.livescript',
|
||||
regex: '"""',
|
||||
next: 'pop' },
|
||||
{ token: 'constant.character.escape.livescript',
|
||||
regex: '\\\\.' },
|
||||
{ include: '#interpolated_livescript' },
|
||||
{ defaultToken: 'string.quoted.double.heredoc.livescript' } ] },
|
||||
{ token: 'punctuation.definition.string.begin.livescript',
|
||||
regex: '``',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.livescript',
|
||||
regex: '``',
|
||||
next: 'pop' },
|
||||
{ token: 'constant.character.escape.livescript',
|
||||
regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)' },
|
||||
{ defaultToken: 'string.quoted.script.livescript' } ] },
|
||||
{ token: 'string.array-literal.livescript',
|
||||
regex: '<\\[',
|
||||
push:
|
||||
[ { token: 'string.array-literal.livescript',
|
||||
regex: '\\]>',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'string.array-literal.livescript' } ] },
|
||||
{ token: 'string.regexp.livescript',
|
||||
regex: '/{2}(?![\\s=/*+{}?]).*?[^\\\\]/[igmy]{0,4}(?![a-zA-Z0-9])/{2}' },
|
||||
{ token: 'string.regexp.livescript',
|
||||
regex: '/{2}$',
|
||||
push:
|
||||
[ { token: 'string.regexp.livescript',
|
||||
regex: '/{2}[imgy]{0,4}',
|
||||
next: 'pop' },
|
||||
{ include: '#embedded_spaced_comment' },
|
||||
{ include: '#interpolated_livescript' },
|
||||
{ defaultToken: 'string.regexp.livescript' } ] },
|
||||
{ token: 'string.regexp.livescript',
|
||||
regex: '/{2}',
|
||||
push:
|
||||
[ { token: 'string.regexp.livescript',
|
||||
regex: '/{2}[imgy]{0,4}',
|
||||
next: 'pop' },
|
||||
{ token: 'constant.character.escape.livescript',
|
||||
regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)' },
|
||||
{ include: '#interpolated_livescript' },
|
||||
{ defaultToken: 'string.regexp.livescript' } ] },
|
||||
{ token: 'string.regexp.livescript',
|
||||
regex: '/(?![\\s=/*+{}?]).*?[^\\\\]/[igmy]{0,4}(?![a-zA-Z0-9])' },
|
||||
{ token: 'keyword.control.livescript',
|
||||
regex: '\\b(?<![\\.\\$\\-])(?:t(?:h(?:is|row|en)|ry|ypeof!?|il|o)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction|rom|allthrough)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith|hen)|o(?:f|r|therwise)|return|break|let|var|loop|match|by)(?!\\-|\\s*:)\\b',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?x)\n\t\t\t\t\\b(?<![\\.\\$\\-])(?:\n\t\t t(?:h(?:is|row|en)|ry|ypeof!?|il|o)\n\t\t |c(?:on(?:tinue|st)|a(?:se|tch)|lass)\n\t\t |i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])\n\t\t |d(?:e(?:fault|lete|bugger)|o)\n\t\t |f(?:or(?:\\s+own)?|inally|unction|rom|allthrough)\n\t\t |s(?:uper|witch)\n\t\t |e(?:lse|x(?:tends|port)|val)\n\t\t |a(?:nd|rguments)\n\t\t |n(?:ew|ot)\n\t\t |un(?:less|til)\n\t\t |w(?:hile|ith|hen)\n\t\t |o(?:f|r|therwise)\n\t\t |return|break|let|var|loop\n\t\t |match\n\t\t |by\n\t\t\t\t)(?!\\-|\\s*:)\\b\n\t\t\t' },
|
||||
{ token: 'keyword.operator.livescript',
|
||||
regex: '\\b(?<![\\.\\$\\-])(?:instanceof|new|delete|typeof|and|or|is|isnt|not)(?!\\-|\\s*:)\\b',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?x)\n\t\t\t\t\\b(?<![\\.\\$\\-])(\n\t\t\t\t\tinstanceof|new|delete|typeof|and|or|is|isnt|not\n\t\t\t\t)(?!\\-|\\s*:)\\b\n\t\t\t' },
|
||||
{ token: 'keyword.operator.livescript',
|
||||
regex: 'and=|or=|%|&|\\^|\\*|\\/|(?<![a-zA-Z$_])(?:\\-)?\\-(?!\\-?>)|\\+\\+|\\+|~(?!~?>)|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<(?!\\[)|(?<!\\])>|(?<!\\w)!(?!(?:[~\\-]+)?>)|&&|\\.\\.(?:\\.)?|\\s\\.\\s|\\?|\\||\\|\\||\\:|\\*=|(?<!\\()/=|%=|\\+=|\\-=|\\.=|&=|\\(\\.|\\.\\)|\\^=',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?x)\n\t\t\t\tand=|or=|%|&|\\^|\\*|\\/|(?<![a-zA-Z$_])(\\-)?\\-(?!\\-?>)|\\+\\+|\\+|\n\t\t\t\t~(?!~?>)|==|=|!=|<=|>=|<<=|>>=|\n\t\t\t\t>>>=|<>|<(?!\\[)|(?<!\\])>|(?<!\\w)!(?!([~\\-]+)?>)|&&|\\.\\.(\\.)?|\\s\\.\\s|\\?|\\||\\|\\||\\:|\\*=|(?<!\\()/=|%=|\\+=|\\-=|\\.=|&=|\\(\\.|\\.\\)|\n\t\t\t\t\\^=\n\t\t\t' },
|
||||
{ token:
|
||||
[ 'variable.assignment.livescript',
|
||||
'variable.assignment.livescript',
|
||||
'variable.assignment.livescript',
|
||||
'punctuation.separator.key-value',
|
||||
'keyword.operator.livescript',
|
||||
'variable.assignment.livescript' ],
|
||||
regex: '([a-zA-Z\\$_])((?:[\\w$.-])*)(\\s*)(?!\\::)(?:(:)|(=))(\\s*)(?!(?:\\s*!?\\s*\\(.*\\))?\\s*!?[~-]{1,2}>)' },
|
||||
{ token: 'keyword.operator.livescript',
|
||||
regex: '(?<=\\s|^)[\\[\\{](?=.*?[\\]\\}]\\s+[:=])',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?<=\\s|^)([\\[\\{])(?=.*?[\\]\\}]\\s+[:=])',
|
||||
push:
|
||||
[ { token: 'keyword.operator.livescript',
|
||||
regex: '[\\]\\}]\\s*[:=]',
|
||||
next: 'pop' },
|
||||
{ include: '#variable_name' },
|
||||
{ include: '#instance_variable' },
|
||||
{ include: '#single_quoted_string' },
|
||||
{ include: '#double_quoted_string' },
|
||||
{ include: '#numeric' },
|
||||
{ defaultToken: 'meta.variable.assignment.destructured.livescript' } ] },
|
||||
{ token:
|
||||
[ 'meta.function.livescript',
|
||||
'entity.name.function.livescript',
|
||||
'entity.name.function.livescript',
|
||||
'entity.name.function.livescript',
|
||||
'entity.name.function.livescript',
|
||||
'variable.parameter.function.livescript',
|
||||
'entity.name.function.livescript',
|
||||
'storage.type.function.livescript' ],
|
||||
regex: '(\\s*)(?=[a-zA-Z\\$_])([a-zA-Z\\$_])((?:[\\w$.:-])*)(\\s*)([:=])((?:\\s*!?\\s*\\(.*\\))?)(\\s*)(!?[~-]{1,2}>)' },
|
||||
{ token: 'storage.type.function.livescript',
|
||||
regex: '!?[~-]{1,2}>' },
|
||||
{ token: 'constant.language.boolean.true.livescript',
|
||||
regex: '\\b(?<!\\.)(?:true|on|yes)(?!\\s*[:=])\\b',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '\\b(?<!\\.)(true|on|yes)(?!\\s*[:=])\\b' },
|
||||
{ token: 'constant.language.boolean.false.livescript',
|
||||
regex: '\\b(?<!\\.)(?:false|off|no)(?!\\s*[:=])\\b',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '\\b(?<!\\.)(false|off|no)(?!\\s*[:=])\\b' },
|
||||
{ token: 'constant.language.null.livescript',
|
||||
regex: '\\b(?<!\\.)(?:null|void)(?!\\s*[:=])\\b',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '\\b(?<!\\.)(null|void)(?!\\s*[:=])\\b' },
|
||||
{ token: 'variable.language.livescript',
|
||||
regex: '\\b(?<!\\.)(?:super|this|extends)(?!\\s*[:=])\\b',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '\\b(?<!\\.)(super|this|extends)(?!\\s*[:=])\\b' },
|
||||
{ token:
|
||||
[ 'storage.type.class.livescript',
|
||||
'meta.class.livescript',
|
||||
'entity.name.type.class.livescript',
|
||||
'meta.class.livescript',
|
||||
'keyword.control.inheritance.livescript',
|
||||
'meta.class.livescript',
|
||||
'entity.other.inherited-class.livescript' ],
|
||||
regex: '(class\\b)(\\s+)((?:@?[a-zA-Z$_][\\w$.-]*)?)(?:(\\s+)(extends)(\\s+)(@?[a-zA-Z$_][\\w$.-]*))?' },
|
||||
{ token: 'keyword.other.livescript',
|
||||
regex: '\\b(?:debugger|\\\\)\\b' },
|
||||
{ token: 'support.class.livescript',
|
||||
regex: '\\b(?:Array|ArrayBuffer|Blob|Boolean|Date|document|event|Function|Int(?:8|16|32|64)Array|Math|Map|Number|Object|Proxy|RegExp|Set|String|WeakMap|window|Uint(?:8|16|32|64)Array|XMLHttpRequest)\\b' },
|
||||
{ token: 'entity.name.type.object.livescript',
|
||||
regex: '\\bconsole\\b' },
|
||||
{ token: 'support.function.console.livescript',
|
||||
regex: '(?<=console\\.)(?:debug|warn|info|log|error|time(?:End|-end)|assert)\\b',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '((?<=console\\.)(debug|warn|info|log|error|time(End|-end)|assert))\\b' },
|
||||
{ token: 'support.function.livescript',
|
||||
regex: '\\b(?:decodeURI(?:Component)?|encodeURI(?:Component)?|eval|parse(?:Float|Int)|require)\\b' },
|
||||
{ token: 'support.function.prelude.livescript',
|
||||
regex: '(?<![.-])\\b(?:map|filter|reject|partition|find|each|head|tail|last|initial|empty|values|keys|length|cons|append|join|reverse|fold(?:l|r)?1?|unfoldr|and(?:List|-list)|or(?:List|-list)|any|all|unique|sum|product|mean|compact|concat(?:Map|-map)?|maximum|minimum|scan(?:l|r)?1?|replicate|slice|apply|split(?:At|-at)?|take(?:While|-while)?|drop(?:While|-while)?|span|first|break(?:It|-it)|list(?:ToObj|-to-obj)|obj(?:ToFunc|-to-func)|pairs(?:ToObj|-to-obj)|obj(?:ToPairs|-to-pairs|ToLists|-to-lists)|zip(?:All|-all)?(?:With|-with)?|compose|curry|partial|flip|fix|sort(?:With|-with|By|-by)?|group(?:By|-by)|break(?:List|-list|Str|-str)|difference|intersection|union|average|flatten|chars|unchars|repeat|lines|unlines|words|unwords|max|min|negate|abs|signum|quot|rem|div|mod|recip|pi|tau|exp|sqrt|ln|pow|sin|cos|tan|asin|acos|atan|atan2|truncate|round|ceiling|floor|is(?:It|-it)NaN|even|odd|gcd|lcm|disabled__id)\\b(?![.-])',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?x)(?<![.-])\\b(\n\t\t\t\tmap|filter|reject|partition|find|each|head|tail|last|initial|empty|\n\t\t\t\tvalues|keys|length|cons|append|join|reverse|fold(l|r)?1?|unfoldr|\n\t\t\t\tand(List|-list)|or(List|-list)|any|all|unique|sum|product|mean|compact|\n\t\t\t\tconcat(Map|-map)?|maximum|minimum|scan(l|r)?1?|replicate|slice|apply|\n\t\t\t\tsplit(At|-at)?|take(While|-while)?|drop(While|-while)?|span|first|\n\t\t\t\tbreak(It|-it)|list(ToObj|-to-obj)|obj(ToFunc|-to-func)|\n\t\t\t\tpairs(ToObj|-to-obj)|obj(ToPairs|-to-pairs|ToLists|-to-lists)|\n\t\t\t\tzip(All|-all)?(With|-with)?|compose|curry|partial|flip|fix|\n\t\t\t\tsort(With|-with|By|-by)?|group(By|-by)|break(List|-list|Str|-str)|\n\t\t\t\tdifference|intersection|union|average|flatten|chars|unchars|repeat|\n\t\t\t\tlines|unlines|words|unwords|max|min|negate|abs|signum|quot|rem|div|mod|\n\t\t\t\trecip|pi|tau|exp|sqrt|ln|pow|sin|cos|tan|asin|acos|atan|atan2|truncate|\n\t\t\t\tround|ceiling|floor|is(It|-it)NaN|even|odd|gcd|lcm|disabled__id\n\t\t\t)\\b(?![.-])',
|
||||
comment: 'Generated by DOM query from http://gkz.github.com/prelude-ls/:\n\t [].slice\n\t .call(document.querySelectorAll(".nav-pills li a"))\n\t .map(function(_) {return _.innerText})\n\t .filter(function(_) {return _.trim() !== \'})\n\t .slice(2)\n\t .join("|")\n \t\t' },
|
||||
{ token: 'support.function.semireserved.livescript',
|
||||
regex: '(?<![.-])\\b(?:that|it|e)\\b',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?x)(?<![.-])\\b(that|it|e)\\b' },
|
||||
{ token: 'support.function.method.array.livescript',
|
||||
regex: '(?<=(?:\\.|\\]|\\)))(?:apply|call|concat|every|filter|for(?:Each|-each)|from|has(?:Own|-own)(?:Property|-property)|index(?:Of|-of)|is(?:Prototype|-prototype)(?:Of|-of)|join|last(?:Index|-index)(?:Of|-of)|map|of|pop|property(?:Is|-is)(?:Enumerable|-enumerable)|push|reduce(?:Right|-right)?|reverse|shift|slice|some|sort|splice|to(?:Locale|-locale)?(?:String|-string)|unshift|valueOf)\\b(?!-)',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?x)((?<=(\\.|\\]|\\)))(\n\t\t\t\tapply|call|concat|every|filter|for(Each|-each)|\n\t\t\t\tfrom|has(Own|-own)(Property|-property)|index(Of|-of)|\n\t\t\t\tis(Prototype|-prototype)(Of|-of)|join|last(Index|-index)(Of|-of)|\n\t\t\t\tmap|of|pop|property(Is|-is)(Enumerable|-enumerable)|push|\n\t\t\t\treduce(Right|-right)?|reverse|shift|slice|some|sort|\n\t\t\t\tsplice|to(Locale|-locale)?(String|-string)|unshift|valueOf\n\t\t\t))\\b(?!-) ' },
|
||||
{ token: 'support.function.static.array.livescript',
|
||||
regex: '(?<=Array\\.)isArray\\b',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?x)((?<=Array\\.)(\n\t\t\t\tisArray\n\t\t\t))\\b' },
|
||||
{ token: 'support.function.static.object.livescript',
|
||||
regex: '(?<=Object\\.)(?:create|ace.define(?:Propert|-propert)(?:ies|y)|freeze|get(?:Own|-own)(?:Property|-property)(?:Descriptors?|Names)|get(?:Property|-property)(?:Descriptor|Names)|getPrototypeOf|is(?:(?:Extensible|-extensible)|(?:Frozen|-frozen)|(?:Sealed|-sealed))?|keys|prevent(?:Extensions|-extensions)|seal)\\b',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?x)((?<=Object\\.)(\n\t\t\t\tcreate|ace.define(Propert|-propert)(ies|y)|freeze|\n\t\t\t\tget(Own|-own)(Property|-property)(Descriptors?|Names)|\n\t\t\t\tget(Property|-property)(Descriptor|Names)|getPrototypeOf|\n\t\t\t\tis((Extensible|-extensible)|(Frozen|-frozen)|(Sealed|-sealed))?|\n\t\t\t\tkeys|prevent(Extensions|-extensions)|seal\n\t\t\t))\\b' },
|
||||
{ token: 'support.function.static.math.livescript',
|
||||
regex: '(?<=Math\\.)(?:abs|acos|acosh|asin|asinh|atan|atan2|atanh|ceil|cos|cosh|exp|expm1|floor|hypot|log|log10|log1p|log2|max|min|pow|random|round|sign|sin|sinh|sqrt|tan|tanh|trunc)\\b',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?x)((?<=Math\\.)(\n\t\t\t\tabs|acos|acosh|asin|asinh|atan|atan2|atanh|ceil|cos|cosh|exp|expm1|floor|\n\t\t\t\thypot|log|log10|log1p|log2|max|min|pow|random|round|sign|sin|sinh|sqrt|\n\t\t\t\ttan|tanh|trunc\n\t\t\t))\\b' },
|
||||
{ token: 'support.function.static.number.livescript',
|
||||
regex: '(?<=Number\\.)(?:is(?:Finite|Integer|NaN)|to(?:Integer|-integer))\\b',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?x)((?<=Number\\.)(\n\t\t\t\tis(Finite|Integer|NaN)|to(Integer|-integer)\n\t\t\t))\\b' },
|
||||
{ token: 'constant.language.livescript',
|
||||
regex: '\\b(?:Infinity|NaN|undefined)\\b' },
|
||||
{ token: 'punctuation.terminator.statement.livescript',
|
||||
regex: '\\;' },
|
||||
{ token: 'meta.delimiter.object.comma.livescript',
|
||||
regex: ',[ |\\t]*' },
|
||||
{ token: 'meta.delimiter.method.period.livescript',
|
||||
regex: '\\.' },
|
||||
{ token: 'meta.brace.curly.livescript', regex: '\\{|\\}' },
|
||||
{ token: 'meta.brace.round.livescript', regex: '\\(|\\)' },
|
||||
{ token: 'meta.brace.square.livescript', regex: '\\[|\\]\\s*' },
|
||||
{ include: '#instance_variable' },
|
||||
{ include: '#backslash_string' },
|
||||
{ include: '#single_quoted_string' },
|
||||
{ include: '#double_quoted_string' },
|
||||
{ include: '#numeric' } ],
|
||||
'#backslash_string':
|
||||
[ { token: 'string.quoted.single.livescript',
|
||||
regex: '\\\\(?:[\\\\)\\s,\\};\\]])?',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.livescript',
|
||||
regex: '[\\\\)\\s,\\};\\]]',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'string.quoted.single.livescript' } ] } ],
|
||||
'#double_quoted_string':
|
||||
[ { token: 'punctuation.definition.string.begin.livescript',
|
||||
regex: '"',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.livescript',
|
||||
regex: '"',
|
||||
next: 'pop' },
|
||||
{ token: 'constant.character.escape.livescript',
|
||||
regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)' },
|
||||
{ include: '#interpolated_livescript' },
|
||||
{ defaultToken: 'string.quoted.double.livescript' } ] } ],
|
||||
'#embedded_comment':
|
||||
[ { token:
|
||||
[ 'punctuation.definition.comment.livescript',
|
||||
'comment.line.number-sign.livescript' ],
|
||||
regex: '(?<!\\\\)(#)(.*$)',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?<!\\\\)(#).*$\\n' } ],
|
||||
'#embedded_spaced_comment':
|
||||
[ { token:
|
||||
[ 'punctuation.definition.comment.livescript',
|
||||
'comment.line.number-sign.livescript' ],
|
||||
regex: '(?<!\\\\)(#\\s)(.*$)',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?<!\\\\)(#\\s).*$\\n' } ],
|
||||
'#constructor_variable':
|
||||
[ { token: 'variable.other.readwrite.constructor.livescript',
|
||||
regex: '[a-zA-Z$_][\\w$-]*@{2}(?:[a-zA-Z$_][\\w$-]*)?' } ],
|
||||
'#instance_variable':
|
||||
[ { token: 'variable.other.readwrite.instance.livescript',
|
||||
regex: '(?<!\\S)@(?:[a-zA-Z$_][\\w$-]*)?',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?<!\\S)(@)([a-zA-Z$_][\\w$-]*)?' } ],
|
||||
'#interpolated_livescript':
|
||||
[ { todo:
|
||||
{ token: 'punctuation.section.embedded.livescript',
|
||||
regex: '\\#\\{',
|
||||
push:
|
||||
[ { token: 'punctuation.section.embedded.livescript',
|
||||
regex: '\\}',
|
||||
next: 'pop' },
|
||||
{ include: '$self' },
|
||||
{ defaultToken: 'source.livescript.embedded.source' } ] } },
|
||||
{ todo:
|
||||
{ token: 'source.livescript.embedded.source.simple',
|
||||
regex: '\\#',
|
||||
push:
|
||||
[ { token: 'source.livescript.embedded.source.simple',
|
||||
regex: '',
|
||||
next: 'pop' },
|
||||
{ include: '$self' },
|
||||
{ defaultToken: 'source.livescript.embedded.source.simple' } ] } } ],
|
||||
'#numeric':
|
||||
[ { token: 'constant.numeric.livescript',
|
||||
regex: '(?<![\\$@a-zA-Z_])(?:[0-9]+r[0-9_]+|(?:16r|0[xX])[0-9a-fA-F_]+|[0-9]+(?:\\.[0-9_]+)?(?:e[+\\-]?[0-9_]+)?[_a-zA-Z]*)',
|
||||
TODO: 'FIXME: regexp doesn\'t have js equivalent',
|
||||
originalRegex: '(?<![\\$@a-zA-Z_])(([0-9]+r[0-9_]+)|((16r|0[xX])[0-9a-fA-F_]+)|([0-9]+(\\.[0-9_]+)?(e[+\\-]?[0-9_]+)?)[_a-zA-Z]*)' } ],
|
||||
'#single_quoted_string':
|
||||
[ { token: 'punctuation.definition.string.begin.livescript',
|
||||
regex: '\'',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.livescript',
|
||||
regex: '\'',
|
||||
next: 'pop' },
|
||||
{ token: 'constant.character.escape.livescript',
|
||||
regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' },
|
||||
{ defaultToken: 'string.quoted.single.livescript' } ] } ],
|
||||
'#variable_name':
|
||||
[ { token: 'variable.assignment.livescript',
|
||||
regex: '[a-zA-Z\\$_][\\w$-]*(?:\\.\\w+)*(?!\\-)' } ] }
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
LiveScriptHighlightRules.metaData = { comment: 'LiveScript Syntax: version 1',
|
||||
fileTypes: [ 'ls', 'Slakefile', 'ls.erb' ],
|
||||
firstLineMatch: '^#!.*\\bls',
|
||||
foldingStartMarker: '^\\s*class\\s+\\S.*$|.*(->|=>)\\s*$|.*[\\[{]\\s*$',
|
||||
foldingStopMarker: '^\\s*$|^\\s*[}\\]]\\s*$',
|
||||
keyEquivalent: '^~C',
|
||||
name: 'LiveScript',
|
||||
scopeName: 'source.livescript' }
|
||||
|
||||
|
||||
oop.inherits(LiveScriptHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.LiveScriptHighlightRules = LiveScriptHighlightRules;
|
||||
});
|
||||
|
||||
ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/mode/live_script",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/live_script_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var LiveScriptHighlightRules = require("./live_script_highlight_rules").LiveScriptHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = LiveScriptHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.$id = "ace/mode/live_script"
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
ace.define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var lang = require("../lib/lang");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var LuceneHighlightRules = function() {
|
||||
this.$rules = {
|
||||
"start" : [
|
||||
{
|
||||
token : "constant.character.negation",
|
||||
regex : "[\\-]"
|
||||
}, {
|
||||
token : "constant.character.interro",
|
||||
regex : "[\\?]"
|
||||
}, {
|
||||
token : "constant.character.asterisk",
|
||||
regex : "[\\*]"
|
||||
}, {
|
||||
token: 'constant.character.proximity',
|
||||
regex: '~[0-9]+\\b'
|
||||
}, {
|
||||
token : 'keyword.operator',
|
||||
regex: '(?:AND|OR|NOT)\\b'
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[\\(]"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "[\\)]"
|
||||
}, {
|
||||
token : "keyword",
|
||||
regex : "[\\S]+:"
|
||||
}, {
|
||||
token : "string", // " string
|
||||
regex : '".*?"'
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
oop.inherits(LuceneHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.LuceneHighlightRules = LuceneHighlightRules;
|
||||
});
|
||||
|
||||
ace.define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"], function(require, exports, module) {
|
||||
'use strict';
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = LuceneHighlightRules;
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.$id = "ace/mode/lucene";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
|
|
@ -1,160 +0,0 @@
|
|||
ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/mode/mavens_mate_log",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mavens_mate_log_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var MavensMateLogHighlightRules = require("./mavens_mate_log_highlight_rules").MavensMateLogHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = MavensMateLogHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.$id = "ace/mode/mavens_mate_log"
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
|
|
@ -1,235 +0,0 @@
|
|||
ace.define("ace/mode/mips_assembler_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var MIPSAssemblerHighlightRules = function() {
|
||||
|
||||
this.$rules = { start:
|
||||
[ { token: 'support.function.pseudo.mips',
|
||||
regex: '\\b(?:mul|abs|div|divu|mulo|mulou|neg|negu|not|rem|remu|rol|ror|li|seq|sge|sgeu|sgt|sgtu|sle|sleu|sne|b|beqz|bge|bgeu|bgt|bgtu|ble|bleu|blt|bltu|bnez|la|ld|ulh|ulhu|ulw|sd|ush|usw|move|mfc1\\.d|l\\.d|l\\.s|s\\.d|s\\.s)\\b',
|
||||
comment: 'ok actually this are instructions, but one also could call them funtions…' },
|
||||
{ token: 'support.function.mips',
|
||||
regex: '\\b(?:abs\\.d|abs\\.s|add|add\\.d|add\\.s|addi|addiu|addu|and|andi|bc1f|bc1t|beq|bgez|bgezal|bgtz|blez|bltz|bltzal|bne|break|c\\.eq\\.d|c\\.eq\\.s|c\\.le\\.d|c\\.le\\.s|c\\.lt\\.d|c\\.lt\\.s|ceil\\.w\\.d|ceil\\.w\\.s|clo|clz|cvt\\.d\\.s|cvt\\.d\\.w|cvt\\.s\\.d|cvt\\.s\\.w|cvt\\.w\\.d|cvt\\.w\\.s|div|div\\.d|div\\.s|divu|eret|floor\\.w\\.d|floor\\.w\\.s|j|jal|jalr|jr|lb|lbu|lh|lhu|ll|lui|lw|lwc1|lwl|lwr|madd|maddu|mfc0|mfc1|mfhi|mflo|mov\\.d|mov\\.s|movf|movf\\.d|movf\\.s|movn|movn\\.d|movn\\.s|movt|movt\\.d|movt\\.s|movz|movz\\.d|movz\\.s|msub|mtc0|mtc1|mthi|mtlo|mul|mul\\.d|mul\\.s|mult|multu|neg\\.d|neg\\.s|nop|nor|or|ori|round\\.w\\.d|round\\.w\\.s|sb|sc|sdc1|sh|sll|sllv|slt|slti|sltiu|sltu|sqrt\\.d|sqrt\\.s|sra|srav|srl|srlv|sub|sub\\.d|sub\\.s|subu|sw|swc1|swl|swr|syscall|teq|teqi|tge|tgei|tgeiu|tgeu|tlt|tlti|tltiu|tltu|trunc\\.w\\.d|trunc\\.w\\.s|xor|xori)\\b' },
|
||||
{ token: 'storage.type.mips',
|
||||
regex: '\\.(?:ascii|asciiz|byte|data|double|float|half|kdata|ktext|space|text|word|set\\s*(?:noat|at))\\b' },
|
||||
{ token: 'storage.modifier.mips',
|
||||
regex: '\\.(?:align|extern||globl)\\b' },
|
||||
{ token:
|
||||
[ 'entity.name.function.label.mips',
|
||||
'meta.function.label.mips' ],
|
||||
regex: '\\b([A-Za-z0-9_]+)(:)' },
|
||||
{ token:
|
||||
[ 'punctuation.definition.variable.mips',
|
||||
'variable.other.register.usable.by-number.mips' ],
|
||||
regex: '(\\$)(0|[2-9]|1[0-9]|2[0-5]|2[89]|3[0-1])\\b' },
|
||||
{ token:
|
||||
[ 'punctuation.definition.variable.mips',
|
||||
'variable.other.register.usable.by-name.mips' ],
|
||||
regex: '(\\$)(zero|v[01]|a[0-3]|t[0-9]|s[0-7]|gp|sp|fp|ra)\\b' },
|
||||
{ token:
|
||||
[ 'punctuation.definition.variable.mips',
|
||||
'variable.other.register.reserved.mips' ],
|
||||
regex: '(\\$)(at|k[01]|1|2[67])\\b' },
|
||||
{ token:
|
||||
[ 'punctuation.definition.variable.mips',
|
||||
'variable.other.register.usable.floating-point.mips',
|
||||
'variable.other.register.usable.floating-point.mips' ],
|
||||
regex: '(\\$)(f)([0-9]|1[0-9]|2[0-9]|3[0-1])\\b' },
|
||||
{ token: 'constant.numeric.float.mips',
|
||||
regex: '\\b\\d+\\.\\d+\\b' },
|
||||
{ token: 'constant.numeric.integer.mips',
|
||||
regex: '\\b(?:\\d+|0(?:x|X)[a-fA-F0-9]+)\\b' },
|
||||
{ token: 'punctuation.definition.string.begin.mips',
|
||||
regex: '"',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.mips',
|
||||
regex: '"',
|
||||
next: 'pop' },
|
||||
{ token: 'constant.character.escape.mips',
|
||||
regex: '\\\\[rnt\\\\"]' },
|
||||
{ defaultToken: 'string.quoted.double.mips' } ] },
|
||||
{ token: 'punctuation.definition.comment.mips',
|
||||
regex: '#',
|
||||
push:
|
||||
[ { token: 'comment.line.number-sign.mips',
|
||||
regex: '$',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.line.number-sign.mips' } ] } ] }
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
MIPSAssemblerHighlightRules.metaData = { fileTypes: [ 's', 'mips', 'spim', 'asm' ],
|
||||
keyEquivalent: '^~M',
|
||||
name: 'MIPS Assembler',
|
||||
scopeName: 'source.mips' }
|
||||
|
||||
|
||||
oop.inherits(MIPSAssemblerHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.MIPSAssemblerHighlightRules = MIPSAssemblerHighlightRules;
|
||||
});
|
||||
|
||||
ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/mode/mips_assembler",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mips_assembler_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var MIPSAssemblerHighlightRules = require("./mips_assembler_highlight_rules").MIPSAssemblerHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = MIPSAssemblerHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.$id = "ace/mode/mips_assembler"
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
|
|
@ -1,198 +0,0 @@
|
|||
ace.define("ace/mode/pascal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var PascalHighlightRules = function() {
|
||||
|
||||
this.$rules = { start:
|
||||
[ { caseInsensitive: true,
|
||||
token: 'keyword.control.pascal',
|
||||
regex: '\\b(?:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b' },
|
||||
{ caseInsensitive: true,
|
||||
token:
|
||||
[ 'variable.pascal', "text",
|
||||
'storage.type.prototype.pascal',
|
||||
'entity.name.function.prototype.pascal' ],
|
||||
regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))' },
|
||||
{ caseInsensitive: true,
|
||||
token:
|
||||
[ 'variable.pascal', "text",
|
||||
'storage.type.function.pascal',
|
||||
'entity.name.function.pascal' ],
|
||||
regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?' },
|
||||
{ token: 'constant.numeric.pascal',
|
||||
regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b' },
|
||||
{ token: 'punctuation.definition.comment.pascal',
|
||||
regex: '--.*$',
|
||||
push_:
|
||||
[ { token: 'comment.line.double-dash.pascal.one',
|
||||
regex: '$',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.line.double-dash.pascal.one' } ] },
|
||||
{ token: 'punctuation.definition.comment.pascal',
|
||||
regex: '//.*$',
|
||||
push_:
|
||||
[ { token: 'comment.line.double-slash.pascal.two',
|
||||
regex: '$',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.line.double-slash.pascal.two' } ] },
|
||||
{ token: 'punctuation.definition.comment.pascal',
|
||||
regex: '\\(\\*',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.comment.pascal',
|
||||
regex: '\\*\\)',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.block.pascal.one' } ] },
|
||||
{ token: 'punctuation.definition.comment.pascal',
|
||||
regex: '\\{',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.comment.pascal',
|
||||
regex: '\\}',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.block.pascal.two' } ] },
|
||||
{ token: 'punctuation.definition.string.begin.pascal',
|
||||
regex: '"',
|
||||
push:
|
||||
[ { token: 'constant.character.escape.pascal', regex: '\\\\.' },
|
||||
{ token: 'punctuation.definition.string.end.pascal',
|
||||
regex: '"',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'string.quoted.double.pascal' } ]
|
||||
},
|
||||
{ token: 'punctuation.definition.string.begin.pascal',
|
||||
regex: '\'',
|
||||
push:
|
||||
[ { token: 'constant.character.escape.apostrophe.pascal',
|
||||
regex: '\'\'' },
|
||||
{ token: 'punctuation.definition.string.end.pascal',
|
||||
regex: '\'',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'string.quoted.single.pascal' } ] },
|
||||
{ token: 'keyword.operator',
|
||||
regex: '[+\\-;,/*%]|:=|=' } ] }
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(PascalHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.PascalHighlightRules = PascalHighlightRules;
|
||||
});
|
||||
|
||||
ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
var Range = require("../../range").Range;
|
||||
|
||||
var FoldMode = exports.FoldMode = function() {};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
||||
var range = this.indentationBlock(session, row);
|
||||
if (range)
|
||||
return range;
|
||||
|
||||
var re = /\S/;
|
||||
var line = session.getLine(row);
|
||||
var startLevel = line.search(re);
|
||||
if (startLevel == -1 || line[startLevel] != "#")
|
||||
return;
|
||||
|
||||
var startColumn = line.length;
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
var endRow = row;
|
||||
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var level = line.search(re);
|
||||
|
||||
if (level == -1)
|
||||
continue;
|
||||
|
||||
if (line[level] != "#")
|
||||
break;
|
||||
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
if (endRow > startRow) {
|
||||
var endColumn = session.getLine(endRow).length;
|
||||
return new Range(startRow, startColumn, endRow, endColumn);
|
||||
}
|
||||
};
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
var next = session.getLine(row + 1);
|
||||
var prev = session.getLine(row - 1);
|
||||
var prevIndent = prev.search(/\S/);
|
||||
var nextIndent = next.search(/\S/);
|
||||
|
||||
if (indent == -1) {
|
||||
session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
|
||||
return "";
|
||||
}
|
||||
if (prevIndent == -1) {
|
||||
if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
|
||||
session.foldWidgets[row - 1] = "";
|
||||
session.foldWidgets[row + 1] = "";
|
||||
return "start";
|
||||
}
|
||||
} else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
|
||||
if (session.getLine(row - 2).search(/\S/) == -1) {
|
||||
session.foldWidgets[row - 1] = "start";
|
||||
session.foldWidgets[row + 1] = "";
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
if (prevIndent!= -1 && prevIndent < indent)
|
||||
session.foldWidgets[row - 1] = "start";
|
||||
else
|
||||
session.foldWidgets[row - 1] = "";
|
||||
|
||||
if (indent < nextIndent)
|
||||
return "start";
|
||||
else
|
||||
return "";
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/mode/pascal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pascal_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var PascalHighlightRules = require("./pascal_highlight_rules").PascalHighlightRules;
|
||||
var FoldMode = require("./folding/coffee").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = PascalHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.lineCommentStart = ["--", "//"];
|
||||
this.blockComment = [
|
||||
{start: "(*", end: "*)"},
|
||||
{start: "{", end: "}"}
|
||||
];
|
||||
|
||||
this.$id = "ace/mode/pascal";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
|
|
@ -1,265 +0,0 @@
|
|||
ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var PythonHighlightRules = function() {
|
||||
|
||||
var keywords = (
|
||||
"and|as|assert|break|class|continue|def|del|elif|else|except|exec|" +
|
||||
"finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" +
|
||||
"raise|return|try|while|with|yield"
|
||||
);
|
||||
|
||||
var builtinConstants = (
|
||||
"True|False|None|NotImplemented|Ellipsis|__debug__"
|
||||
);
|
||||
|
||||
var builtinFunctions = (
|
||||
"abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
|
||||
"eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +
|
||||
"binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" +
|
||||
"float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" +
|
||||
"chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" +
|
||||
"cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" +
|
||||
"__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" +
|
||||
"buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern"
|
||||
);
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"invalid.deprecated": "debugger",
|
||||
"support.function": builtinFunctions,
|
||||
"constant.language": builtinConstants,
|
||||
"keyword": keywords
|
||||
}, "identifier");
|
||||
|
||||
var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?";
|
||||
|
||||
var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
|
||||
var octInteger = "(?:0[oO]?[0-7]+)";
|
||||
var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
|
||||
var binInteger = "(?:0[bB][01]+)";
|
||||
var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
|
||||
|
||||
var exponent = "(?:[eE][+-]?\\d+)";
|
||||
var fraction = "(?:\\.\\d+)";
|
||||
var intPart = "(?:\\d+)";
|
||||
var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
|
||||
var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
|
||||
var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
|
||||
|
||||
var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
|
||||
|
||||
this.$rules = {
|
||||
"start" : [ {
|
||||
token : "comment",
|
||||
regex : "#.*$"
|
||||
}, {
|
||||
token : "string", // multi line """ string start
|
||||
regex : strPre + '"{3}',
|
||||
next : "qqstring3"
|
||||
}, {
|
||||
token : "string", // " string
|
||||
regex : strPre + '"(?=.)',
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "string", // multi line ''' string start
|
||||
regex : strPre + "'{3}",
|
||||
next : "qstring3"
|
||||
}, {
|
||||
token : "string", // ' string
|
||||
regex : strPre + "'(?=.)",
|
||||
next : "qstring"
|
||||
}, {
|
||||
token : "constant.numeric", // imaginary
|
||||
regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
|
||||
}, {
|
||||
token : "constant.numeric", // float
|
||||
regex : floatNumber
|
||||
}, {
|
||||
token : "constant.numeric", // long integer
|
||||
regex : integer + "[lL]\\b"
|
||||
}, {
|
||||
token : "constant.numeric", // integer
|
||||
regex : integer + "\\b"
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[\\[\\(\\{]"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "[\\]\\)\\}]"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
} ],
|
||||
"qqstring3" : [ {
|
||||
token : "constant.language.escape",
|
||||
regex : stringEscape
|
||||
}, {
|
||||
token : "string", // multi line """ string end
|
||||
regex : '"{3}',
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken : "string"
|
||||
} ],
|
||||
"qstring3" : [ {
|
||||
token : "constant.language.escape",
|
||||
regex : stringEscape
|
||||
}, {
|
||||
token : "string", // multi line ''' string end
|
||||
regex : "'{3}",
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken : "string"
|
||||
} ],
|
||||
"qqstring" : [{
|
||||
token : "constant.language.escape",
|
||||
regex : stringEscape
|
||||
}, {
|
||||
token : "string",
|
||||
regex : "\\\\$",
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '"|$',
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}],
|
||||
"qstring" : [{
|
||||
token : "constant.language.escape",
|
||||
regex : stringEscape
|
||||
}, {
|
||||
token : "string",
|
||||
regex : "\\\\$",
|
||||
next : "qstring"
|
||||
}, {
|
||||
token : "string",
|
||||
regex : "'|$",
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
};
|
||||
};
|
||||
|
||||
oop.inherits(PythonHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.PythonHighlightRules = PythonHighlightRules;
|
||||
});
|
||||
|
||||
ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(markers) {
|
||||
this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$");
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, match.index);
|
||||
if (match[2])
|
||||
return this.indentationBlock(session, row, match.index + match[2].length);
|
||||
return this.indentationBlock(session, row);
|
||||
}
|
||||
}
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
|
||||
var PythonFoldMode = require("./folding/pythonic").FoldMode;
|
||||
var Range = require("../range").Range;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = PythonHighlightRules;
|
||||
this.foldingRules = new PythonFoldMode("\\:");
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.lineCommentStart = "#";
|
||||
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
var indent = this.$getIndent(line);
|
||||
|
||||
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
|
||||
var tokens = tokenizedLine.tokens;
|
||||
|
||||
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
||||
return indent;
|
||||
}
|
||||
|
||||
if (state == "start") {
|
||||
var match = line.match(/^.*[\{\(\[:]\s*$/);
|
||||
if (match) {
|
||||
indent += tab;
|
||||
}
|
||||
}
|
||||
|
||||
return indent;
|
||||
};
|
||||
|
||||
var outdents = {
|
||||
"pass": 1,
|
||||
"return": 1,
|
||||
"raise": 1,
|
||||
"break": 1,
|
||||
"continue": 1
|
||||
};
|
||||
|
||||
this.checkOutdent = function(state, line, input) {
|
||||
if (input !== "\r\n" && input !== "\r" && input !== "\n")
|
||||
return false;
|
||||
|
||||
var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
|
||||
|
||||
if (!tokens)
|
||||
return false;
|
||||
do {
|
||||
var last = tokens.pop();
|
||||
} while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
|
||||
|
||||
if (!last)
|
||||
return false;
|
||||
|
||||
return (last.type == "keyword" && outdents[last.value]);
|
||||
};
|
||||
|
||||
this.autoOutdent = function(state, doc, row) {
|
||||
|
||||
row += 1;
|
||||
var indent = this.$getIndent(doc.getLine(row));
|
||||
var tab = doc.getTabString();
|
||||
if (indent.slice(-tab.length) == tab)
|
||||
doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/python";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
|
|
@ -1,434 +0,0 @@
|
|||
ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var lang = require("../lib/lang");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var ScssHighlightRules = function() {
|
||||
|
||||
var properties = lang.arrayToMap( (function () {
|
||||
|
||||
var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
|
||||
|
||||
var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
|
||||
"background-size|binding|border-bottom-colors|border-left-colors|" +
|
||||
"border-right-colors|border-top-colors|border-end|border-end-color|" +
|
||||
"border-end-style|border-end-width|border-image|border-start|" +
|
||||
"border-start-color|border-start-style|border-start-width|box-align|" +
|
||||
"box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
|
||||
"box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
|
||||
"column-rule-width|column-rule-style|column-rule-color|float-edge|" +
|
||||
"font-feature-settings|font-language-override|force-broken-image-icon|" +
|
||||
"image-region|margin-end|margin-start|opacity|outline|outline-color|" +
|
||||
"outline-offset|outline-radius|outline-radius-bottomleft|" +
|
||||
"outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
|
||||
"outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
|
||||
"tab-size|text-blink|text-decoration-color|text-decoration-line|" +
|
||||
"text-decoration-style|transform|transform-origin|transition|" +
|
||||
"transition-delay|transition-duration|transition-property|" +
|
||||
"transition-timing-function|user-focus|user-input|user-modify|user-select|" +
|
||||
"window-shadow|border-radius").split("|");
|
||||
|
||||
var properties = ("azimuth|background-attachment|background-color|background-image|" +
|
||||
"background-position|background-repeat|background|border-bottom-color|" +
|
||||
"border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
|
||||
"border-color|border-left-color|border-left-style|border-left-width|" +
|
||||
"border-left|border-right-color|border-right-style|border-right-width|" +
|
||||
"border-right|border-spacing|border-style|border-top-color|" +
|
||||
"border-top-style|border-top-width|border-top|border-width|border|bottom|" +
|
||||
"box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
|
||||
"counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
|
||||
"elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
|
||||
"font-stretch|font-style|font-variant|font-weight|font|height|left|" +
|
||||
"letter-spacing|line-height|list-style-image|list-style-position|" +
|
||||
"list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
|
||||
"margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
|
||||
"min-width|opacity|orphans|outline-color|" +
|
||||
"outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
|
||||
"padding-left|padding-right|padding-top|padding|page-break-after|" +
|
||||
"page-break-before|page-break-inside|page|pause-after|pause-before|" +
|
||||
"pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
|
||||
"size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
|
||||
"stress|table-layout|text-align|text-decoration|text-indent|" +
|
||||
"text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
|
||||
"visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
|
||||
"z-index").split("|");
|
||||
var ret = [];
|
||||
for (var i=0, ln=browserPrefix.length; i<ln; i++) {
|
||||
Array.prototype.push.apply(
|
||||
ret,
|
||||
(( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
|
||||
);
|
||||
}
|
||||
Array.prototype.push.apply(ret, prefixProperties);
|
||||
Array.prototype.push.apply(ret, properties);
|
||||
|
||||
return ret;
|
||||
|
||||
})() );
|
||||
|
||||
|
||||
|
||||
var functions = lang.arrayToMap(
|
||||
("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" +
|
||||
"alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" +
|
||||
"floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" +
|
||||
"nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" +
|
||||
"scale_color|transparentize|type_of|unit|unitless|unquote").split("|")
|
||||
);
|
||||
|
||||
var constants = lang.arrayToMap(
|
||||
("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
|
||||
"block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
|
||||
"char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
|
||||
"decimal-leading-zero|decimal|default|disabled|disc|" +
|
||||
"distribute-all-lines|distribute-letter|distribute-space|" +
|
||||
"distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
|
||||
"hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
|
||||
"ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
|
||||
"ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
|
||||
"inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
|
||||
"keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
|
||||
"lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
|
||||
"medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
|
||||
"nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
|
||||
"overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
|
||||
"ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
|
||||
"solid|square|static|strict|super|sw-resize|table-footer-group|" +
|
||||
"table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
|
||||
"transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
|
||||
"vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
|
||||
"zero").split("|")
|
||||
);
|
||||
|
||||
var colors = lang.arrayToMap(
|
||||
("aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|" +
|
||||
"blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|" +
|
||||
"chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|" +
|
||||
"darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|" +
|
||||
"darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|" +
|
||||
"darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|" +
|
||||
"darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|" +
|
||||
"dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|" +
|
||||
"ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|" +
|
||||
"hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|" +
|
||||
"lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|" +
|
||||
"lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|" +
|
||||
"lightsalmon|lightseagreen|lightskyblue|lightslategray|" +
|
||||
"lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|" +
|
||||
"magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|" +
|
||||
"mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|" +
|
||||
"mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|" +
|
||||
"moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|" +
|
||||
"orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|" +
|
||||
"papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|" +
|
||||
"red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|" +
|
||||
"seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|" +
|
||||
"springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|" +
|
||||
"wheat|white|whitesmoke|yellow|yellowgreen").split("|")
|
||||
);
|
||||
|
||||
var keywords = lang.arrayToMap(
|
||||
("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")
|
||||
)
|
||||
|
||||
var tags = lang.arrayToMap(
|
||||
("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
|
||||
"big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
|
||||
"command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
|
||||
"figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
|
||||
"header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
|
||||
"link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
|
||||
"option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
|
||||
"small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
|
||||
"textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
|
||||
);
|
||||
|
||||
var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
|
||||
|
||||
this.$rules = {
|
||||
"start" : [
|
||||
{
|
||||
token : "comment",
|
||||
regex : "\\/\\/.*$"
|
||||
},
|
||||
{
|
||||
token : "comment", // multi line comment
|
||||
regex : "\\/\\*",
|
||||
next : "comment"
|
||||
}, {
|
||||
token : "string", // single line
|
||||
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
||||
}, {
|
||||
token : "string", // multi line string start
|
||||
regex : '["].*\\\\$',
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "string", // single line
|
||||
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
||||
}, {
|
||||
token : "string", // multi line string start
|
||||
regex : "['].*\\\\$",
|
||||
next : "qstring"
|
||||
}, {
|
||||
token : "constant.numeric",
|
||||
regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
|
||||
}, {
|
||||
token : "constant.numeric", // hex6 color
|
||||
regex : "#[a-f0-9]{6}"
|
||||
}, {
|
||||
token : "constant.numeric", // hex3 color
|
||||
regex : "#[a-f0-9]{3}"
|
||||
}, {
|
||||
token : "constant.numeric",
|
||||
regex : numRe
|
||||
}, {
|
||||
token : ["support.function", "string", "support.function"],
|
||||
regex : "(url\\()(.*)(\\))"
|
||||
}, {
|
||||
token : function(value) {
|
||||
if (properties.hasOwnProperty(value.toLowerCase()))
|
||||
return "support.type";
|
||||
if (keywords.hasOwnProperty(value))
|
||||
return "keyword";
|
||||
else if (constants.hasOwnProperty(value))
|
||||
return "constant.language";
|
||||
else if (functions.hasOwnProperty(value))
|
||||
return "support.function";
|
||||
else if (colors.hasOwnProperty(value.toLowerCase()))
|
||||
return "support.constant.color";
|
||||
else if (tags.hasOwnProperty(value.toLowerCase()))
|
||||
return "variable.language";
|
||||
else
|
||||
return "text";
|
||||
},
|
||||
regex : "\\-?[@a-z_][@a-z0-9_\\-]*"
|
||||
}, {
|
||||
token : "variable",
|
||||
regex : "[a-z_\\-$][a-z0-9_\\-$]*\\b"
|
||||
}, {
|
||||
token: "variable.language",
|
||||
regex: "#[a-z0-9-_]+"
|
||||
}, {
|
||||
token: "variable.language",
|
||||
regex: "\\.[a-z0-9-_]+"
|
||||
}, {
|
||||
token: "variable.language",
|
||||
regex: ":[a-z0-9-_]+"
|
||||
}, {
|
||||
token: "constant",
|
||||
regex: "[a-z0-9-_]+"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[[({]"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "[\\])}]"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
}, {
|
||||
caseInsensitive: true
|
||||
}
|
||||
],
|
||||
"comment" : [
|
||||
{
|
||||
token : "comment", // closing comment
|
||||
regex : "\\*\\/",
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken : "comment"
|
||||
}
|
||||
],
|
||||
"qqstring" : [
|
||||
{
|
||||
token : "string",
|
||||
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
|
||||
next : "start"
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '.+'
|
||||
}
|
||||
],
|
||||
"qstring" : [
|
||||
{
|
||||
token : "string",
|
||||
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
|
||||
next : "start"
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '.+'
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
oop.inherits(ScssHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.ScssHighlightRules = ScssHighlightRules;
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var lang = require("../lib/lang");
|
||||
var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
|
||||
|
||||
var SassHighlightRules = function() {
|
||||
ScssHighlightRules.call(this);
|
||||
var start = this.$rules.start;
|
||||
if (start[1].token == "comment") {
|
||||
start.splice(1, 1, {
|
||||
onMatch: function(value, currentState, stack) {
|
||||
stack.unshift(this.next, -1, value.length - 2, currentState);
|
||||
return "comment";
|
||||
},
|
||||
regex: /^\s*\/\*/,
|
||||
next: "comment"
|
||||
}, {
|
||||
token: "error.invalid",
|
||||
regex: "/\\*|[{;}]"
|
||||
}, {
|
||||
token: "support.type",
|
||||
regex: /^\s*:[\w\-]+\s/
|
||||
});
|
||||
|
||||
this.$rules.comment = [
|
||||
{regex: /^\s*/, onMatch: function(value, currentState, stack) {
|
||||
if (stack[1] === -1)
|
||||
stack[1] = Math.max(stack[2], value.length - 1);
|
||||
if (value.length <= stack[1]) {stack.shift();stack.shift();stack.shift();
|
||||
this.next = stack.shift();
|
||||
return "text";
|
||||
} else {
|
||||
this.next = "";
|
||||
return "comment";
|
||||
}
|
||||
}, next: "start"},
|
||||
{defaultToken: "comment"}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
oop.inherits(SassHighlightRules, ScssHighlightRules);
|
||||
|
||||
exports.SassHighlightRules = SassHighlightRules;
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
var Range = require("../../range").Range;
|
||||
|
||||
var FoldMode = exports.FoldMode = function() {};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
||||
var range = this.indentationBlock(session, row);
|
||||
if (range)
|
||||
return range;
|
||||
|
||||
var re = /\S/;
|
||||
var line = session.getLine(row);
|
||||
var startLevel = line.search(re);
|
||||
if (startLevel == -1 || line[startLevel] != "#")
|
||||
return;
|
||||
|
||||
var startColumn = line.length;
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
var endRow = row;
|
||||
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var level = line.search(re);
|
||||
|
||||
if (level == -1)
|
||||
continue;
|
||||
|
||||
if (line[level] != "#")
|
||||
break;
|
||||
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
if (endRow > startRow) {
|
||||
var endColumn = session.getLine(endRow).length;
|
||||
return new Range(startRow, startColumn, endRow, endColumn);
|
||||
}
|
||||
};
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
var next = session.getLine(row + 1);
|
||||
var prev = session.getLine(row - 1);
|
||||
var prevIndent = prev.search(/\S/);
|
||||
var nextIndent = next.search(/\S/);
|
||||
|
||||
if (indent == -1) {
|
||||
session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
|
||||
return "";
|
||||
}
|
||||
if (prevIndent == -1) {
|
||||
if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
|
||||
session.foldWidgets[row - 1] = "";
|
||||
session.foldWidgets[row + 1] = "";
|
||||
return "start";
|
||||
}
|
||||
} else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
|
||||
if (session.getLine(row - 2).search(/\S/) == -1) {
|
||||
session.foldWidgets[row - 1] = "start";
|
||||
session.foldWidgets[row + 1] = "";
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
if (prevIndent!= -1 && prevIndent < indent)
|
||||
session.foldWidgets[row - 1] = "start";
|
||||
else
|
||||
session.foldWidgets[row - 1] = "";
|
||||
|
||||
if (indent < nextIndent)
|
||||
return "start";
|
||||
else
|
||||
return "";
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules;
|
||||
var FoldMode = require("./folding/coffee").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = SassHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "//";
|
||||
this.$id = "ace/mode/sass";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
});
|
||||
|
|
@ -1,586 +0,0 @@
|
|||
ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var lang = require("../lib/lang");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var ScssHighlightRules = function() {
|
||||
|
||||
var properties = lang.arrayToMap( (function () {
|
||||
|
||||
var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
|
||||
|
||||
var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
|
||||
"background-size|binding|border-bottom-colors|border-left-colors|" +
|
||||
"border-right-colors|border-top-colors|border-end|border-end-color|" +
|
||||
"border-end-style|border-end-width|border-image|border-start|" +
|
||||
"border-start-color|border-start-style|border-start-width|box-align|" +
|
||||
"box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
|
||||
"box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
|
||||
"column-rule-width|column-rule-style|column-rule-color|float-edge|" +
|
||||
"font-feature-settings|font-language-override|force-broken-image-icon|" +
|
||||
"image-region|margin-end|margin-start|opacity|outline|outline-color|" +
|
||||
"outline-offset|outline-radius|outline-radius-bottomleft|" +
|
||||
"outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
|
||||
"outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
|
||||
"tab-size|text-blink|text-decoration-color|text-decoration-line|" +
|
||||
"text-decoration-style|transform|transform-origin|transition|" +
|
||||
"transition-delay|transition-duration|transition-property|" +
|
||||
"transition-timing-function|user-focus|user-input|user-modify|user-select|" +
|
||||
"window-shadow|border-radius").split("|");
|
||||
|
||||
var properties = ("azimuth|background-attachment|background-color|background-image|" +
|
||||
"background-position|background-repeat|background|border-bottom-color|" +
|
||||
"border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
|
||||
"border-color|border-left-color|border-left-style|border-left-width|" +
|
||||
"border-left|border-right-color|border-right-style|border-right-width|" +
|
||||
"border-right|border-spacing|border-style|border-top-color|" +
|
||||
"border-top-style|border-top-width|border-top|border-width|border|bottom|" +
|
||||
"box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
|
||||
"counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
|
||||
"elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
|
||||
"font-stretch|font-style|font-variant|font-weight|font|height|left|" +
|
||||
"letter-spacing|line-height|list-style-image|list-style-position|" +
|
||||
"list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
|
||||
"margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
|
||||
"min-width|opacity|orphans|outline-color|" +
|
||||
"outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
|
||||
"padding-left|padding-right|padding-top|padding|page-break-after|" +
|
||||
"page-break-before|page-break-inside|page|pause-after|pause-before|" +
|
||||
"pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
|
||||
"size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
|
||||
"stress|table-layout|text-align|text-decoration|text-indent|" +
|
||||
"text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
|
||||
"visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
|
||||
"z-index").split("|");
|
||||
var ret = [];
|
||||
for (var i=0, ln=browserPrefix.length; i<ln; i++) {
|
||||
Array.prototype.push.apply(
|
||||
ret,
|
||||
(( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
|
||||
);
|
||||
}
|
||||
Array.prototype.push.apply(ret, prefixProperties);
|
||||
Array.prototype.push.apply(ret, properties);
|
||||
|
||||
return ret;
|
||||
|
||||
})() );
|
||||
|
||||
|
||||
|
||||
var functions = lang.arrayToMap(
|
||||
("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" +
|
||||
"alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" +
|
||||
"floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" +
|
||||
"nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" +
|
||||
"scale_color|transparentize|type_of|unit|unitless|unquote").split("|")
|
||||
);
|
||||
|
||||
var constants = lang.arrayToMap(
|
||||
("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
|
||||
"block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
|
||||
"char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
|
||||
"decimal-leading-zero|decimal|default|disabled|disc|" +
|
||||
"distribute-all-lines|distribute-letter|distribute-space|" +
|
||||
"distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
|
||||
"hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
|
||||
"ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
|
||||
"ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
|
||||
"inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
|
||||
"keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
|
||||
"lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
|
||||
"medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
|
||||
"nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
|
||||
"overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
|
||||
"ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
|
||||
"solid|square|static|strict|super|sw-resize|table-footer-group|" +
|
||||
"table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
|
||||
"transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
|
||||
"vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
|
||||
"zero").split("|")
|
||||
);
|
||||
|
||||
var colors = lang.arrayToMap(
|
||||
("aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|" +
|
||||
"blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|" +
|
||||
"chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|" +
|
||||
"darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|" +
|
||||
"darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|" +
|
||||
"darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|" +
|
||||
"darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|" +
|
||||
"dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|" +
|
||||
"ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|" +
|
||||
"hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|" +
|
||||
"lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|" +
|
||||
"lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|" +
|
||||
"lightsalmon|lightseagreen|lightskyblue|lightslategray|" +
|
||||
"lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|" +
|
||||
"magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|" +
|
||||
"mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|" +
|
||||
"mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|" +
|
||||
"moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|" +
|
||||
"orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|" +
|
||||
"papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|" +
|
||||
"red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|" +
|
||||
"seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|" +
|
||||
"springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|" +
|
||||
"wheat|white|whitesmoke|yellow|yellowgreen").split("|")
|
||||
);
|
||||
|
||||
var keywords = lang.arrayToMap(
|
||||
("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")
|
||||
)
|
||||
|
||||
var tags = lang.arrayToMap(
|
||||
("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
|
||||
"big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
|
||||
"command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
|
||||
"figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
|
||||
"header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
|
||||
"link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
|
||||
"option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
|
||||
"small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
|
||||
"textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
|
||||
);
|
||||
|
||||
var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
|
||||
|
||||
this.$rules = {
|
||||
"start" : [
|
||||
{
|
||||
token : "comment",
|
||||
regex : "\\/\\/.*$"
|
||||
},
|
||||
{
|
||||
token : "comment", // multi line comment
|
||||
regex : "\\/\\*",
|
||||
next : "comment"
|
||||
}, {
|
||||
token : "string", // single line
|
||||
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
||||
}, {
|
||||
token : "string", // multi line string start
|
||||
regex : '["].*\\\\$',
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "string", // single line
|
||||
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
||||
}, {
|
||||
token : "string", // multi line string start
|
||||
regex : "['].*\\\\$",
|
||||
next : "qstring"
|
||||
}, {
|
||||
token : "constant.numeric",
|
||||
regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
|
||||
}, {
|
||||
token : "constant.numeric", // hex6 color
|
||||
regex : "#[a-f0-9]{6}"
|
||||
}, {
|
||||
token : "constant.numeric", // hex3 color
|
||||
regex : "#[a-f0-9]{3}"
|
||||
}, {
|
||||
token : "constant.numeric",
|
||||
regex : numRe
|
||||
}, {
|
||||
token : ["support.function", "string", "support.function"],
|
||||
regex : "(url\\()(.*)(\\))"
|
||||
}, {
|
||||
token : function(value) {
|
||||
if (properties.hasOwnProperty(value.toLowerCase()))
|
||||
return "support.type";
|
||||
if (keywords.hasOwnProperty(value))
|
||||
return "keyword";
|
||||
else if (constants.hasOwnProperty(value))
|
||||
return "constant.language";
|
||||
else if (functions.hasOwnProperty(value))
|
||||
return "support.function";
|
||||
else if (colors.hasOwnProperty(value.toLowerCase()))
|
||||
return "support.constant.color";
|
||||
else if (tags.hasOwnProperty(value.toLowerCase()))
|
||||
return "variable.language";
|
||||
else
|
||||
return "text";
|
||||
},
|
||||
regex : "\\-?[@a-z_][@a-z0-9_\\-]*"
|
||||
}, {
|
||||
token : "variable",
|
||||
regex : "[a-z_\\-$][a-z0-9_\\-$]*\\b"
|
||||
}, {
|
||||
token: "variable.language",
|
||||
regex: "#[a-z0-9-_]+"
|
||||
}, {
|
||||
token: "variable.language",
|
||||
regex: "\\.[a-z0-9-_]+"
|
||||
}, {
|
||||
token: "variable.language",
|
||||
regex: ":[a-z0-9-_]+"
|
||||
}, {
|
||||
token: "constant",
|
||||
regex: "[a-z0-9-_]+"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[[({]"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "[\\])}]"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
}, {
|
||||
caseInsensitive: true
|
||||
}
|
||||
],
|
||||
"comment" : [
|
||||
{
|
||||
token : "comment", // closing comment
|
||||
regex : "\\*\\/",
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken : "comment"
|
||||
}
|
||||
],
|
||||
"qqstring" : [
|
||||
{
|
||||
token : "string",
|
||||
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
|
||||
next : "start"
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '.+'
|
||||
}
|
||||
],
|
||||
"qstring" : [
|
||||
{
|
||||
token : "string",
|
||||
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
|
||||
next : "start"
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '.+'
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
oop.inherits(ScssHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.ScssHighlightRules = ScssHighlightRules;
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var Range = require("../range").Range;
|
||||
|
||||
var MatchingBraceOutdent = function() {};
|
||||
|
||||
(function() {
|
||||
|
||||
this.checkOutdent = function(line, input) {
|
||||
if (! /^\s+$/.test(line))
|
||||
return false;
|
||||
|
||||
return /^\s*\}/.test(input);
|
||||
};
|
||||
|
||||
this.autoOutdent = function(doc, row) {
|
||||
var line = doc.getLine(row);
|
||||
var match = line.match(/^(\s*\})/);
|
||||
|
||||
if (!match) return 0;
|
||||
|
||||
var column = match[1].length;
|
||||
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
||||
|
||||
if (!openBracePos || openBracePos.row == row) return 0;
|
||||
|
||||
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
||||
doc.replace(new Range(row, 0, row, column-1), indent);
|
||||
};
|
||||
|
||||
this.$getIndent = function(line) {
|
||||
return line.match(/^\s*/)[0];
|
||||
};
|
||||
|
||||
}).call(MatchingBraceOutdent.prototype);
|
||||
|
||||
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
||||
});
|
||||
|
||||
ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Behaviour = require("../behaviour").Behaviour;
|
||||
var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
|
||||
var TokenIterator = require("../../token_iterator").TokenIterator;
|
||||
|
||||
var CssBehaviour = function () {
|
||||
|
||||
this.inherit(CstyleBehaviour);
|
||||
|
||||
this.add("colon", "insertion", function (state, action, editor, session, text) {
|
||||
if (text === ':') {
|
||||
var cursor = editor.getCursorPosition();
|
||||
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
||||
var token = iterator.getCurrentToken();
|
||||
if (token && token.value.match(/\s+/)) {
|
||||
token = iterator.stepBackward();
|
||||
}
|
||||
if (token && token.type === 'support.type') {
|
||||
var line = session.doc.getLine(cursor.row);
|
||||
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
||||
if (rightChar === ':') {
|
||||
return {
|
||||
text: '',
|
||||
selection: [1, 1]
|
||||
}
|
||||
}
|
||||
if (!line.substring(cursor.column).match(/^\s*;/)) {
|
||||
return {
|
||||
text: ':;',
|
||||
selection: [1, 1]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.add("colon", "deletion", function (state, action, editor, session, range) {
|
||||
var selected = session.doc.getTextRange(range);
|
||||
if (!range.isMultiLine() && selected === ':') {
|
||||
var cursor = editor.getCursorPosition();
|
||||
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
||||
var token = iterator.getCurrentToken();
|
||||
if (token && token.value.match(/\s+/)) {
|
||||
token = iterator.stepBackward();
|
||||
}
|
||||
if (token && token.type === 'support.type') {
|
||||
var line = session.doc.getLine(range.start.row);
|
||||
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
||||
if (rightChar === ';') {
|
||||
range.end.column ++;
|
||||
return range;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.add("semicolon", "insertion", function (state, action, editor, session, text) {
|
||||
if (text === ';') {
|
||||
var cursor = editor.getCursorPosition();
|
||||
var line = session.doc.getLine(cursor.row);
|
||||
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
||||
if (rightChar === ';') {
|
||||
return {
|
||||
text: '',
|
||||
selection: [1, 1]
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
oop.inherits(CssBehaviour, CstyleBehaviour);
|
||||
|
||||
exports.CssBehaviour = CssBehaviour;
|
||||
});
|
||||
|
||||
ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
ace.define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
|
||||
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
||||
var CssBehaviour = require("./behaviour/css").CssBehaviour;
|
||||
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = ScssHighlightRules;
|
||||
this.$outdent = new MatchingBraceOutdent();
|
||||
this.$behaviour = new CssBehaviour();
|
||||
this.foldingRules = new CStyleFoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
var indent = this.$getIndent(line);
|
||||
var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
|
||||
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
||||
return indent;
|
||||
}
|
||||
|
||||
var match = line.match(/^.*\{\s*$/);
|
||||
if (match) {
|
||||
indent += tab;
|
||||
}
|
||||
|
||||
return indent;
|
||||
};
|
||||
|
||||
this.checkOutdent = function(state, line, input) {
|
||||
return this.$outdent.checkOutdent(line, input);
|
||||
};
|
||||
|
||||
this.autoOutdent = function(state, doc, row) {
|
||||
this.$outdent.autoOutdent(doc, row);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/scss";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
});
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1 +0,0 @@
|
|||
|
||||
20
htdocs/includes/ace/package.json
Normal file
20
htdocs/includes/ace/package.json
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "ace-builds",
|
||||
"main": "./src-noconflict/ace.js",
|
||||
"typings": "ace.d.ts",
|
||||
"version": "1.4.6",
|
||||
"description": "Ace (Ajax.org Cloud9 Editor)",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ajaxorg/ace-builds.git"
|
||||
},
|
||||
"author": "",
|
||||
"license": "BSD-3-Clause",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ajaxorg/ace-builds/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ajaxorg/ace-builds"
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/abap",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "abap";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/ada",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "ada";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/apache_conf",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "apache_conf";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/applescript",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "applescript";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/asciidoc",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "asciidoc";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/assembly_x86",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "assembly_x86";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/autohotkey",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "autohotkey";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/batchfile",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "batchfile";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/bro",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/c9search",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "c9search";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/cirru",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "cirru";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/cobol",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "cobol";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/coldfusion",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "coldfusion";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/csharp",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "csharp";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/curly",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "curly";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/d",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "d";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/dockerfile",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "dockerfile";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/dot",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "dot";
|
||||
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
ace.define("ace/snippets/drools",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText = "\n\
|
||||
snippet rule\n\
|
||||
rule \"${1?:rule_name}\"\n\
|
||||
when\n\
|
||||
${2:// when...} \n\
|
||||
then\n\
|
||||
${3:// then...}\n\
|
||||
end\n\
|
||||
\n\
|
||||
snippet query\n\
|
||||
query ${1?:query_name}\n\
|
||||
${2:// find} \n\
|
||||
end\n\
|
||||
\n\
|
||||
snippet declare\n\
|
||||
declare ${1?:type_name}\n\
|
||||
${2:// attributes} \n\
|
||||
end\n\
|
||||
\n\
|
||||
";
|
||||
exports.scope = "drools";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/eiffel",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "eiffel";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/ejs",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "ejs";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/elixir",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/elm",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "elm";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/forth",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "forth";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/fortran",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "fortran";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/ftl",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "ftl";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/gcode",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "gcode";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/gherkin",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "gherkin";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/gitignore",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "gitignore";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/glsl",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "glsl";
|
||||
|
||||
});
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
ace.define("ace/snippets/gobstones",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText = "# Procedure\n\
|
||||
snippet proc\n\
|
||||
procedure ${1?:name}(${2:argument}) {\n\
|
||||
${3:// body...}\n\
|
||||
}\n\
|
||||
\n\
|
||||
# Function\n\
|
||||
snippet fun\n\
|
||||
function ${1?:name}(${2:argument}) {\n\
|
||||
return ${3:// body...}\n\
|
||||
}\n\
|
||||
\n\
|
||||
# Repeat\n\
|
||||
snippet rep\n\
|
||||
repeat ${1?:times} {\n\
|
||||
${2:// body...}\n\
|
||||
}\n\
|
||||
\n\
|
||||
# For\n\
|
||||
snippet for\n\
|
||||
foreach ${1?:e} in ${2?:list} {\n\
|
||||
${3:// body...} \n\
|
||||
}\n\
|
||||
\n\
|
||||
# If\n\
|
||||
snippet if\n\
|
||||
if (${1?:condition}) {\n\
|
||||
${3:// body...} \n\
|
||||
}\n\
|
||||
\n\
|
||||
# While\n\
|
||||
while (${1?:condition}) {\n\
|
||||
${2:// body...} \n\
|
||||
}\n\
|
||||
";
|
||||
exports.scope = "gobstones";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/golang",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "golang";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/groovy",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "groovy";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/handlebars",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "handlebars";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/haskell_cabal",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "haskell_cabal";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/haxe",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "haxe";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/hjson",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/html_elixir",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "html_elixir";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/html_ruby",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "html_ruby";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/ini",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "ini";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/jack",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "jack";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/jade",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "jade";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/json",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "json";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/jsx",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "jsx";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/julia",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "julia";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/kotlin",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/latex",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "latex";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/lean",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "lean";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/less",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "less";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/liquid",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "liquid";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/lisp",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "lisp";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/live_script",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/livescript",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "livescript";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/logiql",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "logiql";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/luapage",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "luapage";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/lucene",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "lucene";
|
||||
|
||||
});
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
ace.define("ace/snippets/makefile",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText = "snippet ifeq\n\
|
||||
ifeq (${1:cond0},${2:cond1})\n\
|
||||
${3:code}\n\
|
||||
endif\n\
|
||||
";
|
||||
exports.scope = "makefile";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/mask",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "mask";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/matlab",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "matlab";
|
||||
|
||||
});
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
ace.define("ace/snippets/maze",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText = "snippet >\n\
|
||||
description assignment\n\
|
||||
scope maze\n\
|
||||
-> ${1}= ${2}\n\
|
||||
\n\
|
||||
snippet >\n\
|
||||
description if\n\
|
||||
scope maze\n\
|
||||
-> IF ${2:**} THEN %${3:L} ELSE %${4:R}\n\
|
||||
";
|
||||
exports.scope = "maze";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/mel",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "mel";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/mips_assembler",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "mips_assembler";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/mipsassembler",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/mushcode",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "mushcode";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/mysql",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "mysql";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/nix",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "nix";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/nsis",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/objectivec",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "objectivec";
|
||||
|
||||
});
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
ace.define("ace/snippets/ocaml",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText =undefined;
|
||||
exports.scope = "ocaml";
|
||||
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user