diff --git a/package-lock.json b/package-lock.json
index 9a5a1b4d2a..06ae6b6c60 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -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"
diff --git a/tsconfig.base.json b/tsconfig.base.json
index 6880709c17..4ee9ff4832 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -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" ],
diff --git a/tsconfig.json b/tsconfig.json
index 8f63a70a70..c9e8f3dc60 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -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" },
]
}
diff --git a/web/README.md b/web/README.md
index d1afea35e4..de8f638e5f 100644
--- a/web/README.md
+++ b/web/README.md
@@ -85,7 +85,7 @@ graph TD;
KeyboardSpec["/web/src/engine/keyboard"];
JSProc["/web/src/engine/js-processor"];
OSK-->KeyboardSpec;
- WebUtils["@keymanapp/web-utils
(/web/src/engine/common/web-utils)"];
+ WebUtils["/web/src/common/web-utils"];
KeyboardSpec---->WebUtils;
Wordbreakers["@keymanapp/models-wordbreakers
(/web/src/engine/predictive-text/wordbreakers)"];
Models["@keymanapp/models-templates
(/web/src/engine/predictive-text/templates/)"];
diff --git a/web/build.sh b/web/build.sh
index a0ff32e394..e1dee7d941 100755
--- a/web/build.sh
+++ b/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
diff --git a/web/package.json b/web/package.json
index 0e463f3207..f1eae1b51b 100644
--- a/web/package.json
+++ b/web/package.json
@@ -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"
diff --git a/web/src/app/browser/src/configuration.ts b/web/src/app/browser/src/configuration.ts
index 3d1f0c0b22..26caf1ac3d 100644
--- a/web/src/app/browser/src/configuration.ts
+++ b/web/src/app/browser/src/configuration.ts
@@ -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";
diff --git a/web/src/app/browser/tsconfig.json b/web/src/app/browser/tsconfig.json
index e537e78776..de34dea8d7 100644
--- a/web/src/app/browser/tsconfig.json
+++ b/web/src/app/browser/tsconfig.json
@@ -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" ],
diff --git a/web/src/app/ui/tsconfig.json b/web/src/app/ui/tsconfig.json
index 698b6f307a..b37d8bd681 100644
--- a/web/src/app/ui/tsconfig.json
+++ b/web/src/app/ui/tsconfig.json
@@ -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",
diff --git a/web/src/app/webview/src/contextManager.ts b/web/src/app/webview/src/contextManager.ts
index e2057035f3..886b55ce27 100644
--- a/web/src/app/webview/src/contextManager.ts
+++ b/web/src/app/webview/src/contextManager.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;
diff --git a/web/src/app/webview/tsconfig.json b/web/src/app/webview/tsconfig.json
index 07ba67057b..06f6e0064a 100644
--- a/web/src/app/webview/tsconfig.json
+++ b/web/src/app/webview/tsconfig.json
@@ -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" },
]
}
diff --git a/web/src/engine/common/web-utils/.c8rc.json b/web/src/common/web-utils/.c8rc.json
similarity index 78%
rename from web/src/engine/common/web-utils/.c8rc.json
rename to web/src/common/web-utils/.c8rc.json
index 4c652ff892..1b73d94074 100644
--- a/web/src/engine/common/web-utils/.c8rc.json
+++ b/web/src/common/web-utils/.c8rc.json
@@ -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/"
]
diff --git a/web/src/engine/common/web-utils/build.sh b/web/src/common/web-utils/build.sh
similarity index 93%
rename from web/src/engine/common/web-utils/build.sh
rename to web/src/common/web-utils/build.sh
index 69b08cb275..1106ace477 100755
--- a/web/src/engine/common/web-utils/build.sh
+++ b/web/src/common/web-utils/build.sh
@@ -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"
diff --git a/web/src/engine/common/web-utils/src/deepCopy.ts b/web/src/common/web-utils/src/deepCopy.ts
similarity index 100%
rename from web/src/engine/common/web-utils/src/deepCopy.ts
rename to web/src/common/web-utils/src/deepCopy.ts
diff --git a/web/src/engine/common/web-utils/src/deviceSpec.ts b/web/src/common/web-utils/src/deviceSpec.ts
similarity index 100%
rename from web/src/engine/common/web-utils/src/deviceSpec.ts
rename to web/src/common/web-utils/src/deviceSpec.ts
diff --git a/web/src/engine/common/web-utils/src/globalObject.ts b/web/src/common/web-utils/src/globalObject.ts
similarity index 100%
rename from web/src/engine/common/web-utils/src/globalObject.ts
rename to web/src/common/web-utils/src/globalObject.ts
diff --git a/web/src/engine/common/web-utils/src/index.ts b/web/src/common/web-utils/src/index.ts
similarity index 100%
rename from web/src/engine/common/web-utils/src/index.ts
rename to web/src/common/web-utils/src/index.ts
diff --git a/web/src/engine/common/web-utils/src/isEmptyTransform.ts b/web/src/common/web-utils/src/isEmptyTransform.ts
similarity index 100%
rename from web/src/engine/common/web-utils/src/isEmptyTransform.ts
rename to web/src/common/web-utils/src/isEmptyTransform.ts
diff --git a/web/src/engine/common/web-utils/src/kmwstring.ts b/web/src/common/web-utils/src/kmwstring.ts
similarity index 100%
rename from web/src/engine/common/web-utils/src/kmwstring.ts
rename to web/src/common/web-utils/src/kmwstring.ts
diff --git a/web/src/engine/common/web-utils/src/managedPromise.ts b/web/src/common/web-utils/src/managedPromise.ts
similarity index 100%
rename from web/src/engine/common/web-utils/src/managedPromise.ts
rename to web/src/common/web-utils/src/managedPromise.ts
diff --git a/web/src/engine/common/web-utils/src/priority-queue.ts b/web/src/common/web-utils/src/priority-queue.ts
similarity index 100%
rename from web/src/engine/common/web-utils/src/priority-queue.ts
rename to web/src/common/web-utils/src/priority-queue.ts
diff --git a/web/src/engine/common/web-utils/src/tests/deepCopy.tests.js b/web/src/common/web-utils/src/tests/deepCopy.tests.js
similarity index 97%
rename from web/src/engine/common/web-utils/src/tests/deepCopy.tests.js
rename to web/src/common/web-utils/src/tests/deepCopy.tests.js
index 90e809dc11..5b2d8eb0ce 100644
--- a/web/src/engine/common/web-utils/src/tests/deepCopy.tests.js
+++ b/web/src/common/web-utils/src/tests/deepCopy.tests.js
@@ -1,6 +1,6 @@
import { assert } from 'chai';
-import { deepCopy } from '@keymanapp/web-utils';
+import { deepCopy } from 'keyman/common/web-utils';
describe('deepCopy', function() {
diff --git a/web/src/engine/common/web-utils/src/tests/managedPromise.tests.js b/web/src/common/web-utils/src/tests/managedPromise.tests.js
similarity index 97%
rename from web/src/engine/common/web-utils/src/tests/managedPromise.tests.js
rename to web/src/common/web-utils/src/tests/managedPromise.tests.js
index 6b7fe72205..2c2b0f5a56 100644
--- a/web/src/engine/common/web-utils/src/tests/managedPromise.tests.js
+++ b/web/src/common/web-utils/src/tests/managedPromise.tests.js
@@ -1,6 +1,6 @@
import { assert } from 'chai';
-import { ManagedPromise } from '@keymanapp/web-utils';
+import { ManagedPromise } from 'keyman/common/web-utils';
describe("ManagedPromise", () => {
it(' resolution', async () => {
diff --git a/web/src/engine/common/web-utils/src/tests/priorityQueue.tests.js b/web/src/common/web-utils/src/tests/priorityQueue.tests.js
similarity index 98%
rename from web/src/engine/common/web-utils/src/tests/priorityQueue.tests.js
rename to web/src/common/web-utils/src/tests/priorityQueue.tests.js
index 0aa4c50b96..2394718aec 100644
--- a/web/src/engine/common/web-utils/src/tests/priorityQueue.tests.js
+++ b/web/src/common/web-utils/src/tests/priorityQueue.tests.js
@@ -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 () {
diff --git a/web/src/engine/common/web-utils/src/tests/stringHandling.js b/web/src/common/web-utils/src/tests/stringHandling.js
similarity index 99%
rename from web/src/engine/common/web-utils/src/tests/stringHandling.js
rename to web/src/common/web-utils/src/tests/stringHandling.js
index e22ef633d1..be93a45c8b 100644
--- a/web/src/engine/common/web-utils/src/tests/stringHandling.js
+++ b/web/src/common/web-utils/src/tests/stringHandling.js
@@ -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', () => {
diff --git a/web/src/engine/common/web-utils/src/tests/timeoutPromise.tests.js b/web/src/common/web-utils/src/tests/timeoutPromise.tests.js
similarity index 97%
rename from web/src/engine/common/web-utils/src/tests/timeoutPromise.tests.js
rename to web/src/common/web-utils/src/tests/timeoutPromise.tests.js
index 337cf286e2..e8a14afbec 100644
--- a/web/src/engine/common/web-utils/src/tests/timeoutPromise.tests.js
+++ b/web/src/common/web-utils/src/tests/timeoutPromise.tests.js
@@ -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.
diff --git a/web/src/engine/common/web-utils/src/tests/versions.tests.js b/web/src/common/web-utils/src/tests/versions.tests.js
similarity index 96%
rename from web/src/engine/common/web-utils/src/tests/versions.tests.js
rename to web/src/common/web-utils/src/tests/versions.tests.js
index 36ed51cbac..aa4c67c454 100644
--- a/web/src/engine/common/web-utils/src/tests/versions.tests.js
+++ b/web/src/common/web-utils/src/tests/versions.tests.js
@@ -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() {
diff --git a/web/src/engine/common/web-utils/src/timeoutPromise.ts b/web/src/common/web-utils/src/timeoutPromise.ts
similarity index 100%
rename from web/src/engine/common/web-utils/src/timeoutPromise.ts
rename to web/src/common/web-utils/src/timeoutPromise.ts
diff --git a/web/src/engine/common/web-utils/src/version.ts b/web/src/common/web-utils/src/version.ts
similarity index 100%
rename from web/src/engine/common/web-utils/src/version.ts
rename to web/src/common/web-utils/src/version.ts
diff --git a/web/src/engine/common/web-utils/tsconfig.json b/web/src/common/web-utils/tsconfig.json
similarity index 51%
rename from web/src/engine/common/web-utils/tsconfig.json
rename to web/src/common/web-utils/tsconfig.json
index 1747a62274..0e866bd4cc 100644
--- a/web/src/engine/common/web-utils/tsconfig.json
+++ b/web/src/common/web-utils/tsconfig.json
@@ -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"
diff --git a/web/src/engine/build.sh b/web/src/engine/build.sh
index 898252b383..3ff9461c40 100755
--- a/web/src/engine/build.sh
+++ b/web/src/engine/build.sh
@@ -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" \
diff --git a/web/src/engine/common/web-utils/.gitignore b/web/src/engine/common/web-utils/.gitignore
deleted file mode 100644
index 56baafc822..0000000000
--- a/web/src/engine/common/web-utils/.gitignore
+++ /dev/null
@@ -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
\ No newline at end of file
diff --git a/web/src/engine/common/web-utils/package.json b/web/src/engine/common/web-utils/package.json
deleted file mode 100644
index 9efd10d463..0000000000
--- a/web/src/engine/common/web-utils/package.json
+++ /dev/null
@@ -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": "*"
- }
-}
diff --git a/web/src/engine/predictive-text/templates/build.sh b/web/src/engine/predictive-text/templates/build.sh
index 01820ed765..8119b5a365 100755
--- a/web/src/engine/predictive-text/templates/build.sh
+++ b/web/src/engine/predictive-text/templates/build.sh
@@ -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" \
diff --git a/web/src/engine/predictive-text/templates/package.json b/web/src/engine/predictive-text/templates/package.json
index cbe3fb8747..821d3f9e5f 100644
--- a/web/src/engine/predictive-text/templates/package.json
+++ b/web/src/engine/predictive-text/templates/package.json
@@ -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": "*"
diff --git a/web/src/engine/predictive-text/templates/src/common.ts b/web/src/engine/predictive-text/templates/src/common.ts
index f23ad6095b..5fe52be579 100644
--- a/web/src/engine/predictive-text/templates/src/common.ts
+++ b/web/src/engine/predictive-text/templates/src/common.ts
@@ -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';
diff --git a/web/src/engine/predictive-text/templates/src/trie-model.ts b/web/src/engine/predictive-text/templates/src/trie-model.ts
index 938553330d..7a99e64ef3 100644
--- a/web/src/engine/predictive-text/templates/src/trie-model.ts
+++ b/web/src/engine/predictive-text/templates/src/trie-model.ts
@@ -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";
diff --git a/web/src/engine/predictive-text/templates/tsconfig.json b/web/src/engine/predictive-text/templates/tsconfig.json
index 176530290d..585792239d 100644
--- a/web/src/engine/predictive-text/templates/tsconfig.json
+++ b/web/src/engine/predictive-text/templates/tsconfig.json
@@ -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"
diff --git a/web/src/engine/predictive-text/types/tsconfig.json b/web/src/engine/predictive-text/types/tsconfig.json
index 8b87ca2667..220c444061 100644
--- a/web/src/engine/predictive-text/types/tsconfig.json
+++ b/web/src/engine/predictive-text/types/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
- "baseUrl": "./",
"outDir": "build/",
"tsBuildInfoFile": "build/tsconfig.tsbuildinfo",
"rootDir": "./src"
diff --git a/web/src/engine/predictive-text/wordbreakers/tools/data-compiler/tsconfig.json b/web/src/engine/predictive-text/wordbreakers/tools/data-compiler/tsconfig.json
index 2cef116f60..dedc939534 100644
--- a/web/src/engine/predictive-text/wordbreakers/tools/data-compiler/tsconfig.json
+++ b/web/src/engine/predictive-text/wordbreakers/tools/data-compiler/tsconfig.json
@@ -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": "./",
diff --git a/web/src/engine/predictive-text/wordbreakers/tsconfig.json b/web/src/engine/predictive-text/wordbreakers/tsconfig.json
index b122825413..9f33fed2d9 100644
--- a/web/src/engine/predictive-text/wordbreakers/tsconfig.json
+++ b/web/src/engine/predictive-text/wordbreakers/tsconfig.json
@@ -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" },
+ ],
}
diff --git a/web/src/engine/predictive-text/worker-main/package.json b/web/src/engine/predictive-text/worker-main/package.json
index 535532d680..dc6301e113 100644
--- a/web/src/engine/predictive-text/worker-main/package.json
+++ b/web/src/engine/predictive-text/worker-main/package.json
@@ -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"
}
diff --git a/web/src/engine/predictive-text/worker-main/src/node/tsconfig.json b/web/src/engine/predictive-text/worker-main/src/node/tsconfig.json
index a1ab0f2f7c..167ca722d0 100644
--- a/web/src/engine/predictive-text/worker-main/src/node/tsconfig.json
+++ b/web/src/engine/predictive-text/worker-main/src/node/tsconfig.json
@@ -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": "../"
diff --git a/web/src/engine/predictive-text/worker-main/src/tsconfig.json b/web/src/engine/predictive-text/worker-main/src/tsconfig.json
index 0ee72aedba..22b9849ca9 100644
--- a/web/src/engine/predictive-text/worker-main/src/tsconfig.json
+++ b/web/src/engine/predictive-text/worker-main/src/tsconfig.json
@@ -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"}
],
diff --git a/web/src/engine/predictive-text/worker-main/src/web/tsconfig.json b/web/src/engine/predictive-text/worker-main/src/web/tsconfig.json
index 769c97d589..3e67273599 100644
--- a/web/src/engine/predictive-text/worker-main/src/web/tsconfig.json
+++ b/web/src/engine/predictive-text/worker-main/src/web/tsconfig.json
@@ -2,7 +2,6 @@
"extends": "../../../../../../tsconfig.base.json",
"compilerOptions": {
"lib": ["es6", "DOM"],
- "baseUrl": "../",
"outDir": "../../build/obj",
"tsBuildInfoFile": "../../build/obj/web/tsconfig.tsbuildinfo",
"rootDir": "../"
diff --git a/web/src/engine/predictive-text/worker-main/tsconfig.all.json b/web/src/engine/predictive-text/worker-main/tsconfig.all.json
index 6e7eb4cc80..1a33d8a056 100644
--- a/web/src/engine/predictive-text/worker-main/tsconfig.all.json
+++ b/web/src/engine/predictive-text/worker-main/tsconfig.all.json
@@ -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" },
diff --git a/web/src/engine/predictive-text/worker-thread/package.json b/web/src/engine/predictive-text/worker-thread/package.json
index f0807d074e..7263f20b7c 100644
--- a/web/src/engine/predictive-text/worker-thread/package.json
+++ b/web/src/engine/predictive-text/worker-thread/package.json
@@ -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"
diff --git a/web/src/engine/predictive-text/worker-thread/src/main/correction/context-tracker.ts b/web/src/engine/predictive-text/worker-thread/src/main/correction/context-tracker.ts
index d9639a6afd..590a9aaa12 100644
--- a/web/src/engine/predictive-text/worker-thread/src/main/correction/context-tracker.ts
+++ b/web/src/engine/predictive-text/worker-thread/src/main/correction/context-tracker.ts
@@ -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';
diff --git a/web/src/engine/predictive-text/worker-thread/src/main/correction/distance-modeler.ts b/web/src/engine/predictive-text/worker-thread/src/main/correction/distance-modeler.ts
index 03b5500d7e..254fa85734 100644
--- a/web/src/engine/predictive-text/worker-thread/src/main/correction/distance-modeler.ts
+++ b/web/src/engine/predictive-text/worker-thread/src/main/correction/distance-modeler.ts
@@ -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';
diff --git a/web/src/engine/predictive-text/worker-thread/src/main/correction/execution-timer.ts b/web/src/engine/predictive-text/worker-thread/src/main/correction/execution-timer.ts
index 2b0fe5e14e..1ba6f535a0 100644
--- a/web/src/engine/predictive-text/worker-thread/src/main/correction/execution-timer.ts
+++ b/web/src/engine/predictive-text/worker-thread/src/main/correction/execution-timer.ts
@@ -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;
diff --git a/web/src/engine/predictive-text/worker-thread/src/main/index.ts b/web/src/engine/predictive-text/worker-thread/src/main/index.ts
index 421d22ab44..167711a944 100644
--- a/web/src/engine/predictive-text/worker-thread/src/main/index.ts
+++ b/web/src/engine/predictive-text/worker-thread/src/main/index.ts
@@ -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';
diff --git a/web/src/engine/predictive-text/worker-thread/src/main/model-compositor.ts b/web/src/engine/predictive-text/worker-thread/src/main/model-compositor.ts
index 2a5a4ef60b..fff11f05b6 100644
--- a/web/src/engine/predictive-text/worker-thread/src/main/model-compositor.ts
+++ b/web/src/engine/predictive-text/worker-thread/src/main/model-compositor.ts
@@ -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'
diff --git a/web/src/engine/predictive-text/worker-thread/src/main/model-helpers.ts b/web/src/engine/predictive-text/worker-thread/src/main/model-helpers.ts
index 071cad588c..7008a74be5 100644
--- a/web/src/engine/predictive-text/worker-thread/src/main/model-helpers.ts
+++ b/web/src/engine/predictive-text/worker-thread/src/main/model-helpers.ts
@@ -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.
diff --git a/web/src/engine/predictive-text/worker-thread/src/main/predict-helpers.ts b/web/src/engine/predictive-text/worker-thread/src/main/predict-helpers.ts
index 8bd8dda359..34383464e8 100644
--- a/web/src/engine/predictive-text/worker-thread/src/main/predict-helpers.ts
+++ b/web/src/engine/predictive-text/worker-thread/src/main/predict-helpers.ts
@@ -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';
diff --git a/web/src/engine/predictive-text/worker-thread/src/main/transform-subsets.ts b/web/src/engine/predictive-text/worker-thread/src/main/transform-subsets.ts
index cf5dcaca57..fba3faed5c 100644
--- a/web/src/engine/predictive-text/worker-thread/src/main/transform-subsets.ts
+++ b/web/src/engine/predictive-text/worker-thread/src/main/transform-subsets.ts
@@ -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;
diff --git a/web/src/engine/predictive-text/worker-thread/tsconfig.json b/web/src/engine/predictive-text/worker-thread/tsconfig.json
index 252ec84ceb..4bea957b24 100644
--- a/web/src/engine/predictive-text/worker-thread/tsconfig.json
+++ b/web/src/engine/predictive-text/worker-thread/tsconfig.json
@@ -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" },
],
diff --git a/web/src/engine/sentry-manager/src/tsconfig.json b/web/src/engine/sentry-manager/src/tsconfig.json
index c15e339457..7bb42bdb40 100644
--- a/web/src/engine/sentry-manager/src/tsconfig.json
+++ b/web/src/engine/sentry-manager/src/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
- "baseUrl": "./",
"lib": ["es6", "dom"],
"outDir": "../build/obj",
"rootDir": "./",
diff --git a/web/src/engine/src/dom-utils/stylesheets.ts b/web/src/engine/src/dom-utils/stylesheets.ts
index eb6bbae2bb..a7eb6c88de 100644
--- a/web/src/engine/src/dom-utils/stylesheets.ts
+++ b/web/src/engine/src/dom-utils/stylesheets.ts
@@ -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+';';
}
diff --git a/web/src/engine/src/element-text-stores/contentEditableTextStore.ts b/web/src/engine/src/element-text-stores/contentEditableTextStore.ts
index bd2aebcf1f..0a42117402 100644
--- a/web/src/engine/src/element-text-stores/contentEditableTextStore.ts
+++ b/web/src/engine/src/element-text-stores/contentEditableTextStore.ts
@@ -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;
diff --git a/web/src/engine/src/element-text-stores/designIFrameTextStore.ts b/web/src/engine/src/element-text-stores/designIFrameTextStore.ts
index e9a0fc1eff..651b64d9ec 100644
--- a/web/src/engine/src/element-text-stores/designIFrameTextStore.ts
+++ b/web/src/engine/src/element-text-stores/designIFrameTextStore.ts
@@ -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;
diff --git a/web/src/engine/src/element-text-stores/inputTextStore.ts b/web/src/engine/src/element-text-stores/inputTextStore.ts
index 24235626ed..7f10982b2f 100644
--- a/web/src/engine/src/element-text-stores/inputTextStore.ts
+++ b/web/src/engine/src/element-text-stores/inputTextStore.ts
@@ -1,5 +1,5 @@
import { AbstractElementTextStore } from './abstractElementTextStore.js';
-import { KMWString } from '@keymanapp/web-utils';
+import { KMWString } from 'keyman/common/web-utils';
interface EventMap {
/**
diff --git a/web/src/engine/src/element-text-stores/textareaTextStore.ts b/web/src/engine/src/element-text-stores/textareaTextStore.ts
index 02423b261d..5418ef1c77 100644
--- a/web/src/engine/src/element-text-stores/textareaTextStore.ts
+++ b/web/src/engine/src/element-text-stores/textareaTextStore.ts
@@ -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;
diff --git a/web/src/engine/src/gesture-processor/headless/asyncClosureDispatchQueue.ts b/web/src/engine/src/gesture-processor/headless/asyncClosureDispatchQueue.ts
index a15265cb92..fa83b32a83 100644
--- a/web/src/engine/src/gesture-processor/headless/asyncClosureDispatchQueue.ts
+++ b/web/src/engine/src/gesture-processor/headless/asyncClosureDispatchQueue.ts
@@ -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 | void);
diff --git a/web/src/engine/src/gesture-processor/headless/gestures/matchers/gestureMatcher.ts b/web/src/engine/src/gesture-processor/headless/gestures/matchers/gestureMatcher.ts
index 9c51d1fed6..dad7fa8752 100644
--- a/web/src/engine/src/gesture-processor/headless/gestures/matchers/gestureMatcher.ts
+++ b/web/src/engine/src/gesture-processor/headless/gestures/matchers/gestureMatcher.ts
@@ -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";
diff --git a/web/src/engine/src/gesture-processor/headless/gestures/matchers/gestureSequence.ts b/web/src/engine/src/gesture-processor/headless/gestures/matchers/gestureSequence.ts
index a74e984723..ac3f7bb454 100644
--- a/web/src/engine/src/gesture-processor/headless/gestures/matchers/gestureSequence.ts
+++ b/web/src/engine/src/gesture-processor/headless/gestures/matchers/gestureSequence.ts
@@ -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 {
/**
diff --git a/web/src/engine/src/gesture-processor/headless/gestures/matchers/matcherSelector.ts b/web/src/engine/src/gesture-processor/headless/gestures/matchers/matcherSelector.ts
index 833419defd..bf7d1fb5b4 100644
--- a/web/src/engine/src/gesture-processor/headless/gestures/matchers/matcherSelector.ts
+++ b/web/src/engine/src/gesture-processor/headless/gestures/matchers/matcherSelector.ts
@@ -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";
diff --git a/web/src/engine/src/gesture-processor/headless/gestures/matchers/pathMatcher.ts b/web/src/engine/src/gesture-processor/headless/gestures/matchers/pathMatcher.ts
index b87d84dafb..1d38942dbe 100644
--- a/web/src/engine/src/gesture-processor/headless/gestures/matchers/pathMatcher.ts
+++ b/web/src/engine/src/gesture-processor/headless/gestures/matchers/pathMatcher.ts
@@ -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';
diff --git a/web/src/engine/src/gesture-processor/touchEventEngine.ts b/web/src/engine/src/gesture-processor/touchEventEngine.ts
index 37ac9cdeb1..52529de3a0 100644
--- a/web/src/engine/src/gesture-processor/touchEventEngine.ts
+++ b/web/src/engine/src/gesture-processor/touchEventEngine.ts
@@ -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";
diff --git a/web/src/engine/src/js-processor/jsKeyboardInterface.ts b/web/src/engine/src/js-processor/jsKeyboardInterface.ts
index 724bf2e0a5..d0a8e99a11 100644
--- a/web/src/engine/src/js-processor/jsKeyboardInterface.ts
+++ b/web/src/engine/src/js-processor/jsKeyboardInterface.ts
@@ -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,
diff --git a/web/src/engine/src/js-processor/jsKeyboardProcessor.ts b/web/src/engine/src/js-processor/jsKeyboardProcessor.ts
index 1bcb7a6a8f..dddf1bf1af 100644
--- a/web/src/engine/src/js-processor/jsKeyboardProcessor.ts
+++ b/web/src/engine/src/js-processor/jsKeyboardProcessor.ts
@@ -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;
diff --git a/web/src/engine/src/keyboard/index.ts b/web/src/engine/src/keyboard/index.ts
index a796eb8842..90e1489e1f 100644
--- a/web/src/engine/src/keyboard/index.ts
+++ b/web/src/engine/src/keyboard/index.ts
@@ -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.
diff --git a/web/src/engine/src/keyboard/keyEvent.ts b/web/src/engine/src/keyboard/keyEvent.ts
index 967d5409df..a403bdd034 100644
--- a/web/src/engine/src/keyboard/keyEvent.ts
+++ b/web/src/engine/src/keyboard/keyEvent.ts
@@ -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";
diff --git a/web/src/engine/src/keyboard/keyboards/activeLayout.ts b/web/src/engine/src/keyboard/keyboards/activeLayout.ts
index cb5175f54a..fe6cc7e640 100644
--- a/web/src/engine/src/keyboard/keyboards/activeLayout.ts
+++ b/web/src/engine/src/keyboard/keyboards/activeLayout.ts
@@ -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'
diff --git a/web/src/engine/src/keyboard/keyboards/defaultLayouts.ts b/web/src/engine/src/keyboard/keyboards/defaultLayouts.ts
index 4231d1d5e8..263e188cc5 100644
--- a/web/src/engine/src/keyboard/keyboards/defaultLayouts.ts
+++ b/web/src/engine/src/keyboard/keyboards/defaultLayouts.ts
@@ -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;
diff --git a/web/src/engine/src/keyboard/keyboards/jsKeyboard.ts b/web/src/engine/src/keyboard/keyboards/jsKeyboard.ts
index 8305e3ec10..d76030de97 100644
--- a/web/src/engine/src/keyboard/keyboards/jsKeyboard.ts
+++ b/web/src/engine/src/keyboard/keyboards/jsKeyboard.ts
@@ -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";
/**
diff --git a/web/src/engine/src/keyboard/keyboards/keyboardHarness.ts b/web/src/engine/src/keyboard/keyboards/keyboardHarness.ts
index 117b348e9e..c952dff550 100644
--- a/web/src/engine/src/keyboard/keyboards/keyboardHarness.ts
+++ b/web/src/engine/src/keyboard/keyboards/keyboardHarness.ts
@@ -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
diff --git a/web/src/engine/src/keyboard/syntheticTextStore.ts b/web/src/engine/src/keyboard/syntheticTextStore.ts
index 2105f5ba7e..fac8274ff9 100644
--- a/web/src/engine/src/keyboard/syntheticTextStore.ts
+++ b/web/src/engine/src/keyboard/syntheticTextStore.ts
@@ -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;
diff --git a/web/src/engine/src/keyboard/textStore.ts b/web/src/engine/src/keyboard/textStore.ts
index 95ed85cc27..fdecd52389 100644
--- a/web/src/engine/src/keyboard/textStore.ts
+++ b/web/src/engine/src/keyboard/textStore.ts
@@ -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";
diff --git a/web/src/engine/src/main/headless/contextWindow.ts b/web/src/engine/src/main/headless/contextWindow.ts
index 07051d2332..37a023466c 100644
--- a/web/src/engine/src/main/headless/contextWindow.ts
+++ b/web/src/engine/src/main/headless/contextWindow.ts
@@ -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
diff --git a/web/src/engine/src/main/headless/deviceDetector.ts b/web/src/engine/src/main/headless/deviceDetector.ts
index 18fa005e12..d2a694b693 100644
--- a/web/src/engine/src/main/headless/deviceDetector.ts
+++ b/web/src/engine/src/main/headless/deviceDetector.ts
@@ -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`.
diff --git a/web/src/engine/src/main/headless/inputProcessor.ts b/web/src/engine/src/main/headless/inputProcessor.ts
index 1e043622d5..6429c7263d 100644
--- a/web/src/engine/src/main/headless/inputProcessor.ts
+++ b/web/src/engine/src/main/headless/inputProcessor.ts
@@ -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';
diff --git a/web/src/engine/src/main/headless/utils/styleConstants.ts b/web/src/engine/src/main/headless/utils/styleConstants.ts
index ce64c16959..e948957a74 100644
--- a/web/src/engine/src/main/headless/utils/styleConstants.ts
+++ b/web/src/engine/src/main/headless/utils/styleConstants.ts
@@ -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.
diff --git a/web/src/engine/src/main/keymanEngineBase.ts b/web/src/engine/src/main/keymanEngineBase.ts
index 168be7c42a..4446250eca 100644
--- a/web/src/engine/src/main/keymanEngineBase.ts
+++ b/web/src/engine/src/main/keymanEngineBase.ts
@@ -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 & { [P in K]-?: T[P] };
diff --git a/web/src/engine/src/osk/banner/bannerController.ts b/web/src/engine/src/osk/banner/bannerController.ts
index aae9b643b8..672937ca68 100644
--- a/web/src/engine/src/osk/banner/bannerController.ts
+++ b/web/src/engine/src/osk/banner/bannerController.ts
@@ -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';
diff --git a/web/src/engine/src/osk/banner/bannerGestureSet.ts b/web/src/engine/src/osk/banner/bannerGestureSet.ts
index 585f42360c..99d78758fc 100644
--- a/web/src/engine/src/osk/banner/bannerGestureSet.ts
+++ b/web/src/engine/src/osk/banner/bannerGestureSet.ts
@@ -1,4 +1,4 @@
-import { deepCopy } from '@keymanapp/web-utils';
+import { deepCopy } from 'keyman/common/web-utils';
import {
gestures,
diff --git a/web/src/engine/src/osk/config/commonConfiguration.ts b/web/src/engine/src/osk/config/commonConfiguration.ts
index 36d06f2974..b56f1e027b 100644
--- a/web/src/engine/src/osk/config/commonConfiguration.ts
+++ b/web/src/engine/src/osk/config/commonConfiguration.ts
@@ -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";
diff --git a/web/src/engine/src/osk/fontSizeUtils.ts b/web/src/engine/src/osk/fontSizeUtils.ts
index 072d9a5f1a..eb4e7084af 100644
--- a/web/src/engine/src/osk/fontSizeUtils.ts
+++ b/web/src/engine/src/osk/fontSizeUtils.ts
@@ -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} {
diff --git a/web/src/engine/src/osk/screenUtils.ts b/web/src/engine/src/osk/screenUtils.ts
index 9608a01e0e..516f80c82c 100644
--- a/web/src/engine/src/osk/screenUtils.ts
+++ b/web/src/engine/src/osk/screenUtils.ts
@@ -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
diff --git a/web/src/engine/src/osk/views/touchEventPromiseMap.ts b/web/src/engine/src/osk/views/touchEventPromiseMap.ts
index 32531e6716..939f3668bb 100644
--- a/web/src/engine/src/osk/views/touchEventPromiseMap.ts
+++ b/web/src/engine/src/osk/views/touchEventPromiseMap.ts
@@ -1,4 +1,4 @@
-import { ManagedPromise } from "@keymanapp/web-utils";
+import { ManagedPromise } from "keyman/common/web-utils";
export default class TouchEventPromiseMap {
private map: Map> = new Map();
diff --git a/web/src/engine/src/osk/visualKeyboard.ts b/web/src/engine/src/osk/visualKeyboard.ts
index 97e1bdf751..9b68edc6d9 100644
--- a/web/src/engine/src/osk/visualKeyboard.ts
+++ b/web/src/engine/src/osk/visualKeyboard.ts
@@ -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';
diff --git a/web/src/engine/tsconfig.json b/web/src/engine/tsconfig.json
index d475e297af..bf7f732dcb 100644
--- a/web/src/engine/tsconfig.json
+++ b/web/src/engine/tsconfig.json
@@ -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" }
+ ]
}
diff --git a/web/src/test/auto/dom/cases/attachment/pageContextAttachment.tests.ts b/web/src/test/auto/dom/cases/attachment/pageContextAttachment.tests.ts
index dd393aab66..9ea5e97bb9 100644
--- a/web/src/test/auto/dom/cases/attachment/pageContextAttachment.tests.ts
+++ b/web/src/test/auto/dom/cases/attachment/pageContextAttachment.tests.ts
@@ -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';
diff --git a/web/src/test/auto/dom/cases/attachment/textStoreForElement.def.ts b/web/src/test/auto/dom/cases/attachment/textStoreForElement.def.ts
index 46aef0aef6..cfa0cdb444 100644
--- a/web/src/test/auto/dom/cases/attachment/textStoreForElement.def.ts
+++ b/web/src/test/auto/dom/cases/attachment/textStoreForElement.def.ts
@@ -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';
diff --git a/web/src/test/auto/dom/cases/browser/contextManager.tests.ts b/web/src/test/auto/dom/cases/browser/contextManager.tests.ts
index 661e6095b1..4735e05ae4 100644
--- a/web/src/test/auto/dom/cases/browser/contextManager.tests.ts
+++ b/web/src/test/auto/dom/cases/browser/contextManager.tests.ts
@@ -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';
diff --git a/web/src/test/auto/dom/cases/keyboard-storage/cloudQueries.tests.ts b/web/src/test/auto/dom/cases/keyboard-storage/cloudQueries.tests.ts
index 441ec9f992..7174d6e482 100644
--- a/web/src/test/auto/dom/cases/keyboard-storage/cloudQueries.tests.ts
+++ b/web/src/test/auto/dom/cases/keyboard-storage/cloudQueries.tests.ts
@@ -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: '',
diff --git a/web/src/test/auto/dom/cases/osk/activation.tests.ts b/web/src/test/auto/dom/cases/osk/activation.tests.ts
index a78c5f0d4a..c567e14315 100644
--- a/web/src/test/auto/dom/cases/osk/activation.tests.ts
+++ b/web/src/test/auto/dom/cases/osk/activation.tests.ts
@@ -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';
diff --git a/web/src/test/auto/dom/cases/osk/events.tests.ts b/web/src/test/auto/dom/cases/osk/events.tests.ts
index c0a5932c0b..2453e8213d 100644
--- a/web/src/test/auto/dom/cases/osk/events.tests.ts
+++ b/web/src/test/auto/dom/cases/osk/events.tests.ts
@@ -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';
diff --git a/web/src/test/auto/headless/app/browser/hardware-event-processing.tests.ts b/web/src/test/auto/headless/app/browser/hardware-event-processing.tests.ts
index 0643c88a86..0da4588a08 100644
--- a/web/src/test/auto/headless/app/browser/hardware-event-processing.tests.ts
+++ b/web/src/test/auto/headless/app/browser/hardware-event-processing.tests.ts
@@ -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;
diff --git a/web/src/test/auto/headless/engine/js-processor/specialized-backspace.tests.js b/web/src/test/auto/headless/engine/js-processor/specialized-backspace.tests.js
index ee02e3a39a..0e7d873a4e 100644
--- a/web/src/test/auto/headless/engine/js-processor/specialized-backspace.tests.js
+++ b/web/src/test/auto/headless/engine/js-processor/specialized-backspace.tests.js
@@ -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';
diff --git a/web/src/test/auto/headless/engine/js-processor/transcriptions.tests.js b/web/src/test/auto/headless/engine/js-processor/transcriptions.tests.js
index 2632431060..ce8ccbf140 100644
--- a/web/src/test/auto/headless/engine/js-processor/transcriptions.tests.js
+++ b/web/src/test/auto/headless/engine/js-processor/transcriptions.tests.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;
diff --git a/web/src/test/auto/headless/engine/keyboard-storage/cloudQueries.tests.js b/web/src/test/auto/headless/engine/keyboard-storage/cloudQueries.tests.js
index b6c5f2f4cc..7892178dfc 100644
--- a/web/src/test/auto/headless/engine/keyboard-storage/cloudQueries.tests.js
+++ b/web/src/test/auto/headless/engine/keyboard-storage/cloudQueries.tests.js
@@ -1,7 +1,7 @@
import { assert } from 'chai';
import sinon from 'sinon';
-import { ManagedPromise } from '@keymanapp/web-utils';
+import { ManagedPromise } from 'keyman/common/web-utils';
import { CloudQueryEngine, StubAndKeyboardCache, toPrefixedKeyboardId as prefixed } from 'keyman/engine/keyboard-storage';
import { PathConfiguration } from 'keyman/engine/interfaces';
import NodeCloudRequester from '../../../resources/loader/nodeCloudRequester.js';
diff --git a/web/src/test/auto/headless/engine/main/headless/inputProcessor.tests.js b/web/src/test/auto/headless/engine/main/headless/inputProcessor.tests.js
index 4db22d9f13..c871be3b0f 100644
--- a/web/src/test/auto/headless/engine/main/headless/inputProcessor.tests.js
+++ b/web/src/test/auto/headless/engine/main/headless/inputProcessor.tests.js
@@ -11,7 +11,7 @@ import { NodeKeyboardLoader } from '../../../resources/loader/nodeKeyboardLoader
import { KeyboardTest } from '@keymanapp/recorder-core';
import { Worker } from '@keymanapp/lexical-model-layer/node';
-import * as utils from '@keymanapp/web-utils';
+import * as utils from 'keyman/common/web-utils';
const KMWString = utils.KMWString;
// Required initialization setup.
diff --git a/web/src/test/auto/headless/engine/osk/gesture-processor/asyncClosureDispatchQueue.tests.ts b/web/src/test/auto/headless/engine/osk/gesture-processor/asyncClosureDispatchQueue.tests.ts
index 553322f703..469642451f 100644
--- a/web/src/test/auto/headless/engine/osk/gesture-processor/asyncClosureDispatchQueue.tests.ts
+++ b/web/src/test/auto/headless/engine/osk/gesture-processor/asyncClosureDispatchQueue.tests.ts
@@ -1,7 +1,7 @@
import { assert } from 'chai'
import { default as sinon, type SinonSpy } from 'sinon';
import { AsyncClosureDispatchQueue, type QueueClosure } from 'keyman/engine/gesture-processor';
-import { ManagedPromise, timedPromise } from '@keymanapp/web-utils';
+import { ManagedPromise, timedPromise } from 'keyman/common/web-utils';
type ClosureSpy = SinonSpy<[], ReturnType>;
diff --git a/web/src/test/auto/headless/engine/osk/gesture-processor/gesturePath.tests.ts b/web/src/test/auto/headless/engine/osk/gesture-processor/gesturePath.tests.ts
index a878c5fbd6..9df87a7b68 100644
--- a/web/src/test/auto/headless/engine/osk/gesture-processor/gesturePath.tests.ts
+++ b/web/src/test/auto/headless/engine/osk/gesture-processor/gesturePath.tests.ts
@@ -5,7 +5,7 @@ import url from 'url';
import fs from 'fs';
import { GestureDebugPath } from 'keyman/engine/gesture-processor';
-import { timedPromise } from '@keymanapp/web-utils';
+import { timedPromise } from 'keyman/common/web-utils';
import { TouchpathTurtle } from '#gesture-tools';
// Ensures that the resources are resolved relative to this script's source, not
diff --git a/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/gestureSequence.tests.ts b/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/gestureSequence.tests.ts
index 527c642768..2b0fbd32de 100644
--- a/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/gestureSequence.tests.ts
+++ b/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/gestureSequence.tests.ts
@@ -17,7 +17,7 @@ const getGestureModelSet = gestures.specs.getGestureModelSet;
const modelSetForAction = gestures.matchers.modelSetForAction;
import { HeadlessInputEngine, TouchpathTurtle } from '#gesture-tools';
-import { ManagedPromise, timedPromise } from '@keymanapp/web-utils';
+import { ManagedPromise, timedPromise } from 'keyman/common/web-utils';
import { assertGestureSequence, SequenceAssertion } from "../../../../../resources/sequenceAssertions.js";
diff --git a/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/matcherSelector.tests.ts b/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/matcherSelector.tests.ts
index cdc7e3e7af..9ed3b846a0 100644
--- a/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/matcherSelector.tests.ts
+++ b/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/matcherSelector.tests.ts
@@ -7,7 +7,7 @@ import { assertingPromiseStatus as promiseStatus } from '../../../../../resource
import { simulateMultiSourceMatcherInput, simulateSelectorInput } from "../../../../../resources/simulateMultiSourceInput.js";
-import { timedPromise } from '@keymanapp/web-utils';
+import { timedPromise } from 'keyman/common/web-utils';
import { gestures } from 'keyman/engine/gesture-processor';
import { TouchpathTurtle } from '#gesture-tools';
diff --git a/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/pathMatcher.tests.ts b/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/pathMatcher.tests.ts
index 2b6e6d5b1a..703057edb1 100644
--- a/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/pathMatcher.tests.ts
+++ b/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/pathMatcher.tests.ts
@@ -6,7 +6,7 @@ const PromiseStatuses = PromiseStatusModule.PromiseStatuses;
import { assertingPromiseStatus as promiseStatus } from '../../../../../resources/assertingPromiseStatus.js';
import { InputSample, GestureSource, gestures, CumulativePathStats } from 'keyman/engine/gesture-processor';
-import { timedPromise } from '@keymanapp/web-utils';
+import { timedPromise } from 'keyman/common/web-utils';
import {
InstantRejectionModel,
diff --git a/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/touchpointCoordinator.tests.ts b/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/touchpointCoordinator.tests.ts
index 221c607406..0deb01224c 100644
--- a/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/touchpointCoordinator.tests.ts
+++ b/web/src/test/auto/headless/engine/osk/gesture-processor/gestures/touchpointCoordinator.tests.ts
@@ -12,7 +12,7 @@ const { GestureSequence } = matchers;
type GestureSequence = gestures.matchers.GestureSequence;
import { HeadlessInputEngine, TouchpathTurtle } from '#gesture-tools';
-import { ManagedPromise, timedPromise } from '@keymanapp/web-utils';
+import { ManagedPromise, timedPromise } from 'keyman/common/web-utils';
import { assertGestureSequence, SequenceAssertion } from "../../../../../resources/sequenceAssertions.js";
diff --git a/web/src/test/auto/headless/engine/osk/visualKeyboard.tests.ts b/web/src/test/auto/headless/engine/osk/visualKeyboard.tests.ts
index 80788976c6..7da977c685 100644
--- a/web/src/test/auto/headless/engine/osk/visualKeyboard.tests.ts
+++ b/web/src/test/auto/headless/engine/osk/visualKeyboard.tests.ts
@@ -9,7 +9,7 @@ import { JSDOM } from 'jsdom';
import { VisualKeyboard } from 'keyman/engine/osk';
import { ActiveLayout, JSKeyboard, KeyboardProperties } from 'keyman/engine/keyboard';
import { StylesheetManager } from 'keyman/engine/dom-utils';
-import { DeviceSpec } from "@keymanapp/web-utils";
+import { DeviceSpec } from "keyman/common/web-utils";
describe('VisualKeyboard', () => {
let dom: JSDOM;
diff --git a/web/src/test/auto/headless/engine/predictive-text/templates/helpers.ts b/web/src/test/auto/headless/engine/predictive-text/templates/helpers.ts
index 9ac77233d2..f39cde9fa1 100644
--- a/web/src/test/auto/headless/engine/predictive-text/templates/helpers.ts
+++ b/web/src/test/auto/headless/engine/predictive-text/templates/helpers.ts
@@ -8,7 +8,7 @@ import { LexicalModelTypes } from '@keymanapp/common-types';
// TODO: then mocha invocation is as follows:
// TODO: mocha -r @keymanapp/models-test-helpers test/
-import { KMWString } from '@keymanapp/web-utils';
+import { KMWString } from 'keyman/common/web-utils';
// The predictive-text engine always keeps these enabled.
KMWString.enableSupplementaryPlane(true);
diff --git a/web/src/test/auto/headless/engine/predictive-text/worker-thread/context/context-tracker.tests.ts b/web/src/test/auto/headless/engine/predictive-text/worker-thread/context/context-tracker.tests.ts
index 22171c92a1..c8bdd17097 100644
--- a/web/src/test/auto/headless/engine/predictive-text/worker-thread/context/context-tracker.tests.ts
+++ b/web/src/test/auto/headless/engine/predictive-text/worker-thread/context/context-tracker.tests.ts
@@ -1,7 +1,7 @@
import { assert } from 'chai';
import { default as defaultBreaker } from '@keymanapp/models-wordbreakers';
-import { deepCopy } from '@keymanapp/web-utils';
+import { deepCopy } from 'keyman/common/web-utils';
import { jsonFixture } from '@keymanapp/common-test-resources/model-helpers.mjs';
import { LexicalModelTypes } from '@keymanapp/common-types';
diff --git a/web/src/test/auto/headless/engine/predictive-text/worker-thread/correction-search/distance-modeler.tests.ts b/web/src/test/auto/headless/engine/predictive-text/worker-thread/correction-search/distance-modeler.tests.ts
index da9ce9acef..8eede09ea4 100644
--- a/web/src/test/auto/headless/engine/predictive-text/worker-thread/correction-search/distance-modeler.tests.ts
+++ b/web/src/test/auto/headless/engine/predictive-text/worker-thread/correction-search/distance-modeler.tests.ts
@@ -9,7 +9,7 @@
import { assert } from 'chai';
-import { PriorityQueue } from '@keymanapp/web-utils';
+import { PriorityQueue } from 'keyman/common/web-utils';
import { jsonFixture } from '@keymanapp/common-test-resources/model-helpers.mjs';
import { LexicalModelTypes } from '@keymanapp/common-types';
diff --git a/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/predict-from-corrections.tests.ts b/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/predict-from-corrections.tests.ts
index 54eec72955..2351ff9932 100644
--- a/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/predict-from-corrections.tests.ts
+++ b/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/predict-from-corrections.tests.ts
@@ -1,7 +1,7 @@
import { assert } from 'chai';
-import { deepCopy } from "@keymanapp/web-utils";
+import { deepCopy } from "keyman/common/web-utils";
import { LexicalModelTypes } from '@keymanapp/common-types';
import { models, predictFromCorrections, tupleDisplayOrderSort } from "@keymanapp/lm-worker/test-index";
diff --git a/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/suggestion-deduplication.tests.ts b/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/suggestion-deduplication.tests.ts
index eea66d8ad0..bfd2eeefaf 100644
--- a/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/suggestion-deduplication.tests.ts
+++ b/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/suggestion-deduplication.tests.ts
@@ -1,7 +1,7 @@
import { assert } from 'chai';
import * as wordBreakers from '@keymanapp/models-wordbreakers';
-import { deepCopy } from '@keymanapp/web-utils';
+import { deepCopy } from 'keyman/common/web-utils';
import { LexicalModelTypes } from '@keymanapp/common-types';
import { CorrectionPredictionTuple, dedupeSuggestions, models } from "@keymanapp/lm-worker/test-index";
diff --git a/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/suggestion-finalization.tests.ts b/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/suggestion-finalization.tests.ts
index e79af94304..74a394463f 100644
--- a/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/suggestion-finalization.tests.ts
+++ b/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/suggestion-finalization.tests.ts
@@ -1,7 +1,7 @@
import { assert } from 'chai';
-import { deepCopy } from '@keymanapp/web-utils';
+import { deepCopy } from 'keyman/common/web-utils';
import * as wordBreakers from '@keymanapp/models-wordbreakers';
import { LexicalModelTypes } from '@keymanapp/common-types';
diff --git a/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/suggestion-similarity.tests.ts b/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/suggestion-similarity.tests.ts
index ae5133cf4b..f1ab68c0b4 100644
--- a/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/suggestion-similarity.tests.ts
+++ b/web/src/test/auto/headless/engine/predictive-text/worker-thread/prediction-helpers/suggestion-similarity.tests.ts
@@ -2,7 +2,7 @@ import { assert } from 'chai';
import { QuoteBehavior } from "@keymanapp/models-templates";
import * as wordBreakers from '@keymanapp/models-wordbreakers';
-import { deepCopy } from '@keymanapp/web-utils';
+import { deepCopy } from 'keyman/common/web-utils';
import { LexicalModelTypes } from '@keymanapp/common-types';
import { CorrectionPredictionTuple, models, processSimilarity, SuggestionSimilarity, toAnnotatedSuggestion } from "@keymanapp/lm-worker/test-index";
diff --git a/web/src/test/auto/headless/engine/predictive-text/worker-thread/worker-predict.tests.ts b/web/src/test/auto/headless/engine/predictive-text/worker-thread/worker-predict.tests.ts
index 8099215bdf..ffe25f1120 100644
--- a/web/src/test/auto/headless/engine/predictive-text/worker-thread/worker-predict.tests.ts
+++ b/web/src/test/auto/headless/engine/predictive-text/worker-thread/worker-predict.tests.ts
@@ -5,7 +5,7 @@ import sinon from 'sinon';
import { LexicalModelTypes } from '@keymanapp/common-types';
import { configWorker, createMessageEventWithData, emptyContext, iGotDistractedByHazel,
importScriptsWith, randomToken, zeroTransform } from '@keymanapp/common-test-resources/model-helpers.mjs';
-import { timedPromise } from '@keymanapp/web-utils';
+import { timedPromise } from 'keyman/common/web-utils';
import { LMLayerWorker } from '@keymanapp/lm-worker/test-index';
import { OutgoingMessage } from '@keymanapp/lm-message-types';
diff --git a/web/src/test/auto/integrated/cases/events.tests.ts b/web/src/test/auto/integrated/cases/events.tests.ts
index 952b87347a..29a9e24d1b 100644
--- a/web/src/test/auto/integrated/cases/events.tests.ts
+++ b/web/src/test/auto/integrated/cases/events.tests.ts
@@ -9,7 +9,7 @@ import {
import * as KMWRecorder from '#recorder';
import OSKInputEventSpec = KMWRecorder.OSKInputEventSpec;
-import { timedPromise } from '@keymanapp/web-utils';
+import { timedPromise } from 'keyman/common/web-utils';
import { type KeymanEngine } from 'keyman/app/browser';
import { DEFAULT_BROWSER_TIMEOUT } from '@keymanapp/common-test-resources/test-timeouts.mjs';
diff --git a/web/src/test/auto/integrated/cases/text_selection.tests.ts b/web/src/test/auto/integrated/cases/text_selection.tests.ts
index 2fde53bc3c..9bc9de9cd4 100644
--- a/web/src/test/auto/integrated/cases/text_selection.tests.ts
+++ b/web/src/test/auto/integrated/cases/text_selection.tests.ts
@@ -7,7 +7,7 @@ import {
teardownKMW
} from "../test_utils.js";
import * as KMWRecorder from '#recorder';
-import { timedPromise } from '@keymanapp/web-utils';
+import { timedPromise } from 'keyman/common/web-utils';
import { type KeymanEngine } from 'keyman/app/browser';
type WindowKey = keyof typeof window;
diff --git a/web/src/test/auto/integrated/tsconfig.json b/web/src/test/auto/integrated/tsconfig.json
index e0de4828c4..adf40830d6 100644
--- a/web/src/test/auto/integrated/tsconfig.json
+++ b/web/src/test/auto/integrated/tsconfig.json
@@ -2,7 +2,6 @@
"extends": "../../../tsconfig.dom.json",
"compilerOptions": {
- "baseUrl": "./",
"outDir": "../../../build/test",
"rootDir": "."
},
diff --git a/web/src/test/auto/resources/loader/nodeKeyboardLoader.ts b/web/src/test/auto/resources/loader/nodeKeyboardLoader.ts
index 9956c1ca26..ee737eb206 100644
--- a/web/src/test/auto/resources/loader/nodeKeyboardLoader.ts
+++ b/web/src/test/auto/resources/loader/nodeKeyboardLoader.ts
@@ -1,7 +1,7 @@
import vm from 'node:vm';
import { readFile } from 'node:fs/promises';
-import { globalObject } from '@keymanapp/web-utils';
+import { globalObject } from 'keyman/common/web-utils';
import { JSKeyboard, KeyboardHarness, MinimalKeymanGlobal, KeyboardLoaderBase, KeyboardLoadErrorBuilder } from 'keyman/engine/keyboard';
diff --git a/web/src/test/auto/resources/loader/tsconfig.node.json b/web/src/test/auto/resources/loader/tsconfig.node.json
index 4a06decf4c..0f657843ac 100644
--- a/web/src/test/auto/resources/loader/tsconfig.node.json
+++ b/web/src/test/auto/resources/loader/tsconfig.node.json
@@ -2,7 +2,6 @@
"extends": "../../../../../../tsconfig.base.json",
"compilerOptions": {
"types": [ "node" ],
- "baseUrl": "../../../",
"outDir": "../../../../../../build/engine/keyboard/obj/keyboards/loaders/",
"tsBuildInfoFile": "../../../../../../build/engine/keyboard/obj/keyboards/loaders/tsconfig.node.tsbuildinfo",
"rootDir": "."
diff --git a/web/src/test/auto/resources/sequenceAssertions.ts b/web/src/test/auto/resources/sequenceAssertions.ts
index 7a5414d8ff..6c349f72fe 100644
--- a/web/src/test/auto/resources/sequenceAssertions.ts
+++ b/web/src/test/auto/resources/sequenceAssertions.ts
@@ -13,7 +13,7 @@ const { GestureSequence, GestureStageReport } = matchers;
type GestureSequence = gestures.matchers.GestureSequence;
type GestureStageReport = gestures.matchers.GestureStageReport;
-import { ManagedPromise } from '@keymanapp/web-utils';
+import { ManagedPromise } from 'keyman/common/web-utils';
export interface StageReportAssertion {
matchedId: string,
diff --git a/web/src/test/auto/resources/simulateMultiSourceInput.ts b/web/src/test/auto/resources/simulateMultiSourceInput.ts
index 2d450498f5..cf7c2516cd 100644
--- a/web/src/test/auto/resources/simulateMultiSourceInput.ts
+++ b/web/src/test/auto/resources/simulateMultiSourceInput.ts
@@ -1,5 +1,5 @@
import { InputSample, buildGestureMatchInspector, GestureSource, GestureSourceSubview, gestures } from 'keyman/engine/gesture-processor';
-import { ManagedPromise, timedPromise } from '@keymanapp/web-utils';
+import { ManagedPromise, timedPromise } from 'keyman/common/web-utils';
type GestureMatcher = gestures.matchers.GestureMatcher;
type MatcherSelection = gestures.matchers.MatcherSelection;
diff --git a/web/src/test/auto/tsconfig.json b/web/src/test/auto/tsconfig.json
index 36c43d22d0..506b0610d4 100644
--- a/web/src/test/auto/tsconfig.json
+++ b/web/src/test/auto/tsconfig.json
@@ -2,13 +2,9 @@
"extends": "../../tsconfig.dom.json",
"compilerOptions": {
- "baseUrl": "./",
"outDir": "../../../build/test",
"tsBuildInfoFile": "../../../build/test/tsconfig.tsbuildinfo",
"rootDir": ".",
- "paths": {
- "keyman/engine/*": ["../../engine/src/*/index.js"],
- },
},
"include": [
diff --git a/web/src/tools/building/sourcemap-root/tsconfig.json b/web/src/tools/building/sourcemap-root/tsconfig.json
index c568350322..e7df68d733 100644
--- a/web/src/tools/building/sourcemap-root/tsconfig.json
+++ b/web/src/tools/building/sourcemap-root/tsconfig.json
@@ -3,7 +3,6 @@
"compilerOptions": {
"outDir": "../../../../build/tools/building/sourcemap-root",
"tsBuildInfoFile": "../../../../build/tools/building/sourcemap-root/tsconfig.tsbuildinfo",
- "baseUrl": "./",
"rootDir": "./",
// override for now, see #11716
diff --git a/web/src/tools/es-bundling/tsconfig.json b/web/src/tools/es-bundling/tsconfig.json
index 1c317aabec..b0338768aa 100644
--- a/web/src/tools/es-bundling/tsconfig.json
+++ b/web/src/tools/es-bundling/tsconfig.json
@@ -2,7 +2,6 @@
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
- "baseUrl": "./",
"outDir": "build/",
"tsBuildInfoFile": "build/tsconfig.tsbuildinfo",
"rootDir": "./src"
diff --git a/web/src/tools/testing/bulk_rendering/build.sh b/web/src/tools/testing/bulk_rendering/build.sh
index e932ffdec3..3ed494c73b 100755
--- a/web/src/tools/testing/bulk_rendering/build.sh
+++ b/web/src/tools/testing/bulk_rendering/build.sh
@@ -16,7 +16,7 @@ SUBPROJECT_NAME=tools/testing/bulk_rendering
################################ Main script ################################
builder_describe "Builds a 'bulk renderer' that loads all the cloud keyboards from api.keyman.com and renders each of them to a document." \
- "@/web/src/engine/common/web-utils build" \
+ "@/web/src/common/web-utils build" \
"@/web/src/app/browser build" \
"@/web/src/app/ui build" \
"clean" \
diff --git a/web/src/tools/testing/bulk_rendering/renderer_core.ts b/web/src/tools/testing/bulk_rendering/renderer_core.ts
index 5bdd1527d1..9086c7b4ec 100644
--- a/web/src/tools/testing/bulk_rendering/renderer_core.ts
+++ b/web/src/tools/testing/bulk_rendering/renderer_core.ts
@@ -1,6 +1,6 @@
// Includes KeymanWeb's Device class, as it's quite a useful resource for KMW-related projects.
import { DeviceDetector } from 'keyman/engine/main';
-import { type DeviceSpec } from '@keymanapp/web-utils';
+import { type DeviceSpec } from 'keyman/common/web-utils';
import type { KeymanEngine } from 'keyman/app/browser';
import { JSKeyboard, type FloatingOSKView } from 'keyman/engine/osk';
diff --git a/web/src/tools/testing/bulk_rendering/tsconfig.json b/web/src/tools/testing/bulk_rendering/tsconfig.json
index f1cac77f87..65b54a0a64 100644
--- a/web/src/tools/testing/bulk_rendering/tsconfig.json
+++ b/web/src/tools/testing/bulk_rendering/tsconfig.json
@@ -2,13 +2,9 @@
"extends": "../../../tsconfig.dom.json",
"compilerOptions": {
- "baseUrl": "./",
"outDir": "../../../../build/tools/testing/bulk_rendering/obj/",
"tsBuildInfoFile": "../../../../build/tools/testing/bulk_rendering/obj/tsconfig.tsbuildinfo",
"rootDir": ".",
- "paths": {
- "keyman/engine/*": ["../../../engine/src/*/index.js"],
- },
},
"files": [
diff --git a/web/src/tools/testing/gesture-processor/unit-test-resources/src/headlessInputEngine.ts b/web/src/tools/testing/gesture-processor/unit-test-resources/src/headlessInputEngine.ts
index c0d67fe740..adec117ec1 100644
--- a/web/src/tools/testing/gesture-processor/unit-test-resources/src/headlessInputEngine.ts
+++ b/web/src/tools/testing/gesture-processor/unit-test-resources/src/headlessInputEngine.ts
@@ -5,7 +5,7 @@ import {
} from 'keyman/engine/gesture-processor';
import { RecordedCoordSequenceSet } from './inputRecording.js';
-import { timedPromise } from '@keymanapp/web-utils';
+import { timedPromise } from 'keyman/common/web-utils';
export class HeadlessInputEngine extends InputEngineBase {
private PATH_ID_SEED = 1;
diff --git a/web/src/tools/testing/gesture-processor/unit-test-resources/tsconfig.json b/web/src/tools/testing/gesture-processor/unit-test-resources/tsconfig.json
index 1b878f2040..ad1b766227 100644
--- a/web/src/tools/testing/gesture-processor/unit-test-resources/tsconfig.json
+++ b/web/src/tools/testing/gesture-processor/unit-test-resources/tsconfig.json
@@ -1,14 +1,10 @@
{
"extends": "../../../../../../tsconfig.base.json",
"compilerOptions": {
- "baseUrl": "./",
"lib": [ "dom", "es6" ],
"outDir": "../../../../../build/tools/testing/gesture-processor/unit-test-resources/obj",
"rootDir": "./src",
"tsBuildInfoFile": "../../../../../build/tools/testing/gesture-processor/unit-test-resources/tsconfig.tsbuildinfo",
- "paths": {
- "keyman/engine/*": [ "../../../../engine/src/*/index.js" ],
- },
},
"references": [
{ "path": "../../../../engine/" }
diff --git a/web/src/tools/testing/recorder-core/package.json b/web/src/tools/testing/recorder-core/package.json
index 6bec4354ae..ad059271e4 100644
--- a/web/src/tools/testing/recorder-core/package.json
+++ b/web/src/tools/testing/recorder-core/package.json
@@ -20,8 +20,7 @@
"homepage": "https://github.com/keymanapp/keyman#readme",
"dependencies": {
"@keymanapp/common-types": "*",
- "@keymanapp/keyman-version": "*",
- "@keymanapp/web-utils": "*"
+ "@keymanapp/keyman-version": "*"
},
"devDependencies": {
"typescript": "^5.4.5"
diff --git a/web/src/tools/testing/recorder-core/src/index.ts b/web/src/tools/testing/recorder-core/src/index.ts
index f74639f207..3d3fceacd8 100644
--- a/web/src/tools/testing/recorder-core/src/index.ts
+++ b/web/src/tools/testing/recorder-core/src/index.ts
@@ -5,7 +5,7 @@ import Proctor from "./proctor.js";
export { default as Proctor } from "./proctor.js";
export { default as NodeProctor } from "./nodeProctor.js";
-import * as utils from "@keymanapp/web-utils";
+import * as utils from "keyman/common/web-utils";
type EventTypeTag = 'key' | 'osk';
type TaggedEventObject = { type: EventTypeTag }
diff --git a/web/src/tools/testing/recorder-core/src/nodeProctor.ts b/web/src/tools/testing/recorder-core/src/nodeProctor.ts
index b6e2968ed5..a4039ee0ab 100644
--- a/web/src/tools/testing/recorder-core/src/nodeProctor.ts
+++ b/web/src/tools/testing/recorder-core/src/nodeProctor.ts
@@ -9,7 +9,7 @@ import {
} from "./index.js";
import { KeyEvent, KeyEventSpec, KeyboardHarness, SyntheticTextStore, TextStore } from "keyman/engine/keyboard";
-import { DeviceSpec } from "@keymanapp/web-utils";
+import { DeviceSpec } from "keyman/common/web-utils";
import { JSKeyboardInterface, JSKeyboardProcessor } from 'keyman/engine/js-processor';
export default class NodeProctor extends Proctor {
diff --git a/web/src/tools/testing/recorder-core/src/proctor.ts b/web/src/tools/testing/recorder-core/src/proctor.ts
index 1bf4a32071..d5cd1e461a 100644
--- a/web/src/tools/testing/recorder-core/src/proctor.ts
+++ b/web/src/tools/testing/recorder-core/src/proctor.ts
@@ -1,4 +1,4 @@
-import { type DeviceSpec } from "@keymanapp/web-utils";
+import { type DeviceSpec } from "keyman/common/web-utils";
import { type TextStore } from "keyman/engine/keyboard";
import type { KeyboardTest, TestSet, TestSequence } from "./index.js";
diff --git a/web/src/tools/testing/recorder-core/tsconfig.json b/web/src/tools/testing/recorder-core/tsconfig.json
index edff4282dc..e5b2d6ca5d 100644
--- a/web/src/tools/testing/recorder-core/tsconfig.json
+++ b/web/src/tools/testing/recorder-core/tsconfig.json
@@ -3,13 +3,9 @@
"compilerOptions": {
"types": ["node"],
- "baseUrl": "./",
"outDir": "./build/obj/",
"tsBuildInfoFile": "./build/obj/tsconfig.tsbuildinfo",
"rootDir": "./src",
- "paths": {
- "keyman/engine/*": ["../../../engine/src/*/index.js"],
- },
},
"include": [
@@ -18,7 +14,7 @@
"references": [
{ "path": "../../../../../common/web/keyman-version" },
- { "path": "../../../engine/common/web-utils/" },
+ { "path": "../../../common/web-utils/" },
{ "path": "../../../engine/predictive-text/types" },
{ "path": "../../../engine" },
],
diff --git a/web/src/tools/testing/recorder/browserDriver.ts b/web/src/tools/testing/recorder/browserDriver.ts
index a0255ae0e0..7be0caed6d 100644
--- a/web/src/tools/testing/recorder/browserDriver.ts
+++ b/web/src/tools/testing/recorder/browserDriver.ts
@@ -4,7 +4,7 @@ import {
OSKInputEventSpec,
PhysicalInputEventSpec
} from "@keymanapp/recorder-core";
-import { ManagedPromise, timedPromise } from "@keymanapp/web-utils";
+import { ManagedPromise, timedPromise } from "keyman/common/web-utils";
import { type KeymanEngine } from 'keyman/app/browser';
diff --git a/web/src/tools/testing/recorder/browserProctor.ts b/web/src/tools/testing/recorder/browserProctor.ts
index ea135c7a0d..f0b09e9b50 100644
--- a/web/src/tools/testing/recorder/browserProctor.ts
+++ b/web/src/tools/testing/recorder/browserProctor.ts
@@ -2,7 +2,7 @@
// Only BrowserDriver.ts and its prerequisites are needed during actual integrated unit testing.
///
-import { type DeviceSpec } from "@keymanapp/web-utils";
+import { type DeviceSpec } from "keyman/common/web-utils";
import { type TextStore } from "keyman/engine/keyboard";
diff --git a/web/src/tools/testing/recorder/tsconfig.json b/web/src/tools/testing/recorder/tsconfig.json
index bbe5ae58bc..d6e23c6a9a 100644
--- a/web/src/tools/testing/recorder/tsconfig.json
+++ b/web/src/tools/testing/recorder/tsconfig.json
@@ -1,20 +1,16 @@
{
"extends": "../../../tsconfig.dom.json",
"compilerOptions": {
- "baseUrl": "./",
"outDir": "../../../../build/tools/testing/recorder/obj/",
"rootDir": ".",
"tsBuildInfoFile": "../../../../build/tools/testing/recorder/obj/tsconfig.tsbuildinfo",
- "paths": {
- "keyman/engine/*": ["../../../engine/src/*/index.js"],
- },
},
"include": [ "*.ts" ],
"references": [
{ "path": "../../../../../common/web/keyman-version" },
- { "path": "../../../engine/common/web-utils" },
+ { "path": "../../../common/web-utils" },
{ "path": "../../../engine/predictive-text/types" },
{ "path": "../../../app/browser" },
{ "path": "../recorder-core" },
diff --git a/web/src/tools/testing/test-utils/tsconfig.json b/web/src/tools/testing/test-utils/tsconfig.json
index 65dfe3a9bf..190dfc710c 100644
--- a/web/src/tools/testing/test-utils/tsconfig.json
+++ b/web/src/tools/testing/test-utils/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../../tsconfig.dom.json",
"compilerOptions": {
- "baseUrl": "./",
"outDir": "../../../../build/tools/testing/test-utils/obj/",
"rootDir": ".",
"tsBuildInfoFile": "../../../../build/tools/testing/test-utils/obj/tsconfig.tsbuildinfo"
diff --git a/web/src/tsconfig.all.json b/web/src/tsconfig.all.json
index 0a9ab828dd..fa882d6f2d 100644
--- a/web/src/tsconfig.all.json
+++ b/web/src/tsconfig.all.json
@@ -1,18 +1,23 @@
-// Is not `extend`ed by any tsconfigs; this is solely to build all app/ targets.
-// Doesn't bundle them, though, so there are limits to the usefulness of this file.
+// This file lists all the child modules, for completeness. However, there are
+// steps like bundling and sourcing external resources that are not performed by
+// tsc, so there are limits to the usefulness of this file.
{
- "extends": "../tsconfig.base.json",
-
- "compilerOptions": {
- "baseUrl": "./",
- "outDir": "../build",
- "tsBuildInfoFile": "../build/tsconfig.all.tsbuildinfo",
- "rootDir": "./"
- },
- "files": [],
"references": [
{ "path": "app/browser" },
{ "path": "app/webview" },
- { "path": "app/ui" }
+ { "path": "app/ui" },
+
+ { "path": "common/web-utils" },
+ { "path": "engine/" },
+ { "path": "engine/predictive-text/types/" },
+ { "path": "engine/predictive-text/templates" },
+ { "path": "engine/predictive-text/wordbreakers" },
+ { "path": "engine/predictive-text/worker-main/tsconfig.all.json" },
+ { "path": "engine/predictive-text/worker-thread" },
+ { "path": "tools/testing/gesture-processor/unit-test-resources" },
+ { "path": "engine/sentry-manager/src" },
+
+ { "path": "tools/testing/recorder" },
+ // { "path": "tools/sourcemap-root/tsconfig.json" },
],
}
\ No newline at end of file
diff --git a/web/tsconfig.base.json b/web/tsconfig.base.json
index d1deafecb6..95acf6658a 100644
--- a/web/tsconfig.base.json
+++ b/web/tsconfig.base.json
@@ -16,5 +16,14 @@
"importHelpers": true,
"inlineSources": true,
"sourceMap": true,
+
+ "baseUrl": "./",
+
+ "paths": {
+ // Note: this overrides paths in ../tsconfig.base.json
+ "keyman/common/web-utils": ["./src/common/web-utils/src/index.js"],
+ "keyman/engine/*": ["./src/engine/src/*/index.js"],
+ },
+
}
}