hexo-component-inferno 1.0.2 → 2.0.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 +4 -11
  4. package/lib/hexo/helper/cdn.test.js +9 -37
  5. package/lib/hexo/tag/message.js +100 -0
  6. package/lib/hexo/tag/message.test.js +79 -0
  7. package/lib/hexo/tag/tabs.js +290 -0
  8. package/lib/hexo/tag/tabs.test.js +106 -0
  9. package/lib/schema/comment/twikoo.json +28 -0
  10. package/lib/schema/comment/waline.json +46 -43
  11. package/lib/schema/schema/comment/changyan.json +21 -0
  12. package/lib/schema/schema/comment/disqus.json +17 -0
  13. package/lib/schema/schema/comment/disqusjs.json +53 -0
  14. package/lib/schema/schema/comment/facebook.json +13 -0
  15. package/lib/schema/schema/comment/gitalk.json +81 -0
  16. package/lib/schema/schema/comment/gitment.json +47 -0
  17. package/lib/schema/schema/comment/isso.json +17 -0
  18. package/lib/schema/schema/comment/livere.json +17 -0
  19. package/lib/schema/schema/comment/twikoo.json +28 -0
  20. package/lib/schema/schema/comment/utterances.json +59 -0
  21. package/lib/schema/schema/comment/valine.json +105 -0
  22. package/lib/schema/schema/comment/waline.json +176 -0
  23. package/lib/schema/schema/donate/afdian.json +17 -0
  24. package/lib/schema/schema/donate/alipay.json +17 -0
  25. package/lib/schema/schema/donate/buymeacoffee.json +17 -0
  26. package/lib/schema/schema/donate/patreon.json +17 -0
  27. package/lib/schema/schema/donate/paypal.json +22 -0
  28. package/lib/schema/schema/donate/wechat.json +17 -0
  29. package/lib/schema/schema/misc/manifest.json +66 -0
  30. package/lib/schema/schema/misc/meta.json +11 -0
  31. package/lib/schema/schema/misc/open_graph.json +78 -0
  32. package/lib/schema/schema/misc/poly_links.json +35 -0
  33. package/lib/schema/schema/misc/structured_data.json +47 -0
  34. package/lib/schema/schema/plugin/baidu_analytics.json +14 -0
  35. package/lib/schema/schema/plugin/bing_webmaster.json +14 -0
  36. package/lib/schema/schema/plugin/busuanzi.json +7 -0
  37. package/lib/schema/schema/plugin/cnzz.json +19 -0
  38. package/lib/schema/schema/plugin/cookie_consent.json +38 -0
  39. package/lib/schema/schema/plugin/gallery.json +7 -0
  40. package/lib/schema/schema/plugin/google_analytics.json +14 -0
  41. package/lib/schema/schema/plugin/hotjar.json +14 -0
  42. package/lib/schema/schema/plugin/katex.json +7 -0
  43. package/lib/schema/schema/plugin/mathjax.json +7 -0
  44. package/lib/schema/schema/plugin/outdated_browser.json +7 -0
  45. package/lib/schema/schema/plugin/progressbar.json +7 -0
  46. package/lib/schema/schema/plugin/statcounter.json +19 -0
  47. package/lib/schema/schema/plugin/twitter_conversion_tracking.json +14 -0
  48. package/lib/schema/schema/search/algolia.json +13 -0
  49. package/lib/schema/schema/search/baidu.json +13 -0
  50. package/lib/schema/schema/search/google_cse.json +17 -0
  51. package/lib/schema/schema/search/insight.json +19 -0
  52. package/lib/schema/schema/share/addthis.json +17 -0
  53. package/lib/schema/schema/share/addtoany.json +13 -0
  54. package/lib/schema/schema/share/bdshare.json +13 -0
  55. package/lib/schema/schema/share/sharejs.json +13 -0
  56. package/lib/schema/schema/share/sharethis.json +17 -0
  57. package/lib/schema/schema/widget/adsense.json +21 -0
  58. package/lib/schema/schema/widget/archives.json +13 -0
  59. package/lib/schema/schema/widget/categories.json +13 -0
  60. package/lib/schema/schema/widget/followit.json +26 -0
  61. package/lib/schema/schema/widget/links.json +47 -0
  62. package/lib/schema/schema/widget/recent_posts.json +13 -0
  63. package/lib/schema/schema/widget/subscribe_email.json +22 -0
  64. package/lib/schema/schema/widget/tags.json +30 -0
  65. package/lib/schema/schema/widget/toc.json +31 -0
  66. package/lib/schema/search/insight.json +6 -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 +113 -0
  77. package/lib/view/comment/utterances.js +3 -3
  78. package/lib/view/comment/valine.js +3 -3
  79. package/lib/view/comment/waline.js +63 -52
  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 +10 -11
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "/widget/adsense.json",
4
+ "description": "Google AdSense unit configurations",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "adsense"
10
+ },
11
+ "client_id": {
12
+ "type": "string",
13
+ "description": "AdSense client ID"
14
+ },
15
+ "slot_id": {
16
+ "type": "string",
17
+ "description": "AdSense AD unit ID"
18
+ }
19
+ },
20
+ "required": ["type", "client_id", "slot_id"]
21
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "/widget/archives.json",
4
+ "description": "Archives widget configurations",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "archives"
10
+ }
11
+ },
12
+ "required": ["type"]
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "/widget/categories.json",
4
+ "description": "Categories widget configurations",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "categories"
10
+ }
11
+ },
12
+ "required": ["type"]
13
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "/widget/followit.json",
4
+ "description": "Follow.it email subscription widget configurations",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "followit"
10
+ },
11
+ "description": {
12
+ "type": "string",
13
+ "description": "Hint text under the email input",
14
+ "nullable": true
15
+ },
16
+ "action_url": {
17
+ "type": "string",
18
+ "description": "Subscription form action URL"
19
+ },
20
+ "verification_code": {
21
+ "type": "string",
22
+ "description": "Feed claiming verification code"
23
+ }
24
+ },
25
+ "required": ["type", "action_url", "verification_code"]
26
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "/widget/links.json",
4
+ "description": "Recommendation links widget configurations",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "links"
10
+ },
11
+ "links": {
12
+ "type": "object",
13
+ "description": "Names and URLs of the sites",
14
+ "patternProperties": {
15
+ ".+": {
16
+ "anyOf": [
17
+ {
18
+ "type": "string",
19
+ "description": "URL of the site"
20
+ },
21
+ {
22
+ "type": "object",
23
+ "properties": {
24
+ "link": {
25
+ "type": "string",
26
+ "description": "URL of the site"
27
+ },
28
+ "hide_hostname": {
29
+ "type": "boolean",
30
+ "description": "Whether remove righthand hostname tag from the menu"
31
+ }
32
+ }
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ "examples": [
38
+ {
39
+ "Hexo": "https://hexo.io",
40
+ "Bulma": "https://bulma.io"
41
+ }
42
+ ],
43
+ "nullable": true
44
+ }
45
+ },
46
+ "required": ["type"]
47
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "/widget/recent_posts.json",
4
+ "description": "Recent posts widget configurations",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "recent_posts"
10
+ }
11
+ },
12
+ "required": ["type"]
13
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "/widget/subscribe_email.json",
4
+ "description": "Google FeedBurner email subscription widget configurations",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "subscribe_email"
10
+ },
11
+ "description": {
12
+ "type": "string",
13
+ "description": "Hint text under the email input",
14
+ "nullable": true
15
+ },
16
+ "feedburner_id": {
17
+ "type": "string",
18
+ "description": "Feedburner ID"
19
+ }
20
+ },
21
+ "required": ["type", "feedburner_id"]
22
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "/widget/tags.json",
4
+ "description": "Tags widget configurations",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "tags"
10
+ },
11
+ "order_by": {
12
+ "type": "string",
13
+ "default": "name",
14
+ "description": "How to order tags. For example 'name' to order by name in ascending order, and '-length' to order by number of posts in each tags in descending order",
15
+ "nullable": true
16
+ },
17
+ "amount": {
18
+ "type": "integer",
19
+ "description": "Amount of tags to show. Will show all if not set.",
20
+ "nullable": true
21
+ },
22
+ "show_count": {
23
+ "type": "boolean",
24
+ "default": true,
25
+ "description": "Whether to show tags count, i.e. number of posts in the tag.",
26
+ "nullable": true
27
+ }
28
+ },
29
+ "required": ["type"]
30
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "/widget/toc.json",
4
+ "description": "Table of contents widget configurations",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "toc"
10
+ },
11
+ "index": {
12
+ "type": "boolean",
13
+ "description": "Whether to show the index of each heading",
14
+ "default": true,
15
+ "nullable": true
16
+ },
17
+ "collapsed": {
18
+ "type": "boolean",
19
+ "description": "Whether to collapse sub-headings when they are out-of-view",
20
+ "default": true,
21
+ "nullable": true
22
+ },
23
+ "depth": {
24
+ "type": "integer",
25
+ "description": "Maximum level of headings to show (1-6)",
26
+ "default": 3,
27
+ "nullable": true
28
+ }
29
+ },
30
+ "required": ["type"]
31
+ }
@@ -7,6 +7,12 @@
7
7
  "type": {
8
8
  "type": "string",
9
9
  "const": "insight"
10
+ },
11
+ "index_pages": {
12
+ "type": "boolean",
13
+ "description": "Whether to include pages in the search results",
14
+ "default": true,
15
+ "nullable": true
10
16
  }
