@wix/blog 1.0.710 → 1.0.712
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-category-item/runtime.d.ts +6 -2
- package/_sdk-exports/context-post/runtime.d.ts +9 -1
- package/_sdk-exports/context-post-by-id/runtime.d.ts +8 -1
- package/_sdk-exports/context-post-by-id/runtime.js +2 -2
- package/_sdk-exports/context-post-by-slug/runtime.d.ts +7 -1
- package/_sdk-exports/context-post-by-slug/runtime.js +2 -2
- package/_sdk-exports/context-post-list-item/runtime.d.ts +6 -2
- package/_sdk-exports/context-tag-item/runtime.d.ts +5 -2
- package/build/cjs/context-category-item.d.ts +6 -2
- package/build/cjs/context-post-by-id.d.ts +9 -2
- package/build/cjs/context-post-by-id.js +15 -12
- package/build/cjs/context-post-by-id.js.map +1 -1
- package/build/cjs/context-post-by-slug.d.ts +8 -2
- package/build/cjs/context-post-by-slug.js +15 -12
- package/build/cjs/context-post-by-slug.js.map +1 -1
- package/build/cjs/context-post-list-item.d.ts +6 -2
- package/build/cjs/context-post.d.ts +9 -1
- package/build/cjs/context-tag-item.d.ts +5 -2
- package/build/es/context-category-item.d.mts +6 -2
- package/build/es/context-post-by-id.d.mts +9 -2
- package/build/es/context-post-by-id.mjs +15 -12
- package/build/es/context-post-by-id.mjs.map +1 -1
- package/build/es/context-post-by-slug.d.mts +8 -2
- package/build/es/context-post-by-slug.mjs +15 -12
- package/build/es/context-post-by-slug.mjs.map +1 -1
- package/build/es/context-post-list-item.d.mts +6 -2
- package/build/es/context-post.d.mts +9 -1
- package/build/es/context-tag-item.d.mts +5 -2
- package/build/internal/cjs/context-category-item.d.ts +6 -2
- package/build/internal/cjs/context-post-by-id.d.ts +9 -2
- package/build/internal/cjs/context-post-by-slug.d.ts +8 -2
- package/build/internal/cjs/context-post-list-item.d.ts +6 -2
- package/build/internal/cjs/context-post.d.ts +9 -1
- package/build/internal/cjs/context-tag-item.d.ts +5 -2
- package/build/internal/es/context-category-item.d.mts +6 -2
- package/build/internal/es/context-post-by-id.d.mts +9 -2
- package/build/internal/es/context-post-by-slug.d.mts +8 -2
- package/build/internal/es/context-post-list-item.d.mts +6 -2
- package/build/internal/es/context-post.d.mts +9 -1
- package/build/internal/es/context-tag-item.d.mts +5 -2
- package/package.json +4 -4
|
@@ -165,8 +165,12 @@ interface PostCategoryItem {
|
|
|
165
165
|
*/
|
|
166
166
|
type CategoryItemContextType = PostCategoryItem;
|
|
167
167
|
/**
|
|
168
|
-
*
|
|
169
|
-
*
|
|
168
|
+
* The Category Item context provides access to one of a blog post's categories, in an item of a
|
|
169
|
+
* repeater connected to the post's **Post Categories** list. Use it to show the category's name
|
|
170
|
+
* and link to the blog page that lists its posts.
|
|
171
|
+
*
|
|
172
|
+
* Returns `null` outside such a repeater item, and in the editor before the item holds a
|
|
173
|
+
* category.
|
|
170
174
|
*/
|
|
171
175
|
declare function useCategoryItemContext(): CategoryItemContextType | null;
|
|
172
176
|
/** Props accepted by {@link CategoryItemContextProvider}. */
|
|
@@ -3501,7 +3501,15 @@ type PostContextType = PostDerivedData & {
|
|
|
3501
3501
|
*/
|
|
3502
3502
|
isEmpty: boolean;
|
|
3503
3503
|
};
|
|
3504
|
-
/**
|
|
3504
|
+
/**
|
|
3505
|
+
* The Post context provides access to a blog post: the post on a blog post page, the one a Wix
|
|
3506
|
+
* user chooses in the Selected Post Data Source, or the one in a repeater item of a post list.
|
|
3507
|
+
* Use it to show the post's content, author, publish date, counts, categories, and tags, and to
|
|
3508
|
+
* let a site visitor like the post.
|
|
3509
|
+
*
|
|
3510
|
+
* When the component is in more than one of these, such as a repeater item on a blog post page,
|
|
3511
|
+
* it returns the post of the innermost one. Anywhere else, it throws an error.
|
|
3512
|
+
*/
|
|
3505
3513
|
declare function usePostContext(): PostContextType;
|
|
3506
3514
|
/** Props accepted by {@link PostProvider}. */
|
|
3507
3515
|
interface PostProviderProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { PostContextType } from "@wix/blog/post-context-provider";
|
|
1
2
|
import React from "react";
|
|
2
|
-
import { usePostContext as usePostByIdContext } from "@wix/blog/post-context-provider";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/category-picker.d.ts
|
|
5
5
|
/** A WQL clause the filter picker stores for one inline field. */
|
|
@@ -16,6 +16,13 @@ interface PostPickerFilter {
|
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/extensions/post-by-id-context-provider/post-by-id-context-provider.d.ts
|
|
19
|
+
/**
|
|
20
|
+
* The Post by ID context provides access to a blog post: the one a Wix user chooses in the
|
|
21
|
+
* Selected Post Data Source, the one on a blog post page, or the one in a repeater item of a post
|
|
22
|
+
* list. Use it to show the post's content, author, publish date, counts, categories, and tags,
|
|
23
|
+
* and to let a site visitor like the post.
|
|
24
|
+
*/
|
|
25
|
+
declare function usePostByIdContext(): PostContextType;
|
|
19
26
|
/** Props accepted by {@link PostByIdProvider}. */
|
|
20
27
|
interface PostByIdProviderProps {
|
|
21
28
|
children?: React.ReactNode;
|