Parcourir la source

refactor: Annotation

liutian il y a 3 mois
Parent
commit
8b9e2d5b6f

+ 6 - 6
packages/core/rollup.config.js

@@ -34,12 +34,12 @@ const plugins = [
   })
 ]
 
-plugins.push(
-terser({
-  mangle: {
-    reserved
-  }
-}))
+// plugins.push(
+// terser({
+//   mangle: {
+//     reserved
+//   }
+// }))
 
 export default [{
   input: "./src/worker/compdfkit_worker.js",

+ 16 - 0
packages/core/src/worker/annotations/annotation.ts

@@ -0,0 +1,16 @@
+import { uuid } from 'uuidv4'
+
+class Annotation {
+  id: string;
+  pageNumber: number;
+  constructor({
+    pageNumber,
+  }: {
+    pageNumber: number
+  }) {
+    this.id = uuid()
+    this.pageNumber = pageNumber
+  }
+}
+
+export default Annotation