mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-19 14:17:40 +00:00
Merge pull request #15102 from keymanapp/refactor/web/downgrade-web-utils-from-package-to-module
refactor(web): change @keymanapp/web-utils to keyman/common/web-utils 🎼
This commit is contained in:
commit
5b6540a6eb
143 changed files with 184 additions and 300 deletions
25
package-lock.json
generated
25
package-lock.json
generated
|
|
@ -1769,10 +1769,6 @@
|
|||
"resolved": "web/src/engine/sentry-manager",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@keymanapp/web-utils": {
|
||||
"resolved": "web/src/engine/common/web-utils",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@mdn/browser-compat-data": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-4.2.1.tgz",
|
||||
|
|
@ -14168,7 +14164,6 @@
|
|||
"@keymanapp/keyman-version": "*",
|
||||
"@keymanapp/lexical-model-layer": "*",
|
||||
"@keymanapp/recorder-core": "*",
|
||||
"@keymanapp/web-utils": "*",
|
||||
"core-js": "^3.34.0",
|
||||
"eventemitter3": "^5.0.0",
|
||||
"tslib": "^2.5.2"
|
||||
|
|
@ -14212,8 +14207,20 @@
|
|||
"node": ">=14.18"
|
||||
}
|
||||
},
|
||||
"web/src/common/web-utils": {
|
||||
"name": "@keymanapp/web-utils",
|
||||
"extraneous": true,
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@keymanapp/keyman-version": "*",
|
||||
"@keymanapp/resources-gosh": "*",
|
||||
"c8": "^7.12.0",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
},
|
||||
"web/src/engine/common/web-utils": {
|
||||
"name": "@keymanapp/web-utils",
|
||||
"extraneous": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@keymanapp/common-types": "*"
|
||||
|
|
@ -14243,13 +14250,10 @@
|
|||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@keymanapp/common-types": "*",
|
||||
"@keymanapp/keyman-version": "*",
|
||||
"@keymanapp/models-wordbreakers": "*",
|
||||
"@keymanapp/resources-gosh": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@keymanapp/common-types": "*",
|
||||
"@keymanapp/web-utils": "*",
|
||||
"@types/mocha": "^7.0.2",
|
||||
"c8": "^7.12.0",
|
||||
"typescript": "^5.4.5"
|
||||
|
|
@ -14280,7 +14284,6 @@
|
|||
"@keymanapp/keyman-version": "*",
|
||||
"@keymanapp/models-templates": "*",
|
||||
"@keymanapp/models-wordbreakers": "*",
|
||||
"@keymanapp/web-utils": "*",
|
||||
"es6-shim": "^0.35.5",
|
||||
"string.prototype.codepointat": "^0.2.1"
|
||||
},
|
||||
|
|
@ -14297,7 +14300,6 @@
|
|||
"@keymanapp/keyman-version": "*",
|
||||
"@keymanapp/models-templates": "*",
|
||||
"@keymanapp/models-wordbreakers": "*",
|
||||
"@keymanapp/web-utils": "*",
|
||||
"es6-shim": "^0.35.5",
|
||||
"string.prototype.codepointat": "^0.2.1",
|
||||
"string.prototype.startswith": "^0.2.0"
|
||||
|
|
@ -14340,8 +14342,7 @@
|
|||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@keymanapp/common-types": "*",
|
||||
"@keymanapp/keyman-version": "*",
|
||||
"@keymanapp/web-utils": "*"
|
||||
"@keymanapp/keyman-version": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.4.5"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
|
||||
"baseUrl": ".",
|
||||
"baseUrl": "./",
|
||||
|
||||
"paths": {
|
||||
"@keymanapp/common-types": ["./common/web/types/src/main"],
|
||||
|
|
@ -30,7 +30,6 @@
|
|||
"@keymanapp/keyman": ["./web" ],
|
||||
"@keymanapp/models-templates": ["./web/src/engine/predictive-text/templates/"],
|
||||
"@keymanapp/models-wordbreakers": ["./web/src/engine/predictive-text/wordbreakers"],
|
||||
"@keymanapp/web-utils": ["./web/src/engine/common/web-utils"],
|
||||
"@keymanapp/lm-message-types": ["./web/src/engine/predictive-text/types"],
|
||||
"@keymanapp/keyman-version": ["./common/web/keyman-version"],
|
||||
"@keymanapp/ldml-keyboard-constants": [ "./core/include/ldml" ],
|
||||
|
|
|
|||
|
|
@ -37,17 +37,5 @@
|
|||
{ "path": "./resources/build/version/" },
|
||||
|
||||
{ "path": "./web/src/tsconfig.all.json" },
|
||||
{ "path": "./web/src/engine/common/web-utils" },
|
||||
{ "path": "./web/src/engine/predictive-text/types/" },
|
||||
{ "path": "./web/src/engine/predictive-text/templates" },
|
||||
{ "path": "./web/src/engine/predictive-text/wordbreakers" },
|
||||
{ "path": "./web/src/engine/predictive-text/worker-main/tsconfig.all.json" },
|
||||
{ "path": "./web/src/engine/predictive-text/worker-thread" },
|
||||
{ "path": "./web/src/tools/testing/gesture-processor/unit-test-resources" },
|
||||
{ "path": "./web/src/engine/sentry-manager/src" },
|
||||
|
||||
{ "path": "./web/src/tools/testing/recorder" },
|
||||
// { "path": "./web/tools/recorder/tsconfig.json" },
|
||||
// { "path": "./web/tools/sourcemap-root/tsconfig.json" },
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ graph TD;
|
|||
KeyboardSpec["/web/src/engine/keyboard"];
|
||||
JSProc["/web/src/engine/js-processor"];
|
||||
OSK-->KeyboardSpec;
|
||||
WebUtils["@keymanapp/web-utils<br>(/web/src/engine/common/web-utils)"];
|
||||
WebUtils["/web/src/common/web-utils"];
|
||||
KeyboardSpec---->WebUtils;
|
||||
Wordbreakers["@keymanapp/models-wordbreakers<br>(/web/src/engine/predictive-text/wordbreakers)"];
|
||||
Models["@keymanapp/models-templates<br>(/web/src/engine/predictive-text/templates/)"];
|
||||
|
|
|
|||
47
web/build.sh
47
web/build.sh
|
|
@ -26,8 +26,8 @@ builder_describe "Builds engine modules for Keyman Engine for Web (KMW)." \
|
|||
":app/browser The form of Keyman Engine for Web for use on websites" \
|
||||
":app/webview A puppetable version of KMW designed for use in a host app's WebView" \
|
||||
":app/ui Builds KMW's desktop form-factor keyboard-selection UI modules" \
|
||||
":common/web-utils Shared utils" \
|
||||
":engine Keyman Engine for Web" \
|
||||
":engine/common/web-utils Shared utils" \
|
||||
":engine/predictive-text Builds KMW's predictive text module" \
|
||||
":help Online documentation" \
|
||||
":samples Builds all needed resources for the KMW sample-page set" \
|
||||
|
|
@ -46,46 +46,30 @@ if builder_is_debug_build; then
|
|||
fi
|
||||
|
||||
builder_describe_outputs \
|
||||
configure "/node_modules" \
|
||||
build "/web/build/test/dom/cases/attachment/textStoreForElement.tests.html" \
|
||||
build:app/browser "/web/build/app/browser/lib/index.mjs" \
|
||||
build:app/webview "/web/build/app/webview/${config}/keymanweb-webview.js" \
|
||||
build:app/ui "/web/build/app/ui/${config}/kmwuitoggle.js" \
|
||||
build:engine/attachment "/web/build/engine/attachment/lib/index.mjs" \
|
||||
build:engine/core-processor "/web/build/engine/core-processor/lib/index.mjs" \
|
||||
build:engine/dom-utils "/web/build/engine/dom-utils/obj/index.js" \
|
||||
build:engine/events "/web/build/engine/events/lib/index.mjs" \
|
||||
build:engine/element-text-stores "/web/build/engine/element-text-stores/lib/index.mjs" \
|
||||
build:engine/interfaces "/web/build/engine/interfaces/lib/index.mjs" \
|
||||
build:engine/js-processor "/web/build/engine/js-processor/lib/index.mjs" \
|
||||
build:engine/keyboard "/web/build/engine/keyboard/lib/index.mjs" \
|
||||
build:engine/keyboard-storage "/web/build/engine/keyboard-storage/lib/index.mjs" \
|
||||
build:engine/main "/web/build/engine/main/lib/index.mjs" \
|
||||
build:engine/osk "/web/build/engine/osk/lib/index.mjs" \
|
||||
build:engine/predictive-text "/web/src/engine/predictive-text/worker-main/build/lib/web/index.mjs" \
|
||||
build:engine/common/web-utils "/web/src/engine/common/web-utils/build/lib/index.mjs" \
|
||||
build:samples "/web/src/samples/simplest/keymanweb.js" \
|
||||
build:tools "/web/build/tools/building/sourcemap-root/index.js" \
|
||||
build:test-pages "/web/build/test-resources/sentry-manager.js"
|
||||
configure "/node_modules" \
|
||||
build "/web/build/test/dom/cases/attachment/outputTargetForElement.tests.html" \
|
||||
build:app/browser "/web/build/app/browser/lib/index.mjs" \
|
||||
build:app/webview "/web/build/app/webview/${config}/keymanweb-webview.js" \
|
||||
build:app/ui "/web/build/app/ui/${config}/kmwuitoggle.js" \
|
||||
build:common/web-utils "/web/build/common/web-utils/lib/index.mjs" \
|
||||
build:engine "/web/build/engine/lib/index.mjs" \
|
||||
build:engine/predictive-text "/web/src/engine/predictive-text/worker-main/build/lib/web/index.mjs" \
|
||||
build:samples "/web/src/samples/simplest/keymanweb.js" \
|
||||
build:tools "/web/build/tools/building/sourcemap-root/index.js" \
|
||||
build:test-pages "/web/build/test-resources/sentry-manager.js"
|
||||
|
||||
BUNDLE_CMD="node ${KEYMAN_ROOT}/web/src/tools/es-bundling/build/common-bundle.mjs"
|
||||
|
||||
#### Build action definitions ####
|
||||
|
||||
##################### TODO: call child action, verify things work as expected!
|
||||
|
||||
# We can run all clean & configure actions at once without much issue.
|
||||
|
||||
## Clean actions
|
||||
|
||||
builder_run_action clean:_all rm -rf build/
|
||||
|
||||
builder_run_child_actions clean
|
||||
|
||||
## Clean actions
|
||||
|
||||
###--- Future tie-in: if #8831 gets accepted, uncomment the next two lines. ---###
|
||||
# # If a full-on general clean was requested, we can nuke the entire build folder.
|
||||
# builder_run_action clean:project rm -rf ./build
|
||||
|
||||
builder_run_child_actions configure
|
||||
|
||||
## Build actions
|
||||
|
|
@ -158,7 +142,8 @@ coverage_action() {
|
|||
|
||||
builder_run_child_actions build:tools
|
||||
|
||||
builder_run_child_actions build:engine/common/web-utils
|
||||
builder_run_child_actions build:common/web-utils
|
||||
|
||||
builder_run_child_actions build:engine
|
||||
builder_run_child_actions build:engine/predictive-text
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,11 @@
|
|||
"types": "./build/app/browser/obj/test-index.d.js",
|
||||
"import": "./build/app/browser/obj/test-index.js"
|
||||
},
|
||||
"./common/web-utils": {
|
||||
"es6-bundling": "./src/common/web-utils/src/index.ts",
|
||||
"types": "./build/common/web-utils/obj/index.d.js",
|
||||
"import": "./build/common/web-utils/obj/index.js"
|
||||
},
|
||||
"./engine/attachment": {
|
||||
"es6-bundling": "./src/engine/src/attachment/index.ts",
|
||||
"types": "./build/engine/obj/attachment/index.d.ts",
|
||||
|
|
@ -111,7 +116,6 @@
|
|||
"@keymanapp/lexical-model-layer": "*",
|
||||
"@keymanapp/common-types": "*",
|
||||
"@keymanapp/recorder-core": "*",
|
||||
"@keymanapp/web-utils": "*",
|
||||
"core-js": "^3.34.0",
|
||||
"eventemitter3": "^5.0.0",
|
||||
"tslib": "^2.5.2"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { EngineConfiguration, InitOptionSpec, InitOptionDefaults } from "keyman/
|
|||
|
||||
import { AbstractElementTextStore } from 'keyman/engine/element-text-stores';
|
||||
import { TextStore, ProcessorAction } from 'keyman/engine/keyboard';
|
||||
import { isEmptyTransform } from '@keymanapp/web-utils';
|
||||
import { isEmptyTransform } from 'keyman/common/web-utils';
|
||||
import { AlertHost } from "./utils/alertHost.js";
|
||||
import { whenDocumentReady } from "./utils/documentReady.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,9 @@
|
|||
"extends": "../../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/app/browser/obj/",
|
||||
"rootDir": "./src",
|
||||
"tsBuildInfoFile": "../../../build/app/browser/obj/tsconfig.tsbuildinfo",
|
||||
"paths": {
|
||||
"keyman/engine/*": [ "../../engine/src/*/index.js" ],
|
||||
}
|
||||
},
|
||||
|
||||
"include": [ "**/*.ts" ],
|
||||
|
|
|
|||
|
|
@ -2,13 +2,9 @@
|
|||
"extends": "../../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/app/ui/obj",
|
||||
"rootDir": "",
|
||||
"tsBuildInfoFile": "../../../build/app/ui/obj/tsconfig.tsbuildinfo",
|
||||
"paths": {
|
||||
"keyman/engine/*": ["../../engine/src/*/index.js"],
|
||||
},
|
||||
},
|
||||
"files": [
|
||||
"kmwuibutton.ts",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { KeyboardStub } from 'keyman/engine/keyboard-storage';
|
|||
import { ContextManagerBase } from 'keyman/engine/main';
|
||||
import { WebviewConfiguration } from './configuration.js';
|
||||
import { LexicalModelTypes } from '@keymanapp/common-types';
|
||||
import { KMWString, isEmptyTransform } from '@keymanapp/web-utils';
|
||||
import { KMWString, isEmptyTransform } from 'keyman/common/web-utils';
|
||||
|
||||
export type OnInsertTextFunc = (deleteLeft: number, text: string, deleteRight: number) => void;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,18 +2,15 @@
|
|||
"extends": "../../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/app/webview/obj/",
|
||||
"rootDir": "./src",
|
||||
"tsBuildInfoFile": "../../../build/app/webview/obj/tsconfig.tsbuildinfo",
|
||||
"paths": {
|
||||
"keyman/engine/*": ["../../engine/src/*/index.js"],
|
||||
},
|
||||
},
|
||||
|
||||
"include": [ "**/*.ts" ],
|
||||
|
||||
"references": [
|
||||
{ "path": "../../engine" }
|
||||
{ "path": "../../engine" },
|
||||
{ "path": "../../common/web-utils" },
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
],
|
||||
"exclude-after-remap": true,
|
||||
"reporter": ["text", "text-summary"],
|
||||
"reports-dir": "../../../build/coverage/raw/raw/engine/common/web-utils",
|
||||
"reports-dir": "../../../build/coverage/raw/raw/common/web-utils",
|
||||
"src": [
|
||||
"src/"
|
||||
]
|
||||
|
|
@ -5,15 +5,15 @@
|
|||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh"
|
||||
. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
. "${KEYMAN_ROOT}/web/common.inc.sh"
|
||||
. "${KEYMAN_ROOT}/resources/build/utils.inc.sh"
|
||||
. "${KEYMAN_ROOT}/resources/build/node.inc.sh"
|
||||
|
||||
SUBPROJECT_NAME=engine/common/web-utils
|
||||
BUILD_DIR="/web/src/engine/common/web-utils/build"
|
||||
SUBPROJECT_NAME=common/web-utils
|
||||
BUILD_DIR="/web/build/common/web-utils"
|
||||
|
||||
BUNDLE_CMD="node ${KEYMAN_ROOT}/web/src/tools/es-bundling/build/common-bundle.mjs"
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { assert } from 'chai';
|
||||
|
||||
import { deepCopy } from '@keymanapp/web-utils';
|
||||
import { deepCopy } from 'keyman/common/web-utils';
|
||||
|
||||
|
||||
describe('deepCopy', function() {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { assert } from 'chai';
|
||||
|
||||
import { ManagedPromise } from '@keymanapp/web-utils';
|
||||
import { ManagedPromise } from 'keyman/common/web-utils';
|
||||
|
||||
describe("ManagedPromise", () => {
|
||||
it('<void> resolution', async () => {
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { PriorityQueue } from '@keymanapp/web-utils';
|
||||
import { PriorityQueue } from 'keyman/common/web-utils';
|
||||
|
||||
describe('Priority queue', function() {
|
||||
it('can act as a min-heap', function () {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { assert } from 'chai';
|
||||
// Trigger the String-extending methods.
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
|
||||
describe('Unicode string handling', () => {
|
||||
describe('disabled: BMP-mode, BMP-only strings', () => {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { assert } from 'chai';
|
||||
|
||||
import { TimeoutPromise, timedPromise } from '@keymanapp/web-utils';
|
||||
import { TimeoutPromise, timedPromise } from 'keyman/common/web-utils';
|
||||
|
||||
// Set this long enough to allow a bit of delay from OS context-switching (often on the
|
||||
// order of ~16ms for some OSes) to occur multiple times without breaking these tests.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { assert } from 'chai';
|
||||
|
||||
import { Version } from '@keymanapp/web-utils';
|
||||
import { Version } from 'keyman/common/web-utils';
|
||||
|
||||
describe('Version Logic', function() {
|
||||
it('Should provide a default, fallback value when nothing is specified', function() {
|
||||
|
|
@ -1,13 +1,12 @@
|
|||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./build/obj/tsconfig.tsbuildinfo",
|
||||
"baseUrl": "./",
|
||||
"outDir": "./build/obj/",
|
||||
"tsBuildInfoFile": "../../../build/common/web-utils/obj/tsconfig.tsbuildinfo",
|
||||
"outDir": "../../../build/common/web-utils/obj/",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../../../../../common/web/keyman-version" },
|
||||
{ "path": "../../../../common/web/keyman-version" },
|
||||
],
|
||||
"include": [
|
||||
"src/*.ts"
|
||||
|
|
@ -17,7 +17,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
|||
builder_describe "Builds Keyman Engine for Web (KMW)" \
|
||||
"@/core:wasm" \
|
||||
"@/web/src/engine/predictive-text" \
|
||||
"@/web/src/engine/common/web-utils" \
|
||||
"@/web/src/common/web-utils" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
|
|
|
|||
17
web/src/engine/common/web-utils/.gitignore
vendored
17
web/src/engine/common/web-utils/.gitignore
vendored
|
|
@ -1,17 +0,0 @@
|
|||
# Build products
|
||||
src/environment.inc.ts
|
||||
|
||||
# Legacy build folders.
|
||||
output/
|
||||
build/
|
||||
embedded/
|
||||
|
||||
# Current build output folder (matches standard node publish location).
|
||||
dist/
|
||||
|
||||
# Other local files.
|
||||
node_modules/
|
||||
source/environment.inc.ts
|
||||
**/.idea/**/*.xml
|
||||
**/*.iml
|
||||
**/*.kpj.user
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
{
|
||||
"name": "@keymanapp/web-utils",
|
||||
"description": "Common utility functions used in both Keyman Engine for Web and the predictive text worker",
|
||||
"main": "./build/obj/index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"es6-bundling": "./src/index.ts",
|
||||
"types": "./build/obj/index.d.ts",
|
||||
"import": "./build/obj/index.js"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "gosh ./build.sh",
|
||||
"clean": "gosh ./build.sh clean"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/keymanapp/keyman.git"
|
||||
},
|
||||
"author": "SIL International",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/keymanapp/keyman/issues"
|
||||
},
|
||||
"homepage": "https://github.com/keymanapp/keyman#readme",
|
||||
"devDependencies": {
|
||||
"@keymanapp/keyman-version": "*",
|
||||
"@keymanapp/resources-gosh": "*",
|
||||
"c8": "^7.12.0",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@keymanapp/common-types": "*"
|
||||
},
|
||||
"type": "module",
|
||||
"paths": {
|
||||
"@keymanapp/keyman-version": "*"
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
|||
SUBPROJECT_NAME=engine/predictive-text/templates
|
||||
|
||||
builder_describe "Builds the predictive-text model template implementation module" \
|
||||
"@/common/web/keyman-version" \
|
||||
"@/web/src/common/web-utils" \
|
||||
"@/web/src/tools/es-bundling" \
|
||||
"@../wordbreakers" \
|
||||
"clean" \
|
||||
|
|
|
|||
|
|
@ -51,14 +51,11 @@
|
|||
"url": "https://github.com/keymanapp/keyman/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@keymanapp/common-types": "*",
|
||||
"@keymanapp/web-utils": "*",
|
||||
"@types/mocha": "^7.0.2",
|
||||
"c8": "^7.12.0",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@keymanapp/keyman-version": "*",
|
||||
"@keymanapp/common-types": "*",
|
||||
"@keymanapp/models-wordbreakers": "*",
|
||||
"@keymanapp/resources-gosh": "*"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import Outcome = LexicalModelTypes.Outcome;
|
|||
import Suggestion = LexicalModelTypes.Suggestion;
|
||||
import Transform = LexicalModelTypes.Transform;
|
||||
import WithOutcome = LexicalModelTypes.WithOutcome;
|
||||
import { KMWString } from "@keymanapp/web-utils";
|
||||
import { KMWString } from "keyman/common/web-utils";
|
||||
|
||||
export const SENTINEL_CODE_UNIT = '\uFDD0';
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
// Worth noting: we're starting to get quite a 'library' of common model/LMLayer functionality.
|
||||
// Should probably make a 'lm-utils' submodule.
|
||||
|
||||
import { KMWString, PriorityQueue } from "@keymanapp/web-utils";
|
||||
import { KMWString, PriorityQueue } from "keyman/common/web-utils";
|
||||
import { default as defaultWordBreaker } from "@keymanapp/models-wordbreakers";
|
||||
|
||||
import { applyTransform, isHighSurrogate, isSentinel, SENTINEL_CODE_UNIT, transformToSuggestion } from "./common.js";
|
||||
|
|
|
|||
|
|
@ -2,15 +2,14 @@
|
|||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"baseUrl": "./",
|
||||
"outDir": "build/obj",
|
||||
"tsBuildInfoFile": "build/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src"
|
||||
"rootDir": "./src",
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../../../../../common/web/types" },
|
||||
{ "path": "../../common/web-utils" },
|
||||
{ "path": "../wordbreakers" }
|
||||
{ "path": "../../../common/web-utils" },
|
||||
{ "path": "../wordbreakers" },
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "build/",
|
||||
"tsBuildInfoFile": "build/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"extends": "../../../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../build/tools/data-compiler/obj",
|
||||
"tsBuildInfoFile": "../../build/tools/data-compiler/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./",
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./build/main/obj",
|
||||
"tsBuildInfoFile": "./build/main/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src/main"
|
||||
"rootDir": "./src/main",
|
||||
},
|
||||
"include": [
|
||||
"./src/main/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../../../common/web-utils" },
|
||||
],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@
|
|||
"@keymanapp/models-templates": "*",
|
||||
"@keymanapp/models-wordbreakers": "*",
|
||||
"@keymanapp/keyman-version": "*",
|
||||
"@keymanapp/web-utils": "*",
|
||||
"es6-shim": "^0.35.5",
|
||||
"string.prototype.codepointat": "^0.2.1"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
// error when constructing the Worker for unit tests. ES6 is sufficient.
|
||||
"target": "ES6",
|
||||
"types": ["node"],
|
||||
"baseUrl": "../",
|
||||
"outDir": "../../build/obj",
|
||||
"tsBuildInfoFile": "../../build/obj/node/tsconfig.tsbuildinfo",
|
||||
"rootDir": "../"
|
||||
|
|
|
|||
|
|
@ -2,13 +2,12 @@
|
|||
"extends": "../../../../../tsconfig.base.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../build/obj",
|
||||
"tsBuildInfoFile": "../build/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./"
|
||||
"rootDir": "./",
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../../../common/web-utils" },
|
||||
{ "path": "../../../../common/web-utils" },
|
||||
{ "path": "../../../../../../common/web/types"},
|
||||
{ "path": "../../types"}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
"extends": "../../../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"lib": ["es6", "DOM"],
|
||||
"baseUrl": "../",
|
||||
"outDir": "../../build/obj",
|
||||
"tsBuildInfoFile": "../../build/obj/web/tsconfig.tsbuildinfo",
|
||||
"rootDir": "../"
|
||||
|
|
|
|||
|
|
@ -6,14 +6,13 @@
|
|||
"extends": "../../../../tsconfig.base.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "build/obj",
|
||||
"tsBuildInfoFile": "build/obj/tsconfig.all.tsbuildinfo",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"files": [],
|
||||
"references": [
|
||||
{ "path": "../../common/web-utils" },
|
||||
{ "path": "../../../common/web-utils" },
|
||||
{ "path": "../../../../../common/web/types"},
|
||||
{ "path": "../types"},
|
||||
{ "path": "src/node" },
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
"@keymanapp/keyman-version": "*",
|
||||
"@keymanapp/models-templates": "*",
|
||||
"@keymanapp/models-wordbreakers": "*",
|
||||
"@keymanapp/web-utils": "*",
|
||||
"es6-shim": "^0.35.5",
|
||||
"string.prototype.codepointat": "^0.2.1",
|
||||
"string.prototype.startswith": "^0.2.0"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { applyTransform, buildMergedTransform, Token } from '@keymanapp/models-templates';
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
|
||||
import { ClassicalDistanceCalculation, EditOperation } from './classical-calculation.js';
|
||||
import { SearchSpace } from './distance-modeler.js';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { SENTINEL_CODE_UNIT } from '@keymanapp/models-templates';
|
||||
import { QueueComparator as Comparator, PriorityQueue } from '@keymanapp/web-utils';
|
||||
import { QueueComparator as Comparator, PriorityQueue } from 'keyman/common/web-utils';
|
||||
|
||||
import { LexicalModelTypes } from '@keymanapp/common-types';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { timedPromise } from "@keymanapp/web-utils";
|
||||
import { timedPromise } from "keyman/common/web-utils";
|
||||
|
||||
const MIN_OUTLIER = 1; // 1ms.
|
||||
const MAX_CANDIDATES = 5;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
import * as models from './models/index.js';
|
||||
import * as correction from './correction/index.js';
|
||||
import * as wordBreakers from '@keymanapp/models-wordbreakers';
|
||||
import { KMWString } from "@keymanapp/web-utils";
|
||||
import { KMWString } from "keyman/common/web-utils";
|
||||
|
||||
import ModelCompositor from './model-compositor.js';
|
||||
import { ImportScripts, IncomingMessage, LMLayerWorkerState, LoadMessage, ModelEval, ModelFile, ModelSourceSpec, PostMessage } from './worker-interfaces.js';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import * as models from '@keymanapp/models-templates';
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
import { LexicalModelTypes } from '@keymanapp/common-types';
|
||||
|
||||
import * as correction from './correction/index.js'
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import LexicalModelPunctuation = LexicalModelTypes.LexicalModelPunctuation;
|
|||
import * as models from '@keymanapp/models-templates';
|
||||
import * as wordBreakers from '@keymanapp/models-wordbreakers';
|
||||
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
|
||||
/**
|
||||
* The default punctuation and spacing produced by the model.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import * as models from '@keymanapp/models-templates';
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
import { LexicalModelTypes } from '@keymanapp/common-types';
|
||||
|
||||
import TransformUtils from './transformUtils.js';
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
|
||||
import { LexicalModelTypes } from '@keymanapp/common-types';
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
|
||||
import Distribution = LexicalModelTypes.Distribution;
|
||||
import Transform = LexicalModelTypes.Transform;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
"extends": "../../../../tsconfig.base.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "build/obj",
|
||||
"tsBuildInfoFile": "build/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src/main",
|
||||
|
|
@ -22,7 +21,7 @@
|
|||
{ "path": "../types" },
|
||||
// modules
|
||||
{ "path": "../../../../../common/web/keyman-version" },
|
||||
{ "path": "../../common/web-utils" },
|
||||
{ "path": "../../../common/web-utils" },
|
||||
{ "path": "../templates" },
|
||||
{ "path": "../wordbreakers" },
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"lib": ["es6", "dom"],
|
||||
"outDir": "../build/obj",
|
||||
"rootDir": "./",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { DeviceSpec, ManagedPromise } from '@keymanapp/web-utils';
|
||||
import { DeviceSpec, ManagedPromise } from 'keyman/common/web-utils';
|
||||
import { type InternalKeyboardFont as KeyboardFont } from 'keyman/engine/keyboard';
|
||||
|
||||
type FontFamilyStyleMap = {[family: string]: HTMLStyleElement};
|
||||
|
|
@ -172,7 +172,7 @@ export class StylesheetManager {
|
|||
if(!source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
s += 'src:'+source+';';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { AbstractElementTextStore } from './abstractElementTextStore.js';
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
|
||||
class SelectionCaret {
|
||||
node: Node;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { AbstractElementTextStore } from './abstractElementTextStore.js';
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
|
||||
class SelectionCaret {
|
||||
node: Node;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { AbstractElementTextStore } from './abstractElementTextStore.js';
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
|
||||
interface EventMap {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { AbstractElementTextStore } from './abstractElementTextStore.js';
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
|
||||
export class TextAreaElementTextStore extends AbstractElementTextStore<{}> {
|
||||
root: HTMLTextAreaElement;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { timedPromise } from "@keymanapp/web-utils";
|
||||
import { timedPromise } from "keyman/common/web-utils";
|
||||
import { reportError } from "../reportError.js";
|
||||
|
||||
export type QueueClosure = () => (Promise<any> | void);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { GestureSource, GestureSourceSubview } from "../../gestureSource.js";
|
|||
|
||||
import { GestureModel, GestureResolution, GestureResolutionSpec, RejectionDefault, RejectionReplace, ResolutionItemSpec } from "../specs/gestureModel.js";
|
||||
|
||||
import { ManagedPromise, TimeoutPromise } from "@keymanapp/web-utils";
|
||||
import { ManagedPromise, TimeoutPromise } from "keyman/common/web-utils";
|
||||
import { FulfillmentCause, PathMatcher } from "./pathMatcher.js";
|
||||
import { CumulativePathStats } from "../../cumulativePathStats.js";
|
||||
import { processSampleClientCoords } from "../../../inputEventEngine.js";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { MatchResult } from "./gestureMatcher.js";
|
|||
import { GestureModel, GestureResolution } from "../specs/gestureModel.js";
|
||||
import { MatcherSelection, MatcherSelector } from "./matcherSelector.js";
|
||||
import { GestureRecognizerConfiguration, TouchpointCoordinator } from "../../../index.js";
|
||||
import { ManagedPromise, timedPromise } from "@keymanapp/web-utils";
|
||||
import { ManagedPromise, timedPromise } from "keyman/common/web-utils";
|
||||
|
||||
export class GestureStageReport<Type, StateToken = any> {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { EventEmitter } from "eventemitter3";
|
||||
|
||||
import { ManagedPromise, timedPromise } from "@keymanapp/web-utils";
|
||||
import { ManagedPromise, timedPromise } from "keyman/common/web-utils";
|
||||
|
||||
import { GestureSource, GestureSourceSubview } from "../../gestureSource.js";
|
||||
import { GestureMatcher, MatchResult, PredecessorMatch } from "./gestureMatcher.js";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { CumulativePathStats } from "../../cumulativePathStats.js";
|
||||
import { GestureSource, GestureSourceSubview } from "../../gestureSource.js";
|
||||
import { ContactModel } from "../specs/contactModel.js";
|
||||
import { ManagedPromise, TimeoutPromise } from "@keymanapp/web-utils";
|
||||
import { ManagedPromise, TimeoutPromise } from "keyman/common/web-utils";
|
||||
|
||||
export type FulfillmentCause = 'path' | 'timer' | 'item' | 'cancelled';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { InputEventEngine } from "./inputEventEngine.js";
|
|||
import { Nonoptional } from "./nonoptional.js";
|
||||
import { ZoneBoundaryChecker } from "./configuration/zoneBoundaryChecker.js";
|
||||
import { GestureSource } from "./headless/gestureSource.js";
|
||||
import { ManagedPromise } from "@keymanapp/web-utils";
|
||||
import { ManagedPromise } from "keyman/common/web-utils";
|
||||
import { AsyncClosureDispatchQueue } from "./headless/asyncClosureDispatchQueue.js";
|
||||
import { GesturePath } from "./index.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
//#region Imports
|
||||
|
||||
import { type DeviceSpec, KMWString } from "@keymanapp/web-utils";
|
||||
import { type DeviceSpec, KMWString } from "keyman/common/web-utils";
|
||||
import { ModifierKeyConstants } from '@keymanapp/common-types';
|
||||
import {
|
||||
Codes,
|
||||
|
|
|
|||
|
|
@ -14,12 +14,10 @@ import {
|
|||
TextStore, ProcessorAction, SystemStoreIDs, SyntheticTextStore
|
||||
} from "keyman/engine/keyboard";
|
||||
import { JSKeyboardInterface } from './jsKeyboardInterface.js';
|
||||
import { DeviceSpec, globalObject, KMWString } from "@keymanapp/web-utils";
|
||||
import { DeviceSpec, globalObject, KMWString } from "keyman/common/web-utils";
|
||||
|
||||
// #endregion
|
||||
|
||||
// Also relies on @keymanapp/web-utils, which is included via tsconfig.json.
|
||||
|
||||
export type BeepHandler = (textStore: TextStore) => void;
|
||||
export type LogMessageHandler = (str: string) => void;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ export { TextStoreLanguageProcessorInterface } from "./textStoreLanguageProcesso
|
|||
export { findCommonSubstringEndIndex } from "./stringDivergence.js";
|
||||
export { Deadkey } from "./deadkeys.js";
|
||||
|
||||
export * from "@keymanapp/web-utils";
|
||||
// TODO-web-core: why do we export these here?
|
||||
export * from "keyman/common/web-utils";
|
||||
|
||||
// At the top level, there should be no default export.
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
// other platforms recognize and utilize this type.
|
||||
|
||||
import { type JSKeyboard } from "./keyboards/jsKeyboard.js";
|
||||
import { type DeviceSpec } from "@keymanapp/web-utils";
|
||||
import { type DeviceSpec } from "keyman/common/web-utils";
|
||||
|
||||
import { Codes } from './codes.js';
|
||||
import { DefaultRules } from "./defaultRules.js";
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import TouchLayoutFlick = TouchLayout.TouchLayoutFlick;
|
|||
import TouchLayoutSpec = TouchLayout.TouchLayoutPlatform;
|
||||
import TouchLayerSpec = TouchLayout.TouchLayoutLayer;
|
||||
import TouchLayoutKeySp = TouchLayout.TouchLayoutKeySp;
|
||||
import { type DeviceSpec } from "@keymanapp/web-utils";
|
||||
import { type DeviceSpec } from "keyman/common/web-utils";
|
||||
|
||||
// TS 3.9 changed behavior of getters to make them
|
||||
// non-enumerable by default. This broke our 'polyfill'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Copyright 2017 SIL International
|
||||
***/
|
||||
|
||||
import { Version, deepCopy } from "@keymanapp/web-utils";
|
||||
import { Version, deepCopy } from "keyman/common/web-utils";
|
||||
import { KeymanWebKeyboard, ModifierKeyConstants, TouchLayout } from "@keymanapp/common-types";
|
||||
|
||||
import EncodedVisualKeyboard = KeymanWebKeyboard.EncodedVisualKeyboard;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import LayoutSpec = KeymanWebKeyboard.LayoutSpec;
|
|||
|
||||
type TouchLayoutSpec = TouchLayout.TouchLayoutPlatform & { isDefault?: boolean};
|
||||
|
||||
import { Version, DeviceSpec } from "@keymanapp/web-utils";
|
||||
import { Version, DeviceSpec } from "keyman/common/web-utils";
|
||||
import { StateKeyMap } from "./stateKeyMap.js";
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { JSKeyboard } from "./jsKeyboard.js";
|
||||
import { Codes } from "../codes.js";
|
||||
import { DeviceSpec } from '@keymanapp/web-utils';
|
||||
import { DeviceSpec } from 'keyman/common/web-utils';
|
||||
|
||||
/**
|
||||
* Defines members of the top-level `keyman` global object necessary to guarantee
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { TextStore } from './textStore.js';
|
||||
import { TextStoreLanguageProcessorInterface } from './textStoreLanguageProcessorInterface.js';
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
|
||||
export class SyntheticTextStore extends TextStore {
|
||||
text: string;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { KMWString } from "@keymanapp/web-utils";
|
||||
import { KMWString } from "keyman/common/web-utils";
|
||||
import { Alternate, TextTransform } from "./keyboards/textTransform.js";
|
||||
import { Transcription } from "./keyboards/transcription.js";
|
||||
import { findCommonSubstringEndIndex } from "./stringDivergence.js";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { LexicalModelTypes } from '@keymanapp/common-types';
|
||||
import { SyntheticTextStore } from "keyman/engine/keyboard";
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
|
||||
export default class ContextWindow implements LexicalModelTypes.Context {
|
||||
// Used to limit the range of context replicated for use of keyboard rules within
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Detect the user's device.
|
||||
*/
|
||||
import StyleConstants from './utils/styleConstants.js';
|
||||
import { DeviceSpec, Version } from "@keymanapp/web-utils";
|
||||
import { DeviceSpec, Version } from "keyman/common/web-utils";
|
||||
|
||||
export class DeviceDetector {
|
||||
// These correspond directly to the properties & parameters for `DeviceSpec`.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
import ContextWindow from "./contextWindow.js";
|
||||
import { LanguageProcessor } from "./languageProcessor.js";
|
||||
import type { ModelSpec, PathConfiguration } from "keyman/engine/interfaces";
|
||||
import { globalObject, DeviceSpec, isEmptyTransform } from "@keymanapp/web-utils";
|
||||
import { globalObject, DeviceSpec, isEmptyTransform } from "keyman/common/web-utils";
|
||||
|
||||
import { KM_Core } from 'keyman/engine/core-processor';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { DeviceSpec } from "@keymanapp/web-utils";
|
||||
import { DeviceSpec } from "keyman/common/web-utils";
|
||||
|
||||
/*
|
||||
* This file is intended for CSS-styling constants that see use with the OSK.
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import { HardKeyboardBase } from "./hardKeyboardBase.js";
|
|||
import { LegacyAPIEvents } from "./legacyAPIEvents.js";
|
||||
import { EventNames, EventListener, LegacyEventEmitter } from "keyman/engine/events";
|
||||
import KEYMAN_VERSION from "@keymanapp/keyman-version";
|
||||
import { KMWString } from "@keymanapp/web-utils";
|
||||
import { KMWString } from "keyman/common/web-utils";
|
||||
|
||||
// From https://stackoverflow.com/a/69328045
|
||||
type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { DeviceSpec } from '@keymanapp/web-utils';
|
||||
import { DeviceSpec } from 'keyman/common/web-utils';
|
||||
import type { PredictionContext, StateChangeEnum } from 'keyman/engine/interfaces';
|
||||
import { ImageBanner } from './imageBanner.js';
|
||||
import { SuggestionBanner } from './suggestionBanner.js';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { deepCopy } from '@keymanapp/web-utils';
|
||||
import { deepCopy } from 'keyman/common/web-utils';
|
||||
|
||||
import {
|
||||
gestures,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { DeviceSpec } from "@keymanapp/web-utils";
|
||||
import { DeviceSpec } from "keyman/common/web-utils";
|
||||
|
||||
import EmbeddedGestureConfig from './embeddedGestureConfig.js';
|
||||
import { OSKResourcePathConfiguration } from "keyman/engine/interfaces";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { DeviceSpec } from "@keymanapp/web-utils";
|
||||
import { DeviceSpec } from "keyman/common/web-utils";
|
||||
import { ParsedLengthStyle } from "./lengthStyle.js";
|
||||
|
||||
export function getFontSizeStyle(e: HTMLElement|string): {val: number, absolute: boolean} {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { landscapeView } from "keyman/engine/dom-utils";
|
||||
import { DeviceSpec } from "@keymanapp/web-utils";
|
||||
import { DeviceSpec } from "keyman/common/web-utils";
|
||||
|
||||
/**
|
||||
* Get viewport scale factor for this document
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { ManagedPromise } from "@keymanapp/web-utils";
|
||||
import { ManagedPromise } from "keyman/common/web-utils";
|
||||
|
||||
export default class TouchEventPromiseMap {
|
||||
private map: Map<number, ManagedPromise<void>> = new Map();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import {
|
|||
timedPromise,
|
||||
ActiveKeyBase
|
||||
} from 'keyman/engine/keyboard';
|
||||
import { isEmptyTransform } from '@keymanapp/web-utils';
|
||||
import { isEmptyTransform } from 'keyman/common/web-utils';
|
||||
|
||||
import { buildCorrectiveLayout } from './correctionLayout.js';
|
||||
import { distributionFromDistanceMaps, keyTouchDistances } from './corrections.js';
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
"extends": "../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../build/engine/obj/",
|
||||
"tsBuildInfoFile": "../../build/engine/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src",
|
||||
"paths": {
|
||||
"keyman/engine/*": ["./src/*/index.js"]
|
||||
},
|
||||
},
|
||||
|
||||
"include": [ "src/**/*.ts", "src/core-processor/import/*.js" ],
|
||||
|
||||
"references": [
|
||||
{ "path": "../common/web-utils" }
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { PageContextAttachment } from 'keyman/engine/attachment';
|
||||
import { DeviceSpec, timedPromise } from '@keymanapp/web-utils';
|
||||
import { DeviceSpec, timedPromise } from 'keyman/common/web-utils';
|
||||
import { DEFAULT_BROWSER_TIMEOUT } from '@keymanapp/common-test-resources/test-timeouts.mjs';
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import {
|
|||
PageAttachmentOptions,
|
||||
} from 'keyman/engine/attachment';
|
||||
|
||||
import { timedPromise } from '@keymanapp/web-utils';
|
||||
import { timedPromise } from 'keyman/common/web-utils';
|
||||
import { DEFAULT_BROWSER_TIMEOUT } from '@keymanapp/common-test-resources/test-timeouts.mjs';
|
||||
import sinon from 'sinon';
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { KeyboardHarness, MinimalKeymanGlobal } from 'keyman/engine/keyboard';
|
|||
import { DOMKeyboardLoader } from 'keyman/engine/keyboard';
|
||||
import { loadKeyboardsFromStubs } from '../../kbdLoader.js';
|
||||
|
||||
import { DeviceSpec, ManagedPromise, timedPromise } from '@keymanapp/web-utils';
|
||||
import { DeviceSpec, ManagedPromise, timedPromise } from 'keyman/common/web-utils';
|
||||
import { DEFAULT_BROWSER_TIMEOUT } from '@keymanapp/common-test-resources/test-timeouts.mjs';
|
||||
import sinon from 'sinon';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import sinon from 'sinon';
|
|||
|
||||
import { CloudQueryEngine, type KeyboardStub, DOMCloudRequester } from 'keyman/engine/keyboard-storage';
|
||||
import { PathConfiguration } from 'keyman/engine/interfaces';
|
||||
import { ManagedPromise } from '@keymanapp/web-utils';
|
||||
import { ManagedPromise } from 'keyman/common/web-utils';
|
||||
|
||||
const pathConfig = new PathConfiguration({
|
||||
root: '',
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import * as KeymanOSK from 'keyman/engine/osk';
|
|||
import { DeviceDetector } from 'keyman/engine/main';
|
||||
|
||||
import { loadKeyboardsFromStubs } from '../../kbdLoader.js';
|
||||
import { timedPromise } from '@keymanapp/web-utils';
|
||||
import { timedPromise } from 'keyman/common/web-utils';
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { DEFAULT_BROWSER_TIMEOUT } from '@keymanapp/common-test-resources/test-timeouts.mjs';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import * as KeymanOSK from 'keyman/engine/osk';
|
|||
import { DeviceDetector } from 'keyman/engine/main';
|
||||
|
||||
import { loadKeyboardsFromStubs } from '../../kbdLoader.js';
|
||||
import { timedPromise } from '@keymanapp/web-utils';
|
||||
import { timedPromise } from 'keyman/common/web-utils';
|
||||
|
||||
import sinon from 'sinon';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { assert } from 'chai';
|
|||
import { preprocessKeyboardEvent } from 'keyman/app/browser';
|
||||
import { processForMnemonicsAndLegacy } from 'keyman/engine/main';
|
||||
import { PhysicalInputEventSpec } from '@keymanapp/recorder-core';
|
||||
import { DeviceSpec } from '@keymanapp/web-utils';
|
||||
import { DeviceSpec } from 'keyman/common/web-utils';
|
||||
import { Codes, JSKeyboard, KeyEvent } from 'keyman/engine/keyboard';
|
||||
|
||||
const ModifierCodes = Codes.modifierCodes;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import fs from 'fs';
|
|||
import { createRequire } from 'module';
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
import { Codes, KeyEvent, MinimalKeymanGlobal, SyntheticTextStore } from 'keyman/engine/keyboard';
|
||||
import { JSKeyboardInterface, JSKeyboardProcessor } from 'keyman/engine/js-processor';
|
||||
import { NodeKeyboardLoader } from '../../../resources/loader/nodeKeyboardLoader.js';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { assert } from 'chai';
|
||||
|
||||
import { SyntheticTextStore, findCommonSubstringEndIndex } from 'keyman/engine/keyboard';
|
||||
import { KMWString } from '@keymanapp/web-utils';
|
||||
import { KMWString } from 'keyman/common/web-utils';
|
||||
|
||||
// A unicode-coding like alias for use in constructing non-BMP strings.
|
||||
const u = String.fromCodePoint;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue