@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.
- package/build/cjs/context-blog-feed.js +1 -1
- package/build/cjs/context-blog-feed.js.map +1 -1
- package/build/cjs/context-category-item.js +1 -1
- package/build/cjs/context-category-item.js.map +1 -1
- package/build/cjs/context-post-by-id.js +106 -104
- package/build/cjs/context-post-by-id.js.map +1 -1
- package/build/cjs/context-post-by-slug.js +17 -15
- package/build/cjs/context-post-by-slug.js.map +1 -1
- package/build/cjs/context-post-list-item.js +1 -1
- package/build/cjs/context-post-list-item.js.map +1 -1
- package/build/cjs/context-post.js +1 -1
- package/build/cjs/context-post.js.map +1 -1
- package/build/cjs/context-related-posts.js +1 -1
- package/build/cjs/context-related-posts.js.map +1 -1
- package/build/cjs/context-tag-item.js +1 -1
- package/build/cjs/context-tag-item.js.map +1 -1
- package/build/es/context-blog-feed.mjs +1 -1
- package/build/es/context-blog-feed.mjs.map +1 -1
- package/build/es/context-category-item.mjs +1 -1
- package/build/es/context-category-item.mjs.map +1 -1
- package/build/es/context-post-by-id.mjs +106 -104
- package/build/es/context-post-by-id.mjs.map +1 -1
- package/build/es/context-post-by-slug.mjs +17 -15
- package/build/es/context-post-by-slug.mjs.map +1 -1
- package/build/es/context-post-list-item.mjs +1 -1
- package/build/es/context-post-list-item.mjs.map +1 -1
- package/build/es/context-post.mjs +1 -1
- package/build/es/context-post.mjs.map +1 -1
- package/build/es/context-related-posts.mjs +1 -1
- package/build/es/context-related-posts.mjs.map +1 -1
- package/build/es/context-tag-item.mjs +1 -1
- package/build/es/context-tag-item.mjs.map +1 -1
- package/{_sdk-exports → context-runtime}/context-post-by-id/runtime.js +2 -2
- package/{_sdk-exports → context-runtime}/context-post-by-slug/runtime.js +2 -2
- package/package.json +5 -5
- /package/{_sdk-exports → context-runtime}/context-blog-feed/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-blog-feed/runtime.js +0 -0
- /package/{_sdk-exports → context-runtime}/context-category-item/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-category-item/runtime.js +0 -0
- /package/{_sdk-exports → context-runtime}/context-post/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-post/runtime.js +0 -0
- /package/{_sdk-exports → context-runtime}/context-post-by-id/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-post-by-slug/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-post-list-item/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-post-list-item/runtime.js +0 -0
- /package/{_sdk-exports → context-runtime}/context-related-posts/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-related-posts/runtime.js +0 -0
- /package/{_sdk-exports → context-runtime}/context-tag-item/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-tag-item/runtime.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
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,
|
|
4938
|
-
|
|
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
|
|
4942
|
-
var
|
|
4943
|
-
var
|
|
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(
|
|
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
|
|
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,
|
|
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:
|
|
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
|
|
4964
|
+
var Wf = Mn(`12ed204c-821c-4ce9-802b-8bfe8e98d7e2`);
|
|
4963
4965
|
export {
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
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
|