11
17
  },
12
18
  "required": ["type"]
@@ -7,6 +7,23 @@
7
7
  "type": {
8
8
  "type": "string",
9
9
  "const": "tags"
10
+ },
11
+ "order_by": {
12
+ "type": "string",
13
+ "default": "name",
14
+ "description": "How to order tags. For example 'name' to order by name in ascending order, and '-length' to order by number of posts in each tags in descending order",
15
+ "nullable": true
16
+ },
17
+ "amount": {
18
+ "type": "integer",
19
+ "description": "Amount of tags to show. Will show all if not set.",
20
+ "nullable": true
21
+ },
22
+ "show_count": {
23
+ "type": "boolean",
24
+ "default": true,
25
+ "description": "Whether to show tags count, i.e. number of posts in the tag.",
26
+ "nullable": true
10
27
  }
11
28
  },
12
29
  "required": ["type"]
@@ -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
  * ChangYan comment 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
  * Disqus comment 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
  * DisqusJS comment 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
  * Facebook comment 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
  * Gitalk comment 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
  * Gitment comment 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
  * Isso comment 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
  * LiveRe comment JSX component.
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ var _inferno = require("inferno");
6
+
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
+
9
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
10
+
11
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
+
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
+
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
+
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
+
19
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
20
+
21
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
22
+
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
+
25
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
+
27
+ /**
28
+ * Twikoo comment JSX component.
29
+ * @module view/comment/twikoo
30
+ */
31
+ var _require = require('inferno'),
32
+ Component = _require.Component,
33
+ Fragment = _require.Fragment;
34
+
35
+ var _require2 = require('../../util/cache'),
36
+ cacheComponent = _require2.cacheComponent;
37
+ /**
38
+ * Twikoo comment JSX component.
39
+ *
40
+ * @see https://twikoo.js.org/quick-start.html
41
+ * @example
42
+ * <Twikoo
43
+ * envId="env_id"
44
+ * region="ap-guangzhou"
45
+ * lang="zh-CN"
46
+ * jsUrl="/path/to/Twikoo.js" />
47
+ */
48
+
49
+
50
+ var Twikoo = /*#__PURE__*/function (_Component) {
51
+ _inherits(Twikoo, _Component);
52
+
53
+ var _super = _createSuper(Twikoo);
54
+
55
+ function Twikoo() {
56
+ _classCallCheck(this, Twikoo);
57
+
58
+ return _super.apply(this, arguments);
59
+ }
60
+
61
+ _createClass(Twikoo, [{
62
+ key: "render",
63
+ value: function render() {
64
+ var _this$props = this.props,
65
+ envId = _this$props.envId,
66
+ region = _this$props.region,
67
+ lang = _this$props.lang,
68
+ jsUrl = _this$props.jsUrl;
69
+ var js = "twikoo.init({\n envId: '".concat(envId, "',\n ").concat(region ? "region: ".concat(JSON.stringify(region), ",") : '', "\n ").concat(lang ? "lang: ".concat(JSON.stringify(lang), ",") : '', "\n });");
70
+ return (0, _inferno.createFragment)([(0, _inferno.createVNode)(1, "div", "content twikoo", null, 1, {
71
+ "id": "twikoo"
72
+ }), (0, _inferno.createVNode)(1, "script", null, null, 1, {
73
+ "src": jsUrl
74
+ }), (0, _inferno.createVNode)(1, "script", null, null, 1, {
75
+ "dangerouslySetInnerHTML": {
76
+ __html: js
77
+ }
78
+ })], 4);
79
+ }
80
+ }]);
81
+
82
+ return Twikoo;
83
+ }(Component);
84
+ /**
85
+ * Cacheable Twikoo comment JSX component.
86
+ * <p>
87
+ * This class is supposed to be used in combination with the <code>locals</code> hexo filter
88
+ * ({@link module:hexo/filter/locals}).
89
+ *
90
+ * @see module:util/cache.cacheComponent
91
+ * @example
92
+ * <Twikoo.Cacheable
93
+ * comment={{
94
+ * env_id: "env_id",
95
+ * region: "ap-guangzhou",
96
+ * lang: "zh-CN",
97
+ * }} />
98
+ */
99
+
100
+
101
+ Twikoo.Cacheable = cacheComponent(Twikoo, 'comment.twikoo', function (props) {
102
+ var comment = props.comment,
103
+ helper = props.helper,
104
+ page = props.page,
105
+ config = props.config;
106
+ return {
107
+ envId: comment.env_id,
108
+ region: comment.region,
109
+ lang: comment.lang || page.lang || page.language || config.language || 'zh-CN',
110
+ jsUrl: helper.cdn('twikoo', '1.6.6', 'dist/twikoo.all.min.js')
111
+ };
112
+ });
113
+ module.exports = Twikoo;
@@ -18,7 +18,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
18
18
 
19
19
  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); }
20
20
 
21
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
21
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
22
22
 
23
23
  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); }; }
24
24
 
@@ -28,7 +28,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
28
28
 
29
29
  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; } }
30
30
 
31
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
31
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
32
32
 
33
33
  /**
34
34
  * Utterances comment JSX component.
@@ -117,7 +117,7 @@ var Utterances = /*#__PURE__*/function (_Component) {
117
117
  * @example
118
118
  * <Utterances.Cacheable
119
119
  * comment={{
120
- * repo: '******',
120
+ * repo: "******",
121
121
  * issue_term: "******"
122
122
  * issue_number: {123}
123
123
  * label: "******"
@@ -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
  * Valine comment JSX component.
@@ -141,7 +141,7 @@ var Valine = /*#__PURE__*/function (_Component) {
141
141
  * placeholder: "******"
142
142
  * avatar: "mm"
143
143
  * avatar_force: false
144
- * meta: ['nick', 'mail', 'link']
144
+ * meta: ["nick", "mail", "link"]
145
145
  * page_size: 10
146
146
  * lang: "zh-CN"
147
147
  * visitor: false