hexo-component-inferno 2.0.0 → 2.0.2
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/lib/core/migrate.js +10 -28
- package/lib/core/migrate.test.js +10 -12
- package/lib/core/schema.js +33 -109
- package/lib/core/schema.test.js +2 -6
- package/lib/core/view.js +3 -10
- package/lib/core/view.test.js +0 -7
- package/lib/hexo/filter/locals.js +3 -18
- package/lib/hexo/filter/locals.test.js +2 -19
- package/lib/hexo/generator/assets.js +2 -8
- package/lib/hexo/generator/assets.test.js +0 -4
- package/lib/hexo/generator/categories.test.js +0 -3
- package/lib/hexo/generator/category.js +1 -6
- package/lib/hexo/generator/category.test.js +0 -5
- package/lib/hexo/generator/insight.js +1 -9
- package/lib/hexo/generator/insight.test.js +0 -3
- package/lib/hexo/generator/manifest.js +0 -3
- package/lib/hexo/generator/manifest.test.js +0 -3
- package/lib/hexo/generator/tags.test.js +0 -3
- package/lib/hexo/helper/cdn.js +6 -19
- package/lib/hexo/helper/cdn.test.js +0 -3
- package/lib/hexo/helper/page.test.js +0 -3
- package/lib/hexo/tag/message.js +0 -8
- package/lib/hexo/tag/message.test.js +0 -7
- package/lib/hexo/tag/tabs.js +17 -48
- package/lib/hexo/tag/tabs.test.js +0 -8
- package/lib/util/cache.js +0 -11
- package/lib/util/cache.test.js +0 -4
- package/lib/util/classname.js +0 -3
- package/lib/util/classname.test.js +0 -1
- package/lib/util/yaml.js +2 -7
- package/lib/util/yaml.test.js +0 -4
- package/lib/view/comment/changyan.js +12 -31
- package/lib/view/comment/disqus.js +11 -32
- package/lib/view/comment/disqusjs.js +22 -43
- package/lib/view/comment/facebook.js +9 -28
- package/lib/view/comment/gitalk.js +28 -49
- package/lib/view/comment/gitment.js +15 -37
- package/lib/view/comment/isso.js +6 -27
- package/lib/view/comment/livere.js +6 -27
- package/lib/view/comment/twikoo.js +14 -33
- package/lib/view/comment/utterances.js +17 -45
- package/lib/view/comment/valine.js +39 -60
- package/lib/view/comment/waline.js +45 -66
- package/lib/view/common/article_media.js +11 -28
- package/lib/view/donate/afdian.js +9 -30
- package/lib/view/donate/alipay.js +9 -30
- package/lib/view/donate/buymeacoffee.js +9 -30
- package/lib/view/donate/patreon.js +9 -30
- package/lib/view/donate/paypal.js +10 -31
- package/lib/view/donate/wechat.js +9 -30
- package/lib/view/misc/article_licensing.js +21 -43
- package/lib/view/misc/meta.js +7 -34
- package/lib/view/misc/open_graph.js +25 -67
- package/lib/view/misc/paginator.js +12 -36
- package/lib/view/misc/structured_data.js +16 -43
- package/lib/view/misc/web_app.js +15 -49
- package/lib/view/plugin/baidu_analytics.js +7 -28
- package/lib/view/plugin/bing_webmaster.js +7 -28
- package/lib/view/plugin/busuanzi.js +6 -26
- package/lib/view/plugin/cnzz.js +9 -30
- package/lib/view/plugin/cookie_consent.js +28 -49
- package/lib/view/plugin/gallery.js +10 -31
- package/lib/view/plugin/google_analytics.js +7 -28
- package/lib/view/plugin/hotjar.js +7 -28
- package/lib/view/plugin/katex.js +11 -32
- package/lib/view/plugin/mathjax.js +7 -28
- package/lib/view/plugin/outdated_browser.js +10 -31
- package/lib/view/plugin/progressbar.js +7 -28
- package/lib/view/plugin/statcounter.js +10 -31
- package/lib/view/plugin/twitter_conversion_tracking.js +7 -28
- package/lib/view/search/algolia.js +14 -35
- package/lib/view/search/baidu.js +9 -28
- package/lib/view/search/google_cse.js +10 -30
- package/lib/view/search/insight.js +9 -28
- package/lib/view/share/addthis.js +6 -27
- package/lib/view/share/addtoany.js +6 -25
- package/lib/view/share/bdshare.js +6 -25
- package/lib/view/share/sharejs.js +8 -27
- package/lib/view/share/sharethis.js +6 -27
- package/lib/view/widget/adsense.js +11 -32
- package/lib/view/widget/archives.js +24 -51
- package/lib/view/widget/categories.js +23 -57
- package/lib/view/widget/followit.js +12 -31
- package/lib/view/widget/links.js +10 -32
- package/lib/view/widget/recent_posts.js +14 -36
- package/lib/view/widget/subscribe_email.js +12 -31
- package/lib/view/widget/tags.js +16 -39
- package/lib/view/widget/toc.js +26 -66
- package/package.json +1 -1
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
4
|
var _inferno = require("inferno");
|
|
6
|
-
|
|
7
5
|
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
|
-
|
|
6
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
7
|
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
|
-
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
10
|
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
11
|
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
12
|
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
13
|
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
14
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
-
|
|
23
15
|
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
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
-
|
|
27
17
|
/**
|
|
28
18
|
* A JSX component for alerting users about the use of cookies.
|
|
29
19
|
* @module view/plugin/cookie_consent
|
|
30
20
|
*/
|
|
31
21
|
var _require = require('inferno'),
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
Component = _require.Component;
|
|
34
23
|
var _require2 = require('../../util/cache'),
|
|
35
|
-
|
|
24
|
+
cacheComponent = _require2.cacheComponent;
|
|
25
|
+
|
|
36
26
|
/**
|
|
37
27
|
* A JSX component for alerting users about the use of cookies.
|
|
38
28
|
*
|
|
@@ -56,47 +46,39 @@ var _require2 = require('../../util/cache'),
|
|
|
56
46
|
* cssUrl="/path/to/cookieconsent.css"
|
|
57
47
|
* jsUrl="/path/to/cookieconsent.js" />
|
|
58
48
|
*/
|
|
59
|
-
|
|
60
|
-
|
|
61
49
|
var CookieConsent = /*#__PURE__*/function (_Component) {
|
|
62
50
|
_inherits(CookieConsent, _Component);
|
|
63
|
-
|
|
64
51
|
var _super = _createSuper(CookieConsent);
|
|
65
|
-
|
|
66
52
|
function CookieConsent() {
|
|
67
53
|
_classCallCheck(this, CookieConsent);
|
|
68
|
-
|
|
69
54
|
return _super.apply(this, arguments);
|
|
70
55
|
}
|
|
71
|
-
|
|
72
56
|
_createClass(CookieConsent, [{
|
|
73
57
|
key: "render",
|
|
74
58
|
value: function render() {
|
|
75
59
|
var _this$props = this.props,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
60
|
+
head = _this$props.head,
|
|
61
|
+
text = _this$props.text,
|
|
62
|
+
jsUrl = _this$props.jsUrl,
|
|
63
|
+
cssUrl = _this$props.cssUrl;
|
|
80
64
|
var _this$props2 = this.props,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
65
|
+
type = _this$props2.type,
|
|
66
|
+
theme = _this$props2.theme,
|
|
67
|
+
position = _this$props2.position,
|
|
68
|
+
policyLink = _this$props2.policyLink;
|
|
85
69
|
var message = text.message,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
70
|
+
dismiss = text.dismiss,
|
|
71
|
+
allow = text.allow,
|
|
72
|
+
deny = text.deny,
|
|
73
|
+
link = text.link,
|
|
74
|
+
policy = text.policy;
|
|
91
75
|
var js = "window.addEventListener(\"load\", () => {\n window.cookieconsent.initialise({\n type: ".concat(JSON.stringify(type), ",\n theme: ").concat(JSON.stringify(theme), ",\n static: ").concat(JSON.stringify(this.props["static"]), ",\n position: ").concat(JSON.stringify(position), ",\n content: {\n message: ").concat(JSON.stringify(message), ",\n dismiss: ").concat(JSON.stringify(dismiss), ",\n allow: ").concat(JSON.stringify(allow), ",\n deny: ").concat(JSON.stringify(deny), ",\n link: ").concat(JSON.stringify(link), ",\n policy: ").concat(JSON.stringify(policy), ",\n href: ").concat(JSON.stringify(policyLink), ",\n },\n palette: {\n popup: {\n background: \"#edeff5\",\n text: \"#838391\"\n },\n button: {\n background: \"#4b81e8\"\n },\n },\n });\n });");
|
|
92
|
-
|
|
93
76
|
if (head) {
|
|
94
77
|
return (0, _inferno.createVNode)(1, "link", null, null, 1, {
|
|
95
78
|
"rel": "stylesheet",
|
|
96
79
|
"href": cssUrl
|
|
97
80
|
});
|
|
98
81
|
}
|
|
99
|
-
|
|
100
82
|
return (0, _inferno.createFragment)([(0, _inferno.createVNode)(1, "script", null, null, 1, {
|
|
101
83
|
"src": jsUrl,
|
|
102
84
|
"defer": true
|
|
@@ -107,7 +89,6 @@ var CookieConsent = /*#__PURE__*/function (_Component) {
|
|
|
107
89
|
})], 4);
|
|
108
90
|
}
|
|
109
91
|
}]);
|
|
110
|
-
|
|
111
92
|
return CookieConsent;
|
|
112
93
|
}(Component);
|
|
113
94
|
/**
|
|
@@ -132,20 +113,18 @@ var CookieConsent = /*#__PURE__*/function (_Component) {
|
|
|
132
113
|
* cdn: function() {...}
|
|
133
114
|
* }} />
|
|
134
115
|
*/
|
|
135
|
-
|
|
136
|
-
|
|
137
116
|
CookieConsent.Cacheable = cacheComponent(CookieConsent, 'plugin.cookieconsent', function (props) {
|
|
138
117
|
var head = props.head,
|
|
139
|
-
|
|
140
|
-
|
|
118
|
+
plugin = props.plugin,
|
|
119
|
+
helper = props.helper;
|
|
141
120
|
var _plugin$type = plugin.type,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
121
|
+
type = _plugin$type === void 0 ? 'info' : _plugin$type,
|
|
122
|
+
_plugin$theme = plugin.theme,
|
|
123
|
+
theme = _plugin$theme === void 0 ? 'edgeless' : _plugin$theme,
|
|
124
|
+
_plugin$position = plugin.position,
|
|
125
|
+
position = _plugin$position === void 0 ? 'bottom-left' : _plugin$position,
|
|
126
|
+
_plugin$policyLink = plugin.policyLink,
|
|
127
|
+
policyLink = _plugin$policyLink === void 0 ? 'https://www.cookiesandyou.com/' : _plugin$policyLink;
|
|
149
128
|
return {
|
|
150
129
|
head: head,
|
|
151
130
|
type: type,
|
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
4
|
var _inferno = require("inferno");
|
|
6
|
-
|
|
7
5
|
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
|
-
|
|
6
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
7
|
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
|
-
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
10
|
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
11
|
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
12
|
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
13
|
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
14
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
-
|
|
23
15
|
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
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
-
|
|
27
17
|
/**
|
|
28
18
|
* Light Gallery and Justified Gallery plugins JSX component.
|
|
29
19
|
* @module view/plugin/gallery
|
|
30
20
|
*/
|
|
31
21
|
var _require = require('inferno'),
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
Component = _require.Component;
|
|
34
23
|
var _require2 = require('../../util/cache'),
|
|
35
|
-
|
|
24
|
+
cacheComponent = _require2.cacheComponent;
|
|
25
|
+
|
|
36
26
|
/**
|
|
37
27
|
* Light Gallery and Justified Gallery plugins JSX component.
|
|
38
28
|
*
|
|
@@ -50,27 +40,20 @@ var _require2 = require('../../util/cache'),
|
|
|
50
40
|
* cssUrl: '/path/to/justifiedGallery.css'
|
|
51
41
|
* }} />
|
|
52
42
|
*/
|
|
53
|
-
|
|
54
|
-
|
|
55
43
|
var Gallery = /*#__PURE__*/function (_Component) {
|
|
56
44
|
_inherits(Gallery, _Component);
|
|
57
|
-
|
|
58
45
|
var _super = _createSuper(Gallery);
|
|
59
|
-
|
|
60
46
|
function Gallery() {
|
|
61
47
|
_classCallCheck(this, Gallery);
|
|
62
|
-
|
|
63
48
|
return _super.apply(this, arguments);
|
|
64
49
|
}
|
|
65
|
-
|
|
66
50
|
_createClass(Gallery, [{
|
|
67
51
|
key: "render",
|
|
68
52
|
value: function render() {
|
|
69
53
|
var _this$props = this.props,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
54
|
+
head = _this$props.head,
|
|
55
|
+
lightGallery = _this$props.lightGallery,
|
|
56
|
+
justifiedGallery = _this$props.justifiedGallery;
|
|
74
57
|
if (head) {
|
|
75
58
|
return (0, _inferno.createFragment)([(0, _inferno.createVNode)(1, "link", null, null, 1, {
|
|
76
59
|
"rel": "stylesheet",
|
|
@@ -80,7 +63,6 @@ var Gallery = /*#__PURE__*/function (_Component) {
|
|
|
80
63
|
"href": justifiedGallery.cssUrl
|
|
81
64
|
})], 4);
|
|
82
65
|
}
|
|
83
|
-
|
|
84
66
|
var js = "window.addEventListener(\"load\", () => {\n if (typeof $.fn.lightGallery === 'function') {\n $('.article').lightGallery({ selector: '.gallery-item' });\n }\n if (typeof $.fn.justifiedGallery === 'function') {\n if ($('.justified-gallery > p > .gallery-item').length) {\n $('.justified-gallery > p > .gallery-item').unwrap();\n }\n $('.justified-gallery').justifiedGallery();\n }\n });";
|
|
85
67
|
return (0, _inferno.createFragment)([(0, _inferno.createVNode)(1, "script", null, null, 1, {
|
|
86
68
|
"src": lightGallery.jsUrl,
|
|
@@ -95,7 +77,6 @@ var Gallery = /*#__PURE__*/function (_Component) {
|
|
|
95
77
|
})], 4);
|
|
96
78
|
}
|
|
97
79
|
}]);
|
|
98
|
-
|
|
99
80
|
return Gallery;
|
|
100
81
|
}(Component);
|
|
101
82
|
/**
|
|
@@ -110,11 +91,9 @@ var Gallery = /*#__PURE__*/function (_Component) {
|
|
|
110
91
|
* head={true}
|
|
111
92
|
* helper={{ cdn: function() {...} }} />
|
|
112
93
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
94
|
Gallery.Cacheable = cacheComponent(Gallery, 'plugin.gallery', function (props) {
|
|
116
95
|
var head = props.head,
|
|
117
|
-
|
|
96
|
+
helper = props.helper;
|
|
118
97
|
return {
|
|
119
98
|
head: head,
|
|
120
99
|
lightGallery: {
|
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
4
|
var _inferno = require("inferno");
|
|
6
|
-
|
|
7
5
|
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
|
-
|
|
6
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
7
|
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
|
-
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
10
|
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
11
|
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
12
|
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
13
|
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
14
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
-
|
|
23
15
|
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
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
-
|
|
27
17
|
/**
|
|
28
18
|
* Google Analytics plugin JSX component.
|
|
29
19
|
* @module view/plugin/google_analytics
|
|
30
20
|
*/
|
|
31
21
|
var _require = require('inferno'),
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
Component = _require.Component;
|
|
34
23
|
var _require2 = require('../../util/cache'),
|
|
35
|
-
|
|
24
|
+
cacheComponent = _require2.cacheComponent;
|
|
25
|
+
|
|
36
26
|
/**
|
|
37
27
|
* Google Analytics plugin JSX component.
|
|
38
28
|
*
|
|
@@ -40,19 +30,13 @@ var _require2 = require('../../util/cache'),
|
|
|
40
30
|
* @example
|
|
41
31
|
* <GoogleAnalytics trackingId="******" />
|
|
42
32
|
*/
|
|
43
|
-
|
|
44
|
-
|
|
45
33
|
var GoogleAnalytics = /*#__PURE__*/function (_Component) {
|
|
46
34
|
_inherits(GoogleAnalytics, _Component);
|
|
47
|
-
|
|
48
35
|
var _super = _createSuper(GoogleAnalytics);
|
|
49
|
-
|
|
50
36
|
function GoogleAnalytics() {
|
|
51
37
|
_classCallCheck(this, GoogleAnalytics);
|
|
52
|
-
|
|
53
38
|
return _super.apply(this, arguments);
|
|
54
39
|
}
|
|
55
|
-
|
|
56
40
|
_createClass(GoogleAnalytics, [{
|
|
57
41
|
key: "render",
|
|
58
42
|
value: function render() {
|
|
@@ -68,7 +52,6 @@ var GoogleAnalytics = /*#__PURE__*/function (_Component) {
|
|
|
68
52
|
})], 4);
|
|
69
53
|
}
|
|
70
54
|
}]);
|
|
71
|
-
|
|
72
55
|
return GoogleAnalytics;
|
|
73
56
|
}(Component);
|
|
74
57
|
/**
|
|
@@ -83,16 +66,12 @@ var GoogleAnalytics = /*#__PURE__*/function (_Component) {
|
|
|
83
66
|
* head={true}
|
|
84
67
|
* plugin={{ tracking_id: '*******' }} />
|
|
85
68
|
*/
|
|
86
|
-
|
|
87
|
-
|
|
88
69
|
GoogleAnalytics.Cacheable = cacheComponent(GoogleAnalytics, 'plugin.googleanalytics', function (props) {
|
|
89
70
|
var head = props.head,
|
|
90
|
-
|
|
91
|
-
|
|
71
|
+
plugin = props.plugin;
|
|
92
72
|
if (!head || !plugin.tracking_id) {
|
|
93
73
|
return null;
|
|
94
74
|
}
|
|
95
|
-
|
|
96
75
|
return {
|
|
97
76
|
trackingId: plugin.tracking_id
|
|
98
77
|
};
|
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
4
|
var _inferno = require("inferno");
|
|
6
|
-
|
|
7
5
|
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
|
-
|
|
6
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
7
|
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
|
-
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
10
|
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
11
|
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
12
|
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
13
|
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
14
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
-
|
|
23
15
|
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
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
-
|
|
27
17
|
/**
|
|
28
18
|
* Hotjar user feedback plugin JSX component.
|
|
29
19
|
* @module view/plugin/hotjar
|
|
30
20
|
*/
|
|
31
21
|
var _require = require('inferno'),
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
Component = _require.Component;
|
|
34
23
|
var _require2 = require('../../util/cache'),
|
|
35
|
-
|
|
24
|
+
cacheComponent = _require2.cacheComponent;
|
|
25
|
+
|
|
36
26
|
/**
|
|
37
27
|
* Hotjar user feedback plugin JSX component.
|
|
38
28
|
*
|
|
@@ -40,19 +30,13 @@ var _require2 = require('../../util/cache'),
|
|
|
40
30
|
* @example
|
|
41
31
|
* <Hotjar siteId="******" />
|
|
42
32
|
*/
|
|
43
|
-
|
|
44
|
-
|
|
45
33
|
var Hotjar = /*#__PURE__*/function (_Component) {
|
|
46
34
|
_inherits(Hotjar, _Component);
|
|
47
|
-
|
|
48
35
|
var _super = _createSuper(Hotjar);
|
|
49
|
-
|
|
50
36
|
function Hotjar() {
|
|
51
37
|
_classCallCheck(this, Hotjar);
|
|
52
|
-
|
|
53
38
|
return _super.apply(this, arguments);
|
|
54
39
|
}
|
|
55
|
-
|
|
56
40
|
_createClass(Hotjar, [{
|
|
57
41
|
key: "render",
|
|
58
42
|
value: function render() {
|
|
@@ -65,7 +49,6 @@ var Hotjar = /*#__PURE__*/function (_Component) {
|
|
|
65
49
|
})], 4);
|
|
66
50
|
}
|
|
67
51
|
}]);
|
|
68
|
-
|
|
69
52
|
return Hotjar;
|
|
70
53
|
}(Component);
|
|
71
54
|
/**
|
|
@@ -80,16 +63,12 @@ var Hotjar = /*#__PURE__*/function (_Component) {
|
|
|
80
63
|
* head={true}
|
|
81
64
|
* plugin={{ site_id: '*******' }} />
|
|
82
65
|
*/
|
|
83
|
-
|
|
84
|
-
|
|
85
66
|
Hotjar.Cacheable = cacheComponent(Hotjar, 'plugin.hotjar', function (props) {
|
|
86
67
|
var head = props.head,
|
|
87
|
-
|
|
88
|
-
|
|
68
|
+
plugin = props.plugin;
|
|
89
69
|
if (!head || !plugin.site_id) {
|
|
90
70
|
return null;
|
|
91
71
|
}
|
|
92
|
-
|
|
93
72
|
return {
|
|
94
73
|
siteId: plugin.site_id
|
|
95
74
|
};
|
package/lib/view/plugin/katex.js
CHANGED
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
4
|
var _inferno = require("inferno");
|
|
6
|
-
|
|
7
5
|
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
|
-
|
|
6
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
7
|
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
|
-
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
10
|
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
11
|
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
12
|
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
13
|
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
14
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
-
|
|
23
15
|
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
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
-
|
|
27
17
|
/**
|
|
28
18
|
* KaTeX math renderer plugin JSX component.
|
|
29
19
|
* @module view/plugin/katex
|
|
30
20
|
*/
|
|
31
21
|
var _require = require('inferno'),
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
Component = _require.Component;
|
|
34
23
|
var _require2 = require('../../util/cache'),
|
|
35
|
-
|
|
24
|
+
cacheComponent = _require2.cacheComponent;
|
|
25
|
+
|
|
36
26
|
/**
|
|
37
27
|
* KaTeX math renderer plugin JSX component.
|
|
38
28
|
*
|
|
@@ -44,27 +34,21 @@ var _require2 = require('../../util/cache'),
|
|
|
44
34
|
* autoRenderUrl="/path/to/auto-render.js"
|
|
45
35
|
* mhchemUrl="/path/to/mhchem.js" />
|
|
46
36
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
37
|
var KaTeX = /*#__PURE__*/function (_Component) {
|
|
50
38
|
_inherits(KaTeX, _Component);
|
|
51
|
-
|
|
52
39
|
var _super = _createSuper(KaTeX);
|
|
53
|
-
|
|
54
40
|
function KaTeX() {
|
|
55
41
|
_classCallCheck(this, KaTeX);
|
|
56
|
-
|
|
57
42
|
return _super.apply(this, arguments);
|
|
58
43
|
}
|
|
59
|
-
|
|
60
44
|
_createClass(KaTeX, [{
|
|
61
45
|
key: "render",
|
|
62
46
|
value: function render() {
|
|
63
47
|
var _this$props = this.props,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
48
|
+
cssUrl = _this$props.cssUrl,
|
|
49
|
+
jsUrl = _this$props.jsUrl,
|
|
50
|
+
autoRenderUrl = _this$props.autoRenderUrl,
|
|
51
|
+
mhchemUrl = _this$props.mhchemUrl;
|
|
68
52
|
var js = "window.addEventListener(\"load\", function() {\n document.querySelectorAll('[role=\"article\"] > .content').forEach(function(element) {\n renderMathInElement(element);\n });\n });";
|
|
69
53
|
return (0, _inferno.createFragment)([(0, _inferno.createVNode)(1, "link", null, null, 1, {
|
|
70
54
|
"rel": "stylesheet",
|
|
@@ -85,7 +69,6 @@ var KaTeX = /*#__PURE__*/function (_Component) {
|
|
|
85
69
|
})], 4);
|
|
86
70
|
}
|
|
87
71
|
}]);
|
|
88
|
-
|
|
89
72
|
return KaTeX;
|
|
90
73
|
}(Component);
|
|
91
74
|
/**
|
|
@@ -100,16 +83,12 @@ var KaTeX = /*#__PURE__*/function (_Component) {
|
|
|
100
83
|
* head={true}
|
|
101
84
|
* helper={{ cdn: function() {...} }} />
|
|
102
85
|
*/
|
|
103
|
-
|
|
104
|
-
|
|
105
86
|
KaTeX.Cacheable = cacheComponent(KaTeX, 'plugin.katex', function (props) {
|
|
106
87
|
var head = props.head,
|
|
107
|
-
|
|
108
|
-
|
|
88
|
+
helper = props.helper;
|
|
109
89
|
if (head) {
|
|
110
90
|
return null;
|
|
111
91
|
}
|
|
112
|
-
|
|
113
92
|
return {
|
|
114
93
|
jsUrl: helper.cdn('katex', '0.15.1', 'dist/katex.min.js'),
|
|
115
94
|
cssUrl: helper.cdn('katex', '0.15.1', 'dist/katex.min.css'),
|
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
4
|
var _inferno = require("inferno");
|
|
6
|
-
|
|
7
5
|
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
|
-
|
|
6
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
7
|
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
|
-
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
10
|
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
11
|
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
12
|
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
13
|
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
14
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
-
|
|
23
15
|
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
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
-
|
|
27
17
|
/**
|
|
28
18
|
* MathJax math renderer plugin JSX component.
|
|
29
19
|
* @module view/plugin/katex
|
|
30
20
|
*/
|
|
31
21
|
var _require = require('inferno'),
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
Component = _require.Component;
|
|
34
23
|
var _require2 = require('../../util/cache'),
|
|
35
|
-
|
|
24
|
+
cacheComponent = _require2.cacheComponent;
|
|
25
|
+
|
|
36
26
|
/**
|
|
37
27
|
* MathJax math renderer plugin JSX component.
|
|
38
28
|
*
|
|
@@ -40,19 +30,13 @@ var _require2 = require('../../util/cache'),
|
|
|
40
30
|
* @example
|
|
41
31
|
* <Mathjax jsUrl="/path/to/mathjax.js" />
|
|
42
32
|
*/
|
|
43
|
-
|
|
44
|
-
|
|
45
33
|
var Mathjax = /*#__PURE__*/function (_Component) {
|
|
46
34
|
_inherits(Mathjax, _Component);
|
|
47
|
-
|
|
48
35
|
var _super = _createSuper(Mathjax);
|
|
49
|
-
|
|
50
36
|
function Mathjax() {
|
|
51
37
|
_classCallCheck(this, Mathjax);
|
|
52
|
-
|
|
53
38
|
return _super.apply(this, arguments);
|
|
54
39
|
}
|
|
55
|
-
|
|
56
40
|
_createClass(Mathjax, [{
|
|
57
41
|
key: "render",
|
|
58
42
|
value: function render() {
|
|
@@ -69,7 +53,6 @@ var Mathjax = /*#__PURE__*/function (_Component) {
|
|
|
69
53
|
})], 4);
|
|
70
54
|
}
|
|
71
55
|
}]);
|
|
72
|
-
|
|
73
56
|
return Mathjax;
|
|
74
57
|
}(Component);
|
|
75
58
|
/**
|
|
@@ -84,16 +67,12 @@ var Mathjax = /*#__PURE__*/function (_Component) {
|
|
|
84
67
|
* head={true}
|
|
85
68
|
* helper={{ cdn: function() {...} }} />
|
|
86
69
|
*/
|
|
87
|
-
|
|
88
|
-
|
|
89
70
|
Mathjax.Cacheable = cacheComponent(Mathjax, 'plugin.mathjax', function (props) {
|
|
90
71
|
var head = props.head,
|
|
91
|
-
|
|
92
|
-
|
|
72
|
+
helper = props.helper;
|
|
93
73
|
if (head) {
|
|
94
74
|
return null;
|
|
95
75
|
}
|
|
96
|
-
|
|
97
76
|
return {
|
|
98
77
|
jsUrl: helper.cdn('mathjax', '2.7.9', 'unpacked/MathJax.js?config=TeX-MML-AM_CHTML')
|
|
99
78
|
};
|