@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
|
@@ -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: () =>
|
|
34
|
-
default: () =>
|
|
35
|
-
injectAccessTokenGetter: () =>
|
|
36
|
-
usePostBySlugContext: () =>
|
|
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
|
-
//
|
|
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,
|
|
4978
|
-
|
|
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
|
|
4982
|
-
var
|
|
4983
|
-
var
|
|
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)(
|
|
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
|
|
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,
|
|
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:
|
|
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
|
|
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,
|