@wix/blog 1.0.714 → 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 +3 -3
- package/_sdk-exports/context-post-by-id/runtime.js +4 -4
- package/_sdk-exports/context-post-by-slug/runtime.js +3 -3
- 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 +3 -3
- package/build/cjs/context-blog-feed.d.ts +7 -0
- package/build/cjs/context-blog-feed.js +5 -6
- package/build/cjs/context-blog-feed.js.map +1 -1
- package/build/cjs/context-post-by-id.js +916 -894
- package/build/cjs/context-post-by-id.js.map +1 -1
- package/build/cjs/context-post-by-slug.js +146 -124
- 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 +5 -6
- 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 +5 -6
- package/build/es/context-blog-feed.mjs.map +1 -1
- package/build/es/context-post-by-id.mjs +916 -894
- package/build/es/context-post-by-id.mjs.map +1 -1
- package/build/es/context-post-by-slug.mjs +146 -124
- 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 +5 -6
- 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
|
/**
|
|
@@ -1084,8 +1084,7 @@ var sr = (e6) => {
|
|
|
1084
1084
|
let t2;
|
|
1085
1085
|
try {
|
|
1086
1086
|
let n3 = e6.appSectionRelativeUrl(ir, ar);
|
|
1087
|
-
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, or) && !n3?.endsWith(`/post-page`)) return;
|
|
1088
|
-
t2 = e6.appSectionRelativeUrl(ir, ar, true);
|
|
1087
|
+
if (t2 = e6.appSectionRelativeUrl(ir, ar, true), n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, or) && !n3?.endsWith(`/post-page`) && t2 === n3) return;
|
|
1089
1088
|
} catch {
|
|
1090
1089
|
return;
|
|
1091
1090
|
}
|
|
@@ -4546,10 +4545,10 @@ var zu = (e6) => {
|
|
|
4546
4545
|
var Bu = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4547
4546
|
var Vu = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4548
4547
|
var Q = (e6) => ({ text: e6, html: `<p>${Vu(e6)}</p>`, linkList: [] });
|
|
4549
|
-
var $ = { minutesToRead: 5, views: 120, comments: 4 };
|
|
4548
|
+
var $ = { minutesToRead: 5, views: 120, comments: 4, likes: 12 };
|
|
4550
4549
|
var Hu = (e6) => {
|
|
4551
4550
|
let { metrics: t2 } = e6;
|
|
4552
|
-
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 };
|
|
4553
4552
|
};
|
|
4554
4553
|
var Uu = (e6, t2, n2, r2) => Q(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4555
4554
|
var Wu = (e6, t2, n2, r2) => {
|
|
@@ -4558,7 +4557,7 @@ var Wu = (e6, t2, n2, r2) => {
|
|
|
4558
4557
|
};
|
|
4559
4558
|
var Gu = (e6, t2, n2, r2, i2 = {}, a2 = {}, o2 = false, s2 = {}, c2 = Date.now()) => {
|
|
4560
4559
|
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 = Hu(e6);
|
|
4561
|
-
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 };
|
|
4562
4561
|
};
|
|
4563
4562
|
var Ku = (e6, t2, n2 = []) => {
|
|
4564
4563
|
let r2 = Pu(e6, n2);
|
|
@@ -4587,7 +4586,7 @@ var Zu = (e6) => Array.from({ length: qu }, (t2, n2) => {
|
|
|
4587
4586
|
});
|
|
4588
4587
|
var Qu = (e6, t2, n2, r2 = Date.now()) => Array.from({ length: qu }, (i2, a2) => {
|
|
4589
4588
|
let o2 = e6.canvas.postTitle(), s2 = Yu(a2, e6.canvas.coverAlt());
|
|
4590
|
-
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 };
|
|
4591
4590
|
});
|
|
4592
4591
|
var $u = n(void 0);
|
|
4593
4592
|
function ed() {
|