Remove package:sky/base
These files really belong on other libraries.
diff --git a/packages/flutter/lib/README.md b/packages/flutter/lib/README.md
index d0c359c..4ef76df 100644
--- a/packages/flutter/lib/README.md
+++ b/packages/flutter/lib/README.md
@@ -8,12 +8,6 @@
code as [various `dart:` packages](https://api.dartlang.org/),
including `dart:sky`.
-The [base/](base/) directory contains libraries that extend these core
-APIs to provide base classes for tree structures
-([base/node.dart](base/node.dart)), hit testing
-([base/hit_test.dart](base/hit_test.dart)), and debugging
-([base/debug.dart](base/debug.dart)).
-
Above this layer is the [animation](animation.dart) library,
which provides core animation primitives, and the [gestures/](gestures/)
directory, which define a gesture recognition and disambiguation system.
@@ -49,8 +43,8 @@
| | | painting | |
+-+ +------------+ |
| gestures/ | animation | |
- +-----------+---+--------+ |
- | base/ | mojo/ |
+ +-----------+------------+ |
+ | mojo/ |
+------------+--+-+----+------+ -------
| dart:sky | | | Host |
+--------+---+ | | APIs | C++
diff --git a/packages/flutter/lib/base/README.md b/packages/flutter/lib/base/README.md
deleted file mode 100644
index 7c533c1..0000000
--- a/packages/flutter/lib/base/README.md
+++ /dev/null
@@ -1,45 +0,0 @@
-Sky Base
-========
-
-AbstractNode
-------------
-
-The [node.dart](node.dart) file defines a class, `AbstractNode`, which
-can be used to build mutable trees.
-
-* When a subclass is changing the parent of a child, it should
- call either parent.adoptChild(child) or parent.dropChild(child)
- as appropriate. Subclasses should expose an API for
- manipulating the tree if you want to (e.g. a setter for a
- 'child' property, or an 'add()' method to manipulate a list).
-
-* You can see the current parent by querying 'parent'.
-
-* You can see the current attachment state by querying
- 'attached'. The root of any tree that is to be considered
- attached should be manually attached by calling 'attach()'.
- Other than that, don't call 'attach()' or 'detach()'. This is
- all managed automatically assuming you call the 'adoptChild()'
- and 'dropChild()' methods appropriately.
-
-* Subclasses that have children must override 'attach()' and
- 'detach()' as described below.
-
-* Nodes always have a 'depth' greater than their ancestors'.
- There's no guarantee regarding depth between siblings. The
- depth of a node is used to ensure that nodes are processed in
- depth order. The 'depth' of a child can be more than one
- greater than the 'depth' of the parent, because the 'depth'
- values are never decreased: all that matters is that it's
- greater than the parent. Consider a tree with a root node A, a
- child B, and a grandchild C. Initially, A will have 'depth' 0,
- B 'depth' 1, and C 'depth' 2. If C is moved to be a child of A,
- sibling of B, then the numbers won't change. C's 'depth' will
- still be 2. This is all managed automatically assuming you call
- 'adoptChild()' and 'dropChild()' appropriately.
-
-
-Dependencies
-------------
-
-No dependencies except for `dart:sky` and Dart's core libraries.
diff --git a/packages/flutter/lib/gestures/long_press.dart b/packages/flutter/lib/gestures/long_press.dart
index d450ee0..0cb35c5 100644
--- a/packages/flutter/lib/gestures/long_press.dart
+++ b/packages/flutter/lib/gestures/long_press.dart
@@ -4,9 +4,9 @@
import 'dart:sky' as sky;
-import 'package:sky/base/pointer_router.dart';
import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/constants.dart';
+import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/gestures/recognizer.dart';
typedef void GestureLongPressListener();
diff --git a/packages/flutter/lib/base/pointer_router.dart b/packages/flutter/lib/gestures/pointer_router.dart
similarity index 100%
rename from packages/flutter/lib/base/pointer_router.dart
rename to packages/flutter/lib/gestures/pointer_router.dart
diff --git a/packages/flutter/lib/gestures/recognizer.dart b/packages/flutter/lib/gestures/recognizer.dart
index 436b65a..6834552 100644
--- a/packages/flutter/lib/gestures/recognizer.dart
+++ b/packages/flutter/lib/gestures/recognizer.dart
@@ -5,11 +5,11 @@
import 'dart:async';
import 'dart:sky' as sky;
-import 'package:sky/base/pointer_router.dart';
import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/constants.dart';
+import 'package:sky/gestures/pointer_router.dart';
-export 'package:sky/base/pointer_router.dart' show PointerRouter;
+export 'package:sky/gestures/pointer_router.dart' show PointerRouter;
abstract class GestureRecognizer extends GestureArenaMember {
GestureRecognizer({ PointerRouter router }) : _router = router;
diff --git a/packages/flutter/lib/mojo/asset_bundle.dart b/packages/flutter/lib/mojo/asset_bundle.dart
index 7cce717..705214e 100644
--- a/packages/flutter/lib/mojo/asset_bundle.dart
+++ b/packages/flutter/lib/mojo/asset_bundle.dart
@@ -9,7 +9,7 @@
import 'package:mojo/core.dart' as core;
import 'package:mojo_services/mojo/asset_bundle/asset_bundle.mojom.dart';
-import 'package:sky/base/image_resource.dart';
+import 'package:sky/mojo/image_resource.dart';
import 'package:sky/mojo/net/fetch.dart';
import 'package:sky/mojo/net/image_cache.dart' as image_cache;
import 'package:sky/mojo/shell.dart' as shell;
diff --git a/packages/flutter/lib/base/image_resource.dart b/packages/flutter/lib/mojo/image_resource.dart
similarity index 100%
rename from packages/flutter/lib/base/image_resource.dart
rename to packages/flutter/lib/mojo/image_resource.dart
diff --git a/packages/flutter/lib/mojo/net/image_cache.dart b/packages/flutter/lib/mojo/net/image_cache.dart
index 8acabf7..03d435c 100644
--- a/packages/flutter/lib/mojo/net/image_cache.dart
+++ b/packages/flutter/lib/mojo/net/image_cache.dart
@@ -7,7 +7,7 @@
import 'dart:sky' as sky;
import 'package:mojo/mojo/url_response.mojom.dart';
-import 'package:sky/base/image_resource.dart';
+import 'package:sky/mojo/image_resource.dart';
import 'package:sky/mojo/net/fetch.dart';
final HashMap<String, ImageResource> _cache = new Map<String, ImageResource>();
diff --git a/packages/flutter/lib/rendering.dart b/packages/flutter/lib/rendering.dart
index d4998db..8b49bbf 100644
--- a/packages/flutter/lib/rendering.dart
+++ b/packages/flutter/lib/rendering.dart
@@ -10,10 +10,13 @@
export 'package:sky/src/rendering/auto_layout.dart';
export 'package:sky/src/rendering/block.dart';
export 'package:sky/src/rendering/box.dart';
+export 'package:sky/src/rendering/debug.dart';
export 'package:sky/src/rendering/flex.dart';
export 'package:sky/src/rendering/grid.dart';
+export 'package:sky/src/rendering/hit_test.dart';
export 'package:sky/src/rendering/image.dart';
export 'package:sky/src/rendering/layer.dart';
+export 'package:sky/src/rendering/node.dart';
export 'package:sky/src/rendering/object.dart';
export 'package:sky/src/rendering/paragraph.dart';
export 'package:sky/src/rendering/proxy_box.dart';
diff --git a/packages/flutter/lib/src/painting/README.md b/packages/flutter/lib/src/painting/README.md
index ed05e99..cf4e957 100644
--- a/packages/flutter/lib/src/painting/README.md
+++ b/packages/flutter/lib/src/painting/README.md
@@ -1,3 +1,3 @@
This directory contains painting-related libraries that only depend on
-core Dart libraries, `../base/*`, and [animation.dart](../animation.dart). Note
-that [animation.dart](../animation.dart) depends on the Newton Dart library.
+core Dart libraries and [animation.dart](../../animation.dart). Note
+that [animation.dart](../../animation.dart) depends on the Newton Dart library.
diff --git a/packages/flutter/lib/src/painting/box_painter.dart b/packages/flutter/lib/src/painting/box_painter.dart
index 5aef8c0..fa03f08 100644
--- a/packages/flutter/lib/src/painting/box_painter.dart
+++ b/packages/flutter/lib/src/painting/box_painter.dart
@@ -6,7 +6,7 @@
import 'dart:sky' as sky;
import 'dart:sky' show Point, Offset, Size, Rect, Color, Paint, Path;
-import 'package:sky/base/image_resource.dart';
+import 'package:sky/mojo/image_resource.dart';
import 'package:sky/src/painting/shadows.dart';
/// An immutable set of offsets in each of the four cardinal directions
diff --git a/packages/flutter/lib/src/rendering/README.md b/packages/flutter/lib/src/rendering/README.md
index 69f6e1a..72f80d7 100644
--- a/packages/flutter/lib/src/rendering/README.md
+++ b/packages/flutter/lib/src/rendering/README.md
@@ -385,6 +385,5 @@
------------
* [`package:sky/animation.dart`](../../animation.dart)
- * [`package:sky/base`](../../base)
* [`package:sky/mojo`](../../mojo)
* [`package:sky/painting.dart`](../../painting.dart)
diff --git a/packages/flutter/lib/src/rendering/box.dart b/packages/flutter/lib/src/rendering/box.dart
index caa89e2..ca7d6f8 100644
--- a/packages/flutter/lib/src/rendering/box.dart
+++ b/packages/flutter/lib/src/rendering/box.dart
@@ -5,8 +5,8 @@
import 'dart:math' as math;
import 'dart:sky' as sky;
-import 'package:sky/base/debug.dart';
import 'package:sky/painting.dart';
+import 'package:sky/src/rendering/debug.dart';
import 'package:sky/src/rendering/object.dart';
import 'package:vector_math/vector_math.dart';
diff --git a/packages/flutter/lib/base/debug.dart b/packages/flutter/lib/src/rendering/debug.dart
similarity index 100%
rename from packages/flutter/lib/base/debug.dart
rename to packages/flutter/lib/src/rendering/debug.dart
diff --git a/packages/flutter/lib/base/hit_test.dart b/packages/flutter/lib/src/rendering/hit_test.dart
similarity index 100%
rename from packages/flutter/lib/base/hit_test.dart
rename to packages/flutter/lib/src/rendering/hit_test.dart
diff --git a/packages/flutter/lib/base/node.dart b/packages/flutter/lib/src/rendering/node.dart
similarity index 61%
rename from packages/flutter/lib/base/node.dart
rename to packages/flutter/lib/src/rendering/node.dart
index 7d5f285..e4902ad 100644
--- a/packages/flutter/lib/base/node.dart
+++ b/packages/flutter/lib/src/rendering/node.dart
@@ -6,6 +6,37 @@
///
/// AbstractNode has as notion of depth, attachment, and parent, but does not
/// have a model for children.
+///
+/// * When a subclass is changing the parent of a child, it should
+/// call either parent.adoptChild(child) or parent.dropChild(child)
+/// as appropriate. Subclasses should expose an API for
+/// manipulating the tree if you want to (e.g. a setter for a
+/// 'child' property, or an 'add()' method to manipulate a list).
+///
+/// * You can see the current parent by querying 'parent'.
+///
+/// * You can see the current attachment state by querying
+/// 'attached'. The root of any tree that is to be considered
+/// attached should be manually attached by calling 'attach()'.
+/// Other than that, don't call 'attach()' or 'detach()'. This is
+/// all managed automatically assuming you call the 'adoptChild()'
+/// and 'dropChild()' methods appropriately.
+///
+/// * Subclasses that have children must override 'attach()' and
+/// 'detach()' as described below.
+///
+/// * Nodes always have a 'depth' greater than their ancestors'.
+/// There's no guarantee regarding depth between siblings. The
+/// depth of a node is used to ensure that nodes are processed in
+/// depth order. The 'depth' of a child can be more than one
+/// greater than the 'depth' of the parent, because the 'depth'
+/// values are never decreased: all that matters is that it's
+/// greater than the parent. Consider a tree with a root node A, a
+/// child B, and a grandchild C. Initially, A will have 'depth' 0,
+/// B 'depth' 1, and C 'depth' 2. If C is moved to be a child of A,
+/// sibling of B, then the numbers won't change. C's 'depth' will
+/// still be 2. This is all managed automatically assuming you call
+/// 'adoptChild()' and 'dropChild()' appropriately.
class AbstractNode {
// AbstractNode represents a node in a tree.
diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart
index 8867690..5d85ad6 100644
--- a/packages/flutter/lib/src/rendering/object.dart
+++ b/packages/flutter/lib/src/rendering/object.dart
@@ -7,14 +7,14 @@
import 'dart:sky' show Point, Offset, Size, Rect, Color, Paint, Path;
import 'package:sky/animation.dart';
-import 'package:sky/base/debug.dart';
-import 'package:sky/base/hit_test.dart';
-import 'package:sky/base/node.dart';
+import 'package:sky/src/rendering/debug.dart';
+import 'package:sky/src/rendering/hit_test.dart';
import 'package:sky/src/rendering/layer.dart';
+import 'package:sky/src/rendering/node.dart';
import 'package:vector_math/vector_math.dart';
export 'dart:sky' show Point, Offset, Size, Rect, Color, Paint, Path;
-export 'package:sky/base/hit_test.dart' show EventDisposition, HitTestTarget, HitTestEntry, HitTestResult;
+export 'package:sky/src/rendering/hit_test.dart' show EventDisposition, HitTestTarget, HitTestEntry, HitTestResult;
/// Base class for data associated with a [RenderObject] by its parent
///
diff --git a/packages/flutter/lib/src/rendering/sky_binding.dart b/packages/flutter/lib/src/rendering/sky_binding.dart
index d5ce395..bfa175d 100644
--- a/packages/flutter/lib/src/rendering/sky_binding.dart
+++ b/packages/flutter/lib/src/rendering/sky_binding.dart
@@ -5,10 +5,10 @@
import 'dart:sky' as sky;
import 'package:sky/animation.dart';
-import 'package:sky/base/hit_test.dart';
-import 'package:sky/base/pointer_router.dart';
import 'package:sky/gestures/arena.dart';
+import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/src/rendering/box.dart';
+import 'package:sky/src/rendering/hit_test.dart';
import 'package:sky/src/rendering/object.dart';
import 'package:sky/src/rendering/view.dart';
diff --git a/packages/flutter/lib/src/widgets/README.md b/packages/flutter/lib/src/widgets/README.md
index 1797b3a..4d7e501 100644
--- a/packages/flutter/lib/src/widgets/README.md
+++ b/packages/flutter/lib/src/widgets/README.md
@@ -501,7 +501,6 @@
* `package:vector_math`
* [`package:sky/animation.dart`](../../animation.dart)
- * [`package:sky/base`](../../base)
* [`package:sky/painting.dart`](../../painting.dart)
* [`package:sky/rendering.dart`](../../rendering.dart)
* [`package:sky/theme`](../../theme)
diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart
index 24f853d..78c88b8 100644
--- a/packages/flutter/lib/src/widgets/basic.dart
+++ b/packages/flutter/lib/src/widgets/basic.dart
@@ -6,8 +6,8 @@
import 'package:vector_math/vector_math.dart';
-import 'package:sky/base/image_resource.dart';
import 'package:sky/mojo/asset_bundle.dart';
+import 'package:sky/mojo/image_resource.dart';
import 'package:sky/mojo/net/image_cache.dart' as image_cache;
import 'package:sky/src/painting/text_painter.dart';
import 'package:sky/src/painting/text_style.dart';
@@ -25,11 +25,11 @@
import 'package:sky/src/widgets/default_text_style.dart';
import 'package:sky/src/widgets/framework.dart';
-export 'package:sky/base/hit_test.dart' show EventDisposition, combineEventDispositions;
export 'package:sky/src/painting/text_style.dart';
export 'package:sky/src/rendering/block.dart' show BlockDirection;
export 'package:sky/src/rendering/box.dart' show BoxConstraints;
export 'package:sky/src/rendering/flex.dart' show FlexJustifyContent, FlexAlignItems, FlexDirection;
+export 'package:sky/src/rendering/hit_test.dart' show EventDisposition, combineEventDispositions;
export 'package:sky/src/rendering/object.dart' show Point, Offset, Size, Rect, Color, Paint, Path;
export 'package:sky/src/rendering/proxy_box.dart' show BackgroundImage, BoxDecoration, BoxDecorationPosition, BoxShadow, Border, BorderSide, EdgeDims, Shape;
export 'package:sky/src/rendering/shifted_box.dart' show ShrinkWrap;
diff --git a/packages/flutter/lib/src/widgets/drag_target.dart b/packages/flutter/lib/src/widgets/drag_target.dart
index 3b9b2d5..191fd48 100644
--- a/packages/flutter/lib/src/widgets/drag_target.dart
+++ b/packages/flutter/lib/src/widgets/drag_target.dart
@@ -4,9 +4,7 @@
import 'dart:collection';
-import 'package:sky/base/hit_test.dart';
-import 'package:sky/src/rendering/object.dart';
-import 'package:sky/src/rendering/sky_binding.dart';
+import 'package:sky/rendering.dart';
import 'package:sky/src/widgets/basic.dart';
import 'package:sky/src/widgets/framework.dart';
diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart
index 3f982b7..1720c78 100644
--- a/packages/flutter/lib/src/widgets/framework.dart
+++ b/packages/flutter/lib/src/widgets/framework.dart
@@ -7,15 +7,15 @@
import 'dart:sky' as sky;
import 'package:sky/animation.dart';
-import 'package:sky/base/hit_test.dart';
import 'package:sky/mojo/activity.dart';
import 'package:sky/src/rendering/box.dart';
+import 'package:sky/src/rendering/hit_test.dart';
import 'package:sky/src/rendering/object.dart';
import 'package:sky/src/rendering/sky_binding.dart';
import 'package:sky/src/rendering/view.dart';
-export 'package:sky/base/hit_test.dart' show EventDisposition, combineEventDispositions;
export 'package:sky/src/rendering/box.dart' show BoxConstraints, BoxDecoration, Border, BorderSide, EdgeDims;
+export 'package:sky/src/rendering/hit_test.dart' show EventDisposition, combineEventDispositions;
export 'package:sky/src/rendering/object.dart' show Point, Offset, Size, Rect, Color, Paint, Path;
final bool _shouldLogRenderDuration = false; // see also 'enableProfilingLoop' argument to runApp()
diff --git a/packages/unit/test/gestures/long_press_test.dart b/packages/unit/test/gestures/long_press_test.dart
index b97b4bd..4ecead1 100644
--- a/packages/unit/test/gestures/long_press_test.dart
+++ b/packages/unit/test/gestures/long_press_test.dart
@@ -1,7 +1,7 @@
import 'package:quiver/testing/async.dart';
-import 'package:sky/base/pointer_router.dart';
import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/long_press.dart';
+import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/gestures/show_press.dart';
import 'package:test/test.dart';
diff --git a/packages/unit/test/base/pointer_router_test.dart b/packages/unit/test/gestures/pointer_router_test.dart
similarity index 93%
rename from packages/unit/test/base/pointer_router_test.dart
rename to packages/unit/test/gestures/pointer_router_test.dart
index 6381722..7865773 100644
--- a/packages/unit/test/base/pointer_router_test.dart
+++ b/packages/unit/test/gestures/pointer_router_test.dart
@@ -1,6 +1,6 @@
import 'dart:sky' as sky;
-import 'package:sky/base/pointer_router.dart';
+import 'package:sky/gestures/pointer_router.dart';
import 'package:test/test.dart';
import '../engine/mock_events.dart';
diff --git a/packages/unit/test/gestures/scroll_test.dart b/packages/unit/test/gestures/scroll_test.dart
index bc8963d..793dabb 100644
--- a/packages/unit/test/gestures/scroll_test.dart
+++ b/packages/unit/test/gestures/scroll_test.dart
@@ -1,7 +1,7 @@
import 'dart:sky' as sky;
-import 'package:sky/base/pointer_router.dart';
import 'package:sky/gestures/arena.dart';
+import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/gestures/scroll.dart';
import 'package:sky/gestures/tap.dart';
import 'package:test/test.dart';
diff --git a/packages/unit/test/gestures/show_press_test.dart b/packages/unit/test/gestures/show_press_test.dart
index 8bf2ead..cd4078f 100644
--- a/packages/unit/test/gestures/show_press_test.dart
+++ b/packages/unit/test/gestures/show_press_test.dart
@@ -1,6 +1,6 @@
import 'package:quiver/testing/async.dart';
-import 'package:sky/base/pointer_router.dart';
import 'package:sky/gestures/arena.dart';
+import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/gestures/show_press.dart';
import 'package:test/test.dart';
diff --git a/packages/unit/test/gestures/tap_test.dart b/packages/unit/test/gestures/tap_test.dart
index 9d2dad2..ffef98e 100644
--- a/packages/unit/test/gestures/tap_test.dart
+++ b/packages/unit/test/gestures/tap_test.dart
@@ -1,5 +1,5 @@
-import 'package:sky/base/pointer_router.dart';
import 'package:sky/gestures/arena.dart';
+import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/gestures/tap.dart';
import 'package:test/test.dart';