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