@waline/client 2.0.1 → 2.0.4

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 (52) 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.cjs.js.map +1 -1
  7. package/dist/pageview.esm.js +1 -1
  8. package/dist/pageview.esm.js.map +1 -1
  9. package/dist/pageview.js +1 -1
  10. package/dist/pageview.js.map +1 -1
  11. package/dist/shim.d.ts +29 -4
  12. package/dist/shim.esm.d.ts +29 -4
  13. package/dist/shim.esm.js +1 -1
  14. package/dist/shim.esm.js.map +1 -1
  15. package/dist/shim.js +1 -1
  16. package/dist/shim.js.map +1 -1
  17. package/dist/waline.cjs.d.ts +29 -4
  18. package/dist/waline.cjs.js +1 -1
  19. package/dist/waline.cjs.js.map +1 -1
  20. package/dist/waline.css +1 -1
  21. package/dist/waline.css.map +1 -1
  22. package/dist/waline.d.ts +29 -4
  23. package/dist/waline.esm.d.ts +29 -4
  24. package/dist/waline.esm.js +1 -1
  25. package/dist/waline.esm.js.map +1 -1
  26. package/dist/waline.js +1 -1
  27. package/dist/waline.js.map +1 -1
  28. package/package.json +15 -8
  29. package/src/comment.ts +1 -1
  30. package/src/compact/convert.ts +2 -2
  31. package/src/components/CommentBox.vue +52 -55
  32. package/src/components/CommentCard.vue +10 -5
  33. package/src/components/Waline.vue +6 -32
  34. package/src/composables/index.ts +1 -1
  35. package/src/composables/inputs.ts +9 -21
  36. package/src/composables/timeAgo.ts +61 -0
  37. package/src/composables/userInfo.ts +14 -21
  38. package/src/config/default.ts +2 -2
  39. package/src/init.ts +1 -1
  40. package/src/pageview.ts +1 -1
  41. package/src/styles/layout.scss +1 -1
  42. package/src/styles/panel.scss +0 -2
  43. package/src/utils/config.ts +17 -30
  44. package/src/utils/date.ts +17 -0
  45. package/src/utils/emoji.ts +11 -9
  46. package/src/utils/{data.ts → image.ts} +0 -0
  47. package/src/utils/index.ts +2 -3
  48. package/src/utils/markdown.ts +1 -1
  49. package/src/widgets/recentComments.ts +35 -5
  50. package/src/composables/store.ts +0 -38
  51. package/src/utils/timeAgo.ts +0 -75
  52. package/src/utils/userInfo.ts +0 -26
@@ -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 };