resin 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/amber/css/amber-normalize.css +73 -73
- data/amber/css/amber-normalize.less +1 -1
- data/amber/css/amber.css +106 -106
- data/amber/css/helios.css +242 -0
- data/amber/images/hsplitter.png +0 -0
- data/amber/images/vsplitter.png +0 -0
- data/amber/js/Benchfib.deploy.js +116 -38
- data/amber/js/Benchfib.js +120 -42
- data/amber/js/Canvas.deploy.js +674 -403
- data/amber/js/Canvas.js +682 -411
- data/amber/js/Compiler-AST.deploy.js +1150 -0
- data/amber/js/Compiler-AST.js +1591 -0
- data/amber/js/Compiler-Core.deploy.js +1562 -0
- data/amber/js/Compiler-Core.js +1972 -0
- data/amber/js/Compiler-Exceptions.deploy.js +114 -0
- data/amber/js/Compiler-Exceptions.js +161 -0
- data/amber/js/Compiler-IR.deploy.js +2326 -0
- data/amber/js/Compiler-IR.js +3146 -0
- data/amber/js/Compiler-Inlining.deploy.js +1147 -0
- data/amber/js/Compiler-Inlining.js +1514 -0
- data/amber/js/Compiler-Semantic.deploy.js +1207 -0
- data/amber/js/Compiler-Semantic.js +1628 -0
- data/amber/js/Compiler-Tests.deploy.js +646 -60
- data/amber/js/Compiler-Tests.js +843 -82
- data/amber/js/Compiler.deploy.js +1097 -159
- data/amber/js/Compiler.js +1414 -161
- data/amber/js/Examples.deploy.js +31 -15
- data/amber/js/Examples.js +33 -17
- data/amber/js/Helios-Announcements.deploy.js +127 -0
- data/amber/js/Helios-Announcements.js +157 -0
- data/amber/js/Helios-Browser.deploy.js +1473 -0
- data/amber/js/Helios-Browser.js +1953 -0
- data/amber/js/Helios-Commands.deploy.js +403 -0
- data/amber/js/Helios-Commands.js +563 -0
- data/amber/js/Helios-Core.deploy.js +1070 -0
- data/amber/js/Helios-Core.js +1445 -0
- data/amber/js/Helios-Environments.deploy.js +132 -0
- data/amber/js/Helios-Environments.js +179 -0
- data/amber/js/Helios-Inspector.deploy.js +855 -0
- data/amber/js/Helios-Inspector.js +1155 -0
- data/amber/js/Helios-KeyBindings.deploy.js +753 -0
- data/amber/js/Helios-KeyBindings.js +1023 -0
- data/amber/js/Helios-Layout.deploy.js +383 -0
- data/amber/js/Helios-Layout.js +523 -0
- data/amber/js/Helios-Workspace.deploy.js +799 -0
- data/amber/js/Helios-Workspace.js +1074 -0
- data/amber/js/IDE.deploy.js +2541 -1490
- data/amber/js/IDE.js +2721 -1660
- data/amber/js/Importer-Exporter.deploy.js +671 -0
- data/amber/js/Importer-Exporter.js +816 -0
- data/amber/js/Kernel-Announcements.deploy.js +137 -20
- data/amber/js/Kernel-Announcements.js +176 -22
- data/amber/js/Kernel-Classes.deploy.js +555 -168
- data/amber/js/Kernel-Classes.js +662 -205
- data/amber/js/Kernel-Collections.deploy.js +1403 -618
- data/amber/js/Kernel-Collections.js +1545 -690
- data/amber/js/Kernel-Exceptions.deploy.js +109 -45
- data/amber/js/Kernel-Exceptions.js +123 -49
- data/amber/js/Kernel-Methods.deploy.js +196 -81
- data/amber/js/Kernel-Methods.js +214 -89
- data/amber/js/Kernel-Objects.deploy.js +1542 -1117
- data/amber/js/Kernel-Objects.js +1593 -1148
- data/amber/js/Kernel-Tests.deploy.js +1725 -772
- data/amber/js/Kernel-Tests.js +2301 -1123
- data/amber/js/Kernel-Transcript.deploy.js +23 -25
- data/amber/js/Kernel-Transcript.js +24 -26
- data/amber/js/SUnit.deploy.js +204 -131
- data/amber/js/SUnit.js +222 -139
- data/amber/js/Spaces.deploy.js +240 -0
- data/amber/js/Spaces.js +326 -0
- data/amber/js/amber.js +26 -7
- data/amber/js/boot.js +65 -47
- data/amber/js/init.js +1 -1
- data/amber/js/lib/CodeMirror/amber.css +21 -21
- data/amber/js/lib/CodeMirror/codemirror.css +119 -13
- data/amber/js/lib/CodeMirror/codemirror.js +2219 -1220
- data/amber/js/lib/CodeMirror/smalltalk.js +134 -129
- data/amber/js/lib/bootstrap/css/bootstrap.css +5837 -0
- data/amber/js/lib/bootstrap/css/bootstrap.min.css +841 -0
- data/amber/js/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
- data/amber/js/lib/bootstrap/img/glyphicons-halflings.png +0 -0
- data/amber/js/lib/bootstrap/js/bootstrap.js +2038 -0
- data/amber/js/lib/bootstrap/js/bootstrap.min.js +7 -0
- data/amber/js/lib/jQuery/jquery-1.8.2.min.js +2 -0
- data/amber/js/lib/jQuery/jquery-ui-1.8.24.custom.min.js +125 -0
- data/amber/st/Compiler-AST.st +505 -0
- data/amber/st/Compiler-Core.st +835 -0
- data/amber/st/Compiler-Exceptions.st +87 -0
- data/amber/st/Compiler-IR.st +1097 -0
- data/amber/st/Compiler-Inlining.st +650 -0
- data/amber/st/Compiler-Semantic.st +558 -0
- data/amber/st/Compiler-Tests.st +285 -381
- data/amber/st/Compiler.st +725 -2
- data/amber/st/Helios-Announcements.st +104 -0
- data/amber/st/Helios-Browser.st +708 -0
- data/amber/st/Helios-Commands.st +223 -0
- data/amber/st/Helios-Core.st +532 -0
- data/amber/st/Helios-Environments.st +98 -0
- data/amber/st/Helios-Inspector.st +367 -0
- data/amber/st/Helios-KeyBindings.st +337 -0
- data/amber/st/Helios-Layout.st +199 -0
- data/amber/st/Helios-Workspace.st +367 -0
- data/amber/st/IDE.st +75 -53
- data/amber/st/Importer-Exporter.st +386 -0
- data/amber/st/Kernel-Announcements.st +92 -0
- data/amber/st/Kernel-Classes.st +137 -15
- data/amber/st/Kernel-Collections.st +137 -47
- data/amber/st/Kernel-Exceptions.st +14 -0
- data/amber/st/Kernel-Methods.st +9 -1
- data/amber/st/Kernel-Objects.st +29 -5
- data/amber/st/Kernel-Tests.st +545 -199
- data/amber/st/SUnit.st +10 -0
- data/amber/st/Spaces.st +142 -0
- data/lib/resin/app.rb +1 -1
- metadata +86 -31
- data/amber/js/lib/jQuery/jquery-1.4.4.min.js +0 -167
- data/amber/js/lib/jQuery/jquery-1.6.4.min.js +0 -4
data/amber/js/amber.js
CHANGED
|
@@ -22,9 +22,9 @@ amber = (function() {
|
|
|
22
22
|
var nocache = '';
|
|
23
23
|
|
|
24
24
|
that.toggleIDE = function() {
|
|
25
|
-
if ($('#
|
|
25
|
+
if ($('#amber').length == 0) {
|
|
26
26
|
smalltalk.Browser._open();
|
|
27
|
-
} else if ($('#
|
|
27
|
+
} else if ($('#amber').is(':visible')) {
|
|
28
28
|
smalltalk.TabManager._current()._close();
|
|
29
29
|
} else {
|
|
30
30
|
smalltalk.TabManager._current()._open();
|
|
@@ -83,10 +83,17 @@ amber = (function() {
|
|
|
83
83
|
'Kernel-Transcript',
|
|
84
84
|
'Kernel-Announcements',
|
|
85
85
|
'Canvas',
|
|
86
|
-
'
|
|
86
|
+
'SUnit',
|
|
87
|
+
'Importer-Exporter',
|
|
88
|
+
'Compiler-Exceptions',
|
|
89
|
+
'Compiler-Core',
|
|
90
|
+
'Compiler-AST',
|
|
91
|
+
'Compiler-Semantic',
|
|
92
|
+
'Compiler-IR',
|
|
93
|
+
'Compiler-Inlining',
|
|
94
|
+
'Compiler-Tests',
|
|
87
95
|
'parser',
|
|
88
96
|
'IDE',
|
|
89
|
-
'SUnit',
|
|
90
97
|
'Examples',
|
|
91
98
|
'Benchfib',
|
|
92
99
|
'Kernel-Tests'
|
|
@@ -149,7 +156,7 @@ amber = (function() {
|
|
|
149
156
|
|
|
150
157
|
function loadDependencies() {
|
|
151
158
|
if (typeof jQuery == 'undefined') {
|
|
152
|
-
writeScriptTag(buildJSURL('lib/jQuery/jquery-1.
|
|
159
|
+
writeScriptTag(buildJSURL('lib/jQuery/jquery-1.8.2.min.js'));
|
|
153
160
|
}
|
|
154
161
|
|
|
155
162
|
if ((typeof jQuery == 'undefined') || (typeof jQuery.ui == 'undefined')) {
|
|
@@ -170,8 +177,9 @@ amber = (function() {
|
|
|
170
177
|
window.smalltalkReady = function() {
|
|
171
178
|
if (spec.ready) {
|
|
172
179
|
spec.ready();
|
|
173
|
-
}
|
|
174
|
-
|
|
180
|
+
};
|
|
181
|
+
evaluateSmalltalkScripts();
|
|
182
|
+
};
|
|
175
183
|
|
|
176
184
|
loadAllJS();
|
|
177
185
|
};
|
|
@@ -217,6 +225,17 @@ amber = (function() {
|
|
|
217
225
|
document.write(scriptString);
|
|
218
226
|
};
|
|
219
227
|
|
|
228
|
+
function evaluateSmalltalkScripts() {
|
|
229
|
+
jQuery(document).ready(function() {
|
|
230
|
+
jQuery('script[type="text/smalltalk"]').each(function(i, elt) {
|
|
231
|
+
smalltalk.send(
|
|
232
|
+
smalltalk.send(smalltalk.Compiler, '_new'),
|
|
233
|
+
'_evaluateExpression_',
|
|
234
|
+
[jQuery(elt).html()])
|
|
235
|
+
});
|
|
236
|
+
})
|
|
237
|
+
};
|
|
238
|
+
|
|
220
239
|
function populateLocalPackages(){
|
|
221
240
|
var localStorageRE = /^smalltalk\.packages\.(.*)$/;
|
|
222
241
|
localPackages = {};
|
data/amber/js/boot.js
CHANGED
|
@@ -172,33 +172,33 @@ function Smalltalk(){
|
|
|
172
172
|
metaclasses. */
|
|
173
173
|
|
|
174
174
|
st.init = function(klass) {
|
|
175
|
-
st.
|
|
175
|
+
st.initClass(klass);
|
|
176
176
|
if(klass.klass && !klass.meta) {
|
|
177
|
-
st.
|
|
177
|
+
st.initClass(klass.klass);
|
|
178
178
|
}
|
|
179
179
|
};
|
|
180
180
|
|
|
181
|
-
st.
|
|
181
|
+
st.initClass = function(klass) {
|
|
182
182
|
var subclasses = st.subclasses(klass);
|
|
183
|
-
var methods,
|
|
183
|
+
var methods, prototype = klass.fn.prototype;
|
|
184
184
|
|
|
185
185
|
if(klass.superclass && klass.superclass !== nil) {
|
|
186
186
|
methods = st.methods(klass.superclass);
|
|
187
187
|
|
|
188
188
|
//Methods linking
|
|
189
|
-
for(var keys=Object.keys(methods),i=0
|
|
190
|
-
var
|
|
191
|
-
if(!
|
|
192
|
-
|
|
193
|
-
Object.defineProperty(
|
|
194
|
-
value: methods[
|
|
189
|
+
for(var keys = Object.keys(methods), i=0; i<keys.length; i++) {
|
|
190
|
+
var key = keys[i];
|
|
191
|
+
if(!prototype.methods[key]) {
|
|
192
|
+
prototype.inheritedMethods[key] = methods[key];
|
|
193
|
+
Object.defineProperty(prototype, methods[key].jsSelector, {
|
|
194
|
+
value: methods[key].fn, configurable: true, writable: true
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
for(var i=0;i<subclasses.length;i++) {
|
|
201
|
-
st.
|
|
200
|
+
for(var i=0; i<subclasses.length; i++) {
|
|
201
|
+
st.initClass(subclasses[i]);
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
204
|
|
|
@@ -218,7 +218,7 @@ function Smalltalk(){
|
|
|
218
218
|
|
|
219
219
|
st.classes = function() {
|
|
220
220
|
var classes = [], names = Object.keys(st), l = names.length;
|
|
221
|
-
for (var i=0; i<l; ++
|
|
221
|
+
for (var i=0; i<l; i++) {
|
|
222
222
|
var name = names[i];
|
|
223
223
|
if (name.search(/^[A-Z]/) !== -1) {
|
|
224
224
|
classes.push(st[name]);
|
|
@@ -232,13 +232,13 @@ function Smalltalk(){
|
|
|
232
232
|
|
|
233
233
|
st.methods = function(klass) {
|
|
234
234
|
var methods = {};
|
|
235
|
-
|
|
236
|
-
for(var i=0,
|
|
237
|
-
methods[
|
|
235
|
+
inheritedMethods = klass.fn.prototype.inheritedMethods;
|
|
236
|
+
for(var i=0, keys=Object.keys(inheritedMethods); i<keys.length; i++) {
|
|
237
|
+
methods[keys[i]] = inheritedMethods[keys[i]];
|
|
238
238
|
}
|
|
239
|
-
|
|
240
|
-
for(var i=0,
|
|
241
|
-
methods[
|
|
239
|
+
var inheritedMethods = klass.fn.prototype.methods;
|
|
240
|
+
for(var i=0, keys=Object.keys(inheritedMethods); i<keys.length; i++) {
|
|
241
|
+
methods[keys[i]] = inheritedMethods[keys[i]];
|
|
242
242
|
}
|
|
243
243
|
return methods;
|
|
244
244
|
};
|
|
@@ -249,8 +249,8 @@ function Smalltalk(){
|
|
|
249
249
|
st.subclasses = function(klass) {
|
|
250
250
|
var subclasses = [];
|
|
251
251
|
var classes = st.classes();
|
|
252
|
-
for(var i=0
|
|
253
|
-
var c = classes[i]
|
|
252
|
+
for(var i=0; i < classes.length; i++) {
|
|
253
|
+
var c = classes[i];
|
|
254
254
|
if(c.fn) {
|
|
255
255
|
//Classes
|
|
256
256
|
if(c.superclass === klass) {
|
|
@@ -304,7 +304,7 @@ function Smalltalk(){
|
|
|
304
304
|
};
|
|
305
305
|
|
|
306
306
|
/* Add a class to the smalltalk object, creating a new one if needed.
|
|
307
|
-
Package is lazily created if it does not exist with given name
|
|
307
|
+
A Package is lazily created if it does not exist with given name. */
|
|
308
308
|
|
|
309
309
|
st.addClass = function(className, superclass, iVarNames, pkgName) {
|
|
310
310
|
var pkg = st.addPackage(pkgName);
|
|
@@ -326,7 +326,7 @@ function Smalltalk(){
|
|
|
326
326
|
|
|
327
327
|
st.addMethod = function(jsSelector, method, klass) {
|
|
328
328
|
Object.defineProperty(klass.fn.prototype, jsSelector, {
|
|
329
|
-
value: method.fn, configurable: true
|
|
329
|
+
value: method.fn, configurable: true, writable: true
|
|
330
330
|
});
|
|
331
331
|
klass.fn.prototype.methods[method.selector] = method;
|
|
332
332
|
method.methodClass = klass;
|
|
@@ -353,14 +353,14 @@ function Smalltalk(){
|
|
|
353
353
|
};
|
|
354
354
|
|
|
355
355
|
function withContextSend(receiver, selector, args, klass) {
|
|
356
|
-
var call,
|
|
356
|
+
var call, method;
|
|
357
357
|
if(receiver == null) {
|
|
358
358
|
receiver = nil;
|
|
359
359
|
}
|
|
360
|
-
|
|
361
|
-
if(
|
|
362
|
-
var context = pushContext(receiver, selector, args);
|
|
363
|
-
call =
|
|
360
|
+
method = klass ? klass.fn.prototype[selector] : receiver.klass && receiver[selector];
|
|
361
|
+
if(method) {
|
|
362
|
+
var context = pushContext(receiver, selector, method, args);
|
|
363
|
+
call = method.apply(receiver, args);
|
|
364
364
|
popContext(context);
|
|
365
365
|
return call;
|
|
366
366
|
} else {
|
|
@@ -372,8 +372,9 @@ function Smalltalk(){
|
|
|
372
372
|
(See the Smalltalk class ErrorHandler and its subclasses */
|
|
373
373
|
|
|
374
374
|
function handleError(error) {
|
|
375
|
-
|
|
376
|
-
|
|
375
|
+
if(!error.cc) {
|
|
376
|
+
smalltalk.ErrorHandler._current()._handleError_(error);
|
|
377
|
+
}
|
|
377
378
|
};
|
|
378
379
|
|
|
379
380
|
/* Handles #dnu: *and* JavaScript method calls.
|
|
@@ -437,21 +438,21 @@ function Smalltalk(){
|
|
|
437
438
|
st.getThisContext = function() {
|
|
438
439
|
if(st.thisContext) {
|
|
439
440
|
return st.thisContext.copy();
|
|
440
|
-
}
|
|
441
|
-
return undefined;
|
|
442
|
-
}*/
|
|
441
|
+
}
|
|
443
442
|
};
|
|
444
443
|
|
|
445
|
-
function pushContext(receiver, selector, temps) {
|
|
444
|
+
function pushContext(receiver, selector, method, temps) {
|
|
446
445
|
var c = st.oldContext, tc = st.thisContext;
|
|
447
446
|
if (!c) {
|
|
448
|
-
return st.thisContext = new SmalltalkMethodContext(receiver, selector, temps, tc);
|
|
447
|
+
return st.thisContext = new SmalltalkMethodContext(receiver, selector, method, temps, tc);
|
|
449
448
|
}
|
|
450
449
|
st.oldContext = null;
|
|
451
450
|
c.homeContext = tc;
|
|
452
|
-
|
|
453
|
-
c.
|
|
454
|
-
|
|
451
|
+
c.pc = 1;
|
|
452
|
+
c.receiver = receiver;
|
|
453
|
+
c.selector = selector;
|
|
454
|
+
c.method = method;
|
|
455
|
+
c.temps = temps || {};
|
|
455
456
|
return st.thisContext = c;
|
|
456
457
|
};
|
|
457
458
|
|
|
@@ -510,24 +511,41 @@ function Smalltalk(){
|
|
|
510
511
|
}
|
|
511
512
|
return object;
|
|
512
513
|
};
|
|
514
|
+
|
|
515
|
+
/* Boolean assertion */
|
|
516
|
+
st.assert = function(boolean) {
|
|
517
|
+
if(boolean.klass === smalltalk.Boolean) {
|
|
518
|
+
return boolean;
|
|
519
|
+
} else {
|
|
520
|
+
smalltalk.NonBooleanReceiver._new()._object_(boolean)._signal();
|
|
521
|
+
}
|
|
522
|
+
}
|
|
513
523
|
};
|
|
514
524
|
|
|
515
|
-
function SmalltalkMethodContext(receiver, selector, temps, home) {
|
|
516
|
-
this.receiver
|
|
517
|
-
|
|
518
|
-
this.
|
|
525
|
+
function SmalltalkMethodContext(receiver, selector, method, temps, home) {
|
|
526
|
+
this.receiver = receiver;
|
|
527
|
+
this.selector = selector;
|
|
528
|
+
this.method = method;
|
|
529
|
+
this.temps = temps || {};
|
|
519
530
|
this.homeContext = home;
|
|
531
|
+
|
|
532
|
+
this.resume = function() {
|
|
533
|
+
//Brutally set the receiver as thisContext, then re-enter the function
|
|
534
|
+
smalltalk.thisContext = this;
|
|
535
|
+
return this.method.apply(receiver, temps);
|
|
536
|
+
};
|
|
520
537
|
};
|
|
521
538
|
|
|
522
539
|
SmalltalkMethodContext.prototype.copy = function() {
|
|
523
540
|
var home = this.homeContext;
|
|
524
541
|
if(home) {home = home.copy()}
|
|
525
542
|
return new SmalltalkMethodContext(
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
543
|
+
this.receiver,
|
|
544
|
+
this.selector,
|
|
545
|
+
this.method,
|
|
546
|
+
this.temps,
|
|
547
|
+
home
|
|
548
|
+
);
|
|
531
549
|
};
|
|
532
550
|
|
|
533
551
|
/* Global Smalltalk objects. */
|
data/amber/js/init.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
.cm-s-
|
|
2
|
-
.cm-s-
|
|
3
|
-
.cm-s-
|
|
4
|
-
.cm-s-
|
|
5
|
-
.cm-s-
|
|
6
|
-
.cm-s-
|
|
7
|
-
.cm-s-
|
|
8
|
-
.cm-s-
|
|
9
|
-
.cm-s-
|
|
10
|
-
.cm-s-
|
|
11
|
-
.cm-s-
|
|
12
|
-
.cm-s-
|
|
13
|
-
.cm-s-
|
|
14
|
-
.cm-s-
|
|
15
|
-
.cm-s-
|
|
16
|
-
.cm-s-
|
|
17
|
-
.cm-s-
|
|
18
|
-
.cm-s-
|
|
19
|
-
.cm-s-
|
|
20
|
-
.cm-s-
|
|
21
|
-
.cm-s-
|
|
1
|
+
.cm-s-amber span.cm-keyword {color: #7F0000; font-weight: bold;}
|
|
2
|
+
.cm-s-amber span.cm-className {font-weight: bold;}
|
|
3
|
+
.cm-s-amber span.cm-assignment {font-weight: bold;}
|
|
4
|
+
.cm-s-amber span.cm-return {font-weight: bold;}
|
|
5
|
+
.cm-s-amber span.cm-atom {color: #219;}
|
|
6
|
+
.cm-s-amber span.cm-number {color: #7F0000;}
|
|
7
|
+
.cm-s-amber span.cm-def {color: #00f;}
|
|
8
|
+
.cm-s-amber span.cm-variable {color: grey;}
|
|
9
|
+
.cm-s-amber span.cm-variable-2 {color: #05a;}
|
|
10
|
+
.cm-s-amber span.cm-variable-3 {color: #0a5;}
|
|
11
|
+
.cm-s-amber span.cm-property {color: black;}
|
|
12
|
+
.cm-s-amber span.cm-operator {color: #00007F;}
|
|
13
|
+
.cm-s-amber span.cm-comment {color: #007F00;}
|
|
14
|
+
.cm-s-amber span.cm-string {color: #7F007F;}
|
|
15
|
+
.cm-s-amber span.cm-meta {color: #555;}
|
|
16
|
+
.cm-s-amber span.cm-error {color: #f00;}
|
|
17
|
+
.cm-s-amber span.cm-qualifier {color: #555;}
|
|
18
|
+
.cm-s-amber span.cm-builtin {color: #30a;}
|
|
19
|
+
.cm-s-amber span.cm-bracket {color: #cc7;}
|
|
20
|
+
.cm-s-amber span.cm-tag {color: #170;}
|
|
21
|
+
.cm-s-amber span.cm-attribute {color: #00c;}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
.CodeMirror {
|
|
2
2
|
line-height: 1em;
|
|
3
3
|
font-family: monospace;
|
|
4
|
+
|
|
5
|
+
/* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */
|
|
6
|
+
position: relative;
|
|
7
|
+
/* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */
|
|
8
|
+
overflow: hidden;
|
|
4
9
|
}
|
|
5
10
|
|
|
6
11
|
.CodeMirror-scroll {
|
|
@@ -9,10 +14,41 @@
|
|
|
9
14
|
/* This is needed to prevent an IE[67] bug where the scrolled content
|
|
10
15
|
is visible outside of the scrolling box. */
|
|
11
16
|
position: relative;
|
|
17
|
+
outline: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Vertical scrollbar */
|
|
21
|
+
.CodeMirror-scrollbar {
|
|
22
|
+
position: absolute;
|
|
23
|
+
right: 0; top: 0;
|
|
24
|
+
overflow-x: hidden;
|
|
25
|
+
overflow-y: scroll;
|
|
26
|
+
z-index: 5;
|
|
27
|
+
}
|
|
28
|
+
.CodeMirror-scrollbar-inner {
|
|
29
|
+
/* This needs to have a nonzero width in order for the scrollbar to appear
|
|
30
|
+
in Firefox and IE9. */
|
|
31
|
+
width: 1px;
|
|
32
|
+
}
|
|
33
|
+
.CodeMirror-scrollbar.cm-sb-overlap {
|
|
34
|
+
/* Ensure that the scrollbar appears in Lion, and that it overlaps the content
|
|
35
|
+
rather than sitting to the right of it. */
|
|
36
|
+
position: absolute;
|
|
37
|
+
z-index: 1;
|
|
38
|
+
float: none;
|
|
39
|
+
right: 0;
|
|
40
|
+
min-width: 12px;
|
|
41
|
+
}
|
|
42
|
+
.CodeMirror-scrollbar.cm-sb-nonoverlap {
|
|
43
|
+
min-width: 12px;
|
|
44
|
+
}
|
|
45
|
+
.CodeMirror-scrollbar.cm-sb-ie7 {
|
|
46
|
+
min-width: 18px;
|
|
12
47
|
}
|
|
13
48
|
|
|
14
49
|
.CodeMirror-gutter {
|
|
15
50
|
position: absolute; left: 0; top: 0;
|
|
51
|
+
z-index: 10;
|
|
16
52
|
background-color: #f7f7f7;
|
|
17
53
|
border-right: 1px solid #eee;
|
|
18
54
|
min-width: 2em;
|
|
@@ -22,9 +58,13 @@
|
|
|
22
58
|
color: #aaa;
|
|
23
59
|
text-align: right;
|
|
24
60
|
padding: .4em .2em .4em .4em;
|
|
61
|
+
white-space: pre !important;
|
|
62
|
+
cursor: default;
|
|
25
63
|
}
|
|
26
64
|
.CodeMirror-lines {
|
|
27
65
|
padding: .4em;
|
|
66
|
+
white-space: pre;
|
|
67
|
+
cursor: text;
|
|
28
68
|
}
|
|
29
69
|
|
|
30
70
|
.CodeMirror pre {
|
|
@@ -38,30 +78,96 @@
|
|
|
38
78
|
padding: 0; margin: 0;
|
|
39
79
|
white-space: pre;
|
|
40
80
|
word-wrap: normal;
|
|
81
|
+
line-height: inherit;
|
|
82
|
+
color: inherit;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.CodeMirror-wrap pre {
|
|
86
|
+
word-wrap: break-word;
|
|
87
|
+
white-space: pre-wrap;
|
|
88
|
+
word-break: normal;
|
|
89
|
+
}
|
|
90
|
+
.CodeMirror-wrap .CodeMirror-scroll {
|
|
91
|
+
overflow-x: hidden;
|
|
41
92
|
}
|
|
42
93
|
|
|
43
94
|
.CodeMirror textarea {
|
|
44
|
-
|
|
45
|
-
font-size: inherit !important;
|
|
95
|
+
outline: none !important;
|
|
46
96
|
}
|
|
47
97
|
|
|
48
|
-
.CodeMirror-cursor {
|
|
98
|
+
.CodeMirror pre.CodeMirror-cursor {
|
|
49
99
|
z-index: 10;
|
|
50
100
|
position: absolute;
|
|
51
101
|
visibility: hidden;
|
|
52
|
-
border-left: 1px solid black
|
|
102
|
+
border-left: 1px solid black;
|
|
103
|
+
border-right: none;
|
|
104
|
+
width: 0;
|
|
105
|
+
}
|
|
106
|
+
.cm-keymap-fat-cursor pre.CodeMirror-cursor {
|
|
107
|
+
width: auto;
|
|
108
|
+
border: 0;
|
|
109
|
+
background: transparent;
|
|
110
|
+
background: rgba(0, 200, 0, .4);
|
|
111
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
|
|
53
112
|
}
|
|
54
|
-
|
|
113
|
+
/* Kludge to turn off filter in ie9+, which also accepts rgba */
|
|
114
|
+
.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
|
|
115
|
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
|
116
|
+
}
|
|
117
|
+
.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
|
|
118
|
+
.CodeMirror-focused pre.CodeMirror-cursor {
|
|
55
119
|
visibility: visible;
|
|
56
120
|
}
|
|
57
121
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
background:
|
|
122
|
+
div.CodeMirror-selected { background: #d9d9d9; }
|
|
123
|
+
.CodeMirror-focused div.CodeMirror-selected { background: #d7d4f0; }
|
|
124
|
+
|
|
125
|
+
.CodeMirror-searching {
|
|
126
|
+
background: #ffa;
|
|
127
|
+
background: rgba(255, 255, 0, .4);
|
|
64
128
|
}
|
|
65
129
|
|
|
66
|
-
|
|
67
|
-
|
|
130
|
+
/* Default theme */
|
|
131
|
+
|
|
132
|
+
.cm-s-default span.cm-keyword {color: #708;}
|
|
133
|
+
.cm-s-default span.cm-atom {color: #219;}
|
|
134
|
+
.cm-s-default span.cm-number {color: #164;}
|
|
135
|
+
.cm-s-default span.cm-def {color: #00f;}
|
|
136
|
+
.cm-s-default span.cm-variable {color: black;}
|
|
137
|
+
.cm-s-default span.cm-variable-2 {color: #05a;}
|
|
138
|
+
.cm-s-default span.cm-variable-3 {color: #085;}
|
|
139
|
+
.cm-s-default span.cm-property {color: black;}
|
|
140
|
+
.cm-s-default span.cm-operator {color: black;}
|
|
141
|
+
.cm-s-default span.cm-comment {color: #a50;}
|
|
142
|
+
.cm-s-default span.cm-string {color: #a11;}
|
|
143
|
+
.cm-s-default span.cm-string-2 {color: #f50;}
|
|
144
|
+
.cm-s-default span.cm-meta {color: #555;}
|
|
145
|
+
.cm-s-default span.cm-error {color: #f00;}
|
|
146
|
+
.cm-s-default span.cm-qualifier {color: #555;}
|
|
147
|
+
.cm-s-default span.cm-builtin {color: #30a;}
|
|
148
|
+
.cm-s-default span.cm-bracket {color: #997;}
|
|
149
|
+
.cm-s-default span.cm-tag {color: #170;}
|
|
150
|
+
.cm-s-default span.cm-attribute {color: #00c;}
|
|
151
|
+
.cm-s-default span.cm-header {color: blue;}
|
|
152
|
+
.cm-s-default span.cm-quote {color: #090;}
|
|
153
|
+
.cm-s-default span.cm-hr {color: #999;}
|
|
154
|
+
.cm-s-default span.cm-link {color: #00c;}
|
|
155
|
+
|
|
156
|
+
span.cm-header, span.cm-strong {font-weight: bold;}
|
|
157
|
+
span.cm-em {font-style: italic;}
|
|
158
|
+
span.cm-emstrong {font-style: italic; font-weight: bold;}
|
|
159
|
+
span.cm-link {text-decoration: underline;}
|
|
160
|
+
|
|
161
|
+
span.cm-invalidchar {color: #f00;}
|
|
162
|
+
|
|
163
|
+
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
|
164
|
+
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
|
165
|
+
|
|
166
|
+
@media print {
|
|
167
|
+
|
|
168
|
+
/* Hide the cursor when printing */
|
|
169
|
+
.CodeMirror pre.CodeMirror-cursor {
|
|
170
|
+
visibility: hidden;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
}
|