@hlw-zbzs/gift 1.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.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file B站平台礼物数据
3
+ */
4
+
5
+ import type { GiftItem } from '../types'
6
+ import biliGifts from '../data/bili.json'
7
+
8
+ export const gifts: GiftItem[] = biliGifts as GiftItem[]
9
+ export default gifts
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file 抖音平台礼物数据
3
+ */
4
+
5
+ import type { GiftItem } from '../types'
6
+ import dyGifts from '../data/dy.json'
7
+
8
+ export const gifts: GiftItem[] = dyGifts as GiftItem[]
9
+ export default gifts
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @file 各平台礼物数据集汇总
3
+ */
4
+
5
+ import type { PlatformInfo, PlatformType, GiftItem } from '../types'
6
+ import dyGifts from './dy'
7
+ import ksGifts from './ks'
8
+ import sphGifts from './sph'
9
+ import biliGifts from './bili'
10
+ import tkGifts from './tk'
11
+
12
+ export const PLATFORMS: PlatformInfo[] = [
13
+ { key: 'dy', name: '抖音' },
14
+ { key: 'ks', name: '快手' },
15
+ { key: 'sph', name: '视频号' },
16
+ { key: 'bili', name: '哔哩哔哩' },
17
+ { key: 'tk', name: 'TikTok' }
18
+ ]
19
+
20
+ export const PLATFORM_GIFTS: Record<PlatformType, GiftItem[]> = {
21
+ dy: dyGifts,
22
+ ks: ksGifts,
23
+ sph: sphGifts,
24
+ bili: biliGifts,
25
+ tk: tkGifts
26
+ }
27
+
28
+ export { dyGifts, ksGifts, sphGifts, biliGifts, tkGifts }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file 快手平台礼物数据
3
+ */
4
+
5
+ import type { GiftItem } from '../types'
6
+ import ksGifts from '../data/ks.json'
7
+
8
+ export const gifts: GiftItem[] = ksGifts as GiftItem[]
9
+ export default gifts
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file 微信视频号平台礼物数据
3
+ */
4
+
5
+ import type { GiftItem } from '../types'
6
+ import sphGifts from '../data/sph.json'
7
+
8
+ export const gifts: GiftItem[] = sphGifts as GiftItem[]
9
+ export default gifts
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file TikTok平台礼物数据
3
+ */
4
+
5
+ import type { GiftItem } from '../types'
6
+ import tkGifts from '../data/tk.json'
7
+
8
+ export const gifts: GiftItem[] = tkGifts as GiftItem[]
9
+ export default gifts
package/src/types.d.ts ADDED
@@ -0,0 +1 @@
1
+ export type * from '../types'