@waline/client 2.0.0 → 2.0.3

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 (50) hide show
  1. package/dist/component.js +1 -1
  2. package/dist/component.js.map +1 -1
  3. package/dist/legacy.js +1 -1
  4. package/dist/legacy.js.map +1 -1
  5. package/dist/pageview.cjs.js +1 -1
  6. package/dist/pageview.d.ts +1 -1
  7. package/dist/pageview.esm.js +1 -1
  8. package/dist/pageview.js +1 -1
  9. package/dist/shim.d.ts +30 -5
  10. package/dist/shim.esm.d.ts +30 -5
  11. package/dist/shim.esm.js +1 -1
  12. package/dist/shim.esm.js.map +1 -1
  13. package/dist/shim.js +1 -1
  14. package/dist/shim.js.map +1 -1
  15. package/dist/waline.cjs.d.ts +30 -5
  16. package/dist/waline.cjs.js +1 -1
  17. package/dist/waline.cjs.js.map +1 -1
  18. package/dist/waline.css +1 -1
  19. package/dist/waline.css.map +1 -1
  20. package/dist/waline.d.ts +30 -5
  21. package/dist/waline.esm.d.ts +30 -5
  22. package/dist/waline.esm.js +1 -1
  23. package/dist/waline.esm.js.map +1 -1
  24. package/dist/waline.js +1 -1
  25. package/dist/waline.js.map +1 -1
  26. package/package.json +15 -8
  27. package/src/comment.ts +1 -1
  28. package/src/compact/convert.ts +1 -1
  29. package/src/components/CommentBox.vue +15 -22
  30. package/src/components/CommentCard.vue +6 -3
  31. package/src/components/Waline.vue +6 -28
  32. package/src/composables/index.ts +1 -1
  33. package/src/composables/inputs.ts +9 -21
  34. package/src/composables/timeAgo.ts +61 -0
  35. package/src/composables/userInfo.ts +14 -21
  36. package/src/config/default.ts +2 -2
  37. package/src/entrys/legacy.ts +2 -2
  38. package/src/init.ts +1 -1
  39. package/src/styles/layout.scss +1 -1
  40. package/src/styles/panel.scss +0 -2
  41. package/src/typings/options.ts +1 -1
  42. package/src/utils/date.ts +17 -0
  43. package/src/utils/emoji.ts +8 -6
  44. package/src/utils/{data.ts → image.ts} +0 -0
  45. package/src/utils/index.ts +2 -3
  46. package/src/utils/markdown.ts +1 -1
  47. package/src/widgets/recentComments.ts +35 -5
  48. package/src/composables/store.ts +0 -38
  49. package/src/utils/timeAgo.ts +0 -75
  50. package/src/utils/userInfo.ts +0 -26
@@ -319,7 +319,7 @@ interface WalineInitOptions extends Omit<WalineProps, 'path'> {
319
319
  */
320
320
  path?: string;
321
321
  }
322
- declare type WalineAbort = (reson: any) => void;
322
+ declare type WalineAbort = (reason?: any) => void;
323
323
 
324
324
  declare const getMeta: (meta: WalineMeta[]) => WalineMeta[];
325
325
  declare const defaultLang = "zh-CN";
@@ -421,15 +421,40 @@ declare const pageviewCount: ({ serverURL, path, selector, update, }: WalinePage
421
421
 
422
422
  declare const version: string;
423
423
 
424
- interface RecentCommentsOptions {
424
+ interface WalineRecentCommentsOptions {
425
+ /**
426
+ * Waline 服务端地址
427
+ *
428
+ * Waline serverURL
429
+ */
425
430
  serverURL: string;
431
+ /**
432
+ * 获取最新评论的数量
433
+ *
434
+ * fetch number of latest comments
435
+ */
426
436
  count: number;
437
+ /**
438
+ * 需要挂载的元素
439
+ *
440
+ * Element to be mounted
441
+ */
427
442
  el?: string | HTMLElement;
428
443
  }
429
- interface RecentCommentsResult {
444
+ interface WalineRecentCommentsResult {
445
+ /**
446
+ * 评论数据
447
+ *
448
+ * Comment Data
449
+ */
430
450
  comments: WalineComment[];
451
+ /**
452
+ * 取消挂载挂件
453
+ *
454
+ * Umount widget
455
+ */
431
456
  destroy: () => void;
432
457
  }
433
- declare const RecentComments: ({ el, serverURL, count, }: RecentCommentsOptions) => Promise<RecentCommentsResult>;
458
+ declare const RecentComments: ({ el, serverURL, count, }: WalineRecentCommentsOptions) => Promise<WalineRecentCommentsResult>;
434
459
 
435
- export { Locales, RecentComments, RecentCommentsOptions, RecentCommentsResult, WalineAbort, WalineComment, WalineCommentCountOptions, WalineCommentData, WalineEmojiInfo, WalineEmojiMaps, WalineHighlighter, WalineImageUploader, WalineInitOptions, WalineInstance, WalineLocale, WalineMeta, WalinePageviewCountOptions, WalineProps, WalineTexRenderer, commentCount, defaultLang, defaultTexRenderer, defaultUploadImage, getMeta, init, locales, pageviewCount, version };
460
+ export { Locales, RecentComments, WalineAbort, WalineComment, WalineCommentCountOptions, WalineCommentData, WalineEmojiInfo, WalineEmojiMaps, WalineHighlighter, WalineImageUploader, WalineInitOptions, WalineInstance, WalineLocale, WalineMeta, WalinePageviewCountOptions, WalineProps, WalineRecentCommentsOptions, WalineRecentCommentsResult, WalineTexRenderer, commentCount, defaultLang, defaultTexRenderer, defaultUploadImage, getMeta, init, locales, pageviewCount, version };