rotion 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import './Icon.css';
3
3
  export interface IconProps {
4
- name: 'figma' | 'slack' | 'github' | 'file' | 'link' | 'codemerge' | 'circlecheck' | 'circledot';
4
+ name: 'figma' | 'slack' | 'github' | 'file' | 'link' | 'codemerge' | 'circlecheck' | 'circledot' | 'downloadfile';
5
5
  width?: string;
6
6
  height?: string;
7
7
  className?: string;
@@ -0,0 +1,25 @@
1
+ /// <reference types="react" />
2
+ import { PDFDocumentProxy, PDFPageProxy } from 'pdfjs-dist';
3
+ type HookProps = {
4
+ canvasRef: React.RefObject<HTMLCanvasElement | null>;
5
+ file: string;
6
+ onDocumentLoadSuccess?: (document: PDFDocumentProxy) => void;
7
+ onDocumentLoadFail?: () => void;
8
+ onPageLoadSuccess?: (page: PDFPageProxy) => void;
9
+ onPageLoadFail?: () => void;
10
+ onPageRenderSuccess?: (page: PDFPageProxy) => void;
11
+ onPageRenderFail?: () => void;
12
+ scale?: number;
13
+ rotate?: number;
14
+ page?: number;
15
+ cMapUrl?: string;
16
+ cMapPacked?: boolean;
17
+ workerSrc?: string;
18
+ withCredentials?: boolean;
19
+ };
20
+ type HookReturnValues = {
21
+ pdfDocument: PDFDocumentProxy | undefined;
22
+ pdfPage: PDFPageProxy | undefined;
23
+ };
24
+ export declare const usePdf: ({ canvasRef, file, onDocumentLoadSuccess, onDocumentLoadFail, onPageLoadSuccess, onPageLoadFail, onPageRenderSuccess, onPageRenderFail, scale, rotate, page, cMapUrl, cMapPacked, workerSrc, withCredentials, }: HookProps) => HookReturnValues;
25
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rotion",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "license": "MIT",
5
5
  "repository": "linyows/rotion",
6
6
  "description": "This is react components that uses the notion API to display the notion's database and page.",
@@ -65,6 +65,7 @@
65
65
  "file-type": "^19.0.0",
66
66
  "katex": "^0.16.9",
67
67
  "mermaid": "^10.6.1",
68
+ "pdfjs-dist": "^4.2.67",
68
69
  "prismjs": "^1.25.0",
69
70
  "replace-ext": "^2.0.0",
70
71
  "sharp": "^0.33.3"
@@ -120,10 +121,5 @@
120
121
  "typescript": "^5.3.3",
121
122
  "uvu": "^0.5.6"
122
123
  },
123
- "overrides": {
124
- "got": "11.8.5",
125
- "http-cache-semantics": "4.1.1",
126
- "semver-regex": "3.1.4"
127
- },
128
124
  "extends": "@tsconfig/node-lts-strictest-esm"
129
125
  }