🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@react-pdf-kit/viewer

Package Overview
Dependencies
Maintainers
3
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-pdf-kit/viewer - npm Package Compare versions

Comparing version
2.4.0-rc.0
to
2.4.0-rc.1
+11
-11
dist/utils/hooks/useLicense.js

@@ -5,3 +5,3 @@ import { useState as E, useCallback as y, useEffect as b } from "react";

import "../../de_DE-8145915f.js";
const A = /* @__PURE__ */ new Date("2026-04-22T13:37:24.170Z"), w = `-----BEGIN PUBLIC KEY-----
const A = /* @__PURE__ */ new Date("2026-04-24T03:38:22.013Z"), v = `-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvIokvErJ0Fctu0jduSAx

@@ -14,3 +14,3 @@ gr+5Har/VSuZLlOunS28hnlqqA+OF1apHL7RYkjBosS15yvviYdLrVWYHpHnoY4b

kwIDAQAB
-----END PUBLIC KEY-----`, f = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", o = {
-----END PUBLIC KEY-----`, f = "Please visit https://app.react-pdf-kit.dev to generate a new license key.", o = {
invalidLicense: `You are currently using without a valid license. ${f}`,

@@ -36,3 +36,3 @@ mismatchedDomain: `Your license key is not valid for the current domain / IP. ${f}`,

try {
const i = await import("../../index-0b2a9a20.js").then((u) => u.i), e = (i == null ? void 0 : i.default) ?? i, t = e.pki.publicKeyFromPem(w), r = atob(a.data), n = e.util.decode64(a.signature), s = e.md.sha256.create();
const i = await import("../../index-0b2a9a20.js").then((u) => u.i), e = (i == null ? void 0 : i.default) ?? i, t = e.pki.publicKeyFromPem(v), r = atob(a.data), n = e.util.decode64(a.signature), s = e.md.sha256.create();
s.update(r, "utf8");

@@ -56,3 +56,3 @@ const d = e.pss.create({

if ((e = window.crypto) != null && e.subtle) {
const n = S(w), s = await window.crypto.subtle.importKey(
const n = S(v), s = await window.crypto.subtle.importKey(
"spki",

@@ -103,3 +103,3 @@ n,

c.debug(">>> validatedLicense", r);
const { avu: n, exp: s, dmt: d, dm: u, t: g } = r;
const { avu: n, exp: s, dmt: d, dm: u, t: p } = r;
if (!s)

@@ -109,4 +109,4 @@ throw new Error("License is missing expiration timestamp");

throw new Error("Invalid expiration timestamp: value too large");
const v = new Date(s * 1e3), h = (/* @__PURE__ */ new Date()).getTime();
if (v.getTime() < h)
const w = new Date(s * 1e3), h = (/* @__PURE__ */ new Date()).getTime();
if (w.getTime() < h)
throw new Error(o.expired);

@@ -117,10 +117,10 @@ if (!n)

throw new Error("Invalid available until version timestamp: value too large");
const p = new Date(n * 1e3);
if (c.debug("availableUntilTimestamp", p), p.getTime() < A.getTime())
const g = new Date(n * 1e3);
if (c.debug("availableUntilTimestamp", g), g.getTime() < A.getTime())
throw new Error(o.exceededVersion);
if (g !== L.Custom && !N(d, u))
if (p !== L.Custom && !N(d, u))
throw new Error(o.mismatchedDomain);
return {
isValid: !0,
type: g,
type: p,
invalidatedMessage: void 0

@@ -127,0 +127,0 @@ };

{
"name": "@react-pdf-kit/viewer",
"version": "2.4.0-rc.0",
"version": "2.4.0-rc.1",
"private": false,

@@ -5,0 +5,0 @@ "description": "A react-pdf-viewer component for React and Next.js. Suitable for react-pdf document.",