@wix/blog 1.0.715 → 1.0.716
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/_sdk-exports/context-blog-feed/runtime.d.ts +7 -0
- package/_sdk-exports/context-blog-feed/runtime.js +2 -2
- package/_sdk-exports/context-post-by-id/runtime.js +4 -4
- package/_sdk-exports/context-post-by-slug/runtime.js +2 -2
- package/_sdk-exports/context-post-list-item/runtime.d.ts +8 -3
- package/_sdk-exports/context-post-list-item/runtime.js +4 -4
- package/_sdk-exports/context-related-posts/runtime.d.ts +7 -0
- package/_sdk-exports/context-related-posts/runtime.js +2 -2
- package/build/cjs/context-blog-feed.d.ts +7 -0
- package/build/cjs/context-blog-feed.js +4 -4
- package/build/cjs/context-blog-feed.js.map +1 -1
- package/build/cjs/context-post-by-id.js +916 -893
- package/build/cjs/context-post-by-id.js.map +1 -1
- package/build/cjs/context-post-by-slug.js +145 -122
- package/build/cjs/context-post-by-slug.js.map +1 -1
- package/build/cjs/context-post-list-item.d.ts +8 -3
- package/build/cjs/context-post-list-item.js +896 -873
- package/build/cjs/context-post-list-item.js.map +1 -1
- package/build/cjs/context-related-posts.d.ts +7 -0
- package/build/cjs/context-related-posts.js +4 -4
- package/build/cjs/context-related-posts.js.map +1 -1
- package/build/es/context-blog-feed.d.mts +7 -0
- package/build/es/context-blog-feed.mjs +4 -4
- package/build/es/context-blog-feed.mjs.map +1 -1
- package/build/es/context-post-by-id.mjs +916 -893
- package/build/es/context-post-by-id.mjs.map +1 -1
- package/build/es/context-post-by-slug.mjs +146 -123
- package/build/es/context-post-by-slug.mjs.map +1 -1
- package/build/es/context-post-list-item.d.mts +8 -3
- package/build/es/context-post-list-item.mjs +896 -873
- package/build/es/context-post-list-item.mjs.map +1 -1
- package/build/es/context-related-posts.d.mts +7 -0
- package/build/es/context-related-posts.mjs +4 -4
- package/build/es/context-related-posts.mjs.map +1 -1
- package/build/internal/cjs/context-blog-feed.d.ts +7 -0
- package/build/internal/cjs/context-post-list-item.d.ts +8 -3
- package/build/internal/cjs/context-related-posts.d.ts +7 -0
- package/build/internal/es/context-blog-feed.d.mts +7 -0
- package/build/internal/es/context-post-list-item.d.mts +8 -3
- package/build/internal/es/context-related-posts.d.mts +7 -0
- package/package.json +2 -2
|
@@ -403,6 +403,13 @@ interface PostListItem {
|
|
|
403
403
|
* a sample number instead.
|
|
404
404
|
*/
|
|
405
405
|
initialCommentCount: number | undefined;
|
|
406
|
+
/**
|
|
407
|
+
* Number of likes on the post, as loaded with the post.
|
|
408
|
+
*
|
|
409
|
+
* `undefined` when the count wasn't loaded with the post. In the editor, but not in Preview,
|
|
410
|
+
* a sample number instead.
|
|
411
|
+
*/
|
|
412
|
+
initialLikeCount: number | undefined;
|
|
406
413
|
/** Name of the post's author, as rich text. Empty when the author isn't found. */
|
|
407
414
|
authorName: RichText;
|
|
408
415
|
/**
|
|
@@ -4545,10 +4545,10 @@ var zu = (e6) => {
|
|
|
4545
4545
|
var Bu = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4546
4546
|
var Vu = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4547
4547
|
var Q = (e6) => ({ text: e6, html: `<p>${Vu(e6)}</p>`, linkList: [] });
|
|
4548
|
-
var $ = { minutesToRead: 5, views: 120, comments: 4 };
|
|
4548
|
+
var $ = { minutesToRead: 5, views: 120, comments: 4, likes: 12 };
|
|
4549
4549
|
var Hu = (e6) => {
|
|
4550
4550
|
let { metrics: t2 } = e6;
|
|
4551
|
-
return { views: typeof t2?.views == `number` ? t2.views : void 0, comments: typeof t2?.comments == `number` ? t2.comments : void 0 };
|
|
4551
|
+
return { views: typeof t2?.views == `number` ? t2.views : void 0, comments: typeof t2?.comments == `number` ? t2.comments : void 0, likes: typeof t2?.likes == `number` ? t2.likes : void 0 };
|
|
4552
4552
|
};
|
|
4553
4553
|
var Uu = (e6, t2, n2, r2) => Q(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4554
4554
|
var Wu = (e6, t2, n2, r2) => {
|
|
@@ -4557,7 +4557,7 @@ var Wu = (e6, t2, n2, r2) => {
|
|
|
4557
4557
|
};
|
|
4558
4558
|
var Gu = (e6, t2, n2, r2, i2 = {}, a2 = {}, o2 = false, s2 = {}, c2 = Date.now()) => {
|
|
4559
4559
|
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 = Hu(e6);
|
|
4560
|
-
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage: Fu(e6), itemCoverMedia: Pu(e6, s2[l2 ?? ``] ?? []), itemLink: pr(e6, r2), itemPublishedDate: Q(Tu(e6.firstPublishedDate ?? new Date(c2), n2, c2)), publishedDateValue: zu(e6.firstPublishedDate), clockValue: c2, minutesToReadValue: Bu(e6.minutesToRead), initialViewCount: f2.views ?? (o2 ? $.views : void 0), initialCommentCount: f2.comments ?? (o2 ? $.comments : void 0), authorName: Q(d2?.profile?.nickname ?? ``), authorImage: gr(d2, t2.canvas.authorPhotoAlt()), timeToRead: Q(typeof e6.minutesToRead == `number` && e6.minutesToRead > 0 ? t2.timeToRead(e6.minutesToRead) : ``), viewCount: Uu(f2.views, $.views, o2, t2.viewCount), commentCount: Uu(f2.comments, $.comments, o2, t2.commentCount), itemCategoryLabel: Wu(e6, a2, o2, t2), recentPostItem: { title: e6.title ?? ``, slug: e6.slug ?? `` }, commentingEnabled: e6.commentingEnabled };
|
|
4560
|
+
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage: Fu(e6), itemCoverMedia: Pu(e6, s2[l2 ?? ``] ?? []), itemLink: pr(e6, r2), itemPublishedDate: Q(Tu(e6.firstPublishedDate ?? new Date(c2), n2, c2)), publishedDateValue: zu(e6.firstPublishedDate), clockValue: c2, minutesToReadValue: Bu(e6.minutesToRead), initialViewCount: f2.views ?? (o2 ? $.views : void 0), initialCommentCount: f2.comments ?? (o2 ? $.comments : void 0), initialLikeCount: f2.likes ?? (o2 ? $.likes : void 0), authorName: Q(d2?.profile?.nickname ?? ``), authorImage: gr(d2, t2.canvas.authorPhotoAlt()), timeToRead: Q(typeof e6.minutesToRead == `number` && e6.minutesToRead > 0 ? t2.timeToRead(e6.minutesToRead) : ``), viewCount: Uu(f2.views, $.views, o2, t2.viewCount), commentCount: Uu(f2.comments, $.comments, o2, t2.commentCount), itemCategoryLabel: Wu(e6, a2, o2, t2), recentPostItem: { title: e6.title ?? ``, slug: e6.slug ?? `` }, commentingEnabled: e6.commentingEnabled };
|
|
4561
4561
|
};
|
|
4562
4562
|
var Ku = (e6, t2, n2 = []) => {
|
|
4563
4563
|
let r2 = Pu(e6, n2);
|
|
@@ -4586,7 +4586,7 @@ var Zu = (e6) => Array.from({ length: qu }, (t2, n2) => {
|
|
|
4586
4586
|
});
|
|
4587
4587
|
var Qu = (e6, t2, n2, r2 = Date.now()) => Array.from({ length: qu }, (i2, a2) => {
|
|
4588
4588
|
let o2 = e6.canvas.postTitle(), s2 = Yu(a2, e6.canvas.coverAlt());
|
|
4589
|
-
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink: Lu(n2), itemPublishedDate: Q(Tu(new Date(r2), t2, r2)), publishedDateValue: Iu, clockValue: r2, minutesToReadValue: $.minutesToRead, initialViewCount: $.views, initialCommentCount: $.comments, authorName: Q(e6.canvas.authorName()), authorImage: Xu(a2, e6.canvas.authorPhotoAlt()), timeToRead: Q(e6.timeToRead($.minutesToRead)), viewCount: Q(e6.viewCount($.views)), commentCount: Q(e6.commentCount($.comments)), itemCategoryLabel: Q(e6.canvas.category()), recentPostItem: { title: o2, slug: `` }, commentingEnabled: void 0 };
|
|
4589
|
+
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink: Lu(n2), itemPublishedDate: Q(Tu(new Date(r2), t2, r2)), publishedDateValue: Iu, clockValue: r2, minutesToReadValue: $.minutesToRead, initialViewCount: $.views, initialCommentCount: $.comments, initialLikeCount: $.likes, authorName: Q(e6.canvas.authorName()), authorImage: Xu(a2, e6.canvas.authorPhotoAlt()), timeToRead: Q(e6.timeToRead($.minutesToRead)), viewCount: Q(e6.viewCount($.views)), commentCount: Q(e6.commentCount($.comments)), itemCategoryLabel: Q(e6.canvas.category()), recentPostItem: { title: o2, slug: `` }, commentingEnabled: void 0 };
|
|
4590
4590
|
});
|
|
4591
4591
|
var $u = n(void 0);
|
|
4592
4592
|
function ed() {
|