@prose-reader/core
Advanced tools
Comparing version 1.8.0 to 1.9.0
@@ -7,4 +7,4 @@ import { Enhancer } from "./types"; | ||
lineHeight?: number | `publisher`; | ||
fontWeight?: typeof FONT_WEIGHT[number] | `publisher`; | ||
fontJustification?: typeof FONT_JUSTIFICATION[number] | `publisher`; | ||
fontWeight?: (typeof FONT_WEIGHT)[number] | `publisher`; | ||
fontJustification?: (typeof FONT_JUSTIFICATION)[number] | `publisher`; | ||
}; | ||
@@ -11,0 +11,0 @@ declare type OutputOptions = Required<Options>; |
@@ -16,3 +16,3 @@ import { Observable } from "rxjs"; | ||
})[]; | ||
export declare type Theme = typeof defaultThemes[number][`name`] | `publisher`; | ||
export declare type Theme = (typeof defaultThemes)[number][`name`] | `publisher`; | ||
export declare const themeEnhancer: Enhancer<{ | ||
@@ -19,0 +19,0 @@ theme?: Theme; |
@@ -6,3 +6,3 @@ import { Context } from "../context"; | ||
import { Manifest } from "../types"; | ||
export declare const createCfiLocator: ({ spineItemManager, spineItemLocator }: { | ||
export declare const createCfiLocator: ({ spineItemManager, spineItemLocator, }: { | ||
spineItemManager: SpineItemManager; | ||
@@ -13,3 +13,3 @@ context: Context; | ||
getSpineItemFromCfi: (cfi: string) => { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -186,3 +186,3 @@ minimumWidth: number; | ||
getCfi: ((pageIndex: number, spineItem: SpineItem) => string) | ((pageIndex: number, spineItem: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -189,0 +189,0 @@ minimumWidth: number; |
@@ -11,3 +11,3 @@ import { BehaviorSubject, Observable } from "rxjs"; | ||
import { AdjustedNavigation, Navigation } from "../viewportNavigator/types"; | ||
export declare const createSpine: ({ ownerDocument, context, pagination, iframeEventBridgeElement, spineItemManager, hooks$, spineItemLocator, spineLocator, cfiLocator, navigation$, navigationAdjusted$, currentNavigationPosition$, viewportState$ }: { | ||
export declare const createSpine: ({ ownerDocument, context, pagination, iframeEventBridgeElement, spineItemManager, hooks$, spineItemLocator, spineLocator, cfiLocator, navigation$, navigationAdjusted$, currentNavigationPosition$, viewportState$, }: { | ||
ownerDocument: Document; | ||
@@ -14,0 +14,0 @@ iframeEventBridgeElement: HTMLElement; |
import { Context } from "../context"; | ||
import { SpineItemManager } from "../spineItemManager"; | ||
import { createLocationResolver } from "./locationResolver"; | ||
export declare const createEventsHelper: ({ iframeEventBridgeElement, locator }: { | ||
export declare const createEventsHelper: ({ iframeEventBridgeElement, locator, }: { | ||
iframeEventBridgeElement: HTMLElement; | ||
@@ -6,0 +6,0 @@ spineItemManager: SpineItemManager; |
@@ -14,3 +14,3 @@ import { Context } from "../context"; | ||
}; | ||
export declare const createLocationResolver: ({ spineItemManager, context, spineItemLocator }: { | ||
export declare const createLocationResolver: ({ spineItemManager, context, spineItemLocator, }: { | ||
spineItemManager: SpineItemManager; | ||
@@ -24,3 +24,3 @@ context: Context; | ||
getSpineItemPositionFromSpinePosition: ((position: SpinePosition, spineItem: SpineItem) => SpineItemPosition) | ((position: SpinePosition, spineItem: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -194,3 +194,3 @@ minimumWidth: number; | ||
getSpineItemFromPosition: ((position: SpinePosition) => { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -363,3 +363,3 @@ minimumWidth: number; | ||
} | undefined) | ((position: SpinePosition) => { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -533,3 +533,3 @@ minimumWidth: number; | ||
getSpineItemFromIframe: (iframe: Element) => { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -536,0 +536,0 @@ minimumWidth: number; |
@@ -19,3 +19,3 @@ import { Context } from "../context"; | ||
}; | ||
export declare const createNavigationResolver: ({ context, spineItemManager, cfiLocator, locator }: { | ||
export declare const createNavigationResolver: ({ context, spineItemManager, cfiLocator, locator, }: { | ||
context: Context; | ||
@@ -22,0 +22,0 @@ spineItemManager: SpineItemManager; |
@@ -6,3 +6,3 @@ import { Context } from "../context"; | ||
import { createFrameManipulator } from "./frameItem/createFrameManipulator"; | ||
export declare const createCommonSpineItem: ({ item, context, parentElement, iframeEventBridgeElement, hooks$, viewportState$ }: { | ||
export declare const createCommonSpineItem: ({ item, context, parentElement, iframeEventBridgeElement, hooks$, viewportState$, }: { | ||
item: Manifest[`spineItems`][number]; | ||
@@ -25,3 +25,3 @@ parentElement: HTMLElement; | ||
load: () => void; | ||
layout: ({ height, width, blankPagePosition, minimumWidth }: { | ||
layout: ({ height, width, blankPagePosition, minimumWidth, }: { | ||
height: number; | ||
@@ -28,0 +28,0 @@ width: number; |
@@ -5,3 +5,3 @@ import { BehaviorSubject, Observable } from "rxjs"; | ||
import { Hook } from "../types/Hook"; | ||
export declare const createSpineItem: ({ item, context, containerElement, iframeEventBridgeElement, hooks$, viewportState$ }: { | ||
export declare const createSpineItem: ({ item, context, containerElement, iframeEventBridgeElement, hooks$, viewportState$, }: { | ||
item: Manifest[`spineItems`][number]; | ||
@@ -14,3 +14,3 @@ containerElement: HTMLElement; | ||
}) => { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -17,0 +17,0 @@ minimumWidth: number; |
@@ -5,3 +5,3 @@ import { Observable } from "rxjs"; | ||
import { Hook } from "../../types/Hook"; | ||
export declare const createFrameItem: ({ item, parent, fetchResource, context, hooks$, viewportState$ }: { | ||
export declare const createFrameItem: ({ item, parent, fetchResource, context, hooks$, viewportState$, }: { | ||
parent: HTMLElement; | ||
@@ -8,0 +8,0 @@ item: Manifest[`spineItems`][number]; |
@@ -5,3 +5,3 @@ import { BehaviorSubject, Observable } from "rxjs"; | ||
import { Hook } from "../../types/Hook"; | ||
export declare const createLoader: ({ item, parent, fetchResource, hooks$, context, viewportState$ }: { | ||
export declare const createLoader: ({ item, parent, fetchResource, hooks$, context, viewportState$, }: { | ||
item: Manifest[`spineItems`][number]; | ||
@@ -8,0 +8,0 @@ parent: HTMLElement; |
@@ -5,3 +5,3 @@ import { BehaviorSubject, Observable } from "rxjs"; | ||
import { Hook } from "../types/Hook"; | ||
export declare const createPrePaginatedSpineItem: ({ item, context, containerElement, iframeEventBridgeElement, hooks$, viewportState$ }: { | ||
export declare const createPrePaginatedSpineItem: ({ item, context, containerElement, iframeEventBridgeElement, hooks$, viewportState$, }: { | ||
item: Manifest[`spineItems`][number]; | ||
@@ -14,3 +14,3 @@ containerElement: HTMLElement; | ||
}) => { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: `before` | `after` | `none`; | ||
@@ -17,0 +17,0 @@ minimumWidth: number; |
@@ -5,3 +5,3 @@ import { BehaviorSubject, Observable } from "rxjs"; | ||
import { Hook } from "../types/Hook"; | ||
export declare const createReflowableSpineItem: ({ item, context, containerElement, iframeEventBridgeElement, hooks$, viewportState$ }: { | ||
export declare const createReflowableSpineItem: ({ item, context, containerElement, iframeEventBridgeElement, hooks$, viewportState$, }: { | ||
item: Manifest[`spineItems`][number]; | ||
@@ -14,3 +14,3 @@ containerElement: HTMLElement; | ||
}) => { | ||
layout: ({ blankPagePosition, minimumWidth }: { | ||
layout: ({ blankPagePosition, minimumWidth, }: { | ||
blankPagePosition: `before` | `after` | `none`; | ||
@@ -17,0 +17,0 @@ minimumWidth: number; |
@@ -10,3 +10,3 @@ import { Context } from "./context"; | ||
get: (indexOrId: number | string) => { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -180,3 +180,3 @@ minimumWidth: number; | ||
getAll: () => { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -362,3 +362,3 @@ minimumWidth: number; | ||
}) | ((spineItemOrIndex: number | { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -539,3 +539,3 @@ minimumWidth: number; | ||
getSpineItemAtPosition: ((position: ViewportPosition) => { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -708,3 +708,3 @@ minimumWidth: number; | ||
} | undefined) | ((position: ViewportPosition) => { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -878,3 +878,3 @@ minimumWidth: number; | ||
getFocusedSpineItem: () => { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -881,0 +881,0 @@ minimumWidth: number; |
@@ -1,2 +0,2 @@ | ||
export declare const getNewScaledOffset: ({ newScale, oldScale, screenSize, scrollOffset }: { | ||
export declare const getNewScaledOffset: ({ newScale, oldScale, screenSize, scrollOffset, }: { | ||
screenSize: number; | ||
@@ -3,0 +3,0 @@ pageSize: number; |
@@ -7,3 +7,3 @@ import { BehaviorSubject, Subject } from "rxjs"; | ||
import { ViewportPosition } from "../types"; | ||
export declare const createPanViewportNavigator: ({ getCurrentViewportPosition, navigator, spineItemManager, locator, context, currentNavigationSubject$ }: { | ||
export declare const createPanViewportNavigator: ({ getCurrentViewportPosition, navigator, spineItemManager, locator, context, currentNavigationSubject$, }: { | ||
context: Context; | ||
@@ -49,3 +49,3 @@ element: HTMLElement; | ||
spineItem?: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition }: { | ||
layout: ({ blankPagePosition, minimumWidth, spreadPosition, }: { | ||
blankPagePosition: "after" | "before" | "none"; | ||
@@ -52,0 +52,0 @@ minimumWidth: number; |
@@ -8,3 +8,3 @@ import { BehaviorSubject, Observable } from "rxjs"; | ||
declare type ScaledDownPosition = ViewportPosition; | ||
export declare const createScrollViewportNavigator: ({ context, element, navigator, currentNavigationSubject$, spine }: { | ||
export declare const createScrollViewportNavigator: ({ context, element, navigator, currentNavigationSubject$, spine, }: { | ||
context: Context; | ||
@@ -11,0 +11,0 @@ element: HTMLElement; |
@@ -11,3 +11,3 @@ import { Context } from "../context"; | ||
import { Spine } from "../spine/createSpine"; | ||
export declare const createViewportNavigator: ({ spineItemManager, context, pagination, parentElement, cfiLocator, spineLocator, hooks$, spine }: { | ||
export declare const createViewportNavigator: ({ spineItemManager, context, pagination, parentElement, cfiLocator, spineLocator, hooks$, spine, }: { | ||
spineItemManager: SpineItemManager; | ||
@@ -14,0 +14,0 @@ pagination: Pagination; |
{ | ||
"name": "@prose-reader/core", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"type": "module", | ||
@@ -21,3 +21,4 @@ "main": "./dist/prose.umd.cjs", | ||
"build": "tsc && vite build", | ||
"lint": "prettier -w . && eslint --fix . --ext .ts,.tsx,.js,.jsx", | ||
"lint:read": "prettier --check . && eslint .", | ||
"lint:write": "prettier --write . && eslint --fix .", | ||
"test": "vitest run --coverage", | ||
@@ -27,3 +28,3 @@ "tsc": "tsc" | ||
"dependencies": { | ||
"@prose-reader/shared": "^1.8.0" | ||
"@prose-reader/shared": "^1.9.0" | ||
}, | ||
@@ -45,3 +46,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "2eb25b5fea63b563bbd426f18bc4464a609ad7af" | ||
"gitHead": "e419ffe0deab682e8c52ea27fb7fa55208f26be1" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2102528
19005
Updated@prose-reader/shared@^1.9.0