@occultus/music-api 0.22.0-beta.3 → 0.22.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@occultus/music-api",
3
- "version": "0.22.0-beta.3",
3
+ "version": "0.22.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://codeberg.org/TeamOccultus/StarTenonAPI"
@@ -1,3 +1,9 @@
1
+ /**
2
+ * 音乐唱片服务端绑定配置
3
+ */
1
4
  export type MusicDiscBindingConfig = {
5
+ /**
6
+ * 绑定组件名称
7
+ */
2
8
  componentName: string;
3
9
  };
@@ -11,8 +11,16 @@ import {
11
11
  import { Color } from "@occultus/format-api";
12
12
  import { MusicDiscComponentParams } from "./ComponentParams";
13
13
 
14
+ /**
15
+ * 实现数据驱动组件绑定到服务端音乐唱片系统的类
16
+ */
14
17
  export class MusicDiscServerBindings {
15
18
  private static instance: MusicDiscServerBindings;
19
+ /**
20
+ * 获取音乐唱片组件的音轨名称
21
+ * @param itemStack
22
+ * @returns
23
+ */
16
24
  static getTrackName(itemStack: ItemStack) {
17
25
  const config = MusicDiscServerBindings.getInstance().config;
18
26
  const params = itemStack.getComponent(config.componentName)