@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
|
@@ -406,7 +406,7 @@ interface LiveLikes {
|
|
|
406
406
|
* @example Thank the site visitor after they like the post
|
|
407
407
|
* ```tsx
|
|
408
408
|
* import { useState } from 'react';
|
|
409
|
-
* import { usePostByIdContext } from '@wix/blog/post-by-id
|
|
409
|
+
* import { usePostByIdContext } from '@wix/blog/context/post-by-id';
|
|
410
410
|
*
|
|
411
411
|
* function LikeButton() {
|
|
412
412
|
* const { isEmpty, isLiked, liveLikes, toggleLike } = usePostByIdContext();
|
|
@@ -444,7 +444,7 @@ interface LiveLikes {
|
|
|
444
444
|
* @example Show the like count as soon as it changes
|
|
445
445
|
* ```tsx
|
|
446
446
|
* import { useSyncExternalStore } from 'react';
|
|
447
|
-
* import { usePostByIdContext } from '@wix/blog/post-by-id
|
|
447
|
+
* import { usePostByIdContext } from '@wix/blog/context/post-by-id';
|
|
448
448
|
*
|
|
449
449
|
* const noLikes = () => () => {};
|
|
450
450
|
*
|
|
@@ -464,7 +464,7 @@ interface LiveLikes {
|
|
|
464
464
|
subscribe(listener: () => void): () => void;
|
|
465
465
|
}
|
|
466
466
|
//#endregion
|
|
467
|
-
//#region src/extensions/post-item-context-provider/post-item-context-provider.d.ts
|
|
467
|
+
//#region src/extensions/post-list-item-context-provider/post-list-item-context-provider.d.ts
|
|
468
468
|
/**
|
|
469
469
|
* The cell's raw item plus its like state, for the Blog widgets that read a cell directly
|
|
470
470
|
* (Comments, Cover Media). Elements bind the Post context this provider publishes, never this.
|
|
@@ -487,7 +487,7 @@ type PostItemContextType = PostListItem & Omit<PostLikes, 'likeCount' | 'viewCou
|
|
|
487
487
|
* Nullable rather than throwing: the hook runs for every element inside the repeater
|
|
488
488
|
* cell, including on the editor stage before the cell is populated.
|
|
489
489
|
*/
|
|
490
|
-
declare function
|
|
490
|
+
declare function usePostListItemContext(): PostItemContextType | null;
|
|
491
491
|
/** Props accepted by {@link PostItemContextProvider}. */
|
|
492
492
|
interface PostItemContextProviderProps extends React.PropsWithChildren {
|
|
493
493
|
/**
|
|
@@ -505,4 +505,4 @@ declare function PostItemContextProvider({
|
|
|
505
505
|
children
|
|
506
506
|
}: PostItemContextProviderProps): React.ReactNode;
|
|
507
507
|
|
|
508
|
-
export { PostItemContextProvider, type PostItemContextProviderProps, type PostItemContextType, type PostListItem, PostItemContextProvider as default,
|
|
508
|
+
export { PostItemContextProvider, type PostItemContextProviderProps, type PostItemContextType, type PostListItem, PostItemContextProvider as default, usePostListItemContext };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// _sdk-exports/context-post-item/runtime.js
|
|
1
|
+
// _sdk-exports/context-post-list-item/runtime.js
|
|
2
2
|
import e from "@wix/blog/post-context-provider";
|
|
3
3
|
import { createContext as t, createElement as n, startTransition as r, useCallback as i, useContext as a, useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
|
|
4
4
|
import { useService as u } from "@wix/services-manager-react";
|
|
@@ -3646,11 +3646,11 @@ function ms({ postData: e6, children: t2 }) {
|
|
|
3646
3646
|
let { i18n: n2 } = Qo(os);
|
|
3647
3647
|
return e6 === void 0 ? f(d, { children: t2 }) : f(Bo, { i18n: n2, children: f(ps, { postData: e6, children: t2 }) });
|
|
3648
3648
|
}
|
|
3649
|
-
var hs = Dn(`
|
|
3649
|
+
var hs = Dn(`e26c0f39-8db2-4b56-8c9b-fd1457f917e0`);
|
|
3650
3650
|
export {
|
|
3651
3651
|
ms as PostItemContextProvider,
|
|
3652
3652
|
ms as default,
|
|
3653
3653
|
hs as injectAccessTokenGetter,
|
|
3654
|
-
fs as
|
|
3654
|
+
fs as usePostListItemContext
|
|
3655
3655
|
};
|
|
3656
|
-
//# sourceMappingURL=context-post-item.mjs.map
|
|
3656
|
+
//# sourceMappingURL=context-post-list-item.mjs.map
|