@wix/blog 1.0.703 → 1.0.705
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/_sdk-exports/context-blog-feed/runtime.d.ts +2 -2
- package/_sdk-exports/context-post/runtime.d.ts +21 -7
- package/_sdk-exports/context-post-by-slug/runtime.js +3 -3
- package/_sdk-exports/{context-post-item → context-post-list-item}/runtime.d.ts +5 -5
- package/_sdk-exports/{context-post-item → context-post-list-item}/runtime.js +2 -2
- package/_sdk-exports/context-related-posts/runtime.js +2 -2
- package/build/cjs/context-blog-feed.d.ts +2 -2
- package/build/cjs/context-post-by-slug.js +18 -18
- package/build/cjs/context-post-by-slug.js.map +1 -1
- package/build/{internal/es/context-post-item.d.mts → cjs/context-post-list-item.d.ts} +5 -5
- package/build/cjs/{context-post-item.js → context-post-list-item.js} +9 -9
- package/build/cjs/context-post-list-item.js.map +1 -0
- package/build/cjs/context-post.d.ts +21 -7
- package/build/cjs/context-related-posts.js +10 -3
- package/build/cjs/context-related-posts.js.map +1 -1
- package/build/es/context-blog-feed.d.mts +2 -2
- package/build/es/context-post-by-slug.mjs +18 -18
- package/build/es/context-post-by-slug.mjs.map +1 -1
- package/build/es/{context-post-item.d.mts → context-post-list-item.d.mts} +5 -5
- package/build/es/{context-post-item.mjs → context-post-list-item.mjs} +4 -4
- package/build/es/context-post-list-item.mjs.map +1 -0
- package/build/es/context-post.d.mts +21 -7
- package/build/es/context-related-posts.mjs +10 -3
- package/build/es/context-related-posts.mjs.map +1 -1
- package/build/internal/cjs/context-blog-feed.d.ts +2 -2
- package/build/{cjs/context-post-item.d.ts → internal/cjs/context-post-list-item.d.ts} +5 -5
- package/build/internal/cjs/context-post.d.ts +21 -7
- package/build/internal/es/context-blog-feed.d.mts +2 -2
- package/build/internal/{cjs/context-post-item.d.ts → es/context-post-list-item.d.mts} +5 -5
- package/build/internal/es/context-post.d.mts +21 -7
- package/context/post-list-item/package.json +3 -0
- package/package.json +14 -14
- package/post-list-item-context-provider/package.json +3 -0
- package/build/cjs/context-post-item.js.map +0 -1
- package/build/es/context-post-item.mjs.map +0 -1
- package/context/post-item/package.json +0 -3
- package/post-item-context-provider/package.json +0 -3
|
@@ -569,7 +569,7 @@ interface PostListContextType {
|
|
|
569
569
|
*
|
|
570
570
|
* @example Add a button that loads more posts
|
|
571
571
|
* ```tsx
|
|
572
|
-
* import { useBlogFeedContext } from '@wix/blog/blog-feed
|
|
572
|
+
* import { useBlogFeedContext } from '@wix/blog/context/blog-feed';
|
|
573
573
|
*
|
|
574
574
|
* function LoadMoreButton() {
|
|
575
575
|
* const { hasMorePosts, isLoadingPosts, loadMorePosts } = useBlogFeedContext();
|
|
@@ -596,7 +596,7 @@ interface PostListContextType {
|
|
|
596
596
|
*
|
|
597
597
|
* @example Show the category's or tag's name above the posts
|
|
598
598
|
* ```tsx
|
|
599
|
-
* import { useBlogFeedContext } from '@wix/blog/blog-feed
|
|
599
|
+
* import { useBlogFeedContext } from '@wix/blog/context/blog-feed';
|
|
600
600
|
*
|
|
601
601
|
* function FeedHeading() {
|
|
602
602
|
* const { filteredView } = useBlogFeedContext();
|
|
@@ -2340,11 +2340,18 @@ var Yc = (e6, t2) => {
|
|
|
2340
2340
|
} catch {
|
|
2341
2341
|
return;
|
|
2342
2342
|
}
|
|
2343
|
-
let r2 = t2?.split(`/`).filter(Boolean) ?? [];
|
|
2343
|
+
let r2 = t2?.split(`/`).filter(Boolean) ?? [], i2 = n2[n2.length - 1];
|
|
2344
2344
|
if (r2.length > 0) {
|
|
2345
|
-
for (let e7 = 0; e7 + r2.length <= n2.length; e7++) if (r2.every((t3, r3) => n2[e7 + r3] === t3))
|
|
2345
|
+
for (let e7 = 0; e7 + r2.length <= n2.length; e7++) if (r2.every((t3, r3) => n2[e7 + r3] === t3)) {
|
|
2346
|
+
i2 = n2[e7 + r2.length];
|
|
2347
|
+
break;
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
if (i2 !== void 0) try {
|
|
2351
|
+
return decodeURIComponent(i2);
|
|
2352
|
+
} catch {
|
|
2353
|
+
return i2;
|
|
2346
2354
|
}
|
|
2347
|
-
return n2[n2.length - 1];
|
|
2348
2355
|
};
|
|
2349
2356
|
var Xc = () => {
|
|
2350
2357
|
let e6;
|
|
@@ -5379,22 +5386,15 @@ var Zh = { ...Gh(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false,
|
|
|
5379
5386
|
var Qh = { ...Zh, isLoadingPost: false, hasError: true, isEmpty: true };
|
|
5380
5387
|
var $h = ({ source: e6, children: t2 }) => h(Km.Provider, { value: void 0, children: h(Gm.Provider, { value: e6, children: t2 }) });
|
|
5381
5388
|
var eg = 2500;
|
|
5382
|
-
var tg = (
|
|
5383
|
-
try {
|
|
5384
|
-
return decodeURIComponent(e6);
|
|
5385
|
-
} catch {
|
|
5386
|
-
return e6;
|
|
5387
|
-
}
|
|
5388
|
-
};
|
|
5389
|
-
var ng = ({ children: t2, postLoadPromise: n2, relatedSourcePromise: r2, monitoringClient: i2, slug: a2, language: o2, isPostInPreview: c2 }) => {
|
|
5389
|
+
var tg = ({ children: t2, postLoadPromise: n2, relatedSourcePromise: r2, monitoringClient: i2, slug: a2, language: o2, isPostInPreview: c2 }) => {
|
|
5390
5390
|
let { post: l2, hasError: u2 } = Jn(n2), d2 = Ac(l2, s(() => bm(a2, false, o2), [a2, o2]));
|
|
5391
|
-
Ml(d2, c2, i2), Zl(a2 && d2.post?.slug ===
|
|
5391
|
+
Ml(d2, c2, i2), Zl(a2 && d2.post?.slug === a2 && !c2 ? d2.post : void 0, o2, Pm);
|
|
5392
5392
|
let { _id: f2 } = d2.post ?? {};
|
|
5393
5393
|
Cc(c2 ? void 0 : f2 ?? void 0);
|
|
5394
5394
|
let p2 = qh({ postWithAuthor: d2, hasError: u2, monitoringClient: i2, isPostInPreview: c2, postPageBase: Gc(a2) });
|
|
5395
5395
|
return $c(Zc.postBySlugProvider, u2 ? `error` : d2.post ? `data` : `empty`), h(e, { value: p2, children: h($h, { source: r2, children: t2 }) });
|
|
5396
5396
|
};
|
|
5397
|
-
function
|
|
5397
|
+
function ng({ children: t2 }) {
|
|
5398
5398
|
let n2 = Jc(), i2 = Xc(), a2 = Fl(), o2 = Tc(), { draftPostId: s2, instance: c2 } = n2 ?? {}, l2 = Bl(), d2 = $l(), f2 = u(() => rl(Kn), []), { i18n: p2, locale: m2 } = Mp(Bp), _2 = Dc(() => {
|
|
5399
5399
|
let e6 = s2 && c2 ? Im(Wm({ draftPostId: s2, instance: c2 }, o2)) : yp({ key: i2 ? `blog-builder:post:${i2}|${a2 ?? ``}` : null, warmupData: d2, fetchData: () => {
|
|
5400
5400
|
let e7 = jm(i2, o2, a2).then((e8) => l2 ? Om(e8, a2) : e8);
|
|
@@ -5403,13 +5403,13 @@ function rg({ children: t2 }) {
|
|
|
5403
5403
|
return t3.catch(() => {
|
|
5404
5404
|
}), { slug: i2, language: a2, isPostInPreview: !!s2, postLoadPromise: Xn(e6, Jh, o2 ? Xh : Yh), relatedSourcePromise: t3 };
|
|
5405
5405
|
}, [s2, c2, a2, i2, o2, l2, d2, f2]);
|
|
5406
|
-
return h(up, { i18n: p2, children: g(r, { fallback: h(e, { value: Zh, children: h($h, { source: _2.relatedSourcePromise, children: t2 }) }), children: [h(jp, { i18n: p2, locale: m2 }), h(Fm, { fallback: h(e, { value: Qh, children: h($h, { source: _2.relatedSourcePromise, children: t2 }) }), feature: nl.post, monitoringClient: f2, rethrow: o2, children: h(
|
|
5406
|
+
return h(up, { i18n: p2, children: g(r, { fallback: h(e, { value: Zh, children: h($h, { source: _2.relatedSourcePromise, children: t2 }) }), children: [h(jp, { i18n: p2, locale: m2 }), h(Fm, { fallback: h(e, { value: Qh, children: h($h, { source: _2.relatedSourcePromise, children: t2 }) }), feature: nl.post, monitoringClient: f2, rethrow: o2, children: h(tg, { postLoadPromise: _2.postLoadPromise, relatedSourcePromise: _2.relatedSourcePromise, monitoringClient: f2, slug: _2.isPostInPreview ? void 0 : _2.slug, language: _2.language, isPostInPreview: _2.isPostInPreview, children: t2 }) })] }) });
|
|
5407
5407
|
}
|
|
5408
|
-
var
|
|
5408
|
+
var rg = zn(`12ed204c-821c-4ce9-802b-8bfe8e98d7e2`);
|
|
5409
5409
|
export {
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5410
|
+
ng as PostBySlugProvider,
|
|
5411
|
+
ng as default,
|
|
5412
|
+
rg as injectAccessTokenGetter,
|
|
5413
5413
|
t as usePostBySlugContext
|
|
5414
5414
|
};
|
|
5415
5415
|
//# sourceMappingURL=context-post-by-slug.mjs.map
|