@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
|
@@ -322,6 +322,13 @@ interface PostListItem {
|
|
|
322
322
|
* a sample number instead.
|
|
323
323
|
*/
|
|
324
324
|
initialCommentCount: number | undefined;
|
|
325
|
+
/**
|
|
326
|
+
* Number of likes on the post, as loaded with the post.
|
|
327
|
+
*
|
|
328
|
+
* `undefined` when the count wasn't loaded with the post. In the editor, but not in Preview,
|
|
329
|
+
* a sample number instead.
|
|
330
|
+
*/
|
|
331
|
+
initialLikeCount: number | undefined;
|
|
325
332
|
/** Name of the post's author, as rich text. Empty when the author isn't found. */
|
|
326
333
|
authorName: RichText;
|
|
327
334
|
/**
|
|
@@ -1070,8 +1070,7 @@ var er = (e6) => {
|
|
|
1070
1070
|
let t2;
|
|
1071
1071
|
try {
|
|
1072
1072
|
let n3 = e6.appSectionRelativeUrl(Xn, Qn);
|
|
1073
|
-
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, $n) && !n3?.endsWith(`/post-page`)) return;
|
|
1074
|
-
t2 = e6.appSectionRelativeUrl(Xn, Qn, true);
|
|
1073
|
+
if (t2 = e6.appSectionRelativeUrl(Xn, Qn, true), n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, $n) && !n3?.endsWith(`/post-page`) && t2 === n3) return;
|
|
1075
1074
|
} catch {
|
|
1076
1075
|
return;
|
|
1077
1076
|
}
|
|
@@ -4360,10 +4359,10 @@ var Xl = (e6) => {
|
|
|
4360
4359
|
var Zl = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4361
4360
|
var Ql = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4362
4361
|
var Q = (e6) => ({ text: e6, html: `<p>${Ql(e6)}</p>`, linkList: [] });
|
|
4363
|
-
var $ = { minutesToRead: 5, views: 120, comments: 4 };
|
|
4362
|
+
var $ = { minutesToRead: 5, views: 120, comments: 4, likes: 12 };
|
|
4364
4363
|
var $l = (e6) => {
|
|
4365
4364
|
let { metrics: t2 } = e6;
|
|
4366
|
-
return { views: typeof t2?.views == `number` ? t2.views : void 0, comments: typeof t2?.comments == `number` ? t2.comments : void 0 };
|
|
4365
|
+
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 };
|
|
4367
4366
|
};
|
|
4368
4367
|
var eu = (e6, t2, n2, r2) => Q(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4369
4368
|
var tu = (e6, t2, n2, r2) => {
|
|
@@ -4372,7 +4371,7 @@ var tu = (e6, t2, n2, r2) => {
|
|
|
4372
4371
|
};
|
|
4373
4372
|
var nu = (e6, t2, n2, r2, i2 = {}, a2 = {}, o2 = false, s2 = {}, c2 = Date.now()) => {
|
|
4374
4373
|
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 = $l(e6);
|
|
4375
|
-
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage: Kl(e6), itemCoverMedia: Gl(e6, s2[l2 ?? ``] ?? []), itemLink: or(e6, r2), itemPublishedDate: Q(Tl(e6.firstPublishedDate ?? new Date(c2), n2, c2)), publishedDateValue: Xl(e6.firstPublishedDate), clockValue: c2, minutesToReadValue: Zl(e6.minutesToRead), initialViewCount: f2.views ?? (o2 ? $.views : void 0), initialCommentCount: f2.comments ?? (o2 ? $.comments : void 0), authorName: Q(d2?.profile?.nickname ?? ``), authorImage: Ol(d2, t2.canvas.authorPhotoAlt()), timeToRead: Q(typeof e6.minutesToRead == `number` && e6.minutesToRead > 0 ? t2.timeToRead(e6.minutesToRead) : ``), viewCount: eu(f2.views, $.views, o2, t2.viewCount), commentCount: eu(f2.comments, $.comments, o2, t2.commentCount), itemCategoryLabel: tu(e6, a2, o2, t2), recentPostItem: { title: e6.title ?? ``, slug: e6.slug ?? `` }, commentingEnabled: e6.commentingEnabled };
|
|
4374
|
+
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage: Kl(e6), itemCoverMedia: Gl(e6, s2[l2 ?? ``] ?? []), itemLink: or(e6, r2), itemPublishedDate: Q(Tl(e6.firstPublishedDate ?? new Date(c2), n2, c2)), publishedDateValue: Xl(e6.firstPublishedDate), clockValue: c2, minutesToReadValue: Zl(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: Ol(d2, t2.canvas.authorPhotoAlt()), timeToRead: Q(typeof e6.minutesToRead == `number` && e6.minutesToRead > 0 ? t2.timeToRead(e6.minutesToRead) : ``), viewCount: eu(f2.views, $.views, o2, t2.viewCount), commentCount: eu(f2.comments, $.comments, o2, t2.commentCount), itemCategoryLabel: tu(e6, a2, o2, t2), recentPostItem: { title: e6.title ?? ``, slug: e6.slug ?? `` }, commentingEnabled: e6.commentingEnabled };
|
|
4376
4375
|
};
|
|
4377
4376
|
var ru = 3;
|
|
4378
4377
|
var iu = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
|
|
@@ -4386,7 +4385,7 @@ var ou = (e6, t2) => {
|
|
|
4386
4385
|
};
|
|
4387
4386
|
var su = (e6, t2, n2, r2 = Date.now()) => Array.from({ length: ru }, (i2, a2) => {
|
|
4388
4387
|
let o2 = e6.canvas.postTitle(), s2 = au(a2, e6.canvas.coverAlt());
|
|
4389
|
-
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink: Jl(n2), itemPublishedDate: Q(Tl(new Date(r2), t2, r2)), publishedDateValue: ql, clockValue: r2, minutesToReadValue: $.minutesToRead, initialViewCount: $.views, initialCommentCount: $.comments, authorName: Q(e6.canvas.authorName()), authorImage: ou(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 };
|
|
4388
|
+
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink: Jl(n2), itemPublishedDate: Q(Tl(new Date(r2), t2, r2)), publishedDateValue: ql, clockValue: r2, minutesToReadValue: $.minutesToRead, initialViewCount: $.views, initialCommentCount: $.comments, initialLikeCount: $.likes, authorName: Q(e6.canvas.authorName()), authorImage: ou(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 };
|
|
4390
4389
|
});
|
|
4391
4390
|
var cu = (0, import_react.createContext)(void 0);
|
|
4392
4391
|
function lu() {
|