@makefully/fancifully 0.2.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 +19 -0
- package/README.md +30 -35
- package/dist/Storybook.d.ts +69 -34
- package/dist/Storybook.d.ts.map +1 -1
- package/dist/fancifully.css +1 -1
- package/dist/fancifully.iife.js +4 -4
- package/dist/fancifully.js +3139 -2967
- package/dist/index.d.ts +9 -7
- 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/{editor → layout}/layoutUnits.d.ts +4 -0
- package/dist/{editor → layout}/layoutUnits.d.ts.map +1 -1
- 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 +10 -3
- package/dist/nav/Pager.d.ts.map +1 -1
- package/dist/nav/hardback.d.ts +3 -0
- package/dist/nav/hardback.d.ts.map +1 -1
- package/dist/nav/layoutMode.d.ts +10 -3
- package/dist/nav/layoutMode.d.ts.map +1 -1
- package/dist/pack/packFanci.d.ts.map +1 -0
- package/dist/render/SpreadView.d.ts +20 -2
- 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 +138 -19
- 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 +4 -3
- package/dist/editor/EditorChrome.d.ts +0 -33
- package/dist/editor/EditorChrome.d.ts.map +0 -1
- package/dist/editor/PageCanvas.d.ts +0 -50
- package/dist/editor/PageCanvas.d.ts.map +0 -1
- package/dist/editor/dropImport.d.ts +0 -16
- package/dist/editor/dropImport.d.ts.map +0 -1
- package/dist/editor/index.d.ts +0 -7
- package/dist/editor/index.d.ts.map +0 -1
- package/dist/editor/packFanci.d.ts.map +0 -1
- package/dist/editor/storyFabricMap.d.ts +0 -29
- package/dist/editor/storyFabricMap.d.ts.map +0 -1
- /package/dist/{editor → pack}/packFanci.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.3.0]
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Reader layout on the host: `StorybookOptions.layoutMode` / `singleBreakpoint`, `setLayoutMode`, and `layoutPreference` (default `auto`)
|
|
10
|
+
- Authoring fields: `coverSize`, `guides`, cover `innerColor`, and text `fontWeight` / `fontStyle`
|
|
11
|
+
- Fabric-like page and spread interop, plus layout helpers (`boxToPixels`, `scaleBlocksToPageSize`)
|
|
12
|
+
- Package and page APIs: `packFanci`, `downloadFanci`, `addPage`, cover/hardback setters, and `setStageZoom`
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Single vs two-page presentation is a reader setting. Stories store pages only; a legacy `layout` object in story JSON is ignored.
|
|
17
|
+
- The Maker UI and demo app left this package. Fabric is no longer a dependency.
|
|
18
|
+
- Chrome buttons use Iconify icons.
|
|
19
|
+
|
|
20
|
+
### Removed
|
|
21
|
+
|
|
22
|
+
- In-repo editor and demo (`src/editor`, `vite.demo.config.ts`)
|
|
23
|
+
|
|
5
24
|
## [0.2.0]
|
|
6
25
|
|
|
7
26
|
### Added
|
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ const book = await Storybook.create(document.getElementById('app')!, {
|
|
|
36
36
|
book.next();
|
|
37
37
|
book.prev();
|
|
38
38
|
book.playReadAloud();
|
|
39
|
-
book.setLayoutMode('responsive'); // 'single' | 'two-page' | 'responsive' | 'auto'
|
|
39
|
+
book.setLayoutMode('responsive'); // reader setting: 'single' | 'two-page' | 'responsive' | 'auto'
|
|
40
40
|
book.setFlipSpeed(300);
|
|
41
41
|
book.setFlipStyle('default');
|
|
42
42
|
```
|
|
@@ -73,6 +73,25 @@ await Storybook.create(el, {
|
|
|
73
73
|
|
|
74
74
|
Built-in: `DefaultFlipStyle` (`"default"`) — CSS 3D leaf turn. The engine uses the same `FlipStyle` base class for built-ins so new styles stay consistent.
|
|
75
75
|
|
|
76
|
+
### Reader layout
|
|
77
|
+
|
|
78
|
+
Single page vs facing spread is a **host setting**, like flip style. Stories store a list of pages. The reader decides how to pair them. Legacy `layout` objects in story JSON are ignored.
|
|
79
|
+
|
|
80
|
+
| API | Role |
|
|
81
|
+
|-----|------|
|
|
82
|
+
| `StorybookOptions.layoutMode` | `single`, `two-page`, `responsive`, or `auto` (default) |
|
|
83
|
+
| `StorybookOptions.singleBreakpoint` | Width where `auto` switches to two-page (default `900`) |
|
|
84
|
+
| `book.setLayoutMode` | Change at runtime |
|
|
85
|
+
| `book.layoutPreference` | The host mode, before it resolves |
|
|
86
|
+
| `book.layoutMode` | Resolved `single` or `two-page` |
|
|
87
|
+
|
|
88
|
+
- **`two-page`**: facing pairs. With a front cover, open spreads start after the cover.
|
|
89
|
+
- **`single`**: one story page per turn, with a blank mate kept offscreen so the flip stays the same.
|
|
90
|
+
- **`responsive`**: landscape (width ≥ height) → two-page; portrait → single.
|
|
91
|
+
- **`auto`**: two-page when the stage is at least `singleBreakpoint` wide.
|
|
92
|
+
|
|
93
|
+
When the resolved mode changes, spreads rebuild and the view jumps to the spread that contains the current page.
|
|
94
|
+
|
|
76
95
|
## Chrome theming
|
|
77
96
|
|
|
78
97
|
Built-in Prev / Read / Next live under `.fc-chrome`. Customize via CSS variables on `.fc-root` (or a host class) and optional `chrome` options:
|
|
@@ -101,35 +120,21 @@ await Storybook.create(el, {
|
|
|
101
120
|
|
|
102
121
|
Prev/next disable at the first/last spread (`disabled` + `.is-disabled`).
|
|
103
122
|
|
|
104
|
-
##
|
|
123
|
+
## Authoring / editor
|
|
105
124
|
|
|
106
|
-
|
|
125
|
+
This package is the **player + story API** (load/render/playback, programmatic page mutations, `packFanci`, fabric-like JSON ingest). The Maker UI (Fabric overlays, page list, themes) lives in sibling [`@makefully/fancifully-editor`](../fancifully-editor):
|
|
107
126
|
|
|
108
127
|
```ts
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
});
|
|
128
|
+
import { Storybook } from '@makefully/fancifully';
|
|
129
|
+
import { attachEditor } from '@makefully/fancifully-editor';
|
|
130
|
+
import '@makefully/fancifully/fancifully.css';
|
|
131
|
+
import '@makefully/fancifully-editor/editor.css';
|
|
114
132
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
await book.downloadFanci(); // `{story.id}.fanci`
|
|
118
|
-
await book.exitEditor();
|
|
133
|
+
const book = await Storybook.create(el, { story });
|
|
134
|
+
attachEditor(book, { enter: true });
|
|
119
135
|
```
|
|
120
136
|
|
|
121
|
-
`
|
|
122
|
-
|
|
123
|
-
### Drag & drop (edit mode)
|
|
124
|
-
|
|
125
|
-
| Drop | Result |
|
|
126
|
-
|------|--------|
|
|
127
|
-
| Font (`.woff2` / `.woff` / `.ttf` / `.otf`) on empty page | Sets the default text font and applies it to all textboxes; registered in `story.fonts` for `.fanci` export |
|
|
128
|
-
| Font on a textbox | Changes only that textbox’s `fontFamily` (still packed into `.fanci`) |
|
|
129
|
-
| Image (png/jpeg/gif/webp/svg/…) | Places a new image block on the canvas at the drop point |
|
|
130
|
-
| Text (`text/plain`, `text/html`, or `.txt`) | Creates a new textbox with that content |
|
|
131
|
-
|
|
132
|
-
Dropped fonts/images are stored as zip-relative paths under `fonts/` / `assets/` and included when you **Download book**.
|
|
137
|
+
Write helpers on `Storybook` include `addPage`, `removePage`, `reorderPages`, `setFrontCover` / `setBackCover` / `setHardback`, `updatePage`, `replaceStory`, `downloadFanci`, plus leaf-host APIs for overlays (`getEditableLeaves`, `setPageViewsHidden`, `setNavLocked`).
|
|
133
138
|
|
|
134
139
|
## Embed with SpringRoll (Platypus-like)
|
|
135
140
|
|
|
@@ -209,21 +214,11 @@ Stories are JSON packages (not a single HTML document). Text may embed HTML; ima
|
|
|
209
214
|
| `frontCover` | If true, first page is a closed cover (centered); opens with a tween; no blank to its left |
|
|
210
215
|
| `backCover` | If true, last page is a back cover (no blank to its right); can close centered at the end |
|
|
211
216
|
| `hardback` | If true (with a cover flag), cover boards are larger than interior pages so open spreads show a cover rim |
|
|
212
|
-
| `layout.mode` | `single` (one-page) \| `two-page` \| `responsive` (orientation) \| `auto` (width breakpoint) |
|
|
213
|
-
| `layout.singleBreakpoint` | Width where `auto` switches to two-page |
|
|
214
217
|
| `assets` | Map of image / audio / vtt / html |
|
|
215
218
|
| `pages[].blocks` | `text`, `image`, `hotspot` with `layout` boxes |
|
|
216
219
|
| `pages[].readAloud` | `{ audio, cues }` — cues are a VTT asset id or inline `{id,start,end}[]` |
|
|
217
220
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
- **Always** a left+right spread under the hood (blank mates keep flip geometry).
|
|
221
|
-
- **`two-page`**: facing pairs — cover `[blank, p0]`, then `[p1, p2]`, …
|
|
222
|
-
- **`single` (one-page)**: one story page per spread with a blank mate (about 2× as many spreads). Blank leaf stays offscreen; same flip animation.
|
|
223
|
-
- **`responsive`**: landscape (width ≥ height) → two-page; portrait → single. Remaps to the same content page instantly when orientation changes.
|
|
224
|
-
- **`auto`**: legacy width breakpoint (`singleBreakpoint`).
|
|
225
|
-
|
|
226
|
-
When the resolved mode flips, Fancifully rebuilds spreads and jumps to the spread that contains the current page (no page-turn animation).
|
|
221
|
+
`pages` is always a flat list. Facing pages are a reader presentation, not a stored spread.
|
|
227
222
|
|
|
228
223
|
### Covers (`frontCover` / `backCover` / `hardback`)
|
|
229
224
|
|
package/dist/Storybook.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { FlipStyleInput } from './flip/index.js';
|
|
2
|
+
import { findFanciFile } from './load/fanciFile.js';
|
|
3
|
+
import { type LoadedAssets } from './load/loadStory.js';
|
|
2
4
|
import type { StorySource } from './load/packageTypes.js';
|
|
5
|
+
import type { LayoutMode } from './nav/layoutMode.js';
|
|
3
6
|
import { type PagerEvents } from './nav/Pager.js';
|
|
4
|
-
import
|
|
7
|
+
import { type StageZoom } from './render/SpreadView.js';
|
|
8
|
+
import type { Story, StoryPage } from './schema/story.js';
|
|
5
9
|
import { type SpringrollLike } from './springroll/bindApplication.js';
|
|
6
10
|
import { type LoadProgress } from './springroll/loading.js';
|
|
7
11
|
export type StorybookChromeOptions = {
|
|
@@ -41,10 +45,18 @@ export type StorybookOptions = {
|
|
|
41
45
|
/** Flip duration in milliseconds. Host setting (not part of story JSON). */
|
|
42
46
|
flipSpeed?: number;
|
|
43
47
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
48
|
+
* How pages are presented: one at a time, facing pairs, by orientation, or
|
|
49
|
+
* by stage width. Host setting (not part of story JSON). Default `auto`.
|
|
46
50
|
*/
|
|
47
|
-
|
|
51
|
+
layoutMode?: LayoutMode;
|
|
52
|
+
/** Stage width in px where `auto` switches to two-page. Default 900. */
|
|
53
|
+
singleBreakpoint?: number;
|
|
54
|
+
};
|
|
55
|
+
export type EditableLeaf = {
|
|
56
|
+
side: 'left' | 'right';
|
|
57
|
+
pageIndex: number;
|
|
58
|
+
pageId: string;
|
|
59
|
+
slot: HTMLElement;
|
|
48
60
|
};
|
|
49
61
|
type StorybookEvents = PagerEvents & {
|
|
50
62
|
ready: {
|
|
@@ -74,54 +86,77 @@ export declare class Storybook {
|
|
|
74
86
|
private btnPrev;
|
|
75
87
|
private btnRead;
|
|
76
88
|
private btnNext;
|
|
77
|
-
private editorEnabled;
|
|
78
|
-
private editing;
|
|
79
89
|
private chromeHiddenByOptions;
|
|
80
|
-
|
|
81
|
-
private
|
|
82
|
-
private
|
|
83
|
-
/**
|
|
84
|
-
private
|
|
85
|
-
/** Default font family for new textboxes (set by dropping a font on empty canvas). */
|
|
86
|
-
private editorDefaultFontFamily;
|
|
90
|
+
/** Extra zip paths → bytes (fonts/images added by hosts/editors) for packFanci. */
|
|
91
|
+
private extraFiles;
|
|
92
|
+
private defaultFontFamily;
|
|
93
|
+
/** When true, swipe/keyboard/chrome nav and read-aloud are locked (editor overlay). */
|
|
94
|
+
private navLocked;
|
|
87
95
|
private constructor();
|
|
88
96
|
static create(container: HTMLElement, options: StorybookOptions): Promise<Storybook>;
|
|
89
97
|
get story(): Story;
|
|
90
|
-
get
|
|
98
|
+
get assets(): LoadedAssets;
|
|
99
|
+
get baseUrl(): string;
|
|
100
|
+
/** Mutable list of blob URLs owned by the loaded package (hosts may push). */
|
|
101
|
+
get blobUrls(): string[];
|
|
102
|
+
get layoutMode(): import("./index.js").ResolvedLayoutMode;
|
|
103
|
+
/** Host preference (`auto`, `responsive`, …) before it resolves to single or two-page. */
|
|
104
|
+
get layoutPreference(): LayoutMode;
|
|
91
105
|
get pageIds(): string[];
|
|
92
106
|
get spreadIndex(): number;
|
|
93
|
-
get
|
|
107
|
+
get isNavLocked(): boolean;
|
|
108
|
+
getDefaultFontFamily(): string | null;
|
|
109
|
+
setDefaultFontFamily(family: string | null): void;
|
|
110
|
+
getExtraFiles(): Record<string, Uint8Array>;
|
|
111
|
+
putExtraFile(path: string, bytes: Uint8Array): void;
|
|
112
|
+
/**
|
|
113
|
+
* Lock player navigation (swipe/keys/chrome) for overlay editors.
|
|
114
|
+
* When locked, also hides book chrome unless the host already hid it.
|
|
115
|
+
*/
|
|
116
|
+
setNavLocked(locked: boolean): void;
|
|
117
|
+
/** Visible content leaves for overlay editors (Fabric, etc.). */
|
|
118
|
+
getEditableLeaves(): EditableLeaf[];
|
|
119
|
+
/** The `.fc-spread` book element — host for a spread-wide editor overlay. */
|
|
120
|
+
getSpreadElement(): HTMLElement;
|
|
121
|
+
get bookState(): import("./index.js").BookState;
|
|
122
|
+
/** Left/right content pages for the current spread (`null` = blank leaf). */
|
|
123
|
+
getSpreadPages(): {
|
|
124
|
+
left: StoryPage | null;
|
|
125
|
+
right: StoryPage | null;
|
|
126
|
+
};
|
|
127
|
+
setPageViewsHidden(hidden: boolean): void;
|
|
128
|
+
remountCurrent(): void;
|
|
94
129
|
on<K extends keyof StorybookEvents>(event: K, fn: Listener<K>): () => void;
|
|
95
130
|
next(): Promise<void>;
|
|
96
131
|
prev(): Promise<void>;
|
|
97
132
|
goTo(pageId: string): Promise<void>;
|
|
133
|
+
/** Editor-only. Does not change single vs two-page layout. */
|
|
134
|
+
setStageZoom(zoom: StageZoom): void;
|
|
98
135
|
setLayoutMode(mode: LayoutMode): void;
|
|
99
|
-
/** Swap page-flip implementation at runtime (id, subclass, or instance). */
|
|
100
136
|
setFlipStyle(style: FlipStyleInput): void;
|
|
101
|
-
/** Set flip duration in milliseconds. */
|
|
102
137
|
setFlipSpeed(speedMs: number): void;
|
|
103
138
|
playReadAloud(): Promise<void>;
|
|
104
139
|
pause(): void;
|
|
105
140
|
resume(): void;
|
|
106
|
-
/**
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
|
|
110
|
-
/**
|
|
141
|
+
/** Replace the loaded story from a File / URL / Story object. */
|
|
142
|
+
replaceStory(source: StorySource | Story, storyName?: string): Promise<void>;
|
|
143
|
+
/** Open a `.fanci` File (validates extension/MIME). */
|
|
144
|
+
openFanciFile(file: File): Promise<void>;
|
|
145
|
+
/** Replace a page in-place and remount the current spread. */
|
|
146
|
+
updatePage(page: StoryPage): Promise<void>;
|
|
147
|
+
setPages(pages: StoryPage[], preferPageId?: string | null): Promise<void>;
|
|
148
|
+
addPage(): Promise<StoryPage>;
|
|
149
|
+
removePage(pageId: string): Promise<void>;
|
|
150
|
+
reorderPages(fromIndex: number, toIndex: number): Promise<void>;
|
|
151
|
+
setFrontCover(enabled: boolean): Promise<void>;
|
|
152
|
+
setBackCover(enabled: boolean): Promise<void>;
|
|
153
|
+
setHardback(enabled: boolean): Promise<void>;
|
|
154
|
+
/** Apply a font family to every text block in the story. */
|
|
155
|
+
applyFontToAllText(family: string): void;
|
|
156
|
+
packToBlob(): Promise<Blob>;
|
|
111
157
|
downloadFanci(filename?: string): Promise<void>;
|
|
112
158
|
destroy(): void;
|
|
113
159
|
private navigate;
|
|
114
|
-
private mountEditorChrome;
|
|
115
|
-
private syncEditorChromeState;
|
|
116
|
-
private editorHost;
|
|
117
|
-
private mountEditorCanvases;
|
|
118
|
-
private commitEditorCanvases;
|
|
119
|
-
private destroyEditorCanvases;
|
|
120
|
-
private editorAddPage;
|
|
121
|
-
private editorRemovePage;
|
|
122
|
-
private editorSetFrontCover;
|
|
123
|
-
private editorSetBackCover;
|
|
124
|
-
private editorSetHardback;
|
|
125
160
|
private wireChrome;
|
|
126
161
|
private syncChromeNavState;
|
|
127
162
|
private wirePager;
|
|
@@ -133,5 +168,5 @@ export declare class Storybook {
|
|
|
133
168
|
private handleTapActions;
|
|
134
169
|
private emit;
|
|
135
170
|
}
|
|
136
|
-
export {};
|
|
171
|
+
export { findFanciFile };
|
|
137
172
|
//# sourceMappingURL=Storybook.d.ts.map
|
package/dist/Storybook.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Storybook.d.ts","sourceRoot":"","sources":["../src/Storybook.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Storybook.d.ts","sourceRoot":"","sources":["../src/Storybook.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAe,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAgC,KAAK,YAAY,EAAoB,MAAM,qBAAqB,CAAC;AACxG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAS,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACpE,OA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G,OAAO,CAAC,IAAI,CAAC;IAQ7C,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAMlD,4DAA4D;IAC5D,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAWlC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAO3B,aAAa,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrD,OAAO,IAAI,IAAI;YAcD,QAAQ;IAMtB,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,SAAS;IAcjB,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,UAAU;IAgBlB,OAAO,CAAC,WAAW;IAyBnB,OAAO,CAAC,mBAAmB;IAsC3B,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,IAAI;CAKb;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
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;--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;
|
|
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-stage.fc-stage-scroll{overflow:auto;align-items:safe center;justify-content:safe center}.fc-stage.fc-stage-fit-page{overflow-x:auto;overflow-y:hidden;align-items:center;justify-content:safe center}.fc-spread-viewport{--fc-hardback-overhang-x: 0px;--fc-hardback-overhang-y: 0px;position:relative;flex-shrink:0;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-spread.is-solo-cover .fc-leaf.is-cover-hidden{display:none}.fc-spread.is-solo-cover .fc-leaf{border-radius:4px;box-shadow:inset 0 0 0 1px #1f1a1414}.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-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;line-height:0}.fc-icon svg{display:block;width:1.15rem;height:1.15rem}.fc-btn-label--sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.fc-btn{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;display:inline-flex;align-items:center;justify-content:center;gap:.35rem;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;overflow:hidden}.fc-chrome.fc-chrome--images .fc-btn .fc-icon,.fc-chrome.fc-chrome--images .fc-btn .fc-btn-label{display:none}.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}
|