delta-comic-core 0.0.10 → 0.0.11

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.
@@ -18,6 +18,7 @@ declare const _default: <T extends NonNullable<VirtualListProps["items"]>[number
18
18
  goBottom?: boolean;
19
19
  itemResizable?: boolean;
20
20
  dataProcessor?: PF;
21
+ unReloadable?: boolean;
21
22
  style?: StyleValue;
22
23
  class?: any;
23
24
  } & Partial<{}>> & import('vue').PublicProps;
@@ -15,6 +15,11 @@ export declare const coreModule: DependDefine<{
15
15
  item: uni.item.Item;
16
16
  comments: Utils.data.RStream<uni.comment.Comment>;
17
17
  }>;
18
+ CommentRow: Component<{
19
+ comments: uni.comment.Comment;
20
+ }, any, any, any, any, {
21
+ userExtra(): any;
22
+ }>;
18
23
  ItemCard: uni.content.ItemCardComp;
19
24
  FavouriteSelect: Component<{
20
25
  item: uni.item.Item;
package/dist/index.d.ts CHANGED
@@ -1781,6 +1781,7 @@ export declare const Comp: {
1781
1781
  goBottom?: boolean | undefined;
1782
1782
  itemResizable?: boolean | undefined;
1783
1783
  dataProcessor?: PF | undefined;
1784
+ unReloadable?: boolean | undefined;
1784
1785
  style?: import('vue').StyleValue;
1785
1786
  class?: any;
1786
1787
  } & import('vue').PublicProps;
@@ -2206,7 +2207,6 @@ export declare const Comp: {
2206
2207
  };
2207
2208
  export { uni } from './struct/index';
2208
2209
  import * as uData from './utils/data';
2209
- import * as uDelay from './utils/delay';
2210
2210
  import * as uEventBus from './utils/eventBus';
2211
2211
  import * as uImage from './utils/image';
2212
2212
  import * as uLayout from './utils/layout';
@@ -2215,7 +2215,6 @@ import * as uTranslate from './utils/translate';
2215
2215
  import * as uMessage from './utils/message';
2216
2216
  export declare namespace Utils {
2217
2217
  export import data = uData;
2218
- export import delay = uDelay;
2219
2218
  export import eventBus = uEventBus;
2220
2219
  export import image = uImage;
2221
2220
  export import layout = uLayout;
package/dist/pack.tgz CHANGED
Binary file
@@ -171,28 +171,28 @@ export interface PluginConfigImage {
171
171
  */
172
172
  process?: Record<string, ProcessInstance['func']>;
173
173
  }
174
- export interface PluginConfigContent {
174
+ export type PluginConfigContent = Record<string, {
175
175
  /**
176
176
  * @description
177
177
  * key: contentType
178
178
  * value: component
179
179
  * 与`ContentPage.setItemCard(key, value)`等价
180
180
  */
181
- itemCard?: Record<string, ItemCardComp>;
181
+ itemCard?: ItemCardComp;
182
182
  /**
183
183
  * @description
184
184
  * key: contentType
185
185
  * value: component
186
186
  * 与`Comment.setCommentRow(key, value)`等价
187
187
  */
188
- commentRow?: Record<string, CommentRow>;
188
+ commentRow?: CommentRow;
189
189
  /**
190
190
  * @description
191
191
  * key: contentType
192
192
  * value: component
193
193
  * 与`ContentPage.setViewLayout(key, value)`等价
194
194
  */
195
- layout?: Record<string, ViewLayoutComp>;
195
+ layout?: ViewLayoutComp;
196
196
  /**
197
197
  * @description
198
198
  * key: name
@@ -200,8 +200,14 @@ export interface PluginConfigContent {
200
200
  * 与`ContentPage.setContentPage(key, value)`等价
201
201
  * _不需要提供viewLayout_
202
202
  */
203
- contentPage?: Record<string, ContentPageLike>;
204
- }
203
+ contentPage?: ContentPageLike;
204
+ /**
205
+ * @description
206
+ * 将原始对象转换为类
207
+ */
208
+ itemTranslator?: PluginConfigContentItemTranslator;
209
+ }>;
210
+ export type PluginConfigContentItemTranslator = (raw: RawItem) => Item;
205
211
  export type UniFormDescription = {
206
212
  info: string;
207
213
  placeholder?: string;
@@ -3,6 +3,7 @@ import { default as dayjs } from 'dayjs';
3
3
  import { ContentType, ContentType_ } from './content';
4
4
  import { Ep, RawEp } from './ep';
5
5
  import { Component } from 'vue';
6
+ import { PluginConfigContentItemTranslator } from '../plugin/define';
6
7
  import * as image from "./image";
7
8
  export interface Category {
8
9
  name: string;
@@ -49,6 +50,8 @@ export interface RawItem {
49
50
  customIsSafe?: boolean;
50
51
  }
51
52
  export declare abstract class Item extends Struct<RawItem> implements RawItem {
53
+ static itemTranslator: import('vue').ShallowReactive<Map<string, PluginConfigContentItemTranslator>>;
54
+ static create(raw: RawItem): Item;
52
55
  static authorIcon: import('vue').ShallowReactive<Map<string, Component>>;
53
56
  static getAuthorIcon(plugin: string, name: string): Component | undefined;
54
57
  static setAuthorIcon(plugin: string, name: string, icon: Component): void;
@@ -1,4 +1,4 @@
1
- import { CSSProperties, MaybeRefOrGetter } from 'vue';
1
+ import { CSSProperties, MaybeRefOrGetter, Reactive } from 'vue';
2
2
  import { DialogOptions, DialogReactive } from 'naive-ui';
3
3
  export type LoadingInstance = ReturnType<typeof createLoadingMessage>;
4
4
  export declare const createLoadingMessage: (text?: MaybeRefOrGetter<string>, api?: import('naive-ui').MessageApi) => {
@@ -19,4 +19,16 @@ export declare const createDialog: (options: DialogOptions & {
19
19
  }) => PromiseWith<void, {
20
20
  ins: DialogReactive;
21
21
  }>;
22
+ export interface DownloadMessageProgress extends DownloadMessageLoading {
23
+ /** 0~100 */ progress: number;
24
+ }
25
+ export interface DownloadMessageLoading {
26
+ description: string;
27
+ retryable: boolean;
28
+ }
29
+ export interface DownloadMessageBind {
30
+ createProgress<TResult>(title: string, fn: (ins: Reactive<DownloadMessageProgress>) => PromiseLike<TResult>): Promise<TResult>;
31
+ createLoading<TResult>(title: string, fn: (ins: Reactive<DownloadMessageLoading>) => PromiseLike<TResult>): Promise<TResult>;
32
+ }
33
+ export declare const createDownloadMessage: <T>(title: string, bind: (method: DownloadMessageBind) => PromiseLike<T>) => Promise<T>;
22
34
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "delta-comic-core",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "我曾亲眼见证神的熟视无睹.",
5
5
  "homepage": "https://github.com/wenxig/delta-comic-core",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- export declare const delay: (time: number) => Promise<void>;