@delta-comic/model 2.2.0 → 3.0.0-next.4
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/index.d.mts +557 -0
- package/dist/index.mjs +400 -0
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/package.json +14 -23
- package/README.md +0 -42
- package/dist/index.js +0 -640
- package/dist/index.js.map +0 -1
- package/dist/lib/index.d.ts +0 -2
- package/dist/lib/model/comment.d.ts +0 -47
- package/dist/lib/model/content.d.ts +0 -36
- package/dist/lib/model/download.d.ts +0 -10
- package/dist/lib/model/ep.d.ts +0 -12
- package/dist/lib/model/image.d.ts +0 -19
- package/dist/lib/model/index.d.ts +0 -8
- package/dist/lib/model/item.d.ts +0 -104
- package/dist/lib/model/resource.d.ts +0 -34
- package/dist/lib/model/user.d.ts +0 -25
- package/dist/lib/struct/index.d.ts +0 -3
- package/dist/lib/struct/meta.d.ts +0 -19
- package/dist/lib/struct/store.d.ts +0 -36
- package/dist/lib/struct/struct.d.ts +0 -12
- package/dist/pack.tgz +0 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
+
import { isString } from "es-toolkit";
|
|
3
|
+
import { shallowReactive } from "vue";
|
|
4
|
+
import { logger } from "@delta-comic/logger";
|
|
5
|
+
import { isEmpty, isString as isString$1 } from "es-toolkit/compat";
|
|
6
|
+
//#region lib/struct/store.ts
|
|
7
|
+
/**
|
|
8
|
+
* 比如有很多需要注明来自哪个插件的值都可以用
|
|
9
|
+
*/
|
|
10
|
+
var SourcedValue = class {
|
|
11
|
+
separator;
|
|
12
|
+
toJSON(value) {
|
|
13
|
+
if (isString(value)) return this.parse(value);
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
parse(value) {
|
|
17
|
+
const splited = value.split(this.separator);
|
|
18
|
+
return [splited[0], splited.slice(1).join(this.separator)];
|
|
19
|
+
}
|
|
20
|
+
toString(value) {
|
|
21
|
+
if (isString(value)) return value;
|
|
22
|
+
return this.stringify(value);
|
|
23
|
+
}
|
|
24
|
+
stringify(value) {
|
|
25
|
+
return value.join(this.separator);
|
|
26
|
+
}
|
|
27
|
+
constructor(separator = ":") {
|
|
28
|
+
this.separator = separator;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* 相比较于普通的Map,这个元素的key操作可以是`TKey | string`
|
|
33
|
+
* _但内部保存仍使用`SourcedValue.key.toString`作为key_
|
|
34
|
+
*/
|
|
35
|
+
var SourcedKeyMap = class {
|
|
36
|
+
getOrInsert(key, value) {
|
|
37
|
+
const storeKey = this.key.toString(key);
|
|
38
|
+
if (this.store.has(storeKey)) return this.store.get(storeKey);
|
|
39
|
+
this.store.set(storeKey, value);
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
getOrInsertComputed(key, compute) {
|
|
43
|
+
const storeKey = this.key.toString(key);
|
|
44
|
+
if (this.store.has(storeKey)) return this.store.get(storeKey);
|
|
45
|
+
const value = compute(storeKey);
|
|
46
|
+
this.store.set(storeKey, value);
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
static createReactive(separator = ":") {
|
|
50
|
+
return shallowReactive(new this(separator));
|
|
51
|
+
}
|
|
52
|
+
constructor(separator = ":") {
|
|
53
|
+
this.key = new SourcedValue(separator);
|
|
54
|
+
}
|
|
55
|
+
key;
|
|
56
|
+
store = shallowReactive(/* @__PURE__ */ new Map());
|
|
57
|
+
get size() {
|
|
58
|
+
return this.store.size;
|
|
59
|
+
}
|
|
60
|
+
[Symbol.toStringTag] = "SourcedKeyMap";
|
|
61
|
+
clear() {
|
|
62
|
+
this.store.clear();
|
|
63
|
+
}
|
|
64
|
+
delete(key) {
|
|
65
|
+
return this.store.delete(this.key.toString(key));
|
|
66
|
+
}
|
|
67
|
+
forEach(callbackfn, thisArg) {
|
|
68
|
+
this.store.forEach((v, k) => {
|
|
69
|
+
callbackfn.call(thisArg, v, k, this);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
get(key) {
|
|
73
|
+
return this.store.get(this.key.toString(key));
|
|
74
|
+
}
|
|
75
|
+
has(key) {
|
|
76
|
+
return this.store.has(this.key.toString(key));
|
|
77
|
+
}
|
|
78
|
+
set(key, value) {
|
|
79
|
+
this.store.set(this.key.toString(key), value);
|
|
80
|
+
return this;
|
|
81
|
+
}
|
|
82
|
+
entries() {
|
|
83
|
+
return this.store.entries();
|
|
84
|
+
}
|
|
85
|
+
keys() {
|
|
86
|
+
return this.store.keys();
|
|
87
|
+
}
|
|
88
|
+
values() {
|
|
89
|
+
return this.store.values();
|
|
90
|
+
}
|
|
91
|
+
[Symbol.iterator]() {
|
|
92
|
+
return this.entries();
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region lib/struct/struct.ts
|
|
97
|
+
/**
|
|
98
|
+
* 可以结构化的数据,调用`toJSON`获取纯粹的json(没有get/set或method)
|
|
99
|
+
*/
|
|
100
|
+
var Struct = class Struct {
|
|
101
|
+
$$raw;
|
|
102
|
+
toJSON() {
|
|
103
|
+
return JSON.parse(JSON.stringify(this.$$raw));
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* @param $$raw 一个纯粹json对象,不可以是高级对象
|
|
107
|
+
*/
|
|
108
|
+
constructor($$raw) {
|
|
109
|
+
this.$$raw = $$raw;
|
|
110
|
+
}
|
|
111
|
+
static toRaw(item) {
|
|
112
|
+
if (item instanceof Struct) return item.toJSON();
|
|
113
|
+
return item;
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region lib/struct/meta.ts
|
|
118
|
+
var StreamQuery = class {
|
|
119
|
+
query;
|
|
120
|
+
initPage;
|
|
121
|
+
constructor(query, initPage) {
|
|
122
|
+
this.query = query;
|
|
123
|
+
this.initPage = initPage;
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region lib/model/comment.ts
|
|
128
|
+
var comment_exports = /* @__PURE__ */ __exportAll({ Comment: () => Comment });
|
|
129
|
+
var Comment = class extends Struct {
|
|
130
|
+
static commentRow = SourcedKeyMap.createReactive();
|
|
131
|
+
constructor(v) {
|
|
132
|
+
super(v);
|
|
133
|
+
this.content = v.content;
|
|
134
|
+
this.time = v.time;
|
|
135
|
+
this.id = v.id;
|
|
136
|
+
this.childrenCount = v.childrenCount;
|
|
137
|
+
this.likeCount = v.likeCount;
|
|
138
|
+
this.isLiked = v.isLiked;
|
|
139
|
+
this.reported = v.reported;
|
|
140
|
+
this.$$plugin = v.$$plugin;
|
|
141
|
+
this.$$meta = v.$$meta;
|
|
142
|
+
this.isTop = v.isTop;
|
|
143
|
+
}
|
|
144
|
+
content;
|
|
145
|
+
time;
|
|
146
|
+
id;
|
|
147
|
+
childrenCount;
|
|
148
|
+
likeCount;
|
|
149
|
+
isTop;
|
|
150
|
+
isLiked;
|
|
151
|
+
reported;
|
|
152
|
+
$$plugin;
|
|
153
|
+
$$meta;
|
|
154
|
+
};
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region lib/model/ep.ts
|
|
157
|
+
var ep_exports = /* @__PURE__ */ __exportAll({ Ep: () => Ep });
|
|
158
|
+
var Ep = class extends Struct {
|
|
159
|
+
name;
|
|
160
|
+
id;
|
|
161
|
+
$$plugin;
|
|
162
|
+
$$meta;
|
|
163
|
+
constructor(v) {
|
|
164
|
+
super(v);
|
|
165
|
+
this.name = v.name;
|
|
166
|
+
this.id = v.id;
|
|
167
|
+
this.$$plugin = v.$$plugin;
|
|
168
|
+
this.$$meta = v.$$meta;
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region lib/model/resource.ts
|
|
173
|
+
var resource_exports = /* @__PURE__ */ __exportAll({ Resource: () => Resource });
|
|
174
|
+
const resourceLogger = logger.scoped("model:resource");
|
|
175
|
+
var Resource = class Resource extends Struct {
|
|
176
|
+
static processInstances = SourcedKeyMap.createReactive();
|
|
177
|
+
static fork = SourcedKeyMap.createReactive();
|
|
178
|
+
static precedenceFork = SourcedKeyMap.createReactive();
|
|
179
|
+
static is(value) {
|
|
180
|
+
return value instanceof this;
|
|
181
|
+
}
|
|
182
|
+
static create(v) {
|
|
183
|
+
return new this(v);
|
|
184
|
+
}
|
|
185
|
+
constructor(v) {
|
|
186
|
+
super(v);
|
|
187
|
+
this.$$plugin = v.$$plugin;
|
|
188
|
+
this.$$meta = v.$$meta;
|
|
189
|
+
this.pathname = v.pathname;
|
|
190
|
+
this.type = v.type;
|
|
191
|
+
this.processSteps = (v.processSteps ?? []).map((v) => isString$1(v) ? {
|
|
192
|
+
referenceName: v,
|
|
193
|
+
ignoreExit: false
|
|
194
|
+
} : v);
|
|
195
|
+
}
|
|
196
|
+
type;
|
|
197
|
+
pathname;
|
|
198
|
+
processSteps;
|
|
199
|
+
$$meta;
|
|
200
|
+
$$plugin;
|
|
201
|
+
async getUrl() {
|
|
202
|
+
let resultPath = this.pathname;
|
|
203
|
+
for (const option of this.processSteps) {
|
|
204
|
+
const instance = Resource.processInstances.get([this.$$plugin, option.referenceName]);
|
|
205
|
+
if (!instance) {
|
|
206
|
+
resourceLogger.warn("resource process not found", {
|
|
207
|
+
plugin: this.$$plugin,
|
|
208
|
+
referenceName: option.referenceName
|
|
209
|
+
});
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
const result = await instance(resultPath, this);
|
|
213
|
+
resultPath = result[0];
|
|
214
|
+
if (option.ignoreExit || !result[1]) continue;
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
if (!URL.canParse(resultPath)) return `${this.getThisFork()}/${resultPath}`;
|
|
218
|
+
return resultPath;
|
|
219
|
+
}
|
|
220
|
+
omittedForks = shallowReactive(/* @__PURE__ */ new Set());
|
|
221
|
+
getThisFork() {
|
|
222
|
+
const all = new Set(Resource.fork.get([this.$$plugin, this.type])?.urls ?? []);
|
|
223
|
+
let fork;
|
|
224
|
+
if (isEmpty(this.omittedForks)) fork = Resource.precedenceFork.get([this.$$plugin, this.type]);
|
|
225
|
+
else fork = Array.from(all.difference(this.omittedForks).values())[0];
|
|
226
|
+
if (!fork) throw new Error(`[Resource.getThisFork] fork not found, type: [${this.$$plugin}, ${this.type}]`);
|
|
227
|
+
return fork;
|
|
228
|
+
}
|
|
229
|
+
localChangeFork() {
|
|
230
|
+
const all = new Set(Resource.fork.get([this.$$plugin, this.type])?.urls ?? []);
|
|
231
|
+
this.omittedForks.add(this.getThisFork());
|
|
232
|
+
const isChangedFail = isEmpty(all.difference(this.omittedForks));
|
|
233
|
+
if (isChangedFail) this.omittedForks.clear();
|
|
234
|
+
return isChangedFail;
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region lib/model/image.ts
|
|
239
|
+
var image_exports = /* @__PURE__ */ __exportAll({ Image: () => Image });
|
|
240
|
+
var Image = class extends Resource {
|
|
241
|
+
static is(value) {
|
|
242
|
+
return value instanceof this;
|
|
243
|
+
}
|
|
244
|
+
static create(v, aspect) {
|
|
245
|
+
return new this(v, aspect);
|
|
246
|
+
}
|
|
247
|
+
constructor(v, aspect) {
|
|
248
|
+
if ("forkNamespace" in v) super({
|
|
249
|
+
$$plugin: v.$$plugin,
|
|
250
|
+
$$meta: {
|
|
251
|
+
...v.$$meta,
|
|
252
|
+
aspect
|
|
253
|
+
},
|
|
254
|
+
pathname: v.path,
|
|
255
|
+
type: v.forkNamespace,
|
|
256
|
+
processSteps: v.processSteps
|
|
257
|
+
});
|
|
258
|
+
else super(v);
|
|
259
|
+
}
|
|
260
|
+
get aspect() {
|
|
261
|
+
return this.$$meta.aspect;
|
|
262
|
+
}
|
|
263
|
+
set aspect(v) {
|
|
264
|
+
if (!v) return;
|
|
265
|
+
this.$$meta ??= {};
|
|
266
|
+
this.$$meta.aspect ??= {};
|
|
267
|
+
this.$$meta.aspect.width = v.width;
|
|
268
|
+
this.$$meta.aspect.height = v.height;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region lib/model/item.ts
|
|
273
|
+
var item_exports = /* @__PURE__ */ __exportAll({ Item: () => Item });
|
|
274
|
+
var Item = class extends Struct {
|
|
275
|
+
static itemTranslator = SourcedKeyMap.createReactive();
|
|
276
|
+
static create(raw) {
|
|
277
|
+
const translator = this.itemTranslator.get(raw.contentType);
|
|
278
|
+
if (!translator) throw new Error(`can not found itemTranslator contentType:"${ContentPage.contentPages.key.toString(raw.contentType)}"`);
|
|
279
|
+
return translator(raw);
|
|
280
|
+
}
|
|
281
|
+
static authorIcon = SourcedKeyMap.createReactive();
|
|
282
|
+
static itemCards = SourcedKeyMap.createReactive();
|
|
283
|
+
static is(value) {
|
|
284
|
+
return value instanceof this;
|
|
285
|
+
}
|
|
286
|
+
cover;
|
|
287
|
+
get $cover() {
|
|
288
|
+
return Image.create(this.cover);
|
|
289
|
+
}
|
|
290
|
+
title;
|
|
291
|
+
id;
|
|
292
|
+
categories;
|
|
293
|
+
author;
|
|
294
|
+
viewNumber;
|
|
295
|
+
likeNumber;
|
|
296
|
+
commentNumber;
|
|
297
|
+
isLiked;
|
|
298
|
+
description;
|
|
299
|
+
updateTime;
|
|
300
|
+
contentType;
|
|
301
|
+
length;
|
|
302
|
+
epLength;
|
|
303
|
+
$$plugin;
|
|
304
|
+
$$meta;
|
|
305
|
+
thisEp;
|
|
306
|
+
customIsSafe;
|
|
307
|
+
get $thisEp() {
|
|
308
|
+
return new Ep(this.thisEp);
|
|
309
|
+
}
|
|
310
|
+
constructor(v) {
|
|
311
|
+
super(v);
|
|
312
|
+
this.$$plugin = v.$$plugin;
|
|
313
|
+
this.$$meta = v.$$meta;
|
|
314
|
+
this.thisEp = v.thisEp;
|
|
315
|
+
this.updateTime = v.updateTime;
|
|
316
|
+
this.cover = v.cover;
|
|
317
|
+
this.title = v.title;
|
|
318
|
+
this.id = v.id;
|
|
319
|
+
this.categories = v.categories;
|
|
320
|
+
this.author = v.author;
|
|
321
|
+
this.viewNumber = v.viewNumber;
|
|
322
|
+
this.likeNumber = v.likeNumber;
|
|
323
|
+
this.commentNumber = v.commentNumber;
|
|
324
|
+
this.isLiked = v.isLiked;
|
|
325
|
+
this.customIsAI = v.customIsAI;
|
|
326
|
+
this.contentType = ContentPage.contentPages.key.toJSON(v.contentType);
|
|
327
|
+
this.length = v.length;
|
|
328
|
+
this.epLength = v.epLength;
|
|
329
|
+
this.description = v.description;
|
|
330
|
+
this.commentSendable = v.commentSendable;
|
|
331
|
+
this.customIsSafe = v.customIsSafe;
|
|
332
|
+
}
|
|
333
|
+
commentSendable;
|
|
334
|
+
customIsAI;
|
|
335
|
+
get $isAi() {
|
|
336
|
+
const check = (str) => /(^|[(([\s【])ai[】))\]\s]?/gi.test(str);
|
|
337
|
+
return this.customIsAI || check(this.title) || this.author.some((author) => check(`${author.label}\u1145${author.description}`));
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
//#endregion
|
|
341
|
+
//#region lib/model/content.ts
|
|
342
|
+
var content_exports = /* @__PURE__ */ __exportAll({ ContentPage: () => ContentPage });
|
|
343
|
+
var ContentPage = class {
|
|
344
|
+
preload;
|
|
345
|
+
id;
|
|
346
|
+
ep;
|
|
347
|
+
static layouts = SourcedKeyMap.createReactive();
|
|
348
|
+
static contentPages = SourcedKeyMap.createReactive();
|
|
349
|
+
static downloadProviders = SourcedKeyMap.createReactive();
|
|
350
|
+
constructor(preload, id, ep) {
|
|
351
|
+
this.preload = preload;
|
|
352
|
+
this.id = id;
|
|
353
|
+
this.ep = ep;
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
//#endregion
|
|
357
|
+
//#region lib/model/download.ts
|
|
358
|
+
var download_exports = /* @__PURE__ */ __exportAll({ Downloader: () => Downloader });
|
|
359
|
+
/**
|
|
360
|
+
* Legacy imperative download controller.
|
|
361
|
+
*
|
|
362
|
+
* @deprecated Register a {@link ContentDownloadProvider} for the content type and let the native
|
|
363
|
+
* downloader own task state, persistence, and lifecycle controls. This class remains unchanged so
|
|
364
|
+
* existing plugins can migrate without an immediate breaking change.
|
|
365
|
+
*/
|
|
366
|
+
var Downloader = class {};
|
|
367
|
+
//#endregion
|
|
368
|
+
//#region lib/model/user.ts
|
|
369
|
+
var user_exports = /* @__PURE__ */ __exportAll({ User: () => User });
|
|
370
|
+
var User = class {
|
|
371
|
+
static userBase = shallowReactive(/* @__PURE__ */ new Map());
|
|
372
|
+
static userEditorBase = shallowReactive(/* @__PURE__ */ new Map());
|
|
373
|
+
static userCards = shallowReactive(/* @__PURE__ */ new Map());
|
|
374
|
+
constructor(v) {
|
|
375
|
+
if (v.avatar) this.avatar = Image.create(v.avatar);
|
|
376
|
+
this.name = v.name;
|
|
377
|
+
this.id = v.id;
|
|
378
|
+
this.$$plugin = v.$$plugin;
|
|
379
|
+
this.$$meta = v.$$meta;
|
|
380
|
+
}
|
|
381
|
+
avatar;
|
|
382
|
+
name;
|
|
383
|
+
id;
|
|
384
|
+
$$plugin;
|
|
385
|
+
$$meta;
|
|
386
|
+
};
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region lib/model/index.ts
|
|
389
|
+
var model_exports = /* @__PURE__ */ __exportAll({
|
|
390
|
+
comment: () => comment_exports,
|
|
391
|
+
content: () => content_exports,
|
|
392
|
+
download: () => download_exports,
|
|
393
|
+
ep: () => ep_exports,
|
|
394
|
+
image: () => image_exports,
|
|
395
|
+
item: () => item_exports,
|
|
396
|
+
resource: () => resource_exports,
|
|
397
|
+
user: () => user_exports
|
|
398
|
+
});
|
|
399
|
+
//#endregion
|
|
400
|
+
export { SourcedKeyMap, SourcedValue, StreamQuery, Struct, model_exports as uni };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delta-comic/model",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-next.4",
|
|
4
4
|
"description": "空阙虱楼",
|
|
5
5
|
"homepage": "https://github.com/delta-comic/delta-comic",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -16,41 +16,32 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"type": "module",
|
|
19
|
-
"main": "./dist/index.
|
|
20
|
-
"module": "./dist/index.
|
|
21
|
-
"types": "./dist/lib/index.d.
|
|
19
|
+
"main": "./dist/index.mjs",
|
|
20
|
+
"module": "./dist/index.mjs",
|
|
21
|
+
"types": "./dist/lib/index.d.mts",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
-
"types": "./dist/lib/index.d.
|
|
25
|
-
"import": "./dist/index.
|
|
24
|
+
"types": "./dist/lib/index.d.mts",
|
|
25
|
+
"import": "./dist/index.mjs"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"
|
|
33
|
-
"@
|
|
34
|
-
"dayjs": "^1.11.20",
|
|
35
|
-
"mitt": "^3.0.1"
|
|
32
|
+
"es-toolkit": "^1.47.0",
|
|
33
|
+
"@delta-comic/logger": "3.0.0-next.4"
|
|
36
34
|
},
|
|
37
35
|
"devDependencies": {
|
|
38
|
-
"
|
|
39
|
-
"vite-plus": "^0.
|
|
36
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
37
|
+
"vite-plus": "^0.2.4",
|
|
38
|
+
"vitest": "4.1.10"
|
|
40
39
|
},
|
|
41
40
|
"peerDependencies": {
|
|
42
|
-
"vue": "^3.5"
|
|
43
|
-
"@delta-comic/utils": "2.2.0",
|
|
44
|
-
"@delta-comic/request": "2.2.0"
|
|
41
|
+
"vue": "^3.5.40"
|
|
45
42
|
},
|
|
46
|
-
"release": {
|
|
47
|
-
"tagFormat": "model-${version}"
|
|
48
|
-
},
|
|
49
|
-
"dist": {
|
|
50
|
-
"tarball": "./dist/pack.tgz"
|
|
51
|
-
},
|
|
52
|
-
"readme": "./README.md",
|
|
53
43
|
"scripts": {
|
|
54
|
-
"build": "vp
|
|
44
|
+
"build": "vp pack",
|
|
45
|
+
"typecheck": "tsgo -p tsconfig.app.json --noEmit && tsgo -p tsconfig.node.json --noEmit"
|
|
55
46
|
}
|
|
56
47
|
}
|
package/README.md
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
```python
|
|
2
|
-
r"""
|
|
3
|
-
___________________________
|
|
4
|
-
/ ______\ | __ | | ____|
|
|
5
|
-
| | _____ | |__| | | |__
|
|
6
|
-
| | / _ \| __ \ | __|
|
|
7
|
-
| |___| |_| || | \ \| |____
|
|
8
|
-
\__________/|_| \________|
|
|
9
|
-
==============================
|
|
10
|
-
空阙虱楼 Copyright © Wenxig
|
|
11
|
-
"""
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
[](https://raw.githubusercontent.com/delta-comic/delta-comic-core/main/LICENSE)
|
|
15
|
-
[](https://www.npmjs.com/package/delta-comic-core)
|
|
16
|
-
|
|
17
|
-
- 工具库
|
|
18
|
-
|
|
19
|
-
## 功能
|
|
20
|
-
|
|
21
|
-
- 辅助编写插件
|
|
22
|
-
- 提供通用数据结构与默认样式
|
|
23
|
-
|
|
24
|
-
## 如何使用
|
|
25
|
-
|
|
26
|
-
```sh
|
|
27
|
-
pnpm add delta-comic-core
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## 为谁编写插件?
|
|
31
|
-
|
|
32
|
-
[](https://github.com/delta-comic/delta-comic)
|
|
33
|
-
|
|
34
|
-
## 辅助的插件
|
|
35
|
-
|
|
36
|
-
### Layout
|
|
37
|
-
|
|
38
|
-
[](https://github.com/delta-comic/delta-comic-plugin-bika)
|
|
39
|
-
|
|
40
|
-
## Star History
|
|
41
|
-
|
|
42
|
-
[](https://www.star-history.com/#delta-comic/delta-comic-core&Date)
|