squiffy-runtime 6.0.1 → 7.0.0-beta.11
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/dist/assets.d.ts +3 -0
- package/dist/assets.test.d.ts +1 -0
- package/dist/classes.test.d.ts +1 -0
- package/dist/confirmDialog.d.ts +8 -0
- package/dist/events.d.ts +16 -0
- package/dist/every.d.ts +12 -0
- package/dist/every.test.d.ts +1 -0
- package/dist/helpers.test.d.ts +1 -0
- package/dist/numbers.d.ts +3 -0
- package/dist/panels.d.ts +14 -0
- package/dist/panels.test.d.ts +1 -0
- package/dist/paths.d.ts +15 -0
- package/dist/paths.test.d.ts +1 -0
- package/dist/persistent.test.d.ts +1 -0
- package/dist/playerSettings.d.ts +17 -0
- package/dist/pluginManager.d.ts +2 -1
- package/dist/preview-host.d.ts +33 -0
- package/dist/preview-host.js +125 -0
- package/dist/preview-host.js.map +7 -0
- package/dist/preview-host.test.d.ts +1 -0
- package/dist/preview-html.d.ts +2 -0
- package/dist/preview-html.js +2 -0
- package/dist/preview-protocol.d.ts +69 -0
- package/dist/preview.d.ts +15 -0
- package/dist/preview.main.d.ts +1 -0
- package/dist/preview.test.d.ts +1 -0
- package/dist/saveSlots.d.ts +16 -0
- package/dist/saves.test.d.ts +1 -0
- package/dist/savesDialog.d.ts +43 -0
- package/dist/savesDialog.test.d.ts +1 -0
- package/dist/scripts.test.d.ts +1 -0
- package/dist/settings.test.d.ts +1 -0
- package/dist/settingsDialog.d.ts +17 -0
- package/dist/skill.test.d.ts +1 -0
- package/dist/sound.d.ts +35 -0
- package/dist/sound.test.d.ts +1 -0
- package/dist/squiffy.page.css +155 -0
- package/dist/squiffy.preview.html +1631 -0
- package/dist/squiffy.runtime.css +1123 -20
- package/dist/squiffy.runtime.d.ts +13 -1
- package/dist/squiffy.runtime.global.js +146 -76
- package/dist/squiffy.runtime.global.js.map +1 -1
- package/dist/squiffy.runtime.js +7105 -4681
- package/dist/squiffy.runtime.js.map +1 -1
- package/dist/state.d.ts +17 -0
- package/dist/storyLists.d.ts +4 -0
- package/dist/storyLists.test.d.ts +1 -0
- package/dist/style.test.d.ts +1 -0
- package/dist/textProcessor.d.ts +27 -0
- package/dist/transitions.test.d.ts +1 -0
- package/dist/types.d.ts +137 -1
- package/dist/types.plugins.d.ts +2 -0
- package/dist/uiLinks.test.d.ts +1 -0
- package/dist/utils.d.ts +2 -1
- package/dist/utils.test.d.ts +1 -0
- package/package.json +25 -11
- package/src/__snapshots__/squiffy.runtime.test.ts.snap +22 -22
- package/src/animation.test.ts +44 -0
- package/src/animation.ts +9 -5
- package/src/assets.test.ts +225 -0
- package/src/assets.ts +92 -0
- package/src/classes.test.ts +201 -0
- package/src/confirmDialog.ts +66 -0
- package/src/events.ts +20 -0
- package/src/every.test.ts +25 -0
- package/src/every.ts +94 -0
- package/src/helpers.test.ts +34 -0
- package/src/numbers.ts +21 -0
- package/src/panels.test.ts +225 -0
- package/src/panels.ts +187 -0
- package/src/paths.test.ts +66 -0
- package/src/paths.ts +155 -0
- package/src/persistent.test.ts +155 -0
- package/src/playerSettings.ts +128 -0
- package/src/pluginManager.ts +6 -1
- package/src/plugins/animate.ts +34 -9
- package/src/plugins/live.ts +18 -5
- package/src/plugins/plugins.test.ts +93 -6
- package/src/plugins/replaceLabel.ts +7 -3
- package/src/preview-host.test.ts +171 -0
- package/src/preview-host.ts +190 -0
- package/src/preview-protocol.ts +79 -0
- package/src/preview.main.ts +34 -0
- package/src/preview.test.ts +367 -0
- package/src/preview.ts +331 -0
- package/src/saveSlots.ts +159 -0
- package/src/saves.test.ts +199 -0
- package/src/savesDialog.test.ts +290 -0
- package/src/savesDialog.ts +499 -0
- package/src/scripts.test.ts +130 -0
- package/src/settings.test.ts +233 -0
- package/src/settingsDialog.ts +160 -0
- package/src/skill.test.ts +67 -0
- package/src/sound.test.ts +273 -0
- package/src/sound.ts +207 -0
- package/src/squiffy.page.css +155 -0
- package/src/squiffy.runtime.css +1123 -20
- package/src/squiffy.runtime.test.ts +2806 -44
- package/src/squiffy.runtime.ts +1130 -64
- package/src/state.ts +172 -11
- package/src/storyLists.test.ts +134 -0
- package/src/storyLists.ts +57 -0
- package/src/style.test.ts +89 -0
- package/src/textProcessor.ts +739 -58
- package/src/transitions.test.ts +343 -0
- package/src/types.plugins.ts +7 -0
- package/src/types.ts +226 -2
- package/src/uiLinks.test.ts +156 -0
- package/src/updater.ts +26 -8
- package/src/utils.test.ts +60 -0
- package/src/utils.ts +46 -14
- package/vite.config.ts +3 -4
- package/vite.preview.config.ts +83 -0
- package/dist/infixExpressions.d.ts +0 -2
- package/src/infixExpressions.test.ts +0 -187
- package/src/infixExpressions.ts +0 -323
- /package/dist/{infixExpressions.test.d.ts → animation.test.d.ts} +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { StartAt } from './types.js';
|
|
2
|
+
export type { StartAt } from './types.js';
|
|
3
|
+
export declare const PREVIEW_CHANNEL = "squiffy-preview";
|
|
4
|
+
export interface PreviewStory {
|
|
5
|
+
js: string;
|
|
6
|
+
css?: string[];
|
|
7
|
+
scripts?: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface PreviewAssets {
|
|
10
|
+
files?: Record<string, Blob | ArrayBuffer | Uint8Array>;
|
|
11
|
+
urls?: Record<string, string>;
|
|
12
|
+
}
|
|
13
|
+
export type PreviewTheme = "light" | "dark" | "system";
|
|
14
|
+
export type HostMessage = {
|
|
15
|
+
type: "load";
|
|
16
|
+
story: PreviewStory;
|
|
17
|
+
startAt?: StartAt;
|
|
18
|
+
} | {
|
|
19
|
+
type: "update";
|
|
20
|
+
js: string;
|
|
21
|
+
css?: string[];
|
|
22
|
+
} | {
|
|
23
|
+
type: "restart";
|
|
24
|
+
} | {
|
|
25
|
+
type: "back";
|
|
26
|
+
} | {
|
|
27
|
+
type: "assets";
|
|
28
|
+
assets: PreviewAssets;
|
|
29
|
+
} | {
|
|
30
|
+
type: "theme";
|
|
31
|
+
theme: PreviewTheme;
|
|
32
|
+
} | {
|
|
33
|
+
type: "muted";
|
|
34
|
+
muted: boolean;
|
|
35
|
+
} | {
|
|
36
|
+
type: "reload";
|
|
37
|
+
};
|
|
38
|
+
export type PreviewMessage = {
|
|
39
|
+
type: "ready";
|
|
40
|
+
} | {
|
|
41
|
+
type: "loaded";
|
|
42
|
+
} | {
|
|
43
|
+
type: "themeFixed";
|
|
44
|
+
fixed: boolean;
|
|
45
|
+
} | {
|
|
46
|
+
type: "attributeSet";
|
|
47
|
+
name: string;
|
|
48
|
+
value: unknown;
|
|
49
|
+
} | {
|
|
50
|
+
type: "canGoBackChanged";
|
|
51
|
+
canGoBack: boolean;
|
|
52
|
+
} | {
|
|
53
|
+
type: "usesSound";
|
|
54
|
+
usesSound: boolean;
|
|
55
|
+
} | {
|
|
56
|
+
type: "navigated";
|
|
57
|
+
section: string;
|
|
58
|
+
passage?: string;
|
|
59
|
+
} | {
|
|
60
|
+
type: "runtimeError";
|
|
61
|
+
message: string;
|
|
62
|
+
stack?: string;
|
|
63
|
+
};
|
|
64
|
+
export type Envelope<T> = T & {
|
|
65
|
+
channel: typeof PREVIEW_CHANNEL;
|
|
66
|
+
};
|
|
67
|
+
export declare const isEnvelope: <T extends {
|
|
68
|
+
type: string;
|
|
69
|
+
}>(data: unknown) => data is Envelope<T>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HostMessage, PreviewMessage } from './preview-protocol.js';
|
|
2
|
+
import { Story } from './types.js';
|
|
3
|
+
export interface PreviewOptions {
|
|
4
|
+
element: HTMLElement;
|
|
5
|
+
send(message: PreviewMessage): void;
|
|
6
|
+
loadModule?(js: string): Promise<{
|
|
7
|
+
story: Story;
|
|
8
|
+
}>;
|
|
9
|
+
reload?(): void;
|
|
10
|
+
}
|
|
11
|
+
declare function errorMessage(error: unknown): PreviewMessage;
|
|
12
|
+
export declare function createPreview(options: PreviewOptions): {
|
|
13
|
+
receive: (message: HostMessage) => Promise<void>;
|
|
14
|
+
};
|
|
15
|
+
export { errorMessage };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SavedGame } from './types.js';
|
|
2
|
+
export interface SaveSlot {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string | null;
|
|
5
|
+
save: SavedGame;
|
|
6
|
+
}
|
|
7
|
+
export interface SaveSlots {
|
|
8
|
+
list(): Promise<SaveSlot[]>;
|
|
9
|
+
get(id: number): Promise<SaveSlot | null>;
|
|
10
|
+
add(save: SavedGame, name: string | null): Promise<SaveSlot>;
|
|
11
|
+
overwrite(id: number, save: SavedGame): Promise<void>;
|
|
12
|
+
rename(id: number, name: string | null): Promise<void>;
|
|
13
|
+
delete(id: number): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export declare function indexedDbSaveSlots(key: string): SaveSlots;
|
|
16
|
+
export declare function memorySaveSlots(): SaveSlots;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { SquiffyApi } from './types.js';
|
|
2
|
+
import { SaveSlots } from './saveSlots.js';
|
|
3
|
+
export declare const SAVES_STRINGS: {
|
|
4
|
+
saves: string;
|
|
5
|
+
saveName: string;
|
|
6
|
+
save: string;
|
|
7
|
+
noSaves: string;
|
|
8
|
+
savedGame: string;
|
|
9
|
+
savedToday: string;
|
|
10
|
+
savedYesterday: string;
|
|
11
|
+
load: string;
|
|
12
|
+
loadConfirm: string;
|
|
13
|
+
saveOptions: string;
|
|
14
|
+
overwrite: string;
|
|
15
|
+
overwriteConfirm: string;
|
|
16
|
+
rename: string;
|
|
17
|
+
newName: string;
|
|
18
|
+
saveToFile: string;
|
|
19
|
+
loadFromFile: string;
|
|
20
|
+
delete: string;
|
|
21
|
+
deleteConfirm: string;
|
|
22
|
+
cancel: string;
|
|
23
|
+
close: string;
|
|
24
|
+
wrongStory: string;
|
|
25
|
+
notASave: string;
|
|
26
|
+
cantSave: string;
|
|
27
|
+
};
|
|
28
|
+
export type SavesStringName = keyof typeof SAVES_STRINGS;
|
|
29
|
+
export interface SavesDialogOptions {
|
|
30
|
+
slots?: SaveSlots;
|
|
31
|
+
key?: string;
|
|
32
|
+
strings?: Partial<Record<string, string>>;
|
|
33
|
+
fileName?: string;
|
|
34
|
+
container?: HTMLElement;
|
|
35
|
+
}
|
|
36
|
+
export interface SavesDialog {
|
|
37
|
+
element: HTMLDialogElement;
|
|
38
|
+
open: () => Promise<void>;
|
|
39
|
+
close: () => void;
|
|
40
|
+
}
|
|
41
|
+
export declare const SAVE_FILE_EXTENSION = ".squiffy-save";
|
|
42
|
+
export declare function formatSaveTime(savedAt: string, strings?: Record<SavesStringName, string>, now?: Date): string;
|
|
43
|
+
export declare function createSavesDialog(api: SquiffyApi, options?: SavesDialogOptions): SavesDialog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SquiffyApi } from './types.js';
|
|
2
|
+
export declare const SETTINGS_STRINGS: {
|
|
3
|
+
settings: string;
|
|
4
|
+
resetSettings: string;
|
|
5
|
+
close: string;
|
|
6
|
+
};
|
|
7
|
+
export interface SettingsDialogOptions {
|
|
8
|
+
strings?: Partial<Record<string, string>>;
|
|
9
|
+
container?: HTMLElement;
|
|
10
|
+
}
|
|
11
|
+
export interface SettingsDialog {
|
|
12
|
+
element: HTMLDialogElement;
|
|
13
|
+
open: () => void;
|
|
14
|
+
close: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const SETTINGS_ICON = "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg>";
|
|
17
|
+
export declare function createSettingsDialog(api: SquiffyApi, options?: SettingsDialogOptions): SettingsDialog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/sound.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type AudioUrlResolver = (path: string) => string;
|
|
2
|
+
export interface SoundOptions {
|
|
3
|
+
resolveUrl: AudioUrlResolver;
|
|
4
|
+
getMusic: () => string | null;
|
|
5
|
+
mutedKey?: string;
|
|
6
|
+
onPlay?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const DEFAULT_FADE = 1;
|
|
9
|
+
export declare class Sound {
|
|
10
|
+
private options;
|
|
11
|
+
private music;
|
|
12
|
+
private effects;
|
|
13
|
+
private preloaded;
|
|
14
|
+
private muted;
|
|
15
|
+
private waitingForGesture;
|
|
16
|
+
private disposed;
|
|
17
|
+
constructor(options: SoundOptions);
|
|
18
|
+
preload(files: string[]): void;
|
|
19
|
+
sync(fade?: number): void;
|
|
20
|
+
play(file: string, volume?: number): void;
|
|
21
|
+
stopSounds(): void;
|
|
22
|
+
isMuted(): boolean;
|
|
23
|
+
setMuted(muted: boolean): void;
|
|
24
|
+
dispose(): void;
|
|
25
|
+
private newAudio;
|
|
26
|
+
private startMusic;
|
|
27
|
+
private playTrack;
|
|
28
|
+
private stopMusic;
|
|
29
|
+
private fade;
|
|
30
|
+
private readonly onGesture;
|
|
31
|
+
private waitForGesture;
|
|
32
|
+
private removeGestureListeners;
|
|
33
|
+
private readMuted;
|
|
34
|
+
private writeMuted;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/* Page layout styles for an exported story. See https://squiffystory.com/styling/ for how to customise these. */
|
|
2
|
+
|
|
3
|
+
:root
|
|
4
|
+
{
|
|
5
|
+
/* The width of the story text */
|
|
6
|
+
--squiffy-max-width: 42rem;
|
|
7
|
+
/* The story's font. Charter, or Georgia if the reader doesn't have it */
|
|
8
|
+
--squiffy-font-family: Charter, "Bitstream Charter", Georgia, serif;
|
|
9
|
+
/* The size of the story text. The header's buttons are smaller, and don't change with it */
|
|
10
|
+
--squiffy-font-size: 1.125rem;
|
|
11
|
+
/* The space between lines of text */
|
|
12
|
+
--squiffy-line-height: 1.6;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Follow the reader's light or dark system setting, or what they chose with the theme button.
|
|
16
|
+
To keep a story light (or dark) whatever the setting, set ":root { color-scheme: light; }"
|
|
17
|
+
(or dark). These rules use :where() so that a :root rule like that overrides them, and the
|
|
18
|
+
theme button is hidden. */
|
|
19
|
+
:where(:root)
|
|
20
|
+
{
|
|
21
|
+
color-scheme: light dark;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(:root[data-squiffy-theme="light"])
|
|
25
|
+
{
|
|
26
|
+
color-scheme: light;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:where(:root[data-squiffy-theme="dark"])
|
|
30
|
+
{
|
|
31
|
+
color-scheme: dark;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
body
|
|
35
|
+
{
|
|
36
|
+
margin: 0;
|
|
37
|
+
background-color: var(--squiffy-background);
|
|
38
|
+
color: var(--squiffy-text);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Wraps the header and the story: sets the page width and font */
|
|
42
|
+
div#squiffy-container
|
|
43
|
+
{
|
|
44
|
+
max-width: var(--squiffy-max-width);
|
|
45
|
+
margin-left: auto;
|
|
46
|
+
margin-right: auto;
|
|
47
|
+
padding: 0 1.25rem 3rem;
|
|
48
|
+
font-family: var(--squiffy-font-family);
|
|
49
|
+
line-height: var(--squiffy-line-height);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* The bar above the story containing the Back, Restart and light/dark buttons. It stays at the
|
|
53
|
+
top of the window as the story scrolls under it. */
|
|
54
|
+
div#squiffy-header
|
|
55
|
+
{
|
|
56
|
+
position: sticky;
|
|
57
|
+
top: 0;
|
|
58
|
+
z-index: 1;
|
|
59
|
+
padding: 0.5rem 0;
|
|
60
|
+
background-color: var(--squiffy-background);
|
|
61
|
+
font-size: 0.875rem;
|
|
62
|
+
text-align: right;
|
|
63
|
+
white-space: nowrap;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* A short fade under the header, so the story scrolls under it rather than being cut off */
|
|
67
|
+
div#squiffy-header::after
|
|
68
|
+
{
|
|
69
|
+
content: "";
|
|
70
|
+
position: absolute;
|
|
71
|
+
left: 0;
|
|
72
|
+
right: 0;
|
|
73
|
+
top: 100%;
|
|
74
|
+
height: 0.75rem;
|
|
75
|
+
background: linear-gradient(var(--squiffy-background), transparent);
|
|
76
|
+
pointer-events: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Space between the Back, Restart and light/dark buttons */
|
|
80
|
+
button.squiffy-header-button + button.squiffy-header-button
|
|
81
|
+
{
|
|
82
|
+
margin-left: 0.25em;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* The button that switches between light and dark mode. It shows a moon in light mode and a sun
|
|
86
|
+
in dark mode. */
|
|
87
|
+
button#squiffy-theme:not([data-next="light"]) .squiffy-icon-light,
|
|
88
|
+
button#squiffy-theme[data-next="light"] .squiffy-icon-dark
|
|
89
|
+
{
|
|
90
|
+
display: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* The mute button (#444), for a story with music or sounds. It shows a speaker, crossed out
|
|
94
|
+
when the story is muted. */
|
|
95
|
+
button#squiffy-mute.squiffy-muted .squiffy-icon-sound,
|
|
96
|
+
button#squiffy-mute:not(.squiffy-muted) .squiffy-icon-muted
|
|
97
|
+
{
|
|
98
|
+
display: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* With a side panel (squiffy.json's "panels"), the page is wider, with the panel to the right of
|
|
102
|
+
the story. It stays in view as the story scrolls, under the header. On a narrower screen, it's a
|
|
103
|
+
button in the header instead. */
|
|
104
|
+
@media (min-width: 64rem)
|
|
105
|
+
{
|
|
106
|
+
div#squiffy-container.squiffy-has-side
|
|
107
|
+
{
|
|
108
|
+
display: grid;
|
|
109
|
+
grid-template-columns: minmax(0, 1fr) var(--squiffy-side-width);
|
|
110
|
+
column-gap: 2.5rem;
|
|
111
|
+
align-items: start;
|
|
112
|
+
max-width: calc(var(--squiffy-max-width) + var(--squiffy-side-width) + 2.5rem);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
div#squiffy-container.squiffy-has-side > div#squiffy-header
|
|
116
|
+
{
|
|
117
|
+
grid-column: 1 / -1;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* :where() takes the container's id out of the selector's specificity, so a story's own
|
|
121
|
+
aside.squiffy-panels-side { ... } rule, which comes after this, changes the border and the
|
|
122
|
+
padding too */
|
|
123
|
+
:where(div#squiffy-container.squiffy-has-side) > aside.squiffy-panels-side
|
|
124
|
+
{
|
|
125
|
+
position: sticky;
|
|
126
|
+
top: 3.5rem;
|
|
127
|
+
padding-left: 1.25rem;
|
|
128
|
+
border-left: 1px solid var(--squiffy-border);
|
|
129
|
+
max-height: calc(100vh - 4.5rem);
|
|
130
|
+
overflow-y: auto;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* The story text */
|
|
135
|
+
div#squiffy
|
|
136
|
+
{
|
|
137
|
+
font-size: var(--squiffy-font-size);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
div#squiffy :is(h1, h2, h3, h4, h5, h6)
|
|
141
|
+
{
|
|
142
|
+
line-height: 1.25;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
div#squiffy p
|
|
146
|
+
{
|
|
147
|
+
text-wrap: pretty;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Stop images overflowing the page */
|
|
151
|
+
div#squiffy img
|
|
152
|
+
{
|
|
153
|
+
max-width: 100%;
|
|
154
|
+
height: auto;
|
|
155
|
+
}
|