@brightspace-ui/core 1.219.2 → 1.220.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.
- package/components/alert/README.md +18 -2
- package/components/breadcrumbs/README.md +1 -1
- package/components/button/README.md +3 -3
- package/components/html-block/README.md +48 -54
- package/components/html-block/demo/html-block-template.html +634 -0
- package/components/html-block/demo/html-block.html +213 -223
- package/components/html-block/html-block.js +31 -15
- package/components/inputs/docs/input-date-time.md +1 -1
- package/components/inputs/docs/input-numeric.md +1 -1
- package/components/inputs/docs/input-text.md +2 -2
- package/components/inputs/input-checkbox.js +2 -1
- package/components/inputs/input-radio-styles.js +1 -1
- package/custom-elements.json +1 -1
- package/helpers/mathjax.js +11 -3
- package/package.json +1 -1
|
@@ -40,7 +40,7 @@ export const radioStyles = css`
|
|
|
40
40
|
.d2l-input-radio-label > input[type="radio"]:focus {
|
|
41
41
|
border-color: var(--d2l-color-celestine);
|
|
42
42
|
border-width: 2px;
|
|
43
|
-
outline
|
|
43
|
+
outline: none;
|
|
44
44
|
}
|
|
45
45
|
.d2l-input-radio[aria-invalid="true"],
|
|
46
46
|
.d2l-input-radio-label > input[type="radio"][aria-invalid="true"] {
|
package/custom-elements.json
CHANGED
package/helpers/mathjax.js
CHANGED
|
@@ -19,6 +19,7 @@ export class HtmlBlockMathRenderer {
|
|
|
19
19
|
if (!elem.querySelector('math') && !(isLatexSupported && /\$\$|\\\(|\\\[|\\begin{|\\ref{|\\eqref{/.test(elem.innerHTML))) return elem;
|
|
20
20
|
|
|
21
21
|
const mathJaxConfig = {
|
|
22
|
+
deferTypeset: true,
|
|
22
23
|
renderLatex: isLatexSupported,
|
|
23
24
|
outputScale: context.outputScale || 1
|
|
24
25
|
};
|
|
@@ -27,7 +28,11 @@ export class HtmlBlockMathRenderer {
|
|
|
27
28
|
|
|
28
29
|
// If we're opting out of deferred rendering, we need to rely
|
|
29
30
|
// on the global MathJax install for rendering.
|
|
30
|
-
if (options.noDeferredRendering)
|
|
31
|
+
if (options.noDeferredRendering) {
|
|
32
|
+
await window.MathJax.startup.promise;
|
|
33
|
+
window.MathJax.typeset([elem]);
|
|
34
|
+
return elem;
|
|
35
|
+
}
|
|
31
36
|
|
|
32
37
|
const temp = document.createElement('div');
|
|
33
38
|
temp.style.display = 'none';
|
|
@@ -35,6 +40,7 @@ export class HtmlBlockMathRenderer {
|
|
|
35
40
|
temp.shadowRoot.innerHTML = `<div><mjx-doc><mjx-head></mjx-head><mjx-body>${elem.innerHTML}</mjx-body></mjx-doc></div>`;
|
|
36
41
|
|
|
37
42
|
elem.appendChild(temp);
|
|
43
|
+
await window.MathJax.startup.promise;
|
|
38
44
|
window.MathJax.typesetShadow(temp.shadowRoot);
|
|
39
45
|
return temp.shadowRoot.firstChild;
|
|
40
46
|
}
|
|
@@ -138,7 +144,7 @@ export function loadMathJax(mathJaxConfig) {
|
|
|
138
144
|
const InputJax = startup.getInputJax();
|
|
139
145
|
const OutputJax = startup.getOutputJax();
|
|
140
146
|
const html = mathjax.document(root, { InputJax, OutputJax });
|
|
141
|
-
html.render();
|
|
147
|
+
html.render().typeset();
|
|
142
148
|
return html;
|
|
143
149
|
};
|
|
144
150
|
|
|
@@ -146,7 +152,9 @@ export function loadMathJax(mathJaxConfig) {
|
|
|
146
152
|
// Now do the usual startup now that the extensions are in place
|
|
147
153
|
//
|
|
148
154
|
window.MathJax.startup.defaultReady();
|
|
149
|
-
}
|
|
155
|
+
},
|
|
156
|
+
// Defer typesetting if the config is present and deferring is set
|
|
157
|
+
typeset: !(mathJaxConfig && mathJaxConfig.deferTypeset)
|
|
150
158
|
}
|
|
151
159
|
};
|
|
152
160
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.220.0",
|
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|