squiffy-runtime 7.0.0-beta.7 → 7.0.0-beta.8
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/confirmDialog.d.ts +8 -0
- package/dist/events.d.ts +10 -0
- package/dist/every.d.ts +12 -0
- package/dist/every.test.d.ts +1 -0
- package/dist/playerSettings.d.ts +17 -0
- package/dist/preview-html.js +1 -1
- package/dist/settings.test.d.ts +1 -0
- package/dist/settingsDialog.d.ts +17 -0
- package/dist/squiffy.page.css +4 -1
- package/dist/squiffy.preview.html +673 -83
- package/dist/squiffy.runtime.css +531 -1
- package/dist/squiffy.runtime.d.ts +5 -1
- package/dist/squiffy.runtime.global.js +106 -85
- package/dist/squiffy.runtime.global.js.map +1 -1
- package/dist/squiffy.runtime.js +4743 -4157
- package/dist/squiffy.runtime.js.map +1 -1
- package/dist/state.d.ts +1 -0
- package/dist/style.test.d.ts +1 -0
- package/dist/textProcessor.d.ts +8 -0
- package/dist/transitions.test.d.ts +1 -0
- package/dist/types.d.ts +43 -0
- package/dist/uiLinks.test.d.ts +1 -0
- package/dist/utils.d.ts +1 -0
- package/dist/utils.test.d.ts +1 -0
- package/package.json +3 -3
- package/src/animation.test.ts +44 -0
- package/src/animation.ts +7 -3
- package/src/confirmDialog.ts +66 -0
- package/src/events.ts +17 -0
- package/src/every.test.ts +25 -0
- package/src/every.ts +94 -0
- package/src/panels.test.ts +24 -0
- package/src/playerSettings.ts +128 -0
- package/src/plugins/animate.ts +9 -0
- package/src/plugins/live.ts +3 -1
- package/src/plugins/plugins.test.ts +17 -0
- package/src/preview.test.ts +53 -3
- package/src/preview.ts +60 -1
- package/src/settings.test.ts +233 -0
- package/src/settingsDialog.ts +160 -0
- package/src/squiffy.page.css +4 -1
- package/src/squiffy.runtime.css +531 -1
- package/src/squiffy.runtime.test.ts +613 -16
- package/src/squiffy.runtime.ts +372 -19
- package/src/state.ts +16 -1
- package/src/style.test.ts +89 -0
- package/src/textProcessor.ts +141 -6
- package/src/transitions.test.ts +302 -0
- package/src/types.ts +56 -0
- package/src/uiLinks.test.ts +156 -0
- package/src/utils.test.ts +60 -0
- package/src/utils.ts +44 -14
- package/dist/infixExpressions.d.ts +0 -7
- package/src/infixExpressions.test.ts +0 -516
- package/src/infixExpressions.ts +0 -672
- /package/dist/{infixExpressions.test.d.ts → animation.test.d.ts} +0 -0
package/dist/events.d.ts
CHANGED
|
@@ -15,6 +15,15 @@ export type SquiffyEventMap = {
|
|
|
15
15
|
};
|
|
16
16
|
sound: Record<string, never>;
|
|
17
17
|
storyUpdated: Record<string, never>;
|
|
18
|
+
restartRequested: {
|
|
19
|
+
confirm: boolean;
|
|
20
|
+
};
|
|
21
|
+
savesRequested: Record<string, never>;
|
|
22
|
+
settingsRequested: Record<string, never>;
|
|
23
|
+
settingChanged: {
|
|
24
|
+
name: string;
|
|
25
|
+
value: unknown;
|
|
26
|
+
};
|
|
18
27
|
};
|
|
19
28
|
export type SquiffyEventHandler<E extends keyof SquiffyEventMap> = (payload: SquiffyEventMap[E]) => void;
|
|
20
29
|
export declare class Emitter<Events extends Record<string, any>> {
|
|
@@ -22,5 +31,6 @@ export declare class Emitter<Events extends Record<string, any>> {
|
|
|
22
31
|
on<E extends keyof Events>(event: E, handler: (p: Events[E]) => void): () => void;
|
|
23
32
|
off<E extends keyof Events>(event: E, handler: (p: Events[E]) => void): void;
|
|
24
33
|
once<E extends keyof Events>(event: E, handler: (p: Events[E]) => void): () => void;
|
|
34
|
+
has<E extends keyof Events>(event: E): boolean;
|
|
25
35
|
emit<E extends keyof Events>(event: E, payload: Events[E]): void;
|
|
26
36
|
}
|
package/dist/every.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function captureEveryBodies(text: string): string;
|
|
2
|
+
export declare const everySelector = ".squiffy-every:not([data-every-stopped])";
|
|
3
|
+
export declare const EVERY_TICK = "squiffyEvery";
|
|
4
|
+
export declare class EveryTimers {
|
|
5
|
+
private getRoot;
|
|
6
|
+
private tick;
|
|
7
|
+
private timers;
|
|
8
|
+
constructor(getRoot: () => HTMLElement | undefined, tick: (el: HTMLElement) => boolean);
|
|
9
|
+
sync(): void;
|
|
10
|
+
stopAll(): void;
|
|
11
|
+
private schedule;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PlayerSetting, SettingValue } from './types.js';
|
|
2
|
+
export declare class PlayerSettings {
|
|
3
|
+
private getDefinitions;
|
|
4
|
+
private storageKey?;
|
|
5
|
+
private values;
|
|
6
|
+
constructor(getDefinitions: () => PlayerSetting[], storageKey?: string | undefined);
|
|
7
|
+
definitions(): PlayerSetting[];
|
|
8
|
+
private find;
|
|
9
|
+
any(): boolean;
|
|
10
|
+
get(name: string): SettingValue | null;
|
|
11
|
+
all(): Record<string, SettingValue>;
|
|
12
|
+
set(name: string, value: SettingValue): boolean;
|
|
13
|
+
reset(): void;
|
|
14
|
+
classes(): string[];
|
|
15
|
+
private store;
|
|
16
|
+
}
|
|
17
|
+
export declare function defaultValue(setting: PlayerSetting): SettingValue;
|