import { array, def, object, oneOf } from './util';

const scope = object({
  encode:      def('encode'),
  layout:      def('layout'),
  signals:     array(def('signal')),
  data:        array(def('data')),
  scales:      array(def('scale')),
  projections: array(def('projection')),
  axes:        array(def('axis')),
  legends:     array(def('legend')),
  title:       def('title'),
  marks:       array(oneOf(def('markGroup'), def('markVisual')))
}, undefined);

export default {
  defs: {
    scope
  }
};

@@ -21,16 +21,28 @@
  object,
+ objectType,
  oneOf %7D
@@ -455,16 +455,44 @@
 sual')))
+,%0A  usermeta:    eobjectType
 %0A%7D, unde

Move usermeta from schema to scope