delta-comic-core 0.2.2 → 0.3.0
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/bundle.cjs +1 -1
- package/dist/bundle.cjs.map +1 -1
- package/dist/bundle.js +10 -4
- package/dist/bundle.js.map +1 -1
- package/dist/lib/components/image.vue.d.ts +2 -2
- package/dist/lib/index.d.ts +5 -5
- package/dist/lib/plugin/define.d.ts +27 -3
- package/dist/lib/struct/content.d.ts +16 -29
- package/dist/lib/struct/item.d.ts +18 -2
- package/dist/lib/utils/eventBus.d.ts +2 -0
- package/dist/pack.tgz +0 -0
- package/package.json +1 -1
|
@@ -771,13 +771,13 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
771
771
|
previewDisabled: boolean;
|
|
772
772
|
}> | null>>;
|
|
773
773
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
774
|
-
click: () => any;
|
|
775
774
|
load: (...args: any[]) => any;
|
|
776
775
|
error: () => any;
|
|
776
|
+
click: () => any;
|
|
777
777
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
778
|
-
onClick?: (() => any) | undefined;
|
|
779
778
|
onLoad?: ((...args: any[]) => any) | undefined;
|
|
780
779
|
onError?: (() => any) | undefined;
|
|
780
|
+
onClick?: (() => any) | undefined;
|
|
781
781
|
}>, {
|
|
782
782
|
retryMax: number;
|
|
783
783
|
fetchpriority: "high" | "low" | "auto";
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -186,9 +186,9 @@ export declare const Comp: {
|
|
|
186
186
|
fetchpriority?: "high" | "low" | "auto";
|
|
187
187
|
fallback?: import('./struct/image.ts').Image_;
|
|
188
188
|
}> & Readonly<{
|
|
189
|
-
onClick?: (() => any) | undefined;
|
|
190
189
|
onLoad?: ((...args: any[]) => any) | undefined;
|
|
191
190
|
onError?: (() => any) | undefined;
|
|
191
|
+
onClick?: (() => any) | undefined;
|
|
192
192
|
}>, {
|
|
193
193
|
isLoaded: import('vue').ComputedRef<boolean>;
|
|
194
194
|
imageEl: import('vue').ComputedRef<HTMLImageElement | null | undefined>;
|
|
@@ -559,9 +559,9 @@ export declare const Comp: {
|
|
|
559
559
|
previewDisabled: boolean;
|
|
560
560
|
}> | null>>;
|
|
561
561
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
562
|
-
click: () => any;
|
|
563
562
|
load: (...args: any[]) => any;
|
|
564
563
|
error: () => any;
|
|
564
|
+
click: () => any;
|
|
565
565
|
}, import('vue').PublicProps, {
|
|
566
566
|
retryMax: number;
|
|
567
567
|
fetchpriority: "high" | "low" | "auto";
|
|
@@ -959,9 +959,9 @@ export declare const Comp: {
|
|
|
959
959
|
fetchpriority?: "high" | "low" | "auto";
|
|
960
960
|
fallback?: import('./struct/image.ts').Image_;
|
|
961
961
|
}> & Readonly<{
|
|
962
|
-
onClick?: (() => any) | undefined;
|
|
963
962
|
onLoad?: ((...args: any[]) => any) | undefined;
|
|
964
963
|
onError?: (() => any) | undefined;
|
|
964
|
+
onClick?: (() => any) | undefined;
|
|
965
965
|
}>, {
|
|
966
966
|
isLoaded: import('vue').ComputedRef<boolean>;
|
|
967
967
|
imageEl: import('vue').ComputedRef<HTMLImageElement | null | undefined>;
|
|
@@ -1358,9 +1358,9 @@ export declare const Comp: {
|
|
|
1358
1358
|
fetchpriority?: "high" | "low" | "auto";
|
|
1359
1359
|
fallback?: import('./struct/image.ts').Image_;
|
|
1360
1360
|
}> & Readonly<{
|
|
1361
|
-
onClick?: (() => any) | undefined;
|
|
1362
1361
|
onLoad?: ((...args: any[]) => any) | undefined;
|
|
1363
1362
|
onError?: (() => any) | undefined;
|
|
1363
|
+
onClick?: (() => any) | undefined;
|
|
1364
1364
|
}>, {
|
|
1365
1365
|
isLoaded: import('vue').ComputedRef<boolean>;
|
|
1366
1366
|
imageEl: import('vue').ComputedRef<HTMLImageElement | null | undefined>;
|
|
@@ -1731,9 +1731,9 @@ export declare const Comp: {
|
|
|
1731
1731
|
previewDisabled: boolean;
|
|
1732
1732
|
}> | null>>;
|
|
1733
1733
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
1734
|
-
click: () => any;
|
|
1735
1734
|
load: (...args: any[]) => any;
|
|
1736
1735
|
error: () => any;
|
|
1736
|
+
click: () => any;
|
|
1737
1737
|
}, string, {
|
|
1738
1738
|
retryMax: number;
|
|
1739
1739
|
fetchpriority: "high" | "low" | "auto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ContentPageLike,
|
|
2
|
-
import { ProcessInstance } from '../struct/image';
|
|
1
|
+
import { ContentPageLike, ViewLayoutComp, ContentPage } from '../struct/content';
|
|
2
|
+
import { ProcessInstance, Image } from '../struct/image';
|
|
3
3
|
import { CommentRow } from '../struct/comment';
|
|
4
4
|
import { UserCardComp } from '../struct/user';
|
|
5
5
|
import { RStream, RPromiseContent } from '../utils/data';
|
|
6
|
-
import { Item, RawItem, Author } from '../struct/item';
|
|
6
|
+
import { Item, RawItem, Author, ItemCardComp } from '../struct/item';
|
|
7
7
|
import { Component, MaybeRefOrGetter } from 'vue';
|
|
8
8
|
import { ConfigPointer } from '../config';
|
|
9
9
|
export type PluginDefineResult = {
|
|
@@ -28,6 +28,30 @@ export interface PluginConfig {
|
|
|
28
28
|
*/
|
|
29
29
|
config?: ConfigPointer[];
|
|
30
30
|
subscribe?: Record<string, PluginConfigSubscribe>;
|
|
31
|
+
share?: PluginShare;
|
|
32
|
+
}
|
|
33
|
+
export interface PluginShare {
|
|
34
|
+
initiative: PluginShareInitiativeItem[];
|
|
35
|
+
tokenListen: PluginShareToken[];
|
|
36
|
+
}
|
|
37
|
+
export interface PluginShareToken {
|
|
38
|
+
key: string;
|
|
39
|
+
name: string;
|
|
40
|
+
patten(chipboard: string): boolean;
|
|
41
|
+
show(chipboard: string): Promise<PluginShareTokenPopup> | PluginShareTokenPopup;
|
|
42
|
+
}
|
|
43
|
+
export interface PluginShareTokenPopup {
|
|
44
|
+
title: string;
|
|
45
|
+
detail: string;
|
|
46
|
+
onPositive(): void;
|
|
47
|
+
onNegative(): void;
|
|
48
|
+
}
|
|
49
|
+
export interface PluginShareInitiativeItem {
|
|
50
|
+
key: string;
|
|
51
|
+
name: string;
|
|
52
|
+
icon: Component | Image;
|
|
53
|
+
call(page: ContentPage): Promise<any>;
|
|
54
|
+
filter(page: ContentPage): boolean;
|
|
31
55
|
}
|
|
32
56
|
export interface PluginConfigSubscribe {
|
|
33
57
|
getUpdateList(olds: {
|
|
@@ -1,22 +1,32 @@
|
|
|
1
|
-
import { Component
|
|
1
|
+
import { Component } from 'vue';
|
|
2
2
|
import { SourcedKeyMap, RStream, SourcedKeyType } from '../utils/data';
|
|
3
3
|
import { uni } from '.';
|
|
4
4
|
import { AudioSrc, MediaSrc, TextTrackInit } from 'vidstack';
|
|
5
|
-
import { PluginConfigSearchCategory, PluginConfigSearchHotPageLevelboard, PluginConfigSearchHotPageMainList, PluginConfigSearchHotPageTopButton, PluginConfigSearchTabbar } from '../plugin/define';
|
|
5
|
+
import { PluginConfigSearchCategory, PluginConfigSearchHotPageLevelboard, PluginConfigSearchHotPageMainList, PluginConfigSearchHotPageTopButton, PluginConfigSearchTabbar, PluginShareInitiativeItem, PluginShareToken } from '../plugin/define';
|
|
6
6
|
import * as item from './item';
|
|
7
7
|
import * as ep from './ep';
|
|
8
8
|
import * as comment from './comment';
|
|
9
9
|
export type PreloadValue = item.Item | undefined;
|
|
10
10
|
export type ContentPageLike = new (preload: PreloadValue, id: string, ep: string) => ContentPage;
|
|
11
|
+
export type ContentType_ = SourcedKeyType<typeof ContentPage.contentPage>;
|
|
12
|
+
export type ContentType = Exclude<ContentType_, string>;
|
|
13
|
+
export type ViewComp = Component<{
|
|
14
|
+
page: ContentPage;
|
|
15
|
+
isFullScreen: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
export type ViewLayoutComp = Component<{
|
|
18
|
+
page: ContentPage;
|
|
19
|
+
}>;
|
|
11
20
|
export declare abstract class ContentPage<T extends object = any> {
|
|
12
21
|
id: string;
|
|
13
22
|
ep: string;
|
|
14
23
|
static viewLayout: import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, name: string], uni.content.ViewLayoutComp>>;
|
|
24
|
+
static share: import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, key: string], PluginShareInitiativeItem>>;
|
|
25
|
+
static shareToken: import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, key: string], PluginShareToken>>;
|
|
15
26
|
static tabbar: import('vue').ShallowReactive<Map<string, PluginConfigSearchTabbar[]>>;
|
|
16
27
|
static addTabbar(plugin: string, ...tabbar: PluginConfigSearchTabbar[]): void;
|
|
17
28
|
static categories: import('vue').ShallowReactive<Map<string, PluginConfigSearchCategory[]>>;
|
|
18
29
|
static addCategories(plugin: string, ...categories: PluginConfigSearchCategory[]): void;
|
|
19
|
-
static itemCard: import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, name: string], uni.content.ItemCardComp>>;
|
|
20
30
|
static contentPage: import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, name: string], uni.content.ContentPageLike>>;
|
|
21
31
|
static levelboard: import('vue').ShallowReactive<Map<string, PluginConfigSearchHotPageLevelboard[]>>;
|
|
22
32
|
static addLevelboard(plugin: string, cfg: PluginConfigSearchHotPageLevelboard): string;
|
|
@@ -40,35 +50,12 @@ export declare abstract class ContentPage<T extends object = any> {
|
|
|
40
50
|
abstract exportOffline(): Promise<T>;
|
|
41
51
|
abstract ViewComp: ViewComp;
|
|
42
52
|
}
|
|
43
|
-
export type ContentType_ = SourcedKeyType<typeof ContentPage.contentPage>;
|
|
44
|
-
export type ContentType = Exclude<ContentType_, string>;
|
|
45
|
-
export type ViewComp = Component<{
|
|
46
|
-
page: ContentPage;
|
|
47
|
-
isFullScreen: boolean;
|
|
48
|
-
}>;
|
|
49
|
-
export type ViewLayoutComp = Component<{
|
|
50
|
-
page: ContentPage;
|
|
51
|
-
}>;
|
|
52
|
-
export type ItemCardComp = Component<{
|
|
53
|
-
item: uni.item.Item;
|
|
54
|
-
freeHeight?: boolean;
|
|
55
|
-
disabled?: boolean;
|
|
56
|
-
type?: 'default' | 'big' | 'small';
|
|
57
|
-
class?: any;
|
|
58
|
-
style?: StyleValue;
|
|
59
|
-
}, any, any, any, any, {
|
|
60
|
-
click: [];
|
|
61
|
-
}, {
|
|
62
|
-
default(): void;
|
|
63
|
-
smallTopInfo(): void;
|
|
64
|
-
cover(): void;
|
|
65
|
-
}>;
|
|
66
|
-
export type VideoConfig = {
|
|
67
|
-
textTrack?: TextTrackInit[];
|
|
68
|
-
} & (Exclude<MediaSrc, string | AudioSrc>[]);
|
|
69
53
|
export declare abstract class ContentImagePage extends ContentPage {
|
|
70
54
|
images: import('../utils/data').PromiseWithResolvers<uni.image.Image[]>;
|
|
71
55
|
}
|
|
56
|
+
export type VideoConfig = {
|
|
57
|
+
textTrack?: TextTrackInit[];
|
|
58
|
+
} & (Exclude<MediaSrc, string | AudioSrc>[]);
|
|
72
59
|
export declare abstract class ContentVideoPage extends ContentPage {
|
|
73
60
|
videos: import('../utils/data').PromiseWithResolvers<uni.content.VideoConfig>;
|
|
74
61
|
}
|
|
@@ -2,8 +2,9 @@ import { SourcedKeyMap, Struct, MetaData } from '../utils/data';
|
|
|
2
2
|
import { default as dayjs } from 'dayjs';
|
|
3
3
|
import { ContentType, ContentType_ } from './content';
|
|
4
4
|
import { Ep, RawEp } from './ep';
|
|
5
|
-
import { Component } from 'vue';
|
|
5
|
+
import { Component, StyleValue } from 'vue';
|
|
6
6
|
import { PluginConfigContentItemTranslator } from '../plugin/define';
|
|
7
|
+
import { uni } from '.';
|
|
7
8
|
import * as image from "./image";
|
|
8
9
|
export interface Category {
|
|
9
10
|
name: string;
|
|
@@ -49,6 +50,20 @@ export interface RawItem {
|
|
|
49
50
|
commentSendable: boolean;
|
|
50
51
|
customIsSafe?: boolean;
|
|
51
52
|
}
|
|
53
|
+
export type ItemCardComp = Component<{
|
|
54
|
+
item: uni.item.Item;
|
|
55
|
+
freeHeight?: boolean;
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
type?: 'default' | 'big' | 'small';
|
|
58
|
+
class?: any;
|
|
59
|
+
style?: StyleValue;
|
|
60
|
+
}, any, any, any, any, {
|
|
61
|
+
click: [];
|
|
62
|
+
}, {
|
|
63
|
+
default(): void;
|
|
64
|
+
smallTopInfo(): void;
|
|
65
|
+
cover(): void;
|
|
66
|
+
}>;
|
|
52
67
|
export type Description = string | {
|
|
53
68
|
type: 'html';
|
|
54
69
|
content: string;
|
|
@@ -58,8 +73,9 @@ export type Description = string | {
|
|
|
58
73
|
};
|
|
59
74
|
export declare abstract class Item extends Struct<RawItem> implements RawItem {
|
|
60
75
|
static itemTranslator: import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, name: string], PluginConfigContentItemTranslator>>;
|
|
61
|
-
static create(raw: RawItem): Item;
|
|
76
|
+
static create(raw: RawItem): uni.item.Item;
|
|
62
77
|
static authorIcon: import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, name: string], Component>>;
|
|
78
|
+
static itemCard: import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, name: string], uni.item.ItemCardComp>>;
|
|
63
79
|
abstract like(signal?: AbortSignal): PromiseLike<boolean>;
|
|
64
80
|
abstract report(signal?: AbortSignal): PromiseLike<any>;
|
|
65
81
|
abstract sendComment(text: string, signal?: AbortSignal): PromiseLike<any>;
|
|
@@ -16,6 +16,8 @@ export type SharedFunctions = {
|
|
|
16
16
|
addAuthorSubscribe(author: uni.item.Author, plugin: string): PromiseLike<void>;
|
|
17
17
|
removeAuthorSubscribe(author: uni.item.Author, plugin: string): PromiseLike<void>;
|
|
18
18
|
getIsAuthorSubscribe(author: uni.item.Author, plugin: string): PromiseLike<boolean>;
|
|
19
|
+
triggerSharePopup(page: uni.content.ContentPage): PromiseLike<void>;
|
|
20
|
+
triggerShoreToken(token: string): PromiseLike<void>;
|
|
19
21
|
};
|
|
20
22
|
export declare class SharedFunction {
|
|
21
23
|
private static sharedFunctions;
|
package/dist/pack.tgz
CHANGED
|
Binary file
|