Browse Source

refactor: Annotation

liutian 3 months ago
parent
commit
8b9e2d5b6f
2 changed files with 22 additions and 6 deletions
  1. 6 6
      packages/core/rollup.config.js
  2. 16 0
      packages/core/src/worker/annotations/annotation.ts

+ 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