try.dartlang.org version 5.

Benchmarks excluded.

Compiled with r22037 and additional patches (https://codereview.chromium.org/116043007/).

R=kasperl@google.com

Review URL: https://codereview.chromium.org//125123002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31539 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
ahe@google.com 2014-01-07 11:31:01 +00:00
parent 82d9dca9dd
commit 118eb6b0dc
23 changed files with 43526 additions and 0 deletions

39
site/try/app.yaml Normal file
View file

@ -0,0 +1,39 @@
application: try-dart-lang
version: 5
runtime: python27
api_version: 1
threadsafe: yes
default_expiration: 1s
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
secure: never
- url: /
static_files: index.html
upload: index.html
secure: never
- url: /nossl.appcache
static_files: nossl.appcache
upload: nossl.appcache
secure: never
- url: /(.*\.(html|js|png|css|dart))
static_files: \1
upload: (.*\.(html|js|png|css|dart))
secure: never
- url: /css/fonts/
static_dir: font
secure: never
error_handlers:
- file: static/not_found.html
libraries:
- name: webapp2
version: "2.5.2"

View file

@ -0,0 +1,118 @@
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library compiler_isolate;
import 'dart:async';
import 'dart:html';
import 'dart:isolate';
import 'dart:uri';
import 'dart:json' show parse;
import '../sdk/lib/_internal/compiler/compiler.dart' as compiler;
const bool THROW_ON_ERROR = false;
final cachedSources = new Map<Uri, String>();
Uri sdkLocation;
List options = [];
compile(source, SendPort replyTo) {
if (sdkLocation == null) {
// The first message received gives us the URI of this web app.
if (source.endsWith('/sdk.dart')) {
var request = new HttpRequest();
request.open('GET', source, async: false);
request.send(null);
sdkLocation = Uri.parse('sdk:/sdk/');
parse(request.responseText).forEach((file, content) {
cachedSources[Uri.parse('sdk:/$file')] = content;
});
} else {
sdkLocation = Uri.parse(source);
}
replyTo.send(null);
return;
}
if (source is List) {
String messageType = (source.length > 0) ? source[0] : null;
var data = (source.length > 1) ? source[1] : null;
if (messageType == 'options') {
options = data as List;
}
return;
}
int charactersRead = 0;
Future<String> inputProvider(Uri uri) {
if (uri.path.endsWith('/lib/html/dart2js/html_dart2js.dart')) {
replyTo.send('dart:html');
}
if (uri.scheme == 'sdk') {
var value = cachedSources[uri];
charactersRead += value.length;
return new Future.value(value);
} else if (uri.scheme == 'http' || uri.scheme == 'https') {
var value = cachedSources.putIfAbsent(uri, () {
var request = new HttpRequest();
request.open('GET', '$uri', async: false);
request.send(null);
return request.responseText;
});
charactersRead += value.length;
return new Future.value(value);
} else if ('$uri' == 'memory:/main.dart') {
charactersRead += source.length;
return new Future.value(source);
}
throw new Exception('Error: Cannot read: $uri');
}
void handler(Uri uri, int begin, int end,
String message, compiler.Diagnostic kind) {
replyTo.send(['diagnostic', { 'uri': '$uri',
'begin': begin,
'end': end,
'message': message,
'kind': kind.name }]);
if (THROW_ON_ERROR && kind == compiler.Diagnostic.ERROR) {
throw new Exception('Throw on error');
}
}
compiler.compile(new Uri('memory:/main.dart'),
sdkLocation,
null,
inputProvider,
handler,
options).then((js) {
try {
if (js == null) {
if (!options.contains('--analyze-only')) replyTo.send('failed');
} else {
var url;
if (options.contains('--verbose')) {
handler(null, 0, 0,
'Compiled ${source.length}/${charactersRead} characters Dart'
' -> ${js.length} characters.',
compiler.Diagnostic.VERBOSE_INFO);
}
try {
// At least Safari and Firefox do not support creating an
// object URL from a web worker. MDN claims that it will be
// supported in Firefox 21.
url = Url.createObjectUrl(new Blob([js], 'application/javascript'));
} catch (_) {
// Ignored.
}
if (url != null) {
replyTo.send(['url', url]);
} else {
replyTo.send(['code', js]);
}
}
} catch (e, trace) {
replyTo.send(['crash', '$e, $trace']);
}
replyTo.send('done');
});
}

View file

@ -0,0 +1,30 @@
#!/bin/bash
echo CACHE MANIFEST
date +'# %s'
echo CACHE:
PKG_DIR="$(cd $(dirname ${0})/../pkg ; pwd)"
SDK_DIR="$(cd $(dirname ${0})/../sdk ; pwd)"
LIVE_DIR="$(cd $(dirname ${0})/../web_editor ; pwd)"
echo ${PKG_DIR}/browser/lib/dart.js | sed -e "s|$(pwd)/||"
# find ${SDK_DIR} \
# \( -name dartdoc -o -name pub -o -name dartium \) -prune \
# -o -name \*.dart -print \
# | sed -e "s|$(pwd)/||"
find ${LIVE_DIR} \
\( -name \*~ \) -prune \
-o -type f -print | sed -e "s|$(pwd)/||"
echo iframe.html
echo iframe.js
echo dart-icon.png
echo dart-iphone5.png
echo NETWORK:
echo '*'

BIN
site/try/dart-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

BIN
site/try/dart-iphone5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because one or more lines are too long

101
site/try/decoration.dart Normal file
View file

@ -0,0 +1,101 @@
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library trydart.decoration;
import 'dart:html';
class Decoration {
final String color;
final bool bold;
final bool italic;
final bool stress;
final bool important;
const Decoration({this.color: '#000000',
this.bold: false,
this.italic: false,
this.stress: false,
this.important: false});
Element applyTo(text) {
if (text is String) {
text = new Text(text);
}
if (bold) {
text = new Element.tag('b')..append(text);
}
if (italic) {
text = new Element.tag('i')..append(text);
}
if (stress) {
text = new Element.tag('em')..append(text);
}
if (important) {
text = new Element.tag('strong')..append(text);
}
return new SpanElement()..append(text)..style.color = color;
}
}
class DiagnosticDecoration extends Decoration {
final String kind;
final String message;
const DiagnosticDecoration(
this.kind,
this.message,
{String color: '#000000',
bool bold: false,
bool italic: false,
bool stress: false,
bool important: false})
: super(color: color, bold: bold, italic: italic, stress: stress,
important: important);
Element applyTo(text) {
var element = super.applyTo(text);
var nodes = new List.from(element.nodes);
element.nodes.clear();
var tip = new Text('');
if (kind == 'error') {
tip = error(message);
}
return element..append(
new AnchorElement()
..classes.add('diagnostic')
..nodes.addAll(nodes)
..append(tip));
}
}
info(text) {
if (text is String) {
text = new Text(text);
}
return new SpanElement()
..classes.addAll(['alert', 'alert-info'])
..style.opacity = '0.75'
..append(text);
}
error(text) {
if (text is String) {
text = new Text(text);
}
return new SpanElement()
..classes.addAll(['alert', 'alert-error'])
..style.opacity = '0.75'
..append(text);
}
warning(text) {
if (text is String) {
text = new Text(text);
}
return new SpanElement()
..classes.add('alert')
..style.opacity = '0.75'
..append(text);
}

6
site/try/deploy.sh Normal file
View file

@ -0,0 +1,6 @@
old=$1
new=$2
echo git checkout-index -a -f --prefix=$new/
echo rm -rf $old
echo sh $new/dart/web_editor/create_manifest.sh \> live.appcache
echo sed -e "'s/$old/$new/'" -i.$old index.html

View file

@ -0,0 +1,83 @@
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:io';
StringBuffer themes = new StringBuffer();
void main() {
print('part of trydart.themes;\n');
new Options().arguments.forEach(extractTheme);
print('''
/// List of known themes. The default is the first theme.
const List<Theme> THEMES = const <Theme> [
const Theme(),
$themes];''');
}
final DECORATION_PATTERN = new RegExp(r'^ *<([a-z][^ ]+)[ ]');
String attr(String name, String line) {
var match = new RegExp('$name'r'="([^"]*)"').firstMatch(line);
if (match == null) return null;
return match[1];
}
void extractTheme(String filename) {
bool openedTheme = false;
for (String line in new File(filename).readAsLinesSync()) {
if (line.startsWith('<colorTheme')) {
openTheme(line, filename);
openedTheme = true;
} else if (line.startsWith('</colorTheme>')) {
if (!openedTheme) throw 'Theme not found in $filename';
closeTheme();
openedTheme = false;
} else if (DECORATION_PATTERN.hasMatch(line)) {
if (!openedTheme) throw 'Theme not found in $filename';
printDecoration(line);
}
}
}
openTheme(String line, String filename) {
var name = attr('name', line);
var author = attr('author', line);
if (name == null) name = 'Untitled';
if (name == 'Default') name = 'Dart Editor';
var declaration = name.replaceAll(new RegExp('[^a-zA-Z0-9_]'), '_');
themes.write(' const ${declaration}Theme(),\n');
print('/// $name theme extracted from');
print('/// $filename.');
if (author != null) {
print('/// Author: $author.');
}
print("""
class ${declaration}Theme extends Theme {
const ${declaration}Theme();
String get name => '$name';
""");
}
closeTheme() {
print('}\n');
}
printDecoration(String line) {
String name = DECORATION_PATTERN.firstMatch(line)[1];
if (name == 'class') name = 'className';
if (name == 'enum') name = 'enumName';
StringBuffer properties = new StringBuffer();
var color = attr('color', line);
if (color != null) {
properties.write("color: '$color'");
}
var bold = attr('bold', line) == 'true';
if (bold) {
if (!properties.isEmpty) properties.write(', ');
properties.write('bold: true');
}
print(' Decoration get $name => const Decoration($properties);');
}

File diff suppressed because it is too large Load diff

BIN
site/try/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

15
site/try/iframe.html Normal file
View file

@ -0,0 +1,15 @@
<!--
Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
for details. All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.
-->
<!DOCTYPE html>
<html lang="en" manifest="nossl.appcache">
<head>
<title>JavaScript output</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
</head>
<body>
<script type="application/javascript" src="iframe.js"></script>
</body>
</html>

45
site/try/iframe.js Normal file
View file

@ -0,0 +1,45 @@
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
function dartPrint(msg) {
window.parent.postMessage(String(msg), "*");
}
window.onerror = function (message, url, lineNumber) {
window.parent.postMessage(
["error", {message: message, url: url, lineNumber: lineNumber}], "*");
};
function onMessageReceived(event) {
var data = event.data;
if (data instanceof Array) {
if (data.length == 2 && data[0] == 'source') {
var script = document.createElement('script');
script.innerHTML = data[1];
script.type = 'application/javascript';
document.head.appendChild(script);
return;
}
}
}
window.addEventListener("message", onMessageReceived, false);
(function () {
function postScrollHeight() {
window.parent.postMessage(["scrollHeight", document.documentElement.scrollHeight], "*");
}
var observer = new (window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)(function(mutations) {
postScrollHeight()
window.setTimeout(postScrollHeight, 500);
});
observer.observe(
document.body,
{ attributes: true,
childList: true,
characterData: true,
subtree: true });
})();

150
site/try/index.html Normal file
View file

@ -0,0 +1,150 @@
<!DOCTYPE html>
<!--
Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
for details. All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.
-->
<html lang="en" manifest="nossl.appcache" itemscope itemtype="http://schema.org/Product">
<head>
<meta charset="utf-8">
<title>Try Dart!</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<link rel="stylesheet" type="text/css" href="dartlang-style.css">
<style>
a.diagnostic {
/* position: relative; */
color: inherit;
border-bottom: 2px dotted red;
}
a:hover.diagnostic {
text-decoration: none;
}
a.diagnostic span {
display: none;
}
a:hover.diagnostic span {
display: block;
position: absolute;
/* left: 1em; */
/* top: 2em; */
right: 10px;
}
.offline {
transition: opacity 10s;
-webkit-transition: opacity 10s;
}
.offlineyay {
font-weight: bolder;
opacity: 0.0;
}
</style>
<meta itemprop="name" content="Try Dart!">
<meta itemprop="description" content="Write and run Dart code in your browser. Dart is a class-based, object-oriented language with lexical scoping, closures, and optional static typing.">
<meta name="description" content="Write and run Dart code in your browser. Dart is a class-based, object-oriented language with lexical scoping, closures, and optional static typing.">
<meta itemprop="image" content="try-dart-screenshot.png">
<link rel="dart-sdk" href="sdk.dart">
<link rel="benchmark-DeltaBlue" href="benchmarks/DeltaBlue.dart">
<link rel="benchmark-Richards" href="benchmarks/Richards.dart">
<link rel="benchmark-base" href="benchmarks/benchmark_base.dart">
<link href="favicon.ico" rel="icon" type="image/x-icon">
<meta name="viewport" content="initial-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" href="dart-icon.png">
<meta names="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-startup-image"
media="(device-width: 320px)
and (device-height: 568px)
and (-webkit-device-pixel-ratio: 2)"
href="dart-iphone5.png">
<!-- Enable Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-26406144-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="//www.dartlang.org/" title="Dart Homepage" target="_blank">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJxQTFRFAAAAAIvMdsvDAIvMdsvDAIvMdsvDLaTJAIvMOqnHdsvDAIvMdsvDAIvMKaLJdsvDAIvMAIvMdsvDAIvMdsvDdsvDAIvMAIvMAZnFdsvDAILHAIPHAITIAIXJAIfKAIjKAIrLAIrMAIvMAJXHAJjFC5i/I6HENr2yOb6zPr+0TsK4UsO5WbnEWcW8Xsa9Yse+Zsi/asjAc8rCdsvDdt4SRQAAABp0Uk5TABAQICAwMFBgYGBwcICAgI+vr7+/z9/v7+97IXGnAAAAqUlEQVQYV13QxxaCQBBE0VZkjBgAGVEBaVEUM/P//yaTGg5vV3dZANTCZ9BvFAoR93kVC9FnthW6uIPTJ7UkdHaXvS2LXKNBURInyDXPsShbzjU7XCpxhooDVGo5QcQAJmjUco64AY/UcIrowYCTaj5KBZeTaj5JBTc6l11OlQKMf497y1ahefFb3TQfcqtM/fipJF/X9gnDon6/ah/aDDfNOgosNA2b8QdGciZlh/U93AAAAABJRU5ErkJggg==" alt="Dart">
</a>
<ul class="nav pull-right"><li><a href="#" id="settings"><i class="icon-cog"></i></a></li></ul>
<ul class="nav hidden-phone">
<li class="active"><a>Try Dart!</a></li>
<li><a href="//api.dartlang.org/" target="_blank">API Reference</a></li>
</ul>
<form class="navbar-search pull-right hidden-phone" action="//www.dartlang.org/search.html" id="cse-search-box" target="_blank">
<input type="hidden" name="ie" value="UTF-8">
<input type="hidden" name="hl" value="en">
<input type="search" name="q" class="search-query" id="q" autocomplete="off" placeholder="Search">
</form>
<ul class="nav pull-right"><li><a><span id="appcache-status" class="offline">offline status</span></a></li></ul>
</div>
</div>
</div>
<div class="container-fluid">
<article class="homepage">
<section>
<div class="callouts row-fluid">
<div class="span6" id="try-dart-column">
<h2><i class="icon-play"></i> Try Dart! <select id="inspiration"></select></h2>
</div>
<div class="span6" id="run-dart-column">
<h2><i class="icon-cogs"></i> See Dart</h2>
</div>
</div>
</section>
</article>
</div>
<div id="settings-dialog" class="modal hide fade">
<div class="modal-header">
<h3>Settings</h3>
</div>
<div class="modal-body" id="settings-body">
</div>
<div class="modal-footer">
<a href="#" class="btn btn-primary" id="settings-done">Done</a>
</div>
</div>
<footer>
<div class="container">
<div class="row copyright">
<div class="span8 offset2">
<p>
Except as otherwise <a href="http://code.google.com/policies.html#restrictions">noted</a>, the content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 License</a>, and code samples are licensed under the <a href="http://code.google.com/google_bsd_license.html">BSD License</a>.
</p>
<p>
<a href="//www.dartlang.org/tos.html">Terms of Service</a>
<a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
</p>
</div>
</div>
</div>
</footer>
<!--
<script type="application/javascript" src="https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/browser/lib/dart.js"></script>
<script type="application/dart" src="leap.dart"></script>
-->
<script type="application/javascript" src="leap.dart.js"></script>
</body>
</html>

174
site/try/jsonify.dart Normal file
View file

@ -0,0 +1,174 @@
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:io';
import 'dart:json';
main() {
var map = {};
for (String file in SDK_FILES) {
map[file] = new File(file).readAsStringSync();
}
print(stringify(map));
}
const SDK_FILES = const [
'sdk/lib/_collection_dev/arrays.dart',
'sdk/lib/_collection_dev/collection_dev.dart',
'sdk/lib/_collection_dev/iterable.dart',
'sdk/lib/_collection_dev/list.dart',
'sdk/lib/_collection_dev/sort.dart',
'sdk/lib/_collection_dev/symbol.dart',
'sdk/lib/_collection_dev/to_string.dart',
'sdk/lib/_internal/compiler/implementation/lib/async_patch.dart',
'sdk/lib/_internal/compiler/implementation/lib/collection_dev_patch.dart',
'sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart',
'sdk/lib/_internal/compiler/implementation/lib/constant_map.dart',
'sdk/lib/_internal/compiler/implementation/lib/core_patch.dart',
'sdk/lib/_internal/compiler/implementation/lib/foreign_helper.dart',
'sdk/lib/_internal/compiler/implementation/lib/interceptors.dart',
'sdk/lib/_internal/compiler/implementation/lib/io_patch.dart',
'sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart',
'sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart',
'sdk/lib/_internal/compiler/implementation/lib/js_array.dart',
'sdk/lib/_internal/compiler/implementation/lib/js_helper.dart',
'sdk/lib/_internal/compiler/implementation/lib/js_number.dart',
'sdk/lib/_internal/compiler/implementation/lib/js_rti.dart',
'sdk/lib/_internal/compiler/implementation/lib/js_string.dart',
'sdk/lib/_internal/compiler/implementation/lib/json_patch.dart',
'sdk/lib/_internal/compiler/implementation/lib/math_patch.dart',
'sdk/lib/_internal/compiler/implementation/lib/mirrors_patch.dart',
'sdk/lib/_internal/compiler/implementation/lib/native_helper.dart',
'sdk/lib/_internal/compiler/implementation/lib/regexp_helper.dart',
'sdk/lib/_internal/compiler/implementation/lib/scalarlist_patch.dart',
'sdk/lib/_internal/compiler/implementation/lib/string_helper.dart',
'sdk/lib/_internal/compiler/implementation/lib/typed_data_patch.dart',
'sdk/lib/_internal/libraries.dart',
'sdk/lib/async/async.dart',
'sdk/lib/async/async_error.dart',
'sdk/lib/async/deferred_load.dart',
'sdk/lib/async/event_loop.dart',
'sdk/lib/async/future.dart',
'sdk/lib/async/future_impl.dart',
'sdk/lib/async/stream.dart',
'sdk/lib/async/stream_controller.dart',
'sdk/lib/async/stream_impl.dart',
'sdk/lib/async/stream_pipe.dart',
'sdk/lib/async/timer.dart',
'sdk/lib/chrome/dart2js/chrome_dart2js.dart',
'sdk/lib/collection/collection.dart',
'sdk/lib/collection/collections.dart',
'sdk/lib/collection/hash_map.dart',
'sdk/lib/collection/hash_set.dart',
'sdk/lib/collection/iterable.dart',
'sdk/lib/collection/iterator.dart',
'sdk/lib/collection/linked_hash_map.dart',
'sdk/lib/collection/linked_hash_set.dart',
'sdk/lib/collection/list.dart',
'sdk/lib/collection/maps.dart',
'sdk/lib/collection/queue.dart',
'sdk/lib/collection/splay_tree.dart',
'sdk/lib/core/bool.dart',
'sdk/lib/core/comparable.dart',
'sdk/lib/core/core.dart',
'sdk/lib/core/date_time.dart',
'sdk/lib/core/double.dart',
'sdk/lib/core/duration.dart',
'sdk/lib/core/errors.dart',
'sdk/lib/core/exceptions.dart',
'sdk/lib/core/expando.dart',
'sdk/lib/core/function.dart',
'sdk/lib/core/identical.dart',
'sdk/lib/core/int.dart',
'sdk/lib/core/invocation.dart',
'sdk/lib/core/iterable.dart',
'sdk/lib/core/iterator.dart',
'sdk/lib/core/list.dart',
'sdk/lib/core/map.dart',
'sdk/lib/core/num.dart',
'sdk/lib/core/object.dart',
'sdk/lib/core/pattern.dart',
'sdk/lib/core/print.dart',
'sdk/lib/core/regexp.dart',
'sdk/lib/core/set.dart',
'sdk/lib/core/stacktrace.dart',
'sdk/lib/core/stopwatch.dart',
'sdk/lib/core/string.dart',
'sdk/lib/core/string_buffer.dart',
'sdk/lib/core/string_sink.dart',
'sdk/lib/core/symbol.dart',
'sdk/lib/core/type.dart',
'sdk/lib/crypto/crypto.dart',
'sdk/lib/crypto/crypto_utils.dart',
'sdk/lib/crypto/hash_utils.dart',
'sdk/lib/crypto/hmac.dart',
'sdk/lib/crypto/md5.dart',
'sdk/lib/crypto/sha1.dart',
'sdk/lib/crypto/sha256.dart',
'sdk/lib/html/dart2js/html_dart2js.dart',
'sdk/lib/html/html_common/conversions.dart',
'sdk/lib/html/html_common/device.dart',
'sdk/lib/html/html_common/filtered_element_list.dart',
'sdk/lib/html/html_common/html_common.dart',
'sdk/lib/html/html_common/html_common_dart2js.dart',
'sdk/lib/html/html_common/lists.dart',
'sdk/lib/html/html_common/metadata.dart',
'sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart',
'sdk/lib/io/base64.dart',
'sdk/lib/io/buffer_list.dart',
'sdk/lib/io/common.dart',
'sdk/lib/io/data_transformer.dart',
'sdk/lib/io/directory.dart',
'sdk/lib/io/directory_impl.dart',
'sdk/lib/io/eventhandler.dart',
'sdk/lib/io/file.dart',
'sdk/lib/io/file_impl.dart',
'sdk/lib/io/file_system_entity.dart',
'sdk/lib/io/http.dart',
'sdk/lib/io/http_body.dart',
'sdk/lib/io/http_body_impl.dart',
'sdk/lib/io/http_headers.dart',
'sdk/lib/io/http_impl.dart',
'sdk/lib/io/http_parser.dart',
'sdk/lib/io/http_session.dart',
'sdk/lib/io/http_utils.dart',
'sdk/lib/io/io.dart',
'sdk/lib/io/io_sink.dart',
'sdk/lib/io/link.dart',
'sdk/lib/io/mime_multipart_parser.dart',
'sdk/lib/io/options.dart',
'sdk/lib/io/path.dart',
'sdk/lib/io/path_impl.dart',
'sdk/lib/io/platform.dart',
'sdk/lib/io/platform_impl.dart',
'sdk/lib/io/process.dart',
'sdk/lib/io/secure_server_socket.dart',
'sdk/lib/io/secure_socket.dart',
'sdk/lib/io/socket.dart',
'sdk/lib/io/stdio.dart',
'sdk/lib/io/string_transformer.dart',
'sdk/lib/io/timer_impl.dart',
'sdk/lib/io/websocket.dart',
'sdk/lib/io/websocket_impl.dart',
'sdk/lib/isolate/isolate.dart',
'sdk/lib/isolate/isolate_stream.dart',
'sdk/lib/json/json.dart',
'sdk/lib/math/math.dart',
'sdk/lib/math/random.dart',
'sdk/lib/mirrors/mirrors.dart',
'sdk/lib/svg/dart2js/svg_dart2js.dart',
'sdk/lib/typed_data/dart2js/typed_data_dart2js.dart',
'sdk/lib/typed_data/typed_data.dart',
'sdk/lib/uri/encode_decode.dart',
'sdk/lib/uri/helpers.dart',
'sdk/lib/uri/uri.dart',
'sdk/lib/utf/utf.dart',
'sdk/lib/utf/utf16.dart',
'sdk/lib/utf/utf32.dart',
'sdk/lib/utf/utf8.dart',
'sdk/lib/utf/utf_stream.dart',
'sdk/lib/web_audio/dart2js/web_audio_dart2js.dart',
'sdk/lib/web_gl/dart2js/web_gl_dart2js.dart',
'sdk/lib/web_sql/dart2js/web_sql_dart2js.dart',
];

1267
site/try/leap.dart Normal file

File diff suppressed because it is too large Load diff

15134
site/try/leap.dart.js Normal file

File diff suppressed because it is too large Load diff

22
site/try/nossl.appcache Normal file
View file

@ -0,0 +1,22 @@
CACHE MANIFEST
# Version 5
CACHE:
index.html
dartlang-style.css
leap.dart.js
iframe.html
iframe.js
benchmarks/benchmark_base.dart
dart-icon.png
benchmarks/Richards.dart
benchmarks/DeltaBlue.dart
dart-iphone5.png
part.js
sdk.dart
/css/fonts/fontawesome-webfont.woff?v=3.0.1
NETWORK:
*

24734
site/try/part.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,79 @@
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
part of trydart.themes;
/// Default theme extracted from
/// editor/tools/plugins/com.google.dart.tools.deploy/themes/default.xml
class Theme {
static named(String name) {
if (name == null) return THEMES[0];
return THEMES.firstWhere(
(theme) => name == theme.name,
orElse: () => THEMES[0]);
}
const Theme();
String get name => 'Default';
Decoration get abstractMethod => const Decoration(color: '#000000');
Decoration get annotation => const Decoration(color: '#000000');
Decoration get background => const Decoration(color: '#ffffff');
Decoration get bracket => const Decoration(color: '#000000');
Decoration get builtin => const Decoration(color: '#7e0854', bold: true);
Decoration get className => const Decoration(color: '#000000');
Decoration get commentTaskTag => const Decoration(color: '#606060');
Decoration get constant => const Decoration(color: '#000000');
Decoration get currentLine => const Decoration(color: '#F0F0F0');
Decoration get deletionIndication => const Decoration(color: '#000000');
Decoration get deprecatedMember => const Decoration(color: '#000000');
Decoration get directive => const Decoration(color: '#7e0854', bold: true);
Decoration get dynamicType => const Decoration(color: '#000000');
Decoration get enumName => const Decoration(color: '#000000');
Decoration get field => const Decoration(color: '#0618bd');
Decoration get filteredSearchResultIndication =>
const Decoration(color: '#000000');
Decoration get findScope => const Decoration(color: '#000000');
Decoration get foreground => const Decoration(color: '#000000');
Decoration get getter => const Decoration(color: '#0618bd');
Decoration get inheritedMethod => const Decoration(color: '#000000');
Decoration get interface => const Decoration(color: '#000000');
Decoration get javadoc => const Decoration(color: '#4162bc');
Decoration get javadocKeyword => const Decoration(color: '#4162bc');
Decoration get javadocLink => const Decoration(color: '#4162bc');
Decoration get javadocTag => const Decoration(color: '#7f809e');
Decoration get keyword => const Decoration(color: '#7e0854', bold: true);
Decoration get keywordReturn =>
const Decoration(color: '#7e0854', bold: true);
Decoration get lineNumber => const Decoration(color: '#000000');
Decoration get localVariable => const Decoration(color: '#7f1cc9');
Decoration get localVariableDeclaration =>
const Decoration(color: '#7f1cc9');
Decoration get method => const Decoration(color: '#000000');
Decoration get methodDeclaration =>
const Decoration(color: '#0b5bd2', bold: true);
Decoration get multiLineComment => const Decoration(color: '#4162bc');
Decoration get multiLineString => const Decoration(color: '#2d24fb');
Decoration get number => const Decoration(color: '#0c6f0e');
Decoration get occurrenceIndication => const Decoration(color: '#e0e0e0');
Decoration get operator => const Decoration(color: '#000000');
Decoration get parameterVariable => const Decoration(color: '#87312e');
Decoration get searchResultIndication => const Decoration(color: '#D0D0D0');
Decoration get selectionBackground => const Decoration(color: '#b6d6fd');
Decoration get selectionForeground => const Decoration(color: '#000000');
Decoration get setter => const Decoration(color: '#0618bd');
Decoration get singleLineComment => const Decoration(color: '#417e60');
Decoration get sourceHoverBackground => const Decoration(color: '#fbfbc8');
Decoration get staticField => const Decoration(color: '#0618bd');
Decoration get staticFinalField => const Decoration(color: '#0618bd');
Decoration get staticMethod => const Decoration(color: '#000000');
Decoration get staticMethodDeclaration =>
const Decoration(color: '#404040', bold: true);
Decoration get string => const Decoration(color: '#2d24fb');
Decoration get typeArgument => const Decoration(color: '#033178');
Decoration get typeParameter => const Decoration(color: '#033178');
Decoration get writeOccurrenceIndication =>
const Decoration(color: '#e0e0e0');
}

11
site/try/themes.dart Normal file
View file

@ -0,0 +1,11 @@
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library trydart.themes;
import 'decoration.dart';
part 'theme_default.dart';
part 'extracted_themes.dart';

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View file

@ -0,0 +1,5 @@
$ git pull --ff-only
$ git checkout-index -a -f --prefix=8bbcef7/
$ rm -rf 12775d4
$ sh 8bbcef7/dart/web_editor/create_manifest.sh > live.appcache
$ sed -e 's/12775d4/8bbcef7/' -i.12775d4 index.html