소스 검색

refactor: Annotation

liutian 2 달 전
부모
커밋
8b9e2d5b6f
2개의 변경된 파일22개의 추가작업 그리고 6개의 파일을 삭제
  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