squiffy-runtime 6.0.0-alpha.6 → 6.0.0-alpha.7
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/squiffy.runtime.d.ts +10 -5
- package/package.json +2 -2
- package/src/squiffy.runtime.ts +6 -6
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
interface SquiffyInitOptions {
|
|
1
|
+
export interface SquiffyInitOptions {
|
|
2
2
|
element: HTMLElement;
|
|
3
3
|
story: Story;
|
|
4
4
|
scroll?: string;
|
|
5
5
|
persist?: boolean;
|
|
6
6
|
onSet?: (attribute: string, value: any) => void;
|
|
7
7
|
}
|
|
8
|
-
interface
|
|
8
|
+
export interface SquiffySettings {
|
|
9
|
+
scroll: string;
|
|
10
|
+
persist: boolean;
|
|
11
|
+
onSet: (attribute: string, value: any) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface SquiffyApi {
|
|
9
14
|
restart: () => void;
|
|
10
15
|
get: (attribute: string) => any;
|
|
11
16
|
set: (attribute: string, value: any) => void;
|
|
@@ -22,13 +27,13 @@ interface SquiffyJsFunctionApi {
|
|
|
22
27
|
go: (section: string) => void;
|
|
23
28
|
};
|
|
24
29
|
}
|
|
25
|
-
interface Story {
|
|
30
|
+
export interface Story {
|
|
26
31
|
js: ((squiffy: SquiffyJsFunctionApi, get: (attribute: string) => any, set: (attribute: string, value: any) => void) => void)[];
|
|
27
32
|
start: string;
|
|
28
33
|
id?: string | null;
|
|
29
34
|
sections: Record<string, Section>;
|
|
30
35
|
}
|
|
31
|
-
interface Section {
|
|
36
|
+
export interface Section {
|
|
32
37
|
text?: string;
|
|
33
38
|
clear?: boolean;
|
|
34
39
|
attributes?: string[];
|
|
@@ -36,7 +41,7 @@ interface Section {
|
|
|
36
41
|
passages?: Record<string, Passage>;
|
|
37
42
|
passageCount?: number;
|
|
38
43
|
}
|
|
39
|
-
interface Passage {
|
|
44
|
+
export interface Passage {
|
|
40
45
|
text?: string;
|
|
41
46
|
clear?: boolean;
|
|
42
47
|
attributes?: string[];
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "squiffy-runtime",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.7",
|
|
4
4
|
"main": "dist/squiffy.runtime.js",
|
|
5
5
|
"types": "dist/squiffy.runtime.d.ts",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "vitest",
|
|
7
|
+
"test": "vitest --run",
|
|
8
8
|
"build": "tsc",
|
|
9
9
|
"prepublishOnly": "npm run build && npm run test"
|
|
10
10
|
},
|
package/src/squiffy.runtime.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface SquiffyInitOptions {
|
|
1
|
+
export interface SquiffyInitOptions {
|
|
2
2
|
element: HTMLElement;
|
|
3
3
|
story: Story;
|
|
4
4
|
scroll?: string,
|
|
@@ -6,13 +6,13 @@ interface SquiffyInitOptions {
|
|
|
6
6
|
onSet?: (attribute: string, value: any) => void,
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
interface SquiffySettings {
|
|
9
|
+
export interface SquiffySettings {
|
|
10
10
|
scroll: string,
|
|
11
11
|
persist: boolean,
|
|
12
12
|
onSet: (attribute: string, value: any) => void,
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
interface SquiffyApi {
|
|
15
|
+
export interface SquiffyApi {
|
|
16
16
|
restart: () => void;
|
|
17
17
|
get: (attribute: string) => any;
|
|
18
18
|
set: (attribute: string, value: any) => void;
|
|
@@ -33,7 +33,7 @@ interface SquiffyJsFunctionApi {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
interface Story {
|
|
36
|
+
export interface Story {
|
|
37
37
|
js: ((
|
|
38
38
|
squiffy: SquiffyJsFunctionApi,
|
|
39
39
|
get: (attribute: string) => any,
|
|
@@ -44,7 +44,7 @@ interface Story {
|
|
|
44
44
|
sections: Record<string, Section>;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
interface Section {
|
|
47
|
+
export interface Section {
|
|
48
48
|
text?: string;
|
|
49
49
|
clear?: boolean;
|
|
50
50
|
attributes?: string[],
|
|
@@ -53,7 +53,7 @@ interface Section {
|
|
|
53
53
|
passageCount?: number;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
interface Passage {
|
|
56
|
+
export interface Passage {
|
|
57
57
|
text?: string;
|
|
58
58
|
clear?: boolean;
|
|
59
59
|
attributes?: string[];
|