@wix/blog 1.0.700 → 1.0.702

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.
@@ -3342,6 +3342,11 @@ type PostContextType = PostDerivedData & {
3342
3342
  * the like state changes, so you can use it as an effect dependency.
3343
3343
  */
3344
3344
  relatedPostsSource: RelatedPostsSource;
3345
+ /**
3346
+ * Whether site visitors can comment on the post, as set in the Blog dashboard. `undefined`
3347
+ * while the post loads, when there's no post, and when the post doesn't say.
3348
+ */
3349
+ commentingEnabled: boolean | undefined;
3345
3350
  /**
3346
3351
  * Whether the post is still loading. While it's `true`, the other properties are empty.
3347
3352
  * Use it to show a placeholder instead of empty content.
@@ -5327,7 +5327,7 @@ var Fh = ({ postWithAuthor: e6, hasError: t2, monitoringClient: n2, isPostInPrev
5327
5327
  let { t: a2 } = sp(), o2 = th(), s2 = c(() => rh(a2, o2), [a2, o2]), l2 = Um(e6.fetchedAt), u2 = Rl(), { isLiked: d2, likeCount: f2, isLikeCountLoaded: p2, viewCount: m2, commentCount: h2, toggleLike: g2, liveLikes: _2 } = eh(e6.post?._id ?? void 0, e6.metrics?.likes ?? 0, r2, n2), v2 = Vm(Mc), y2 = Vm(`tag`), b2 = c(() => Dm(e6.post), [e6]), x2 = ql(), S2 = c(() => e6.post?.richContent && e6.paywall ? Gl(e6.post.richContent, e6.paywall, x2) : void 0, [e6, x2]);
5328
5328
  return c(() => {
5329
5329
  let n3 = Ph(!e6.post && u2 && e6.demoPost ? { ...e6, post: e6.demoPost } : e6, s2, o2, u2, l2, { category: v2, tag: y2 });
5330
- return { ...n3, ...S2 && { richContent: S2 }, relatedPostsSource: b2, viewCountValue: m2 ?? n3.viewCountValue, commentCountValue: h2 ?? n3.commentCountValue, postUrl: r2 || !e6.post ? void 0 : Vc(e6.post, i2)?.href, ...e6.post && (e6.metrics?.likes !== void 0 || p2) ? { likeCount: $(s2.likeCount(f2)) } : {}, isLiked: d2, likeCountValue: f2, isLikeCountLoaded: p2, toggleLike: g2, liveLikes: _2, clockValue: l2, isLoadingPost: false, hasError: t2, isEmpty: !e6.post && !u2 };
5330
+ return { ...n3, ...S2 && { richContent: S2 }, relatedPostsSource: b2, commentingEnabled: e6.post?.commentingEnabled ?? void 0, viewCountValue: m2 ?? n3.viewCountValue, commentCountValue: h2 ?? n3.commentCountValue, postUrl: r2 || !e6.post ? void 0 : Vc(e6.post, i2)?.href, ...e6.post && (e6.metrics?.likes !== void 0 || p2) ? { likeCount: $(s2.likeCount(f2)) } : {}, isLiked: d2, likeCountValue: f2, isLikeCountLoaded: p2, toggleLike: g2, liveLikes: _2, clockValue: l2, isLoadingPost: false, hasError: t2, isEmpty: !e6.post && !u2 };
5331
5331
  }, [e6, t2, b2, S2, s2, o2, l2, f2, d2, p2, m2, h2, g2, _2, u2, r2, i2, v2, y2]);
5332
5332
  };
5333
5333
  var Ih = (e6) => ({ post: e6, hasError: false });
@@ -5336,7 +5336,7 @@ var Rh = (e6) => {
5336
5336
  throw e6;
5337
5337
  };
5338
5338
  var zh = { ...Nh(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false, toggleLike: async () => {
5339
- }, liveLikes: void 0, postUrl: void 0, clockValue: 0, relatedPostsSource: { currentPostId: void 0, categoryIds: void 0, relatedPostIds: void 0 }, isLoadingPost: true, hasError: false, isEmpty: false };
5339
+ }, liveLikes: void 0, postUrl: void 0, clockValue: 0, relatedPostsSource: { currentPostId: void 0, categoryIds: void 0, relatedPostIds: void 0 }, commentingEnabled: void 0, isLoadingPost: true, hasError: false, isEmpty: false };
5340
5340
  var Bh = { ...zh, isLoadingPost: false, hasError: true, isEmpty: true };
5341
5341
  var Vh = n(void 0);
5342
5342
  function Hh() {