refactor(web): remove default from KeyEvent

Also make exports explicit in `index.ts`.
This commit is contained in:
Eberhard Beilharz 2025-05-20 12:07:49 +02:00
parent 6fb03a54f3
commit 8dff16ef0f
No known key found for this signature in database
GPG key ID: E9140597606020D3
6 changed files with 6 additions and 7 deletions

View file

@ -6,7 +6,7 @@
import { ModifierKeyConstants } from '@keymanapp/common-types';
import Codes from './codes.js';
import type KeyEvent from './keyEvent.js';
import { type KeyEvent } from './keyEvent.js';
import { type OutputTarget } from './outputTarget.js';
export enum EmulationKeystrokes {

View file

@ -25,8 +25,7 @@ export { default as Codes } from "./codes.js";
export * from "./codes.js";
export { default as DefaultRules } from "./defaultRules.js";
export * from "./defaultRules.js";
export { default as KeyEvent } from "./keyEvent.js";
export * from "./keyEvent.js";
export { type KeyDistribution, KeyEventSpec, KeyEvent } from "./keyEvent.js";
export { default as KeyMapping } from "./keyMapping.js";
export { OutputTarget } from "./outputTarget.js";
export * from "./systemStores.js";

View file

@ -64,7 +64,7 @@ export interface KeyEventSpec {
* This class is defined within its own file so that it can be loaded by code outside of KMW without
* having to actually load the entirety of KMW.
*/
export default class KeyEvent implements KeyEventSpec {
export class KeyEvent implements KeyEventSpec {
Lcode: number;
Lstates: number;
LmodifierChange?: boolean;

View file

@ -3,7 +3,7 @@
Copyright 2019 SIL International
***/
import type KeyEvent from "./keyEvent.js";
import { KeyEvent } from "./keyEvent.js";
import { KeyEventSpec } from "./keyEvent.js";
class KeyMap {

View file

@ -1,5 +1,5 @@
import Codes from "../codes.js";
import KeyEvent, { KeyEventSpec } from "../keyEvent.js";
import { KeyEvent, KeyEventSpec } from "../keyEvent.js";
import KeyMapping from "../keyMapping.js";
import { ButtonClasses, Layouts } from "./defaultLayouts.js";
import type { LayoutKey, LayoutSubKey, LayoutRow, LayoutLayer, LayoutFormFactor, ButtonClass } from "./defaultLayouts.js";

View file

@ -1,7 +1,7 @@
import Codes from "../codes.js";
import { Layouts } from "./defaultLayouts.js";
import { ActiveKey, ActiveLayout, ActiveSubKey } from "./activeLayout.js";
import KeyEvent from "../keyEvent.js";
import { KeyEvent } from "../keyEvent.js";
import { type OutputTarget } from "../outputTarget.js";
import { KeymanWebKeyboard, ModifierKeyConstants, TouchLayout } from "@keymanapp/common-types";