@tilde-nlp/website-translator 8.2.0-beta.21 → 8.4.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
2
2
 
3
- /*! WTW version: v8.2.0-beta.21 */
3
+ /*! WTW version: v8.4.0-beta */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tilde-nlp/website-translator",
3
3
  "description": "Widget to integrate in to another website to translate it",
4
- "version": "8.2.0-beta.21",
4
+ "version": "8.4.0-beta",
5
5
  "main": "dist/widget.js",
6
6
  "directories": {
7
7
  "doc": "docs",
@@ -26,8 +26,8 @@
26
26
  ],
27
27
  "license": "Apache-2.0",
28
28
  "scripts": {
29
- "lint": "standardx --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin **/*.ts",
30
- "lint:fix": "standardx --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin **/*.ts --fix",
29
+ "lint": "standardx --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin index.ts src/**/*.ts",
30
+ "lint:fix": "standardx --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin index.ts src/**/*.ts --fix",
31
31
  "test": "jest --runInBand",
32
32
  "patch-version": "node auto_version_patch.js",
33
33
  "build:prod": "webpack --mode production",
@@ -42,6 +42,7 @@
42
42
  "ifdef-loader": "^2.3.2",
43
43
  "jest": "^27.5.1",
44
44
  "node-sass": "^7.0.1",
45
+ "sass": "^1.105.1",
45
46
  "sass-loader": "^12.6.0",
46
47
  "standardx": "^7.0.0",
47
48
  "style-loader": "^3.3.1",
@@ -56,6 +56,22 @@ export interface IPluginOptions{
56
56
  */
57
57
  mode: TranslationMode,
58
58
 
59
+ /**
60
+ * Inactivity window before dynamic content discovery completes in single-batch and word-count modes.
61
+ * The window restarts whenever another discovery pass runs.
62
+ * @default 5000
63
+ */
64
+ dynamicContentDiscoveryDelayMs?: number,
65
+
66
+ /**
67
+ * How the selected language is persisted in the page URL.
68
+ * push - update the lang query parameter and create a history entry (legacy default).
69
+ * replace - update the lang query parameter without creating a history entry.
70
+ * none - leave the host URL and links unchanged.
71
+ * @default push
72
+ */
73
+ languageUrlMode?: 'push' | 'replace' | 'none',
74
+
59
75
  targetLanguages:Array<string>
60
76
  /**
61
77
  * Translate only tags and their children which have [translate="yes"] attribute