@wix/blog 1.0.701 → 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.
@@ -5357,7 +5357,7 @@ var Fh = ({ postWithAuthor: e6, hasError: t2, monitoringClient: n2, isPostInPrev
5357
5357
  let { t: a2 } = sp(), o2 = th(), s2 = (0, import_react.useMemo)(() => 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 = (0, import_react.useMemo)(() => Dm(e6.post), [e6]), x2 = ql(), S2 = (0, import_react.useMemo)(() => e6.post?.richContent && e6.paywall ? Gl(e6.post.richContent, e6.paywall, x2) : void 0, [e6, x2]);
5358
5358
  return (0, import_react.useMemo)(() => {
5359
5359
  let n3 = Ph(!e6.post && u2 && e6.demoPost ? { ...e6, post: e6.demoPost } : e6, s2, o2, u2, l2, { category: v2, tag: y2 });
5360
- 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 };
5360
+ 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 };
5361
5361
  }, [e6, t2, b2, S2, s2, o2, l2, f2, d2, p2, m2, h2, g2, _2, u2, r2, i2, v2, y2]);
5362
5362
  };
5363
5363
  var Ih = (e6) => ({ post: e6, hasError: false });
@@ -5366,7 +5366,7 @@ var Rh = (e6) => {
5366
5366
  throw e6;
5367
5367
  };
5368
5368
  var zh = { ...Nh(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false, toggleLike: async () => {
5369
- }, liveLikes: void 0, postUrl: void 0, clockValue: 0, relatedPostsSource: { currentPostId: void 0, categoryIds: void 0, relatedPostIds: void 0 }, isLoadingPost: true, hasError: false, isEmpty: false };
5369
+ }, 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 };
5370
5370
  var Bh = { ...zh, isLoadingPost: false, hasError: true, isEmpty: true };
5371
5371
  var Vh = (0, import_react.createContext)(void 0);
5372
5372
  function Hh() {