package
This commit is contained in:
parent
353d6a6f8a
commit
5caf82408a
8 changed files with 190 additions and 182 deletions
|
|
@ -1,8 +1,58 @@
|
||||||
|
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 bahaviours (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)
|
||||||
|
|
||||||
|
* Bug fixes
|
||||||
|
- Add support for the new OSX scroll bars
|
||||||
|
- properly highlight JavaScript regexp literals
|
||||||
|
- proper handling of unicode characters in JavaScript identifiers
|
||||||
|
- proper highlighting of Ruby namespaces (Chris Wanstrath)
|
||||||
|
- fix remove lines command on last line (Harutyun Amirjanyan)
|
||||||
|
- Clicks which cause the editor to be focused don't reset the selection
|
||||||
|
- fix scroll wheel sluggishness in Safari
|
||||||
|
|
||||||
2011.02.14, Version 0.1.6
|
2011.02.14, Version 0.1.6
|
||||||
|
|
||||||
* Floating Anchors
|
* Floating Anchors
|
||||||
- An Anchor is a floating pointer in the document.
|
- 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
|
- Whenever text is inserted or deleted before the cursor, the position of
|
||||||
|
the cursor is updated
|
||||||
- Usesd for the cursor and selection
|
- Usesd for the cursor and selection
|
||||||
- Basis for bookmarks, multiple cursors and snippets in the future
|
- 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>
|
* Extensive support for Cocoa style keybindings on the Mac <https://github.com/ajaxorg/ace/issues/closed#issue/116/comment/767803>
|
||||||
|
|
@ -16,7 +66,8 @@
|
||||||
- Markers can be in front or behind the text
|
- Markers can be in front or behind the text
|
||||||
- Markers are now stored in the session (was in the renderer)
|
- Markers are now stored in the session (was in the renderer)
|
||||||
* Lots of IE8 fixes including copy, cut and selections
|
* 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>
|
* 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)
|
* 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
|
* 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
|
* The top level editor.html demo has been renamed to index.html
|
||||||
|
|
|
||||||
|
|
@ -2945,6 +2945,8 @@ exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) =
|
||||||
/** Is the user using a browser that identifies itself as WebKit */
|
/** Is the user using a browser that identifies itself as WebKit */
|
||||||
exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined;
|
exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined;
|
||||||
|
|
||||||
|
exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined;
|
||||||
|
|
||||||
exports.isAIR = ua.indexOf("AdobeAIR") >= 0;
|
exports.isAIR = ua.indexOf("AdobeAIR") >= 0;
|
||||||
|
|
||||||
exports.isIPad = ua.indexOf("iPad") >= 0;
|
exports.isIPad = ua.indexOf("iPad") >= 0;
|
||||||
|
|
@ -4187,23 +4189,6 @@ define('pilot/commands/basic', ['require', 'exports', 'module' , 'pilot/typechec
|
||||||
var checks = require("pilot/typecheck");
|
var checks = require("pilot/typecheck");
|
||||||
var canon = require('pilot/canon');
|
var canon = require('pilot/canon');
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
var helpMessages = {
|
|
||||||
plainPrefix:
|
|
||||||
'<h2>Welcome to Skywriter - Code in the Cloud</h2><ul>' +
|
|
||||||
'<li><a href="http://labs.mozilla.com/projects/skywriter" target="_blank">Home Page</a></li>' +
|
|
||||||
'<li><a href="https://wiki.mozilla.org/Labs/Skywriter" target="_blank">Wiki</a></li>' +
|
|
||||||
'<li><a href="https://wiki.mozilla.org/Labs/Skywriter/UserGuide" target="_blank">User Guide</a></li>' +
|
|
||||||
'<li><a href="https://wiki.mozilla.org/Labs/Skywriter/Tips" target="_blank">Tips and Tricks</a></li>' +
|
|
||||||
'<li><a href="https://wiki.mozilla.org/Labs/Skywriter/FAQ" target="_blank">FAQ</a></li>' +
|
|
||||||
'<li><a href="https://wiki.mozilla.org/Labs/Skywriter/DeveloperGuide" target="_blank">Developers Guide</a></li>' +
|
|
||||||
'</ul>',
|
|
||||||
plainSuffix:
|
|
||||||
'For more information, see the <a href="https://wiki.mozilla.org/Labs/Skywriter">Skywriter Wiki</a>.'
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 'help' command
|
* 'help' command
|
||||||
*/
|
*/
|
||||||
|
|
@ -4230,10 +4215,6 @@ var helpCommandSpec = {
|
||||||
} else {
|
} else {
|
||||||
var showHidden = false;
|
var showHidden = false;
|
||||||
|
|
||||||
if (!args.search && helpMessages.plainPrefix) {
|
|
||||||
output.push(helpMessages.plainPrefix);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (command) {
|
if (command) {
|
||||||
// We must be looking at sub-commands
|
// We must be looking at sub-commands
|
||||||
output.push('<h2>Sub-Commands of ' + command.name + '</h2>');
|
output.push('<h2>Sub-Commands of ' + command.name + '</h2>');
|
||||||
|
|
@ -4284,10 +4265,6 @@ var helpCommandSpec = {
|
||||||
output.push('</tr>');
|
output.push('</tr>');
|
||||||
}
|
}
|
||||||
output.push('</table>');
|
output.push('</table>');
|
||||||
|
|
||||||
if (!args.search && helpMessages.plainSuffix) {
|
|
||||||
output.push(helpMessages.plainSuffix);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
request.done(output.join(''));
|
request.done(output.join(''));
|
||||||
|
|
@ -4367,53 +4344,16 @@ var evalCommandSpec = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* 'version' command
|
|
||||||
*/
|
|
||||||
var versionCommandSpec = {
|
|
||||||
name: 'version',
|
|
||||||
description: 'show the Skywriter version',
|
|
||||||
hidden: true,
|
|
||||||
exec: function(env, args, request) {
|
|
||||||
var version = 'Skywriter ' + skywriter.versionNumber + ' (' +
|
|
||||||
skywriter.versionCodename + ')';
|
|
||||||
request.done(version);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 'skywriter' command
|
|
||||||
*/
|
|
||||||
var skywriterCommandSpec = {
|
|
||||||
name: 'skywriter',
|
|
||||||
hidden: true,
|
|
||||||
exec: function(env, args, request) {
|
|
||||||
var index = Math.floor(Math.random() * messages.length);
|
|
||||||
request.done('Skywriter ' + messages[index]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var messages = [
|
|
||||||
'really wants you to trick it out in some way.',
|
|
||||||
'is your Web editor.',
|
|
||||||
'would love to be like Emacs on the Web.',
|
|
||||||
'is written on the Web platform, so you can tweak it.'
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
var canon = require('pilot/canon');
|
var canon = require('pilot/canon');
|
||||||
|
|
||||||
exports.startup = function(data, reason) {
|
exports.startup = function(data, reason) {
|
||||||
canon.addCommand(helpCommandSpec);
|
canon.addCommand(helpCommandSpec);
|
||||||
canon.addCommand(evalCommandSpec);
|
canon.addCommand(evalCommandSpec);
|
||||||
// canon.addCommand(versionCommandSpec);
|
|
||||||
canon.addCommand(skywriterCommandSpec);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.shutdown = function(data, reason) {
|
exports.shutdown = function(data, reason) {
|
||||||
canon.removeCommand(helpCommandSpec);
|
canon.removeCommand(helpCommandSpec);
|
||||||
canon.removeCommand(evalCommandSpec);
|
canon.removeCommand(evalCommandSpec);
|
||||||
// canon.removeCommand(versionCommandSpec);
|
|
||||||
canon.removeCommand(skywriterCommandSpec);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -6628,6 +6568,9 @@ var Editor =function(renderer, session) {
|
||||||
this.$search.set(options);
|
this.$search.set(options);
|
||||||
|
|
||||||
var range = this.$search.find(this.session);
|
var range = this.$search.find(this.session);
|
||||||
|
if (!range)
|
||||||
|
return;
|
||||||
|
|
||||||
this.$tryReplace(range, replacement);
|
this.$tryReplace(range, replacement);
|
||||||
if (range !== null)
|
if (range !== null)
|
||||||
this.selection.setSelectionRange(range);
|
this.selection.setSelectionRange(range);
|
||||||
|
|
@ -6792,13 +6735,15 @@ var TextInput = function(parentNode, host) {
|
||||||
value = value.slice(0, -1);
|
value = value.slice(0, -1);
|
||||||
if (value)
|
if (value)
|
||||||
host.onTextInput(value, !pasted);
|
host.onTextInput(value, !pasted);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
host.onTextInput(value, !pasted);
|
host.onTextInput(value, !pasted);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If editor is no longer focused we quit immediately, since
|
// If editor is no longer focused we quit immediately, since
|
||||||
// it means that something else like CLI is in charge now.
|
// it means that something else is in charge now.
|
||||||
if (!isFocused()) return false;
|
if (!isFocused())
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -6811,6 +6756,13 @@ var TextInput = function(parentNode, host) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var onTextInput = function(e) {
|
var onTextInput = function(e) {
|
||||||
|
setTimeout(function () {
|
||||||
|
if (!inCompostion)
|
||||||
|
sendText(e.data);
|
||||||
|
}, 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
var onKeyPress = function(e) {
|
||||||
if (useragent.isIE && text.value.charCodeAt(0) > 128) return;
|
if (useragent.isIE && text.value.charCodeAt(0) > 128) return;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if (!inCompostion)
|
if (!inCompostion)
|
||||||
|
|
@ -6820,10 +6772,6 @@ var TextInput = function(parentNode, host) {
|
||||||
|
|
||||||
var onCompositionStart = function(e) {
|
var onCompositionStart = function(e) {
|
||||||
inCompostion = true;
|
inCompostion = true;
|
||||||
if (!useragent.isIE) {
|
|
||||||
sendText();
|
|
||||||
text.value = "";
|
|
||||||
};
|
|
||||||
host.onCompositionStart();
|
host.onCompositionStart();
|
||||||
if (!useragent.isGecko) setTimeout(onCompositionUpdate, 0);
|
if (!useragent.isGecko) setTimeout(onCompositionUpdate, 0);
|
||||||
};
|
};
|
||||||
|
|
@ -6836,14 +6784,6 @@ var TextInput = function(parentNode, host) {
|
||||||
var onCompositionEnd = function(e) {
|
var onCompositionEnd = function(e) {
|
||||||
inCompostion = false;
|
inCompostion = false;
|
||||||
host.onCompositionEnd();
|
host.onCompositionEnd();
|
||||||
if (useragent.isGecko) {
|
|
||||||
sendText();
|
|
||||||
} else {
|
|
||||||
setTimeout(function () {
|
|
||||||
if (!inCompostion)
|
|
||||||
sendText();
|
|
||||||
}, 0);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var onCopy = function(e) {
|
var onCopy = function(e) {
|
||||||
|
|
@ -6874,7 +6814,6 @@ var TextInput = function(parentNode, host) {
|
||||||
};
|
};
|
||||||
|
|
||||||
event.addCommandKeyListener(text, host.onCommandKey.bind(host));
|
event.addCommandKeyListener(text, host.onCommandKey.bind(host));
|
||||||
event.addListener(text, "keypress", onTextInput);
|
|
||||||
if (useragent.isIE) {
|
if (useragent.isIE) {
|
||||||
var keytable = { 13:1, 27:1 };
|
var keytable = { 13:1, 27:1 };
|
||||||
event.addListener(text, "keyup", function (e) {
|
event.addListener(text, "keyup", function (e) {
|
||||||
|
|
@ -6886,7 +6825,23 @@ var TextInput = function(parentNode, host) {
|
||||||
inCompostion ? onCompositionUpdate() : onCompositionStart();
|
inCompostion ? onCompositionUpdate() : onCompositionStart();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
event.addListener(text, "textInput", onTextInput);
|
|
||||||
|
if (text.attachEvent) {
|
||||||
|
// Old IE + Opera
|
||||||
|
event.addListener(text, "propertychange", onKeyPress);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (useragent.isChrome || useragent.isSafari)
|
||||||
|
event.addListener(text, "textInput", onTextInput);
|
||||||
|
else if (useragent.isIE)
|
||||||
|
// IE9
|
||||||
|
event.addListener(text, "textinput", onTextInput);
|
||||||
|
else
|
||||||
|
// All browsers except old IE
|
||||||
|
event.addListener(text, "input", onTextInput);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
event.addListener(text, "paste", function(e) {
|
event.addListener(text, "paste", function(e) {
|
||||||
// Mark that the next input text comes from past.
|
// Mark that the next input text comes from past.
|
||||||
pasted = true;
|
pasted = true;
|
||||||
|
|
@ -6895,16 +6850,13 @@ var TextInput = function(parentNode, host) {
|
||||||
if (e.clipboardData && e.clipboardData.getData) {
|
if (e.clipboardData && e.clipboardData.getData) {
|
||||||
sendText(e.clipboardData.getData("text/plain"));
|
sendText(e.clipboardData.getData("text/plain"));
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
} else
|
}
|
||||||
// If a browser doesn't support any of the things above, use the regular
|
else {
|
||||||
// method to detect the pasted input.
|
// If a browser doesn't support any of the things above, use the regular
|
||||||
{
|
// method to detect the pasted input.
|
||||||
onTextInput();
|
onKeyPress();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!useragent.isIE) {
|
|
||||||
event.addListener(text, "propertychange", onTextInput);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (useragent.isIE) {
|
if (useragent.isIE) {
|
||||||
event.addListener(text, "beforecopy", function(e) {
|
event.addListener(text, "beforecopy", function(e) {
|
||||||
|
|
@ -15365,7 +15317,7 @@ define('ace/theme/textmate', ['require', 'exports', 'module' , 'pilot/dom'], fun
|
||||||
}\
|
}\
|
||||||
\
|
\
|
||||||
.ace-tm .ace_marker-layer .ace_active_line {\
|
.ace-tm .ace_marker-layer .ace_active_line {\
|
||||||
background: rgb(232, 242, 254);\
|
background: rgba(0, 0, 0, 0.07);\
|
||||||
}\
|
}\
|
||||||
\
|
\
|
||||||
.ace-tm .ace_marker-layer .ace_selected_word {\
|
.ace-tm .ace_marker-layer .ace_selected_word {\
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
1
build/src/mode-scad.js
Normal file
1
build/src/mode-scad.js
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,8 +1,58 @@
|
||||||
|
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 bahaviours (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)
|
||||||
|
|
||||||
|
* Bug fixes
|
||||||
|
- Add support for the new OSX scroll bars
|
||||||
|
- properly highlight JavaScript regexp literals
|
||||||
|
- proper handling of unicode characters in JavaScript identifiers
|
||||||
|
- proper highlighting of Ruby namespaces (Chris Wanstrath)
|
||||||
|
- fix remove lines command on last line (Harutyun Amirjanyan)
|
||||||
|
- Clicks which cause the editor to be focused don't reset the selection
|
||||||
|
- fix scroll wheel sluggishness in Safari
|
||||||
|
|
||||||
2011.02.14, Version 0.1.6
|
2011.02.14, Version 0.1.6
|
||||||
|
|
||||||
* Floating Anchors
|
* Floating Anchors
|
||||||
- An Anchor is a floating pointer in the document.
|
- 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
|
- Whenever text is inserted or deleted before the cursor, the position of
|
||||||
|
the cursor is updated
|
||||||
- Usesd for the cursor and selection
|
- Usesd for the cursor and selection
|
||||||
- Basis for bookmarks, multiple cursors and snippets in the future
|
- 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>
|
* Extensive support for Cocoa style keybindings on the Mac <https://github.com/ajaxorg/ace/issues/closed#issue/116/comment/767803>
|
||||||
|
|
@ -16,7 +66,8 @@
|
||||||
- Markers can be in front or behind the text
|
- Markers can be in front or behind the text
|
||||||
- Markers are now stored in the session (was in the renderer)
|
- Markers are now stored in the session (was in the renderer)
|
||||||
* Lots of IE8 fixes including copy, cut and selections
|
* 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>
|
* 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)
|
* 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
|
* 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
|
* The top level editor.html demo has been renamed to index.html
|
||||||
|
|
|
||||||
|
|
@ -2934,6 +2934,8 @@ exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) =
|
||||||
/** Is the user using a browser that identifies itself as WebKit */
|
/** Is the user using a browser that identifies itself as WebKit */
|
||||||
exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined;
|
exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined;
|
||||||
|
|
||||||
|
exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined;
|
||||||
|
|
||||||
exports.isAIR = ua.indexOf("AdobeAIR") >= 0;
|
exports.isAIR = ua.indexOf("AdobeAIR") >= 0;
|
||||||
|
|
||||||
exports.isIPad = ua.indexOf("iPad") >= 0;
|
exports.isIPad = ua.indexOf("iPad") >= 0;
|
||||||
|
|
@ -4176,23 +4178,6 @@ __ace_shadowed__.define('pilot/commands/basic', ['require', 'exports', 'module'
|
||||||
var checks = require("pilot/typecheck");
|
var checks = require("pilot/typecheck");
|
||||||
var canon = require('pilot/canon');
|
var canon = require('pilot/canon');
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
var helpMessages = {
|
|
||||||
plainPrefix:
|
|
||||||
'<h2>Welcome to Skywriter - Code in the Cloud</h2><ul>' +
|
|
||||||
'<li><a href="http://labs.mozilla.com/projects/skywriter" target="_blank">Home Page</a></li>' +
|
|
||||||
'<li><a href="https://wiki.mozilla.org/Labs/Skywriter" target="_blank">Wiki</a></li>' +
|
|
||||||
'<li><a href="https://wiki.mozilla.org/Labs/Skywriter/UserGuide" target="_blank">User Guide</a></li>' +
|
|
||||||
'<li><a href="https://wiki.mozilla.org/Labs/Skywriter/Tips" target="_blank">Tips and Tricks</a></li>' +
|
|
||||||
'<li><a href="https://wiki.mozilla.org/Labs/Skywriter/FAQ" target="_blank">FAQ</a></li>' +
|
|
||||||
'<li><a href="https://wiki.mozilla.org/Labs/Skywriter/DeveloperGuide" target="_blank">Developers Guide</a></li>' +
|
|
||||||
'</ul>',
|
|
||||||
plainSuffix:
|
|
||||||
'For more information, see the <a href="https://wiki.mozilla.org/Labs/Skywriter">Skywriter Wiki</a>.'
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 'help' command
|
* 'help' command
|
||||||
*/
|
*/
|
||||||
|
|
@ -4219,10 +4204,6 @@ var helpCommandSpec = {
|
||||||
} else {
|
} else {
|
||||||
var showHidden = false;
|
var showHidden = false;
|
||||||
|
|
||||||
if (!args.search && helpMessages.plainPrefix) {
|
|
||||||
output.push(helpMessages.plainPrefix);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (command) {
|
if (command) {
|
||||||
// We must be looking at sub-commands
|
// We must be looking at sub-commands
|
||||||
output.push('<h2>Sub-Commands of ' + command.name + '</h2>');
|
output.push('<h2>Sub-Commands of ' + command.name + '</h2>');
|
||||||
|
|
@ -4273,10 +4254,6 @@ var helpCommandSpec = {
|
||||||
output.push('</tr>');
|
output.push('</tr>');
|
||||||
}
|
}
|
||||||
output.push('</table>');
|
output.push('</table>');
|
||||||
|
|
||||||
if (!args.search && helpMessages.plainSuffix) {
|
|
||||||
output.push(helpMessages.plainSuffix);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
request.done(output.join(''));
|
request.done(output.join(''));
|
||||||
|
|
@ -4356,53 +4333,16 @@ var evalCommandSpec = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* 'version' command
|
|
||||||
*/
|
|
||||||
var versionCommandSpec = {
|
|
||||||
name: 'version',
|
|
||||||
description: 'show the Skywriter version',
|
|
||||||
hidden: true,
|
|
||||||
exec: function(env, args, request) {
|
|
||||||
var version = 'Skywriter ' + skywriter.versionNumber + ' (' +
|
|
||||||
skywriter.versionCodename + ')';
|
|
||||||
request.done(version);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 'skywriter' command
|
|
||||||
*/
|
|
||||||
var skywriterCommandSpec = {
|
|
||||||
name: 'skywriter',
|
|
||||||
hidden: true,
|
|
||||||
exec: function(env, args, request) {
|
|
||||||
var index = Math.floor(Math.random() * messages.length);
|
|
||||||
request.done('Skywriter ' + messages[index]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var messages = [
|
|
||||||
'really wants you to trick it out in some way.',
|
|
||||||
'is your Web editor.',
|
|
||||||
'would love to be like Emacs on the Web.',
|
|
||||||
'is written on the Web platform, so you can tweak it.'
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
var canon = require('pilot/canon');
|
var canon = require('pilot/canon');
|
||||||
|
|
||||||
exports.startup = function(data, reason) {
|
exports.startup = function(data, reason) {
|
||||||
canon.addCommand(helpCommandSpec);
|
canon.addCommand(helpCommandSpec);
|
||||||
canon.addCommand(evalCommandSpec);
|
canon.addCommand(evalCommandSpec);
|
||||||
// canon.addCommand(versionCommandSpec);
|
|
||||||
canon.addCommand(skywriterCommandSpec);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.shutdown = function(data, reason) {
|
exports.shutdown = function(data, reason) {
|
||||||
canon.removeCommand(helpCommandSpec);
|
canon.removeCommand(helpCommandSpec);
|
||||||
canon.removeCommand(evalCommandSpec);
|
canon.removeCommand(evalCommandSpec);
|
||||||
// canon.removeCommand(versionCommandSpec);
|
|
||||||
canon.removeCommand(skywriterCommandSpec);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -6617,6 +6557,9 @@ var Editor =function(renderer, session) {
|
||||||
this.$search.set(options);
|
this.$search.set(options);
|
||||||
|
|
||||||
var range = this.$search.find(this.session);
|
var range = this.$search.find(this.session);
|
||||||
|
if (!range)
|
||||||
|
return;
|
||||||
|
|
||||||
this.$tryReplace(range, replacement);
|
this.$tryReplace(range, replacement);
|
||||||
if (range !== null)
|
if (range !== null)
|
||||||
this.selection.setSelectionRange(range);
|
this.selection.setSelectionRange(range);
|
||||||
|
|
@ -6781,13 +6724,15 @@ var TextInput = function(parentNode, host) {
|
||||||
value = value.slice(0, -1);
|
value = value.slice(0, -1);
|
||||||
if (value)
|
if (value)
|
||||||
host.onTextInput(value, !pasted);
|
host.onTextInput(value, !pasted);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
host.onTextInput(value, !pasted);
|
host.onTextInput(value, !pasted);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If editor is no longer focused we quit immediately, since
|
// If editor is no longer focused we quit immediately, since
|
||||||
// it means that something else like CLI is in charge now.
|
// it means that something else is in charge now.
|
||||||
if (!isFocused()) return false;
|
if (!isFocused())
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -6800,6 +6745,13 @@ var TextInput = function(parentNode, host) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var onTextInput = function(e) {
|
var onTextInput = function(e) {
|
||||||
|
setTimeout(function () {
|
||||||
|
if (!inCompostion)
|
||||||
|
sendText(e.data);
|
||||||
|
}, 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
var onKeyPress = function(e) {
|
||||||
if (useragent.isIE && text.value.charCodeAt(0) > 128) return;
|
if (useragent.isIE && text.value.charCodeAt(0) > 128) return;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if (!inCompostion)
|
if (!inCompostion)
|
||||||
|
|
@ -6809,10 +6761,6 @@ var TextInput = function(parentNode, host) {
|
||||||
|
|
||||||
var onCompositionStart = function(e) {
|
var onCompositionStart = function(e) {
|
||||||
inCompostion = true;
|
inCompostion = true;
|
||||||
if (!useragent.isIE) {
|
|
||||||
sendText();
|
|
||||||
text.value = "";
|
|
||||||
};
|
|
||||||
host.onCompositionStart();
|
host.onCompositionStart();
|
||||||
if (!useragent.isGecko) setTimeout(onCompositionUpdate, 0);
|
if (!useragent.isGecko) setTimeout(onCompositionUpdate, 0);
|
||||||
};
|
};
|
||||||
|
|
@ -6825,14 +6773,6 @@ var TextInput = function(parentNode, host) {
|
||||||
var onCompositionEnd = function(e) {
|
var onCompositionEnd = function(e) {
|
||||||
inCompostion = false;
|
inCompostion = false;
|
||||||
host.onCompositionEnd();
|
host.onCompositionEnd();
|
||||||
if (useragent.isGecko) {
|
|
||||||
sendText();
|
|
||||||
} else {
|
|
||||||
setTimeout(function () {
|
|
||||||
if (!inCompostion)
|
|
||||||
sendText();
|
|
||||||
}, 0);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var onCopy = function(e) {
|
var onCopy = function(e) {
|
||||||
|
|
@ -6863,7 +6803,6 @@ var TextInput = function(parentNode, host) {
|
||||||
};
|
};
|
||||||
|
|
||||||
event.addCommandKeyListener(text, host.onCommandKey.bind(host));
|
event.addCommandKeyListener(text, host.onCommandKey.bind(host));
|
||||||
event.addListener(text, "keypress", onTextInput);
|
|
||||||
if (useragent.isIE) {
|
if (useragent.isIE) {
|
||||||
var keytable = { 13:1, 27:1 };
|
var keytable = { 13:1, 27:1 };
|
||||||
event.addListener(text, "keyup", function (e) {
|
event.addListener(text, "keyup", function (e) {
|
||||||
|
|
@ -6875,7 +6814,23 @@ var TextInput = function(parentNode, host) {
|
||||||
inCompostion ? onCompositionUpdate() : onCompositionStart();
|
inCompostion ? onCompositionUpdate() : onCompositionStart();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
event.addListener(text, "textInput", onTextInput);
|
|
||||||
|
if (text.attachEvent) {
|
||||||
|
// Old IE + Opera
|
||||||
|
event.addListener(text, "propertychange", onKeyPress);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (useragent.isChrome || useragent.isSafari)
|
||||||
|
event.addListener(text, "textInput", onTextInput);
|
||||||
|
else if (useragent.isIE)
|
||||||
|
// IE9
|
||||||
|
event.addListener(text, "textinput", onTextInput);
|
||||||
|
else
|
||||||
|
// All browsers except old IE
|
||||||
|
event.addListener(text, "input", onTextInput);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
event.addListener(text, "paste", function(e) {
|
event.addListener(text, "paste", function(e) {
|
||||||
// Mark that the next input text comes from past.
|
// Mark that the next input text comes from past.
|
||||||
pasted = true;
|
pasted = true;
|
||||||
|
|
@ -6884,16 +6839,13 @@ var TextInput = function(parentNode, host) {
|
||||||
if (e.clipboardData && e.clipboardData.getData) {
|
if (e.clipboardData && e.clipboardData.getData) {
|
||||||
sendText(e.clipboardData.getData("text/plain"));
|
sendText(e.clipboardData.getData("text/plain"));
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
} else
|
}
|
||||||
// If a browser doesn't support any of the things above, use the regular
|
else {
|
||||||
// method to detect the pasted input.
|
// If a browser doesn't support any of the things above, use the regular
|
||||||
{
|
// method to detect the pasted input.
|
||||||
onTextInput();
|
onKeyPress();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!useragent.isIE) {
|
|
||||||
event.addListener(text, "propertychange", onTextInput);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (useragent.isIE) {
|
if (useragent.isIE) {
|
||||||
event.addListener(text, "beforecopy", function(e) {
|
event.addListener(text, "beforecopy", function(e) {
|
||||||
|
|
@ -15354,7 +15306,7 @@ __ace_shadowed__.define('ace/theme/textmate', ['require', 'exports', 'module' ,
|
||||||
}\
|
}\
|
||||||
\
|
\
|
||||||
.ace-tm .ace_marker-layer .ace_active_line {\
|
.ace-tm .ace_marker-layer .ace_active_line {\
|
||||||
background: rgb(232, 242, 254);\
|
background: rgba(0, 0, 0, 0.07);\
|
||||||
}\
|
}\
|
||||||
\
|
\
|
||||||
.ace-tm .ace_marker-layer .ace_selected_word {\
|
.ace-tm .ace_marker-layer .ace_selected_word {\
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
1
build/textarea/src/mode-scad.js
Normal file
1
build/textarea/src/mode-scad.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue