Skip to content

Commit 9c28302

Browse files
committed
Fix ckeditor5-math build with mathlive 0.109.0
1 parent c813de7 commit 9c28302

File tree

5 files changed

+8
-17
lines changed

5 files changed

+8
-17
lines changed

packages/ckeditor5-math/src/ui/mainformview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ButtonView, FocusCycler, FocusTracker, KeystrokeHandler, LabelView, submitHandler, SwitchButtonView, View, ViewCollection, type FocusableView, type Locale } from 'ckeditor5';
2-
import IconCheck from "@ckeditor/ckeditor5-icons/theme/icons/check.svg?raw";
3-
import IconCancel from "@ckeditor/ckeditor5-icons/theme/icons/cancel.svg?raw";
2+
import IconCheck from "../../theme/icons/check.svg?raw";
3+
import IconCancel from "../../theme/icons/cancel.svg?raw";
44
import { extractDelimiters, hasDelimiters } from '../utils.js';
55
import MathView, { type MathViewOptions } from './mathview.js';
66
import MathInputView from './mathinputview.js';

packages/ckeditor5-math/src/ui/mathinputview.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@ import { View, type Locale, type FocusableView } from 'ckeditor5';
44
import 'mathlive/fonts.css'; // Auto-bundles offline fonts
55
import 'mathlive/static.css'; // Static styles for mathlive
66

7-
declare global {
8-
interface Window {
9-
mathVirtualKeyboard?: {
10-
visible: boolean;
11-
show: () => void;
12-
hide: () => void;
13-
addEventListener: ( event: string, cb: () => void ) => void;
14-
removeEventListener: ( event: string, cb: () => void ) => void;
15-
};
16-
}
17-
}
18-
197
interface MathFieldElement extends HTMLElement {
208
value: string;
219
readOnly: boolean;
@@ -142,7 +130,7 @@ export default class MathInputView extends View {
142130
} );
143131

144132
// Handle virtual keyboard geometry changes
145-
const vk = window.mathVirtualKeyboard;
133+
const vk = (window as any).mathVirtualKeyboard;
146134
if ( vk && !this._vkGeometryHandler ) {
147135
this._vkGeometryHandler = () => {
148136
if ( vk.visible && this.mathfield ) {
@@ -259,7 +247,7 @@ export default class MathInputView extends View {
259247
}
260248

261249
public hideKeyboard(): void {
262-
window.mathVirtualKeyboard?.hide();
250+
(window as any).mathVirtualKeyboard?.hide();
263251
}
264252

265253
public focus(): void {
@@ -272,7 +260,7 @@ export default class MathInputView extends View {
272260

273261
public override destroy(): void {
274262
this._destroyed = true;
275-
const vk = window.mathVirtualKeyboard;
263+
const vk = (window as any).mathVirtualKeyboard;
276264
if ( vk && this._vkGeometryHandler ) {
277265
vk.removeEventListener( 'geometrychange', this._vkGeometryHandler );
278266
this._vkGeometryHandler = undefined;
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

packages/ckeditor5-math/tsconfig.dist.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"module": "ESNext",
55
"moduleResolution": "bundler",
66
"rootDir": "./src",
7+
"outDir": "./dist",
78
"composite": false,
89
"types": [
910
"../typings/types.d.ts"

0 commit comments

Comments
 (0)