hexo-component-inferno 1.0.1 → 1.2.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 (125) hide show
  1. package/lib/hexo/generator/insight.js +8 -1
  2. package/lib/hexo/generator/insight.test.js +16 -0
  3. package/lib/hexo/helper/cdn.js +1 -2
  4. package/lib/hexo/helper/cdn.test.js +9 -9
  5. package/lib/hexo/tag/message.js +100 -0
  6. package/lib/hexo/tag/message.test.js +70 -0
  7. package/lib/hexo/tag/tabs.js +290 -0
  8. package/lib/hexo/tag/tabs.test.js +97 -0
  9. package/lib/schema/comment/disqusjs.json +4 -5
  10. package/lib/schema/comment/twikoo.json +17 -0
  11. package/lib/schema/comment/waline.json +28 -36
  12. package/lib/schema/schema/comment/changyan.json +21 -0
  13. package/lib/schema/schema/comment/disqus.json +17 -0
  14. package/lib/schema/schema/comment/disqusjs.json +53 -0
  15. package/lib/schema/schema/comment/facebook.json +13 -0
  16. package/lib/schema/schema/comment/gitalk.json +81 -0
  17. package/lib/schema/schema/comment/gitment.json +47 -0
  18. package/lib/schema/schema/comment/isso.json +17 -0
  19. package/lib/schema/schema/comment/livere.json +17 -0
  20. package/lib/schema/schema/comment/twikoo.json +17 -0
  21. package/lib/schema/schema/comment/utterances.json +59 -0
  22. package/lib/schema/schema/comment/valine.json +105 -0
  23. package/lib/schema/schema/comment/waline.json +164 -0
  24. package/lib/schema/schema/donate/afdian.json +17 -0
  25. package/lib/schema/schema/donate/alipay.json +17 -0
  26. package/lib/schema/schema/donate/buymeacoffee.json +17 -0
  27. package/lib/schema/schema/donate/patreon.json +17 -0
  28. package/lib/schema/schema/donate/paypal.json +22 -0
  29. package/lib/schema/schema/donate/wechat.json +17 -0
  30. package/lib/schema/schema/misc/manifest.json +66 -0
  31. package/lib/schema/schema/misc/meta.json +11 -0
  32. package/lib/schema/schema/misc/open_graph.json +78 -0
  33. package/lib/schema/schema/misc/poly_links.json +35 -0
  34. package/lib/schema/schema/misc/structured_data.json +47 -0
  35. package/lib/schema/schema/plugin/baidu_analytics.json +14 -0
  36. package/lib/schema/schema/plugin/bing_webmaster.json +14 -0
  37. package/lib/schema/schema/plugin/busuanzi.json +7 -0
  38. package/lib/schema/schema/plugin/cnzz.json +19 -0
  39. package/lib/schema/schema/plugin/cookie_consent.json +38 -0
  40. package/lib/schema/schema/plugin/gallery.json +7 -0
  41. package/lib/schema/schema/plugin/google_analytics.json +14 -0
  42. package/lib/schema/schema/plugin/hotjar.json +14 -0
  43. package/lib/schema/schema/plugin/katex.json +7 -0
  44. package/lib/schema/schema/plugin/mathjax.json +7 -0
  45. package/lib/schema/schema/plugin/outdated_browser.json +7 -0
  46. package/lib/schema/schema/plugin/progressbar.json +7 -0
  47. package/lib/schema/schema/plugin/statcounter.json +19 -0
  48. package/lib/schema/schema/plugin/twitter_conversion_tracking.json +14 -0
  49. package/lib/schema/schema/search/algolia.json +13 -0
  50. package/lib/schema/schema/search/baidu.json +13 -0
  51. package/lib/schema/schema/search/google_cse.json +17 -0
  52. package/lib/schema/schema/search/insight.json +13 -0
  53. package/lib/schema/schema/share/addthis.json +17 -0
  54. package/lib/schema/schema/share/addtoany.json +13 -0
  55. package/lib/schema/schema/share/bdshare.json +13 -0
  56. package/lib/schema/schema/share/sharejs.json +13 -0
  57. package/lib/schema/schema/share/sharethis.json +17 -0
  58. package/lib/schema/schema/widget/adsense.json +21 -0
  59. package/lib/schema/schema/widget/archives.json +13 -0
  60. package/lib/schema/schema/widget/categories.json +13 -0
  61. package/lib/schema/schema/widget/followit.json +26 -0
  62. package/lib/schema/schema/widget/links.json +47 -0
  63. package/lib/schema/schema/widget/recent_posts.json +13 -0
  64. package/lib/schema/schema/widget/subscribe_email.json +22 -0
  65. package/lib/schema/schema/widget/tags.json +30 -0
  66. package/lib/schema/schema/widget/toc.json +31 -0
  67. package/lib/schema/widget/tags.json +17 -0
  68. package/lib/view/comment/changyan.js +2 -2
  69. package/lib/view/comment/disqus.js +2 -2
  70. package/lib/view/comment/disqusjs.js +2 -2
  71. package/lib/view/comment/facebook.js +2 -2
  72. package/lib/view/comment/gitalk.js +2 -2
  73. package/lib/view/comment/gitment.js +2 -2
  74. package/lib/view/comment/isso.js +2 -2
  75. package/lib/view/comment/livere.js +2 -2
  76. package/lib/view/comment/twikoo.js +102 -0
  77. package/lib/view/comment/utterances.js +2 -2
  78. package/lib/view/comment/valine.js +2 -2
  79. package/lib/view/comment/waline.js +31 -36
  80. package/lib/view/common/article_media.js +2 -2
  81. package/lib/view/donate/afdian.js +2 -2
  82. package/lib/view/donate/alipay.js +2 -2
  83. package/lib/view/donate/buymeacoffee.js +2 -2
  84. package/lib/view/donate/patreon.js +2 -2
  85. package/lib/view/donate/paypal.js +2 -2
  86. package/lib/view/donate/wechat.js +2 -2
  87. package/lib/view/misc/article_licensing.js +2 -2
  88. package/lib/view/misc/meta.js +2 -2
  89. package/lib/view/misc/open_graph.js +12 -4
  90. package/lib/view/misc/paginator.js +2 -2
  91. package/lib/view/misc/structured_data.js +2 -2
  92. package/lib/view/misc/web_app.js +2 -2
  93. package/lib/view/plugin/baidu_analytics.js +2 -2
  94. package/lib/view/plugin/bing_webmaster.js +2 -2
  95. package/lib/view/plugin/busuanzi.js +2 -2
  96. package/lib/view/plugin/cnzz.js +2 -2
  97. package/lib/view/plugin/cookie_consent.js +2 -2
  98. package/lib/view/plugin/gallery.js +2 -2
  99. package/lib/view/plugin/google_analytics.js +2 -2
  100. package/lib/view/plugin/hotjar.js +2 -2
  101. package/lib/view/plugin/katex.js +2 -2
  102. package/lib/view/plugin/mathjax.js +2 -2
  103. package/lib/view/plugin/outdated_browser.js +2 -2
  104. package/lib/view/plugin/progressbar.js +2 -2
  105. package/lib/view/plugin/statcounter.js +2 -2
  106. package/lib/view/plugin/twitter_conversion_tracking.js +2 -2
  107. package/lib/view/search/algolia.js +2 -2
  108. package/lib/view/search/baidu.js +2 -2
  109. package/lib/view/search/google_cse.js +2 -2
  110. package/lib/view/search/insight.js +2 -2
  111. package/lib/view/share/addthis.js +2 -2
  112. package/lib/view/share/addtoany.js +2 -2
  113. package/lib/view/share/bdshare.js +2 -2
  114. package/lib/view/share/sharejs.js +2 -2
  115. package/lib/view/share/sharethis.js +2 -2
  116. package/lib/view/widget/adsense.js +2 -2
  117. package/lib/view/widget/archives.js +2 -2
  118. package/lib/view/widget/categories.js +2 -2
  119. package/lib/view/widget/followit.js +2 -2
  120. package/lib/view/widget/links.js +2 -2
  121. package/lib/view/widget/recent_posts.js +2 -2
  122. package/lib/view/widget/subscribe_email.js +2 -2
  123. package/lib/view/widget/tags.js +16 -15
  124. package/lib/view/widget/toc.js +2 -2
  125. package/package.json +9 -11
