acsi-core 0.9.8 → 0.9.10
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/dist/index.js +21 -12
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +21 -12
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11,8 +11,10 @@ var reactstrap = require('reactstrap');
|
|
|
11
11
|
var ReactSelect = require('react-select');
|
|
12
12
|
var ReactSelect__default = _interopDefault(ReactSelect);
|
|
13
13
|
var ReactMarkdown = _interopDefault(require('react-markdown'));
|
|
14
|
+
var remarkGfm = _interopDefault(require('remark-gfm'));
|
|
14
15
|
var remarkMath = _interopDefault(require('remark-math'));
|
|
15
16
|
var rehypeKatex = _interopDefault(require('rehype-katex'));
|
|
17
|
+
var remarkRehype = _interopDefault(require('remark-rehype'));
|
|
16
18
|
var rehypeRaw = _interopDefault(require('rehype-raw'));
|
|
17
19
|
require('katex/dist/katex.min.css');
|
|
18
20
|
var Cookies = _interopDefault(require('js-cookie'));
|
|
@@ -2074,13 +2076,20 @@ var LatexExtractor = /*#__PURE__*/function () {
|
|
|
2074
2076
|
LatexExtractor.LATEX_COMMANDS = ['\\frac', '\\sqrt', '\\sum', '\\prod', '\\int', '\\oint', '\\lim', '\\sin', '\\cos', '\\tan', '\\log', '\\ln', '\\exp', '\\alpha', '\\beta', '\\gamma', '\\delta', '\\epsilon', '\\varepsilon', '\\zeta', '\\eta', '\\theta', '\\vartheta', '\\iota', '\\kappa', '\\lambda', '\\mu', '\\nu', '\\xi', '\\pi', '\\varpi', '\\rho', '\\varrho', '\\sigma', '\\varsigma', '\\tau', "\\upsilon", '\\phi', '\\varphi', '\\chi', '\\psi', '\\omega', '\\Gamma', '\\Delta', '\\Theta', '\\Lambda', '\\Xi', '\\Pi', '\\Sigma', "\\Upsilon", '\\Phi', '\\Psi', '\\Omega', '\\to', '\\gets', '\\mapsto', '\\implies', '\\iff', '\\leftrightarrow', '\\longleftarrow', '\\longrightarrow', '\\longleftrightarrow', '\\Leftarrow', '\\Rightarrow', '\\Leftrightarrow', '\\le', '\\ge', '\\leq', '\\geq', '\\lt', '\\gt', '\\neq', '\\approx', '\\equiv', '\\sim', '\\cong', '\\leqslant', '\\geqslant', '\\parallel', '\\perp', '\\in', '\\notin', '\\subset', '\\subseteq', '\\cup', '\\cap', '\\emptyset', '\\forall', '\\exists', '\\nexists', '\\wedge', '\\vee', '\\neg', '\\partial', '\\nabla', '\\infty', '\\pm', '\\mp', '\\vec', '\\overrightarrow', "\\underrightarrow", '\\overline', "\\underline", '\\widehat', '\\widetilde', '\\overbrace', "\\underbrace", '\\mathbb', '\\mathrm', '\\mathcal', '\\mathfrak', '\\mathscr', '\\text', '\\textbf', '\\textit', '\\left', '\\right', '\\lfloor', '\\rfloor', '\\lceil', '\\rceil', '\\langle', '\\rangle', '\\cdot', '\\times', '\\div', '\\parallel', '\\angle', '\\bot', '\\newline', '\\ldots', '\\cdots', '\\vdots', '\\ddots'];
|
|
2075
2077
|
LatexExtractor.LATEX_PATTERNS = [/[a-zA-Z0-9]_\{[^}]*\}/g, /[a-zA-Z0-9]\^\{[^}]*\}/g, /\\[a-zA-Z]+\s*\{[^}]*\}(?:\s*\{[^}]*\})*/g, /\\[a-zA-Z]+(?![a-zA-Z])/g, /\\frac\s*\{[^}]*\}\s*\{[^}]*\}/g, /\\sqrt(?:\[[^\]]*\])?\s*\{[^}]*\}/g, /\\vec\s*\{[^}]*\}/g, /\\(?:alpha|beta|gamma|delta|epsilon|varepsilon|zeta|eta|theta|vartheta|iota|kappa|lambda|mu|nu|xi|pi|varpi|rho|varrho|sigma|varsigma|tau|upsilon|phi|varphi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?![a-zA-Z])/g, /[a-zA-Z0-9_{}\\]+\s*=\s*[a-zA-Z0-9_{}\\+\-*/^().\s]+/g, /\\Delta\s*[a-zA-Z]/g, /[a-zA-Z]+_\{[a-zA-Z0-9]+\}/g, /[a-zA-Z0-9_{}\\]+\s*[+\-*/]\s*[a-zA-Z0-9_{}\\().\s]+/g, /,\s*([a-zA-Z0-9_{}\\]+(?:\s*[=+\-*/^]\s*[a-zA-Z0-9_{}\\().\s]*)*)/g, /([a-zA-Z0-9_{}\\]+(?:\s*[=+\-*/^]\s*[a-zA-Z0-9_{}\\().\s]*)*)\s*,/g, /\bto\s+([a-zA-Z0-9_{}\\]+(?:\s*[=+\-*/^~≈]\s*[a-zA-Z0-9_{}\\().\s]*)*)/g, /([a-zA-Z0-9_{}\\]+(?:\s*[=+\-*/^~≈]\s*[a-zA-Z0-9_{}\\().\s]*)*)\s+to\b/g];
|
|
2076
2078
|
|
|
2079
|
+
var _excluded$3 = ["node"];
|
|
2077
2080
|
var MarkdownRenderer = function MarkdownRenderer(_ref) {
|
|
2078
2081
|
var content = _ref.content;
|
|
2079
2082
|
var formattedContent = formatContent(content);
|
|
2080
|
-
return React__default.createElement(ReactMarkdown, {
|
|
2081
|
-
remarkPlugins: [remarkMath],
|
|
2082
|
-
rehypePlugins: [rehypeKatex, rehypeRaw]
|
|
2083
|
-
|
|
2083
|
+
return React__default.createElement("span", null, React__default.createElement(ReactMarkdown, {
|
|
2084
|
+
remarkPlugins: [remarkMath, remarkGfm, remarkRehype],
|
|
2085
|
+
rehypePlugins: [rehypeKatex, rehypeRaw],
|
|
2086
|
+
components: {
|
|
2087
|
+
p: function p(_ref2) {
|
|
2088
|
+
var props = _objectWithoutPropertiesLoose(_ref2, _excluded$3);
|
|
2089
|
+
return React__default.createElement("span", Object.assign({}, props));
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
}, formattedContent));
|
|
2084
2093
|
};
|
|
2085
2094
|
function formatContent(content) {
|
|
2086
2095
|
if (!content || content.trim() === "") {
|
|
@@ -3722,7 +3731,7 @@ var CustomOption = function CustomOption(props) {
|
|
|
3722
3731
|
}, props.data.label));
|
|
3723
3732
|
};
|
|
3724
3733
|
|
|
3725
|
-
var _excluded$
|
|
3734
|
+
var _excluded$4 = ["isDefault", "defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
|
|
3726
3735
|
var CustomSelect = function CustomSelect(_ref) {
|
|
3727
3736
|
var isDefault = _ref.isDefault,
|
|
3728
3737
|
options = _ref.options,
|
|
@@ -3730,7 +3739,7 @@ var CustomSelect = function CustomSelect(_ref) {
|
|
|
3730
3739
|
scrollBottom = _ref.scrollBottom,
|
|
3731
3740
|
value = _ref.value,
|
|
3732
3741
|
isMulti = _ref.isMulti,
|
|
3733
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3742
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
3734
3743
|
var initialValues = Array.isArray(value) ? options.filter(function (i) {
|
|
3735
3744
|
return value.includes(i.value);
|
|
3736
3745
|
}) : isMulti ? options === null || options === void 0 ? void 0 : options.filter(function (i) {
|
|
@@ -3757,7 +3766,7 @@ var CustomSelect = function CustomSelect(_ref) {
|
|
|
3757
3766
|
}, rest));
|
|
3758
3767
|
};
|
|
3759
3768
|
|
|
3760
|
-
var _excluded$
|
|
3769
|
+
var _excluded$5 = ["isDefault", "defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
|
|
3761
3770
|
var CustomAsyncSelect = function CustomAsyncSelect(_ref) {
|
|
3762
3771
|
var isDefault = _ref.isDefault,
|
|
3763
3772
|
options = _ref.options,
|
|
@@ -3765,7 +3774,7 @@ var CustomAsyncSelect = function CustomAsyncSelect(_ref) {
|
|
|
3765
3774
|
scrollBottom = _ref.scrollBottom,
|
|
3766
3775
|
value = _ref.value,
|
|
3767
3776
|
isMulti = _ref.isMulti,
|
|
3768
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3777
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
3769
3778
|
var initialValues = Array.isArray(value) ? options.filter(function (i) {
|
|
3770
3779
|
return value.includes(i.value);
|
|
3771
3780
|
}) : isMulti ? options.filter(function (i) {
|
|
@@ -3792,14 +3801,14 @@ var CustomAsyncSelect = function CustomAsyncSelect(_ref) {
|
|
|
3792
3801
|
}, rest));
|
|
3793
3802
|
};
|
|
3794
3803
|
|
|
3795
|
-
var _excluded$
|
|
3804
|
+
var _excluded$6 = ["defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
|
|
3796
3805
|
var CustomCreatable = function CustomCreatable(_ref) {
|
|
3797
3806
|
var options = _ref.options,
|
|
3798
3807
|
isDisabled = _ref.isDisabled,
|
|
3799
3808
|
scrollBottom = _ref.scrollBottom,
|
|
3800
3809
|
value = _ref.value,
|
|
3801
3810
|
isMulti = _ref.isMulti,
|
|
3802
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3811
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
3803
3812
|
var initialValues = Array.isArray(value) ? options.filter(function (i) {
|
|
3804
3813
|
return value.includes(i.value);
|
|
3805
3814
|
}) : isMulti ? options.filter(function (i) {
|
|
@@ -3826,7 +3835,7 @@ var CustomCreatable = function CustomCreatable(_ref) {
|
|
|
3826
3835
|
}, rest));
|
|
3827
3836
|
};
|
|
3828
3837
|
|
|
3829
|
-
var _excluded$
|
|
3838
|
+
var _excluded$7 = ["defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
|
|
3830
3839
|
var CustomSelectOption = function CustomSelectOption(_ref) {
|
|
3831
3840
|
var defaultValue = _ref.defaultValue,
|
|
3832
3841
|
options = _ref.options,
|
|
@@ -3834,7 +3843,7 @@ var CustomSelectOption = function CustomSelectOption(_ref) {
|
|
|
3834
3843
|
scrollBottom = _ref.scrollBottom,
|
|
3835
3844
|
value = _ref.value,
|
|
3836
3845
|
isMulti = _ref.isMulti,
|
|
3837
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3846
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
3838
3847
|
var initialValues = defaultValue !== null && typeof defaultValue !== "undefined" ? options.find(function (option) {
|
|
3839
3848
|
return option.value === defaultValue;
|
|
3840
3849
|
}) || null : null;
|