@brightspace-ui/core 2.35.2 → 2.36.1

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.
@@ -22,8 +22,8 @@ class FilterTags extends RtlMixin(LocalizeCoreElement(LitElement)) {
22
22
  */
23
23
  filterIds: { type: String, attribute: 'filter-ids' },
24
24
  /**
25
- * The text displayed in this component's label
26
- * @default "Applied Filters:"
25
+ * The text displayed in this component's label (hidden when default is used)
26
+ * @default "Active Filters:"
27
27
  * @type {string}
28
28
  */
29
29
  label: { type: String }
@@ -122,6 +122,18 @@
122
122
  </template>
123
123
  </d2l-demo-snippet>
124
124
 
125
+ <h2>HTML Block (inline, no-deferred-rendering)</h2>
126
+
127
+ <d2l-demo-snippet>
128
+ <template>
129
+ <span>Here's an inline html-block:</span>
130
+ <d2l-html-block inline no-deferred-rendering>
131
+ I'm inline!
132
+ </d2l-html-block>
133
+ <span>Pretty cool!</span>
134
+ </template>
135
+ </d2l-demo-snippet>
136
+
125
137
  <h2>HTML Block (large font)</h2>
126
138
 
127
139
  <d2l-demo-snippet>
@@ -160,14 +160,14 @@ class HtmlBlock extends RtlMixin(LitElement) {
160
160
  overflow-y: hidden;
161
161
  text-align: left;
162
162
  }
163
- :host([hidden]),
164
- :host([no-deferred-rendering]) div.d2l-html-block-rendered {
165
- display: none;
166
- }
167
163
  :host([inline]),
168
164
  :host([inline]) div.d2l-html-block-rendered {
169
165
  display: inline;
170
166
  }
167
+ :host([hidden]),
168
+ :host([no-deferred-rendering]) div.d2l-html-block-rendered {
169
+ display: none;
170
+ }
171
171
  :host([dir="rtl"]) {
172
172
  text-align: right;
173
173
  }
@@ -3415,9 +3415,9 @@
3415
3415
  },
3416
3416
  {
3417
3417
  "name": "label",
3418
- "description": "The text displayed in this component's label",
3418
+ "description": "The text displayed in this component's label (hidden when default is used)",
3419
3419
  "type": "string",
3420
- "default": "\"\\\"Applied Filters:\\\"\""
3420
+ "default": "\"\\\"Active Filters:\\\"\""
3421
3421
  }
3422
3422
  ],
3423
3423
  "properties": [
@@ -3430,9 +3430,9 @@
3430
3430
  {
3431
3431
  "name": "label",
3432
3432
  "attribute": "label",
3433
- "description": "The text displayed in this component's label",
3433
+ "description": "The text displayed in this component's label (hidden when default is used)",
3434
3434
  "type": "string",
3435
- "default": "\"\\\"Applied Filters:\\\"\""
3435
+ "default": "\"\\\"Active Filters:\\\"\""
3436
3436
  }
3437
3437
  ]
3438
3438
  },
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  const mathjaxContextAttribute = 'data-mathjax-context';
7
- const mathjaxBaseUrl = 'https://s.brightspace.com/lib/mathjax/3.1.2';
7
+ const mathjaxBaseUrl = 'https://s.brightspace.com/lib/mathjax/3.2.2';
8
8
 
9
9
  const mathjaxFontMappings = new Map([
10
10
  ['MJXTEX', 'MathJax_Main-Regular'],
@@ -31,6 +31,7 @@ const mathjaxFontMappings = new Map([
31
31
  ]);
32
32
 
33
33
  let mathJaxLoaded;
34
+ let renderingPromise = Promise.resolve();
34
35
 
35
36
  export class HtmlBlockMathRenderer {
36
37
 
@@ -70,7 +71,8 @@ export class HtmlBlockMathRenderer {
70
71
  });
71
72
 
72
73
  await window.MathJax.startup.promise;
73
- window.MathJax.typesetShadow(elem.getRootNode(), elem);
74
+ renderingPromise = renderingPromise.then(() => window.MathJax.typesetShadow(elem.getRootNode(), elem));
75
+ await renderingPromise;
74
76
  return elem;
75
77
  }
76
78
 
@@ -82,8 +84,10 @@ export class HtmlBlockMathRenderer {
82
84
  temp.shadowRoot.innerHTML = `<div><mjx-doc><mjx-head></mjx-head><mjx-body>${inner}</mjx-body></mjx-doc></div>`;
83
85
 
84
86
  elem.appendChild(temp);
87
+
85
88
  await window.MathJax.startup.promise;
86
- window.MathJax.typesetShadow(temp.shadowRoot);
89
+ renderingPromise = renderingPromise.then(() => window.MathJax.typesetShadow(temp.shadowRoot));
90
+ await renderingPromise;
87
91
 
88
92
  return temp.shadowRoot.firstChild;
89
93
  }
@@ -94,13 +98,9 @@ export function loadMathJax(mathJaxConfig) {
94
98
 
95
99
  if (mathJaxLoaded) return mathJaxLoaded;
96
100
 
97
- const loadOptions = ['ui/menu'];
98
- if (mathJaxConfig && mathJaxConfig.renderLatex) {
99
- loadOptions.push('[tex]/all-packages');
100
- }
101
-
102
101
  window.MathJax = {
103
102
  chtml: {
103
+ adaptiveCSS: false,
104
104
  scale: (mathJaxConfig && mathJaxConfig.outputScale) || 1
105
105
  },
106
106
  options: {
@@ -108,7 +108,7 @@ export function loadMathJax(mathJaxConfig) {
108
108
  settings: { zoom: 'None' }
109
109
  }
110
110
  },
111
- loader: { load: loadOptions },
111
+ loader: { load: ['ui/menu'] },
112
112
  startup: {
113
113
  ready: () => {
114
114
 
@@ -188,15 +188,15 @@ export function loadMathJax(mathJaxConfig) {
188
188
  // renders the document. The MathDocument is returned in case
189
189
  // you need to rerender the shadowRoot later.
190
190
  //
191
- window.MathJax.typesetShadow = function(root, elem) {
191
+ window.MathJax.typesetShadow = async function(root, elem) {
192
192
  const InputJax = startup.getInputJax();
193
193
  const OutputJax = startup.getOutputJax();
194
194
  const html = mathjax.document(root, { InputJax, OutputJax });
195
195
 
196
196
  if (elem) html.options.elements = [elem];
197
197
 
198
- html.render().typeset();
199
- return html;
198
+ await mathjax.handleRetriesFor(() => html.render());
199
+ html.typeset();
200
200
  };
201
201
 
202
202
  //
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.35.2",
3
+ "version": "2.36.1",
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",