/* @flow */
const matcher = new RegExp('(ThemeProvider|LiveProvider|^Themed\\(.*)');

module.exports = {
  test: (val: Object) => {
    return (
      val &&
      val.type &&
      typeof val.type === 'string' &&
      matcher.test(val.type) &&
      !val.processed
    );
  },

  print: (val: Object, serialize: Function) => {
    if (val.type.startsWith('Themed(')) {
      delete val.props.theme;
    } else {
      delete val.props;
    }

    val.processed = true;
    return serialize(val);
  }
};

@@ -37,49 +37,14 @@
 xp('
-(ThemeProvider%7CLiveProvider%7C%5EThemed%5C%5C(.*)
+%5E%5BA-Z%5D
 ');%0A
@@ -290,16 +290,19 @@
 =%3E %7B%0A   
+ //
  if (val
@@ -331,24 +331,27 @@
 ed(')) %7B%0A   
+ //
    delete va
@@ -368,16 +368,19 @@
 eme;%0A   
+ //
  %7D else 
@@ -384,16 +384,19 @@
 se %7B%0A   
+ //
    delet
@@ -408,16 +408,242 @@
 .props;%0A
+    // %7D%0A%0A    if (%0A      %5B'ThemeProvider', 'LiveProvider'%5D.includes(val.type) &&%0A      val &&%0A      val.props%0A    ) %7B%0A      delete val.props;%0A    %7D else if (val && val.props && val.props.theme) %7B%0A      delete val.props.theme;%0A
     %7D%0A%0A 

Update serializer