@mana-app/types 0.0.15 → 0.0.16
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/types/content/Content.d.ts +44 -11
- package/dist/types/content/Content.js +51 -37
- package/package.json +1 -1
|
@@ -113,15 +113,48 @@ export type LinkItem = AdditionalInfoItemBase<AdditionalInfoType.Links> & {
|
|
|
113
113
|
};
|
|
114
114
|
export type TagItem = AdditionalInfoItemBase<AdditionalInfoType.Tags> & Tag;
|
|
115
115
|
export type AdditionalInfoSectionItem = StaffItem | CharacterItem | SimpleHighlight | LinkItem | TagItem;
|
|
116
|
-
export type WithoutType<T extends {
|
|
116
|
+
export type WithoutType<T> = T extends {
|
|
117
117
|
readonly type: any;
|
|
118
|
-
}
|
|
119
|
-
export declare
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
export declare
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
export declare
|
|
118
|
+
} ? Omit<T, "type"> : T;
|
|
119
|
+
export declare const staff: {
|
|
120
|
+
item(input: WithoutType<StaffItem>): StaffItem;
|
|
121
|
+
section(input: WithoutType<StaffSection>): StaffSection;
|
|
122
|
+
};
|
|
123
|
+
export declare const highlights: {
|
|
124
|
+
item(input: SimpleHighlight): SimpleHighlight;
|
|
125
|
+
section(input: WithoutType<HighlightsSection>): HighlightsSection;
|
|
126
|
+
};
|
|
127
|
+
export declare const characters: {
|
|
128
|
+
item(input: WithoutType<CharacterItem>): CharacterItem;
|
|
129
|
+
section(input: WithoutType<CharactersSection>): CharactersSection;
|
|
130
|
+
};
|
|
131
|
+
export declare const links: {
|
|
132
|
+
item(input: WithoutType<LinkItem>): LinkItem;
|
|
133
|
+
section(input: WithoutType<LinksSection>): LinksSection;
|
|
134
|
+
};
|
|
135
|
+
export declare const tags: {
|
|
136
|
+
item(input: WithoutType<TagItem>): TagItem;
|
|
137
|
+
section(input: WithoutType<TagsSection>): TagsSection;
|
|
138
|
+
};
|
|
139
|
+
export declare const additionalInfo: {
|
|
140
|
+
staff: {
|
|
141
|
+
item(input: WithoutType<StaffItem>): StaffItem;
|
|
142
|
+
section(input: WithoutType<StaffSection>): StaffSection;
|
|
143
|
+
};
|
|
144
|
+
highlights: {
|
|
145
|
+
item(input: SimpleHighlight): SimpleHighlight;
|
|
146
|
+
section(input: WithoutType<HighlightsSection>): HighlightsSection;
|
|
147
|
+
};
|
|
148
|
+
characters: {
|
|
149
|
+
item(input: WithoutType<CharacterItem>): CharacterItem;
|
|
150
|
+
section(input: WithoutType<CharactersSection>): CharactersSection;
|
|
151
|
+
};
|
|
152
|
+
links: {
|
|
153
|
+
item(input: WithoutType<LinkItem>): LinkItem;
|
|
154
|
+
section(input: WithoutType<LinksSection>): LinksSection;
|
|
155
|
+
};
|
|
156
|
+
tags: {
|
|
157
|
+
item(input: WithoutType<TagItem>): TagItem;
|
|
158
|
+
section(input: WithoutType<TagsSection>): TagsSection;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdditionalInfoType = void 0;
|
|
4
|
-
exports.staffItem = staffItem;
|
|
5
|
-
exports.characterItem = characterItem;
|
|
6
|
-
exports.linkItem = linkItem;
|
|
7
|
-
exports.tagItem = tagItem;
|
|
8
|
-
exports.staffSection = staffSection;
|
|
9
|
-
exports.highlightsSection = highlightsSection;
|
|
10
|
-
exports.charactersSection = charactersSection;
|
|
11
|
-
exports.linksSection = linksSection;
|
|
12
|
-
exports.tagsSection = tagsSection;
|
|
3
|
+
exports.additionalInfo = exports.tags = exports.links = exports.characters = exports.highlights = exports.staff = exports.AdditionalInfoType = void 0;
|
|
13
4
|
var AdditionalInfoType;
|
|
14
5
|
(function (AdditionalInfoType) {
|
|
15
6
|
AdditionalInfoType[AdditionalInfoType["Staff"] = 1] = "Staff";
|
|
@@ -19,30 +10,53 @@ var AdditionalInfoType;
|
|
|
19
10
|
AdditionalInfoType[AdditionalInfoType["Tags"] = 5] = "Tags";
|
|
20
11
|
})(AdditionalInfoType || (exports.AdditionalInfoType = AdditionalInfoType = {}));
|
|
21
12
|
;
|
|
22
|
-
function
|
|
23
|
-
return Object.assign({ type
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
13
|
+
function withType(type, input) {
|
|
14
|
+
return Object.assign({ type }, input);
|
|
15
|
+
}
|
|
16
|
+
exports.staff = {
|
|
17
|
+
item(input) {
|
|
18
|
+
return withType(AdditionalInfoType.Staff, input);
|
|
19
|
+
},
|
|
20
|
+
section(input) {
|
|
21
|
+
return withType(AdditionalInfoType.Staff, input);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
exports.highlights = {
|
|
25
|
+
item(input) {
|
|
26
|
+
return input;
|
|
27
|
+
},
|
|
28
|
+
section(input) {
|
|
29
|
+
return withType(AdditionalInfoType.Highlights, input);
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
exports.characters = {
|
|
33
|
+
item(input) {
|
|
34
|
+
return withType(AdditionalInfoType.Characters, input);
|
|
35
|
+
},
|
|
36
|
+
section(input) {
|
|
37
|
+
return withType(AdditionalInfoType.Characters, input);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
exports.links = {
|
|
41
|
+
item(input) {
|
|
42
|
+
return withType(AdditionalInfoType.Links, input);
|
|
43
|
+
},
|
|
44
|
+
section(input) {
|
|
45
|
+
return withType(AdditionalInfoType.Links, input);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
exports.tags = {
|
|
49
|
+
item(input) {
|
|
50
|
+
return withType(AdditionalInfoType.Tags, input);
|
|
51
|
+
},
|
|
52
|
+
section(input) {
|
|
53
|
+
return withType(AdditionalInfoType.Tags, input);
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
exports.additionalInfo = {
|
|
57
|
+
staff: exports.staff,
|
|
58
|
+
highlights: exports.highlights,
|
|
59
|
+
characters: exports.characters,
|
|
60
|
+
links: exports.links,
|
|
61
|
+
tags: exports.tags,
|
|
62
|
+
};
|