@dan-uni/dan-any 1.1.1 → 1.2.5

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.
Files changed (72) hide show
  1. package/README.md +1 -0
  2. package/dist/browser/17.min.js +13286 -0
  3. package/dist/browser/705.min.js +77 -0
  4. package/dist/browser/898.min.js +10 -0
  5. package/dist/browser/index.min.js +1 -13248
  6. package/dist/browser/plugins/bili.min.js +1 -0
  7. package/dist/browser/plugins/index.min.js +2 -1
  8. package/dist/browser/plugins/stats.min.js +1 -0
  9. package/dist/browser/src/index.d.ts +1 -4
  10. package/dist/browser/src/plugins/bili/dedupe.d.ts +3 -0
  11. package/dist/browser/src/plugins/bili/history-danmaku-fast-forward.d.ts +18 -0
  12. package/dist/browser/src/plugins/bili/index.d.ts +2 -0
  13. package/dist/browser/src/plugins/index.d.ts +2 -2
  14. package/dist/browser/src/plugins/stats/getLatestDan.d.ts +6 -0
  15. package/dist/browser/src/plugins/stats/index.d.ts +1 -0
  16. package/dist/node/17.js +1861 -0
  17. package/dist/node/705.js +77 -0
  18. package/dist/node/898.js +10 -0
  19. package/dist/node/index.js +1 -1823
  20. package/dist/node/plugins/bili.js +1 -0
  21. package/dist/node/plugins/index.js +2 -1
  22. package/dist/node/plugins/stats.js +1 -0
  23. package/dist/node/src/index.d.ts +1 -4
  24. package/dist/node/src/plugins/bili/dedupe.d.ts +3 -0
  25. package/dist/node/src/plugins/bili/history-danmaku-fast-forward.d.ts +18 -0
  26. package/dist/node/src/plugins/bili/index.d.ts +2 -0
  27. package/dist/node/src/plugins/index.d.ts +2 -2
  28. package/dist/node/src/plugins/stats/getLatestDan.d.ts +6 -0
  29. package/dist/node/src/plugins/stats/index.d.ts +1 -0
  30. package/dist/node/src/plugins/stats/index.test.d.ts +1 -0
  31. package/dist/umd/index.umd.min.js +73 -68
  32. package/dist/umd/plugins/bili.umd.min.js +29639 -0
  33. package/dist/umd/plugins/bili.umd.min.js.LICENSE.txt +34 -0
  34. package/dist/umd/plugins/index.umd.min.js +29584 -23
  35. package/dist/umd/plugins/index.umd.min.js.LICENSE.txt +34 -0
  36. package/dist/umd/plugins/stats.umd.min.js +39 -0
  37. package/dist/umd/src/index.d.ts +1 -4
  38. package/dist/umd/src/plugins/bili/dedupe.d.ts +3 -0
  39. package/dist/umd/src/plugins/bili/history-danmaku-fast-forward.d.ts +18 -0
  40. package/dist/umd/src/plugins/bili/index.d.ts +2 -0
  41. package/dist/umd/src/plugins/bili/index.test.d.ts +1 -0
  42. package/dist/umd/src/plugins/index.d.ts +2 -2
  43. package/dist/umd/src/plugins/stats/getLatestDan.d.ts +6 -0
  44. package/dist/umd/src/plugins/stats/index.d.ts +1 -0
  45. package/dist/umd/src/plugins/stats/index.test.d.ts +1 -0
  46. package/package.json +4 -2
  47. package/rslib.config.ts +2 -1
  48. package/src/index.ts +1 -7
  49. package/src/plugins/bili/README.md +87 -0
  50. package/src/plugins/{bili-dedupe/index.ts → bili/dedupe.ts} +13 -3
  51. package/src/plugins/bili/history-danmaku-fast-forward.ts +86 -0
  52. package/src/plugins/bili/index.test.ts +129 -0
  53. package/src/plugins/bili/index.ts +2 -0
  54. package/src/plugins/index.ts +2 -3
  55. package/src/plugins/stats/README.md +44 -0
  56. package/src/plugins/stats/getLatestDan.ts +13 -0
  57. package/src/plugins/{bili-dedupe → stats}/index.test.ts +10 -11
  58. package/src/plugins/stats/index.ts +1 -0
  59. package/dist/browser/157.min.js +0 -14
  60. package/dist/browser/42.min.js +0 -45
  61. package/dist/browser/plugins/bili-dedupe.min.js +0 -1
  62. package/dist/browser/src/plugins/bili-dedupe/index.d.ts +0 -5
  63. package/dist/node/157.js +0 -14
  64. package/dist/node/42.js +0 -45
  65. package/dist/node/plugins/bili-dedupe.js +0 -1
  66. package/dist/node/src/plugins/bili-dedupe/index.d.ts +0 -5
  67. package/dist/umd/plugins/bili-dedupe.umd.min.js +0 -79
  68. package/dist/umd/src/plugins/bili-dedupe/index.d.ts +0 -5
  69. /package/dist/browser/{index.min.js.LICENSE.txt → 17.min.js.LICENSE.txt} +0 -0
  70. /package/dist/browser/src/plugins/{bili-dedupe → bili}/index.test.d.ts +0 -0
  71. /package/dist/{node/src/plugins/bili-dedupe → browser/src/plugins/stats}/index.test.d.ts +0 -0
  72. /package/dist/{umd/src/plugins/bili-dedupe → node/src/plugins/bili}/index.test.d.ts +0 -0
