@micromag/transforms 0.3.570 → 0.3.576

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.
package/es/apple-news.js CHANGED
@@ -587,7 +587,6 @@ var TextStyle = function TextStyle() {
587
587
  };
588
588
  return validate$1(content, TextStyleDefinition);
589
589
  };
590
- var TextStyle$1 = TextStyle;
591
590
 
592
591
  var getArticleTextStyles = function getArticleTextStyles() {
593
592
  // const { theme = {} } = story || {};
@@ -599,14 +598,14 @@ var getArticleTextStyles = function getArticleTextStyles() {
599
598
 
600
599
  var fontSize = 18;
601
600
  var lineHeight = 1.35;
602
- var titleStyles = TextStyle$1({
601
+ var titleStyles = TextStyle({
603
602
  fontFamily: 'Futura',
604
603
  // stylelint-disable-line
605
604
  fontSize: fontSize * 2,
606
605
  fontWeight: 'bold',
607
606
  lineHeight: lineHeight
608
607
  });
609
- var textStyles = TextStyle$1({
608
+ var textStyles = TextStyle({
610
609
  fontFamily: 'Palatino',
611
610
  // stylelint-disable-line
612
611
  fontSize: fontSize,
@@ -781,7 +780,6 @@ var Article = function Article(story, settings) {
781
780
  }, getArticleDocumentStyle()), getArticleTextStyles()), getArticleLayouts()), getArticleComponents(story));
782
781
  return validate(content, ArticleDefinition);
783
782
  };
784
- var Article$1 = Article;
785
783
 
786
784
  var name$a = "Format\\Audio";
787
785
  var description$a = "The component for adding a playable audio clip.";
@@ -912,7 +910,6 @@ var MediaElement = function MediaElement(story, media) {
912
910
  var Audio = function Audio(story, audio) {
913
911
  return MediaElement(story, audio, 'audio', AudioDefinition);
914
912
  };
915
- var Audio$1 = Audio;
916
913
 
917
914
  var name$9 = "Format\\Text";
918
915
  var description$9 = "Properties shared by all text component types.";
@@ -1030,7 +1027,7 @@ var TextElement = function TextElement(story, text) {
1030
1027
  body = _ref$body === void 0 ? null : _ref$body,
1031
1028
  _ref$textStyle = _ref.textStyle,
1032
1029
  textStyle = _ref$textStyle === void 0 ? null : _ref$textStyle;
1033
- var style = textStyle ? TextStyle$1(textStyle) : null;
1030
+ var style = textStyle ? TextStyle(textStyle) : null;
1034
1031
  var styleName = style !== null ? hash(style) : null;
1035
1032
  var hasStyle = style !== null && styleName !== null;
1036
1033
  var content = _objectSpread(_objectSpread({
@@ -1055,7 +1052,6 @@ var Author = function Author(story, text) {
1055
1052
  textStyle: 'style-author'
1056
1053
  });
1057
1054
  };
1058
- var Author$1 = Author;
1059
1055
 
1060
1056
  var name$8 = "Format\\Container";
1061
1057
  var description$8 = "Properties shared by all container types.";
@@ -1161,7 +1157,6 @@ var Container = function Container(story, components) {
1161
1157
  component: components && components.length > 0 ? component : null
1162
1158
  };
1163
1159
  };
1164
- var Container$1 = Container;
1165
1160
 
1166
1161
  var name$7 = "Format\\Gallery";
1167
1162
  var description$7 = "The component for displaying a sequence of images in a specific order as a horizontal strip.";
@@ -1292,7 +1287,6 @@ var GalleryElement = function GalleryElement(story, gallery) {
1292
1287
  var Gallery = function Gallery(story, gallery) {
1293
1288
  return GalleryElement(story, gallery, 'gallery', GalleryDefinition);
1294
1289
  };
1295
- var Gallery$1 = Gallery;
1296
1290
 
1297
1291
  var name$6 = "Format\\Heading";
1298
1292
  var description$6 = "The text component for adding a heading.";
@@ -1404,12 +1398,10 @@ var HeadingDefinition = {
1404
1398
  var Heading1 = function Heading1(story, heading) {
1405
1399
  return TextElement(story, heading, 'heading1', HeadingDefinition);
1406
1400
  };
1407
- var Heading1$1 = Heading1;
1408
1401
 
1409
1402
  var Heading2 = function Heading2(story, heading) {
1410
1403
  return TextElement(story, heading, 'heading2', HeadingDefinition);
1411
1404
  };
1412
- var Heading2$1 = Heading2;
1413
1405
 
1414
1406
  var name$5 = "Format\\Image";
1415
1407
  var description$5 = "The component for displaying JPEG, PNG, or GIF images.";
@@ -1540,7 +1532,6 @@ var ImageElement = function ImageElement(story, image) {
1540
1532
  var Image = function Image(story, image) {
1541
1533
  return ImageElement(story, image, 'image', ImageDefinition);
1542
1534
  };
1543
- var Image$1 = Image;
1544
1535
 
1545
1536
  var name$4 = "Format\\Map";
1546
1537
  var description$4 = "The component for adding a map.";
@@ -1689,7 +1680,6 @@ var MapElement = function MapElement(story, map) {
1689
1680
  var Map = function Map(story, map) {
1690
1681
  return MapElement(story, map, 'map', MapDefinition);
1691
1682
  };
1692
- var Map$1 = Map;
1693
1683
 
1694
1684
  var name$3 = "Format\\Mosaic";
1695
1685
  var description$3 = "The component for displaying a set of images as tiles in no particular order.";
@@ -1775,7 +1765,6 @@ var MosaicDefinition = {
1775
1765
  var Mosaic = function Mosaic(story, mosaic) {
1776
1766
  return GalleryElement(story, mosaic, 'mosaic', MosaicDefinition);
1777
1767
  };
1778
- var Mosaic$1 = Mosaic;
1779
1768
 
1780
1769
  var name$2 = "Format\\Quote";
1781
1770
  var description$2 = "The component for including a quote.";
@@ -1887,7 +1876,6 @@ var QuoteDefinition = {
1887
1876
  var Quote = function Quote(story, quote) {
1888
1877
  return TextElement(story, quote, 'quote', QuoteDefinition);
1889
1878
  };
1890
- var Quote$1 = Quote;
1891
1879
 
1892
1880
  var name$1 = "Format\\Title";
1893
1881
  var description$1 = "The component for adding an article title.";
@@ -1999,17 +1987,14 @@ var TitleDefinition = {
1999
1987
  var Subtitle = function Subtitle(story, subtitle) {
2000
1988
  return TextElement(story, subtitle, 'title', TitleDefinition);
2001
1989
  };
2002
- var Subtitle$1 = Subtitle;
2003
1990
 
2004
1991
  var Text = function Text(story, text) {
2005
1992
  return TextElement(story, text, 'text', TextDefinition);
2006
1993
  };
2007
- var Text$1 = Text;
2008
1994
 
2009
1995
  var Title = function Title(story, title) {
2010
1996
  return TextElement(story, title, 'title', TitleDefinition);
2011
1997
  };
2012
- var Title$1 = Title;
2013
1998
 
2014
1999
  var name = "Format\\Video";
2015
2000
  var description = "The component for adding a video.";
@@ -2126,6 +2111,5 @@ var VideoDefinition = {
2126
2111
  var Video = function Video(story, video) {
2127
2112
  return MediaElement(story, video, 'video', VideoDefinition);
2128
2113
  };
2129
- var Video$1 = Video;
2130
2114
 
2131
- export { Article$1 as Article, Audio$1 as Audio, Author$1 as Author, Container$1 as Container, Gallery$1 as Gallery, Heading1$1 as Heading1, Heading2$1 as Heading2, Image$1 as Image, Map$1 as Map, Mosaic$1 as Mosaic, Quote$1 as Quote, Subtitle$1 as Subtitle, Text$1 as Text, TextStyle$1 as TextStyle, Title$1 as Title, Video$1 as Video };
2115
+ export { Article, Audio, Author, Container, Gallery, Heading1, Heading2, Image, Map, Mosaic, Quote, Subtitle, Text, TextStyle, Title, Video };
package/es/index.js CHANGED
@@ -7,7 +7,6 @@ var transformer = function transformer(story, type, settings) {
7
7
  }
8
8
  return story;
9
9
  };
10
- var transformer$1 = transformer;
11
10
 
12
11
  var postProcessor = function postProcessor(story, type) {
13
12
  if (type === 'appleNews') {
@@ -21,6 +20,5 @@ var postProcessor = function postProcessor(story, type) {
21
20
  }
22
21
  return story;
23
22
  };
24
- var postProcessor$1 = postProcessor;
25
23
 
26
- export { postProcessor$1 as postProcessor, transformer$1 as transformer };
24
+ export { postProcessor, transformer };
package/es/utils.js CHANGED
@@ -46,7 +46,6 @@ var validate = function validate() {
46
46
  }, {}) : {};
47
47
  return !isEmpty(validated) ? validated : null;
48
48
  };
49
- var validate$1 = validate;
50
49
 
51
50
  var stripTags = function stripTags(str) {
52
51
  if (!str) {
@@ -54,6 +53,5 @@ var stripTags = function stripTags(str) {
54
53
  }
55
54
  return str.replace(/(<([^>]+)>)/gi, '');
56
55
  };
57
- var stripTags$1 = stripTags;
58
56
 
59
- export { stripTags$1 as stripTags, validate$1 as validate };
57
+ export { stripTags, validate };
package/lib/apple-news.js CHANGED
@@ -589,7 +589,6 @@ var TextStyle = function TextStyle() {
589
589
  };
590
590
  return utils.validate(content, TextStyleDefinition);
591
591
  };
592
- var TextStyle$1 = TextStyle;
593
592
 
594
593
  var getArticleTextStyles = function getArticleTextStyles() {
595
594
  // const { theme = {} } = story || {};
@@ -601,14 +600,14 @@ var getArticleTextStyles = function getArticleTextStyles() {
601
600
 
602
601
  var fontSize = 18;
603
602
  var lineHeight = 1.35;
604
- var titleStyles = TextStyle$1({
603
+ var titleStyles = TextStyle({
605
604
  fontFamily: 'Futura',
606
605
  // stylelint-disable-line
607
606
  fontSize: fontSize * 2,
608
607
  fontWeight: 'bold',
609
608
  lineHeight: lineHeight
610
609
  });
611
- var textStyles = TextStyle$1({
610
+ var textStyles = TextStyle({
612
611
  fontFamily: 'Palatino',
613
612
  // stylelint-disable-line
614
613
  fontSize: fontSize,
@@ -783,7 +782,6 @@ var Article = function Article(story, settings) {
783
782
  }, getArticleDocumentStyle()), getArticleTextStyles()), getArticleLayouts()), getArticleComponents(story));
784
783
  return validate(content, ArticleDefinition);
785
784
  };
786
- var Article$1 = Article;
787
785
 
788
786
  var name$a = "Format\\Audio";
789
787
  var description$a = "The component for adding a playable audio clip.";
@@ -914,7 +912,6 @@ var MediaElement = function MediaElement(story, media) {
914
912
  var Audio = function Audio(story, audio) {
915
913
  return MediaElement(story, audio, 'audio', AudioDefinition);
916
914
  };
917
- var Audio$1 = Audio;
918
915
 
919
916
  var name$9 = "Format\\Text";
920
917
  var description$9 = "Properties shared by all text component types.";
@@ -1032,7 +1029,7 @@ var TextElement = function TextElement(story, text) {
1032
1029
  body = _ref$body === void 0 ? null : _ref$body,
1033
1030
  _ref$textStyle = _ref.textStyle,
1034
1031
  textStyle = _ref$textStyle === void 0 ? null : _ref$textStyle;
1035
- var style = textStyle ? TextStyle$1(textStyle) : null;
1032
+ var style = textStyle ? TextStyle(textStyle) : null;
1036
1033
  var styleName = style !== null ? hash(style) : null;
1037
1034
  var hasStyle = style !== null && styleName !== null;
1038
1035
  var content = _objectSpread(_objectSpread({
@@ -1057,7 +1054,6 @@ var Author = function Author(story, text) {
1057
1054
  textStyle: 'style-author'
1058
1055
  });
1059
1056
  };
1060
- var Author$1 = Author;
1061
1057
 
1062
1058
  var name$8 = "Format\\Container";
1063
1059
  var description$8 = "Properties shared by all container types.";
@@ -1163,7 +1159,6 @@ var Container = function Container(story, components) {
1163
1159
  component: components && components.length > 0 ? component : null
1164
1160
  };
1165
1161
  };
1166
- var Container$1 = Container;
1167
1162
 
1168
1163
  var name$7 = "Format\\Gallery";
1169
1164
  var description$7 = "The component for displaying a sequence of images in a specific order as a horizontal strip.";
@@ -1294,7 +1289,6 @@ var GalleryElement = function GalleryElement(story, gallery) {
1294
1289
  var Gallery = function Gallery(story, gallery) {
1295
1290
  return GalleryElement(story, gallery, 'gallery', GalleryDefinition);
1296
1291
  };
1297
- var Gallery$1 = Gallery;
1298
1292
 
1299
1293
  var name$6 = "Format\\Heading";
1300
1294
  var description$6 = "The text component for adding a heading.";
@@ -1406,12 +1400,10 @@ var HeadingDefinition = {
1406
1400
  var Heading1 = function Heading1(story, heading) {
1407
1401
  return TextElement(story, heading, 'heading1', HeadingDefinition);
1408
1402
  };
1409
- var Heading1$1 = Heading1;
1410
1403
 
1411
1404
  var Heading2 = function Heading2(story, heading) {
1412
1405
  return TextElement(story, heading, 'heading2', HeadingDefinition);
1413
1406
  };
1414
- var Heading2$1 = Heading2;
1415
1407
 
1416
1408
  var name$5 = "Format\\Image";
1417
1409
  var description$5 = "The component for displaying JPEG, PNG, or GIF images.";
@@ -1542,7 +1534,6 @@ var ImageElement = function ImageElement(story, image) {
1542
1534
  var Image = function Image(story, image) {
1543
1535
  return ImageElement(story, image, 'image', ImageDefinition);
1544
1536
  };
1545
- var Image$1 = Image;
1546
1537
 
1547
1538
  var name$4 = "Format\\Map";
1548
1539
  var description$4 = "The component for adding a map.";
@@ -1691,7 +1682,6 @@ var MapElement = function MapElement(story, map) {
1691
1682
  var Map = function Map(story, map) {
1692
1683
  return MapElement(story, map, 'map', MapDefinition);
1693
1684
  };
1694
- var Map$1 = Map;
1695
1685
 
1696
1686
  var name$3 = "Format\\Mosaic";
1697
1687
  var description$3 = "The component for displaying a set of images as tiles in no particular order.";
@@ -1777,7 +1767,6 @@ var MosaicDefinition = {
1777
1767
  var Mosaic = function Mosaic(story, mosaic) {
1778
1768
  return GalleryElement(story, mosaic, 'mosaic', MosaicDefinition);
1779
1769
  };
1780
- var Mosaic$1 = Mosaic;
1781
1770
 
1782
1771
  var name$2 = "Format\\Quote";
1783
1772
  var description$2 = "The component for including a quote.";
@@ -1889,7 +1878,6 @@ var QuoteDefinition = {
1889
1878
  var Quote = function Quote(story, quote) {
1890
1879
  return TextElement(story, quote, 'quote', QuoteDefinition);
1891
1880
  };
1892
- var Quote$1 = Quote;
1893
1881
 
1894
1882
  var name$1 = "Format\\Title";
1895
1883
  var description$1 = "The component for adding an article title.";
@@ -2001,17 +1989,14 @@ var TitleDefinition = {
2001
1989
  var Subtitle = function Subtitle(story, subtitle) {
2002
1990
  return TextElement(story, subtitle, 'title', TitleDefinition);
2003
1991
  };
2004
- var Subtitle$1 = Subtitle;
2005
1992
 
2006
1993
  var Text = function Text(story, text) {
2007
1994
  return TextElement(story, text, 'text', TextDefinition);
2008
1995
  };
2009
- var Text$1 = Text;
2010
1996
 
2011
1997
  var Title = function Title(story, title) {
2012
1998
  return TextElement(story, title, 'title', TitleDefinition);
2013
1999
  };
2014
- var Title$1 = Title;
2015
2000
 
2016
2001
  var name = "Format\\Video";
2017
2002
  var description = "The component for adding a video.";
@@ -2128,21 +2113,20 @@ var VideoDefinition = {
2128
2113
  var Video = function Video(story, video) {
2129
2114
  return MediaElement(story, video, 'video', VideoDefinition);
2130
2115
  };
2131
- var Video$1 = Video;
2132
2116
 
2133
- exports.Article = Article$1;
2134
- exports.Audio = Audio$1;
2135
- exports.Author = Author$1;
2136
- exports.Container = Container$1;
2137
- exports.Gallery = Gallery$1;
2138
- exports.Heading1 = Heading1$1;
2139
- exports.Heading2 = Heading2$1;
2140
- exports.Image = Image$1;
2141
- exports.Map = Map$1;
2142
- exports.Mosaic = Mosaic$1;
2143
- exports.Quote = Quote$1;
2144
- exports.Subtitle = Subtitle$1;
2145
- exports.Text = Text$1;
2146
- exports.TextStyle = TextStyle$1;
2147
- exports.Title = Title$1;
2148
- exports.Video = Video$1;
2117
+ exports.Article = Article;
2118
+ exports.Audio = Audio;
2119
+ exports.Author = Author;
2120
+ exports.Container = Container;
2121
+ exports.Gallery = Gallery;
2122
+ exports.Heading1 = Heading1;
2123
+ exports.Heading2 = Heading2;
2124
+ exports.Image = Image;
2125
+ exports.Map = Map;
2126
+ exports.Mosaic = Mosaic;
2127
+ exports.Quote = Quote;
2128
+ exports.Subtitle = Subtitle;
2129
+ exports.Text = Text;
2130
+ exports.TextStyle = TextStyle;
2131
+ exports.Title = Title;
2132
+ exports.Video = Video;
package/lib/index.js CHANGED
@@ -9,7 +9,6 @@ var transformer = function transformer(story, type, settings) {
9
9
  }
10
10
  return story;
11
11
  };
12
- var transformer$1 = transformer;
13
12
 
14
13
  var postProcessor = function postProcessor(story, type) {
15
14
  if (type === 'appleNews') {
@@ -23,7 +22,6 @@ var postProcessor = function postProcessor(story, type) {
23
22
  }
24
23
  return story;
25
24
  };
26
- var postProcessor$1 = postProcessor;
27
25
 
28
- exports.postProcessor = postProcessor$1;
29
- exports.transformer = transformer$1;
26
+ exports.postProcessor = postProcessor;
27
+ exports.transformer = transformer;
package/lib/utils.js CHANGED
@@ -48,7 +48,6 @@ var validate = function validate() {
48
48
  }, {}) : {};
49
49
  return !isEmpty(validated) ? validated : null;
50
50
  };
51
- var validate$1 = validate;
52
51
 
53
52
  var stripTags = function stripTags(str) {
54
53
  if (!str) {
@@ -56,7 +55,6 @@ var stripTags = function stripTags(str) {
56
55
  }
57
56
  return str.replace(/(<([^>]+)>)/gi, '');
58
57
  };
59
- var stripTags$1 = stripTags;
60
58
 
61
- exports.stripTags = stripTags$1;
62
- exports.validate = validate$1;
59
+ exports.stripTags = stripTags;
60
+ exports.validate = validate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/transforms",
3
- "version": "0.3.570",
3
+ "version": "0.3.576",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "dependencies": {
74
74
  "@babel/runtime": "^7.13.10",
75
- "@micromag/core": "^0.3.570",
75
+ "@micromag/core": "^0.3.576",
76
76
  "lodash": "^4.17.21",
77
77
  "object-hash": "^3.0.0",
78
78
  "prop-types": "^15.7.2",
@@ -82,5 +82,5 @@
82
82
  "access": "public",
83
83
  "registry": "https://registry.npmjs.org/"
84
84
  },
85
- "gitHead": "77ddf956df099afb685816a80bca648690751402"
85
+ "gitHead": "fa6ef8f8ed78d40e2a96e669c9cd794a50269c4b"
86
86
  }