@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
@@ -30,14 +30,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // context-post-by-slug.ts
31
31
  var context_post_by_slug_exports = {};
32
32
  __export(context_post_by_slug_exports, {
33
- PostBySlugProvider: () => Vf,
34
- default: () => Vf,
35
- injectAccessTokenGetter: () => Hf,
36
- usePostBySlugContext: () => Lf
33
+ PostBySlugProvider: () => Uf,
34
+ default: () => Uf,
35
+ injectAccessTokenGetter: () => Wf,
36
+ usePostBySlugContext: () => zf
37
37
  });
38
38
  module.exports = __toCommonJS(context_post_by_slug_exports);
39
39
 
40
- // _sdk-exports/context-post-by-slug/runtime.js
40
+ // context-runtime/context-post-by-slug/runtime.js
41
41
  var import_post_context_provider = __toESM(require("@wix/blog/post-context-provider"));
42
42
  var import_react = require("react");
43
43
  var import_services_manager_react = require("@wix/services-manager-react");
@@ -4974,32 +4974,34 @@ var Pf = (e6) => {
4974
4974
  };
4975
4975
  var Ff = { ...kf(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false, toggleLike: async () => {
4976
4976
  }, 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 };
4977
- var If = { ...Ff, isLoadingPost: false, hasError: true, isEmpty: true };
4978
- function Lf() {
4977
+ var If = { ...Ff, richContent: Tf(``) };
4978
+ var Lf = (e6) => e6 ? If : Ff;
4979
+ var Rf = { ...Ff, isLoadingPost: false, hasError: true, isEmpty: true };
4980
+ function zf() {
4979
4981
  return (0, import_post_context_provider.usePostContext)();
4980
4982
  }
4981
- var Rf = ({ source: e6, children: t2 }) => (0, import_jsx_runtime.jsx)(Td.Provider, { value: void 0, children: (0, import_jsx_runtime.jsx)(wd.Provider, { value: e6, children: t2 }) });
4982
- var zf = 2500;
4983
- var Bf = ({ children: t2, postLoadPromise: n2, relatedSourcePromise: r2, monitoringClient: i2, slug: a2, language: o2, isPostInPreview: c2 }) => {
4983
+ var Bf = ({ source: e6, children: t2 }) => (0, import_jsx_runtime.jsx)(Td.Provider, { value: void 0, children: (0, import_jsx_runtime.jsx)(wd.Provider, { value: e6, children: t2 }) });
4984
+ var Vf = 2500;
4985
+ var Hf = ({ children: t2, postLoadPromise: n2, relatedSourcePromise: r2, monitoringClient: i2, slug: a2, language: o2, isPostInPreview: c2 }) => {
4984
4986
  let { post: l2, hasError: u2 } = Vn(n2), d2 = va(l2, (0, import_react.useCallback)(() => $u(a2, false, o2), [a2, o2]));
4985
4987
  bo(d2, c2, i2), Po(a2 && d2.post?.slug === a2 && !c2 ? d2.post : void 0, o2, pd);
4986
4988
  let { _id: f2 } = d2.post ?? {};
4987
4989
  fa(c2 ? void 0 : f2 ?? void 0);
4988
4990
  let p2 = jf({ postWithAuthor: d2, hasError: u2, monitoringClient: i2, isPostInPreview: c2, postPageBase: Ma(a2) });
4989
- return Ba(Ra.postBySlugProvider, u2 ? `error` : d2.post ? `data` : `empty`), (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: p2, children: (0, import_jsx_runtime.jsx)(Rf, { source: r2, children: t2 }) });
4991
+ return Ba(Ra.postBySlugProvider, u2 ? `error` : d2.post ? `data` : `empty`), (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: p2, children: (0, import_jsx_runtime.jsx)(Bf, { source: r2, children: t2 }) });
4990
4992
  };
4991
- function Vf({ children: t2 }) {
4993
+ function Uf({ children: t2 }) {
4992
4994
  let n2 = Fa(), i2 = La(), a2 = Co(), o2 = pa(), { draftPostId: s2, instance: c2 } = n2 ?? {}, l2 = Zn(), d2 = Io(), f2 = (0, import_react.useMemo)(() => Wa(zn), []), { i18n: p2, locale: m2 } = du(yu), _2 = ha(() => {
4993
4995
  let e6 = s2 && c2 ? hd(Cd({ draftPostId: s2, instance: c2 }, o2)) : Ql({ key: i2 ? `blog-builder:post:${i2}|${a2 ?? ``}` : null, warmupData: d2, fetchData: () => {
4994
4996
  let e7 = ud(i2, o2, a2).then((e8) => l2 ? sd(e8, a2) : e8);
4995
- return hd(qa(f2, `post-read`, { feature: Ua.post }, o2 ? Gu(e7, zf, `post`) : e7));
4997
+ return hd(qa(f2, `post-read`, { feature: Ua.post }, o2 ? Gu(e7, Vf, `post`) : e7));
4996
4998
  } }), t3 = e6.then(({ post: e7 }) => fd(e7));
4997
4999
  return t3.catch(() => {
4998
5000
  }), { slug: i2, language: a2, isPostInPreview: !!s2, postLoadPromise: Un(e6, Mf, o2 ? Pf : Nf), relatedSourcePromise: t3 };
4999
5001
  }, [s2, c2, a2, i2, o2, l2, d2, f2]);
5000
- return (0, import_jsx_runtime.jsx)(Ul, { i18n: p2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: Ff, children: (0, import_jsx_runtime.jsx)(Rf, { source: _2.relatedSourcePromise, children: t2 }) }), children: [(0, import_jsx_runtime.jsx)(uu, { i18n: p2, locale: m2 }), (0, import_jsx_runtime.jsx)(md, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: If, children: (0, import_jsx_runtime.jsx)(Rf, { source: _2.relatedSourcePromise, children: t2 }) }), feature: Ua.post, monitoringClient: f2, rethrow: o2, children: (0, import_jsx_runtime.jsx)(Bf, { postLoadPromise: _2.postLoadPromise, relatedSourcePromise: _2.relatedSourcePromise, monitoringClient: f2, slug: _2.isPostInPreview ? void 0 : _2.slug, language: _2.language, isPostInPreview: _2.isPostInPreview, children: t2 }) })] }) });
5002
+ return (0, import_jsx_runtime.jsx)(Ul, { i18n: p2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: Lf(l2), children: (0, import_jsx_runtime.jsx)(Bf, { source: _2.relatedSourcePromise, children: t2 }) }), children: [(0, import_jsx_runtime.jsx)(uu, { i18n: p2, locale: m2 }), (0, import_jsx_runtime.jsx)(md, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: Rf, children: (0, import_jsx_runtime.jsx)(Bf, { source: _2.relatedSourcePromise, children: t2 }) }), feature: Ua.post, monitoringClient: f2, rethrow: o2, children: (0, import_jsx_runtime.jsx)(Hf, { postLoadPromise: _2.postLoadPromise, relatedSourcePromise: _2.relatedSourcePromise, monitoringClient: f2, slug: _2.isPostInPreview ? void 0 : _2.slug, language: _2.language, isPostInPreview: _2.isPostInPreview, children: t2 }) })] }) });
5001
5003
  }
5002
- var Hf = Mn(`12ed204c-821c-4ce9-802b-8bfe8e98d7e2`);
5004
+ var Wf = Mn(`12ed204c-821c-4ce9-802b-8bfe8e98d7e2`);
5003
5005
  // Annotate the CommonJS export names for ESM import in node:
5004
5006
  0 && (module.exports = {
5005
5007
  PostBySlugProvider,