@twreporter/react-article-components 2.3.1 → 2.4.0-rc.0

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.
Files changed (32) hide show
  1. package/lib/components/article-page.js +5 -5
  2. package/lib/components/aside/desktop-tools.js +2 -2
  3. package/lib/components/aside/mobile-tool-bar.js +13 -13
  4. package/lib/components/aside/utils/theme.js +3 -6
  5. package/lib/components/body/annotation.js +11 -9
  6. package/lib/components/body/audio/control-button.js +7 -7
  7. package/lib/components/body/audio/index.js +4 -4
  8. package/lib/components/body/audio/seek-bar.js +4 -4
  9. package/lib/components/body/blockquote.js +13 -11
  10. package/lib/components/body/brief.js +13 -10
  11. package/lib/components/body/centered-quote.js +10 -8
  12. package/lib/components/body/embedded-code.js +16 -10
  13. package/lib/components/body/headings.js +4 -4
  14. package/lib/components/body/image-diff.js +5 -5
  15. package/lib/components/body/infobox.js +4 -4
  16. package/lib/components/body/multimedia.js +4 -4
  17. package/lib/components/body/paragraph.js +2 -2
  18. package/lib/components/body/slideshow/index.js +4 -4
  19. package/lib/components/leading/embedded.js +149 -0
  20. package/lib/components/leading/index.js +3 -1
  21. package/lib/components/leading/normal.js +3 -3
  22. package/lib/components/related/card.js +4 -4
  23. package/lib/components/related/index.js +4 -4
  24. package/lib/components/related/list.js +5 -5
  25. package/lib/components/separation-curve.js +6 -6
  26. package/lib/constants/css.js +7 -7
  27. package/lib/constants/prop-types/leading.js +3 -0
  28. package/lib/managers/layout-manager.js +7 -3
  29. package/lib/managers/theme-manager.js +4 -5
  30. package/lib/managers/ui-manager.js +3 -3
  31. package/package.json +6 -6
  32. package/lib/constants/theme.js +0 -16
@@ -7,7 +7,7 @@ exports["default"] = void 0;
7
7
  var _layoutManager = _interopRequireDefault(require("./layout-manager"));
8
8
  var _themeManager = _interopRequireDefault(require("./theme-manager"));
9
9
  var _get = _interopRequireDefault(require("lodash/get"));
10
- var _theme = _interopRequireDefault(require("../constants/theme"));
10
+ var _theme = require("@twreporter/core/lib/constants/theme");
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
12
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
13
13
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -57,7 +57,7 @@ var UIManager = exports["default"] = /*#__PURE__*/function () {
57
57
  }, {
58
58
  key: "getTheme",
59
59
  value: function getTheme() {
60
- return _.get(this.post, 'style', _theme["default"].article.v2["default"]);
60
+ return _.get(this.post, 'style', _theme.ARTICLE_THEME.v2["default"]);
61
61
  }
62
62
 
63
63
  /**
@@ -107,7 +107,7 @@ var UIManager = exports["default"] = /*#__PURE__*/function () {
107
107
  }, {
108
108
  key: "toRenderSeparationLineBetweenLeadingAndBody",
109
109
  value: function toRenderSeparationLineBetweenLeadingAndBody() {
110
- if (this.getTheme() === _theme["default"].article.v2["default"] && this.getLeadingImageSize() !== _heroImageSize.fullscreen && this.getLeadingImageSize() !== _heroImageSize.extend) {
110
+ if (this.getTheme() === _theme.ARTICLE_THEME.v2["default"] && this.getLeadingImageSize() !== _heroImageSize.fullscreen && this.getLeadingImageSize() !== _heroImageSize.extend) {
111
111
  return true;
112
112
  }
113
113
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twreporter/react-article-components",
3
- "version": "2.3.1",
3
+ "version": "2.4.0-rc.0",
4
4
  "description": "The Reporter react article components, which are used in article page",
5
5
  "main": "lib/components/article-page.js",
6
6
  "repository": "https://github.com/twreporter/twreporter-npm-packages.git",
@@ -23,10 +23,10 @@
23
23
  "webpack-dev-server": "^3.7.2"
24
24
  },
25
25
  "dependencies": {
26
- "@twreporter/core": "^1.22.1",
27
- "@twreporter/react-components": "^9.2.1",
28
- "@twreporter/redux": "^8.1.1",
29
- "@twreporter/universal-header": "^3.0.6",
26
+ "@twreporter/core": "^1.23.0-rc.0",
27
+ "@twreporter/react-components": "^9.2.2-rc.0",
28
+ "@twreporter/redux": "^8.1.2-rc.0",
29
+ "@twreporter/universal-header": "^3.0.7-rc.0",
30
30
  "howler": "^2.2.3",
31
31
  "lodash": "^4.17.11",
32
32
  "memoize-one": "^5.0.5",
@@ -41,5 +41,5 @@
41
41
  "files": [
42
42
  "lib"
43
43
  ],
44
- "gitHead": "b5a400596a56abf427d6545d5678549db2bda77d"
44
+ "gitHead": "e7e704404a5723189a9386ac47cadad098b8d2f2"
45
45
  }
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- // TODO: remove this constant & use @twreporter/core/lib/constants/theme
8
- var _default = exports["default"] = {
9
- article: {
10
- v2: {
11
- pink: 'article:v2:pink',
12
- "default": 'article:v2:default',
13
- photo: 'article:v2:photo'
14
- }
15
- }
16
- };