Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"description": "Facilitates text input in any language.",
"exports": {
"./app/browser": {
"es6-bundling": "./src/app/browser/src/test-index.ts",
"types": "./build/app/browser/obj/test-index.d.js",
"import": "./build/app/browser/obj/test-index.js"
"es6-bundling": "./src/app/browser/src/index.ts",
"types": "./build/app/browser/obj/index.d.ts",
"import": "./build/app/browser/obj/index.js"
},
"./common/web-utils": {
"es6-bundling": "./src/common/web-utils/src/index.ts",
"types": "./build/common/web-utils/obj/index.d.js",
"types": "./build/common/web-utils/obj/index.d.ts",
"import": "./build/common/web-utils/obj/index.js"
},
"./engine/attachment": {
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/browser/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ compile_and_copy() {
--minify \
--target "es6"

node_es_bundle "${BUILD_ROOT}/obj/test-index.js" \
node_es_bundle "${BUILD_ROOT}/obj/index.js" \
--out "${BUILD_ROOT}/lib/index.mjs" \
--charset "utf8" \
--sourceRoot "@keymanapp/keyman/web/build/app/browser/lib" \
Expand Down
22 changes: 22 additions & 0 deletions web/src/app/browser/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/

export { ContextManager, KeyboardCookie } from "./contextManager.js";
export { KeyboardDetails } from './keyboardDetails.js';
export { KeymanEngine } from './keymanEngine.js';
export { UIModule } from './uiModuleInterface.js';

//----------------------------------------------------------------------
// Exports for unit testing only

/** @internal */
export { type BrowserInitOptionSpec } from './configuration.js';
/** @internal */
export { type KeyboardInterface } from './keyboardInterface.js';

import { preprocessKeyboardEvent } from './hardwareEventKeyboard.js';
/** @internal */
export const unitTestEndPoints = {
preprocessKeyboardEvent
}
8 changes: 0 additions & 8 deletions web/src/app/browser/src/test-index.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { assert } from 'chai';

import { preprocessKeyboardEvent } from 'keyman/app/browser';
import { unitTestEndPoints } from 'keyman/app/browser';
import { processForMnemonicsAndLegacy } from 'keyman/engine/main';
import { PhysicalInputEventSpec } from '@keymanapp/recorder-core';
import { DeviceSpec } from 'keyman/common/web-utils';
import { Codes, JSKeyboard, KeyEvent } from 'keyman/engine/keyboard';

const ModifierCodes = Codes.modifierCodes;
const KeyCodes = Codes.keyCodes;
const preprocessKeyboardEvent = unitTestEndPoints.preprocessKeyboardEvent;

const DUMMY_DEVICE = new DeviceSpec('chrome', 'desktop', 'windows', false);

Expand Down
Loading