@tempots/beatui 0.42.0 → 0.44.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 +1,2 @@
1
1
  export * from './native-pdf-preview';
2
+ export * from './pdfjs-preview';
@@ -1,7 +1,7 @@
1
1
  import { Value } from '@tempots/dom';
2
2
  export interface NativePdfPreviewOptions {
3
3
  /** PDF content blob */
4
- content: Value<Blob>;
4
+ content: Value<Blob> | Value<string> | Value<ArrayBuffer> | Value<Uint8Array>;
5
5
  /** Show/hide toolbar (Chrome only). Default: true */
6
6
  toolbar?: Value<boolean>;
7
7
  /** Initial page number to display (Chrome, Firefox, Safari) */
@@ -10,5 +10,21 @@ export interface NativePdfPreviewOptions {
10
10
  zoom?: Value<number>;
11
11
  /** Zoom fit mode (Chrome only). FitV=vertical, FitH=horizontal, Fit=both */
12
12
  view?: Value<'FitV' | 'FitH' | 'Fit'>;
13
+ /** Page mode (Chrome only). none=normal, thumbs=thumbnail, bookmarks=bookmarks */
14
+ pagemode?: Value<'none' | 'thumbs' | 'bookmarks' | 'attachments' | 'full-screen' | 'optionalcontent'>;
15
+ /** Show/hide scrollbar (Chrome only). Default: true */
16
+ scrollbar?: Value<boolean>;
17
+ /** Show/hide navigation panes (Chrome only). Default: true */
18
+ navpanes?: Value<boolean>;
19
+ /** Search term (Chrome only) */
20
+ search?: Value<string>;
21
+ /** Named destination (Chrome only) */
22
+ nameddest?: Value<string>;
23
+ /** View rectangle (Chrome only) */
24
+ viewrect?: Value<string>;
25
+ /** Highlight search term (Chrome only) */
26
+ highlight?: Value<string>;
27
+ /** Allow fullscreen (Chrome only). Default: true */
28
+ allowfullscreen?: Value<boolean>;
13
29
  }
14
- export declare function NativePdfPreview({ content, toolbar, page, zoom, view, }: NativePdfPreviewOptions): import("@tempots/dom").Renderable;
30
+ export declare function NativePdfPreview({ content, toolbar, page, zoom, view, pagemode, scrollbar, navpanes, search, nameddest, viewrect, highlight, allowfullscreen, }: NativePdfPreviewOptions): import("@tempots/dom").Renderable;
@@ -0,0 +1,34 @@
1
+ import { Value } from '@tempots/dom';
2
+ export interface PDFJSPreviewOptions {
3
+ /** PDF content as Blob, Uint8Array, ArrayBuffer, or URL string */
4
+ content: Value<Blob> | Value<string> | Value<ArrayBuffer> | Value<Uint8Array>;
5
+ /** Initial page number to display (1-based) */
6
+ page?: Value<number>;
7
+ /** Zoom level: 'auto', 'page-fit', 'page-width', or a percentage number (e.g., 150 for 150%) */
8
+ zoom?: Value<'auto' | 'page-fit' | 'page-width' | number>;
9
+ /** Page mode: 'none', 'thumbs', 'bookmarks', 'attachments' */
10
+ pagemode?: Value<'none' | 'thumbs' | 'bookmarks' | 'attachments'>;
11
+ /** Named destination to navigate to */
12
+ nameddest?: Value<string>;
13
+ /** Search term to highlight */
14
+ search?: Value<string>;
15
+ /** Text layer mode: 0=disable, 1=enable, 2=enable for accessibility. Default: 1 */
16
+ textLayerMode?: Value<0 | 1 | 2>;
17
+ /** Sidebar view on load: -1=default, 0=none, 1=thumbs, 2=outline, 3=attachments, 4=layers */
18
+ sidebarViewOnLoad?: Value<-1 | 0 | 1 | 2 | 3 | 4>;
19
+ /** Scroll mode: -1=default, 0=vertical, 1=horizontal, 2=wrapped */
20
+ scrollModeOnLoad?: Value<-1 | 0 | 1 | 2>;
21
+ /** Spread mode: -1=default, 0=none, 1=odd, 2=even */
22
+ spreadModeOnLoad?: Value<-1 | 0 | 1 | 2>;
23
+ /** Enable JavaScript execution in PDFs. Default: true (security consideration) */
24
+ enableScripting?: Value<boolean>;
25
+ /** Enable printing. Default: true */
26
+ enablePrinting?: Value<boolean>;
27
+ /** Custom viewer URL. Default: Mozilla's hosted viewer */
28
+ viewerUrl?: Value<string | null>;
29
+ /** Allow fullscreen. Default: true */
30
+ allowfullscreen?: Value<boolean>;
31
+ /** Custom CSS class for container */
32
+ class?: Value<string | null>;
33
+ }
34
+ export declare function PDFJSPreview({ content, page, zoom, pagemode, nameddest, search, textLayerMode, sidebarViewOnLoad, scrollModeOnLoad, spreadModeOnLoad, enableScripting, enablePrinting, viewerUrl, allowfullscreen, class: customClass, }: PDFJSPreviewOptions): import("@tempots/dom").Renderable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tempots/beatui",
3
- "version": "0.42.0",
3
+ "version": "0.44.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.umd.js",
6
6
  "module": "dist/index.es.js",