@pdf-viewer/react 1.0.0 → 1.0.1-rc.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,10 +1,10 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { DocumentContextType, RPSrc, CharacterMapConfig, LoadPDFOptions } from '../utils/types';
2
+ import { DocumentContextType, RPSrc, CharacterMap, LoadPDFOptions } from '../utils/types';
3
3
  import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
4
4
  declare const DocumentContext: React.Context<DocumentContextType>;
5
5
  interface Props extends PropsWithChildren, LoadPDFOptions {
6
6
  src?: RPSrc;
7
- characterMap?: CharacterMapConfig;
7
+ characterMap?: CharacterMap;
8
8
  onLoaded?: (pdfDocument: PDFDocumentProxy) => void;
9
9
  }
10
10
  export declare const DocumentProvider: FC<Props>;
@@ -19,5 +19,5 @@ export { useSearchContext } from './contexts/SearchContext';
19
19
  export { usePdfProperties } from './utils/hooks/usePdfProperties';
20
20
  export { useFullScreenContext } from './contexts/FullScreenContext';
21
21
  export { type PDFDocumentProxy } from 'pdfjs-dist';
22
- export type { RPConfigProps, RPThemeProps, RPProviderProps, RPLayoutProps, RPIcons, RPSlots, DarkModeProps, ZoomProps, ViewModeProps, DownloadToolProps, OpenFileToolProps, ScrollModeProps, PageNavigationToolProps, PrintToolProps, Localization, MatchValue } from './utils/types';
22
+ export type { CharacterMap, DarkModeProps, DownloadToolProps, FullScreenToolProps, Localization, MatchValue, OpenFileToolProps, PageNavigationToolProps, PdfPage, PdfProperties, PreparePrintProgress, PrintToolProps, RPConfigProps, RPThemeProps, RPProviderProps, RPLayoutProps, RPIcons, RPSlots, SearchOptions, SetPageResult, ScrollModeProps, ThumbnailToolProps, ViewModeProps, ZoomProps } from './utils/types';
23
23
  export { ViewMode, ScrollMode, ZoomLevel } from './utils/types';
@@ -1,6 +1,6 @@
1
1
  import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api.js';
2
- import { PdfPage, RPSrc, CharacterMapConfig, LoadPDFOptions } from '../types';
3
- export declare const useLoadPdf: (src?: RPSrc, characterMap?: CharacterMapConfig, options?: LoadPDFOptions) => {
2
+ import { PdfPage, RPSrc, CharacterMap, LoadPDFOptions } from '../types';
3
+ export declare const useLoadPdf: (src?: RPSrc, characterMap?: CharacterMap, options?: LoadPDFOptions) => {
4
4
  pdf: PDFDocumentProxy | undefined;
5
5
  pages: Map<number, PdfPage>;
6
6
  loading: boolean;
@@ -418,14 +418,14 @@ export interface LayerProviderProps extends PropsWithChildren {
418
418
  textLayer?: boolean;
419
419
  }
420
420
  export type RPThemeProps = RPThemeContextType;
421
- export interface CharacterMapConfig {
421
+ export interface CharacterMap {
422
422
  url: string;
423
423
  isCompressed: boolean;
424
424
  }
425
425
  export interface RPProviderProps extends PropsWithChildren, LoadPDFOptions, RPControllerProps {
426
426
  src: RPSrc;
427
427
  workerUrl?: string;
428
- characterMap?: CharacterMapConfig;
428
+ characterMap?: CharacterMap;
429
429
  }
430
430
  export interface RPControllerProps extends PropsWithChildren, DarkModeProviderProps, RotateProviderProps, LayerProviderProps, ZoomProviderProps, PageProviderProps, ViewportProps, ScrollModeProps {
431
431
  initialSearch?: string;
@@ -1,6 +1,6 @@
1
1
  import { useState as g, useCallback as E, useEffect as h } from "react";
2
2
  import { appConsole as l } from "../appConsole.js";
3
- const A = /* @__PURE__ */ new Date("2025-03-04T03:36:27.783Z"), d = "Please visit https://www.react-pdf.dev/license-management/ to generate a new license key.", o = {
3
+ const A = /* @__PURE__ */ new Date("2025-03-04T08:37:41.016Z"), d = "Please visit https://www.react-pdf.dev/license-management/ to generate a new license key.", o = {
4
4
  invalidLicense: `You are currently using without a valid license. ${d}`,
5
5
  mismatchedDomain: `Your license key is not valid for the current domain / IP. ${d}`,
6
6
  expired: `Your license key has expired. ${d}`,
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@pdf-viewer/react",
3
3
  "private": false,
4
- "version": "1.0.0",
4
+ "description": "The PDF Viewer component for React and Next.js",
5
+ "version": "1.0.1-rc.0",
5
6
  "keywords": [
6
7
  "component",
7
8
  "frontend",