@waline/client 3.10.0 → 3.11.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/dist/waline.d.ts CHANGED
@@ -688,14 +688,40 @@ interface WalineUserListResult {
688
688
  }
689
689
  declare const UserList: ({ el, serverURL, count, locale, lang, mode, }: WalineUserListOptions) => Promise<WalineUserListResult>;
690
690
 
691
+ /**
692
+ * Options for the star rating widget.
693
+ */
691
694
  interface WalineStarOptions {
692
- el: string | HTMLElement;
695
+ /**
696
+ * Element or CSS selector on which to mount the widget.
697
+ */
698
+ el?: string | HTMLElement;
699
+ /**
700
+ * Path identifying the current page or article.
701
+ */
693
702
  path: string;
694
- lang: string;
703
+ /**
704
+ * Language code used by the widget, such as `en` or `zh-CN`.
705
+ */
706
+ lang?: string;
707
+ /**
708
+ * Waline server URL.
709
+ */
695
710
  serverURL: string;
711
+ /**
712
+ * Callback invoked after the user submits a rating.
713
+ *
714
+ * @param score The score selected by the user.
715
+ */
696
716
  onRate?: (score: number) => void;
697
717
  }
718
+ /**
719
+ * Star widget result.
720
+ */
698
721
  interface WalineStarResult {
722
+ /**
723
+ * Destroy star widget instance.
724
+ */
699
725
  destroy: () => void;
700
726
  }
701
727
  declare const Star: ({ el, path, lang, serverURL, onRate, }: WalineStarOptions) => WalineStarResult;