@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
|
@@ -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
|
/**
|
|
@@ -4329,10 +4329,10 @@ var Xl = (e6) => {
|
|
|
4329
4329
|
var Zl = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4330
4330
|
var Ql = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4331
4331
|
var Q = (e6) => ({ text: e6, html: `<p>${Ql(e6)}</p>`, linkList: [] });
|
|
4332
|
-
var $ = { minutesToRead: 5, views: 120, comments: 4 };
|
|
4332
|
+
var $ = { minutesToRead: 5, views: 120, comments: 4, likes: 12 };
|
|
4333
4333
|
var $l = (e6) => {
|
|
4334
4334
|
let { metrics: t2 } = e6;
|
|
4335
|
-
return { views: typeof t2?.views == `number` ? t2.views : void 0, comments: typeof t2?.comments == `number` ? t2.comments : void 0 };
|
|
4335
|
+
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 };
|
|
4336
4336
|
};
|
|
4337
4337
|
var eu = (e6, t2, n2, r2) => Q(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4338
4338
|
var tu = (e6, t2, n2, r2) => {
|
|
@@ -4341,7 +4341,7 @@ var tu = (e6, t2, n2, r2) => {
|
|
|
4341
4341
|
};
|
|
4342
4342
|
var nu = (e6, t2, n2, r2, i2 = {}, a2 = {}, o2 = false, s2 = {}, c2 = Date.now()) => {
|
|
4343
4343
|
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 = $l(e6);
|
|
4344
|
-
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 };
|
|
4344
|
+
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 };
|
|
4345
4345
|
};
|
|
4346
4346
|
var ru = 3;
|
|
4347
4347
|
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 }];
|
|
@@ -4355,7 +4355,7 @@ var ou = (e6, t2) => {
|
|
|
4355
4355
|
};
|
|
4356
4356
|
var su = (e6, t2, n2, r2 = Date.now()) => Array.from({ length: ru }, (i2, a2) => {
|
|
4357
4357
|
let o2 = e6.canvas.postTitle(), s2 = au(a2, e6.canvas.coverAlt());
|
|
4358
|
-
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 };
|
|
4358
|
+
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 };
|
|
4359
4359
|
});
|
|
4360
4360
|
var cu = n(void 0);
|
|
4361
4361
|
function lu() {
|