@hypercard-ai/hyper-jump 1.0.1 → 1.0.2
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/dist/index.d.ts +4 -23
- package/dist/index.d.ts.map +1 -0
- package/dist/{types-Ce3M8ej7.d.ts → lib/types.d.ts} +6 -6
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/use-element-size.d.ts +6 -0
- package/dist/lib/use-element-size.d.ts.map +1 -0
- package/dist/pdf/constants.d.ts +3 -0
- package/dist/pdf/constants.d.ts.map +1 -0
- package/dist/pdf/controls.d.ts +13 -0
- package/dist/pdf/controls.d.ts.map +1 -0
- package/dist/pdf/error-page.d.ts +3 -0
- package/dist/pdf/error-page.d.ts.map +1 -0
- package/dist/pdf/index.d.ts +3 -12
- package/dist/pdf/index.d.ts.map +1 -0
- package/dist/pdf/loading-page.d.ts +3 -0
- package/dist/pdf/loading-page.d.ts.map +1 -0
- package/dist/pdf/pdf-viewer.d.ts +13 -0
- package/dist/pdf/pdf-viewer.d.ts.map +1 -0
- package/dist/pdf/renderer.d.ts +8 -0
- package/dist/pdf/renderer.d.ts.map +1 -0
- package/dist/pdf/utils.d.ts +6 -0
- package/dist/pdf/utils.d.ts.map +1 -0
- package/dist/pdf/viewer.stories.d.ts +11 -0
- package/dist/pdf/viewer.stories.d.ts.map +1 -0
- package/dist/video/index.d.ts +3 -11
- package/dist/video/index.d.ts.map +1 -0
- package/dist/video/video-viewer.d.ts +10 -0
- package/dist/video/video-viewer.d.ts.map +1 -0
- package/dist/video/viewer.stories.d.ts +9 -0
- package/dist/video/viewer.stories.d.ts.map +1 -0
- package/dist/viewer/viewer.d.ts +20 -0
- package/dist/viewer/viewer.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
interface HyperJumpViewerProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
6
|
-
/** URL of the file to display */
|
|
7
|
-
url: string;
|
|
8
|
-
/** Explicit file type override (e.g. "pdf", "video"). If omitted, detected from URL extension. */
|
|
9
|
-
type?: string;
|
|
10
|
-
/** Renderers that this viewer can use. The first matching renderer wins. */
|
|
11
|
-
renderers: FileRenderer[];
|
|
12
|
-
/** Ref forwarded to the active renderer (e.g. for imperative APIs like jump). */
|
|
13
|
-
ref?: React.Ref<HyperJumpAPI>;
|
|
14
|
-
/** Initial position to show when the content first loads. Meaning depends on renderer (page index for PDF, seconds for video). */
|
|
15
|
-
initialPosition?: number;
|
|
16
|
-
/** Called when the current position changes. Meaning depends on renderer (page index for PDF, seconds for video). */
|
|
17
|
-
onPositionChange?: (position: number) => void;
|
|
18
|
-
/** Additional props forwarded to the matched renderer. */
|
|
19
|
-
rendererProps?: T;
|
|
20
|
-
}
|
|
21
|
-
declare function HyperJumpViewer<T extends Record<string, unknown> = Record<string, unknown>>(props: HyperJumpViewerProps<T>): react_jsx_runtime.JSX.Element;
|
|
22
|
-
|
|
23
|
-
export { FileRenderer, HyperJumpAPI, HyperJumpViewer, type HyperJumpViewerProps };
|
|
1
|
+
export type { FileRenderer, HyperJumpAPI, RendererProps, ZoomConfig, } from "./lib/types";
|
|
2
|
+
export type { HyperJumpViewerProps } from "./viewer/viewer";
|
|
3
|
+
export { HyperJumpViewer } from "./viewer/viewer";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,UAAU,GACV,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
type ZoomMode = "automatic" | "page-width" | "manual";
|
|
2
|
-
interface ZoomConfig {
|
|
2
|
+
export interface ZoomConfig {
|
|
3
3
|
mode: ZoomMode;
|
|
4
4
|
value: number;
|
|
5
5
|
}
|
|
6
6
|
/** Props that the core viewer passes to every renderer. */
|
|
7
|
-
interface RendererProps {
|
|
7
|
+
export interface RendererProps {
|
|
8
8
|
url: string;
|
|
9
9
|
containerWidth: number;
|
|
10
10
|
containerHeight: number;
|
|
@@ -14,12 +14,12 @@ interface RendererProps {
|
|
|
14
14
|
onPositionChange?: (position: number) => void;
|
|
15
15
|
}
|
|
16
16
|
/** Imperative API shared by all renderers. Exposed via ref on HyperJumpViewer. */
|
|
17
|
-
interface HyperJumpAPI {
|
|
17
|
+
export interface HyperJumpAPI {
|
|
18
18
|
/** Jump to a position. Meaning depends on renderer (page index for PDF, seconds for video). */
|
|
19
19
|
jump: (position: number) => void;
|
|
20
20
|
}
|
|
21
21
|
/** A renderer descriptor that tells the core viewer how to handle a file type. */
|
|
22
|
-
interface FileRenderer {
|
|
22
|
+
export interface FileRenderer {
|
|
23
23
|
/** Unique identifier for this renderer type (e.g. "pdf", "video"). */
|
|
24
24
|
type: string;
|
|
25
25
|
/** File extensions this renderer handles, without dots (e.g. ["pdf"]). */
|
|
@@ -27,5 +27,5 @@ interface FileRenderer {
|
|
|
27
27
|
/** The component that renders the file. */
|
|
28
28
|
Component: React.ComponentType<RendererProps & Record<string, unknown>>;
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA,KAAK,QAAQ,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,CAAC;AAEtD,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACd;AAED,2DAA2D;AAC3D,MAAM,WAAW,aAAa;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,kIAAkI;IAClI,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qHAAqH;IACrH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,kFAAkF;AAClF,MAAM,WAAW,YAAY;IAC5B,+FAA+F;IAC/F,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,kFAAkF;AAClF,MAAM,WAAW,YAAY;IAC5B,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,2CAA2C;IAC3C,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-element-size.d.ts","sourceRoot":"","sources":["../../src/lib/use-element-size.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,cAAc;gBAIrC,CAAC,GAAG,IAAI;;;EAoBvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/pdf/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,MAAM,CAAC;AAC/B,eAAO,MAAM,UAAU,MAAM,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./controls.css";
|
|
2
|
+
import type { ZoomConfig } from "../lib/types";
|
|
3
|
+
interface IProps {
|
|
4
|
+
onChangeZoom(value: string): void;
|
|
5
|
+
pageIndex: number;
|
|
6
|
+
numPages: number;
|
|
7
|
+
zoomConfig: ZoomConfig;
|
|
8
|
+
onNextPage(): void;
|
|
9
|
+
onPrevPage(): void;
|
|
10
|
+
}
|
|
11
|
+
export default function PDFViewerControls(props: IProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/pdf/controls.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc/C,UAAU,MAAM;IACf,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,IAAI,IAAI,CAAC;IACnB,UAAU,IAAI,IAAI,CAAC;CACnB;AAsCD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,2CAyDtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-page.d.ts","sourceRoot":"","sources":["../../src/pdf/error-page.tsx"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,MAAM,CAAC,OAAO,UAAU,YAAY,4CAEnC"}
|
package/dist/pdf/index.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type ScrollBehavior = "auto" | "instant" | "smooth";
|
|
5
|
-
interface HyperJumpPdfViewerProps extends RendererProps {
|
|
6
|
-
/** Scroll behavior when navigating between pages (default: "instant") */
|
|
7
|
-
scrollBehavior?: ScrollBehavior;
|
|
8
|
-
}
|
|
9
|
-
/** Renderer descriptor for PDF files. Pass this to HyperJumpViewer's `renderers` prop. */
|
|
10
|
-
declare const PdfRenderer: FileRenderer;
|
|
11
|
-
|
|
12
|
-
export { type HyperJumpPdfViewerAPI, type HyperJumpPdfViewerProps, PdfRenderer, type ScrollBehavior };
|
|
1
|
+
export type { HyperJumpPdfViewerAPI, HyperJumpPdfViewerProps, ScrollBehavior, } from "./pdf-viewer";
|
|
2
|
+
export { PdfRenderer } from "./pdf-viewer";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pdf/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading-page.d.ts","sourceRoot":"","sources":["../../src/pdf/loading-page.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAE5B,MAAM,CAAC,OAAO,UAAU,cAAc,4CAMrC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "react-pdf/dist/Page/AnnotationLayer.css";
|
|
2
|
+
import "react-pdf/dist/Page/TextLayer.css";
|
|
3
|
+
import type { FileRenderer, HyperJumpAPI, RendererProps } from "../lib/types";
|
|
4
|
+
import "./pdf-viewer.css";
|
|
5
|
+
export type HyperJumpPdfViewerAPI = HyperJumpAPI;
|
|
6
|
+
export type ScrollBehavior = "auto" | "instant" | "smooth";
|
|
7
|
+
export interface HyperJumpPdfViewerProps extends RendererProps {
|
|
8
|
+
/** Scroll behavior when navigating between pages (default: "instant") */
|
|
9
|
+
scrollBehavior?: ScrollBehavior;
|
|
10
|
+
}
|
|
11
|
+
/** Renderer descriptor for PDF files. Pass this to HyperJumpViewer's `renderers` prop. */
|
|
12
|
+
export declare const PdfRenderer: FileRenderer;
|
|
13
|
+
//# sourceMappingURL=pdf-viewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-viewer.d.ts","sourceRoot":"","sources":["../../src/pdf/pdf-viewer.tsx"],"names":[],"mappings":"AAWA,OAAO,yCAAyC,CAAC;AACjD,OAAO,mCAAmC,CAAC;AAG3C,OAAO,KAAK,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EAEb,MAAM,cAAc,CAAC;AAItB,OAAO,kBAAkB,CAAC;AAQ1B,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE3D,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC7D,yEAAyE;IACzE,cAAc,CAAC,EAAE,cAAc,CAAC;CAChC;AAwKD,0FAA0F;AAC1F,eAAO,MAAM,WAAW,EAAE,YAMzB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RowComponentProps } from "react-window";
|
|
2
|
+
import "./renderer.css";
|
|
3
|
+
interface RowProps {
|
|
4
|
+
scale: number;
|
|
5
|
+
}
|
|
6
|
+
export default function PDFPageRenderer(props: RowComponentProps<RowProps>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/pdf/renderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,gBAAgB,CAAC;AAExB,UAAU,QAAQ;IACjB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,iBAAiB,CAAC,QAAQ,CAAC,2CAOzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/pdf/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGnD,wBAAsB,iBAAiB,CACtC,QAAQ,EAAE,gBAAgB,EAC1B,KAAK,EAAE,MAAM;;;KAkBb"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import { HyperJumpViewer } from "../viewer/viewer";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof HyperJumpViewer;
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
export declare const CitationJumps: StoryObj<typeof meta>;
|
|
9
|
+
export declare const Loading: StoryObj<typeof meta>;
|
|
10
|
+
export declare const ErrorState: StoryObj<typeof meta>;
|
|
11
|
+
//# sourceMappingURL=viewer.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewer.stories.d.ts","sourceRoot":"","sources":["../../src/pdf/viewer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAKnD,QAAA,MAAM,IAAI;;;CAG8B,CAAC;AAEzC,eAAe,IAAI,CAAC;AAwEpB,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,OAAO,IAAI,CAyL/C,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,OAAO,IAAI,CASzC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,IAAI,CAS5C,CAAC"}
|
package/dist/video/index.d.ts
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
interface HyperJumpVideoViewerProps extends RendererProps {
|
|
5
|
-
/** Whether the video should autoplay (default: false). */
|
|
6
|
-
autoPlay?: boolean;
|
|
7
|
-
}
|
|
8
|
-
/** Renderer descriptor for video files. Pass this to HyperJumpViewer's `renderers` prop. */
|
|
9
|
-
declare const VideoRenderer: FileRenderer;
|
|
10
|
-
|
|
11
|
-
export { type HyperJumpVideoViewerAPI, type HyperJumpVideoViewerProps, VideoRenderer };
|
|
1
|
+
export type { HyperJumpVideoViewerAPI, HyperJumpVideoViewerProps, } from "./video-viewer";
|
|
2
|
+
export { VideoRenderer } from "./video-viewer";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/video/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,uBAAuB,EACvB,yBAAyB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FileRenderer, HyperJumpAPI, RendererProps } from "../lib/types";
|
|
2
|
+
import "./video-viewer.css";
|
|
3
|
+
export type HyperJumpVideoViewerAPI = HyperJumpAPI;
|
|
4
|
+
export interface HyperJumpVideoViewerProps extends RendererProps {
|
|
5
|
+
/** Whether the video should autoplay (default: false). */
|
|
6
|
+
autoPlay?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Renderer descriptor for video files. Pass this to HyperJumpViewer's `renderers` prop. */
|
|
9
|
+
export declare const VideoRenderer: FileRenderer;
|
|
10
|
+
//# sourceMappingURL=video-viewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-viewer.d.ts","sourceRoot":"","sources":["../../src/video/video-viewer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,oBAAoB,CAAC;AAE5B,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAAC;AAEnD,MAAM,WAAW,yBAA0B,SAAQ,aAAa;IAC/D,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAmDD,4FAA4F;AAC5F,eAAO,MAAM,aAAa,EAAE,YAM3B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import { HyperJumpViewer } from "../viewer/viewer";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof HyperJumpViewer;
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
export declare const Playground: StoryObj<typeof meta>;
|
|
9
|
+
//# sourceMappingURL=viewer.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewer.stories.d.ts","sourceRoot":"","sources":["../../src/video/viewer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGnD,QAAA,MAAM,IAAI;;;CAG8B,CAAC;AAEzC,eAAe,IAAI,CAAC;AAapB,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,IAAI,CAyI5C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { FileRenderer, HyperJumpAPI } from "../lib/types";
|
|
2
|
+
import "./viewer.css";
|
|
3
|
+
export interface HyperJumpViewerProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
4
|
+
/** URL of the file to display */
|
|
5
|
+
url: string;
|
|
6
|
+
/** Explicit file type override (e.g. "pdf", "video"). If omitted, detected from URL extension. */
|
|
7
|
+
type?: string;
|
|
8
|
+
/** Renderers that this viewer can use. The first matching renderer wins. */
|
|
9
|
+
renderers: FileRenderer[];
|
|
10
|
+
/** Ref forwarded to the active renderer (e.g. for imperative APIs like jump). */
|
|
11
|
+
ref?: React.Ref<HyperJumpAPI>;
|
|
12
|
+
/** Initial position to show when the content first loads. Meaning depends on renderer (page index for PDF, seconds for video). */
|
|
13
|
+
initialPosition?: number;
|
|
14
|
+
/** Called when the current position changes. Meaning depends on renderer (page index for PDF, seconds for video). */
|
|
15
|
+
onPositionChange?: (position: number) => void;
|
|
16
|
+
/** Additional props forwarded to the matched renderer. */
|
|
17
|
+
rendererProps?: T;
|
|
18
|
+
}
|
|
19
|
+
export declare function HyperJumpViewer<T extends Record<string, unknown> = Record<string, unknown>>(props: HyperJumpViewerProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=viewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewer.d.ts","sourceRoot":"","sources":["../../src/viewer/viewer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,oBAAoB,CACpC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAE3D,iCAAiC;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,kGAAkG;IAClG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,iFAAiF;IACjF,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC9B,kIAAkI;IAClI,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qHAAqH;IACrH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,0DAA0D;IAC1D,aAAa,CAAC,EAAE,CAAC,CAAC;CAClB;AAaD,wBAAgB,eAAe,CAC9B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1D,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,2CAwC/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypercard-ai/hyper-jump",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Document viewer built for RAG",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "HyperCard AI",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
|
-
"build": "tsup",
|
|
55
|
+
"build": "tsup && tsc --emitDeclarationOnly --outDir dist",
|
|
56
56
|
"dev": "tsup --watch",
|
|
57
57
|
"test": "vitest run",
|
|
58
58
|
"test:watch": "vitest",
|