mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-15 18:37:32 +00:00
refactor(web): rename KeyboardInterface → KeyboardInterfaceBase
Fixes: #13438
This commit is contained in:
parent
181e211de8
commit
3093ccd9eb
8 changed files with 15 additions and 15 deletions
|
|
@ -6,7 +6,7 @@ import { DomEventTracker, LegacyEventEmitter } from 'keyman/engine/events';
|
|||
import { DesignIFrame, OutputTargetElementWrapper, nestedInstanceOf } from 'keyman/engine/element-wrappers';
|
||||
import {
|
||||
ContextManagerBase,
|
||||
type KeyboardInterface,
|
||||
type KeyboardInterfaceBase,
|
||||
LegacyAPIEvents
|
||||
} from 'keyman/engine/main';
|
||||
import { BrowserConfiguration } from './configuration.js';
|
||||
|
|
@ -344,7 +344,7 @@ export default class ContextManager extends ContextManagerBase<BrowserConfigurat
|
|||
this.focusAssistant.restoringFocus = false;
|
||||
}
|
||||
|
||||
insertText(kbdInterface: KeyboardInterface<ContextManager>, Ptext: string, PdeadKey: number) {
|
||||
insertText(kbdInterface: KeyboardInterfaceBase<ContextManager>, Ptext: string, PdeadKey: number) {
|
||||
// Find the correct output target to manipulate. The user has likely be interacting with a
|
||||
// 'help page' keyboard, like desktop `sil_euro_latin`, and active browser focus on the
|
||||
// original context element may have been lost.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { type OutputTargetElementWrapper } from 'keyman/engine/element-wrappers';
|
||||
import { FloatingOSKView } from 'keyman/engine/osk';
|
||||
import { KeyboardInterface as KeyboardInterfaceBase } from 'keyman/engine/main';
|
||||
import { KeyboardInterfaceBase } from 'keyman/engine/main';
|
||||
|
||||
import ContextManager from './contextManager.js';
|
||||
import { KeymanEngine } from './keymanEngine.js';
|
||||
|
||||
export default class KeyboardInterface extends KeyboardInterfaceBase<ContextManager> {
|
||||
export class KeyboardInterface extends KeyboardInterfaceBase<ContextManager> {
|
||||
constructor(
|
||||
_jsGlobal: any,
|
||||
engine: KeymanEngine,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import { UtilApiEndpoint} from './utilApiEndpoint.js';
|
|||
import { UIModule } from './uiModuleInterface.js';
|
||||
import { HotkeyManager } from './hotkeyManager.js';
|
||||
import { BeepHandler } from './beepHandler.js';
|
||||
import KeyboardInterface from './keyboardInterface.js';
|
||||
import { KeyboardInterface } from './keyboardInterface.js';
|
||||
import { WorkerFactory } from '@keymanapp/lexical-model-layer/web';
|
||||
|
||||
export class KeymanEngine extends KeymanEngineBase<BrowserConfiguration, ContextManager, HardwareEventKeyboard> {
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ export { default as ContextManager, KeyboardCookie } from "./contextManager.js";
|
|||
export { preprocessKeyboardEvent, default as HardwareEventKeyboard } from './hardwareEventKeyboard.js';
|
||||
|
||||
export { KeymanEngine } from './keymanEngine.js';
|
||||
export { default as KeyboardInterface } from './keyboardInterface.js';
|
||||
export { KeyboardInterface } from './keyboardInterface.js';
|
||||
export { UIModule } from './uiModuleInterface.js';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { DeviceSpec, DefaultRules } from 'keyman/engine/keyboard';
|
||||
import { RuleBehavior } from 'keyman/engine/js-processor';
|
||||
import { KeymanEngineBase, KeyboardInterface } from 'keyman/engine/main';
|
||||
import { KeymanEngineBase, KeyboardInterfaceBase } from 'keyman/engine/main';
|
||||
import { AnchoredOSKView, ViewConfiguration, StaticActivator } from 'keyman/engine/osk';
|
||||
import { getAbsoluteX, getAbsoluteY } from 'keyman/engine/dom-utils';
|
||||
import { toPrefixedKeyboardId, toUnprefixedKeyboardId } from 'keyman/engine/keyboard-storage';
|
||||
|
|
@ -35,7 +35,7 @@ export class KeymanEngine extends KeymanEngineBase<WebviewConfiguration, Context
|
|||
return {
|
||||
// The `engine` parameter cannot be supplied with the constructing instance before calling
|
||||
// `super`, hence the 'fun' rigging to supply it _from_ `super` via this closure.
|
||||
keyboardInterface: new KeyboardInterface(window, engine, config.stubNamespacer),
|
||||
keyboardInterface: new KeyboardInterfaceBase(window, engine, config.stubNamespacer),
|
||||
defaultOutputRules: new DefaultRules()
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
export { EngineConfiguration, InitOptionDefaults, InitOptionSpec } from './engineConfiguration.js';
|
||||
export { ContextManagerBase, ContextManagerConfiguration } from './contextManagerBase.js';
|
||||
export { default as HardKeyboard, processForMnemonicsAndLegacy } from './hardKeyboard.js';
|
||||
export { default as KeyboardInterface } from './keyboardInterface.js';
|
||||
export { KeyboardInterfaceBase } from './keyboardInterfaceBase.js';
|
||||
export { KeymanEngineBase } from './keymanEngineBase.js';
|
||||
export { LegacyAPIEvents } from './legacyAPIEvents.js';
|
||||
export { VariableStoreCookieSerializer } from './variableStoreCookieSerializer.js';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { KeymanWebKeyboard } from '@keymanapp/common-types';
|
||||
import { JSKeyboardInterface as KeyboardInterfaceBase } from 'keyman/engine/js-processor';
|
||||
import { JSKeyboardInterface } from 'keyman/engine/js-processor';
|
||||
import { KeyboardStub, RawKeyboardStub, toUnprefixedKeyboardId as unprefixed } from 'keyman/engine/keyboard-storage';
|
||||
|
||||
import KeyboardObject = KeymanWebKeyboard.KeyboardObject;
|
||||
|
|
@ -9,7 +9,7 @@ import { VariableStoreCookieSerializer } from "./variableStoreCookieSerializer.j
|
|||
import { KeymanEngineBase } from "./keymanEngineBase.js";
|
||||
import { EngineConfiguration } from "./engineConfiguration.js";
|
||||
|
||||
export default class KeyboardInterface<ContextManagerType extends ContextManagerBase<any>> extends KeyboardInterfaceBase {
|
||||
export class KeyboardInterfaceBase<ContextManagerType extends ContextManagerBase<any>> extends JSKeyboardInterface {
|
||||
protected readonly engine: KeymanEngineBase<EngineConfiguration, ContextManagerType, any>;
|
||||
private stubNamespacer?: (stub: RawKeyboardStub) => void;
|
||||
|
||||
|
|
@ -122,5 +122,5 @@ export default class KeyboardInterface<ContextManagerType extends ContextManager
|
|||
}
|
||||
|
||||
(function() {
|
||||
KeyboardInterface.__publishShorthandAPI();
|
||||
KeyboardInterfaceBase.__publishShorthandAPI();
|
||||
}());
|
||||
|
|
@ -9,7 +9,7 @@ import { KeyboardRequisitioner, ModelCache, toUnprefixedKeyboardId as unprefixed
|
|||
import { ModelSpec, PredictionContext } from "keyman/engine/interfaces";
|
||||
|
||||
import { EngineConfiguration, InitOptionSpec } from "./engineConfiguration.js";
|
||||
import KeyboardInterface from "./keyboardInterface.js";
|
||||
import { KeyboardInterfaceBase } from "./keyboardInterfaceBase.js";
|
||||
import { ContextManagerBase } from "./contextManagerBase.js";
|
||||
import HardKeyboardBase from "./hardKeyboard.js";
|
||||
import { LegacyAPIEvents } from "./legacyAPIEvents.js";
|
||||
|
|
@ -42,7 +42,7 @@ export class KeymanEngineBase<
|
|||
> implements KeyboardKeymanGlobal {
|
||||
readonly config: Configuration;
|
||||
contextManager: ContextManager;
|
||||
interface: KeyboardInterface<ContextManager>;
|
||||
interface: KeyboardInterfaceBase<ContextManager>;
|
||||
readonly core: InputProcessor;
|
||||
keyboardRequisitioner: KeyboardRequisitioner;
|
||||
modelCache: ModelCache;
|
||||
|
|
@ -125,7 +125,7 @@ export class KeymanEngineBase<
|
|||
|
||||
const processorConfiguration = processorConfigInitializer(this);
|
||||
processorConfiguration.baseLayout = determineBaseLayout();
|
||||
this.interface = processorConfiguration.keyboardInterface as KeyboardInterface<ContextManager>;
|
||||
this.interface = processorConfiguration.keyboardInterface as KeyboardInterfaceBase<ContextManager>;
|
||||
this.core = new InputProcessor(config.hostDevice, workerFactory, processorConfiguration);
|
||||
|
||||
this.core.languageProcessor.on('statechange', (state) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue