{{ i18n.ts.caption }}
+ {{ i18n.ts._ocr.button }}
+
+
+
+
+ {{ i18n.ts._ocr.button }}
+
@@ -27,10 +34,15 @@ SPDX-License-Identifier: AGPL-3.0-only
+
+
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 62cf9ef9a..49c9d4b3c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -786,6 +786,9 @@ importers:
strict-event-emitter-types:
specifier: 2.0.0
version: 2.0.0
+ tesseract.js:
+ specifier: ^5.0.4
+ version: 5.0.4
textarea-caret:
specifier: 3.1.0
version: 3.1.0
@@ -985,6 +988,9 @@ importers:
summaly:
specifier: github:misskey-dev/summaly
version: github.com/misskey-dev/summaly/d2a3e07205c3c9769bc5a7b42031c8884b5a25c8
+ tesseract.js-core:
+ specifier: v5.0.0
+ version: 5.0.0
vite-plugin-turbosnap:
specifier: 1.0.3
version: 1.0.3
@@ -1889,7 +1895,7 @@ packages:
'@babel/traverse': 7.23.4
'@babel/types': 7.23.4
convert-source-map: 2.0.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
gensync: 1.0.0-beta.2
json5: 2.2.3
semver: 6.3.1
@@ -2011,7 +2017,7 @@ packages:
'@babel/core': 7.23.3
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.22.5
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
lodash.debounce: 4.0.8
resolve: 1.22.8
transitivePeerDependencies:
@@ -3263,7 +3269,7 @@ packages:
'@babel/helper-split-export-declaration': 7.22.6
'@babel/parser': 7.23.4
'@babel/types': 7.23.4
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
globals: 11.12.0
transitivePeerDependencies:
- supports-color
@@ -4143,7 +4149,7 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
ajv: 6.12.6
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
espree: 9.6.1
globals: 13.23.0
ignore: 5.3.0
@@ -4160,7 +4166,7 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
ajv: 6.12.6
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
espree: 9.6.1
globals: 13.23.0
ignore: 5.3.0
@@ -4431,7 +4437,7 @@ packages:
engines: {node: '>=10.10.0'}
dependencies:
'@humanwhocodes/object-schema': 2.0.1
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
minimatch: 3.1.2
transitivePeerDependencies:
- supports-color
@@ -4956,7 +4962,7 @@ packages:
'@open-draft/until': 1.0.3
'@types/debug': 4.1.7
'@xmldom/xmldom': 0.8.6
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
headers-polyfill: 3.2.5
outvariant: 1.4.0
strict-event-emitter: 0.2.8
@@ -8245,7 +8251,7 @@ packages:
'@typescript-eslint/type-utils': 6.11.0(eslint@8.53.0)(typescript@5.3.3)
'@typescript-eslint/utils': 6.11.0(eslint@8.53.0)(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 6.11.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
eslint: 8.53.0
graphemer: 1.4.0
ignore: 5.3.0
@@ -8274,7 +8280,7 @@ packages:
'@typescript-eslint/type-utils': 6.12.0(eslint@8.54.0)(typescript@5.1.6)
'@typescript-eslint/utils': 6.12.0(eslint@8.54.0)(typescript@5.1.6)
'@typescript-eslint/visitor-keys': 6.12.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
eslint: 8.54.0
graphemer: 1.4.0
ignore: 5.3.0
@@ -8303,7 +8309,7 @@ packages:
'@typescript-eslint/type-utils': 6.14.0(eslint@8.56.0)(typescript@5.3.3)
'@typescript-eslint/utils': 6.14.0(eslint@8.56.0)(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 6.14.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
eslint: 8.56.0
graphemer: 1.4.0
ignore: 5.3.0
@@ -8329,7 +8335,7 @@ packages:
'@typescript-eslint/types': 6.11.0
'@typescript-eslint/typescript-estree': 6.11.0(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 6.11.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
eslint: 8.53.0
typescript: 5.3.3
transitivePeerDependencies:
@@ -8350,7 +8356,7 @@ packages:
'@typescript-eslint/types': 6.12.0
'@typescript-eslint/typescript-estree': 6.12.0(typescript@5.1.6)
'@typescript-eslint/visitor-keys': 6.12.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
eslint: 8.54.0
typescript: 5.1.6
transitivePeerDependencies:
@@ -8371,7 +8377,7 @@ packages:
'@typescript-eslint/types': 6.14.0
'@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 6.14.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
eslint: 8.56.0
typescript: 5.3.3
transitivePeerDependencies:
@@ -8414,7 +8420,7 @@ packages:
dependencies:
'@typescript-eslint/typescript-estree': 6.11.0(typescript@5.3.3)
'@typescript-eslint/utils': 6.11.0(eslint@8.53.0)(typescript@5.3.3)
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
eslint: 8.53.0
ts-api-utils: 1.0.3(typescript@5.3.3)
typescript: 5.3.3
@@ -8434,7 +8440,7 @@ packages:
dependencies:
'@typescript-eslint/typescript-estree': 6.12.0(typescript@5.1.6)
'@typescript-eslint/utils': 6.12.0(eslint@8.54.0)(typescript@5.1.6)
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
eslint: 8.54.0
ts-api-utils: 1.0.3(typescript@5.1.6)
typescript: 5.1.6
@@ -8454,7 +8460,7 @@ packages:
dependencies:
'@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3)
'@typescript-eslint/utils': 6.14.0(eslint@8.56.0)(typescript@5.3.3)
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
eslint: 8.56.0
ts-api-utils: 1.0.3(typescript@5.3.3)
typescript: 5.3.3
@@ -8488,7 +8494,7 @@ packages:
dependencies:
'@typescript-eslint/types': 6.11.0
'@typescript-eslint/visitor-keys': 6.11.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
globby: 11.1.0
is-glob: 4.0.3
semver: 7.5.4
@@ -8509,7 +8515,7 @@ packages:
dependencies:
'@typescript-eslint/types': 6.12.0
'@typescript-eslint/visitor-keys': 6.12.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
globby: 11.1.0
is-glob: 4.0.3
semver: 7.5.4
@@ -8530,7 +8536,7 @@ packages:
dependencies:
'@typescript-eslint/types': 6.14.0
'@typescript-eslint/visitor-keys': 6.14.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
globby: 11.1.0
is-glob: 4.0.3
semver: 7.5.4
@@ -8969,7 +8975,7 @@ packages:
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
engines: {node: '>= 6.0.0'}
dependencies:
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
@@ -8977,7 +8983,7 @@ packages:
resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==}
engines: {node: '>= 14'}
dependencies:
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
dev: false
@@ -9374,7 +9380,7 @@ packages:
resolution: {integrity: sha512-TAlMYvOuwGyLK3PfBb5WKBXZmXz2fVCgv23d6zZFdle/q3gPjmxBaeuC0pY0Dzs5PWMSgfqqEZkrye19GlDTgw==}
dependencies:
archy: 1.0.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
fastq: 1.15.0
transitivePeerDependencies:
- supports-color
@@ -9624,6 +9630,10 @@ packages:
resolution: {integrity: sha512-cRygWd7kGBQO3VEhPiTgq4Wc43ctsM+o46urrmPOiuAe+07fzlSB9OJVdpgDL0jPqXUVQ9ht7aq7kxOeJHRK+w==}
dev: false
+ /bmp-js@0.1.0:
+ resolution: {integrity: sha512-vHdS19CnY3hwiNdkaqk93DvjVLfbEcI8mys4UjuWrlX1haDmroo8o4xCzh4wD6DGV6HxRCyauwhHRqMTfERtjw==}
+ dev: false
+
/bn.js@4.12.0:
resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==}
dev: false
@@ -10829,7 +10839,6 @@ packages:
dependencies:
ms: 2.1.2
supports-color: 5.5.0
- dev: true
/debug@4.3.4(supports-color@8.1.1):
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
@@ -10842,6 +10851,7 @@ packages:
dependencies:
ms: 2.1.2
supports-color: 8.1.1
+ dev: true
/decamelize-keys@1.1.1:
resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==}
@@ -11054,7 +11064,7 @@ packages:
hasBin: true
dependencies:
address: 1.2.2
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
dev: true
@@ -11375,7 +11385,7 @@ packages:
peerDependencies:
esbuild: '>=0.12 <1'
dependencies:
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
esbuild: 0.18.17
transitivePeerDependencies:
- supports-color
@@ -11657,7 +11667,7 @@ packages:
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.3
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
doctrine: 3.0.0
escape-string-regexp: 4.0.0
eslint-scope: 7.2.2
@@ -11704,7 +11714,7 @@ packages:
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.3
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
doctrine: 3.0.0
escape-string-regexp: 4.0.0
eslint-scope: 7.2.2
@@ -11751,7 +11761,7 @@ packages:
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.3
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
doctrine: 3.0.0
escape-string-regexp: 4.0.0
eslint-scope: 7.2.2
@@ -12389,7 +12399,7 @@ packages:
debug:
optional: true
dependencies:
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
/for-each@0.3.3:
resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==}
@@ -13038,7 +13048,7 @@ packages:
engines: {node: '>= 14'}
dependencies:
agent-base: 7.1.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
dev: false
@@ -13079,7 +13089,7 @@ packages:
engines: {node: '>= 6.0.0'}
dependencies:
agent-base: 5.1.1
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
dev: true
@@ -13089,7 +13099,7 @@ packages:
engines: {node: '>= 6'}
dependencies:
agent-base: 6.0.2
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
@@ -13098,7 +13108,7 @@ packages:
engines: {node: '>= 14'}
dependencies:
agent-base: 7.1.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
dev: false
@@ -13108,7 +13118,7 @@ packages:
engines: {node: '>= 14'}
dependencies:
agent-base: 7.1.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
dev: false
@@ -13258,7 +13268,7 @@ packages:
dependencies:
'@ioredis/commands': 1.2.0
cluster-key-slot: 1.1.2
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
denque: 2.1.0
lodash.defaults: 4.2.0
lodash.isarguments: 3.1.0
@@ -13387,6 +13397,10 @@ packages:
hasBin: true
dev: true
+ /is-electron@2.2.2:
+ resolution: {integrity: sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg==}
+ dev: false
+
/is-expression@4.0.0:
resolution: {integrity: sha512-zMIXX63sxzG3XrkHkrAPvm/OVZVSCPNkwMHU8oTX7/U3AL78I0QXCEICXUM13BIa8TYGZ68PiTKfQz3yaTNr4A==}
dependencies:
@@ -13586,6 +13600,10 @@ packages:
engines: {node: '>=10'}
dev: true
+ /is-url@1.2.4:
+ resolution: {integrity: sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==}
+ dev: false
+
/is-weakmap@2.0.1:
resolution: {integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==}
dev: true
@@ -13687,7 +13705,7 @@ packages:
resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==}
engines: {node: '>=10'}
dependencies:
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
istanbul-lib-coverage: 3.2.0
source-map: 0.6.1
transitivePeerDependencies:
@@ -14363,7 +14381,7 @@ packages:
resolution: {integrity: sha512-pJ4XLQP4Q9HTxl6RVDLJ8Cyh1uitSs0CzDBAz1uoJ4sRD/Bk7cFSXL1FUXDW3zJ7YnfliJx6eu8Jn283bpZ4Yg==}
engines: {node: '>=10'}
dependencies:
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
rfdc: 1.3.0
uri-js: 4.4.1
transitivePeerDependencies:
@@ -15720,6 +15738,11 @@ packages:
yargs-parser: 21.1.1
dev: true
+ /opencollective-postinstall@2.0.3:
+ resolution: {integrity: sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==}
+ hasBin: true
+ dev: false
+
/opentype.js@0.4.11:
resolution: {integrity: sha512-GthxucX/6aftfLdeU5Ho7o7zmQcC8uVtqdcelVq12X++ndxwBZG8Xb5rFEKT7nEcWDD2P1x+TNuJ70jtj1Mbpw==}
hasBin: true
@@ -16881,7 +16904,7 @@ packages:
engines: {node: '>=8.16.0'}
dependencies:
'@types/mime-types': 2.1.4
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
extract-zip: 1.7.0
https-proxy-agent: 4.0.0
mime: 2.6.0
@@ -17864,7 +17887,7 @@ packages:
dependencies:
'@hapi/hoek': 10.0.1
'@hapi/wreck': 18.0.1
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
joi: 17.7.0
transitivePeerDependencies:
- supports-color
@@ -18064,7 +18087,7 @@ packages:
engines: {node: '>= 14'}
dependencies:
agent-base: 7.1.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
socks: 2.7.1
transitivePeerDependencies:
- supports-color
@@ -18217,7 +18240,7 @@ packages:
arg: 5.0.2
bluebird: 3.7.2
check-more-types: 2.24.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
execa: 5.1.1
lazy-ass: 1.6.0
ps-tree: 1.2.0
@@ -18619,6 +18642,27 @@ packages:
commander: 2.20.3
source-map-support: 0.5.21
+ /tesseract.js-core@5.0.0:
+ resolution: {integrity: sha512-lJur5LzjinW5VYMKlVNnBU2JPLpO+A9VqAYBeuV+ZgH0hKvsnm+536Yyp+/zRTBdLe7D6Kok0FN9g+TE4J8qGA==}
+
+ /tesseract.js@5.0.4:
+ resolution: {integrity: sha512-GCIoSQMZlvTP2AaHrjUOH29/oyO7ZyHVe+BhTexEcO7/nDClRVDRjl2sYJLOWSSNbTDrm5q2m1+gfaf3lUrZ5Q==}
+ requiresBuild: true
+ dependencies:
+ bmp-js: 0.1.0
+ idb-keyval: 6.2.1
+ is-electron: 2.2.2
+ is-url: 1.2.4
+ node-fetch: 2.7.0
+ opencollective-postinstall: 2.0.3
+ regenerator-runtime: 0.13.11
+ tesseract.js-core: 5.0.0
+ wasm-feature-detect: 1.6.1
+ zlibjs: 0.3.1
+ transitivePeerDependencies:
+ - encoding
+ dev: false
+
/test-exclude@6.0.0:
resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==}
engines: {node: '>=8'}
@@ -19124,7 +19168,7 @@ packages:
chalk: 4.1.2
cli-highlight: 2.1.11
date-fns: 2.30.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
dotenv: 16.0.3
glob: 8.1.0
ioredis: 5.3.2
@@ -19483,7 +19527,7 @@ packages:
hasBin: true
dependencies:
cac: 6.7.14
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
mlly: 1.4.0
pathe: 1.1.1
picocolors: 1.0.0
@@ -19595,7 +19639,7 @@ packages:
acorn-walk: 8.2.0
cac: 6.7.14
chai: 4.3.10
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
happy-dom: 10.0.3
local-pkg: 0.4.3
magic-string: 0.30.3
@@ -19675,7 +19719,7 @@ packages:
peerDependencies:
eslint: '>=6.0.0'
dependencies:
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@5.5.0)
eslint: 8.56.0
eslint-scope: 7.2.2
eslint-visitor-keys: 3.4.3
@@ -19765,6 +19809,10 @@ packages:
makeerror: 1.0.12
dev: true
+ /wasm-feature-detect@1.6.1:
+ resolution: {integrity: sha512-R1i9ED8UlLu/foILNB1ck9XS63vdtqU/tP1MCugVekETp/ySCrBZRk5I/zI67cI1wlQYeSonNm1PLjDHZDNg6g==}
+ dev: false
+
/watchpack@2.4.0:
resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==}
engines: {node: '>=10.13.0'}
@@ -20199,6 +20247,10 @@ packages:
readable-stream: 3.6.0
dev: false
+ /zlibjs@0.3.1:
+ resolution: {integrity: sha512-+J9RrgTKOmlxFSDHo0pI1xM6BLVUv+o0ZT9ANtCxGkjIVCCUdx9alUF8Gm+dGLKbkkkidWIHFDZHDMpfITt4+w==}
+ dev: false
+
github.com/aiscript-dev/aiscript-vscode/b5a8aa0ad927831a0b867d1c183460a14e6c48cd:
resolution: {tarball: https://codeload.github.com/aiscript-dev/aiscript-vscode/tar.gz/b5a8aa0ad927831a0b867d1c183460a14e6c48cd}
name: aiscript-vscode
diff --git a/scripts/build-assets.mjs b/scripts/build-assets.mjs
index 22f0871ca..91a76773e 100644
--- a/scripts/build-assets.mjs
+++ b/scripts/build-assets.mjs
@@ -42,6 +42,15 @@ async function copyFrontendShikiAssets() {
await fs.cp('./packages/frontend/node_modules/shiki/themes', './built/_frontend_dist_/shiki/themes', { dereference: true, recursive: true });
}
+async function copyFrontendTesseractAssets() {
+ // https://github.com/naptha/tesseract.js/blob/master/docs/local-installation.md
+ await fs.cp('./packages/frontend/node_modules/tesseract.js/dist/worker.min.js', './built/_frontend_dist_/tesseract/worker.min.js', { dereference: true, recursive: true });
+ await fs.cp('./packages/frontend/node_modules/tesseract.js-core/tesseract-core.wasm.js', './built/_frontend_dist_/tesseract/core/tesseract-core.wasm.js', { dereference: true, recursive: true });
+ await fs.cp('./packages/frontend/node_modules/tesseract.js-core/tesseract-core-simd.wasm.js', './built/_frontend_dist_/tesseract/core/tesseract-core-simd.wasm.js', { dereference: true, recursive: true });
+ await fs.cp('./packages/frontend/node_modules/tesseract.js-core/tesseract-core-lstm.wasm.js', './built/_frontend_dist_/tesseract/core/tesseract-core-lstm.wasm.js', { dereference: true, recursive: true });
+ await fs.cp('./packages/frontend/node_modules/tesseract.js-core/tesseract-core-simd-lstm.wasm.js', './built/_frontend_dist_/tesseract/core/tesseract-core-simd-lstm.wasm.js', { dereference: true, recursive: true });
+}
+
async function copyBackendViews() {
await fs.cp('./packages/backend/src/server/web/views', './packages/backend/built/server/web/views', { recursive: true });
}
@@ -82,6 +91,7 @@ async function build() {
copyFrontendTablerIcons(),
copyFrontendLocales(),
copyFrontendShikiAssets(),
+ copyFrontendTesseractAssets(),
copyBackendViews(),
buildBackendScript(),
buildBackendStyle(),