@@ -1,14 +0,0 @@
1
- import { platform_PlatformVideoSource } from "./42.min.js";
2
- function bili_dedupe(that) {
3
- that.dans.forEach((d)=>{
4
- if (d.platform !== platform_PlatformVideoSource.Bilibili) throw new Error('bili-dedupe: 仅支持B站(主站)的弹幕');
5
- if (!d.extra.bili?.dmid) throw new Error('bili-dedupe: 弹幕缺少bili extra dmid字段');
6
- });
7
- const map = new Map();
8
- that.dans.forEach((d)=>map.set(d.extra.bili.dmid, d));
9
- that.dans = [
10
- ...map.values()
11
- ];
12
- return that;
13
- }
14
- export { bili_dedupe };
@@ -1,45 +0,0 @@
1
- import { __webpack_require__ } from "./rslib-runtime.min.js";
2
- var platform_namespaceObject = {};
3
- __webpack_require__.r(platform_namespaceObject);
4
- __webpack_require__.d(platform_namespaceObject, {
5
- PlatformDanmakuOnlySource: ()=>platform_PlatformDanmakuOnlySource,
6
- PlatformDanmakuOnlySources: ()=>PlatformDanmakuOnlySources,
7
- PlatformDanmakuSources: ()=>PlatformDanmakuSources,
8
- PlatformInfoSource: ()=>platform_PlatformInfoSource,
9
- PlatformInfoSources: ()=>PlatformInfoSources,
10
- PlatformSources: ()=>PlatformSources,
11
- PlatformVideoSource: ()=>platform_PlatformVideoSource,
12
- PlatformVideoSources: ()=>PlatformVideoSources
13
- });
14
- var platform_PlatformInfoSource = /*#__PURE__*/ function(PlatformInfoSource) {
15
- PlatformInfoSource["Bangumi"] = "bgm";
16
- PlatformInfoSource["TMDB"] = "tmdb";
17
- return PlatformInfoSource;
18
- }({});
19
- const PlatformInfoSources = Object.values(platform_PlatformInfoSource);
20
- var platform_PlatformVideoSource = /*#__PURE__*/ function(PlatformVideoSource) {
21
- PlatformVideoSource["Acfun"] = "acfun";
22
- PlatformVideoSource["Baha"] = "baha";
23
- PlatformVideoSource["Bilibili"] = "bili";
24
- PlatformVideoSource["BilibiliGlobal"] = "bglobal";
25
- PlatformVideoSource["Iqiyi"] = "iqiyi";
26
- PlatformVideoSource["Tencent"] = "tencent";
27
- PlatformVideoSource["Youku"] = "youku";
28
- return PlatformVideoSource;
29
- }({});
30
- const PlatformVideoSources = Object.values(platform_PlatformVideoSource);
31
- var platform_PlatformDanmakuOnlySource = /*#__PURE__*/ function(PlatformDanmakuOnlySource) {
32
- PlatformDanmakuOnlySource["DanDanPlay"] = "ddplay";
33
- PlatformDanmakuOnlySource["TuCao"] = "tucao";
34
- return PlatformDanmakuOnlySource;
35
- }({});
36
- const PlatformDanmakuOnlySources = Object.values(platform_PlatformDanmakuOnlySource);
37
- const PlatformDanmakuSources = [
38
- ...PlatformVideoSources,
39
- ...PlatformDanmakuOnlySources
40
- ];
41
- const PlatformSources = [
42
- ...PlatformInfoSources,
43
- ...PlatformDanmakuSources
44
- ];
45
- export { PlatformDanmakuSources, platform_PlatformDanmakuOnlySource, platform_PlatformVideoSource, platform_namespaceObject as platform };
@@ -1 +0,0 @@
1
- export { bili_dedupe as default } from "../157.min.js";
@@ -1,5 +0,0 @@
1
- import type { UniPool } from '../..';
2
- /**
3
- * 用于过滤直接从B站api获取到的弹幕中去除dmid重复的弹幕
4
- */
5
- export default function bili_dedupe(that: UniPool): UniPool;
package/dist/node/157.js DELETED
@@ -1,14 +0,0 @@
1
- import { platform_PlatformVideoSource } from "./42.js";
2
- function bili_dedupe(that) {
3
- that.dans.forEach((d)=>{
4
- if (d.platform !== platform_PlatformVideoSource.Bilibili) throw new Error('bili-dedupe: 仅支持B站(主站)的弹幕');
5
- if (!d.extra.bili?.dmid) throw new Error('bili-dedupe: 弹幕缺少bili extra dmid字段');
6
- });
7
- const map = new Map();
8
- that.dans.forEach((d)=>map.set(d.extra.bili.dmid, d));
9
- that.dans = [
10
- ...map.values()
11
- ];
12
- return that;
13
- }
14
- export { bili_dedupe };
package/dist/node/42.js DELETED
@@ -1,45 +0,0 @@
1
- import { __webpack_require__ } from "./rslib-runtime.js";
2
- var platform_namespaceObject = {};
3
- __webpack_require__.r(platform_namespaceObject);
4
- __webpack_require__.d(platform_namespaceObject, {
5
- PlatformDanmakuOnlySource: ()=>platform_PlatformDanmakuOnlySource,
6
- PlatformDanmakuOnlySources: ()=>PlatformDanmakuOnlySources,
7
- PlatformDanmakuSources: ()=>PlatformDanmakuSources,
8
- PlatformInfoSource: ()=>platform_PlatformInfoSource,
9
- PlatformInfoSources: ()=>PlatformInfoSources,
10
- PlatformSources: ()=>PlatformSources,
11
- PlatformVideoSource: ()=>platform_PlatformVideoSource,
12
- PlatformVideoSources: ()=>PlatformVideoSources
13
- });
14
- var platform_PlatformInfoSource = /*#__PURE__*/ function(PlatformInfoSource) {
15
- PlatformInfoSource["Bangumi"] = "bgm";
16
- PlatformInfoSource["TMDB"] = "tmdb";
17
- return PlatformInfoSource;
18
- }({});
19
- const PlatformInfoSources = Object.values(platform_PlatformInfoSource);
20
- var platform_PlatformVideoSource = /*#__PURE__*/ function(PlatformVideoSource) {
21
- PlatformVideoSource["Acfun"] = "acfun";
22
- PlatformVideoSource["Baha"] = "baha";
23
- PlatformVideoSource["Bilibili"] = "bili";
24
- PlatformVideoSource["BilibiliGlobal"] = "bglobal";
25
- PlatformVideoSource["Iqiyi"] = "iqiyi";
26
- PlatformVideoSource["Tencent"] = "tencent";
27
- PlatformVideoSource["Youku"] = "youku";
28
- return PlatformVideoSource;
29
- }({});
30
- const PlatformVideoSources = Object.values(platform_PlatformVideoSource);
31
- var platform_PlatformDanmakuOnlySource = /*#__PURE__*/ function(PlatformDanmakuOnlySource) {
32
- PlatformDanmakuOnlySource["DanDanPlay"] = "ddplay";
33
- PlatformDanmakuOnlySource["TuCao"] = "tucao";
34
- return PlatformDanmakuOnlySource;
35
- }({});
36
- const PlatformDanmakuOnlySources = Object.values(platform_PlatformDanmakuOnlySource);
37
- const PlatformDanmakuSources = [
38
- ...PlatformVideoSources,
39
- ...PlatformDanmakuOnlySources
40
- ];
41
- const PlatformSources = [
42
- ...PlatformInfoSources,
43
- ...PlatformDanmakuSources
44
- ];
45
- export { PlatformDanmakuSources, platform_PlatformDanmakuOnlySource, platform_PlatformVideoSource, platform_namespaceObject as platform };
@@ -1 +0,0 @@
1
- export { bili_dedupe as default } from "../157.js";
@@ -1,5 +0,0 @@
1
- import type { UniPool } from '../..';
2
- /**
3
- * 用于过滤直接从B站api获取到的弹幕中去除dmid重复的弹幕
4
- */
5
- export default function bili_dedupe(that: UniPool): UniPool;
@@ -1,79 +0,0 @@
1
- (function(root, factory) {
2
- if ('object' == typeof exports && 'object' == typeof module) module.exports = factory();
3
- else if ('function' == typeof define && define.amd) define([], factory);
4
- else if ('object' == typeof exports) exports["@dan-uni/dan-any"] = factory();
5
- else root["@dan-uni/dan-any"] = factory();
6
- })(globalThis, ()=>(()=>{
7
- "use strict";
8
- var __webpack_require__ = {};
9
- (()=>{
10
- __webpack_require__.d = (exports1, definition)=>{
11
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
12
- enumerable: true,
13
- get: definition[key]
14
- });
15
- };
16
- })();
17
- (()=>{
18
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
19
- })();
20
- (()=>{
21
- __webpack_require__.r = (exports1)=>{
22
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
23
- value: 'Module'
24
- });
25
- Object.defineProperty(exports1, '__esModule', {
26
- value: true
27
- });
28
- };
29
- })();
30
- var __webpack_exports__ = {};
31
- __webpack_require__.r(__webpack_exports__);
32
- __webpack_require__.d(__webpack_exports__, {
33
- default: ()=>bili_dedupe
34
- });
35
- var platform_PlatformInfoSource = /*#__PURE__*/ function(PlatformInfoSource) {
36
- PlatformInfoSource["Bangumi"] = "bgm";
37
- PlatformInfoSource["TMDB"] = "tmdb";
38
- return PlatformInfoSource;
39
- }({});
40
- const PlatformInfoSources = Object.values(platform_PlatformInfoSource);
41
- var platform_PlatformVideoSource = /*#__PURE__*/ function(PlatformVideoSource) {
42
- PlatformVideoSource["Acfun"] = "acfun";
43
- PlatformVideoSource["Baha"] = "baha";
44
- PlatformVideoSource["Bilibili"] = "bili";
45
- PlatformVideoSource["BilibiliGlobal"] = "bglobal";
46
- PlatformVideoSource["Iqiyi"] = "iqiyi";
47
- PlatformVideoSource["Tencent"] = "tencent";
48
- PlatformVideoSource["Youku"] = "youku";
49
- return PlatformVideoSource;
50
- }({});
51
- const PlatformVideoSources = Object.values(platform_PlatformVideoSource);
52
- var platform_PlatformDanmakuOnlySource = /*#__PURE__*/ function(PlatformDanmakuOnlySource) {
53
- PlatformDanmakuOnlySource["DanDanPlay"] = "ddplay";
54
- PlatformDanmakuOnlySource["TuCao"] = "tucao";
55
- return PlatformDanmakuOnlySource;
56
- }({});
57
- const PlatformDanmakuOnlySources = Object.values(platform_PlatformDanmakuOnlySource);
58
- const PlatformDanmakuSources = [
59
- ...PlatformVideoSources,
60
- ...PlatformDanmakuOnlySources
61
- ];
62
- [
63
- ...PlatformInfoSources,
64
- ...PlatformDanmakuSources
65
- ];
66
- function bili_dedupe(that) {
67
- that.dans.forEach((d)=>{
68
- if (d.platform !== platform_PlatformVideoSource.Bilibili) throw new Error('bili-dedupe: 仅支持B站(主站)的弹幕');
69
- if (!d.extra.bili?.dmid) throw new Error('bili-dedupe: 弹幕缺少bili extra dmid字段');
70
- });
71
- const map = new Map();
72
- that.dans.forEach((d)=>map.set(d.extra.bili.dmid, d));
73
- that.dans = [
74
- ...map.values()
75
- ];
76
- return that;
77
- }
78
- return __webpack_exports__;
79
- })());
@@ -1,5 +0,0 @@
1
- import type { UniPool } from '../..';
2
- /**
3
- * 用于过滤直接从B站api获取到的弹幕中去除dmid重复的弹幕
4
- */
5
- export default function bili_dedupe(that: UniPool): UniPool;