@brightspace-ui/core 1.219.1 → 1.219.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.
@@ -225,14 +225,17 @@ class HtmlBlock extends LitElement {
225
225
 
226
226
  async _processRenderers(elem) {
227
227
  for (const renderer of getRenderers()) {
228
- if (this.noDeferredRendering && !renderer.canRenderInline) continue;
229
-
230
228
  if (this._contextObserverController && renderer.contextAttributes) {
231
229
  const contextValues = new Map();
232
230
  renderer.contextAttributes.forEach(attr => contextValues.set(attr, this._contextObserverController.values.get(attr)));
233
- elem = await renderer.render(elem, contextValues);
231
+ elem = await renderer.render(elem, {
232
+ contextValues: contextValues,
233
+ noDeferredRendering: this.noDeferredRendering
234
+ });
234
235
  } else {
235
- elem = await renderer.render(elem);
236
+ elem = await renderer.render(elem, {
237
+ noDeferredRendering: this.noDeferredRendering
238
+ });
236
239
  }
237
240
  }
238
241
 
@@ -4,19 +4,13 @@ let mathJaxLoaded;
4
4
 
5
5
  export class HtmlBlockMathRenderer {
6
6
 
7
- get canRenderInline() {
8
- // The custom MathJax ShadowAdaptor creates a new document and renders
9
- // its contents to the DOM.
10
- return false;
11
- }
12
-
13
7
  get contextAttributes() {
14
8
  return [mathjaxContextAttribute];
15
9
  }
16
10
 
17
- async render(elem, contextValues) {
18
- if (!contextValues) return elem;
19
- const contextVal = contextValues.get(mathjaxContextAttribute);
11
+ async render(elem, options) {
12
+ if (!options.contextValues) return elem;
13
+ const contextVal = options.contextValues.get(mathjaxContextAttribute);
20
14
  if (contextVal === undefined) return elem;
21
15
 
22
16
  const context = JSON.parse(contextVal) || {};
@@ -31,6 +25,10 @@ export class HtmlBlockMathRenderer {
31
25
 
32
26
  await loadMathJax(mathJaxConfig);
33
27
 
28
+ // If we're opting out of deferred rendering, we need to rely
29
+ // on the global MathJax install for rendering.
30
+ if (options.noDeferredRendering) return elem;
31
+
34
32
  const temp = document.createElement('div');
35
33
  temp.style.display = 'none';
36
34
  temp.attachShadow({ mode: 'open' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "1.219.1",
3
+ "version": "1.219.2",
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",