import { BookBindingType, BookFormatType, BookPoseType } from './meta/types'; import { LoadingType } from "../../type/loading"; /** * @part cover - The native `` that shows the front cover * @category content */ export declare class MdsBook { private host; private coverUrl?; private imageError; private imageRatio?; private logoError; private logoUrl?; private current; private drag?; private dragged; private dragWatch?; private frame?; private goal; private hovering; private lastTime?; private logoLoader?; private pointer; private scene?; private slats; private t; /** * The accessible name of the book. Without it the name is built from `name` and `author`; * an empty `alt` marks the book as decorative, left out by assistive technologies */ readonly alt?: string; /** * The author, printed on the cover drawn when there is no image, above the title, and on the * spine after the title, or under it where the spine has room for two lines */ readonly author?: string; /** * How the book is bound: a thin flexible cover flush with the pages, rigid boards a little * larger than the page block, with a rounded spine, or not at all (`none`), a stack of loose * sheets, a document: its cover is only the sheet on top, and the pages show on every side, * the side of the spine too, where nothing is printed */ readonly binding: BookBindingType; /** * The proportions of the book. `auto` takes them from the image; a named format (`a4`, `a5`, * `b5`) is portrait; any other one is `WxH` in centimetres, the order of the two numbers being * the orientation (`17x24` portrait, `24x17` landscape, `21x21` square) * @example '17x24' */ readonly format: BookFormatType; /** * Specifies whether a browser should load the cover immediately or defer it until it is near * the viewport */ readonly loading?: LoadingType; /** * The title of the book, printed on the spine and on the cover drawn when there is no image */ readonly name?: string; /** * The number of pages, which sets how deep the book is, against the width of its format (17 cm * for `auto`). A page is as thick as `--mds-book-page-weight-min` at 1 page, going to * `--mds-book-page-weight-max` at 1000 pages and more, in proportion: by default from 0.1 mm, * the bulky paper of a short book, to 0.05 mm, the thin paper of a volume, so 64 pages make * 6 mm, 300 pages 2.5 cm and 1000 pages 5 cm. A spine under 5 mm deep carries no text */ readonly pages: number; /** * How the book is shown: standing, turned to show its spine (`spine`) or its pages * (`fore-edge`), or facing the reader (`front`); lying on its back, seen from above, its tail * toward the reader (`lying`) or spun on the surface (`lying-turned`). A drag turns it from * there, and it goes back when released */ readonly pose: BookPoseType; /** * The publisher, printed at the foot of the spine and of the cover drawn when there is no * image, unless its `publisher-logo` is printed there instead */ readonly publisher?: string; /** * The mark of the publisher, printed instead of its name at the foot of the spine and of the * cover drawn when there is no image: the path to an svg, or a png on a transparent ground. * Its shape is printed, not its colours, in `--mds-book-publisher-color`. An image from * another origin needs CORS headers, as any mask does; one that does not load leaves the name * @example '/logos/maggioli-editore.svg' */ readonly publisherLogo?: string; /** * Specifies the path to the image of the front cover */ readonly src?: string; formatHandler(newValue?: string | null): void; pagesHandler(newValue?: number | null): void; poseHandler(): void; publisherLogoHandler(): void; srcHandler(): void; pointerEnterHandler(ev: PointerEvent): void; pointerMoveHandler(ev: PointerEvent): void; pointerDownHandler(ev: PointerEvent): void; pointerUpHandler(ev: PointerEvent): void; pointerLostHandler(ev: PointerEvent): void; pointerLeaveHandler(): void; clickHandler(ev: MouseEvent): void; componentWillLoad(): void; componentDidRender(): void; disconnectedCallback(): void; private watchDrag; private endDrag; private reducedMotion; private consumption; private still; private aim; private wake; private tick; private writePose; private warnInvalidFormat; private warnInvalidPages; private onLoad; private onError; private hasImage; private loadLogo; private logoPending; private ratio; private label; private hostRole; private bookStyle; private renderPublisher; private renderSpineText; private shade; private renderHardcover; private renderPaperback; private renderLoose; private renderBinding; render(): any; }