@makefully/fancifully 0.1.0 → 0.2.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 +31 -12
- package/LICENSE +21 -21
- package/README.md +250 -147
- package/dist/Storybook.d.ts +68 -0
- package/dist/Storybook.d.ts.map +1 -1
- package/dist/editor/EditorChrome.d.ts +33 -0
- package/dist/editor/EditorChrome.d.ts.map +1 -0
- package/dist/editor/PageCanvas.d.ts +50 -0
- package/dist/editor/PageCanvas.d.ts.map +1 -0
- package/dist/editor/dropImport.d.ts +16 -0
- package/dist/editor/dropImport.d.ts.map +1 -0
- package/dist/editor/index.d.ts +7 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/layoutUnits.d.ts +39 -0
- package/dist/editor/layoutUnits.d.ts.map +1 -0
- package/dist/editor/packFanci.d.ts +16 -0
- package/dist/editor/packFanci.d.ts.map +1 -0
- package/dist/editor/storyFabricMap.d.ts +29 -0
- package/dist/editor/storyFabricMap.d.ts.map +1 -0
- package/dist/fancifully.css +1 -1
- package/dist/fancifully.iife.js +4 -8
- package/dist/fancifully.js +3432 -2065
- 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 +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/nav/Pager.d.ts +18 -3
- package/dist/nav/Pager.d.ts.map +1 -1
- package/dist/nav/hardback.d.ts +21 -0
- package/dist/nav/hardback.d.ts.map +1 -0
- package/dist/nav/layoutMode.d.ts +43 -3
- package/dist/nav/layoutMode.d.ts.map +1 -1
- package/dist/render/SpreadView.d.ts +48 -2
- package/dist/render/SpreadView.d.ts.map +1 -1
- package/dist/schema/story.d.ts +30 -6
- package/dist/schema/story.d.ts.map +1 -1
- package/package.json +75 -74
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { LoadedAssets } from '../load/loadStory.js';
|
|
2
|
+
import type { Story, StoryPage } from '../schema/story.js';
|
|
3
|
+
export type PageCanvasHost = {
|
|
4
|
+
story: Story;
|
|
5
|
+
assets: LoadedAssets;
|
|
6
|
+
/** Zip-relative path → bytes for packFanci (dropped fonts/images). */
|
|
7
|
+
editorFiles: Record<string, Uint8Array>;
|
|
8
|
+
blobUrls: string[];
|
|
9
|
+
getDefaultFontFamily: () => string | null;
|
|
10
|
+
setDefaultFontFamily: (family: string) => void;
|
|
11
|
+
/** Apply font to every textbox on every open editor canvas + story text styles. */
|
|
12
|
+
applyFontToAllTextboxes: (family: string) => void;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Fabric canvas overlay for one story page leaf.
|
|
16
|
+
* Sized to `pageSize` (unscaled); the leaf / book transform scales it with the page.
|
|
17
|
+
*/
|
|
18
|
+
export declare class PageCanvas {
|
|
19
|
+
readonly element: HTMLElement;
|
|
20
|
+
private canvasEl;
|
|
21
|
+
private fabricCanvas;
|
|
22
|
+
private page;
|
|
23
|
+
private assets;
|
|
24
|
+
private pageSize;
|
|
25
|
+
private fabricMod;
|
|
26
|
+
private dirty;
|
|
27
|
+
private host;
|
|
28
|
+
private constructor();
|
|
29
|
+
static create(page: StoryPage, pageSize: {
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
}, host: PageCanvasHost): Promise<PageCanvas>;
|
|
33
|
+
private mount;
|
|
34
|
+
/** Sync Fabric's CSS/backing store after the overlay is attached to a leaf. */
|
|
35
|
+
syncLayout(): void;
|
|
36
|
+
get isDirty(): boolean;
|
|
37
|
+
markDirty(): void;
|
|
38
|
+
/** Apply a font family to every text object on this canvas. */
|
|
39
|
+
applyFontToAllText(family: string): void;
|
|
40
|
+
/** Commit canvas state into a StoryPage (does not mutate the original). */
|
|
41
|
+
commit(): StoryPage;
|
|
42
|
+
get pageId(): string;
|
|
43
|
+
reload(page: StoryPage): Promise<void>;
|
|
44
|
+
destroy(): void;
|
|
45
|
+
private handleDrop;
|
|
46
|
+
private dropFont;
|
|
47
|
+
private dropImage;
|
|
48
|
+
private dropText;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=PageCanvas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageCanvas.d.ts","sourceRoot":"","sources":["../../src/editor/PageCanvas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAoB3D,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;IACrB,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACxC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,oBAAoB,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAC1C,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,mFAAmF;IACnF,uBAAuB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF;;;GAGG;AACH,qBAAa,UAAU;IACrB,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,OAAO,CAAC,QAAQ,CAAoB;IACpC,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,IAAI,CAAY;IACxB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,QAAQ,CAAoC;IACpD,OAAO,CAAC,SAAS,CAA6B;IAC9C,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,IAAI,CAAiB;IAE7B,OAAO;WAoBM,MAAM,CACjB,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAC3C,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,UAAU,CAAC;YAMR,KAAK;IAiCnB,+EAA+E;IAC/E,UAAU,IAAI,IAAI;IAUlB,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,SAAS,IAAI,IAAI;IAIjB,+DAA+D;IAC/D,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAWxC,2EAA2E;IAC3E,MAAM,IAAI,SAAS;IAQnB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAEK,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAS5C,OAAO,IAAI,IAAI;YAMD,UAAU;YAuCV,QAAQ;YA6BR,SAAS;IAwCvB,OAAO,CAAC,QAAQ;CAqBjB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type DropKind = 'font' | 'image' | 'text' | 'unknown';
|
|
2
|
+
export declare function extensionOf(filename: string): string;
|
|
3
|
+
export declare function classifyFile(file: File): DropKind;
|
|
4
|
+
/** Family name derived from a font filename (no extension). */
|
|
5
|
+
export declare function familyFromFilename(filename: string): string;
|
|
6
|
+
export declare function uniqueId(prefix: string): string;
|
|
7
|
+
export declare function uniqueFamily(base: string, existing: Iterable<string>): string;
|
|
8
|
+
export declare function readFileBytes(file: File): Promise<Uint8Array>;
|
|
9
|
+
export declare function loadImageElement(url: string): Promise<HTMLImageElement>;
|
|
10
|
+
export declare function registerFontFace(family: string, url: string, descriptors?: {
|
|
11
|
+
weight?: string;
|
|
12
|
+
style?: string;
|
|
13
|
+
}): Promise<FontFace>;
|
|
14
|
+
/** Plain text from a drop (files and/or text/plain / text/html). */
|
|
15
|
+
export declare function extractDroppedText(dt: DataTransfer): Promise<string | null>;
|
|
16
|
+
//# sourceMappingURL=dropImport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropImport.d.ts","sourceRoot":"","sources":["../../src/editor/dropImport.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAK7D,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,QAAQ,CAajD;AAED,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG3D;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAM7E;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,CAEnE;AAED,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAS7E;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD,OAAO,CAAC,QAAQ,CAAC,CAQnB;AAED,oEAAoE;AACpE,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAkBjF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { EditorChrome, type EditorChromeHandlers, type EditorChromeState } from './EditorChrome.js';
|
|
2
|
+
export { PageCanvas, type PageCanvasHost } from './PageCanvas.js';
|
|
3
|
+
export { packFanci, downloadBlob, type PackFanciOptions } from './packFanci.js';
|
|
4
|
+
export { storyToFabric, fabricToStory, reflowTextboxScale, createEditorTextbox, } from './storyFabricMap.js';
|
|
5
|
+
export { boxToPixels, FABRIC_CSS_FONT_SIZE_MULT, htmlToPlainText, plainTextToHtml, resolveCssLineHeight, serializeLayoutBox, toPx, } from './layoutUnits.js';
|
|
6
|
+
export { classifyFile, extractDroppedText, familyFromFilename, type DropKind, } from './dropImport.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACpG,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EACL,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,WAAW,EACX,yBAAyB,EACzB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,IAAI,GACL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,QAAQ,GACd,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
export declare function htmlToPlainText(html: string): string;
|
|
38
|
+
export declare function plainTextToHtml(text: string): string;
|
|
39
|
+
//# sourceMappingURL=layoutUnits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layoutUnits.d.ts","sourceRoot":"","sources":["../../src/editor/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,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD;;;GAGG;AACH,wBAAgB,IAAI,CAClB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAClC,QAAQ,SAAI,EACZ,QAAQ,SAAI,GACX,MAAM,CAoBR;AAED,4EAA4E;AAC5E,wBAAgB,WAAW,CACzB,GAAG,EAAE,SAAS,GAAG,SAAS,EAC1B,QAAQ,EAAE,QAAQ,GACjB;IACD,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAQA;AAaD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,QAAQ,EAAE,QAAQ,EAClB,OAAO,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAO,GACzC,SAAS,CAyCX;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAClC,UAAU,EAAE,MAAM,EAClB,QAAQ,SAAO,GACd,MAAM,CAmBR;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMpD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQpD"}
|
|
@@ -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/editor/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"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Canvas, Textbox } from 'fabric';
|
|
2
|
+
import type { LoadedAssets } from '../load/loadStory.js';
|
|
3
|
+
import type { StoryPage } from '../schema/story.js';
|
|
4
|
+
import { type PageSize } from './layoutUnits.js';
|
|
5
|
+
export type FabricModule = typeof import('fabric');
|
|
6
|
+
/**
|
|
7
|
+
* If anything applies scale to a Textbox (e.g. shift+corner), bake scaleX into
|
|
8
|
+
* width and reset scale so glyphs stay the same size and lines reflow.
|
|
9
|
+
*/
|
|
10
|
+
export declare function reflowTextboxScale(textbox: Textbox): void;
|
|
11
|
+
export type EditorTextboxOptions = {
|
|
12
|
+
blockId: string;
|
|
13
|
+
text: string;
|
|
14
|
+
left: number;
|
|
15
|
+
top: number;
|
|
16
|
+
width: number;
|
|
17
|
+
fontFamily?: string;
|
|
18
|
+
fontSize?: number;
|
|
19
|
+
fill?: string;
|
|
20
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
21
|
+
lineHeight?: number;
|
|
22
|
+
};
|
|
23
|
+
/** Create a Fabric Textbox configured for editor use (wrap resize, CSS-matched LH). */
|
|
24
|
+
export declare function createEditorTextbox(fabric: FabricModule, options: EditorTextboxOptions): Textbox;
|
|
25
|
+
/** Load page background + text/image blocks onto a Fabric canvas. Hotspots are skipped. */
|
|
26
|
+
export declare function storyToFabric(canvas: Canvas, page: StoryPage, assets: LoadedAssets, fabric: FabricModule): Promise<void>;
|
|
27
|
+
/** Write Fabric object geometry/text back into the page. Hotspot blocks are preserved. */
|
|
28
|
+
export declare function fabricToStory(canvas: Canvas, page: StoryPage, pageSize?: PageSize): StoryPage;
|
|
29
|
+
//# sourceMappingURL=storyFabricMap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyFabricMap.d.ts","sourceRoot":"","sources":["../../src/editor/storyFabricMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAA6B,OAAO,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAQL,KAAK,QAAQ,EACd,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,YAAY,GAAG,cAAc,QAAQ,CAAC,CAAC;AAQnD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAUzD;AAWD,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,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,GAAG,QAAQ,GAAG,OAAO,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,uFAAuF;AACvF,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAqCT;AAED,2FAA2F;AAC3F,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC,CA8Ff;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,SAAS,EACf,QAAQ,CAAC,EAAE,QAAQ,GAClB,SAAS,CA0FX"}
|
package/dist/fancifully.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.fc-root{--fc-bg: #e8e2d6;--fc-page-bg: #faf6ef;--fc-ink: #1f1a14;--fc-accent: #c45c26;--fc-cue-active-bg: rgba(196, 92, 38, .28);--fc-cue-read-bg: rgba(196, 92, 38, .12);--fc-chrome-bg: rgba(31, 26, 20, .88);--fc-chrome-fg: #faf6ef;box-sizing:border-box;position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-height:360px;background:radial-gradient(ellipse at 20% 0%,rgba(255,255,255,.45),transparent 50%),linear-gradient(160deg,#f0e6d4 0%,var(--fc-bg) 45%,#d9cfc0 100%);color:var(--fc-ink);font-family:Georgia,Times New Roman,serif;outline:none;overflow:hidden}.fc-root *,.fc-root *:before,.fc-root *:after{box-sizing:border-box}.fc-stage{position:relative;flex:1;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:pan-y}.fc-spread-viewport{position:relative;overflow:hidden}.fc-spread-viewport-single{overflow:hidden}.fc-spread{--fc-page-width: 768px;--fc-page-height: 1024px;position:relative;display:flex;flex-direction:row;transform-origin:
|
|
1
|
+
.fc-root{--fc-bg: #e8e2d6;--fc-page-bg: #faf6ef;--fc-ink: #1f1a14;--fc-accent: #c45c26;--fc-cue-active-bg: rgba(196, 92, 38, .28);--fc-cue-read-bg: rgba(196, 92, 38, .12);--fc-chrome-bg: rgba(31, 26, 20, .88);--fc-chrome-fg: #faf6ef;--fc-chrome-padding: .65rem;--fc-captions-bg: rgba(31, 26, 20, .82);--fc-captions-fg: #fff;--fc-captions-bottom: 4.5rem;--fc-btn-border: rgba(250, 246, 239, .35);--fc-btn-hover-bg: rgba(250, 246, 239, .12);--fc-btn-read-bg: var(--fc-accent);--fc-btn-read-fg: #fff;--fc-btn-prev-image: none;--fc-btn-next-image: none;--fc-btn-read-image: none;--fc-btn-image-size: 3.5rem;box-sizing:border-box;position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-height:360px;background:radial-gradient(ellipse at 20% 0%,rgba(255,255,255,.45),transparent 50%),linear-gradient(160deg,#f0e6d4 0%,var(--fc-bg) 45%,#d9cfc0 100%);color:var(--fc-ink);font-family:Georgia,Times New Roman,serif;outline:none;overflow:hidden}.fc-root *,.fc-root *:before,.fc-root *:after{box-sizing:border-box}.fc-stage{position:relative;flex:1;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:pan-y}.fc-spread-viewport{--fc-hardback-overhang-x: 0px;--fc-hardback-overhang-y: 0px;position:relative;overflow:hidden}.fc-spread-viewport-single{overflow:hidden}.fc-hardback{position:absolute;left:0;top:0;display:flex;flex-direction:row;pointer-events:none;z-index:0;will-change:transform}.fc-hardback-board{position:relative;flex:0 0 auto;overflow:hidden;background:var(--fc-page-bg);box-shadow:inset 0 0 0 1px #1f1a141a}.fc-hardback-board-left{border-radius:6px 0 0 6px}.fc-hardback-board-right{border-radius:0 6px 6px 0;box-shadow:inset 0 0 0 1px #1f1a141a,-4px 0 14px #1f1a1424}.fc-hardback-page{width:100%;height:100%}.fc-spread-viewport.fc-hardback-open .fc-spread{position:absolute;z-index:1}.fc-spread{--fc-page-width: 768px;--fc-page-height: 1024px;--fc-flip-duration: .4s;position:relative;display:flex;flex-direction:row;transform-origin:left top;will-change:transform}.fc-leaf.fc-leaf-dimmed{visibility:hidden;pointer-events:none}.fc-leaf{position:relative;width:var(--fc-page-width);height:var(--fc-page-height);flex:0 0 auto;overflow:hidden;background:var(--fc-page-bg);box-shadow:inset 0 0 0 1px #1f1a1414}.fc-leaf-left{border-radius:4px 0 0 4px}.fc-leaf-right{border-radius:0 4px 4px 0;box-shadow:inset 0 0 0 1px #1f1a1414,-6px 0 18px #1f1a141f}.fc-page{position:relative;width:100%;height:100%;overflow:hidden}.fc-page-blank{background:transparent;box-shadow:none}.fc-block{position:absolute}.fc-block-text{z-index:2;line-height:1.35}.fc-block-text p,.fc-block-text h1,.fc-block-text h2,.fc-block-text h3,.fc-block-text h4,.fc-block-text h5,.fc-block-text h6{margin:0}.fc-block-image{z-index:1;overflow:hidden}.fc-block-image img{display:block;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;user-select:none}.fc-block-hotspot{z-index:3;margin:0;padding:0;border:2px dashed transparent;background:transparent;cursor:pointer}.fc-block-hotspot:focus-visible{border-color:var(--fc-accent);outline:none}.fc-block-hotspot:hover{background:#c45c2614}.fc-cue.is-active{background:var(--fc-cue-active-bg);border-radius:.15em}.fc-cue.is-read:not(.is-active){background:var(--fc-cue-read-bg);border-radius:.15em}.fc-captions{position:absolute;left:50%;bottom:var(--fc-captions-bottom);transform:translate(-50%);max-width:min(36rem,90%);padding:.4rem .75rem;border-radius:.35rem;background:var(--fc-captions-bg);color:var(--fc-captions-fg);font-size:.95rem;text-align:center;pointer-events:none;z-index:5}.fc-captions:empty,.fc-captions[hidden]{display:none}.fc-chrome{display:flex;gap:.5rem;justify-content:center;align-items:center;padding:var(--fc-chrome-padding);background:var(--fc-chrome-bg);color:var(--fc-chrome-fg)}.fc-chrome[hidden]{display:none}.fc-btn{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--fc-btn-border);background-color:transparent;background-image:none;background-repeat:no-repeat;background-position:center;background-size:contain;color:inherit;font:inherit;font-size:.95rem;padding:.4rem .9rem;border-radius:.3rem;cursor:pointer}.fc-btn:hover,.fc-btn:focus-visible{background-color:var(--fc-btn-hover-bg);outline:none}.fc-btn:disabled,.fc-btn.is-disabled{opacity:.35;pointer-events:none;cursor:default}.fc-btn-prev{background-image:var(--fc-btn-prev-image)}.fc-btn-next{background-image:var(--fc-btn-next-image)}.fc-btn-read{background-color:var(--fc-btn-read-bg);background-image:var(--fc-btn-read-image);border-color:transparent;color:var(--fc-btn-read-fg)}.fc-chrome.fc-chrome--images .fc-btn{width:var(--fc-btn-image-size);height:var(--fc-btn-image-size);padding:0;border:none;background-color:transparent;color:transparent;font-size:0;line-height:0;text-indent:-999em;overflow:hidden}.fc-chrome.fc-chrome--images .fc-btn:hover,.fc-chrome.fc-chrome--images .fc-btn:focus-visible{background-color:transparent;filter:brightness(1.08)}.fc-chrome.fc-chrome--images .fc-btn-read{background-color:transparent}.fc-spread.fc-turn-next .fc-leaf-right{animation:fc-flip-next var(--fc-flip-duration) ease forwards;transform-origin:left center}.fc-spread.fc-turn-prev .fc-leaf-left{animation:fc-flip-prev var(--fc-flip-duration) ease forwards;transform-origin:right center}@keyframes fc-flip-next{0%{transform:perspective(1200px) rotateY(0)}to{transform:perspective(1200px) rotateY(-90deg)}}@keyframes fc-flip-prev{0%{transform:perspective(1200px) rotateY(0)}to{transform:perspective(1200px) rotateY(90deg)}}.fc-block-image.lit{filter:brightness(1.15) saturate(1.1);box-shadow:0 0 24px #ffc85073}.fc-editor-chrome{position:absolute;top:.5rem;right:.5rem;z-index:20;display:flex;flex-direction:column;align-items:flex-end;gap:.4rem;pointer-events:none}.fc-editor-chrome>*{pointer-events:auto}.fc-editor-toggle{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid rgba(31,26,20,.25);background:#faf6eff2;color:var(--fc-ink);font:inherit;font-size:.85rem;padding:.35rem .75rem;border-radius:.3rem;cursor:pointer;box-shadow:0 1px 4px #1f1a141f}.fc-editor-toggle:hover,.fc-editor-toggle:focus-visible{background:#fff;outline:none}.fc-editor-toggle.is-active{background:var(--fc-accent);border-color:transparent;color:#fff}.fc-editor-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.35rem;max-width:min(22rem,calc(100vw - 1.5rem));padding:.45rem;border-radius:.35rem;background:#1f1a14e6;color:#faf6ef;box-shadow:0 2px 10px #1f1a1440}.fc-editor-toolbar[hidden]{display:none}.fc-editor-btn{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid rgba(250,246,239,.35);background:transparent;color:inherit;font:inherit;font-size:.8rem;padding:.3rem .55rem;border-radius:.25rem;cursor:pointer}.fc-editor-btn:hover,.fc-editor-btn:focus-visible{background:#faf6ef1f;outline:none}.fc-editor-btn:disabled{opacity:.35;pointer-events:none}.fc-editor-btn-download{background:var(--fc-accent);border-color:transparent;color:#fff}.fc-editor-check{display:inline-flex;align-items:center;gap:.25rem;font-size:.8rem;white-space:nowrap;cursor:pointer}.fc-page-canvas{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;width:100%;height:100%}.fc-page-canvas .canvas-container{width:100%!important;height:100%!important}.fc-page-canvas canvas{width:100%!important;height:100%!important}.fc-root.fc-editing .fc-page[hidden],.fc-root.fc-editing .fc-chrome{display:none}
|