diff --git a/package-lock.json b/package-lock.json index 43d47fd0..fadf6ef7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@d-i-t-a/reader", - "version": "2.4.4", + "version": "2.4.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@d-i-t-a/reader", - "version": "2.4.4", + "version": "2.4.5", "license": "Apache-2.0", "dependencies": { "@babel/plugin-proposal-private-property-in-object": "^7.21.11", @@ -50,8 +50,8 @@ "@types/rimraf": "^4.0.5", "@types/sanitize-html": "^2.9.0", "@types/uuid": "^9.0.4", - "@typescript-eslint/eslint-plugin": "^6.9.0", - "@typescript-eslint/parser": "^6.9.0", + "@typescript-eslint/eslint-plugin": "^7.0.1", + "@typescript-eslint/parser": "^7.0.1", "ansi-regex": ">=5.0.1", "babel-eslint": "^10.1.0", "braces": ">=3.0.2", @@ -5691,9 +5691,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.48", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.48.tgz", - "integrity": "sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==", + "version": "18.2.55", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.55.tgz", + "integrity": "sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA==", "dev": true, "dependencies": { "@types/prop-types": "*", @@ -5702,9 +5702,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.18", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.18.tgz", - "integrity": "sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==", + "version": "18.2.19", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz", + "integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==", "dev": true, "dependencies": { "@types/react": "*" @@ -5721,9 +5721,9 @@ } }, "node_modules/@types/sanitize-html": { - "version": "2.9.5", - "resolved": "https://registry.npmjs.org/@types/sanitize-html/-/sanitize-html-2.9.5.tgz", - "integrity": "sha512-2Sr1vd8Dw+ypsg/oDDfZ57OMSG2Befs+l2CMyCC5bVSK3CpE7lTB2aNlbbWzazgVA+Qqfuholwom6x/mWd1qmw==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@types/sanitize-html/-/sanitize-html-2.11.0.tgz", + "integrity": "sha512-7oxPGNQHXLHE48r/r/qjn7q0hlrs3kL7oZnGj0Wf/h9tj/6ibFyRkNbsDxaBBZ4XUZ0Dx5LGCyDJ04ytSofacQ==", "dev": true, "dependencies": { "htmlparser2": "^8.0.0" @@ -5777,9 +5777,9 @@ "dev": true }, "node_modules/@types/uuid": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", - "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", "dev": true }, "node_modules/@types/vinyl": { @@ -5793,16 +5793,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.20.0.tgz", - "integrity": "sha512-fTwGQUnjhoYHeSF6m5pWNkzmDDdsKELYrOBxhjMrofPqCkoC2k3B2wvGHFxa1CTIqkEn88nlW1HVMztjo2K8Hg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.1.tgz", + "integrity": "sha512-OLvgeBv3vXlnnJGIAgCLYKjgMEU+wBGj07MQ/nxAaON+3mLzX7mJbhRYrVGiVvFiXtwFlkcBa/TtmglHy0UbzQ==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.20.0", - "@typescript-eslint/type-utils": "6.20.0", - "@typescript-eslint/utils": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0", + "@typescript-eslint/scope-manager": "7.0.1", + "@typescript-eslint/type-utils": "7.0.1", + "@typescript-eslint/utils": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -5818,8 +5818,8 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -5828,13 +5828,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.20.0.tgz", - "integrity": "sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.1.tgz", + "integrity": "sha512-v7/T7As10g3bcWOOPAcbnMDuvctHzCFYCG/8R4bK4iYzdFqsZTbXGln0cZNVcwQcwewsYU2BJLay8j0/4zOk4w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0" + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -5845,9 +5845,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.20.0.tgz", - "integrity": "sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.1.tgz", + "integrity": "sha512-uJDfmirz4FHib6ENju/7cz9SdMSkeVvJDK3VcMFvf/hAShg8C74FW+06MaQPODHfDJp/z/zHfgawIJRjlu0RLg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -5858,13 +5858,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.20.0.tgz", - "integrity": "sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.1.tgz", + "integrity": "sha512-SO9wHb6ph0/FN5OJxH4MiPscGah5wjOd0RRpaLvuBv9g8565Fgu0uMySFEPqwPHiQU90yzJ2FjRYKGrAhS1xig==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -5886,17 +5886,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.20.0.tgz", - "integrity": "sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.0.1.tgz", + "integrity": "sha512-oe4his30JgPbnv+9Vef1h48jm0S6ft4mNwi9wj7bX10joGn07QRfqIqFHoMiajrtoU88cIhXf8ahwgrcbNLgPA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.20.0", - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/scope-manager": "7.0.1", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/typescript-estree": "7.0.1", "semver": "^7.5.4" }, "engines": { @@ -5907,16 +5907,16 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.20.0.tgz", - "integrity": "sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.1.tgz", + "integrity": "sha512-hwAgrOyk++RTXrP4KzCg7zB2U0xt7RUU0ZdMSCsqF3eKUwkdXUMyTb0qdCuji7VIbcpG62kKTU9M1J1c9UpFBw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/types": "7.0.1", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -6015,15 +6015,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.19.0.tgz", - "integrity": "sha512-1DyBLG5SH7PYCd00QlroiW60YJ4rWMuUGa/JBV0iZuqi4l4IK3twKPq5ZkEebmGqRjXWVgsUzfd3+nZveewgow==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.0.1.tgz", + "integrity": "sha512-8GcRRZNzaHxKzBPU3tKtFNing571/GwPBeCvmAUw0yBtfE2XVd0zFKJIMSWkHJcPQi0ekxjIts6L/rrZq5cxGQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.19.0", - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/typescript-estree": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0", + "@typescript-eslint/scope-manager": "7.0.1", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/typescript-estree": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1", "debug": "^4.3.4" }, "engines": { @@ -6034,7 +6034,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -6043,13 +6043,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.19.0.tgz", - "integrity": "sha512-dO1XMhV2ehBI6QN8Ufi7I10wmUovmLU0Oru3n5LVlM2JuzB4M+dVphCPLkVpKvGij2j/pHBWuJ9piuXx+BhzxQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.1.tgz", + "integrity": "sha512-v7/T7As10g3bcWOOPAcbnMDuvctHzCFYCG/8R4bK4iYzdFqsZTbXGln0cZNVcwQcwewsYU2BJLay8j0/4zOk4w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0" + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -6060,9 +6060,9 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.19.0.tgz", - "integrity": "sha512-lFviGV/vYhOy3m8BJ/nAKoAyNhInTdXpftonhWle66XHAtT1ouBlkjL496b5H5hb8dWXHwtypTqgtb/DEa+j5A==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.1.tgz", + "integrity": "sha512-uJDfmirz4FHib6ENju/7cz9SdMSkeVvJDK3VcMFvf/hAShg8C74FW+06MaQPODHfDJp/z/zHfgawIJRjlu0RLg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -6073,13 +6073,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.19.0.tgz", - "integrity": "sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.1.tgz", + "integrity": "sha512-SO9wHb6ph0/FN5OJxH4MiPscGah5wjOd0RRpaLvuBv9g8565Fgu0uMySFEPqwPHiQU90yzJ2FjRYKGrAhS1xig==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -6101,12 +6101,12 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.19.0.tgz", - "integrity": "sha512-hZaUCORLgubBvtGpp1JEFEazcuEdfxta9j4iUwdSAr7mEsYYAp3EAUyCZk3VEEqGj6W+AV4uWyrDGtrlawAsgQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.1.tgz", + "integrity": "sha512-hwAgrOyk++RTXrP4KzCg7zB2U0xt7RUU0ZdMSCsqF3eKUwkdXUMyTb0qdCuji7VIbcpG62kKTU9M1J1c9UpFBw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.19.0", + "@typescript-eslint/types": "7.0.1", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -6203,13 +6203,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.20.0.tgz", - "integrity": "sha512-qnSobiJQb1F5JjN0YDRPHruQTrX7ICsmltXhkV536mp4idGAYrIyr47zF/JmkJtEcAVnIz4gUYJ7gOZa6SmN4g==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.0.1.tgz", + "integrity": "sha512-YtT9UcstTG5Yqy4xtLiClm1ZpM/pWVGFnkAa90UfdkkZsR1eP2mR/1jbHeYp8Ay1l1JHPyGvoUYR6o3On5Nhmw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.20.0", - "@typescript-eslint/utils": "6.20.0", + "@typescript-eslint/typescript-estree": "7.0.1", + "@typescript-eslint/utils": "7.0.1", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -6221,7 +6221,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -6230,13 +6230,13 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/scope-manager": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.20.0.tgz", - "integrity": "sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.1.tgz", + "integrity": "sha512-v7/T7As10g3bcWOOPAcbnMDuvctHzCFYCG/8R4bK4iYzdFqsZTbXGln0cZNVcwQcwewsYU2BJLay8j0/4zOk4w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0" + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -6247,9 +6247,9 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.20.0.tgz", - "integrity": "sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.1.tgz", + "integrity": "sha512-uJDfmirz4FHib6ENju/7cz9SdMSkeVvJDK3VcMFvf/hAShg8C74FW+06MaQPODHfDJp/z/zHfgawIJRjlu0RLg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -6260,13 +6260,13 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.20.0.tgz", - "integrity": "sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.1.tgz", + "integrity": "sha512-SO9wHb6ph0/FN5OJxH4MiPscGah5wjOd0RRpaLvuBv9g8565Fgu0uMySFEPqwPHiQU90yzJ2FjRYKGrAhS1xig==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -6288,17 +6288,17 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.20.0.tgz", - "integrity": "sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.0.1.tgz", + "integrity": "sha512-oe4his30JgPbnv+9Vef1h48jm0S6ft4mNwi9wj7bX10joGn07QRfqIqFHoMiajrtoU88cIhXf8ahwgrcbNLgPA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.20.0", - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/scope-manager": "7.0.1", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/typescript-estree": "7.0.1", "semver": "^7.5.4" }, "engines": { @@ -6309,16 +6309,16 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.20.0.tgz", - "integrity": "sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.1.tgz", + "integrity": "sha512-hwAgrOyk++RTXrP4KzCg7zB2U0xt7RUU0ZdMSCsqF3eKUwkdXUMyTb0qdCuji7VIbcpG62kKTU9M1J1c9UpFBw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/types": "7.0.1", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -7743,15 +7743,9 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -7764,6 +7758,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -10853,9 +10850,9 @@ } }, "node_modules/image-size": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.2.tgz", - "integrity": "sha512-xfOoWjceHntRb3qFCrh5ZFORYH8XCdYpASltMhZ/Q0KZiOwjdE/Yl2QCiWdwD+lygV5bMCvauzgu5PxBX/Yerg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.1.1.tgz", + "integrity": "sha512-541xKlUw6jr/6gGuk92F+mYM5zaFAc5ahphvkqvNe2bQ6gVBkd6bfrmVJ2t4KDAfikAYZyIqTnktX3i6/aQDrQ==", "dependencies": { "queue": "6.0.2" }, @@ -10863,7 +10860,7 @@ "image-size": "bin/image-size.js" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.x" } }, "node_modules/immutable": { @@ -12162,9 +12159,9 @@ } }, "node_modules/loglevel": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz", - "integrity": "sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", + "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==", "engines": { "node": ">= 0.6.0" }, @@ -12402,9 +12399,9 @@ } }, "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.3.0.tgz", + "integrity": "sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==", "dev": true, "dependencies": { "ansi-colors": "4.1.1", @@ -12414,13 +12411,12 @@ "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.2.0", + "glob": "8.1.0", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.3", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", @@ -12435,10 +12431,33 @@ }, "engines": { "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, "node_modules/mocha/node_modules/debug": { @@ -12465,35 +12484,55 @@ "dev": true }, "node_modules/mocha/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mocha/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/mocha/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "is-glob": "^4.0.1" }, "engines": { - "node": "*" + "node": ">= 6" + } + }, + "node_modules/mocha/node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mocha/node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" } }, "node_modules/mocha/node_modules/minimatch": { @@ -12611,18 +12650,6 @@ "node-gyp-build-optional-packages-test": "build-test.js" } }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -13608,9 +13635,9 @@ } }, "node_modules/prettier": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz", - "integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -13766,24 +13793,23 @@ ] }, "node_modules/r2-lcp-js": { - "version": "1.0.38", - "resolved": "https://registry.npmjs.org/r2-lcp-js/-/r2-lcp-js-1.0.38.tgz", - "integrity": "sha512-4BQs02LQBgD82QjVVEIX+zDIwozsAOg5e78AKQ9tsiqqxQMWbrIKhtqCpIvwkbh7WNBqPaWqoEKyV2fRdpzzOA==", + "version": "1.0.39", + "resolved": "https://registry.npmjs.org/r2-lcp-js/-/r2-lcp-js-1.0.39.tgz", + "integrity": "sha512-M4m1kBdMAYrHnDIGjBoxwDI+uKqbn/CEy4r2+D0Pca7OoMcHq1DQq1IF/bNnr/Ko6xyNyejaLTDgrr/pVbmEUA==", "dependencies": { "bindings": "^1.5.0", "debug": "^4.3.4", - "moment": "^2.29.4", - "r2-utils-js": "^1.0.35", + "moment": "^2.30.1", + "r2-utils-js": "^1.0.38", "request": "^2.88.2", "request-promise-native": "^1.0.9", "ta-json-x": "^2.5.3", - "tslib": "^2.6.0", + "tslib": "^2.6.2", "urijs": "^1.19.11" }, "engines": { - "node": ">=16", - "npm": ">=6", - "yarn": ">=1.0" + "node": ">=18.0.0", + "npm": ">=9.0.0" } }, "node_modules/r2-lcp-js/node_modules/debug": { @@ -13861,31 +13887,32 @@ "dev": true }, "node_modules/r2-shared-js": { - "version": "1.0.70", - "resolved": "https://registry.npmjs.org/r2-shared-js/-/r2-shared-js-1.0.70.tgz", - "integrity": "sha512-ZvhYyhaJB6VsuURkEbd613szVZm2eGAcsx9883yQ9X5XZpB1KblZEPbT0W8m85syjdryCn2vO9HH88Drd4G83A==", + "version": "1.0.71", + "resolved": "https://registry.npmjs.org/r2-shared-js/-/r2-shared-js-1.0.71.tgz", + "integrity": "sha512-+K69n7Sfq22Go0+i3I+ThRQBcs+0+ZdxIv7UwnI3cH5rhFp9QDDhAd+VduFkIU0Twm4/u4v+1SefJhq82HeIvg==", + "hasInstallScript": true, "dependencies": { "@xmldom/xmldom": "^0.8.10", "debug": "^4.3.4", "fast-deep-equal": "^3.1.3", "he": "^1.2.0", - "image-size": "^1.0.2", + "image-size": "^1.1.1", "mime-types": "^2.1.35", - "moment": "^2.29.4", - "r2-lcp-js": "^1.0.38", - "r2-utils-js": "^1.0.35", + "moment": "^2.30.1", + "r2-lcp-js": "^1.0.39", + "r2-utils-js": "^1.0.38", "slugify": "^1.6.6", "ta-json-x": "^2.5.3", - "tslib": "^2.6.1", - "xpath": "^0.0.32", + "tslib": "^2.6.2", + "xpath": "^0.0.34", "yazl": "^2.5.1" }, "bin": { "r2-shared-js-cli": "dist/es8-es2017/src/_utils/cli.js" }, "engines": { - "node": ">=16", - "npm": ">=8" + "node": ">=18.0.0", + "npm": ">=9.0.0" } }, "node_modules/r2-shared-js/node_modules/debug": { @@ -13915,27 +13942,26 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/r2-utils-js": { - "version": "1.0.35", - "resolved": "https://registry.npmjs.org/r2-utils-js/-/r2-utils-js-1.0.35.tgz", - "integrity": "sha512-e4y2MtmEUKqsnOB4HNfJPIRytydgwRdAfRSlZX68+8K0lQFLK7QEC3Ezx4wbLsYKCjmrTm2+5pwWowU47T6YMQ==", + "version": "1.0.38", + "resolved": "https://registry.npmjs.org/r2-utils-js/-/r2-utils-js-1.0.38.tgz", + "integrity": "sha512-86oAFe7vAM1VDI0jSx6bdabMDa1H5stYAGjh4Zo2g8+FK3eysW06pMVNN9q/EQt8oQMFimlwv2qDQgy8drpAfg==", "dependencies": { "debug": "^4.3.4", "filehound": "^1.17.6", "node-stream-zip": "^1.15.0", - "reflect-metadata": "^0.1.13", + "reflect-metadata": "^0.2.1", "request": "^2.88.2", "request-promise-native": "^1.0.9", "ta-json-x": "^2.5.3", - "tslib": "^2.6.0", + "tslib": "^2.6.2", "unzipper": "^0.10.14", - "xpath": "^0.0.32", + "xpath": "^0.0.34", "yauzl": "^2.10.0", "yazl": "^2.5.1" }, "engines": { - "node": ">=16", - "npm": ">=6", - "yarn": ">=1.0" + "node": ">=18.0.0", + "npm": ">=9.0.0" } }, "node_modules/r2-utils-js/node_modules/debug": { @@ -13959,6 +13985,11 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node_modules/r2-utils-js/node_modules/reflect-metadata": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.1.tgz", + "integrity": "sha512-i5lLI6iw9AU3Uu4szRNPPEkomnkjRTaVt9hy/bn5g/oSzekBSMeLZblcjP74AW0vBabqERLLIrz+gR8QYR54Tw==" + }, "node_modules/r2-utils-js/node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", @@ -15521,12 +15552,12 @@ } }, "node_modules/ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.1.tgz", + "integrity": "sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==", "dev": true, "engines": { - "node": ">=16.13.0" + "node": ">=16" }, "peerDependencies": { "typescript": ">=4.2.0" @@ -15795,9 +15826,9 @@ } }, "node_modules/typedoc": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.7.tgz", - "integrity": "sha512-m6A6JjQRg39p2ZVRIN3NKXgrN8vzlHhOS+r9ymUYtcUP/TIQPvWSq7YgE5ZjASfv5Vd5BW5xrir6Gm2XNNcOow==", + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.8.tgz", + "integrity": "sha512-mh8oLW66nwmeB9uTa0Bdcjfis+48bAjSH3uqdzSuSawfduROQLlXw//WSNZLYDdhmMVB7YcYZicq6e8T0d271A==", "dev": true, "dependencies": { "lunr": "^2.3.9", @@ -16422,9 +16453,9 @@ } }, "node_modules/xpath": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz", - "integrity": "sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw==", + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.34.tgz", + "integrity": "sha512-FxF6+rkr1rNSQrhUNYrAFJpRXNzlDoMxeXN5qI84939ylEv3qqPFKa85Oxr6tDaJKqwW6KKyo2v26TSv3k6LeA==", "engines": { "node": ">=0.6.0" } @@ -20210,9 +20241,9 @@ "dev": true }, "@types/react": { - "version": "18.2.48", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.48.tgz", - "integrity": "sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==", + "version": "18.2.55", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.55.tgz", + "integrity": "sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA==", "dev": true, "requires": { "@types/prop-types": "*", @@ -20221,9 +20252,9 @@ } }, "@types/react-dom": { - "version": "18.2.18", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.18.tgz", - "integrity": "sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==", + "version": "18.2.19", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz", + "integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==", "dev": true, "requires": { "@types/react": "*" @@ -20239,9 +20270,9 @@ } }, "@types/sanitize-html": { - "version": "2.9.5", - "resolved": "https://registry.npmjs.org/@types/sanitize-html/-/sanitize-html-2.9.5.tgz", - "integrity": "sha512-2Sr1vd8Dw+ypsg/oDDfZ57OMSG2Befs+l2CMyCC5bVSK3CpE7lTB2aNlbbWzazgVA+Qqfuholwom6x/mWd1qmw==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@types/sanitize-html/-/sanitize-html-2.11.0.tgz", + "integrity": "sha512-7oxPGNQHXLHE48r/r/qjn7q0hlrs3kL7oZnGj0Wf/h9tj/6ibFyRkNbsDxaBBZ4XUZ0Dx5LGCyDJ04ytSofacQ==", "dev": true, "requires": { "htmlparser2": "^8.0.0" @@ -20294,9 +20325,9 @@ "dev": true }, "@types/uuid": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", - "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", "dev": true }, "@types/vinyl": { @@ -20310,16 +20341,16 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.20.0.tgz", - "integrity": "sha512-fTwGQUnjhoYHeSF6m5pWNkzmDDdsKELYrOBxhjMrofPqCkoC2k3B2wvGHFxa1CTIqkEn88nlW1HVMztjo2K8Hg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.1.tgz", + "integrity": "sha512-OLvgeBv3vXlnnJGIAgCLYKjgMEU+wBGj07MQ/nxAaON+3mLzX7mJbhRYrVGiVvFiXtwFlkcBa/TtmglHy0UbzQ==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.20.0", - "@typescript-eslint/type-utils": "6.20.0", - "@typescript-eslint/utils": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0", + "@typescript-eslint/scope-manager": "7.0.1", + "@typescript-eslint/type-utils": "7.0.1", + "@typescript-eslint/utils": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -20329,29 +20360,29 @@ }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.20.0.tgz", - "integrity": "sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.1.tgz", + "integrity": "sha512-v7/T7As10g3bcWOOPAcbnMDuvctHzCFYCG/8R4bK4iYzdFqsZTbXGln0cZNVcwQcwewsYU2BJLay8j0/4zOk4w==", "dev": true, "requires": { - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0" + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1" } }, "@typescript-eslint/types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.20.0.tgz", - "integrity": "sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.1.tgz", + "integrity": "sha512-uJDfmirz4FHib6ENju/7cz9SdMSkeVvJDK3VcMFvf/hAShg8C74FW+06MaQPODHfDJp/z/zHfgawIJRjlu0RLg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.20.0.tgz", - "integrity": "sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.1.tgz", + "integrity": "sha512-SO9wHb6ph0/FN5OJxH4MiPscGah5wjOd0RRpaLvuBv9g8565Fgu0uMySFEPqwPHiQU90yzJ2FjRYKGrAhS1xig==", "dev": true, "requires": { - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -20361,27 +20392,27 @@ } }, "@typescript-eslint/utils": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.20.0.tgz", - "integrity": "sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.0.1.tgz", + "integrity": "sha512-oe4his30JgPbnv+9Vef1h48jm0S6ft4mNwi9wj7bX10joGn07QRfqIqFHoMiajrtoU88cIhXf8ahwgrcbNLgPA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.20.0", - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/scope-manager": "7.0.1", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/typescript-estree": "7.0.1", "semver": "^7.5.4" } }, "@typescript-eslint/visitor-keys": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.20.0.tgz", - "integrity": "sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.1.tgz", + "integrity": "sha512-hwAgrOyk++RTXrP4KzCg7zB2U0xt7RUU0ZdMSCsqF3eKUwkdXUMyTb0qdCuji7VIbcpG62kKTU9M1J1c9UpFBw==", "dev": true, "requires": { - "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/types": "7.0.1", "eslint-visitor-keys": "^3.4.1" } }, @@ -20445,42 +20476,42 @@ } }, "@typescript-eslint/parser": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.19.0.tgz", - "integrity": "sha512-1DyBLG5SH7PYCd00QlroiW60YJ4rWMuUGa/JBV0iZuqi4l4IK3twKPq5ZkEebmGqRjXWVgsUzfd3+nZveewgow==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.0.1.tgz", + "integrity": "sha512-8GcRRZNzaHxKzBPU3tKtFNing571/GwPBeCvmAUw0yBtfE2XVd0zFKJIMSWkHJcPQi0ekxjIts6L/rrZq5cxGQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "6.19.0", - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/typescript-estree": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0", + "@typescript-eslint/scope-manager": "7.0.1", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/typescript-estree": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1", "debug": "^4.3.4" }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.19.0.tgz", - "integrity": "sha512-dO1XMhV2ehBI6QN8Ufi7I10wmUovmLU0Oru3n5LVlM2JuzB4M+dVphCPLkVpKvGij2j/pHBWuJ9piuXx+BhzxQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.1.tgz", + "integrity": "sha512-v7/T7As10g3bcWOOPAcbnMDuvctHzCFYCG/8R4bK4iYzdFqsZTbXGln0cZNVcwQcwewsYU2BJLay8j0/4zOk4w==", "dev": true, "requires": { - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0" + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1" } }, "@typescript-eslint/types": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.19.0.tgz", - "integrity": "sha512-lFviGV/vYhOy3m8BJ/nAKoAyNhInTdXpftonhWle66XHAtT1ouBlkjL496b5H5hb8dWXHwtypTqgtb/DEa+j5A==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.1.tgz", + "integrity": "sha512-uJDfmirz4FHib6ENju/7cz9SdMSkeVvJDK3VcMFvf/hAShg8C74FW+06MaQPODHfDJp/z/zHfgawIJRjlu0RLg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.19.0.tgz", - "integrity": "sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.1.tgz", + "integrity": "sha512-SO9wHb6ph0/FN5OJxH4MiPscGah5wjOd0RRpaLvuBv9g8565Fgu0uMySFEPqwPHiQU90yzJ2FjRYKGrAhS1xig==", "dev": true, "requires": { - "@typescript-eslint/types": "6.19.0", - "@typescript-eslint/visitor-keys": "6.19.0", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -20490,12 +20521,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.19.0.tgz", - "integrity": "sha512-hZaUCORLgubBvtGpp1JEFEazcuEdfxta9j4iUwdSAr7mEsYYAp3EAUyCZk3VEEqGj6W+AV4uWyrDGtrlawAsgQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.1.tgz", + "integrity": "sha512-hwAgrOyk++RTXrP4KzCg7zB2U0xt7RUU0ZdMSCsqF3eKUwkdXUMyTb0qdCuji7VIbcpG62kKTU9M1J1c9UpFBw==", "dev": true, "requires": { - "@typescript-eslint/types": "6.19.0", + "@typescript-eslint/types": "7.0.1", "eslint-visitor-keys": "^3.4.1" } }, @@ -20560,41 +20591,41 @@ } }, "@typescript-eslint/type-utils": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.20.0.tgz", - "integrity": "sha512-qnSobiJQb1F5JjN0YDRPHruQTrX7ICsmltXhkV536mp4idGAYrIyr47zF/JmkJtEcAVnIz4gUYJ7gOZa6SmN4g==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.0.1.tgz", + "integrity": "sha512-YtT9UcstTG5Yqy4xtLiClm1ZpM/pWVGFnkAa90UfdkkZsR1eP2mR/1jbHeYp8Ay1l1JHPyGvoUYR6o3On5Nhmw==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "6.20.0", - "@typescript-eslint/utils": "6.20.0", + "@typescript-eslint/typescript-estree": "7.0.1", + "@typescript-eslint/utils": "7.0.1", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.20.0.tgz", - "integrity": "sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.1.tgz", + "integrity": "sha512-v7/T7As10g3bcWOOPAcbnMDuvctHzCFYCG/8R4bK4iYzdFqsZTbXGln0cZNVcwQcwewsYU2BJLay8j0/4zOk4w==", "dev": true, "requires": { - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0" + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1" } }, "@typescript-eslint/types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.20.0.tgz", - "integrity": "sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.1.tgz", + "integrity": "sha512-uJDfmirz4FHib6ENju/7cz9SdMSkeVvJDK3VcMFvf/hAShg8C74FW+06MaQPODHfDJp/z/zHfgawIJRjlu0RLg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.20.0.tgz", - "integrity": "sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.1.tgz", + "integrity": "sha512-SO9wHb6ph0/FN5OJxH4MiPscGah5wjOd0RRpaLvuBv9g8565Fgu0uMySFEPqwPHiQU90yzJ2FjRYKGrAhS1xig==", "dev": true, "requires": { - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/visitor-keys": "6.20.0", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -20604,27 +20635,27 @@ } }, "@typescript-eslint/utils": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.20.0.tgz", - "integrity": "sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.0.1.tgz", + "integrity": "sha512-oe4his30JgPbnv+9Vef1h48jm0S6ft4mNwi9wj7bX10joGn07QRfqIqFHoMiajrtoU88cIhXf8ahwgrcbNLgPA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.20.0", - "@typescript-eslint/types": "6.20.0", - "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/scope-manager": "7.0.1", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/typescript-estree": "7.0.1", "semver": "^7.5.4" } }, "@typescript-eslint/visitor-keys": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.20.0.tgz", - "integrity": "sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.1.tgz", + "integrity": "sha512-hwAgrOyk++RTXrP4KzCg7zB2U0xt7RUU0ZdMSCsqF3eKUwkdXUMyTb0qdCuji7VIbcpG62kKTU9M1J1c9UpFBw==", "dev": true, "requires": { - "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/types": "7.0.1", "eslint-visitor-keys": "^3.4.1" } }, @@ -21693,9 +21724,9 @@ "dev": true }, "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "requires": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -23998,9 +24029,9 @@ "dev": true }, "image-size": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.2.tgz", - "integrity": "sha512-xfOoWjceHntRb3qFCrh5ZFORYH8XCdYpASltMhZ/Q0KZiOwjdE/Yl2QCiWdwD+lygV5bMCvauzgu5PxBX/Yerg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.1.1.tgz", + "integrity": "sha512-541xKlUw6jr/6gGuk92F+mYM5zaFAc5ahphvkqvNe2bQ6gVBkd6bfrmVJ2t4KDAfikAYZyIqTnktX3i6/aQDrQ==", "requires": { "queue": "6.0.2" } @@ -24898,9 +24929,9 @@ } }, "loglevel": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz", - "integrity": "sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==" + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", + "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==" }, "loose-envify": { "version": "1.4.0", @@ -25077,9 +25108,9 @@ } }, "mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.3.0.tgz", + "integrity": "sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==", "dev": true, "requires": { "ansi-colors": "4.1.1", @@ -25089,13 +25120,12 @@ "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.2.0", + "glob": "8.1.0", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.3", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", @@ -25105,6 +25135,22 @@ "yargs-unparser": "2.0.0" }, "dependencies": { + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -25123,28 +25169,40 @@ } }, "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" } }, "minimatch": { @@ -25242,12 +25300,6 @@ } } }, - "nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -25977,9 +26029,9 @@ "dev": true }, "prettier": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz", - "integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true }, "prettier-linter-helpers": { @@ -26094,18 +26146,18 @@ "dev": true }, "r2-lcp-js": { - "version": "1.0.38", - "resolved": "https://registry.npmjs.org/r2-lcp-js/-/r2-lcp-js-1.0.38.tgz", - "integrity": "sha512-4BQs02LQBgD82QjVVEIX+zDIwozsAOg5e78AKQ9tsiqqxQMWbrIKhtqCpIvwkbh7WNBqPaWqoEKyV2fRdpzzOA==", + "version": "1.0.39", + "resolved": "https://registry.npmjs.org/r2-lcp-js/-/r2-lcp-js-1.0.39.tgz", + "integrity": "sha512-M4m1kBdMAYrHnDIGjBoxwDI+uKqbn/CEy4r2+D0Pca7OoMcHq1DQq1IF/bNnr/Ko6xyNyejaLTDgrr/pVbmEUA==", "requires": { "bindings": "^1.5.0", "debug": "^4.3.4", - "moment": "^2.29.4", - "r2-utils-js": "^1.0.35", + "moment": "^2.30.1", + "r2-utils-js": "^1.0.38", "request": "^2.88.2", "request-promise-native": "^1.0.9", "ta-json-x": "^2.5.3", - "tslib": "^2.6.0", + "tslib": "^2.6.2", "urijs": "^1.19.11" }, "dependencies": { @@ -26168,23 +26220,23 @@ } }, "r2-shared-js": { - "version": "1.0.70", - "resolved": "https://registry.npmjs.org/r2-shared-js/-/r2-shared-js-1.0.70.tgz", - "integrity": "sha512-ZvhYyhaJB6VsuURkEbd613szVZm2eGAcsx9883yQ9X5XZpB1KblZEPbT0W8m85syjdryCn2vO9HH88Drd4G83A==", + "version": "1.0.71", + "resolved": "https://registry.npmjs.org/r2-shared-js/-/r2-shared-js-1.0.71.tgz", + "integrity": "sha512-+K69n7Sfq22Go0+i3I+ThRQBcs+0+ZdxIv7UwnI3cH5rhFp9QDDhAd+VduFkIU0Twm4/u4v+1SefJhq82HeIvg==", "requires": { "@xmldom/xmldom": "^0.8.10", "debug": "^4.3.4", "fast-deep-equal": "^3.1.3", "he": "^1.2.0", - "image-size": "^1.0.2", + "image-size": "^1.1.1", "mime-types": "^2.1.35", - "moment": "^2.29.4", - "r2-lcp-js": "^1.0.38", - "r2-utils-js": "^1.0.35", + "moment": "^2.30.1", + "r2-lcp-js": "^1.0.39", + "r2-utils-js": "^1.0.38", "slugify": "^1.6.6", "ta-json-x": "^2.5.3", - "tslib": "^2.6.1", - "xpath": "^0.0.32", + "tslib": "^2.6.2", + "xpath": "^0.0.34", "yazl": "^2.5.1" }, "dependencies": { @@ -26209,20 +26261,20 @@ } }, "r2-utils-js": { - "version": "1.0.35", - "resolved": "https://registry.npmjs.org/r2-utils-js/-/r2-utils-js-1.0.35.tgz", - "integrity": "sha512-e4y2MtmEUKqsnOB4HNfJPIRytydgwRdAfRSlZX68+8K0lQFLK7QEC3Ezx4wbLsYKCjmrTm2+5pwWowU47T6YMQ==", + "version": "1.0.38", + "resolved": "https://registry.npmjs.org/r2-utils-js/-/r2-utils-js-1.0.38.tgz", + "integrity": "sha512-86oAFe7vAM1VDI0jSx6bdabMDa1H5stYAGjh4Zo2g8+FK3eysW06pMVNN9q/EQt8oQMFimlwv2qDQgy8drpAfg==", "requires": { "debug": "^4.3.4", "filehound": "^1.17.6", "node-stream-zip": "^1.15.0", - "reflect-metadata": "^0.1.13", + "reflect-metadata": "^0.2.1", "request": "^2.88.2", "request-promise-native": "^1.0.9", "ta-json-x": "^2.5.3", - "tslib": "^2.6.0", + "tslib": "^2.6.2", "unzipper": "^0.10.14", - "xpath": "^0.0.32", + "xpath": "^0.0.34", "yauzl": "^2.10.0", "yazl": "^2.5.1" }, @@ -26240,6 +26292,11 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "reflect-metadata": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.1.tgz", + "integrity": "sha512-i5lLI6iw9AU3Uu4szRNPPEkomnkjRTaVt9hy/bn5g/oSzekBSMeLZblcjP74AW0vBabqERLLIrz+gR8QYR54Tw==" + }, "tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", @@ -27428,9 +27485,9 @@ "integrity": "sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==" }, "ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.1.tgz", + "integrity": "sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==", "dev": true, "requires": {} }, @@ -27620,9 +27677,9 @@ } }, "typedoc": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.7.tgz", - "integrity": "sha512-m6A6JjQRg39p2ZVRIN3NKXgrN8vzlHhOS+r9ymUYtcUP/TIQPvWSq7YgE5ZjASfv5Vd5BW5xrir6Gm2XNNcOow==", + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.8.tgz", + "integrity": "sha512-mh8oLW66nwmeB9uTa0Bdcjfis+48bAjSH3uqdzSuSawfduROQLlXw//WSNZLYDdhmMVB7YcYZicq6e8T0d271A==", "dev": true, "requires": { "lunr": "^2.3.9", @@ -28073,9 +28130,9 @@ "dev": true }, "xpath": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz", - "integrity": "sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw==" + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.34.tgz", + "integrity": "sha512-FxF6+rkr1rNSQrhUNYrAFJpRXNzlDoMxeXN5qI84939ylEv3qqPFKa85Oxr6tDaJKqwW6KKyo2v26TSv3k6LeA==" }, "xtend": { "version": "4.0.2", diff --git a/package.json b/package.json index 2228f758..742e4545 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@d-i-t-a/reader", - "version": "2.4.4", + "version": "2.4.5", "description": "A viewer application for EPUB files.", "repository": "https://github.com/d-i-t-a/R2D2BC", "license": "Apache-2.0", @@ -77,8 +77,8 @@ "@types/rimraf": "^4.0.5", "@types/sanitize-html": "^2.9.0", "@types/uuid": "^9.0.4", - "@typescript-eslint/eslint-plugin": "^6.9.0", - "@typescript-eslint/parser": "^6.9.0", + "@typescript-eslint/eslint-plugin": "^7.0.1", + "@typescript-eslint/parser": "^7.0.1", "ansi-regex": ">=5.0.1", "babel-eslint": "^10.1.0", "braces": ">=3.0.2", @@ -141,5 +141,8 @@ "semi": true, "singleQuote": false, "trailingComma": "es5" + }, + "@parcel/resolver-default": { + "packageExports": true } } diff --git a/src/model/user-settings/ReadiumCSS.ts b/src/model/user-settings/ReadiumCSS.ts index d66fb34b..15e2a3e2 100644 --- a/src/model/user-settings/ReadiumCSS.ts +++ b/src/model/user-settings/ReadiumCSS.ts @@ -26,6 +26,7 @@ export class ReadiumCSS { // static readonly PUBLISHER_DEFAULT_REF = "advancedSettings"; static readonly TEXT_ALIGNMENT_REF = "textAlign"; static readonly COLUMN_COUNT_REF = "colCount"; + static readonly DIRECTION_REF = "direction"; static readonly WORD_SPACING_REF = "wordSpacing"; static readonly LETTER_SPACING_REF = "letterSpacing"; static readonly PAGE_MARGINS_REF = "pageMargins"; @@ -41,6 +42,7 @@ export class ReadiumCSS { static readonly TEXT_ALIGNMENT_KEY = "--USER__" + ReadiumCSS.TEXT_ALIGNMENT_REF; static readonly COLUMN_COUNT_KEY = "--USER__" + ReadiumCSS.COLUMN_COUNT_REF; + static readonly DIRECTION_KEY = "--USER__" + ReadiumCSS.DIRECTION_REF; static readonly WORD_SPACING_KEY = "--USER__" + ReadiumCSS.WORD_SPACING_REF; static readonly LETTER_SPACING_KEY = "--USER__" + ReadiumCSS.LETTER_SPACING_REF; diff --git a/src/model/user-settings/UserSettings.ts b/src/model/user-settings/UserSettings.ts index e59d2e16..5468f406 100644 --- a/src/model/user-settings/UserSettings.ts +++ b/src/model/user-settings/UserSettings.ts @@ -73,6 +73,7 @@ export interface IUserSettings { // publisherDefaults: boolean; textAlignment: number; columnCount: number; + direction: number; wordSpacing: number; letterSpacing: number; pageMargins: number; @@ -100,6 +101,7 @@ export interface InitialUserSettings { // publisherDefaults?: boolean | "readium-advanced-on" | "readium-advanced-off"; textAlignment: number; columnCount: number; + direction: string; wordSpacing: number; letterSpacing: number; pageMargins: number; @@ -130,6 +132,7 @@ export class UserSettings implements IUserSettings { private static fontFamilyValues = ["Original", "serif", "sans-serif"]; private static readonly textAlignmentValues = ["auto", "justify", "start"]; private static readonly columnCountValues = ["auto", "1", "2"]; + private static readonly directionValues = ["auto", "ltr", "rtl"]; fontSize = 100.0; fontOverride = false; @@ -141,6 +144,7 @@ export class UserSettings implements IUserSettings { // publisherDefaults = true; textAlignment = 0; columnCount = 0; + direction = 0; wordSpacing = 0.0; letterSpacing = 0.0; pageMargins = 2.0; @@ -248,6 +252,17 @@ export class UserSettings implements IUserSettings { } log.log(settings.columnCount); } + if (initialUserSettings.direction) { + settings.direction = UserSettings.directionValues.findIndex( + (el: any) => el === initialUserSettings.direction + ); + let prop = settings.userProperties.getByRef(ReadiumCSS.DIRECTION_REF); + if (prop) { + prop.value = settings.direction; + await settings.saveProperty(prop); + } + log.log(settings.direction); + } if (initialUserSettings.wordSpacing) { settings.wordSpacing = initialUserSettings.wordSpacing; let prop = settings.userProperties.getByRef( @@ -363,6 +378,10 @@ export class UserSettings implements IUserSettings { "columnCount", ReadiumCSS.COLUMN_COUNT_KEY ); + this.direction = await this.getPropertyAndFallback( + "direction", + ReadiumCSS.DIRECTION_KEY + ); this.fontSize = await this.getPropertyAndFallback( "fontSize", @@ -399,6 +418,7 @@ export class UserSettings implements IUserSettings { // this.publisherDefaults = true; this.textAlignment = 0; this.columnCount = 0; + this.direction = 0; this.wordSpacing = 0.0; this.letterSpacing = 0.0; this.pageMargins = 2.0; @@ -413,8 +433,10 @@ export class UserSettings implements IUserSettings { "html" ) as HTMLHtmlElement; if (html) { - const rootElement = document.documentElement; - const body = HTMLUtilities.findRequiredElement(rootElement, "body"); + const rootElement = + HTMLUtilities.findElement(document, "#root") || + document.documentElement; + const body = HTMLUtilities.findElement(html, "body"); // // Apply publishers default // html.style.removeProperty(ReadiumCSS.PUBLISHER_DEFAULT_KEY); @@ -426,6 +448,8 @@ export class UserSettings implements IUserSettings { html.style.removeProperty(ReadiumCSS.LETTER_SPACING_KEY); // Apply column count html.style.removeProperty(ReadiumCSS.COLUMN_COUNT_KEY); + // Apply direction + html.style.removeProperty(ReadiumCSS.DIRECTION_KEY); // Apply text alignment html.style.removeProperty(ReadiumCSS.TEXT_ALIGNMENT_KEY); // Apply line height @@ -435,8 +459,9 @@ export class UserSettings implements IUserSettings { // Apply appearance html.style.removeProperty(ReadiumCSS.APPEARANCE_KEY); - HTMLUtilities.setAttr(rootElement, "data-viewer-theme", "day"); - HTMLUtilities.setAttr(body, "data-viewer-theme", "day"); + if (rootElement) + HTMLUtilities.setAttr(rootElement, "data-viewer-theme", "day"); + if (body) HTMLUtilities.setAttr(body, "data-viewer-theme", "day"); // Apply font family html.style.removeProperty(ReadiumCSS.FONT_FAMILY_KEY); @@ -468,8 +493,10 @@ export class UserSettings implements IUserSettings { ) as HTMLHtmlElement; if (html) { - const rootElement = document.documentElement; - const body = HTMLUtilities.findRequiredElement(rootElement, "body"); + const rootElement = + HTMLUtilities.findElement(document, "#root") || + document.documentElement; + const body = HTMLUtilities.findElement(html, "body"); if (this.view?.navigator.publication.isReflowable) { // Apply font size if (await this.getProperty(ReadiumCSS.FONT_SIZE_KEY)) { @@ -578,18 +605,21 @@ export class UserSettings implements IUserSettings { if ( this.userProperties.getByRef(ReadiumCSS.APPEARANCE_REF)?.value === 0 ) { - HTMLUtilities.setAttr(rootElement, "data-viewer-theme", "day"); - HTMLUtilities.setAttr(body, "data-viewer-theme", "day"); + if (rootElement) + HTMLUtilities.setAttr(rootElement, "data-viewer-theme", "day"); + if (body) HTMLUtilities.setAttr(body, "data-viewer-theme", "day"); } else if ( this.userProperties.getByRef(ReadiumCSS.APPEARANCE_REF)?.value === 1 ) { - HTMLUtilities.setAttr(rootElement, "data-viewer-theme", "sepia"); - HTMLUtilities.setAttr(body, "data-viewer-theme", "sepia"); + if (rootElement) + HTMLUtilities.setAttr(rootElement, "data-viewer-theme", "sepia"); + if (body) HTMLUtilities.setAttr(body, "data-viewer-theme", "sepia"); } else if ( this.userProperties.getByRef(ReadiumCSS.APPEARANCE_REF)?.value === 2 ) { - HTMLUtilities.setAttr(rootElement, "data-viewer-theme", "night"); - HTMLUtilities.setAttr(body, "data-viewer-theme", "night"); + if (rootElement) + HTMLUtilities.setAttr(rootElement, "data-viewer-theme", "night"); + if (body) HTMLUtilities.setAttr(body, "data-viewer-theme", "night"); } } else { html.style.setProperty( @@ -598,9 +628,22 @@ export class UserSettings implements IUserSettings { .getByRef(ReadiumCSS.APPEARANCE_REF) ?.toString() ?? null ); - HTMLUtilities.setAttr(rootElement, "data-viewer-theme", "day"); - HTMLUtilities.setAttr(body, "data-viewer-theme", "day"); + if (rootElement) + HTMLUtilities.setAttr(rootElement, "data-viewer-theme", "day"); + if (body) HTMLUtilities.setAttr(body, "data-viewer-theme", "day"); + } + + if (this.view?.navigator.publication.isFixedLayout) { + if (await this.getProperty(ReadiumCSS.DIRECTION_KEY)) { + let value = + this.userProperties + .getByRef(ReadiumCSS.DIRECTION_REF) + ?.toString() ?? null; + html.style.setProperty(ReadiumCSS.DIRECTION_KEY, value); + this.view.navigator.setDirection(value); + } } + if (this.view?.navigator.publication.isReflowable) { // Apply font family if (await this.getProperty(ReadiumCSS.FONT_FAMILY_KEY)) { @@ -786,6 +829,10 @@ export class UserSettings implements IUserSettings { await this.userProperties?.getByRef(ReadiumCSS.COLUMN_COUNT_REF) ?.value ], + direction: + UserSettings.directionValues[ + await this.userProperties?.getByRef(ReadiumCSS.DIRECTION_REF)?.value + ], wordSpacing: this.userProperties?.getByRef(ReadiumCSS.WORD_SPACING_REF) ?.value, letterSpacing: this.userProperties?.getByRef( @@ -829,6 +876,13 @@ export class UserSettings implements IUserSettings { ReadiumCSS.COLUMN_COUNT_REF, ReadiumCSS.COLUMN_COUNT_KEY ); + // Direction + userProperties.addEnumerable( + this.direction, + UserSettings.directionValues, + ReadiumCSS.DIRECTION_REF, + ReadiumCSS.DIRECTION_KEY + ); // Appearance userProperties.addEnumerable( this.appearance, @@ -979,6 +1033,10 @@ export class UserSettings implements IUserSettings { UserSettings.columnCountValues[ this.userProperties?.getByRef(ReadiumCSS.COLUMN_COUNT_REF)?.value ], // "auto", "1", "2" + direction: + UserSettings.directionValues[ + this.userProperties?.getByRef(ReadiumCSS.DIRECTION_REF)?.value + ], // "auto", "ltr", "rtl" verticalScroll: this.verticalScroll, fontSize: this.fontSize, wordSpacing: this.wordSpacing, @@ -1050,6 +1108,17 @@ export class UserSettings implements IUserSettings { this.settingsColumnsChangeCallback(); } + if (userSettings.direction) { + this.direction = UserSettings.directionValues.findIndex( + (el: any) => el === userSettings.direction + ); + let prop = this.userProperties?.getByRef(ReadiumCSS.DIRECTION_REF); + if (prop) { + prop.value = this.direction; + await this.storeProperty(prop); + } + } + if (userSettings.textAlignment) { this.textAlignment = UserSettings.textAlignmentValues.findIndex( (el: any) => el === userSettings.textAlignment diff --git a/src/modules/AnnotationModule.ts b/src/modules/AnnotationModule.ts index 3ed3da24..a7976939 100644 --- a/src/modules/AnnotationModule.ts +++ b/src/modules/AnnotationModule.ts @@ -197,7 +197,7 @@ export class AnnotationModule implements ReaderModule { }, 200); } - initialize() { + initialize(iframe: HTMLIFrameElement) { return new Promise(async (resolve) => { await (document as any).fonts.ready; if (this.rights.enableAnnotations) { @@ -205,7 +205,7 @@ export class AnnotationModule implements ReaderModule { this.drawHighlights(); this.showHighlights(); addEventListenerOptional( - this.navigator.iframes[0].contentDocument?.body, + iframe.contentDocument?.body, "click", this.click.bind(this) ); diff --git a/src/modules/consumption/ConsumptionModule.ts b/src/modules/consumption/ConsumptionModule.ts index f4e8f2f3..5a1fd94e 100644 --- a/src/modules/consumption/ConsumptionModule.ts +++ b/src/modules/consumption/ConsumptionModule.ts @@ -84,8 +84,9 @@ export class ConsumptionModule implements ReaderModule { log.log("Consumption module stop"); this.endResearchSession(); } - initialize() { - let win = this.navigator.iframes[0].contentWindow; + + initialize(iframe: HTMLIFrameElement) { + let win = iframe.contentWindow; if (win) { const self = this; win.onload = function () { diff --git a/src/modules/highlight/TextHighlighter.ts b/src/modules/highlight/TextHighlighter.ts index 0bf37195..0aebca11 100644 --- a/src/modules/highlight/TextHighlighter.ts +++ b/src/modules/highlight/TextHighlighter.ts @@ -191,16 +191,12 @@ export class TextHighlighter { onAfterHighlight: function () {}, }); } - async initialize() { - let doc = this.navigator.iframes[0].contentDocument; + async initialize(iframe: HTMLIFrameElement) { + let doc = iframe.contentDocument; if (doc) { this.dom(doc.body).addClass(this.options.contextClass); } - this.bindEvents( - this.navigator.iframes[0].contentDocument?.body, - this, - this.hasEventListener - ); + this.bindEvents(iframe.contentDocument?.body, this, this.hasEventListener); this.initializeToolbox(); @@ -218,7 +214,7 @@ export class TextHighlighter { } } setTimeout(async () => { - let doc = this.navigator.iframes[0].contentDocument; + let doc = iframe.contentDocument; if (doc) { await doc.body?.addEventListener("click", unselect); } diff --git a/src/modules/highlight/renderer/iframe/selection.ts b/src/modules/highlight/renderer/iframe/selection.ts index a21680c0..06288029 100644 --- a/src/modules/highlight/renderer/iframe/selection.ts +++ b/src/modules/highlight/renderer/iframe/selection.ts @@ -148,9 +148,9 @@ export function convertRange( const startContainerElement = startIsElement ? (range.startContainer as Element) : range.startContainer.parentNode && - range.startContainer.parentNode.nodeType === Node.ELEMENT_NODE - ? (range.startContainer.parentNode as Element) - : undefined; + range.startContainer.parentNode.nodeType === Node.ELEMENT_NODE + ? (range.startContainer.parentNode as Element) + : undefined; if (!startContainerElement) { return undefined; } @@ -170,9 +170,9 @@ export function convertRange( const endContainerElement = endIsElement ? (range.endContainer as Element) : range.endContainer.parentNode && - range.endContainer.parentNode.nodeType === Node.ELEMENT_NODE - ? (range.endContainer.parentNode as Element) - : undefined; + range.endContainer.parentNode.nodeType === Node.ELEMENT_NODE + ? (range.endContainer.parentNode as Element) + : undefined; if (!endContainerElement) { return undefined; } diff --git a/src/modules/history/HistoryModule.ts b/src/modules/history/HistoryModule.ts index 0823e46b..2a1c685d 100644 --- a/src/modules/history/HistoryModule.ts +++ b/src/modules/history/HistoryModule.ts @@ -119,7 +119,6 @@ export class HistoryModule implements ReaderModule { } async push(locator: Locator, history: boolean) { - let lastInHistory; if (history && this.annotator) { let lastReadingPosition = (await this.annotator.getLastReadingPosition()) as @@ -141,13 +140,24 @@ export class HistoryModule implements ReaderModule { ) { this.history.push(lastReadingPosition); this.historyCurrentIndex = this.history.length - 1; + } else { + const lastInHistory = this.history[this.history.length - 1]; + if ( + (lastInHistory && + lastInHistory.href !== locator.href && + lastInHistory.locations !== locator.locations) || + lastInHistory === undefined + ) { + this.history.push(lastReadingPosition); + this.historyCurrentIndex = this.history.length - 1; + } } } if (this.historyCurrentIndex < this.history.length - 1) { this.history = this.history.slice(0, this.historyCurrentIndex); } - lastInHistory = this.history[this.history.length - 1]; + const lastInHistory = this.history[this.history.length - 1]; if ( (lastInHistory && lastInHistory.href !== locator.href) || lastInHistory === undefined diff --git a/src/modules/linefocus/LineFocusModule.ts b/src/modules/linefocus/LineFocusModule.ts index a51539e5..611102c6 100644 --- a/src/modules/linefocus/LineFocusModule.ts +++ b/src/modules/linefocus/LineFocusModule.ts @@ -135,7 +135,8 @@ export default class LineFocusModule implements ReaderModule { } } } - initialize() { + + initialize(iframe: HTMLIFrameElement) { return new Promise(async (resolve) => { await (document as any).fonts.ready; if (!this.hasEventListener) { @@ -143,12 +144,12 @@ export default class LineFocusModule implements ReaderModule { addEventListenerOptional(document, "keydown", this.keydown.bind(this)); addEventListenerOptional(document, "keyup", this.keyup.bind(this)); addEventListenerOptional( - this.navigator.iframes[0].contentDocument, + iframe.contentDocument, "keydown", this.keydown.bind(this) ); addEventListenerOptional( - this.navigator.iframes[0].contentDocument, + iframe.contentDocument, "keyup", this.keyup.bind(this) ); diff --git a/src/modules/mediaoverlays/MediaOverlayModule.ts b/src/modules/mediaoverlays/MediaOverlayModule.ts index 10828094..3906ee7e 100644 --- a/src/modules/mediaoverlays/MediaOverlayModule.ts +++ b/src/modules/mediaoverlays/MediaOverlayModule.ts @@ -818,8 +818,8 @@ export class MediaOverlayModule implements ReaderModule { isNight || isSepia ? R2_MO_CLASS_ACTIVE : classActive - ? classActive - : R2_MO_CLASS_ACTIVE; + ? classActive + : R2_MO_CLASS_ACTIVE; } if (this.pid) { diff --git a/src/modules/mediaoverlays/MediaOverlaySettings.ts b/src/modules/mediaoverlays/MediaOverlaySettings.ts index b1267a7c..73fffe7c 100644 --- a/src/modules/mediaoverlays/MediaOverlaySettings.ts +++ b/src/modules/mediaoverlays/MediaOverlaySettings.ts @@ -431,8 +431,9 @@ export class MediaOverlaySettings implements IMediaOverlayUserSettings { ( this.userProperties.getByRef(MEDIAOVERLAYREFS.VOLUME_REF) as Incremental ).increment(); - this.volume = this.userProperties.getByRef(MEDIAOVERLAYREFS.VOLUME_REF) - ?.value; + this.volume = this.userProperties.getByRef( + MEDIAOVERLAYREFS.VOLUME_REF + )?.value; let prop = this.userProperties.getByRef(MEDIAOVERLAYREFS.VOLUME_REF); if (prop) { this.storeProperty(prop); @@ -442,8 +443,9 @@ export class MediaOverlaySettings implements IMediaOverlayUserSettings { ( this.userProperties.getByRef(MEDIAOVERLAYREFS.RATE_REF) as Incremental ).increment(); - this.rate = this.userProperties.getByRef(MEDIAOVERLAYREFS.RATE_REF) - ?.value; + this.rate = this.userProperties.getByRef( + MEDIAOVERLAYREFS.RATE_REF + )?.value; let prop = this.userProperties.getByRef(MEDIAOVERLAYREFS.RATE_REF); if (prop) { this.storeProperty(prop); @@ -457,8 +459,9 @@ export class MediaOverlaySettings implements IMediaOverlayUserSettings { ( this.userProperties.getByRef(MEDIAOVERLAYREFS.VOLUME_REF) as Incremental ).decrement(); - this.volume = this.userProperties.getByRef(MEDIAOVERLAYREFS.VOLUME_REF) - ?.value; + this.volume = this.userProperties.getByRef( + MEDIAOVERLAYREFS.VOLUME_REF + )?.value; let prop = this.userProperties.getByRef(MEDIAOVERLAYREFS.VOLUME_REF); if (prop) { this.storeProperty(prop); @@ -468,8 +471,9 @@ export class MediaOverlaySettings implements IMediaOverlayUserSettings { ( this.userProperties.getByRef(MEDIAOVERLAYREFS.RATE_REF) as Incremental ).decrement(); - this.rate = this.userProperties.getByRef(MEDIAOVERLAYREFS.RATE_REF) - ?.value; + this.rate = this.userProperties.getByRef( + MEDIAOVERLAYREFS.RATE_REF + )?.value; let prop = this.userProperties.getByRef(MEDIAOVERLAYREFS.RATE_REF); if (prop) { this.storeProperty(prop); diff --git a/src/modules/protection/ContentProtectionModule.ts b/src/modules/protection/ContentProtectionModule.ts index 3e24c096..73ab55e6 100644 --- a/src/modules/protection/ContentProtectionModule.ts +++ b/src/modules/protection/ContentProtectionModule.ts @@ -897,36 +897,34 @@ export class ContentProtectionModule implements ReaderModule { } } - public async initialize() { + public async initialize(iframe: HTMLIFrameElement) { if (this.properties?.enableObfuscation) { return new Promise(async (resolve) => { await (document as any).fonts.ready; - for (const iframe of this.navigator.iframes) { - if (iframe.contentDocument) { - const body = HTMLUtilities.findRequiredIframeElement( - iframe.contentDocument, - "body" - ) as HTMLBodyElement; - this.observe(); - - setTimeout(() => { - this.rects = this.findRects(body); - this.rects.forEach((rect) => - this.toggleRect(rect, this.securityContainer, this.isHacked) - ); + if (iframe.contentDocument) { + const body = HTMLUtilities.findRequiredIframeElement( + iframe.contentDocument, + "body" + ) as HTMLBodyElement; + this.observe(); - this.setupEvents(); - if (!this.hasEventListener) { - this.hasEventListener = true; - addEventListenerOptional( - this.wrapper, - "scroll", - this.handleScroll.bind(this) - ); - } - resolve(); - }, 10); - } + setTimeout(() => { + this.rects = this.findRects(body); + this.rects.forEach((rect) => + this.toggleRect(rect, this.securityContainer, this.isHacked) + ); + + this.setupEvents(); + if (!this.hasEventListener) { + this.hasEventListener = true; + addEventListenerOptional( + this.wrapper, + "scroll", + this.handleScroll.bind(this) + ); + } + resolve(); + }, 10); } }); } diff --git a/src/navigator/IFrameNavigator.ts b/src/navigator/IFrameNavigator.ts index b0696382..311a535f 100644 --- a/src/navigator/IFrameNavigator.ts +++ b/src/navigator/IFrameNavigator.ts @@ -117,6 +117,7 @@ export interface NavigatorAPI { resourceAtEnd: any; resourceFitsScreen: any; updateCurrentLocation: any; + direction: any; onError?: (e: Error) => void; } @@ -212,6 +213,7 @@ export interface ReaderConfig { injectables: Array; injectablesFixed?: Array; useLocalStorage?: boolean; + useStorageType?: string; attributes?: IFrameAttributes; services?: PublicationServices; sample?: SampleRead; @@ -530,6 +532,19 @@ export class IFrameNavigator extends EventEmitter implements Navigator { spreads: HTMLDivElement; firstSpread: HTMLDivElement; + setDirection(direction?: string | null) { + let dir = ""; + if (direction === "rtl" || direction === "ltr") dir = direction; + if (direction === "auto") dir = this.publication.Metadata.Direction2; + if (dir) { + if (dir === "rtl") this.spreads.style.flexDirection = "row-reverse"; + if (dir === "ltr") this.spreads.style.flexDirection = "row"; + this.keyboardEventHandler.rtl = dir === "rtl"; + if (this.api?.direction) this.api?.direction(dir); + this.emit("direction", dir); + } + } + protected async start( mainElement: HTMLElement, headerMenu?: HTMLElement | null, @@ -574,6 +589,19 @@ export class IFrameNavigator extends EventEmitter implements Navigator { this.spreads.appendChild(this.firstSpread); this.firstSpread.appendChild(this.iframes[0]); wrapper.appendChild(this.spreads); + let dir = ""; + switch (this.settings.direction) { + case 0: + dir = "auto"; + break; + case 1: + dir = "ltr"; + break; + case 2: + dir = "rtl"; + break; + } + this.setDirection(dir); } else { iframe.setAttribute("height", "100%"); iframe.setAttribute("width", "100%"); @@ -900,7 +928,7 @@ export class IFrameNavigator extends EventEmitter implements Navigator { addEventListenerOptional( iframe, "load", - this.handleIFrameLoad.bind(this) + this.handleIFrameLoad.bind(this, iframe) ); } @@ -1333,7 +1361,7 @@ export class IFrameNavigator extends EventEmitter implements Navigator { } } - private async handleIFrameLoad(): Promise { + private async handleIFrameLoad(iframe: HTMLIFrameElement): Promise { if (this.errorMessage) this.errorMessage.style.display = "none"; this.showLoadingMessageAfterDelay(); try { @@ -1442,28 +1470,26 @@ export class IFrameNavigator extends EventEmitter implements Navigator { this.chapterTitle.innerHTML = "(Current Chapter)"; } - await this.injectInjectablesIntoIframeHead(); + await this.injectInjectablesIntoIframeHead(iframe); - if (this.highlighter !== undefined) { - await this.highlighter.initialize(); + if (this.view?.layout !== "fixed" && this.highlighter !== undefined) { + await this.highlighter.initialize(iframe); } - const body = this.iframes[0].contentDocument?.body; + const body = iframe.contentDocument?.body; // resize on toggle details let details = body?.querySelector("details"); if (details) { let self = this; details.addEventListener("toggle", async (_event) => { - await self.view?.setIframeHeight?.(this.iframes[0]); + await self.view?.setIframeHeight?.(iframe); }); } if (this.eventHandler) { - for (const iframe of this.iframes) { - this.eventHandler.setupEvents(iframe.contentDocument); - this.touchEventHandler.setupEvents(iframe.contentDocument); - this.keyboardEventHandler.setupEvents(iframe.contentDocument); - } + this.eventHandler.setupEvents(iframe.contentDocument); + this.touchEventHandler.setupEvents(iframe.contentDocument); + this.keyboardEventHandler.setupEvents(iframe.contentDocument); this.touchEventHandler.setupEvents(this.errorMessage); if (!this.didInitKeyboardEventHandler) { this.keyboardEventHandler.keydown(document); @@ -1472,21 +1498,21 @@ export class IFrameNavigator extends EventEmitter implements Navigator { } if (this.view?.layout !== "fixed") { if (this.view?.isScrollMode()) { - this.iframes[0].height = "0"; - this.view?.setIframeHeight?.(this.iframes[0]); + iframe.height = "0"; + this.view?.setIframeHeight?.(iframe); } } if (this.rights.enableContentProtection && this.contentProtectionModule) { - await this.contentProtectionModule.initialize(); + await this.contentProtectionModule.initialize(iframe); } if (this.rights.enableConsumption && this.consumptionModule) { - await this.consumptionModule.initialize(); + await this.consumptionModule.initialize(iframe); } if (this.rights.enableAnnotations && this.annotationModule) { - await this.annotationModule.initialize(); + await this.annotationModule.initialize(iframe); } if (this.rights.enableBookmarks && this.bookmarkModule) { @@ -1494,11 +1520,11 @@ export class IFrameNavigator extends EventEmitter implements Navigator { } if (this.rights.enableLineFocus && this.lineFocusModule) { - await this.lineFocusModule.initialize(); + await this.lineFocusModule.initialize(iframe); } if (this.rights.enableTTS && this.ttsModule) { - const body = this.iframes[0].contentDocument?.body; + const body = iframe.contentDocument?.body; const ttsModule = this.ttsModule as TTSModule2; await ttsModule.initialize(body); } @@ -1517,9 +1543,9 @@ export class IFrameNavigator extends EventEmitter implements Navigator { setTimeout(async () => { if (this.newElementId) { - const element = ( - this.iframes[0].contentDocument as any - ).getElementById(this.newElementId); + const element = (iframe.contentDocument as any).getElementById( + this.newElementId + ); this.view?.goToElement?.(element); this.newElementId = undefined; } else if ( @@ -1544,7 +1570,7 @@ export class IFrameNavigator extends EventEmitter implements Navigator { } this.hideLoadingMessage(); - this.showIframeContents(); + this.showIframeContents(iframe); if ( this.rights.enableMediaOverlays && @@ -1571,7 +1597,9 @@ export class IFrameNavigator extends EventEmitter implements Navigator { } } - private async injectInjectablesIntoIframeHead(): Promise { + private async injectInjectablesIntoIframeHead( + iframe: HTMLIFrameElement + ): Promise { // Inject Readium CSS into Iframe Head const injectablesToLoad: Promise[] = []; @@ -1595,60 +1623,58 @@ export class IFrameNavigator extends EventEmitter implements Navigator { injectablesToLoad.push(loadPromise); }; - for (const iframe of this.iframes) { - const head = iframe.contentDocument?.head; - if (head) { - const bases = iframe.contentDocument.getElementsByTagName("base"); - if (bases.length === 0) { - head.insertBefore( - IFrameNavigator.createBase(this.currentChapterLink.href), - head.firstChild - ); - } + const head = iframe.contentDocument?.head; + if (head) { + const bases = iframe.contentDocument.getElementsByTagName("base"); + if (bases.length === 0) { + head.insertBefore( + IFrameNavigator.createBase(this.currentChapterLink.href), + head.firstChild + ); + } - this.injectables?.forEach((injectable) => { - if (injectable.type === "style") { - if (injectable.fontFamily) { - // UserSettings.fontFamilyValues.push(injectable.fontFamily) - // this.settings.setupEvents() - // this.settings.addFont(injectable.fontFamily); - this.settings.initAddedFont(); - if (!injectable.systemFont && injectable.url) { - const link = IFrameNavigator.createCssLink(injectable.url); - head.appendChild(link); - addLoadingInjectable(link); - } - } else if (injectable.r2before && injectable.url) { - const link = IFrameNavigator.createCssLink(injectable.url); - head.insertBefore(link, head.firstChild); - addLoadingInjectable(link); - } else if (injectable.r2default && injectable.url) { - const link = IFrameNavigator.createCssLink(injectable.url); - head.insertBefore(link, head.childNodes[1]); - addLoadingInjectable(link); - } else if (injectable.r2after && injectable.url) { - if (injectable.appearance) { - // this.settings.addAppearance(injectable.appearance); - this.settings.initAddedAppearance(); - } - const link = IFrameNavigator.createCssLink(injectable.url); - head.appendChild(link); - addLoadingInjectable(link); - } else if (injectable.url) { + this.injectables?.forEach((injectable) => { + if (injectable.type === "style") { + if (injectable.fontFamily) { + // UserSettings.fontFamilyValues.push(injectable.fontFamily) + // this.settings.setupEvents() + // this.settings.addFont(injectable.fontFamily); + this.settings.initAddedFont(); + if (!injectable.systemFont && injectable.url) { const link = IFrameNavigator.createCssLink(injectable.url); head.appendChild(link); addLoadingInjectable(link); } - } else if (injectable.type === "script" && injectable.url) { - const script = IFrameNavigator.createJavascriptLink( - injectable.url, - injectable.async ?? false - ); - head.appendChild(script); - addLoadingInjectable(script); + } else if (injectable.r2before && injectable.url) { + const link = IFrameNavigator.createCssLink(injectable.url); + head.insertBefore(link, head.firstChild); + addLoadingInjectable(link); + } else if (injectable.r2default && injectable.url) { + const link = IFrameNavigator.createCssLink(injectable.url); + head.insertBefore(link, head.childNodes[1]); + addLoadingInjectable(link); + } else if (injectable.r2after && injectable.url) { + if (injectable.appearance) { + // this.settings.addAppearance(injectable.appearance); + this.settings.initAddedAppearance(); + } + const link = IFrameNavigator.createCssLink(injectable.url); + head.appendChild(link); + addLoadingInjectable(link); + } else if (injectable.url) { + const link = IFrameNavigator.createCssLink(injectable.url); + head.appendChild(link); + addLoadingInjectable(link); } - }); - } + } else if (injectable.type === "script" && injectable.url) { + const script = IFrameNavigator.createJavascriptLink( + injectable.url, + injectable.async ?? false + ); + head.appendChild(script); + addLoadingInjectable(script); + } + }); } if (injectablesToLoad.length === 0) { @@ -2013,24 +2039,24 @@ export class IFrameNavigator extends EventEmitter implements Navigator { } } else { this.iframes[0].src = "about:blank"; - } - if (this.iframes.length === 2) { - this.currentSpreadLinks.right = { - href: this.currentChapterLink.href, - }; + if (this.iframes.length === 2) { + this.currentSpreadLinks.right = { + href: this.currentChapterLink.href, + }; - if (isSameOrigin) { - this.iframes[1].src = this.currentChapterLink.href; - } else { - fetch(this.currentChapterLink.href, this.requestConfig) - .then((r) => r.text()) - .then(async (content) => { - writeIframe2Doc.call( - this, - content, - this.currentChapterLink.href - ); - }); + if (isSameOrigin) { + this.iframes[1].src = this.currentChapterLink.href; + } else { + fetch(this.currentChapterLink.href, this.requestConfig) + .then((r) => r.text()) + .then(async (content) => { + writeIframe2Doc.call( + this, + content, + this.currentChapterLink.href + ); + }); + } } } } @@ -3135,16 +3161,14 @@ export class IFrameNavigator extends EventEmitter implements Navigator { } }, 200); - private showIframeContents() { + private showIframeContents(iframe: HTMLIFrameElement) { this.isBeingStyled = false; // We set a timeOut so that settings can be applied when opacity is still 0 setTimeout(() => { if (!this.isBeingStyled) { - this.iframes.forEach((iframe) => { - iframe.style.opacity = "1"; - iframe.style.border = "none"; - iframe.style.overflow = "hidden"; - }); + iframe.style.opacity = "1"; + iframe.style.border = "none"; + iframe.style.overflow = "hidden"; } }, 150); } diff --git a/src/navigator/PDFNavigator.ts b/src/navigator/PDFNavigator.ts index b66c4c85..d5f3348b 100644 --- a/src/navigator/PDFNavigator.ts +++ b/src/navigator/PDFNavigator.ts @@ -220,8 +220,8 @@ export class PDFNavigator extends EventEmitter implements Navigator { tableOfContents(): any { return this.publication.tableOfContents; } - landmarks(): any {}; - pageList(): any {}; + landmarks(): any {} + pageList(): any {} //TODO: currentResource(): any {} diff --git a/src/reader.ts b/src/reader.ts index e6543cc4..2a9f10ba 100644 --- a/src/reader.ts +++ b/src/reader.ts @@ -150,15 +150,18 @@ export default class D2Reader { const store = new LocalStorageStore({ prefix: publication.manifestUrl, useLocalStorage: initialConfig.useLocalStorage ?? false, + useStorageType: initialConfig.useStorageType, }); const settingsStore = new LocalStorageStore({ prefix: "r2d2bc-reader", useLocalStorage: initialConfig.useLocalStorage ?? false, + useStorageType: initialConfig.useStorageType, }); const layerStore = new LocalStorageStore({ prefix: "r2d2bc-layers", useLocalStorage: initialConfig.useLocalStorage ?? false, + useStorageType: initialConfig.useStorageType, }); const annotator = new LocalAnnotator({ store: store }); diff --git a/src/store/LocalStorageStore.ts b/src/store/LocalStorageStore.ts index 5ece6c4d..c607707c 100644 --- a/src/store/LocalStorageStore.ts +++ b/src/store/LocalStorageStore.ts @@ -26,6 +26,7 @@ export interface LocalStorageStoreConfig { value for each key. */ prefix: string; useLocalStorage: boolean; + useStorageType: string | undefined; } /** Class that stores key/value pairs in localStorage if possible @@ -34,23 +35,28 @@ export default class LocalStorageStore implements Store { private readonly fallbackStore: MemoryStore | null; private readonly prefix: string; private readonly useLocalStorage: boolean; + private readonly useStorageType: string | undefined; public constructor(config: LocalStorageStoreConfig) { this.prefix = config.prefix; this.useLocalStorage = config.useLocalStorage; + this.useStorageType = config.useStorageType; try { // In some browsers (eg iOS Safari in private mode), // localStorage exists but throws an exception when // you try to write to it. const testKey = config.prefix + "-" + String(Math.random()); - if (this.useLocalStorage) { + if (this.useStorageType === "memory") { + this.fallbackStore = new MemoryStore(); + } else if (this.useStorageType === "local" || this.useLocalStorage) { window.localStorage.setItem(testKey, "test"); window.localStorage.removeItem(testKey); - } else { + this.fallbackStore = null; + } else if (this.useStorageType === "session" || !this.useLocalStorage) { window.sessionStorage.setItem(testKey, "test"); window.sessionStorage.removeItem(testKey); + this.fallbackStore = null; } - this.fallbackStore = null; } catch (e) { this.fallbackStore = new MemoryStore(); } @@ -63,7 +69,7 @@ export default class LocalStorageStore implements Store { public get(key: string): any | null { let value: string | null; if (!this.fallbackStore) { - if (this.useLocalStorage) { + if (this.useStorageType === "local" || this.useLocalStorage) { value = window.localStorage.getItem(this.getLocalStorageKey(key)); } else { value = window.sessionStorage.getItem(this.getLocalStorageKey(key)); @@ -76,7 +82,7 @@ export default class LocalStorageStore implements Store { public set(key: string, value: any) { if (!this.fallbackStore) { - if (this.useLocalStorage) { + if (this.useStorageType === "local" || this.useLocalStorage) { window.localStorage.setItem(this.getLocalStorageKey(key), value); } else { window.sessionStorage.setItem(this.getLocalStorageKey(key), value); @@ -88,7 +94,7 @@ export default class LocalStorageStore implements Store { public remove(key: string) { if (!this.fallbackStore) { - if (this.useLocalStorage) { + if (this.useStorageType === "local" || this.useLocalStorage) { window.localStorage.removeItem(this.getLocalStorageKey(key)); } else { window.sessionStorage.removeItem(this.getLocalStorageKey(key)); diff --git a/src/utils/KeyboardEventHandler.ts b/src/utils/KeyboardEventHandler.ts index 76dcaab8..6ec58714 100644 --- a/src/utils/KeyboardEventHandler.ts +++ b/src/utils/KeyboardEventHandler.ts @@ -21,8 +21,10 @@ import { IFrameNavigator } from "../navigator/IFrameNavigator"; export default class KeyboardEventHandler { navigator: IFrameNavigator; + rtl: boolean; constructor(navigator: IFrameNavigator) { this.navigator = navigator; + this.rtl = false; } public onBackwardSwipe: (event: UIEvent) => void = () => {}; @@ -71,7 +73,7 @@ export default class KeyboardEventHandler { private onKeyDown(self: this) { return ( this.handlers["onKeyDown"] || - (this.handlers["onKeyDown"] = function(event: KeyboardEvent) { + (this.handlers["onKeyDown"] = function (event: KeyboardEvent) { // Ignore input elements const eventTarget = event.target as HTMLElement; if (/input|select|option|textarea/i.test(eventTarget.tagName)) { @@ -90,10 +92,10 @@ export default class KeyboardEventHandler { const key = event.key; switch (key) { case "ArrowRight": - self.onForwardSwipe(event); + self.rtl ? self.onBackwardSwipe(event) : self.onForwardSwipe(event); break; case "ArrowLeft": - self.onBackwardSwipe(event); + self.rtl ? self.onForwardSwipe(event) : self.onBackwardSwipe(event); break; } switch (event.code) { diff --git a/viewer/index_dita.html b/viewer/index_dita.html index 63849861..0f6b0be0 100644 --- a/viewer/index_dita.html +++ b/viewer/index_dita.html @@ -333,6 +333,44 @@ +
+ +
+ +
+