@vectoad/luxebook-react 0.0.0-stage → 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sleman
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,33 @@
1
- # Temporary Holding Version
1
+ # @vectoad/luxebook-react
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A 3D page-flip PDF viewer for React. Give it a PDF and it renders a realistic book: cover, thickness, paper, lighting, and page turns.
4
+
5
+ ```sh
6
+ npm install @vectoad/luxebook-react
7
+ ```
8
+
9
+ ```tsx
10
+ import { LuxeBook } from "@vectoad/luxebook-react";
11
+
12
+ export default function Brochure() {
13
+ return (
14
+ <LuxeBook
15
+ source="/brochure.pdf"
16
+ height={600}
17
+ options={{ lighting: "warm", paper: "glossy", coverStyle: "hard" }}
18
+ onReady={(info) => console.log(info)}
19
+ onPageChange={(e) => console.log(e.spread)}
20
+ />
21
+ );
22
+ }
23
+ ```
24
+
25
+ - React 18. Server-side rendering safe: the 3D engine loads in the browser only.
26
+ - `source` is a URL or the PDF bytes.
27
+ - `options` covers appearance (background, cover, thickness, paper, lighting, zoom, rotation), layout (`"auto" | "single" | "double"`), and preview mode (`lastPage`).
28
+ - `overlay` puts your own React content (a contact form, for example) on a page.
29
+ - A `ref` gives you `next()`, `previous()`, `goToPage()`, `open()`, `close()` and `zoomTo()`.
30
+
31
+ Types for every option are included. Not using React? See [`@vectoad/luxebook-core`](https://www.npmjs.com/package/@vectoad/luxebook-core).
32
+
33
+ MIT license. Source: https://github.com/Vectoad/luxebook
@@ -0,0 +1,61 @@
1
+ import * as react from 'react';
2
+ import { CSSProperties, ReactNode } from 'react';
3
+ import { LuxeBookViewer } from '@vectoad/luxebook-core';
4
+ import { PdfSource, ViewerOptions, DocumentInfo, PageChangeEvent, LuxeBookError, BookClickEvent, BookState, OverlayPage } from '@vectoad/luxebook-types';
5
+ export { AppearanceOptions, BookClickEvent, BookCover, BookState, DocumentInfo, LookPreset, LuxeBookError, OverlayPage, PRESETS, PageChangeEvent, PdfSource, PresetName, StateLook, ViewerOptions } from '@vectoad/luxebook-types';
6
+
7
+ interface LuxeBookProps {
8
+ /** PDF URL or bytes. Changing it loads the new document into the same viewer. */
9
+ source: PdfSource;
10
+ width?: number | string;
11
+ height?: number | string;
12
+ /**
13
+ * Viewer config. Appearance options (background, cover, thickness, zoom,
14
+ * rotation…) update live; changing any other option recreates the viewer.
15
+ */
16
+ options?: ViewerOptions;
17
+ className?: string;
18
+ style?: CSSProperties;
19
+ onReady?: (info: DocumentInfo) => void;
20
+ onPageChange?: (event: PageChangeEvent) => void;
21
+ onError?: (error: LuxeBookError) => void;
22
+ /**
23
+ * A tap on the viewer: `e.target` is "page", "cover", "book" or "background".
24
+ * Call `e.preventDefault()` to stop the default action (turning/opening).
25
+ */
26
+ onBookClick?: (event: BookClickEvent) => void;
27
+ /** The book started/finished opening or closing: "opening", "open", "closing", "closed". */
28
+ onBookStateChange?: (state: BookState) => void;
29
+ /** Reading zoom changed (double-click/double-tap a page): 1 when zoomed out. */
30
+ onReadingZoomChange?: (scale: number) => void;
31
+ /**
32
+ * Your own content (a contact form, a video…) laid on a page in
33
+ * perspective. It's live React: state, inputs and handlers all work.
34
+ * Hidden while that page turns or the book is closed.
35
+ */
36
+ overlay?: ReactNode;
37
+ /** Where `overlay` goes: a page number, or `"end"` (the inside of the back cover). Default `"end"`. */
38
+ overlayPage?: OverlayPage;
39
+ }
40
+ interface LuxeBookHandle {
41
+ next(): void;
42
+ previous(): void;
43
+ goToPage(page: number): void;
44
+ /** Open the book (animated). */
45
+ open(): void;
46
+ /** Close the book (animated), returning it to its closed look. */
47
+ close(): void;
48
+ /** Reading zoom: `scale`× around a client point (default centre); `zoomTo(1)` zooms out. */
49
+ zoomTo(scale: number, clientX?: number, clientY?: number): void;
50
+ /** The underlying viewer, once created on the client. */
51
+ readonly viewer: LuxeBookViewer | null;
52
+ }
53
+ /**
54
+ * React 18 adapter. Renders a plain <div> (SSR-safe); the engine, Three.js
55
+ * and PDF.js are imported in an effect, so they only ever load in the
56
+ * browser and are code-split from the host bundle. React never sees
57
+ * animation frames: the viewer owns its render loop.
58
+ */
59
+ declare const LuxeBook: react.ForwardRefExoticComponent<LuxeBookProps & react.RefAttributes<LuxeBookHandle>>;
60
+
61
+ export { LuxeBook, type LuxeBookHandle, type LuxeBookProps };
package/dist/index.js ADDED
@@ -0,0 +1,97 @@
1
+ "use client";
2
+
3
+ // src/index.tsx
4
+ import { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
5
+ import { createPortal } from "react-dom";
6
+ import { APPEARANCE_KEYS } from "@vectoad/luxebook-types";
7
+ import { PRESETS } from "@vectoad/luxebook-types";
8
+ import { jsx } from "react/jsx-runtime";
9
+ var isAppearanceKey = (k) => APPEARANCE_KEYS.includes(k);
10
+ var LuxeBook = forwardRef(function LuxeBook2({ source, width = "100%", height = 600, options, className, style, onReady, onPageChange, onError, onBookClick, onBookStateChange, onReadingZoomChange, overlay, overlayPage = "end" }, ref) {
11
+ const container = useRef(null);
12
+ const viewerRef = useRef(null);
13
+ const viewerPromise = useRef(null);
14
+ const callbacks = useRef({ onReady, onPageChange, onError, onBookClick, onBookStateChange, onReadingZoomChange });
15
+ callbacks.current = { onReady, onPageChange, onError, onBookClick, onBookStateChange, onReadingZoomChange };
16
+ const entries = Object.entries(options ?? {});
17
+ const optionsKey = JSON.stringify(Object.fromEntries(entries.filter(([k]) => !isAppearanceKey(k))));
18
+ const appearanceKey = JSON.stringify(Object.fromEntries(entries.filter(([k]) => isAppearanceKey(k))));
19
+ const appearance = useRef(appearanceKey);
20
+ appearance.current = appearanceKey;
21
+ useEffect(() => {
22
+ let alive = true;
23
+ const el = container.current;
24
+ const created = import("@vectoad/luxebook-core").then(({ LuxeBookViewer }) => {
25
+ if (!alive) return null;
26
+ try {
27
+ const viewer = new LuxeBookViewer(el, { ...JSON.parse(optionsKey), ...JSON.parse(appearance.current) });
28
+ viewer.on("ready", (info) => callbacks.current.onReady?.(info));
29
+ viewer.on("pagechange", (e) => callbacks.current.onPageChange?.(e));
30
+ viewer.on("error", (e) => callbacks.current.onError?.(e));
31
+ viewer.on("click", (e) => callbacks.current.onBookClick?.(e));
32
+ viewer.on("bookstate", (e) => callbacks.current.onBookStateChange?.(e.state));
33
+ viewer.on("readingzoom", (e) => callbacks.current.onReadingZoomChange?.(e.scale));
34
+ viewerRef.current = viewer;
35
+ return viewer;
36
+ } catch (err) {
37
+ callbacks.current.onError?.(err);
38
+ return null;
39
+ }
40
+ });
41
+ viewerPromise.current = created;
42
+ return () => {
43
+ alive = false;
44
+ viewerRef.current = null;
45
+ void created.then((v) => v?.destroy());
46
+ };
47
+ }, [optionsKey]);
48
+ useEffect(() => {
49
+ void viewerPromise.current?.then((v) => {
50
+ try {
51
+ v?.setOptions(JSON.parse(appearanceKey));
52
+ } catch (err) {
53
+ callbacks.current.onError?.(err);
54
+ }
55
+ });
56
+ }, [appearanceKey]);
57
+ const [overlayHost, setOverlayHost] = useState(null);
58
+ useEffect(() => {
59
+ const host = document.createElement("div");
60
+ Object.assign(host.style, { width: "100%", height: "100%" });
61
+ setOverlayHost(host);
62
+ }, []);
63
+ const hasOverlay = overlay != null && overlay !== false;
64
+ useEffect(() => {
65
+ void viewerPromise.current?.then((v) => {
66
+ try {
67
+ v?.setOverlay(hasOverlay ? overlayHost : null, { page: overlayPage });
68
+ } catch (err) {
69
+ callbacks.current.onError?.(err);
70
+ }
71
+ });
72
+ }, [overlayHost, hasOverlay, overlayPage, optionsKey]);
73
+ useEffect(() => {
74
+ void viewerPromise.current?.then((v) => v?.load(source).catch(() => void 0));
75
+ }, [source, optionsKey]);
76
+ useImperativeHandle(
77
+ ref,
78
+ () => ({
79
+ next: () => viewerRef.current?.next(),
80
+ previous: () => viewerRef.current?.previous(),
81
+ goToPage: (page) => viewerRef.current?.goToPage(page),
82
+ open: () => viewerRef.current?.open(),
83
+ close: () => viewerRef.current?.close(),
84
+ zoomTo: (scale, clientX, clientY) => viewerRef.current?.zoomTo(scale, clientX, clientY),
85
+ get viewer() {
86
+ return viewerRef.current;
87
+ }
88
+ }),
89
+ []
90
+ );
91
+ return /* @__PURE__ */ jsx("div", { ref: container, className, style: { position: "relative", width, height, ...style }, children: overlayHost && hasOverlay && createPortal(overlay, overlayHost) });
92
+ });
93
+ export {
94
+ LuxeBook,
95
+ PRESETS
96
+ };
97
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, useEffect, useImperativeHandle, useRef, useState, type CSSProperties, type ReactNode } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport type { LuxeBookViewer } from \"@vectoad/luxebook-core\";\nimport { APPEARANCE_KEYS, type BookClickEvent, type BookState, type DocumentInfo, type LuxeBookError, type OverlayPage, type PageChangeEvent, type PdfSource, type ViewerOptions } from \"@vectoad/luxebook-types\";\n\nexport { PRESETS } from \"@vectoad/luxebook-types\";\nexport type { AppearanceOptions, BookClickEvent, BookCover, BookState, StateLook, LookPreset, PresetName, DocumentInfo, LuxeBookError, OverlayPage, PageChangeEvent, PdfSource, ViewerOptions } from \"@vectoad/luxebook-types\";\n\nconst isAppearanceKey = (k: string) => (APPEARANCE_KEYS as readonly string[]).includes(k);\n\nexport interface LuxeBookProps {\n /** PDF URL or bytes. Changing it loads the new document into the same viewer. */\n source: PdfSource;\n width?: number | string;\n height?: number | string;\n /**\n * Viewer config. Appearance options (background, cover, thickness, zoom,\n * rotation…) update live; changing any other option recreates the viewer.\n */\n options?: ViewerOptions;\n className?: string;\n style?: CSSProperties;\n onReady?: (info: DocumentInfo) => void;\n onPageChange?: (event: PageChangeEvent) => void;\n onError?: (error: LuxeBookError) => void;\n /**\n * A tap on the viewer: `e.target` is \"page\", \"cover\", \"book\" or \"background\".\n * Call `e.preventDefault()` to stop the default action (turning/opening).\n */\n onBookClick?: (event: BookClickEvent) => void;\n /** The book started/finished opening or closing: \"opening\", \"open\", \"closing\", \"closed\". */\n onBookStateChange?: (state: BookState) => void;\n /** Reading zoom changed (double-click/double-tap a page): 1 when zoomed out. */\n onReadingZoomChange?: (scale: number) => void;\n /**\n * Your own content (a contact form, a video…) laid on a page in\n * perspective. It's live React: state, inputs and handlers all work.\n * Hidden while that page turns or the book is closed.\n */\n overlay?: ReactNode;\n /** Where `overlay` goes: a page number, or `\"end\"` (the inside of the back cover). Default `\"end\"`. */\n overlayPage?: OverlayPage;\n}\n\nexport interface LuxeBookHandle {\n next(): void;\n previous(): void;\n goToPage(page: number): void;\n /** Open the book (animated). */\n open(): void;\n /** Close the book (animated), returning it to its closed look. */\n close(): void;\n /** Reading zoom: `scale`× around a client point (default centre); `zoomTo(1)` zooms out. */\n zoomTo(scale: number, clientX?: number, clientY?: number): void;\n /** The underlying viewer, once created on the client. */\n readonly viewer: LuxeBookViewer | null;\n}\n\n/**\n * React 18 adapter. Renders a plain <div> (SSR-safe); the engine, Three.js\n * and PDF.js are imported in an effect, so they only ever load in the\n * browser and are code-split from the host bundle. React never sees\n * animation frames: the viewer owns its render loop.\n */\nexport const LuxeBook = forwardRef<LuxeBookHandle, LuxeBookProps>(function LuxeBook(\n { source, width = \"100%\", height = 600, options, className, style, onReady, onPageChange, onError, onBookClick, onBookStateChange, onReadingZoomChange, overlay, overlayPage = \"end\" },\n ref,\n) {\n const container = useRef<HTMLDivElement>(null);\n const viewerRef = useRef<LuxeBookViewer | null>(null);\n const viewerPromise = useRef<Promise<LuxeBookViewer | null> | null>(null);\n const callbacks = useRef({ onReady, onPageChange, onError, onBookClick, onBookStateChange, onReadingZoomChange });\n callbacks.current = { onReady, onPageChange, onError, onBookClick, onBookStateChange, onReadingZoomChange };\n\n // Options are compared by value so inline object literals don't recreate the viewer.\n const entries = Object.entries(options ?? {});\n const optionsKey = JSON.stringify(Object.fromEntries(entries.filter(([k]) => !isAppearanceKey(k))));\n const appearanceKey = JSON.stringify(Object.fromEntries(entries.filter(([k]) => isAppearanceKey(k))));\n const appearance = useRef(appearanceKey);\n appearance.current = appearanceKey;\n\n useEffect(() => {\n let alive = true;\n const el = container.current!;\n const created = import(\"@vectoad/luxebook-core\").then(({ LuxeBookViewer }) => {\n if (!alive) return null;\n try {\n const viewer = new LuxeBookViewer(el, { ...JSON.parse(optionsKey), ...JSON.parse(appearance.current) } as ViewerOptions);\n viewer.on(\"ready\", (info) => callbacks.current.onReady?.(info));\n viewer.on(\"pagechange\", (e) => callbacks.current.onPageChange?.(e));\n viewer.on(\"error\", (e) => callbacks.current.onError?.(e));\n viewer.on(\"click\", (e) => callbacks.current.onBookClick?.(e));\n viewer.on(\"bookstate\", (e) => callbacks.current.onBookStateChange?.(e.state));\n viewer.on(\"readingzoom\", (e) => callbacks.current.onReadingZoomChange?.(e.scale));\n viewerRef.current = viewer;\n return viewer;\n } catch (err) {\n callbacks.current.onError?.(err as LuxeBookError);\n return null;\n }\n });\n viewerPromise.current = created;\n return () => {\n alive = false;\n viewerRef.current = null;\n void created.then((v) => v?.destroy());\n };\n }, [optionsKey]);\n\n useEffect(() => {\n void viewerPromise.current?.then((v) => {\n try {\n v?.setOptions(JSON.parse(appearanceKey));\n } catch (err) {\n callbacks.current.onError?.(err as LuxeBookError);\n }\n });\n }, [appearanceKey]);\n\n // Created after mount: portals can't render on the server.\n const [overlayHost, setOverlayHost] = useState<HTMLDivElement | null>(null);\n useEffect(() => {\n const host = document.createElement(\"div\");\n Object.assign(host.style, { width: \"100%\", height: \"100%\" });\n setOverlayHost(host);\n }, []);\n const hasOverlay = overlay != null && overlay !== false;\n useEffect(() => {\n void viewerPromise.current?.then((v) => {\n try {\n v?.setOverlay(hasOverlay ? overlayHost : null, { page: overlayPage });\n } catch (err) {\n callbacks.current.onError?.(err as LuxeBookError);\n }\n });\n }, [overlayHost, hasOverlay, overlayPage, optionsKey]);\n\n useEffect(() => {\n // Errors (other than superseded loads) arrive through the \"error\" event.\n void viewerPromise.current?.then((v) => v?.load(source).catch(() => undefined));\n }, [source, optionsKey]);\n\n useImperativeHandle(\n ref,\n () => ({\n next: () => viewerRef.current?.next(),\n previous: () => viewerRef.current?.previous(),\n goToPage: (page: number) => viewerRef.current?.goToPage(page),\n open: () => viewerRef.current?.open(),\n close: () => viewerRef.current?.close(),\n zoomTo: (scale: number, clientX?: number, clientY?: number) => viewerRef.current?.zoomTo(scale, clientX, clientY),\n get viewer() {\n return viewerRef.current;\n },\n }),\n [],\n );\n\n return (\n <div ref={container} className={className} style={{ position: \"relative\", width, height, ...style }}>\n {overlayHost && hasOverlay && createPortal(overlay, overlayHost)}\n </div>\n );\n});\n"],"mappings":";;;AACA,SAAS,YAAY,WAAW,qBAAqB,QAAQ,gBAAoD;AACjH,SAAS,oBAAoB;AAE7B,SAAS,uBAA+K;AAEx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,KAAK;AACZ,kBAAU,QAAQ,UAAU,GAAoB;AAAA,MAClD;AAAA,IACF,CAAC;AAAA,EACH,GAAG,CAAC,aAAa,YAAY,aAAa,UAAU,CAAC;AAErD,YAAU,MAAM;AAEd,SAAK,cAAc,SAAS,KAAK,CAAC,MAAM,GAAG,KAAK,MAAM,EAAE,MAAM,MAAM,MAAS,CAAC;AAAA,EAChF,GAAG,CAAC,QAAQ,UAAU,CAAC;AAEvB;AAAA,IACE;AAAA,IACA,OAAO;AAAA,MACL,MAAM,MAAM,UAAU,SAAS,KAAK;AAAA,MACpC,UAAU,MAAM,UAAU,SAAS,SAAS;AAAA,MAC5C,UAAU,CAAC,SAAiB,UAAU,SAAS,SAAS,IAAI;AAAA,MAC5D,MAAM,MAAM,UAAU,SAAS,KAAK;AAAA,MACpC,OAAO,MAAM,UAAU,SAAS,MAAM;AAAA,MACtC,QAAQ,CAAC,OAAe,SAAkB,YAAqB,UAAU,SAAS,OAAO,OAAO,SAAS,OAAO;AAAA,MAChH,IAAI,SAAS;AACX,eAAO,UAAU;AAAA,MACnB;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AAEA,SACE,oBAAC,SAAI,KAAK,WAAW,WAAsB,OAAO,EAAE,UAAU,YAAY,OAAO,QAAQ,GAAG,MAAM,GAC/F,yBAAe,cAAc,aAAa,SAAS,WAAW,GACjE;AAEJ,CAAC;","names":["LuxeBook"]}
package/package.json CHANGED
@@ -1,6 +1,44 @@
1
1
  {
2
2
  "name": "@vectoad/luxebook-react",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "exports": {
8
+ ".": {
9
+ "luxebook-source": "./src/index.tsx",
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "types": "./dist/index.d.ts",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "dependencies": {
19
+ "@vectoad/luxebook-types": "0.1.0",
20
+ "@vectoad/luxebook-core": "0.1.0"
21
+ },
22
+ "devDependencies": {
23
+ "react": "18.3.1",
24
+ "@types/react": "18.3.31",
25
+ "react-dom": "18.3.1",
26
+ "@types/react-dom": "18.3.7"
27
+ },
28
+ "peerDependencies": {
29
+ "react": "^18.2.0",
30
+ "react-dom": "^18.2.0"
31
+ },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/Vectoad/luxebook.git",
35
+ "directory": "packages/react"
36
+ },
37
+ "publishConfig": {
38
+ "registry": "https://registry.npmjs.org",
39
+ "access": "public"
40
+ },
41
+ "scripts": {
42
+ "build": "tsup src/index.tsx --format esm --dts --clean --sourcemap --external react --external react-dom --tsconfig ../../tsconfig.base.json"
43
+ }
6
44
  }