Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"react-dom": ">=16.8"
},
"dependencies": {
"html2canvas": "^1.4.1",
"html2canvas-pro": "^1.5.8",
"jspdf": "^3.0.1"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ configs.forEach((config) => {
entryPoints: [entryFile],
outfile: `${buildDir}/${config.outFile}`,
bundle: true,
external: ["react", "react-dom", "jspdf", "html2canvas"],
external: ["react", "react-dom", "jspdf", "html2canvas-pro"],
target: "esnext",
format: config.format,
platform: "neutral",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useRef, useCallback } from "react";
import html2canvas from "html2canvas";
import html2canvas from "html2canvas-pro";

import Converter from "./converter";
import { Options, TargetElementFinder, UsePDFResult } from "./types";
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { MutableRefObject } from "react";
import { jsPDFOptions } from "jspdf";
import { Options as Html2CanvasOptions } from "html2canvas";
import { Options as Html2CanvasOptions } from "html2canvas-pro";
import { Margin, Resolution } from "./constants";

export type DetailedMargin = {
Expand Down
10 changes: 9 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3034,7 +3034,15 @@ html-encoding-sniffer@^4.0.0:
dependencies:
whatwg-encoding "^3.1.1"

html2canvas@^1.0.0-rc.5, html2canvas@^1.4.1:
html2canvas-pro@^1.5.8:
version "1.5.8"
resolved "https://registry.yarnpkg.com/html2canvas-pro/-/html2canvas-pro-1.5.8.tgz#d40ba9732c455943fc269f0606895ac00bb0c864"
integrity sha512-bVGAU7IvhBwBlRAmX6QhekX8lsaxmYoF6zIwf/HNlHscjx+KN8jw/U4PQRYqeEVm9+m13hcS1l5ChJB9/e29Lw==
dependencies:
css-line-break "^2.1.0"
text-segmentation "^1.0.3"

html2canvas@^1.0.0-rc.5:
version "1.4.1"
resolved "https://registry.yarnpkg.com/html2canvas/-/html2canvas-1.4.1.tgz#7cef1888311b5011d507794a066041b14669a543"
integrity sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==
Expand Down