aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-03-18 22:18:35 -0400
committerbobzel <zzzman@gmail.com>2025-03-18 22:18:35 -0400
commit251bc8c4a36019d719fad9d4bb6548ab04b340fb (patch)
tree6090035d80dfaed85f705c937650cc073b2f472e
parentd774333f15f9df2adf598328993e69fb76a74b50 (diff)
updated iink to latest version
-rw-r--r--package-lock.json20
-rw-r--r--package.json8
-rw-r--r--src/client/views/InkTranscription.tsx23
3 files changed, 26 insertions, 25 deletions
diff --git a/package-lock.json b/package-lock.json
index 366a5b0b9..c40bfd738 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12,7 +12,7 @@
"packages/*"
],
"dependencies": {
- "@adobe/react-spectrum": "^3.39.0",
+ "@adobe/react-spectrum": "^3.40.1",
"@azure/storage-blob": "^12.17.0",
"@babel/preset-env": "^7.23.5",
"@babel/preset-react": "^7.23.3",
@@ -33,13 +33,13 @@
"@fullcalendar/multimonth": "^6.1.10",
"@fullcalendar/timegrid": "^6.1.15",
"@internationalized/date": "^3.5.0",
- "@mozilla/readability": "^0.5.0",
+ "@mozilla/readability": "^0.6.0",
"@mui/icons-material": "^6.0.1",
"@mui/material": "^6.0.1",
"@octokit/core": "^6.0.1",
"@pinecone-database/pinecone": "^2.2.2",
"@react-google-maps/api": "^2.19.2",
- "@react-spring/web": "^9.7.3",
+ "@react-spring/web": "^9.7.5",
"@turf/turf": "^7.1.0",
"@types/bezier-js": "^4.1.3",
"@types/brotli": "^1.3.4",
@@ -145,7 +145,7 @@
"https": "^1.0.0",
"https-browserify": "^1.0.0",
"i": "^0.3.7",
- "iink-ts": "^2.0.1",
+ "iink-ts": "^3.0.0",
"image-data-uri": "^2.0.1",
"image-size": "^2.0.0",
"image-size-stream": "^1.1.0",
@@ -5453,9 +5453,9 @@
}
},
"node_modules/@mozilla/readability": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/@mozilla/readability/-/readability-0.5.0.tgz",
- "integrity": "sha512-Z+CZ3QaosfFaTqvhQsIktyGrjFjSC0Fa4EMph4mqKnWhmyoGICsV/8QK+8HpXut6zV7zwfWwqDmEjtk1Qf6EgQ==",
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/@mozilla/readability/-/readability-0.6.0.tgz",
+ "integrity": "sha512-juG5VWh4qAivzTAeMzvY9xs9HY5rAcr2E4I7tiSSCokRFi7XIZCAu92ZkSTsIj1OPceCifL3cpfteP3pDT9/QQ==",
"license": "Apache-2.0",
"engines": {
"node": ">=14.0.0"
@@ -24105,9 +24105,9 @@
"license": "ISC"
},
"node_modules/iink-ts": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/iink-ts/-/iink-ts-2.0.1.tgz",
- "integrity": "sha512-pMsy3Fg8uscenbjHwmbVSQfTA69pX194PYRyZ0mjy/hqJUq+cGPlDXQ+xwhwScAEG3PJsql6UZAystU/Q2dhGQ==",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/iink-ts/-/iink-ts-3.0.0.tgz",
+ "integrity": "sha512-EfmLwn2JrRryE87ut7GIHPRBHhNosBTKLrmJoO473inK5X+5dD53xQquS1a3tdNWao6VEGKN7r8D+rNGjZhpAQ==",
"license": "Apache-2.0",
"dependencies": {
"json-css": "^1.5.6"
diff --git a/package.json b/package.json
index be175d338..b12c3f8bc 100644
--- a/package.json
+++ b/package.json
@@ -96,7 +96,7 @@
"webpack-dev-server": "^5.0.4"
},
"dependencies": {
- "@adobe/react-spectrum": "^3.39.0",
+ "@adobe/react-spectrum": "^3.40.1",
"@azure/storage-blob": "^12.17.0",
"@babel/preset-env": "^7.23.5",
"@babel/preset-react": "^7.23.3",
@@ -117,13 +117,13 @@
"@fullcalendar/multimonth": "^6.1.10",
"@fullcalendar/timegrid": "^6.1.15",
"@internationalized/date": "^3.5.0",
- "@mozilla/readability": "^0.5.0",
+ "@mozilla/readability": "^0.6.0",
"@mui/icons-material": "^6.0.1",
"@mui/material": "^6.0.1",
"@octokit/core": "^6.0.1",
"@pinecone-database/pinecone": "^2.2.2",
"@react-google-maps/api": "^2.19.2",
- "@react-spring/web": "^9.7.3",
+ "@react-spring/web": "^9.7.5",
"@turf/turf": "^7.1.0",
"@types/bezier-js": "^4.1.3",
"@types/brotli": "^1.3.4",
@@ -229,7 +229,7 @@
"https": "^1.0.0",
"https-browserify": "^1.0.0",
"i": "^0.3.7",
- "iink-ts": "^2.0.1",
+ "iink-ts": "^3.0.0",
"image-data-uri": "^2.0.1",
"image-size": "^2.0.0",
"image-size-stream": "^1.1.0",
diff --git a/src/client/views/InkTranscription.tsx b/src/client/views/InkTranscription.tsx
index e800e0ae3..29cbe8e2d 100644
--- a/src/client/views/InkTranscription.tsx
+++ b/src/client/views/InkTranscription.tsx
@@ -48,7 +48,7 @@ export class InkTranscription extends React.Component {
const options = {
configuration: {
server: {
- scheme: 'https',
+ scheme: 'https' as iink.TScheme,
host: 'cloud.myscript.com',
applicationKey: 'c0901093-5ac5-4454-8e64-0def0f13f2ca',
hmacKey: 'f6465cca-1856-4492-a6a4-e2395841be2f',
@@ -56,13 +56,14 @@ export class InkTranscription extends React.Component {
},
recognition: {
type: 'TEXT',
+ lang: 'en_US',
+ text: {
+ mimeTypes: ['text/plain'] as 'text/plain'[],
+ },
},
},
};
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- const editor = new iink.Editor(r, options as any);
-
- await editor.initialize();
+ await iink.Editor.load(r, 'INKV2', options);
this._textRegister = r;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -78,7 +79,7 @@ export class InkTranscription extends React.Component {
const options = {
configuration: {
server: {
- scheme: 'https',
+ scheme: 'https' as iink.TScheme,
host: 'cloud.myscript.com',
applicationKey: 'c0901093-5ac5-4454-8e64-0def0f13f2ca',
hmacKey: 'f6465cca-1856-4492-a6a4-e2395841be2f',
@@ -86,14 +87,14 @@ export class InkTranscription extends React.Component {
},
recognition: {
type: 'TEXT',
+ lang: 'en_US',
+ text: {
+ mimeTypes: ['text/plain'] as 'text/plain'[],
+ },
},
},
};
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- const editor = new iink.Editor(r, options as any);
-
- await editor.initialize();
- this.iinkEditor = editor;
+ this.iinkEditor = await iink.Editor.load(r, 'INKV2', options);
this._textRegister = r;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
r?.addEventListener('exported', (e: any) => this.exportInk(e, this._textRef));