@mana-app/types 0.0.1
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/LICENSE +21 -0
- package/README.md +8 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.js +18 -0
- package/dist/sources/ContentSource/ContentSource.d.ts +48 -0
- package/dist/sources/ContentSource/ContentSource.js +2 -0
- package/dist/sources/ContentSource/handlers/ChapterEvent.d.ts +16 -0
- package/dist/sources/ContentSource/handlers/ChapterEvent.js +2 -0
- package/dist/sources/ContentSource/handlers/ContentEvent.d.ts +12 -0
- package/dist/sources/ContentSource/handlers/ContentEvent.js +2 -0
- package/dist/sources/ContentSource/handlers/ContextMenuHandler.d.ts +9 -0
- package/dist/sources/ContentSource/handlers/ContextMenuHandler.js +2 -0
- package/dist/sources/ContentSource/handlers/GroupedUpdateProvider.d.ts +9 -0
- package/dist/sources/ContentSource/handlers/GroupedUpdateProvider.js +2 -0
- package/dist/sources/ContentSource/handlers/ImageRedrawHandler.d.ts +27 -0
- package/dist/sources/ContentSource/handlers/ImageRedrawHandler.js +2 -0
- package/dist/sources/ContentSource/handlers/LibrarySync.d.ts +8 -0
- package/dist/sources/ContentSource/handlers/LibrarySync.js +2 -0
- package/dist/sources/ContentSource/handlers/ProgressSync.d.ts +4 -0
- package/dist/sources/ContentSource/handlers/ProgressSync.js +2 -0
- package/dist/sources/ContentSource/handlers/index.d.ts +7 -0
- package/dist/sources/ContentSource/handlers/index.js +23 -0
- package/dist/sources/ContentSource/index.d.ts +2 -0
- package/dist/sources/ContentSource/index.js +18 -0
- package/dist/sources/ContentTracker/AdvancedTracker.d.ts +9 -0
- package/dist/sources/ContentTracker/AdvancedTracker.js +2 -0
- package/dist/sources/ContentTracker/ContentTracker.d.ts +50 -0
- package/dist/sources/ContentTracker/ContentTracker.js +2 -0
- package/dist/sources/ContentTracker/index.d.ts +2 -0
- package/dist/sources/ContentTracker/index.js +18 -0
- package/dist/sources/Source/extensions/Authentication.d.ts +35 -0
- package/dist/sources/Source/extensions/Authentication.js +8 -0
- package/dist/sources/Source/extensions/DirectoryHandler.d.ts +14 -0
- package/dist/sources/Source/extensions/DirectoryHandler.js +2 -0
- package/dist/sources/Source/extensions/ImageRequest.d.ts +8 -0
- package/dist/sources/Source/extensions/ImageRequest.js +2 -0
- package/dist/sources/Source/extensions/PageProvider.d.ts +7 -0
- package/dist/sources/Source/extensions/PageProvider.js +2 -0
- package/dist/sources/Source/extensions/PageResolver.d.ts +17 -0
- package/dist/sources/Source/extensions/PageResolver.js +2 -0
- package/dist/sources/Source/extensions/Preferences.d.ts +4 -0
- package/dist/sources/Source/extensions/Preferences.js +2 -0
- package/dist/sources/Source/extensions/Setup.d.ts +6 -0
- package/dist/sources/Source/extensions/Setup.js +2 -0
- package/dist/sources/Source/extensions/index.d.ts +7 -0
- package/dist/sources/Source/extensions/index.js +23 -0
- package/dist/sources/Source/index.d.ts +11 -0
- package/dist/sources/Source/index.js +23 -0
- package/dist/sources/index.d.ts +3 -0
- package/dist/sources/index.js +19 -0
- package/dist/types/UI/Form.d.ts +5 -0
- package/dist/types/UI/Form.js +2 -0
- package/dist/types/UI/UIDefinitions.d.ts +29 -0
- package/dist/types/UI/UIDefinitions.js +3 -0
- package/dist/types/UI/UIElementBuilders.d.ts +9 -0
- package/dist/types/UI/UIElementBuilders.js +18 -0
- package/dist/types/UI/UIElements.d.ts +31 -0
- package/dist/types/UI/UIElements.js +13 -0
- package/dist/types/UI/index.d.ts +4 -0
- package/dist/types/UI/index.js +20 -0
- package/dist/types/content/BaseItem.d.ts +26 -0
- package/dist/types/content/BaseItem.js +2 -0
- package/dist/types/content/BooleanState.d.ts +3 -0
- package/dist/types/content/BooleanState.js +2 -0
- package/dist/types/content/Chapter.d.ts +62 -0
- package/dist/types/content/Chapter.js +14 -0
- package/dist/types/content/ChapterData.d.ts +16 -0
- package/dist/types/content/ChapterData.js +2 -0
- package/dist/types/content/Collection.d.ts +24 -0
- package/dist/types/content/Collection.js +2 -0
- package/dist/types/content/Content.d.ts +59 -0
- package/dist/types/content/Content.js +2 -0
- package/dist/types/content/ContentProgressState.d.ts +13 -0
- package/dist/types/content/ContentProgressState.js +2 -0
- package/dist/types/content/ContextMenu.d.ts +14 -0
- package/dist/types/content/ContextMenu.js +2 -0
- package/dist/types/content/DeepLinkContext.d.ts +8 -0
- package/dist/types/content/DeepLinkContext.js +2 -0
- package/dist/types/content/Enums.d.ts +22 -0
- package/dist/types/content/Enums.js +29 -0
- package/dist/types/content/GroupedUpdatesResponse.d.ts +7 -0
- package/dist/types/content/GroupedUpdatesResponse.js +2 -0
- package/dist/types/content/Highlight.d.ts +36 -0
- package/dist/types/content/Highlight.js +2 -0
- package/dist/types/content/Property.d.ts +27 -0
- package/dist/types/content/Property.js +2 -0
- package/dist/types/content/Provider.d.ts +32 -0
- package/dist/types/content/Provider.js +10 -0
- package/dist/types/content/ReaderContext.d.ts +28 -0
- package/dist/types/content/ReaderContext.js +2 -0
- package/dist/types/content/index.d.ts +14 -0
- package/dist/types/content/index.js +30 -0
- package/dist/types/core/Authentication.d.ts +48 -0
- package/dist/types/core/Authentication.js +10 -0
- package/dist/types/core/ContextProvider.d.ts +6 -0
- package/dist/types/core/ContextProvider.js +2 -0
- package/dist/types/core/PagedResult.d.ts +17 -0
- package/dist/types/core/PagedResult.js +2 -0
- package/dist/types/core/SourceInfo.d.ts +81 -0
- package/dist/types/core/SourceInfo.js +21 -0
- package/dist/types/core/index.d.ts +8 -0
- package/dist/types/core/index.js +20 -0
- package/dist/types/directory/DirectoryConfig.d.ts +31 -0
- package/dist/types/directory/DirectoryConfig.js +2 -0
- package/dist/types/directory/DirectoryFilter.d.ts +53 -0
- package/dist/types/directory/DirectoryFilter.js +30 -0
- package/dist/types/directory/DirectoryRequest.d.ts +37 -0
- package/dist/types/directory/DirectoryRequest.js +2 -0
- package/dist/types/directory/index.d.ts +3 -0
- package/dist/types/directory/index.js +19 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.js +26 -0
- package/dist/types/networking/Builder.d.ts +88 -0
- package/dist/types/networking/Builder.js +120 -0
- package/dist/types/networking/Client.d.ts +35 -0
- package/dist/types/networking/Client.js +2 -0
- package/dist/types/networking/Error.d.ts +13 -0
- package/dist/types/networking/Error.js +2 -0
- package/dist/types/networking/Request.d.ts +62 -0
- package/dist/types/networking/Request.js +16 -0
- package/dist/types/networking/Response.d.ts +7 -0
- package/dist/types/networking/Response.js +2 -0
- package/dist/types/networking/Transformer.d.ts +5 -0
- package/dist/types/networking/Transformer.js +2 -0
- package/dist/types/networking/index.d.ts +6 -0
- package/dist/types/networking/index.js +22 -0
- package/dist/types/page/index.d.ts +58 -0
- package/dist/types/page/index.js +14 -0
- package/dist/types/tracker/index.d.ts +43 -0
- package/dist/types/tracker/index.js +12 -0
- package/package.json +35 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.SourceEnvironment = void 0;
|
|
18
|
+
__exportStar(require("./extensions"), exports);
|
|
19
|
+
var SourceEnvironment;
|
|
20
|
+
(function (SourceEnvironment) {
|
|
21
|
+
SourceEnvironment[SourceEnvironment["SOURCE"] = 0] = "SOURCE";
|
|
22
|
+
SourceEnvironment[SourceEnvironment["TRACKER"] = 1] = "TRACKER";
|
|
23
|
+
})(SourceEnvironment || (exports.SourceEnvironment = SourceEnvironment = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ContentSource"), exports);
|
|
18
|
+
__exportStar(require("./Source"), exports);
|
|
19
|
+
__exportStar(require("./ContentTracker"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { UIComponentType, UIElement, UIInteractable, UISelectable } from "./UIElements";
|
|
2
|
+
export type UIPickerDefinition = UIElement<UIComponentType.SELECT> & UISelectable & UIInteractable<string>;
|
|
3
|
+
export type UIMultiPickerOptions = UISelectable & {
|
|
4
|
+
minSelectionCount?: number;
|
|
5
|
+
maxSelectionCount?: number;
|
|
6
|
+
};
|
|
7
|
+
export type UIMultiPickerDefinition = UIElement<UIComponentType.MULTISELECT> & UIMultiPickerOptions & UIInteractable<string[]>;
|
|
8
|
+
export type UIToggleDefinition = UIElement<UIComponentType.TOGGLE> & UIInteractable<boolean>;
|
|
9
|
+
export type UITextFieldOptions = {
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
secure?: boolean;
|
|
12
|
+
keyboard?: "alphanumeric" | "numeric" | "email";
|
|
13
|
+
multiline?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type UITextFieldDefinition = UIElement<UIComponentType.TEXTFIELD> & UITextFieldOptions & UIInteractable<string>;
|
|
16
|
+
export type UIDatePickerDefinition = UIElement<UIComponentType.DATEPICKER> & UIInteractable<Date>;
|
|
17
|
+
export type UIStepperOptions = {
|
|
18
|
+
upperBound?: number;
|
|
19
|
+
lowerBound?: number;
|
|
20
|
+
allowDecimal?: true | "true";
|
|
21
|
+
step?: 10 | 1 | 0.1;
|
|
22
|
+
};
|
|
23
|
+
export type UIStepperDefinition = UIElement<UIComponentType.STEPPER> & UIStepperOptions & UIInteractable<number>;
|
|
24
|
+
export type UIButtonOptions = {
|
|
25
|
+
isDestructive?: boolean;
|
|
26
|
+
systemImage?: string;
|
|
27
|
+
action: () => Promise<void>;
|
|
28
|
+
};
|
|
29
|
+
export type UIButtonDefinition = UIElement<UIComponentType.BUTTON>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UIPickerDefinition, UIMultiPickerOptions, UIMultiPickerDefinition, UIToggleDefinition, UITextFieldOptions, UITextFieldDefinition, UIDatePickerDefinition, UIButtonOptions, UIButtonDefinition, UIStepperDefinition, UIStepperOptions } from "./UIDefinitions";
|
|
2
|
+
import { UISelectable, UIInteractable, UISectionChild } from "./UIElements";
|
|
3
|
+
export declare const UIPicker: (props: UISelectable & UIInteractable<string>) => UIPickerDefinition;
|
|
4
|
+
export declare const UIMultiPicker: (props: UIMultiPickerOptions & UIInteractable<string[]>) => UIMultiPickerDefinition;
|
|
5
|
+
export declare const UIToggle: (props: UIInteractable<boolean>) => UIToggleDefinition;
|
|
6
|
+
export declare const UITextField: (props: UITextFieldOptions & UIInteractable<string>) => UITextFieldDefinition;
|
|
7
|
+
export declare const UIDatePicker: (props: UIInteractable<Date>) => UIDatePickerDefinition;
|
|
8
|
+
export declare const UIButton: (props: UIButtonOptions & UISectionChild) => UIButtonDefinition;
|
|
9
|
+
export declare const UIStepper: (props: UIStepperOptions & UIInteractable<number>) => UIStepperDefinition;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UIStepper = exports.UIButton = exports.UIDatePicker = exports.UITextField = exports.UIToggle = exports.UIMultiPicker = exports.UIPicker = void 0;
|
|
4
|
+
const UIElements_1 = require("./UIElements");
|
|
5
|
+
const UIPicker = (props) => (Object.assign(Object.assign({}, props), { type: UIElements_1.UIComponentType.SELECT }));
|
|
6
|
+
exports.UIPicker = UIPicker;
|
|
7
|
+
const UIMultiPicker = (props) => (Object.assign(Object.assign({}, props), { type: UIElements_1.UIComponentType.MULTISELECT }));
|
|
8
|
+
exports.UIMultiPicker = UIMultiPicker;
|
|
9
|
+
const UIToggle = (props) => (Object.assign(Object.assign({}, props), { type: UIElements_1.UIComponentType.TOGGLE }));
|
|
10
|
+
exports.UIToggle = UIToggle;
|
|
11
|
+
const UITextField = (props) => (Object.assign(Object.assign({}, props), { type: UIElements_1.UIComponentType.TEXTFIELD }));
|
|
12
|
+
exports.UITextField = UITextField;
|
|
13
|
+
const UIDatePicker = (props) => (Object.assign(Object.assign({}, props), { type: UIElements_1.UIComponentType.DATEPICKER }));
|
|
14
|
+
exports.UIDatePicker = UIDatePicker;
|
|
15
|
+
const UIButton = (props) => (Object.assign(Object.assign({}, props), { type: UIElements_1.UIComponentType.BUTTON }));
|
|
16
|
+
exports.UIButton = UIButton;
|
|
17
|
+
const UIStepper = (props) => (Object.assign(Object.assign({}, props), { type: UIElements_1.UIComponentType.STEPPER }));
|
|
18
|
+
exports.UIStepper = UIStepper;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Option } from "../core";
|
|
2
|
+
export type UISectionChild = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
};
|
|
6
|
+
export type UISection<T extends UISectionChild> = {
|
|
7
|
+
header?: string;
|
|
8
|
+
footer?: string;
|
|
9
|
+
children: T[];
|
|
10
|
+
};
|
|
11
|
+
export declare enum UIComponentType {
|
|
12
|
+
SELECT = 0,
|
|
13
|
+
MULTISELECT = 1,
|
|
14
|
+
STEPPER = 2,
|
|
15
|
+
TOGGLE = 3,
|
|
16
|
+
TEXTFIELD = 4,
|
|
17
|
+
BUTTON = 5,
|
|
18
|
+
DATEPICKER = 6
|
|
19
|
+
}
|
|
20
|
+
export type Primitive = boolean | string | number | string[] | Date;
|
|
21
|
+
export type UIElement<T extends UIComponentType> = UISectionChild & {
|
|
22
|
+
type: T;
|
|
23
|
+
};
|
|
24
|
+
export type UISelectable = {
|
|
25
|
+
options: Option[];
|
|
26
|
+
};
|
|
27
|
+
export type UIInteractable<T extends Primitive> = UISectionChild & {
|
|
28
|
+
value?: T | null;
|
|
29
|
+
optional?: true | "true";
|
|
30
|
+
didChange?: (value: T) => Promise<void>;
|
|
31
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UIComponentType = void 0;
|
|
4
|
+
var UIComponentType;
|
|
5
|
+
(function (UIComponentType) {
|
|
6
|
+
UIComponentType[UIComponentType["SELECT"] = 0] = "SELECT";
|
|
7
|
+
UIComponentType[UIComponentType["MULTISELECT"] = 1] = "MULTISELECT";
|
|
8
|
+
UIComponentType[UIComponentType["STEPPER"] = 2] = "STEPPER";
|
|
9
|
+
UIComponentType[UIComponentType["TOGGLE"] = 3] = "TOGGLE";
|
|
10
|
+
UIComponentType[UIComponentType["TEXTFIELD"] = 4] = "TEXTFIELD";
|
|
11
|
+
UIComponentType[UIComponentType["BUTTON"] = 5] = "BUTTON";
|
|
12
|
+
UIComponentType[UIComponentType["DATEPICKER"] = 6] = "DATEPICKER";
|
|
13
|
+
})(UIComponentType || (exports.UIComponentType = UIComponentType = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Form"), exports);
|
|
18
|
+
__exportStar(require("./UIElements"), exports);
|
|
19
|
+
__exportStar(require("./UIDefinitions"), exports);
|
|
20
|
+
__exportStar(require("./UIElementBuilders"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type BaseItem = {
|
|
2
|
+
/**
|
|
3
|
+
* Title of content
|
|
4
|
+
*/
|
|
5
|
+
title: string;
|
|
6
|
+
/**
|
|
7
|
+
* Base Cover/Thumbnail for content
|
|
8
|
+
*/
|
|
9
|
+
cover: string;
|
|
10
|
+
/**
|
|
11
|
+
* Additional Covers Provided
|
|
12
|
+
*/
|
|
13
|
+
additionalCovers?: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Additional Info that may be displayed with this content
|
|
16
|
+
*/
|
|
17
|
+
info?: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Indicates that this title contains NSFW content
|
|
20
|
+
*/
|
|
21
|
+
isNSFW?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The URL of this title on the web
|
|
24
|
+
*/
|
|
25
|
+
webUrl?: string;
|
|
26
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Provider } from "../content/Provider";
|
|
2
|
+
import { ChapterData } from "./ChapterData";
|
|
3
|
+
export type Chapter = {
|
|
4
|
+
/**
|
|
5
|
+
* Identifier for this chapter in relation to the Content
|
|
6
|
+
*/
|
|
7
|
+
chapterId: string;
|
|
8
|
+
/**
|
|
9
|
+
* The Chapters Number
|
|
10
|
+
*/
|
|
11
|
+
number: number;
|
|
12
|
+
/**
|
|
13
|
+
* The index of this chapter in relation to all chapters of the content.
|
|
14
|
+
*
|
|
15
|
+
* The First Most Available Chapter Should Have an Index of 0
|
|
16
|
+
*/
|
|
17
|
+
index: number;
|
|
18
|
+
/**
|
|
19
|
+
* URL At which the chapter is accessible on the web
|
|
20
|
+
*/
|
|
21
|
+
webUrl?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Date of Publication
|
|
24
|
+
*/
|
|
25
|
+
date: Date;
|
|
26
|
+
/**
|
|
27
|
+
* Volume to which this chapter belongs
|
|
28
|
+
*/
|
|
29
|
+
volume?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Language Code of this chapter in ISO-6379
|
|
32
|
+
*
|
|
33
|
+
* Read More: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
|
|
34
|
+
*/
|
|
35
|
+
language: string;
|
|
36
|
+
/**
|
|
37
|
+
* Title of chapter
|
|
38
|
+
*/
|
|
39
|
+
title?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Included {@link ChapterData}
|
|
42
|
+
*/
|
|
43
|
+
data?: ChapterData;
|
|
44
|
+
/**
|
|
45
|
+
* The Chapters {@link Provider}'s
|
|
46
|
+
*/
|
|
47
|
+
providers?: Provider[];
|
|
48
|
+
/**
|
|
49
|
+
* The Thumbnail Image of the Chapter
|
|
50
|
+
*/
|
|
51
|
+
thumbnail?: string;
|
|
52
|
+
};
|
|
53
|
+
export declare enum DefinedLanguages {
|
|
54
|
+
UNIVERSAL = "UNIVERSAL",
|
|
55
|
+
ENGLISH = "en_US",
|
|
56
|
+
KOREAN = "ko_KR",
|
|
57
|
+
JAPANESE = "ja_JP",
|
|
58
|
+
FRENCH = "fr_FR",
|
|
59
|
+
CHINESE = "zh-CN",
|
|
60
|
+
SPANISH = "es_ES",
|
|
61
|
+
PORTUGUESE = "pt_BR"
|
|
62
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DefinedLanguages = void 0;
|
|
4
|
+
var DefinedLanguages;
|
|
5
|
+
(function (DefinedLanguages) {
|
|
6
|
+
DefinedLanguages["UNIVERSAL"] = "UNIVERSAL";
|
|
7
|
+
DefinedLanguages["ENGLISH"] = "en_US";
|
|
8
|
+
DefinedLanguages["KOREAN"] = "ko_KR";
|
|
9
|
+
DefinedLanguages["JAPANESE"] = "ja_JP";
|
|
10
|
+
DefinedLanguages["FRENCH"] = "fr_FR";
|
|
11
|
+
DefinedLanguages["CHINESE"] = "zh-CN";
|
|
12
|
+
DefinedLanguages["SPANISH"] = "es_ES";
|
|
13
|
+
DefinedLanguages["PORTUGUESE"] = "pt_BR";
|
|
14
|
+
})(DefinedLanguages || (exports.DefinedLanguages = DefinedLanguages = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type ChapterPage = {
|
|
2
|
+
/**
|
|
3
|
+
* The URL of the Image
|
|
4
|
+
*/
|
|
5
|
+
url?: string;
|
|
6
|
+
/**
|
|
7
|
+
* The Image Data in the form of a base64-encoded string
|
|
8
|
+
*/
|
|
9
|
+
raw?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ChapterData = {
|
|
12
|
+
/**
|
|
13
|
+
* The Pages of the chapter. This should be populated in standard Image Sources.
|
|
14
|
+
*/
|
|
15
|
+
pages?: ChapterPage[];
|
|
16
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DirectoryRequest } from "../directory";
|
|
2
|
+
import { Highlight } from "./Highlight";
|
|
3
|
+
export type HighlightCollection = {
|
|
4
|
+
/**
|
|
5
|
+
* The ID of the Collection
|
|
6
|
+
*/
|
|
7
|
+
id: string;
|
|
8
|
+
/**
|
|
9
|
+
* The Title of the Collection
|
|
10
|
+
*/
|
|
11
|
+
title: string;
|
|
12
|
+
/**
|
|
13
|
+
* The Subtitle of the Collection.
|
|
14
|
+
*/
|
|
15
|
+
subtitle?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The Highlights/Titles to be displayed within this collection
|
|
18
|
+
*/
|
|
19
|
+
highlights: Highlight[];
|
|
20
|
+
/**
|
|
21
|
+
* The Directory Request to be made to view more results from this collection
|
|
22
|
+
*/
|
|
23
|
+
request?: DirectoryRequest;
|
|
24
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { BaseItem } from "./BaseItem";
|
|
2
|
+
import { Chapter } from "./Chapter";
|
|
3
|
+
import { HighlightCollection } from "./Collection";
|
|
4
|
+
import { PublicationStatus, ContentType, ReadingMode } from "./Enums";
|
|
5
|
+
import { Property } from "./Property";
|
|
6
|
+
export type Content = BaseItem & {
|
|
7
|
+
/**
|
|
8
|
+
* The Publication Status of Content
|
|
9
|
+
*
|
|
10
|
+
* Note: Defaults to UNKNOWN if not defined.
|
|
11
|
+
*/
|
|
12
|
+
status?: PublicationStatus;
|
|
13
|
+
/**
|
|
14
|
+
* Names of creators of the publication; Artists, Authors etc
|
|
15
|
+
*/
|
|
16
|
+
creators?: string[];
|
|
17
|
+
/**
|
|
18
|
+
* Summary / Description of the content
|
|
19
|
+
*/
|
|
20
|
+
summary?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Other Names of the Publication
|
|
23
|
+
*/
|
|
24
|
+
additionalTitles?: string[];
|
|
25
|
+
/**
|
|
26
|
+
* Properties of the publication
|
|
27
|
+
*/
|
|
28
|
+
properties?: Property[];
|
|
29
|
+
/**
|
|
30
|
+
* Content Type of the publication
|
|
31
|
+
*
|
|
32
|
+
* defaults to UNKNOWN if not defined
|
|
33
|
+
*/
|
|
34
|
+
contentType?: ContentType;
|
|
35
|
+
/**
|
|
36
|
+
* The Reading Mode recommended by the source based on available data.
|
|
37
|
+
*
|
|
38
|
+
* defaults to PAGED_COMIC if not defined
|
|
39
|
+
*/
|
|
40
|
+
recommendedPanelMode?: ReadingMode;
|
|
41
|
+
/**
|
|
42
|
+
* Additional Collections to display.
|
|
43
|
+
*
|
|
44
|
+
* Useful for display stuff like recommended Content
|
|
45
|
+
*/
|
|
46
|
+
collections?: HighlightCollection[];
|
|
47
|
+
/**
|
|
48
|
+
* The Content's defined Tracking ID's.
|
|
49
|
+
*/
|
|
50
|
+
trackerInfo?: Record<string, string>;
|
|
51
|
+
/**
|
|
52
|
+
* The content's chapters.
|
|
53
|
+
*
|
|
54
|
+
* Most websites display both the content information and chapters on the same page. Use to property to populate the chapters is such is the case
|
|
55
|
+
*
|
|
56
|
+
* Note: If Defined Suwatte will not make the subsequent requests required to get the content's chapters in the profile view.
|
|
57
|
+
*/
|
|
58
|
+
chapters?: Chapter[];
|
|
59
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type ContentProgressState = {
|
|
2
|
+
readChapterIds?: string[];
|
|
3
|
+
currentReadingState?: {
|
|
4
|
+
chapterId: string;
|
|
5
|
+
page: number;
|
|
6
|
+
progress: number;
|
|
7
|
+
readDate: Date;
|
|
8
|
+
};
|
|
9
|
+
markAllBelowAsRead?: {
|
|
10
|
+
chapterNumber: number;
|
|
11
|
+
chapterVolume?: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ContextMenuAction = {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
systemImage?: string;
|
|
5
|
+
destructive?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* If enabled the action will be displayed basically as a grayed out text label
|
|
8
|
+
*/
|
|
9
|
+
displayAsPlainLabel?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type ContextMenuGroup = {
|
|
12
|
+
id: string;
|
|
13
|
+
actions: ContextMenuAction[];
|
|
14
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare enum PublicationStatus {
|
|
2
|
+
ONGOING = 1,
|
|
3
|
+
COMPLETED = 2,
|
|
4
|
+
CANCELLED = 3,
|
|
5
|
+
HIATUS = 4
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The method in which the content can be read
|
|
9
|
+
*/
|
|
10
|
+
export declare enum ReadingMode {
|
|
11
|
+
PAGED_MANGA = 0,// Page 2 <---- Page 1
|
|
12
|
+
PAGED_COMIC = 1,// Page 1 ----> Page 2
|
|
13
|
+
PAGED_VERTICAL = 2,
|
|
14
|
+
WEBTOON = 3
|
|
15
|
+
}
|
|
16
|
+
export declare enum ContentType {
|
|
17
|
+
MANGA = 0,
|
|
18
|
+
MANHUA = 1,
|
|
19
|
+
MANHWA = 2,
|
|
20
|
+
COMIC = 3,
|
|
21
|
+
NOVEL = 4
|
|
22
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContentType = exports.ReadingMode = exports.PublicationStatus = void 0;
|
|
4
|
+
// Enums
|
|
5
|
+
var PublicationStatus;
|
|
6
|
+
(function (PublicationStatus) {
|
|
7
|
+
PublicationStatus[PublicationStatus["ONGOING"] = 1] = "ONGOING";
|
|
8
|
+
PublicationStatus[PublicationStatus["COMPLETED"] = 2] = "COMPLETED";
|
|
9
|
+
PublicationStatus[PublicationStatus["CANCELLED"] = 3] = "CANCELLED";
|
|
10
|
+
PublicationStatus[PublicationStatus["HIATUS"] = 4] = "HIATUS";
|
|
11
|
+
})(PublicationStatus || (exports.PublicationStatus = PublicationStatus = {}));
|
|
12
|
+
/**
|
|
13
|
+
* The method in which the content can be read
|
|
14
|
+
*/
|
|
15
|
+
var ReadingMode;
|
|
16
|
+
(function (ReadingMode) {
|
|
17
|
+
ReadingMode[ReadingMode["PAGED_MANGA"] = 0] = "PAGED_MANGA";
|
|
18
|
+
ReadingMode[ReadingMode["PAGED_COMIC"] = 1] = "PAGED_COMIC";
|
|
19
|
+
ReadingMode[ReadingMode["PAGED_VERTICAL"] = 2] = "PAGED_VERTICAL";
|
|
20
|
+
ReadingMode[ReadingMode["WEBTOON"] = 3] = "WEBTOON";
|
|
21
|
+
})(ReadingMode || (exports.ReadingMode = ReadingMode = {}));
|
|
22
|
+
var ContentType;
|
|
23
|
+
(function (ContentType) {
|
|
24
|
+
ContentType[ContentType["MANGA"] = 0] = "MANGA";
|
|
25
|
+
ContentType[ContentType["MANHUA"] = 1] = "MANHUA";
|
|
26
|
+
ContentType[ContentType["MANHWA"] = 2] = "MANHWA";
|
|
27
|
+
ContentType[ContentType["COMIC"] = 3] = "COMIC";
|
|
28
|
+
ContentType[ContentType["NOVEL"] = 4] = "NOVEL";
|
|
29
|
+
})(ContentType || (exports.ContentType = ContentType = {}));
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ContextProvider } from "../core";
|
|
2
|
+
import { Linkable } from "../page";
|
|
3
|
+
import { TrackEntry } from "../tracker";
|
|
4
|
+
import { BaseItem } from "./BaseItem";
|
|
5
|
+
export type Highlight = BaseItem & ContextProvider & {
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* The Subtitle of the tile
|
|
9
|
+
*/
|
|
10
|
+
subtitle?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Badge to be displayed with the tile
|
|
13
|
+
*/
|
|
14
|
+
badge?: Badge;
|
|
15
|
+
/**
|
|
16
|
+
* Link Provided with this
|
|
17
|
+
*/
|
|
18
|
+
link?: Linkable;
|
|
19
|
+
/**
|
|
20
|
+
* Marks this highlight as non interactive
|
|
21
|
+
*/
|
|
22
|
+
noninteractive?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The Tracker Entry of this Title
|
|
25
|
+
*
|
|
26
|
+
* NOTE: It will only be used on ContentTracker Pages & Directories
|
|
27
|
+
*/
|
|
28
|
+
entry?: TrackEntry;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* A Badge is added to a highlight tile
|
|
32
|
+
*/
|
|
33
|
+
export type Badge = {
|
|
34
|
+
count?: number;
|
|
35
|
+
color?: string;
|
|
36
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type BaseInteractable = {
|
|
2
|
+
/**
|
|
3
|
+
* The ID of the Interactable Object
|
|
4
|
+
*/
|
|
5
|
+
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* The Label of the Interactable Object
|
|
8
|
+
*/
|
|
9
|
+
title: string;
|
|
10
|
+
};
|
|
11
|
+
export type Property = BaseInteractable & {
|
|
12
|
+
/**
|
|
13
|
+
* The List of Tags available under this property.
|
|
14
|
+
*/
|
|
15
|
+
tags: Tag[];
|
|
16
|
+
};
|
|
17
|
+
export type Tag = BaseInteractable & {
|
|
18
|
+
/**
|
|
19
|
+
* A boolean indicating the titles marked with this tag contain Adult Content
|
|
20
|
+
*/
|
|
21
|
+
nsfw?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The URL of an image to display with this tag
|
|
24
|
+
*/
|
|
25
|
+
image?: string;
|
|
26
|
+
noninteractive?: boolean;
|
|
27
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare enum ProviderLinkType {
|
|
2
|
+
WEBSITE = 0,
|
|
3
|
+
TWITTER = 1,
|
|
4
|
+
DISCORD = 2,
|
|
5
|
+
PATREON = 3
|
|
6
|
+
}
|
|
7
|
+
export type ProviderLink = {
|
|
8
|
+
/**
|
|
9
|
+
* The URL of the Link
|
|
10
|
+
*/
|
|
11
|
+
url: string;
|
|
12
|
+
/**
|
|
13
|
+
* The Type of Link.
|
|
14
|
+
*
|
|
15
|
+
* EG: The Providers Website, Twitter, Discord or Patreon
|
|
16
|
+
*/
|
|
17
|
+
type: ProviderLinkType;
|
|
18
|
+
};
|
|
19
|
+
export type Provider = {
|
|
20
|
+
/**
|
|
21
|
+
* The ID of the Provider in relation to the Source
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* The Name of the Provider
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* Links the Provider can be interacted with at.
|
|
30
|
+
*/
|
|
31
|
+
links?: ProviderLink[];
|
|
32
|
+
};
|