@wix/blog 1.0.716 → 1.0.718

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.
Files changed (49) hide show
  1. package/build/cjs/context-blog-feed.js +1 -1
  2. package/build/cjs/context-blog-feed.js.map +1 -1
  3. package/build/cjs/context-category-item.js +1 -1
  4. package/build/cjs/context-category-item.js.map +1 -1
  5. package/build/cjs/context-post-by-id.js +106 -104
  6. package/build/cjs/context-post-by-id.js.map +1 -1
  7. package/build/cjs/context-post-by-slug.js +17 -15
  8. package/build/cjs/context-post-by-slug.js.map +1 -1
  9. package/build/cjs/context-post-list-item.js +1 -1
  10. package/build/cjs/context-post-list-item.js.map +1 -1
  11. package/build/cjs/context-post.js +1 -1
  12. package/build/cjs/context-post.js.map +1 -1
  13. package/build/cjs/context-related-posts.js +1 -1
  14. package/build/cjs/context-related-posts.js.map +1 -1
  15. package/build/cjs/context-tag-item.js +1 -1
  16. package/build/cjs/context-tag-item.js.map +1 -1
  17. package/build/es/context-blog-feed.mjs +1 -1
  18. package/build/es/context-blog-feed.mjs.map +1 -1
  19. package/build/es/context-category-item.mjs +1 -1
  20. package/build/es/context-category-item.mjs.map +1 -1
  21. package/build/es/context-post-by-id.mjs +106 -104
  22. package/build/es/context-post-by-id.mjs.map +1 -1
  23. package/build/es/context-post-by-slug.mjs +17 -15
  24. package/build/es/context-post-by-slug.mjs.map +1 -1
  25. package/build/es/context-post-list-item.mjs +1 -1
  26. package/build/es/context-post-list-item.mjs.map +1 -1
  27. package/build/es/context-post.mjs +1 -1
  28. package/build/es/context-post.mjs.map +1 -1
  29. package/build/es/context-related-posts.mjs +1 -1
  30. package/build/es/context-related-posts.mjs.map +1 -1
  31. package/build/es/context-tag-item.mjs +1 -1
  32. package/build/es/context-tag-item.mjs.map +1 -1
  33. package/{_sdk-exports → context-runtime}/context-post-by-id/runtime.js +2 -2
  34. package/{_sdk-exports → context-runtime}/context-post-by-slug/runtime.js +2 -2
  35. package/package.json +5 -5
  36. /package/{_sdk-exports → context-runtime}/context-blog-feed/runtime.d.ts +0 -0
  37. /package/{_sdk-exports → context-runtime}/context-blog-feed/runtime.js +0 -0
  38. /package/{_sdk-exports → context-runtime}/context-category-item/runtime.d.ts +0 -0
  39. /package/{_sdk-exports → context-runtime}/context-category-item/runtime.js +0 -0
  40. /package/{_sdk-exports → context-runtime}/context-post/runtime.d.ts +0 -0
  41. /package/{_sdk-exports → context-runtime}/context-post/runtime.js +0 -0
  42. /package/{_sdk-exports → context-runtime}/context-post-by-id/runtime.d.ts +0 -0
  43. /package/{_sdk-exports → context-runtime}/context-post-by-slug/runtime.d.ts +0 -0
  44. /package/{_sdk-exports → context-runtime}/context-post-list-item/runtime.d.ts +0 -0
  45. /package/{_sdk-exports → context-runtime}/context-post-list-item/runtime.js +0 -0
  46. /package/{_sdk-exports → context-runtime}/context-related-posts/runtime.d.ts +0 -0
  47. /package/{_sdk-exports → context-runtime}/context-related-posts/runtime.js +0 -0
  48. /package/{_sdk-exports → context-runtime}/context-tag-item/runtime.d.ts +0 -0
  49. /package/{_sdk-exports → context-runtime}/context-tag-item/runtime.js +0 -0
@@ -1,4 +1,4 @@
1
- // _sdk-exports/context-post-by-slug/runtime.js
1
+ // context-runtime/context-post-by-slug/runtime.js
2
2
  import e, { usePostContext as t } from "@wix/blog/post-context-provider";
