@makefully/fancifully 0.1.0 → 0.3.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/CHANGELOG.md +50 -12
- package/LICENSE +21 -21
- package/README.md +245 -147
- package/dist/Storybook.d.ts +106 -3
- package/dist/Storybook.d.ts.map +1 -1
- package/dist/fancifully.css +1 -1
- package/dist/fancifully.iife.js +4 -8
- package/dist/fancifully.js +3538 -1999
- package/dist/flip/DefaultFlipStyle.d.ts +11 -0
- package/dist/flip/DefaultFlipStyle.d.ts.map +1 -0
- package/dist/flip/FlipStyle.d.ts +47 -0
- package/dist/flip/FlipStyle.d.ts.map +1 -0
- package/dist/flip/index.d.ts +4 -0
- package/dist/flip/index.d.ts.map +1 -0
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/interop/fabricLike.d.ts +124 -0
- package/dist/interop/fabricLike.d.ts.map +1 -0
- package/dist/layout/layoutUnits.d.ts +43 -0
- package/dist/layout/layoutUnits.d.ts.map +1 -0
- package/dist/load/fanciFile.d.ts +6 -0
- package/dist/load/fanciFile.d.ts.map +1 -0
- package/dist/load/loadEpub.d.ts.map +1 -1
- package/dist/nav/Pager.d.ts +27 -5
- package/dist/nav/Pager.d.ts.map +1 -1
- package/dist/nav/hardback.d.ts +24 -0
- package/dist/nav/hardback.d.ts.map +1 -0
- package/dist/nav/layoutMode.d.ts +51 -4
- package/dist/nav/layoutMode.d.ts.map +1 -1
- package/dist/pack/packFanci.d.ts +16 -0
- package/dist/pack/packFanci.d.ts.map +1 -0
- package/dist/render/SpreadView.d.ts +67 -3
- package/dist/render/SpreadView.d.ts.map +1 -1
- package/dist/render/blocks/TextBlock.d.ts.map +1 -1
- package/dist/schema/story.d.ts +160 -17
- package/dist/schema/story.d.ts.map +1 -1
- package/dist/ui/iconifyIcon.d.ts +21 -0
- package/dist/ui/iconifyIcon.d.ts.map +1 -0
- package/package.json +76 -74
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FlipStyle, type FlipContext } from './FlipStyle.js';
|
|
2
|
+
/**
|
|
3
|
+
* Built-in CSS 3D page turn (perspective rotateY on the turning leaf).
|
|
4
|
+
* Registered as `"default"`.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DefaultFlipStyle extends FlipStyle {
|
|
7
|
+
static readonly id = "default";
|
|
8
|
+
play(ctx: FlipContext): Promise<void>;
|
|
9
|
+
cancel(ctx: Pick<FlipContext, 'bookEl'>): void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=DefaultFlipStyle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultFlipStyle.d.ts","sourceRoot":"","sources":["../../src/flip/DefaultFlipStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,WAAW,EAEjB,MAAM,gBAAgB,CAAC;AAExB;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,SAAS;IAC7C,gBAAyB,EAAE,aAAa;IAE/B,IAAI,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BrC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,IAAI;CAGxD"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type FlipDirection = 'next' | 'prev';
|
|
2
|
+
/** Context passed to a flip style while animating a turn. */
|
|
3
|
+
export type FlipContext = {
|
|
4
|
+
bookEl: HTMLElement;
|
|
5
|
+
viewportEl: HTMLElement;
|
|
6
|
+
leftLeaf: HTMLElement;
|
|
7
|
+
rightLeaf: HTMLElement;
|
|
8
|
+
direction: FlipDirection;
|
|
9
|
+
/** Duration in milliseconds */
|
|
10
|
+
durationMs: number;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Base class for page-flip animations.
|
|
14
|
+
*
|
|
15
|
+
* Built-in styles (e.g. {@link DefaultFlipStyle}) extend this class.
|
|
16
|
+
* Hosts can subclass it and pass the constructor or an instance via
|
|
17
|
+
* `StorybookOptions.flipStyle`, or {@link registerFlipStyle} a named id
|
|
18
|
+
* for string lookup (`flipStyle: "my-style"`).
|
|
19
|
+
*/
|
|
20
|
+
export declare abstract class FlipStyle {
|
|
21
|
+
/** Registry id when registered via {@link registerFlipStyle}. */
|
|
22
|
+
static readonly id: string;
|
|
23
|
+
/**
|
|
24
|
+
* Play the flip. Resolve when the outgoing leaf animation is done and
|
|
25
|
+
* the engine may mount the next spread.
|
|
26
|
+
*/
|
|
27
|
+
abstract play(ctx: FlipContext): Promise<void>;
|
|
28
|
+
/** Clear classes/styles if a flip is interrupted. */
|
|
29
|
+
cancel(ctx: Pick<FlipContext, 'bookEl' | 'viewportEl' | 'leftLeaf' | 'rightLeaf'>): void;
|
|
30
|
+
}
|
|
31
|
+
export type FlipStyleConstructor = (new () => FlipStyle) & {
|
|
32
|
+
readonly id?: string;
|
|
33
|
+
};
|
|
34
|
+
export type FlipStyleInput = string | FlipStyle | FlipStyleConstructor;
|
|
35
|
+
/** Register a named flip style for string lookup (`flipStyle: "id"`). */
|
|
36
|
+
export declare function registerFlipStyle(id: string, ctor: FlipStyleConstructor): void;
|
|
37
|
+
export declare function getRegisteredFlipStyle(id: string): FlipStyleConstructor | undefined;
|
|
38
|
+
export declare function listRegisteredFlipStyles(): string[];
|
|
39
|
+
/**
|
|
40
|
+
* Resolve a string id, constructor, or instance into a {@link FlipStyle}.
|
|
41
|
+
* Unknown string ids throw. Omitting input yields {@link DefaultFlipStyle}.
|
|
42
|
+
*/
|
|
43
|
+
export declare function createFlipStyle(input?: FlipStyleInput | null): FlipStyle;
|
|
44
|
+
/** Default flip duration in ms (matches legacy 0.4s CSS). */
|
|
45
|
+
export declare const DEFAULT_FLIP_SPEED_MS = 400;
|
|
46
|
+
export declare function resolveFlipSpeedMs(speed?: number | null): number;
|
|
47
|
+
//# sourceMappingURL=FlipStyle.d.ts.map
|
|
@@ -0,0 +1 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AAc,GAAG,IAAI,GAAG,SAAS,CA2BxE;AAED,6DAA6D;AAC7D,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAKhE"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { FlipStyle, createFlipStyle, registerFlipStyle, getRegisteredFlipStyle, listRegisteredFlipStyles, resolveFlipSpeedMs, DEFAULT_FLIP_SPEED_MS, type FlipContext, type FlipDirection, type FlipStyleConstructor, type FlipStyleInput, } from './FlipStyle.js';
|
|
2
|
+
export { DefaultFlipStyle } from './DefaultFlipStyle.js';
|
|
3
|
+
import './DefaultFlipStyle.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/flip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,uBAAuB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import './styles/fancifully.css';
|
|
2
|
-
export { Storybook, type StorybookOptions } from './Storybook.js';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
2
|
+
export { Storybook, findFanciFile, type StorybookOptions, type StorybookChromeOptions, type EditableLeaf, } from './Storybook.js';
|
|
3
|
+
export { type StageZoom } from './render/SpreadView.js';
|
|
4
|
+
export { parseStory, storySchema, type Story, type StoryPage, type BookGuides, type StoryBlock, type StoryAsset, type TapAction, type Cue, } from './schema/story.js';
|
|
5
|
+
export { packFanci, downloadBlob, type PackFanciOptions } from './pack/packFanci.js';
|
|
6
|
+
export { fabricLikeToPage, pageToFabricLike, pagesToSpreadFabricLike, spreadFabricLikeToPages, type FabricLikeObject, type FabricLikePage, type FabricLikePageDescriptors, type FabricLikeSpreadDescriptors, type FabricLikeTextDescriptor, type FabricLikeImageDescriptor, type FabricLikeHotspotDescriptor, type FabricLikeContentDescriptor, type FabricLikeBackground, type PageToFabricLikeAssets, type SpreadPagesResult, } from './interop/fabricLike.js';
|
|
7
|
+
export { boxToPixels, htmlToPlainText, plainTextToHtml, serializeLayoutBox, scaleBlocksToPageSize, toPx, resolveCssLineHeight, FABRIC_CSS_FONT_SIZE_MULT, type PageSize, } from './layout/layoutUnits.js';
|
|
8
|
+
export { FlipStyle, DefaultFlipStyle, createFlipStyle, registerFlipStyle, getRegisteredFlipStyle, listRegisteredFlipStyles, resolveFlipSpeedMs, DEFAULT_FLIP_SPEED_MS, type FlipContext, type FlipDirection, type FlipStyleConstructor, type FlipStyleInput, } from './flip/index.js';
|
|
9
|
+
export { loadStory, revokeLoadedStory, FANCI_EXTENSION, type LoadedStory, type LoadedAssets, type LoadStoryOptions, } from './load/loadStory.js';
|
|
10
|
+
export { isFanciFile, extensionOf } from './load/fanciFile.js';
|
|
5
11
|
export type { StorySource, PackageKind } from './load/packageTypes.js';
|
|
6
12
|
export { loadFanciFromBytes, loadFanciFromZip, findStoryJsonPath } from './load/loadFanci.js';
|
|
7
13
|
export { loadEpubFromBytes, loadEpubFromZip } from './load/loadEpub.js';
|
|
8
14
|
export { parseVtt } from './sync/parseVtt.js';
|
|
9
15
|
export { CueTimeline } from './sync/CueTimeline.js';
|
|
10
|
-
export { buildSpreads, resolveLayoutMode, contentPageIds } from './nav/layoutMode.js';
|
|
16
|
+
export { buildSpreads, buildSingleSpreads, buildTwoPageSpreads, buildFrontCoverSpread, buildBackCoverSpread, resolveLayoutMode, contentPageIds, primaryPageId, findSpreadIndexForPage, DEFAULT_LAYOUT_MODE, DEFAULT_SINGLE_BREAKPOINT, type CoverOptions, type BookState, type LayoutMode, type ResolvedLayoutMode, } from './nav/layoutMode.js';
|
|
17
|
+
export { HARDBACK_EDGE_RATIO, hardbackEnabled, hardbackOverhang, type HardbackOverhang, } from './nav/hardback.js';
|
|
11
18
|
export { bindApplication, createSpringrollApplication, waitForSpringrollReady, } from './springroll/bindApplication.js';
|
|
12
19
|
export { reportSpringrollProgress, reportSpringrollLoaded, type LoadProgress, type LoadStage, } from './springroll/loading.js';
|
|
13
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAEjC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EACL,SAAS,EACT,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EACL,UAAU,EACV,WAAW,EACX,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,GAAG,GACT,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,wBAA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,SAAS,EACd,KAAK,UAAU,EACf,KAAK,kBAAkB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,KAAK,YAAY,EACjB,KAAK,SAAS,GACf,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { StoryPage, TapAction } from '../schema/story.js';
|
|
2
|
+
import { type PageSize } from '../layout/layoutUnits.js';
|
|
3
|
+
/**
|
|
4
|
+
* Plain-object subset of Fabric object fields used to round-trip story blocks.
|
|
5
|
+
* Not Fabric's canvas.toJSON() — a documented interop shape without a Fabric runtime.
|
|
6
|
+
*/
|
|
7
|
+
export type FabricLikeObject = {
|
|
8
|
+
blockId?: string;
|
|
9
|
+
blockType?: 'text' | 'image' | string;
|
|
10
|
+
left?: number;
|
|
11
|
+
top?: number;
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
scaleX?: number;
|
|
15
|
+
scaleY?: number;
|
|
16
|
+
text?: string;
|
|
17
|
+
fontFamily?: string;
|
|
18
|
+
fontSize?: number;
|
|
19
|
+
fill?: string;
|
|
20
|
+
textAlign?: string;
|
|
21
|
+
lineHeight?: number;
|
|
22
|
+
fontWeight?: string;
|
|
23
|
+
fontStyle?: string;
|
|
24
|
+
assetId?: string;
|
|
25
|
+
/** Image fit, stored on the story layout box. */
|
|
26
|
+
fit?: 'contain' | 'cover' | 'fill' | 'none';
|
|
27
|
+
ariaLabel?: string;
|
|
28
|
+
onTap?: TapAction[];
|
|
29
|
+
};
|
|
30
|
+
export type FabricLikePage = {
|
|
31
|
+
backgroundColor?: string;
|
|
32
|
+
objects: FabricLikeObject[];
|
|
33
|
+
};
|
|
34
|
+
export type FabricLikeTextDescriptor = {
|
|
35
|
+
kind: 'text';
|
|
36
|
+
blockId: string;
|
|
37
|
+
text: string;
|
|
38
|
+
left: number;
|
|
39
|
+
top: number;
|
|
40
|
+
width: number;
|
|
41
|
+
fontFamily?: string;
|
|
42
|
+
fontSize: number;
|
|
43
|
+
fill?: string;
|
|
44
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
45
|
+
lineHeight: number;
|
|
46
|
+
fontWeight?: string;
|
|
47
|
+
fontStyle?: string;
|
|
48
|
+
};
|
|
49
|
+
export type FabricLikeImageDescriptor = {
|
|
50
|
+
kind: 'image';
|
|
51
|
+
blockId: string;
|
|
52
|
+
assetId: string;
|
|
53
|
+
left: number;
|
|
54
|
+
top: number;
|
|
55
|
+
width: number;
|
|
56
|
+
height: number;
|
|
57
|
+
/** Resolved image URL when available (editor loads via Fabric). */
|
|
58
|
+
src?: string;
|
|
59
|
+
fit?: 'contain' | 'cover' | 'fill' | 'none';
|
|
60
|
+
};
|
|
61
|
+
export type FabricLikeHotspotDescriptor = {
|
|
62
|
+
kind: 'hotspot';
|
|
63
|
+
blockId: string;
|
|
64
|
+
left: number;
|
|
65
|
+
top: number;
|
|
66
|
+
width: number;
|
|
67
|
+
height: number;
|
|
68
|
+
ariaLabel?: string;
|
|
69
|
+
onTap?: TapAction[];
|
|
70
|
+
};
|
|
71
|
+
export type FabricLikeContentDescriptor = FabricLikeTextDescriptor | FabricLikeImageDescriptor | FabricLikeHotspotDescriptor;
|
|
72
|
+
export type FabricLikeBackground = {
|
|
73
|
+
color: string;
|
|
74
|
+
/** Background image asset id + URL when present. */
|
|
75
|
+
imageAssetId?: string;
|
|
76
|
+
imageSrc?: string;
|
|
77
|
+
};
|
|
78
|
+
export type FabricLikePageDescriptors = {
|
|
79
|
+
background: FabricLikeBackground;
|
|
80
|
+
objects: FabricLikeContentDescriptor[];
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Convert fabric-like objects (+ optional background color) into a StoryPage.
|
|
84
|
+
* Hotspot blocks from `previousPage` are preserved.
|
|
85
|
+
*/
|
|
86
|
+
export declare function fabricLikeToPage(objects: FabricLikeObject[], previousPage: StoryPage, pageSize: PageSize, backgroundColor?: string, options?: {
|
|
87
|
+
syncHotspots?: boolean;
|
|
88
|
+
}): StoryPage;
|
|
89
|
+
export type PageToFabricLikeAssets = {
|
|
90
|
+
images: Map<string, {
|
|
91
|
+
src?: string;
|
|
92
|
+
}>;
|
|
93
|
+
html: Map<string, string>;
|
|
94
|
+
};
|
|
95
|
+
/** Build fabric-like descriptors from a story page (editor materializes Fabric objects). */
|
|
96
|
+
export declare function pageToFabricLike(page: StoryPage, assets: PageToFabricLikeAssets, pageSize: PageSize): FabricLikePageDescriptors;
|
|
97
|
+
export type FabricLikeSpreadDescriptors = {
|
|
98
|
+
/** Spread canvas size: width = 2 * pageW, height = pageH. */
|
|
99
|
+
pageSize: PageSize;
|
|
100
|
+
spreadWidth: number;
|
|
101
|
+
leftBackground: FabricLikeBackground | null;
|
|
102
|
+
rightBackground: FabricLikeBackground | null;
|
|
103
|
+
objects: FabricLikeContentDescriptor[];
|
|
104
|
+
};
|
|
105
|
+
export type SpreadPagesResult = {
|
|
106
|
+
left: StoryPage | null;
|
|
107
|
+
right: StoryPage | null;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Merge left/right story pages into one spread-space fabric-like descriptor list.
|
|
111
|
+
* Right-page objects are offset by +pageWidth.
|
|
112
|
+
*/
|
|
113
|
+
export declare function pagesToSpreadFabricLike(leftPage: StoryPage | null, rightPage: StoryPage | null, assets: PageToFabricLikeAssets, pageSize: PageSize): FabricLikeSpreadDescriptors;
|
|
114
|
+
/**
|
|
115
|
+
* Split spread-space fabric-like objects into left/right StoryPages.
|
|
116
|
+
* Objects that straddle the gutter (x = pageW) are clipped and duplicated.
|
|
117
|
+
*/
|
|
118
|
+
export declare function spreadFabricLikeToPages(objects: FabricLikeObject[], leftPrev: StoryPage | null, rightPrev: StoryPage | null, pageSize: PageSize, backgroundColors?: {
|
|
119
|
+
left?: string;
|
|
120
|
+
right?: string;
|
|
121
|
+
}, options?: {
|
|
122
|
+
syncHotspots?: boolean;
|
|
123
|
+
}): SpreadPagesResult;
|
|
124
|
+
//# sourceMappingURL=fabricLike.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fabricLike.d.ts","sourceRoot":"","sources":["../../src/interop/fabricLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAOL,KAAK,QAAQ,EACd,MAAM,0BAA0B,CAAC;AAElC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAC5C,SAAS,CAAC,EAAE,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AAI,CAAC;IAC7C,OAAO,EAAE,2BAA2B,EAAE,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB,CAAC;AA2BF;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,SAAS,GAAG,IAAI,EAC1B,SAAS,EAAE,SAAS,GAAG,IAAI,EAC3B,MAAM,EAAE,sBAAsB,EAC9B,QAAQ,EAAE,QAAQ,GACjB,2BAA2B,CAyB7B;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,gBAAgB,EAAE,EAC3B,QAAQ,EAAE,SAAS,GAAG,IAAI,EAC1B,SAAS,EAAE,SAAS,GAAG,IAAI,EAC3B,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EACpD,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GACnC,iBAAiB,CAyDnB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { LayoutBox } from '../schema/story.js';
|
|
2
|
+
export type PageSize = {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Parse a layout length to CSS pixels.
|
|
8
|
+
* Supports numbers, numeric strings, `px`, and `%` (resolved against `axisSize`).
|
|
9
|
+
*/
|
|
10
|
+
export declare function toPx(value: number | string | undefined, fallback?: number, axisSize?: number): number;
|
|
11
|
+
/** Resolve a layout box to page-space pixels (percentages use pageSize). */
|
|
12
|
+
export declare function boxToPixels(box: LayoutBox | undefined, pageSize: PageSize): {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Write fabric geometry back to a layout box.
|
|
20
|
+
* Preserves the previous box (including `%` units / authored height) when the
|
|
21
|
+
* resolved position & width are unchanged — Textbox height is content-driven and
|
|
22
|
+
* must not rewrite the story box on every edit session.
|
|
23
|
+
*/
|
|
24
|
+
export declare function serializeLayoutBox(left: number, top: number, width: number, height: number, prev: LayoutBox | undefined, pageSize: PageSize, options?: {
|
|
25
|
+
preserveHeight?: boolean;
|
|
26
|
+
}): LayoutBox;
|
|
27
|
+
/**
|
|
28
|
+
* Resolve story/CSS line-height to a unitless multiplier (CSS `line-height: 1.4`).
|
|
29
|
+
* Accepts unitless numbers, numeric strings, `%`, or `px` (px ÷ fontSize).
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveCssLineHeight(value: number | string | undefined, fontSizePx: number, fallback?: number): number;
|
|
32
|
+
/**
|
|
33
|
+
* Fabric applies `lineHeight * _fontSizeMult` (default mult 1.13) per line.
|
|
34
|
+
* Set mult to 1 so story/CSS unitless line-height matches 1:1.
|
|
35
|
+
*/
|
|
36
|
+
export declare const FABRIC_CSS_FONT_SIZE_MULT = 1;
|
|
37
|
+
/** Scale every block box so it keeps its place on a new page size. */
|
|
38
|
+
export declare function scaleBlocksToPageSize(blocks: Array<{
|
|
39
|
+
layout?: LayoutBox;
|
|
40
|
+
}>, prev: PageSize, next: PageSize): void;
|
|
41
|
+
export declare function htmlToPlainText(html: string): string;
|
|
42
|
+
export declare function plainTextToHtml(text: string): string;
|
|
43
|
+
//# sourceMappingURL=layoutUnits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layoutUnits.d.ts","sourceRoot":"","sources":["../../src/layout/layoutUnits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,MAAM,QAAQ,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EA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for `.fanci` package files. */
|
|
2
|
+
export declare function extensionOf(filename: string): string;
|
|
3
|
+
export declare function isFanciFile(file: File): boolean;
|
|
4
|
+
/** First `.fanci` file in a DataTransfer, if any. */
|
|
5
|
+
export declare function findFanciFile(dt: DataTransfer | null | undefined): File | null;
|
|
6
|
+
//# sourceMappingURL=fanciFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fanciFile.d.ts","sourceRoot":"","sources":["../../src/load/fanciFile.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAE3D,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAI/C;AAED,qDAAqD;AACrD,wBAAgB,aAAa,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAM9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadEpub.d.ts","sourceRoot":"","sources":["../../src/load/loadEpub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,KAAK,EAAmC,MAAM,oBAAoB,CAAC;AACvG,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAUF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,GAAG,WAAW,CAE7E;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"loadEpub.d.ts","sourceRoot":"","sources":["../../src/load/loadEpub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,KAAK,EAAmC,MAAM,oBAAoB,CAAC;AACvG,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAUF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,GAAG,WAAW,CAE7E;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,GAAG,WAAW,CAyHhE;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAEtD"}
|
package/dist/nav/Pager.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { type Spread } from './layoutMode.js';
|
|
2
|
-
import type {
|
|
1
|
+
import { type BookState, type LayoutMode, type ResolvedLayoutMode, type Spread } from './layoutMode.js';
|
|
2
|
+
import type { Story } from '../schema/story.js';
|
|
3
3
|
import type { SpreadView } from '../render/SpreadView.js';
|
|
4
4
|
export type PagerEvents = {
|
|
5
5
|
pagechange: {
|
|
6
6
|
pageIds: string[];
|
|
7
7
|
index: number;
|
|
8
8
|
layoutMode: ResolvedLayoutMode;
|
|
9
|
+
bookState: BookState;
|
|
9
10
|
};
|
|
10
11
|
layoutchange: {
|
|
11
12
|
layoutMode: ResolvedLayoutMode;
|
|
@@ -22,17 +23,38 @@ export declare class Pager {
|
|
|
22
23
|
private breakpoint;
|
|
23
24
|
private listeners;
|
|
24
25
|
private busy;
|
|
25
|
-
|
|
26
|
+
private hasResolvedLayout;
|
|
27
|
+
private bookState;
|
|
28
|
+
private covers;
|
|
29
|
+
private frontCoverSpread;
|
|
30
|
+
private backCoverSpread;
|
|
31
|
+
constructor(story: Story, spreadView: SpreadView, layout?: {
|
|
32
|
+
mode?: LayoutMode;
|
|
33
|
+
singleBreakpoint?: number;
|
|
34
|
+
});
|
|
26
35
|
get layoutMode(): ResolvedLayoutMode;
|
|
36
|
+
/** Host preference before width/orientation resolution. */
|
|
37
|
+
get layoutPreference(): LayoutMode;
|
|
38
|
+
get currentBookState(): BookState;
|
|
27
39
|
get currentSpread(): Spread;
|
|
28
40
|
get currentPageIds(): string[];
|
|
41
|
+
get canPrev(): boolean;
|
|
42
|
+
get canNext(): boolean;
|
|
29
43
|
on<K extends keyof PagerEvents>(event: K, fn: Listener<K>): () => void;
|
|
30
|
-
setLayoutMode(mode: LayoutMode, containerWidth: number): void;
|
|
31
|
-
updateLayout(containerWidth: number, emitIfChanged?: boolean): void;
|
|
44
|
+
setLayoutMode(mode: LayoutMode, containerWidth: number, containerHeight: number): void;
|
|
45
|
+
updateLayout(containerWidth: number, containerHeight: number, emitIfChanged?: boolean): void;
|
|
32
46
|
showInitial(): Promise<void>;
|
|
33
47
|
next(): Promise<void>;
|
|
34
48
|
prev(): Promise<void>;
|
|
49
|
+
/** Swap the story reference (e.g. after opening a `.fanci`) and rebuild. */
|
|
50
|
+
replaceStory(story: Story, preferPageId?: string | null): void;
|
|
51
|
+
/**
|
|
52
|
+
* Rebuild spreads/covers from the current story object after page CRUD or
|
|
53
|
+
* cover-flag changes. Remounts the current spread without animation.
|
|
54
|
+
*/
|
|
55
|
+
rebuildFromStory(preferPageId?: string | null): void;
|
|
35
56
|
goTo(pageId: string): Promise<void>;
|
|
57
|
+
private rebuildCoverSpreads;
|
|
36
58
|
private emitPageChange;
|
|
37
59
|
private emit;
|
|
38
60
|
}
|
package/dist/nav/Pager.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pager.d.ts","sourceRoot":"","sources":["../../src/nav/Pager.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Pager.d.ts","sourceRoot":"","sources":["../../src/nav/Pager.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,SAAS,EAEd,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,MAAM,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,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AAM,CAQ1B;IAED,IAAI,cAAc,IAAI,MAAM,EAAE,CAU7B;IAED,IAAI,OAAO,IAAI,OAAO,CAKrB;IAED,IAAI,OAAO,IAAI,OAAO,CAKrB;IAED,EAAE,CAAC,CAAC,SAAS,MAAM,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IAQtE,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI;IAKtF,YAAY,CACV,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,EACvB,aAAa,UAAO,GACnB,IAAI;IAuED,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAY5B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA4CrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA2C3B,4EAA4E;IAC5E,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAM9D;;;OAGG;IACH,gBAAgB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAyD9C,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2CzC,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,IAAI;CAOb"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hardback covers are larger than interior leaves so open pages sit on top
|
|
3
|
+
* with a visible cover rim on each edge.
|
|
4
|
+
*/
|
|
5
|
+
/** Extra size on each edge as a fraction of the matching page dimension. */
|
|
6
|
+
export declare const HARDBACK_EDGE_RATIO = 0.035;
|
|
7
|
+
export type HardbackOverhang = {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function hardbackOverhang(pageSize: {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
}, coverSize?: {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}): HardbackOverhang;
|
|
18
|
+
/** Whether hardback presentation applies (flag on + at least one cover). */
|
|
19
|
+
export declare function hardbackEnabled(story: {
|
|
20
|
+
hardback?: boolean;
|
|
21
|
+
frontCover?: boolean;
|
|
22
|
+
backCover?: boolean;
|
|
23
|
+
}): boolean;
|
|
24
|
+
//# sourceMappingURL=hardback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hardback.d.ts","sourceRoot":"","sources":["../../src/nav/hardback.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AAEzC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE;IACR,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,EACD,SAAS,CAAC,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC5C,gBAAgB,CAWlB;AAED,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,OAAO,CAEV"}
|
package/dist/nav/layoutMode.d.ts
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
/**
|
|
1
|
+
/** How a reader presents pages. Not stored on the story. */
|
|
2
|
+
export type LayoutMode = 'single' | 'two-page' | 'responsive' | 'auto';
|
|
3
|
+
/** Concrete presentation after resolving `responsive` / `auto`. */
|
|
4
|
+
export type ResolvedLayoutMode = 'single' | 'two-page';
|
|
5
|
+
/** Reader default when the host does not pass a layout mode. */
|
|
6
|
+
export declare const DEFAULT_LAYOUT_MODE: LayoutMode;
|
|
7
|
+
/** Width where `auto` switches to two-page, in CSS pixels. */
|
|
8
|
+
export declare const DEFAULT_SINGLE_BREAKPOINT = 900;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve a reader layout mode to a concrete single / two-page presentation.
|
|
11
|
+
*
|
|
12
|
+
* - `single` / `two-page`: fixed
|
|
13
|
+
* - `responsive`: landscape (width ≥ height) → two-page; portrait → single
|
|
14
|
+
* - `auto`: width ≥ singleBreakpoint → two-page
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveLayoutMode(mode: LayoutMode, containerWidth: number, containerHeight: number, singleBreakpoint: number): ResolvedLayoutMode;
|
|
17
|
+
export type CoverOptions = {
|
|
18
|
+
frontCover?: boolean;
|
|
19
|
+
backCover?: boolean;
|
|
20
|
+
};
|
|
21
|
+
/** Closed cover presentation vs open spreads. */
|
|
22
|
+
export type BookState = 'closed-front' | 'open' | 'closed-back';
|
|
4
23
|
export type SpreadLeaf = {
|
|
5
24
|
kind: 'blank';
|
|
6
25
|
} | {
|
|
@@ -13,9 +32,37 @@ export type Spread = {
|
|
|
13
32
|
left: SpreadLeaf;
|
|
14
33
|
right: SpreadLeaf;
|
|
15
34
|
};
|
|
35
|
+
/** Closed front cover: cover on the right (recto), blank left — flips away on open. */
|
|
36
|
+
export declare function buildFrontCoverSpread(pages: {
|
|
37
|
+
id: string;
|
|
38
|
+
}[]): Spread;
|
|
39
|
+
/** Closed back cover: back on the right, blank left. */
|
|
40
|
+
export declare function buildBackCoverSpread(pages: {
|
|
41
|
+
id: string;
|
|
42
|
+
}[]): Spread;
|
|
43
|
+
/**
|
|
44
|
+
* Two-page open spreads.
|
|
45
|
+
*
|
|
46
|
+
* Default (no covers): `[blank, p0]`, then pairs, orphan `[last, blank]`.
|
|
47
|
+
* `frontCover`: page 0 is only shown closed; open spreads start at page 1 with
|
|
48
|
+
* content on the left (no leading blank).
|
|
49
|
+
* `backCover`: last page is only shown closed; open spreads omit it (no trailing blank).
|
|
50
|
+
*/
|
|
51
|
+
export declare function buildTwoPageSpreads(pages: {
|
|
52
|
+
id: string;
|
|
53
|
+
}[], covers?: CoverOptions): Spread[];
|
|
54
|
+
/**
|
|
55
|
+
* One-page spreads: every story page (including covers) is its own spread.
|
|
56
|
+
* Front cover on the left; back cover on the right; others alternate.
|
|
57
|
+
*/
|
|
58
|
+
export declare function buildSingleSpreads(pages: {
|
|
59
|
+
id: string;
|
|
60
|
+
}[], covers?: CoverOptions): Spread[];
|
|
16
61
|
export declare function buildSpreads(pages: {
|
|
17
62
|
id: string;
|
|
18
|
-
}[]): Spread[];
|
|
63
|
+
}[], mode?: ResolvedLayoutMode, covers?: CoverOptions): Spread[];
|
|
19
64
|
export declare function contentPageIds(spread: Spread): string[];
|
|
65
|
+
/** Prefer left content page, else right — stable anchor when remapping layouts. */
|
|
66
|
+
export declare function primaryPageId(spread: Spread | undefined): string | null;
|
|
20
67
|
export declare function findSpreadIndexForPage(spreads: Spread[], pageId: string): number;
|
|
21
68
|
//# sourceMappingURL=layoutMode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layoutMode.d.ts","sourceRoot":"","sources":["../../src/nav/layoutMode.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"layoutMode.d.ts","sourceRoot":"","sources":["../../src/nav/layoutMode.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;AACvE,mEAAmE;AACnE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEvD,gEAAgE;AAChE,eAAO,MAAM,mBAAmB,EAAE,UAAmB,CAAC;A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AAE,CAoBV;AAED,wBAAgB,YAAY,CAC1B,KAAK,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,EACvB,IAAI,GAAE,kBAA+B,EACrC,MAAM,GAAE,YAAiB,GACxB,MAAM,EAAE,CAIV;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAKvD;AAED,mFAAmF;AACnF,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAKvE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAOhF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Story } from '../schema/story.js';
|
|
2
|
+
export type PackFanciOptions = {
|
|
3
|
+
/** Already-fetched files keyed by zip path (POSIX). */
|
|
4
|
+
files?: Record<string, Uint8Array>;
|
|
5
|
+
/** Base URL for resolving relative asset `src` values. */
|
|
6
|
+
baseUrl?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Pack a story + assets into a `.fanci` ZIP blob (`story.json` at the root).
|
|
10
|
+
* Relative asset paths are preserved; absolute/blob URLs are fetched and rewritten
|
|
11
|
+
* to `assets/{id}.{ext}` inside the archive.
|
|
12
|
+
*/
|
|
13
|
+
export declare function packFanci(story: Story, options?: PackFanciOptions): Promise<Blob>;
|
|
14
|
+
/** Trigger a browser download of a Blob. */
|
|
15
|
+
export declare function downloadBlob(blob: Blob, filename: string): void;
|
|
16
|
+
//# sourceMappingURL=packFanci.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packFanci.d.ts","sourceRoot":"","sources":["../../src/pack/packFanci.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACnC,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAyBF;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyD3F;AAED,4CAA4C;AAC5C,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAU/D"}
|
|
@@ -1,9 +1,28 @@
|
|
|
1
|
+
import { type FlipStyleInput } from '../flip/index.js';
|
|
1
2
|
import type { LoadedAssets } from '../load/loadStory.js';
|
|
2
|
-
import type { Spread } from '../nav/layoutMode.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { BookState, ResolvedLayoutMode, Spread } from '../nav/layoutMode.js';
|
|
4
|
+
import type { Story, TapAction } from '../schema/story.js';
|
|
5
|
+
export type SpreadViewFlipOptions = {
|
|
6
|
+
flipStyle?: FlipStyleInput;
|
|
7
|
+
flipSpeed?: number;
|
|
8
|
+
};
|
|
9
|
+
/** Editor stage zoom. Independent of single vs two-page layout. */
|
|
10
|
+
export type StageZoom = {
|
|
11
|
+
mode: 'fit-spread';
|
|
12
|
+
} | {
|
|
13
|
+
mode: 'fit-page';
|
|
14
|
+
} | {
|
|
15
|
+
mode: 'percent';
|
|
16
|
+
percent: number;
|
|
17
|
+
};
|
|
4
18
|
export declare class SpreadView {
|
|
5
19
|
readonly element: HTMLElement;
|
|
6
20
|
readonly bookEl: HTMLElement;
|
|
21
|
+
private hardbackEl;
|
|
22
|
+
private hardbackLeft;
|
|
23
|
+
private hardbackRight;
|
|
24
|
+
private hardbackLeftPage;
|
|
25
|
+
private hardbackRightPage;
|
|
7
26
|
private leftSlot;
|
|
8
27
|
private rightSlot;
|
|
9
28
|
private leftPage;
|
|
@@ -12,10 +31,45 @@ export declare class SpreadView {
|
|
|
12
31
|
private assets;
|
|
13
32
|
private onTapActions;
|
|
14
33
|
private turning;
|
|
15
|
-
|
|
34
|
+
private bookState;
|
|
35
|
+
private layoutMode;
|
|
36
|
+
private lastSize;
|
|
37
|
+
private stageZoom;
|
|
38
|
+
private currentSpread;
|
|
39
|
+
private flipStyle;
|
|
40
|
+
private flipSpeedMs;
|
|
41
|
+
constructor(story: Story, assets: LoadedAssets, onTapActions: (actions: TapAction[], pageEl: HTMLElement) => void, flipOptions?: SpreadViewFlipOptions);
|
|
42
|
+
get currentBookState(): BookState;
|
|
43
|
+
setFlipStyle(style: FlipStyleInput): void;
|
|
44
|
+
setFlipSpeed(speedMs: number): void;
|
|
45
|
+
setStageZoom(zoom: StageZoom): void;
|
|
16
46
|
setLayoutMode(mode: ResolvedLayoutMode): void;
|
|
47
|
+
/** Update closed/open presentation geometry (use page flips to change content). */
|
|
48
|
+
setBookState(state: BookState): void;
|
|
17
49
|
showSpread(spread: Spread, animate?: 'none' | 'next' | 'prev'): Promise<void>;
|
|
18
50
|
getPageElement(pageId: string): HTMLElement | null;
|
|
51
|
+
/** Leaf slot elements (left / right) for editor overlays. */
|
|
52
|
+
getLeafSlots(): {
|
|
53
|
+
left: HTMLElement;
|
|
54
|
+
right: HTMLElement;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Visible content leaves for the current spread (skips blank / dimmed cover mate).
|
|
58
|
+
* Used by the editor to mount Fabric canvases.
|
|
59
|
+
*/
|
|
60
|
+
getEditableLeaves(mode: ResolvedLayoutMode, spread: Spread): Array<{
|
|
61
|
+
side: 'left' | 'right';
|
|
62
|
+
pageIndex: number;
|
|
63
|
+
slot: HTMLElement;
|
|
64
|
+
}>;
|
|
65
|
+
/** Hide or show PageView DOM inside leaf slots (editor overlays sit on top). */
|
|
66
|
+
setPageViewsHidden(hidden: boolean): void;
|
|
67
|
+
/** Remount the current spread from story data (after in-place story mutations). */
|
|
68
|
+
remountCurrent(): void;
|
|
69
|
+
/** Keep SpreadView's story reference in sync when the host mutates covers/pages. */
|
|
70
|
+
setStory(story: Story): void;
|
|
71
|
+
/** Replace story + assets after opening a new package. */
|
|
72
|
+
setLoaded(story: Story, assets: LoadedAssets): void;
|
|
19
73
|
getVisiblePageElements(mode: ResolvedLayoutMode, spread: Spread): HTMLElement[];
|
|
20
74
|
updateStageSize(containerWidth: number, containerHeight: number, mode: ResolvedLayoutMode, spread?: {
|
|
21
75
|
left: {
|
|
@@ -26,6 +80,16 @@ export declare class SpreadView {
|
|
|
26
80
|
};
|
|
27
81
|
}): void;
|
|
28
82
|
destroy(): void;
|
|
83
|
+
private applyStageTransform;
|
|
84
|
+
/** Fit-spread keeps the fitted scale. Fit-page fits one page. Percent is CSS pixels. */
|
|
85
|
+
private sizedScale;
|
|
86
|
+
/** A front or back cover shown by itself, not as one half of an open spread. */
|
|
87
|
+
private isSoloCover;
|
|
88
|
+
private applySoloCover;
|
|
89
|
+
private sizeHardbackBoards;
|
|
90
|
+
private syncHardbackBoards;
|
|
91
|
+
private mountHardbackBoard;
|
|
92
|
+
private clearHardbackBoards;
|
|
29
93
|
private mountSpread;
|
|
30
94
|
private createLeaf;
|
|
31
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpreadView.d.ts","sourceRoot":"","sources":["../../src/render/SpreadView.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"SpreadView.d.ts","sourceRoot":"","sources":["../../src/render/SpreadView.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,EAAc,MAAM,sBAAsB,CAAC;AAC9F,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS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E,kBAAkB,EACxB,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAC3D,IAAI;IAMP,OAAO,IAAI,IAAI;IAaf,OAAO,CAAC,mBAAmB;IA6K3B,wFAAwF;IACxF,OAAO,CAAC,UAAU;IAgBlB,gFAAgF;IAChF,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,kBAAkB;IA2B1B,OAAO,CAAC,kBAAkB;IAgB1B,OAAO,CAAC,kBAAkB;IA8B1B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,UAAU;CAOnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBlock.d.ts","sourceRoot":"","sources":["../../../src/render/blocks/TextBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAC5C,WAAW,EAAE,MAAM,GAClB,WAAW,
|
|
1
|
+
{"version":3,"file":"TextBlock.d.ts","sourceRoot":"","sources":["../../../src/render/blocks/TextBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAC5C,WAAW,EAAE,MAAM,GAClB,WAAW,CAuBb"}
|