@@ -12,7 +12,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
12
12
 
13
13
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
14
 
15
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
16
 
17
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
18
 
@@ -22,7 +22,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
22
22
 
23
23
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
24
 
25
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
26
 
27
27
  /**
28
28
  * Archives widget JSX component.
@@ -12,7 +12,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
12
12
 
13
13
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
14
 
15
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
16
 
17
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
18
 
@@ -22,7 +22,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
22
22
 
23
23
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
24
 
25
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
26
 
27
27
  /**
28
28
  * Categories widget JSX component.
@@ -12,7 +12,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
12
12
 
13
13
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
14
 
15
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
16
 
17
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
18
 
@@ -22,7 +22,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
22
22
 
23
23
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
24
 
25
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
26
 
27
27
  /**
28
28
  * follow.it widget JSX component.
@@ -12,7 +12,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
12
12
 
13
13
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
14
 
15
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
16
 
17
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
18
 
@@ -22,7 +22,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
22
22
 
23
23
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
24
 
25
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
26
 
27
27
  /**
28
28
  * External links widget JSX component.
@@ -12,7 +12,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
12
12
 
13
13
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
14
 
15
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
16
 
17
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
18
 
@@ -22,7 +22,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
22
22
 
23
23
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
24
 
25
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
26
 
27
27
  /**
28
28
  * Recent posts widget JSX component.
@@ -12,7 +12,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
12
12
 
13
13
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
14
 
15
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
16
 
17
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
18
 
@@ -22,7 +22,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
22
22
 
23
23
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
24
 
25
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
26
 
27
27
  /**
28
28
  * Google FeedBurner widget JSX component.
@@ -12,7 +12,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
12
12
 
13
13
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
14
 
15
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
16
 
17
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
18
 
@@ -22,7 +22,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
22
22
 
23
23
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
24
 
25
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
26
 
27
27
  /**
28
28
  * Tags widget JSX component.
@@ -96,22 +96,23 @@ var Tags = /*#__PURE__*/function (_Component) {
96
96
  * _p: function() {...}
97
97
  * }}