3
3
  import { Component as n, Suspense as r, createContext as i, createElement as a, startTransition as o, useCallback as s, useContext as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
4
4
  import { useGetService as p, useService as m } from "@wix/services-manager-react";
@@ -4934,36 +4934,38 @@ var Pf = (e6) => {
4934
4934
  };
4935
4935
  var Ff = { ...kf(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false, toggleLike: async () => {
4936
4936
  }, liveLikes: void 0, postUrl: void 0, itemLink: void 0, clockValue: 0, relatedPostsSource: { currentPostId: void 0, categoryIds: void 0, relatedPostIds: void 0 }, commentingEnabled: void 0, isLoadingPost: true, hasError: false, isEmpty: false };
4937
- var If = { ...Ff, isLoadingPost: false, hasError: true, isEmpty: true };
4938
- function Lf() {
4937
+ var If = { ...Ff, richContent: Tf(``) };
4938
+ var Lf = (e6) => e6 ? If : Ff;
4939
+ var Rf = { ...Ff, isLoadingPost: false, hasError: true, isEmpty: true };
4940
+ function zf() {
4939
4941
  return t();
4940
4942
  }
4941
- var Rf = ({ source: e6, children: t2 }) => h(Td.Provider, { value: void 0, children: h(wd.Provider, { value: e6, children: t2 }) });
4942
- var zf = 2500;
4943
- var Bf = ({ children: t2, postLoadPromise: n2, relatedSourcePromise: r2, monitoringClient: i2, slug: a2, language: o2, isPostInPreview: c2 }) => {
4943
+ var Bf = ({ source: e6, children: t2 }) => h(Td.Provider, { value: void 0, children: h(wd.Provider, { value: e6, children: t2 }) });
4944
+ var Vf = 2500;
4945
+ var Hf = ({ children: t2, postLoadPromise: n2, relatedSourcePromise: r2, monitoringClient: i2, slug: a2, language: o2, isPostInPreview: c2 }) => {
4944
4946
  let { post: l2, hasError: u2 } = Vn(n2), d2 = va(l2, s(() => $u(a2, false, o2), [a2, o2]));
4945
4947
  bo(d2, c2, i2), Po(a2 && d2.post?.slug === a2 && !c2 ? d2.post : void 0, o2, pd);
4946
4948
  let { _id: f2 } = d2.post ?? {};
4947
4949
  fa(c2 ? void 0 : f2 ?? void 0);
4948
4950
  let p2 = jf({ postWithAuthor: d2, hasError: u2, monitoringClient: i2, isPostInPreview: c2, postPageBase: Ma(a2) });
4949
- return Ba(Ra.postBySlugProvider, u2 ? `error` : d2.post ? `data` : `empty`), h(e, { value: p2, children: h(Rf, { source: r2, children: t2 }) });
4951
+ return Ba(Ra.postBySlugProvider, u2 ? `error` : d2.post ? `data` : `empty`), h(e, { value: p2, children: h(Bf, { source: r2, children: t2 }) });
4950
4952
  };
4951
- function Vf({ children: t2 }) {
4953
+ function Uf({ children: t2 }) {
4952
4954
  let n2 = Fa(), i2 = La(), a2 = Co(), o2 = pa(), { draftPostId: s2, instance: c2 } = n2 ?? {}, l2 = Zn(), d2 = Io(), f2 = u(() => Wa(zn), []), { i18n: p2, locale: m2 } = du(yu), _2 = ha(() => {
4953
4955
  let e6 = s2 && c2 ? hd(Cd({ draftPostId: s2, instance: c2 }, o2)) : Ql({ key: i2 ? `blog-builder:post:${i2}|${a2 ?? ``}` : null, warmupData: d2, fetchData: () => {
4954
4956
  let e7 = ud(i2, o2, a2).then((e8) => l2 ? sd(e8, a2) : e8);
4955
- return hd(qa(f2, `post-read`, { feature: Ua.post }, o2 ? Gu(e7, zf, `post`) : e7));
4957
+ return hd(qa(f2, `post-read`, { feature: Ua.post }, o2 ? Gu(e7, Vf, `post`) : e7));
4956
4958
  } }), t3 = e6.then(({ post: e7 }) => fd(e7));
4957
4959
  return t3.catch(() => {
4958
4960
  }), { slug: i2, language: a2, isPostInPreview: !!s2, postLoadPromise: Un(e6, Mf, o2 ? Pf : Nf), relatedSourcePromise: t3 };
4959
4961
  }, [s2, c2, a2, i2, o2, l2, d2, f2]);
4960
- return h(Ul, { i18n: p2, children: g(r, { fallback: h(e, { value: Ff, children: h(Rf, { source: _2.relatedSourcePromise, children: t2 }) }), children: [h(uu, { i18n: p2, locale: m2 }), h(md, { fallback: h(e, { value: If, children: h(Rf, { source: _2.relatedSourcePromise, children: t2 }) }), feature: Ua.post, monitoringClient: f2, rethrow: o2, children: h(Bf, { postLoadPromise: _2.postLoadPromise, relatedSourcePromise: _2.relatedSourcePromise, monitoringClient: f2, slug: _2.isPostInPreview ? void 0 : _2.slug, language: _2.language, isPostInPreview: _2.isPostInPreview, children: t2 }) })] }) });
4962
+ return h(Ul, { i18n: p2, children: g(r, { fallback: h(e, { value: Lf(l2), children: h(Bf, { source: _2.relatedSourcePromise, children: t2 }) }), children: [h(uu, { i18n: p2, locale: m2 }), h(md, { fallback: h(e, { value: Rf, children: h(Bf, { source: _2.relatedSourcePromise, children: t2 }) }), feature: Ua.post, monitoringClient: f2, rethrow: o2, children: h(Hf, { postLoadPromise: _2.postLoadPromise, relatedSourcePromise: _2.relatedSourcePromise, monitoringClient: f2, slug: _2.isPostInPreview ? void 0 : _2.slug, language: _2.language, isPostInPreview: _2.isPostInPreview, children: t2 }) })] }) });
4961
4963
  }
4962
- var Hf = Mn(`12ed204c-821c-4ce9-802b-8bfe8e98d7e2`);
4964
+ var Wf = Mn(`12ed204c-821c-4ce9-802b-8bfe8e98d7e2`);
4963
4965
  export {
4964
- Vf as PostBySlugProvider,
4965
- Vf as default,
4966
- Hf as injectAccessTokenGetter,
4967
- Lf as usePostBySlugContext
4966
+ Uf as PostBySlugProvider,
4967
+ Uf as default,
4968
+ Wf as injectAccessTokenGetter,
4969
+ zf as usePostBySlugContext
4968
4970
  };
4969
4971
  //# sourceMappingURL=context-post-by-slug.mjs.map