Skip to content
Merged
8 changes: 4 additions & 4 deletions components/mjs/a11y/speech/speech.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import {SpeechHandler} from '#js/a11y/speech.js';

if (MathJax.loader) {
let path = Package.resolvePath('[sre]', false);
if (!hasWindow) {
if (hasWindow) {
path = new URL(path, location).href;
} else {
const REQUIRE = typeof require !== 'undefined' ? require : MathJax.config.loader.require;
if (REQUIRE?.resolve) {
const pool = MathJax.config.options?.worker?.pool || 'speech-workerpool.js';
path = path.replace(/\/bundle\/sre$/, '/cjs/a11y/sre');
path = REQUIRE.resolve(`${path}/${pool}`).replace(/\/[^\/]*$/, '');
path = REQUIRE.resolve(`${path}/require.mjs`).replace(/\/[^\/]*$/, '');
} else {
path = '';
}
Expand Down
12 changes: 0 additions & 12 deletions components/mjs/a11y/sre/workerpool/config.json

This file was deleted.

6 changes: 0 additions & 6 deletions components/mjs/a11y/sre/workerpool/speech-workerpool.js

This file was deleted.

5 changes: 0 additions & 5 deletions components/mjs/a11y/sre/workerpool/webpack.cjs

This file was deleted.

4 changes: 1 addition & 3 deletions lab/build/init.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
global.SREfeature = {
json: '../../../bundle/sre/mathmaps'
};
global.SREfeature.json = global.SREfeature.json.replace(/mjs\/a11y/, 'bundle');
1 change: 0 additions & 1 deletion ts/a11y/speech.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ export function SpeechMathDocumentMixin<
}),
worker: {
path: sreRoot(),
pool: 'speech-workerpool.html',
worker: 'speech-worker.js',
debug: false,
},
Expand Down
3 changes: 1 addition & 2 deletions ts/a11y/speech/MessageTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ export type WorkerCommand = {
data: Message;
};

export type PoolCommand = {
export type ClientCommand = {
cmd: string;
data: WorkerCommand | Message;
};

export type Structure = { [id: string]: any };
export type StructureData = Structure | string;
Loading