diff --git a/.github/labeler.yml b/.github/labeler.yml
index d6a26f23e3d..19c858cc81d 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -20,9 +20,8 @@ common/:
- common/**
- resources/**
-common/models/: common/models/**
common/models/templates/: web/src/engine/predictive-text/templates/**
-common/models/wordbreakers/: common/models/wordbreakers/**
+common/models/wordbreakers/: web/src/engine/predictive-text/wordbreakers/**
common/resources/: resources/**
common/web/: common/web/**
diff --git a/common/models/tsconfig.kmw-worker-base.json b/common/models/tsconfig.kmw-worker-base.json
deleted file mode 100644
index 0b581af1be3..00000000000
--- a/common/models/tsconfig.kmw-worker-base.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "extends": "../../web/tsconfig.base.json",
-
- "compilerOptions": {
- // To help better support legacy Android devices
- "downlevelIteration": true,
- // Facilitates & simplifies stitching together the worker sourcemaps during the polyfill-concatenation step.
- "inlineSourceMap": true,
- // May not be set at the same time as the prior setting.
- "sourceMap": false
- }
-}
diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS
index 75530e6bde1..dcf54ce78cc 100644
--- a/docs/CODEOWNERS
+++ b/docs/CODEOWNERS
@@ -8,7 +8,6 @@
/common/ @mcdurdin @rc-swag
/core/ @mcdurdin @rc-swag
/common/lexical-model-types/ @jahorton @mcdurdin
-/common/models/ @jahorton @mcdurdin
/common/schemas/ @mcdurdin @jahorton
/common/test/ @mcdurdin @ermshiperete
/common/web/ @jahorton @mcdurdin
diff --git a/package-lock.json b/package-lock.json
index f8e3d89043e..636ee750f1f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -21,7 +21,6 @@
"developer/src/kmc-package",
"developer/src/kmc",
"developer/src/server",
- "common/models/*",
"common/test/resources",
"common/tools/*",
"common/web/*",
@@ -70,19 +69,6 @@
"node": "20.16.0"
}
},
- "common/models/wordbreakers": {
- "name": "@keymanapp/models-wordbreakers",
- "license": "MIT",
- "devDependencies": {
- "@keymanapp/common-types": "*",
- "@keymanapp/resources-gosh": "*",
- "@types/mocha": "^7.0.2",
- "c8": "^7.12.0",
- "mocha": "^10.0.0",
- "mocha-teamcity-reporter": "^4.0.0",
- "typescript": "^5.4.5"
- }
- },
"common/test/resources": {
"name": "@keymanapp/common-test-resources",
"license": "MIT",
@@ -2818,7 +2804,7 @@
"link": true
},
"node_modules/@keymanapp/models-wordbreakers": {
- "resolved": "common/models/wordbreakers",
+ "resolved": "web/src/engine/predictive-text/wordbreakers",
"link": true
},
"node_modules/@keymanapp/recorder-core": {
@@ -14761,6 +14747,19 @@
"typescript": "^5.4.5"
}
},
+ "web/src/engine/predictive-text/wordbreakers": {
+ "name": "@keymanapp/models-wordbreakers",
+ "license": "MIT",
+ "devDependencies": {
+ "@keymanapp/common-types": "*",
+ "@keymanapp/resources-gosh": "*",
+ "@types/mocha": "^7.0.2",
+ "c8": "^7.12.0",
+ "mocha": "^10.0.0",
+ "mocha-teamcity-reporter": "^4.0.0",
+ "typescript": "^5.4.5"
+ }
+ },
"web/src/engine/predictive-text/worker-main": {
"name": "@keymanapp/lexical-model-layer",
"license": "MIT",
diff --git a/package.json b/package.json
index 72508afc034..2c06c1652c8 100644
--- a/package.json
+++ b/package.json
@@ -46,7 +46,6 @@
"developer/src/kmc-package",
"developer/src/kmc",
"developer/src/server",
- "common/models/*",
"common/test/resources",
"common/tools/*",
"common/web/*",
diff --git a/resources/standards-data/unicode-character-database/download.sh b/resources/standards-data/unicode-character-database/download.sh
index 4b972e7afa1..a6675d28741 100755
--- a/resources/standards-data/unicode-character-database/download.sh
+++ b/resources/standards-data/unicode-character-database/download.sh
@@ -26,7 +26,7 @@ BLOCKS_SRC_LOCAL="./Blocks.txt"
UNICODE_DATA_SRC_HREF="https://www.unicode.org/Public/$KEYMAN_VERSION_UNICODE/ucd/UnicodeData.txt"
UNICODE_DATA_SRC_LOCAL="./UnicodeData.txt"
-# Used by common/models/wordbreakers for the default Unicode wordbreaker.
+# Used by web/src/engine/predictive-text/wordbreakers for the default Unicode wordbreaker.
WORDBREAK_PROP_SRC_HREF="https://www.unicode.org/Public/$KEYMAN_VERSION_UNICODE/ucd/auxiliary/WordBreakProperty.txt"
WORDBREAK_PROP_SRC_LOCAL="./WordBreakProperty.txt"
@@ -55,4 +55,4 @@ do_download() {
downloadPropertyFile "${EMOJI_DATA_SRC_HREF}" "${EMOJI_DATA_SRC_LOCAL}"
}
-builder_run_action download do_download
\ No newline at end of file
+builder_run_action download do_download
diff --git a/resources/stats/stats.sh b/resources/stats/stats.sh
index 791aba8e14d..949d137e4bd 100755
--- a/resources/stats/stats.sh
+++ b/resources/stats/stats.sh
@@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
cd "$THIS_SCRIPT_PATH"
-platforms=(android/ ios/ linux/ mac/ web/ windows/ developer/ core/ common/models/)
+platforms=(android/ ios/ linux/ mac/ web/ windows/ developer/ core/)
builder_describe "Stats collector for Keyman PRs and issues
diff --git a/tsconfig.base.json b/tsconfig.base.json
index ecff77121da..521ff447fa9 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -28,7 +28,7 @@
"@keymanapp/common-types": ["./common/web/types/src/main"],
"@keymanapp/keyman": ["./web" ],
"@keymanapp/models-templates": ["./web/src/engine/predictive-text/templates/"],
- "@keymanapp/models-wordbreakers": ["./common/models/wordbreakers"],
+ "@keymanapp/models-wordbreakers": ["./web/src/engine/predictive-text/wordbreakers"],
"@keymanapp/web-utils": ["./common/web/utils"],
"@keymanapp/lm-message-types": ["./web/src/engine/predictive-text/types"],
"@keymanapp/keyman-version": ["./common/web/keyman-version"],
diff --git a/tsconfig.json b/tsconfig.json
index 5dacf1111a7..51b3a60f72a 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -2,8 +2,6 @@
"references": [
{ "path": "./core/include/ldml/tsconfig.json" },
- { "path": "./cweb/src/engine/predictive-text/templates/tsconfig.json" },
- { "path": "./common/models/wordbreakers/tsconfig.json" },
{ "path": "./common/tools/hextobin/" },
{ "path": "./common/web/keyman-version" },
@@ -38,6 +36,8 @@
{ "path": "./web/src/tsconfig.all.json" },
{ "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/engine/osk/gesture-processor/tsconfig.json" },
diff --git a/web/README.md b/web/README.md
index 5200ac27675..f3e723aee84 100644
--- a/web/README.md
+++ b/web/README.md
@@ -86,7 +86,7 @@ graph TD;
OSK-->KeyboardSpec;
WebUtils["@keymanapp/web-utils
(/common/web/utils)"];
KeyboardSpec---->WebUtils;
- Wordbreakers["@keymanapp/models-wordbreakers
(/common/models/wordbreakers)"];
+ Wordbreakers["@keymanapp/models-wordbreakers
(/web/src/engine/predictive-text/wordbreakers)"];
Models["@keymanapp/models-templates
(/web/src/engine/predictive-text/templates/)"];
Models-->WebUtils;
LMWorker["@keymanapp/lm-worker
(/web/src/engine/predictive-text/worker-thread)"];
diff --git a/web/src/engine/predictive-text/templates/build.sh b/web/src/engine/predictive-text/templates/build.sh
index d09e18be1d8..7f629a6b1e6 100755
--- a/web/src/engine/predictive-text/templates/build.sh
+++ b/web/src/engine/predictive-text/templates/build.sh
@@ -15,7 +15,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
builder_describe "Builds the predictive-text model template implementation module" \
"@/common/web/keyman-version" \
"@/common/web/es-bundling" \
- "@/common/models/wordbreakers" \
+ "@../wordbreakers" \
"clean" \
"configure" \
"build" \
diff --git a/web/src/engine/predictive-text/templates/tsconfig.json b/web/src/engine/predictive-text/templates/tsconfig.json
index 7cfc93dfb6a..3bf428226b3 100644
--- a/web/src/engine/predictive-text/templates/tsconfig.json
+++ b/web/src/engine/predictive-text/templates/tsconfig.json
@@ -10,7 +10,7 @@
"references": [
{ "path": "../../../../../common/web/types" },
{ "path": "../../../../../common/web/utils" },
- { "path": "../../../../../common/models/wordbreakers" }
+ { "path": "../wordbreakers" }
],
"include": [
"src/**/*.ts"
diff --git a/common/models/wordbreakers/.c8rc.json b/web/src/engine/predictive-text/wordbreakers/.c8rc.json
similarity index 100%
rename from common/models/wordbreakers/.c8rc.json
rename to web/src/engine/predictive-text/wordbreakers/.c8rc.json
diff --git a/common/models/wordbreakers/.gitignore b/web/src/engine/predictive-text/wordbreakers/.gitignore
similarity index 100%
rename from common/models/wordbreakers/.gitignore
rename to web/src/engine/predictive-text/wordbreakers/.gitignore
diff --git a/common/models/wordbreakers/README.md b/web/src/engine/predictive-text/wordbreakers/README.md
similarity index 62%
rename from common/models/wordbreakers/README.md
rename to web/src/engine/predictive-text/wordbreakers/README.md
index 29ba5d51c73..8f6ac0b3989 100644
--- a/common/models/wordbreakers/README.md
+++ b/web/src/engine/predictive-text/wordbreakers/README.md
@@ -4,13 +4,13 @@ The word breakers bundled in Keyman's modeling layer (common/models).
Includes:
- - `default` — a word breaker based on the Unicode default word boundary specification
- - _deprecated_ `ascii` — an example word breaker
- - _deprecated_ `placeholder` — an example word breaker
+- `default` — a word breaker based on the Unicode default word boundary specification
+- _deprecated_ `ascii` — an example word breaker
+- _deprecated_ `placeholder` — an example word breaker
## Usage
-```
+```typescript
import {wordBreakers} from '@keymanapp/models-wordbreakers';
const breakWords = wordBreakers['default'];
diff --git a/common/models/wordbreakers/build.sh b/web/src/engine/predictive-text/wordbreakers/build.sh
similarity index 95%
rename from common/models/wordbreakers/build.sh
rename to web/src/engine/predictive-text/wordbreakers/build.sh
index 725436c60eb..4591cc34e13 100755
--- a/common/models/wordbreakers/build.sh
+++ b/web/src/engine/predictive-text/wordbreakers/build.sh
@@ -5,7 +5,7 @@
## START STANDARD BUILD SCRIPT INCLUDE
# adjust relative paths as necessary
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
-. "$(dirname "$THIS_SCRIPT")/../../../resources/build/builder.inc.sh"
+. "$(dirname "$THIS_SCRIPT")/../../../../../resources/build/builder.inc.sh"
## END STANDARD BUILD SCRIPT INCLUDE
. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh"
diff --git a/common/models/wordbreakers/package.json b/web/src/engine/predictive-text/wordbreakers/package.json
similarity index 100%
rename from common/models/wordbreakers/package.json
rename to web/src/engine/predictive-text/wordbreakers/package.json
diff --git a/common/models/wordbreakers/src/main/ascii.ts b/web/src/engine/predictive-text/wordbreakers/src/main/ascii.ts
similarity index 100%
rename from common/models/wordbreakers/src/main/ascii.ts
rename to web/src/engine/predictive-text/wordbreakers/src/main/ascii.ts
diff --git a/common/models/wordbreakers/src/main/default/index.ts b/web/src/engine/predictive-text/wordbreakers/src/main/default/index.ts
similarity index 100%
rename from common/models/wordbreakers/src/main/default/index.ts
rename to web/src/engine/predictive-text/wordbreakers/src/main/default/index.ts
diff --git a/common/models/wordbreakers/src/main/default/searchForProperty.ts b/web/src/engine/predictive-text/wordbreakers/src/main/default/searchForProperty.ts
similarity index 100%
rename from common/models/wordbreakers/src/main/default/searchForProperty.ts
rename to web/src/engine/predictive-text/wordbreakers/src/main/default/searchForProperty.ts
diff --git a/common/models/wordbreakers/src/main/index.ts b/web/src/engine/predictive-text/wordbreakers/src/main/index.ts
similarity index 100%
rename from common/models/wordbreakers/src/main/index.ts
rename to web/src/engine/predictive-text/wordbreakers/src/main/index.ts
diff --git a/common/models/wordbreakers/src/main/placeholder.ts b/web/src/engine/predictive-text/wordbreakers/src/main/placeholder.ts
similarity index 100%
rename from common/models/wordbreakers/src/main/placeholder.ts
rename to web/src/engine/predictive-text/wordbreakers/src/main/placeholder.ts
diff --git a/common/models/wordbreakers/src/main/test-index.ts b/web/src/engine/predictive-text/wordbreakers/src/main/test-index.ts
similarity index 100%
rename from common/models/wordbreakers/src/main/test-index.ts
rename to web/src/engine/predictive-text/wordbreakers/src/main/test-index.ts
diff --git a/common/models/wordbreakers/test/test-ascii-word-breaker.js b/web/src/engine/predictive-text/wordbreakers/test/test-ascii-word-breaker.js
similarity index 100%
rename from common/models/wordbreakers/test/test-ascii-word-breaker.js
rename to web/src/engine/predictive-text/wordbreakers/test/test-ascii-word-breaker.js
diff --git a/common/models/wordbreakers/test/test-default-word-breaker.js b/web/src/engine/predictive-text/wordbreakers/test/test-default-word-breaker.js
similarity index 100%
rename from common/models/wordbreakers/test/test-default-word-breaker.js
rename to web/src/engine/predictive-text/wordbreakers/test/test-default-word-breaker.js
diff --git a/common/models/wordbreakers/test/test-placeholder-word-breaker.js b/web/src/engine/predictive-text/wordbreakers/test/test-placeholder-word-breaker.js
similarity index 100%
rename from common/models/wordbreakers/test/test-placeholder-word-breaker.js
rename to web/src/engine/predictive-text/wordbreakers/test/test-placeholder-word-breaker.js
diff --git a/common/models/wordbreakers/test/test-search-property.js b/web/src/engine/predictive-text/wordbreakers/test/test-search-property.js
similarity index 100%
rename from common/models/wordbreakers/test/test-search-property.js
rename to web/src/engine/predictive-text/wordbreakers/test/test-search-property.js
diff --git a/common/models/wordbreakers/tools/data-compiler/LICENSE b/web/src/engine/predictive-text/wordbreakers/tools/data-compiler/LICENSE
similarity index 100%
rename from common/models/wordbreakers/tools/data-compiler/LICENSE
rename to web/src/engine/predictive-text/wordbreakers/tools/data-compiler/LICENSE
diff --git a/common/models/wordbreakers/tools/data-compiler/index.ts b/web/src/engine/predictive-text/wordbreakers/tools/data-compiler/index.ts
similarity index 99%
rename from common/models/wordbreakers/tools/data-compiler/index.ts
rename to web/src/engine/predictive-text/wordbreakers/tools/data-compiler/index.ts
index 8f3c41bad37..15b07557041 100644
--- a/common/models/wordbreakers/tools/data-compiler/index.ts
+++ b/web/src/engine/predictive-text/wordbreakers/tools/data-compiler/index.ts
@@ -144,7 +144,7 @@ function escape(codedChar: string) {
// Generate the file!
stream.write(`// Automatically generated file. DO NOT MODIFY.
-// The generator script is defined at /common/models/wordbreakers/src/data-compiler/index.ts.
+// The generator script is defined at /web/src/engine/predictive-text/wordbreakers/src/data-compiler/index.ts.
/**
* Valid values for a word break property.
diff --git a/common/models/wordbreakers/tools/data-compiler/tsconfig.json b/web/src/engine/predictive-text/wordbreakers/tools/data-compiler/tsconfig.json
similarity index 100%
rename from common/models/wordbreakers/tools/data-compiler/tsconfig.json
rename to web/src/engine/predictive-text/wordbreakers/tools/data-compiler/tsconfig.json
diff --git a/common/models/wordbreakers/tsconfig.json b/web/src/engine/predictive-text/wordbreakers/tsconfig.json
similarity index 83%
rename from common/models/wordbreakers/tsconfig.json
rename to web/src/engine/predictive-text/wordbreakers/tsconfig.json
index 8bee2631fa4..b122825413f 100644
--- a/common/models/wordbreakers/tsconfig.json
+++ b/web/src/engine/predictive-text/wordbreakers/tsconfig.json
@@ -1,6 +1,5 @@
{
- "extends": "../tsconfig.kmw-worker-base.json",
-
+ "extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "./",
"outDir": "./build/main/obj",
diff --git a/web/src/engine/predictive-text/worker-main/unit_tests/test.sh b/web/src/engine/predictive-text/worker-main/unit_tests/test.sh
index 600e64b4d41..cd13f0cd3f9 100755
--- a/web/src/engine/predictive-text/worker-main/unit_tests/test.sh
+++ b/web/src/engine/predictive-text/worker-main/unit_tests/test.sh
@@ -48,8 +48,8 @@ if builder_start_action test:libraries; then
# So, for now, we add a text header to clarify what is running at each stage, in
# addition to fair bit of `pushd` and `popd`.
echo
- echo "### Running $(builder_term common/models/wordbreakers) tests"
- "$KEYMAN_ROOT/common/models/wordbreakers/build.sh" test $TEST_OPTS
+ echo "### Running $(builder_term web/src/engine/predictive-text/wordbreakers) tests"
+ "$KEYMAN_ROOT/web/src/engine/predictive-text/wordbreakers/build.sh" test $TEST_OPTS
pushd "$KEYMAN_ROOT/web/src/engine/predictive-text/templates/"
echo
diff --git a/web/src/engine/predictive-text/worker-thread/build.sh b/web/src/engine/predictive-text/worker-thread/build.sh
index 44afbfdc596..0ddd986630e 100755
--- a/web/src/engine/predictive-text/worker-thread/build.sh
+++ b/web/src/engine/predictive-text/worker-thread/build.sh
@@ -28,8 +28,8 @@ builder_describe \
"@/web/src/tools/building/sourcemap-root" \
"@/common/web/keyman-version" \
"@/common/web/es-bundling" \
- "@/common/models/wordbreakers" \
- "@/web/src/engine/predictive-text/templates/" \
+ "@../wordbreakers" \
+ "@../templates/" \
configure clean build test --ci
builder_describe_outputs \
diff --git a/web/src/engine/predictive-text/worker-thread/tsconfig.json b/web/src/engine/predictive-text/worker-thread/tsconfig.json
index 8621e5d8d54..f79c5f86975 100644
--- a/web/src/engine/predictive-text/worker-thread/tsconfig.json
+++ b/web/src/engine/predictive-text/worker-thread/tsconfig.json
@@ -24,7 +24,7 @@
{ "path": "../../../../../common/web/keyman-version" },
{ "path": "../../../../../common/web/utils" },
{ "path": "../templates" },
- { "path": "../../../../../common/models/wordbreakers" },
+ { "path": "../wordbreakers" },
],
"include": [
"src/main/**/*.ts"