@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();
|
|
@@ -30,9 +30,9 @@ 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: () =>
|
|
33
|
+
PostBySlugProvider: () => ng,
|
|
34
|
+
default: () => ng,
|
|
35
|
+
injectAccessTokenGetter: () => rg,
|
|
36
36
|
usePostBySlugContext: () => import_post_context_provider.usePostContext
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(context_post_by_slug_exports);
|
|
@@ -2380,11 +2380,18 @@ var Yc = (e6, t2) => {
|
|
|
2380
2380
|
} catch {
|
|
2381
2381
|
return;
|
|
2382
2382
|
}
|
|
2383
|
-
let r2 = t2?.split(`/`).filter(Boolean) ?? [];
|
|
2383
|
+
let r2 = t2?.split(`/`).filter(Boolean) ?? [], i2 = n2[n2.length - 1];
|
|
2384
2384
|
if (r2.length > 0) {
|
|
2385
|
-
for (let e7 = 0; e7 + r2.length <= n2.length; e7++) if (r2.every((t3, r3) => n2[e7 + r3] === t3))
|
|
2385
|
+
for (let e7 = 0; e7 + r2.length <= n2.length; e7++) if (r2.every((t3, r3) => n2[e7 + r3] === t3)) {
|
|
2386
|
+
i2 = n2[e7 + r2.length];
|
|
2387
|
+
break;
|
|
2388
|
+
}
|
|
2389
|
+
}
|
|
2390
|
+
if (i2 !== void 0) try {
|
|
2391
|
+
return decodeURIComponent(i2);
|
|
2392
|
+
} catch {
|
|
2393
|
+
return i2;
|
|
2386
2394
|
}
|
|
2387
|
-
return n2[n2.length - 1];
|
|
2388
2395
|
};
|
|
2389
2396
|
var Xc = () => {
|
|
2390
2397
|
let e6;
|
|
@@ -5419,22 +5426,15 @@ var Zh = { ...Gh(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false,
|
|
|
5419
5426
|
var Qh = { ...Zh, isLoadingPost: false, hasError: true, isEmpty: true };
|
|
5420
5427
|
var $h = ({ source: e6, children: t2 }) => (0, import_jsx_runtime.jsx)(Km.Provider, { value: void 0, children: (0, import_jsx_runtime.jsx)(Gm.Provider, { value: e6, children: t2 }) });
|
|
5421
5428
|
var eg = 2500;
|
|
5422
|
-
var tg = (
|
|
5423
|
-
try {
|
|
5424
|
-
return decodeURIComponent(e6);
|
|
5425
|
-
} catch {
|
|
5426
|
-
return e6;
|
|
5427
|
-
}
|
|
5428
|
-
};
|
|
5429
|
-
var ng = ({ children: t2, postLoadPromise: n2, relatedSourcePromise: r2, monitoringClient: i2, slug: a2, language: o2, isPostInPreview: c2 }) => {
|
|
5429
|
+
var tg = ({ children: t2, postLoadPromise: n2, relatedSourcePromise: r2, monitoringClient: i2, slug: a2, language: o2, isPostInPreview: c2 }) => {
|
|
5430
5430
|
let { post: l2, hasError: u2 } = Jn(n2), d2 = Ac(l2, (0, import_react.useCallback)(() => bm(a2, false, o2), [a2, o2]));
|
|
5431
|
-
Ml(d2, c2, i2), Zl(a2 && d2.post?.slug ===
|
|
5431
|
+
Ml(d2, c2, i2), Zl(a2 && d2.post?.slug === a2 && !c2 ? d2.post : void 0, o2, Pm);
|
|
5432
5432
|
let { _id: f2 } = d2.post ?? {};
|
|
5433
5433
|
Cc(c2 ? void 0 : f2 ?? void 0);
|
|
5434
5434
|
let p2 = qh({ postWithAuthor: d2, hasError: u2, monitoringClient: i2, isPostInPreview: c2, postPageBase: Gc(a2) });
|
|
5435
5435
|
return $c(Zc.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)($h, { source: r2, children: t2 }) });
|
|
5436
5436
|
};
|
|
5437
|
-
function
|
|
5437
|
+
function ng({ children: t2 }) {
|
|
5438
5438
|
let n2 = Jc(), i2 = Xc(), a2 = Fl(), o2 = Tc(), { draftPostId: s2, instance: c2 } = n2 ?? {}, l2 = Bl(), d2 = $l(), f2 = (0, import_react.useMemo)(() => rl(Kn), []), { i18n: p2, locale: m2 } = Mp(Bp), _2 = Dc(() => {
|
|
5439
5439
|
let e6 = s2 && c2 ? Im(Wm({ draftPostId: s2, instance: c2 }, o2)) : yp({ key: i2 ? `blog-builder:post:${i2}|${a2 ?? ``}` : null, warmupData: d2, fetchData: () => {
|
|
5440
5440
|
let e7 = jm(i2, o2, a2).then((e8) => l2 ? Om(e8, a2) : e8);
|
|
@@ -5443,9 +5443,9 @@ function rg({ children: t2 }) {
|
|
|
5443
5443
|
return t3.catch(() => {
|
|
5444
5444
|
}), { slug: i2, language: a2, isPostInPreview: !!s2, postLoadPromise: Xn(e6, Jh, o2 ? Xh : Yh), relatedSourcePromise: t3 };
|
|
5445
5445
|
}, [s2, c2, a2, i2, o2, l2, d2, f2]);
|
|
5446
|
-
return (0, import_jsx_runtime.jsx)(up, { i18n: p2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: Zh, children: (0, import_jsx_runtime.jsx)($h, { source: _2.relatedSourcePromise, children: t2 }) }), children: [(0, import_jsx_runtime.jsx)(jp, { i18n: p2, locale: m2 }), (0, import_jsx_runtime.jsx)(Fm, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: Qh, children: (0, import_jsx_runtime.jsx)($h, { source: _2.relatedSourcePromise, children: t2 }) }), feature: nl.post, monitoringClient: f2, rethrow: o2, children: (0, import_jsx_runtime.jsx)(
|
|
5446
|
+
return (0, import_jsx_runtime.jsx)(up, { i18n: p2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: Zh, children: (0, import_jsx_runtime.jsx)($h, { source: _2.relatedSourcePromise, children: t2 }) }), children: [(0, import_jsx_runtime.jsx)(jp, { i18n: p2, locale: m2 }), (0, import_jsx_runtime.jsx)(Fm, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: Qh, children: (0, import_jsx_runtime.jsx)($h, { source: _2.relatedSourcePromise, children: t2 }) }), feature: nl.post, monitoringClient: f2, rethrow: o2, children: (0, import_jsx_runtime.jsx)(tg, { postLoadPromise: _2.postLoadPromise, relatedSourcePromise: _2.relatedSourcePromise, monitoringClient: f2, slug: _2.isPostInPreview ? void 0 : _2.slug, language: _2.language, isPostInPreview: _2.isPostInPreview, children: t2 }) })] }) });
|
|
5447
5447
|
}
|
|
5448
|
-
var
|
|
5448
|
+
var rg = zn(`12ed204c-821c-4ce9-802b-8bfe8e98d7e2`);
|
|
5449
5449
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5450
5450
|
0 && (module.exports = {
|
|
5451
5451
|
PostBySlugProvider,
|