98
98
  * tags={{...}}
99
- * orderBy="name"
100
- * order={1}
101
- * amount={100}
102
- * showCount={true} />
99
+ * widget={{
100
+ * order_by: "name",
101
+ * amount: 100,
102
+ * show_count: true
103
+ * }} />
103
104
  */
104
105
 
105
106
 
106
107
  Tags.Cacheable = cacheComponent(Tags, 'widget.tags', function (props) {
107
108
  var helper = props.helper,
108
- _props$orderBy = props.orderBy,
109
- orderBy = _props$orderBy === void 0 ? 'name' : _props$orderBy,
110
- _props$order = props.order,
111
- order = _props$order === void 0 ? 1 : _props$order,
112
- amount = props.amount,
113
- _props$showCount = props.showCount,
114
- showCount = _props$showCount === void 0 ? true : _props$showCount;
109
+ _props$widget = props.widget,
110
+ widget = _props$widget === void 0 ? {} : _props$widget;
111
+ var _widget$order_by = widget.order_by,
112
+ order_by = _widget$order_by === void 0 ? 'name' : _widget$order_by,
113
+ amount = widget.amount,
114
+ _widget$show_count = widget.show_count,
115
+ show_count = _widget$show_count === void 0 ? true : _widget$show_count;
115
116
  var tags = props.tags || props.site.tags;
116
117
  var url_for = helper.url_for,
117
118
  _p = helper._p;
@@ -120,7 +121,7 @@ Tags.Cacheable = cacheComponent(Tags, 'widget.tags', function (props) {
120
121
  return null;
121
122
  }
122
123
 
123
- tags = tags.sort(orderBy, order).filter(function (tag) {
124
+ tags = tags.sort(order_by).filter(function (tag) {
124
125
  return tag.length;
125
126
  });
126
127
 
@@ -129,7 +130,7 @@ Tags.Cacheable = cacheComponent(Tags, 'widget.tags', function (props) {
129
130
  }
130
131
 
131
132
  return {
132
- showCount: showCount,
133
+ showCount: show_count,
133
134
  title: _p('common.tag', Infinity),
134
135
  tags: tags.map(function (tag) {
135
136
  return {
@@ -12,7 +12,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
12
12
 
13
13
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
14
 
15
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
16
 
17
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
18
 
@@ -22,7 +22,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
22
22
 
23
23
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
24
 
25
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
26
 
27
27
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
28
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-component-inferno",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "description": "A collection of Inferno.js layout components and utility scripts for Hexo",
5
5
  "main": "lib/index.js",
6
6
  "repository": "https://github.com/ppoffice/hexo-component-inferno",
@@ -12,13 +12,14 @@
12
12
  "scripts": {
13
13
  "test": "jest lib",
14
14
  "test-cov": "jest lib --coverage",
15
- "lint": "eslint {src,asset,fixture}/**/*.{js,jsx}",
15
+ "lint": "eslint '{src,asset,fixture}/**/*.{js,jsx}'",
16
16
  "_format": "prettier \"*.{json,babelrc,prettierrc,md}\" \"{.github,*[^lib]}/**/*.{js,jsx,json,yml}\"",
17
17
  "format": "npm run _format -- --write",
18
18
  "format-check": "npm run _format -- --check",
19
19
  "docs": "jsdoc src/**/* -d doc -t node_modules/minami",
20
20
  "build": "babel src --out-dir lib && cp -r src/schema lib/schema",
21
- "clean": "rm -rf lib doc coverage"
21
+ "clean": "rm -rf lib doc coverage",
22
+ "prepare": "npm run build"
22
23
  },
23
24
  "directories": {
24
25
  "lib": "./lib"
@@ -34,6 +35,7 @@
34
35
  "@types/hexo": "^3.8.5",
35
36
  "@types/hexo-util": "^0.6.2",
36
37
  "babel-plugin-inferno": "^6.1.0",
38
+ "cheerio": "^1.0.0-rc.10",
37
39
  "deepmerge": "^4.2.2",
38
40
  "eslint": "^8.6.0",
39
41
  "eslint-config-hexo": "^5.0.0",
@@ -41,9 +43,7 @@
41
43
  "eslint-plugin-jest": "^25.3.4",
42
44
  "eslint-plugin-json": "^3.1.0",
43
45
  "eslint-plugin-react": "^7.18.0",
44
- "hexo": "^6.0.0",
45
- "hexo-pagination": "^2.0.0",
46
- "hexo-util": "^2.2.0",
46
+ "hexo-renderer-marked": "^5.0.0",
47
47
  "inferno-server": "^7.4.1",
48
48
  "jest": "^27.4.7",
49
49
  "jsdoc": "^3.6.3",
@@ -52,15 +52,13 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "ajv": "^8.8.2",
55
+ "hexo": "^6.0.0",
56
+ "hexo-pagination": "^2.0.0",
57
+ "hexo-util": "^2.2.0",
55
58
  "inferno": "^7.3.3",
56
59
  "inferno-create-element": "^7.3.3",
57
60
  "js-yaml": "^4.1.0",
58
61
  "moment": "^2.24.0",
59
62
  "semver": "^7.1.1"
60
- },
61
- "peerDependencies": {
62
- "hexo": "^6.0.0",
63
- "hexo-pagination": "^2.0.0",
64
- "hexo-util": "^2.2.0"
65
63
  }
66
64
  }