@wix/blog 1.0.704 → 1.0.706

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.
Files changed (58) hide show
  1. package/_sdk-exports/context-blog-feed/runtime.d.ts +8 -8
  2. package/_sdk-exports/context-category-item/runtime.d.ts +4 -4
  3. package/_sdk-exports/context-post/runtime.d.ts +27 -13
  4. package/_sdk-exports/context-post-by-slug/runtime.js +4 -4
  5. package/_sdk-exports/context-post-list-item/runtime.d.ts +8 -8
  6. package/_sdk-exports/context-post-list-item/runtime.js +2 -2
  7. package/_sdk-exports/context-related-posts/runtime.d.ts +5 -5
  8. package/_sdk-exports/context-related-posts/runtime.js +2 -2
  9. package/_sdk-exports/context-tag-item/runtime.d.ts +4 -4
  10. package/build/cjs/context-blog-feed.d.ts +8 -8
  11. package/build/cjs/context-category-item.d.ts +4 -4
  12. package/build/cjs/context-post-by-slug.js +1455 -1988
  13. package/build/cjs/context-post-by-slug.js.map +1 -1
  14. package/build/cjs/context-post-list-item.d.ts +8 -8
  15. package/build/cjs/context-post-list-item.js +0 -2
  16. package/build/cjs/context-post-list-item.js.map +1 -1
  17. package/build/cjs/context-post.d.ts +27 -13
  18. package/build/cjs/context-related-posts.d.ts +5 -5
  19. package/build/cjs/context-related-posts.js +10 -3
  20. package/build/cjs/context-related-posts.js.map +1 -1
  21. package/build/cjs/context-tag-item.d.ts +4 -4
  22. package/build/es/context-blog-feed.d.mts +8 -8
  23. package/build/es/context-category-item.d.mts +4 -4
  24. package/build/es/context-post-by-slug.mjs +1455 -1988
  25. package/build/es/context-post-by-slug.mjs.map +1 -1
  26. package/build/es/context-post-list-item.d.mts +8 -8
  27. package/build/es/context-post-list-item.mjs +0 -1
  28. package/build/es/context-post-list-item.mjs.map +1 -1
  29. package/build/es/context-post.d.mts +27 -13
  30. package/build/es/context-related-posts.d.mts +5 -5
  31. package/build/es/context-related-posts.mjs +10 -3
  32. package/build/es/context-related-posts.mjs.map +1 -1
  33. package/build/es/context-tag-item.d.mts +4 -4
  34. package/build/internal/cjs/context-blog-feed.d.ts +8 -8
  35. package/build/internal/cjs/context-category-item.d.ts +4 -4
  36. package/build/internal/cjs/context-post-list-item.d.ts +8 -8
  37. package/build/internal/cjs/context-post.d.ts +27 -13
  38. package/build/internal/cjs/context-related-posts.d.ts +5 -5
  39. package/build/internal/cjs/context-tag-item.d.ts +4 -4
  40. package/build/internal/es/context-blog-feed.d.mts +8 -8
  41. package/build/internal/es/context-category-item.d.mts +4 -4
  42. package/build/internal/es/context-post-list-item.d.mts +8 -8
  43. package/build/internal/es/context-post.d.mts +27 -13
  44. package/build/internal/es/context-related-posts.d.mts +5 -5
  45. package/build/internal/es/context-tag-item.d.mts +4 -4
  46. package/package.json +2 -14
  47. package/_sdk-exports/context-post-item/runtime.d.ts +0 -508
  48. package/_sdk-exports/context-post-item/runtime.js +0 -5
  49. package/build/cjs/context-post-item.d.ts +0 -508
  50. package/build/cjs/context-post-item.js +0 -3698
  51. package/build/cjs/context-post-item.js.map +0 -1
  52. package/build/es/context-post-item.d.mts +0 -508
  53. package/build/es/context-post-item.mjs +0 -3657
  54. package/build/es/context-post-item.mjs.map +0 -1
  55. package/build/internal/cjs/context-post-item.d.ts +0 -508
  56. package/build/internal/es/context-post-item.d.mts +0 -508
  57. package/context/post-item/package.json +0 -3
  58. package/post-item-context-provider/package.json +0 -3
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- //#region ../../node_modules/@wix/editor-react-types/dist/links.d.ts
3
+ //#region ../../node_modules/.pnpm/@wix+editor-react-types@1.0.110/node_modules/@wix/editor-react-types/dist/links.d.ts
4
4
  type LinkTarget = '_self' | '_blank';
5
5
  /**
6
6
  * A link to a URL, used for navigation within components.
@@ -36,7 +36,7 @@ type Link$1 = {
36
36
  pageRole?: string;
37
37
  };
38
38
  //#endregion
39
- //#region ../../node_modules/@wix/editor-react-types/dist/image.d.ts
39
+ //#region ../../node_modules/.pnpm/@wix+editor-react-types@1.0.110/node_modules/@wix/editor-react-types/dist/image.d.ts
40
40
  type Point = {
41
41
  x: number;
42
42
  y: number;
@@ -73,7 +73,7 @@ type Image$1 = {
73
73
  alt?: string;
74
74
  };
75
75
  //#endregion
76
- //#region ../../node_modules/@wix/editor-react-types/dist/base.d.ts
76
+ //#region ../../node_modules/.pnpm/@wix+editor-react-types@1.0.110/node_modules/@wix/editor-react-types/dist/base.d.ts
77
77
  /**
78
78
  * Rich text content with resolved links.
79
79
  *
@@ -144,7 +144,7 @@ interface LiveLikes {
144
144
  * @example Thank the site visitor after they like the post
145
145
  * ```tsx
146
146
  * import { useState } from 'react';
147
- * import { usePostByIdContext } from '@wix/blog/post-by-id-context-provider';
147
+ * import { usePostByIdContext } from '@wix/blog/context/post-by-id';
148
148
  *
149
149
  * function LikeButton() {
150
150
  * const { isEmpty, isLiked, liveLikes, toggleLike } = usePostByIdContext();
@@ -182,7 +182,7 @@ interface LiveLikes {
182
182
  * @example Show the like count as soon as it changes
183
183
  * ```tsx
184
184
  * import { useSyncExternalStore } from 'react';
185
- * import { usePostByIdContext } from '@wix/blog/post-by-id-context-provider';
185
+ * import { usePostByIdContext } from '@wix/blog/context/post-by-id';
186
186
  *
187
187
  * const noLikes = () => () => {};
188
188
  *
@@ -202,7 +202,7 @@ interface LiveLikes {
202
202
  subscribe(listener: () => void): () => void;
203
203
  }
204
204
  //#endregion
205
- //#region ../../node_modules/type-fest/source/observable-like.d.ts
205
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/observable-like.d.ts
206
206
  declare global {
207
207
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
208
208
  interface SymbolConstructor {
@@ -220,7 +220,7 @@ As well, some guidance on making an `Observable` to not include `closed` propert
220
220
  @category Observable
221
221
  */
222
222
  //#endregion
223
- //#region ../../node_modules/@wix/sdk-types/build/index.d.ts
223
+ //#region ../../node_modules/.pnpm/@wix+sdk-types@1.17.12/node_modules/@wix/sdk-types/build/index.d.ts
224
224
  declare global {
225
225
  interface ContextualClient {}
226
226
  }
@@ -267,7 +267,7 @@ declare global {
267
267
  interface SDKTypeMode {}
268
268
  }
269
269
  //#endregion
270
- //#region ../../node_modules/@wix/auto_sdk_blog_posts/build/es/index.typings.d.mts
270
+ //#region ../../node_modules/.pnpm/@wix+auto_sdk_blog_posts@1.0.203/node_modules/@wix/auto_sdk_blog_posts/build/es/index.typings.d.mts
271
271
  interface RichContent {
272
272
  /** Node objects representing a rich content document. */
273
273
  nodes?: Node[];
@@ -3236,6 +3236,8 @@ interface PostDerivedData {
3236
3236
  *
3237
3237
  * When the post is for paying subscribers only and the site visitor can't read all of it,
3238
3238
  * the body ends where the free part ends, followed by the post's paywall message.
3239
+ *
3240
+ * Empty in a repeater item of a post list, which doesn't load post bodies.
3239
3241
  */
3240
3242
  richContent: RichContent;
3241
3243
  /** The display name of the post's author, as rich text. */
@@ -3271,14 +3273,21 @@ interface PostDerivedData {
3271
3273
  * unlike from `toggleLike()`. Empty when there's no count to show.
3272
3274
  */
3273
3275
  likeCount: RichText;
3274
- /** The categories the post belongs to, in the post's order. Empty when it has none. */
3276
+ /**
3277
+ * The categories the post belongs to, in the post's order. Empty when it has none.
3278
+ *
3279
+ * In a repeater item of a post list, only the post's main category, without a link.
3280
+ */
3275
3281
  postCategories: PostCategoryItem[];
3276
3282
  /**
3277
3283
  * The name of the post's main category, its first one, as rich text. Empty when the post has
3278
3284
  * no category.
3279
3285
  */
3280
3286
  itemCategoryLabel: RichText;
3281
- /** The post's tags, in the post's order. Empty when it has none. */
3287
+ /**
3288
+ * The post's tags, in the post's order. Empty when it has none, and in a repeater item of a
3289
+ * post list, which doesn't load tags.
3290
+ */
3282
3291
  postTags: PostTagItem[];
3283
3292
  /**
3284
3293
  * Whether the post shows a cover image, or a video cover with a poster image. `false` when
@@ -3291,7 +3300,10 @@ interface PostDerivedData {
3291
3300
  * post.
3292
3301
  */
3293
3302
  hasExcerpt: boolean;
3294
- /** Whether the post has at least one tag. `true` in the editor when there's no post. */
3303
+ /**
3304
+ * Whether the post has at least one tag. `true` in the editor when there's no post. `false`
3305
+ * in a repeater item of a post list, like `postTags`.
3306
+ */
3295
3307
  hasTags: boolean;
3296
3308
  /**
3297
3309
  * The date and time the post was first published, as an ISO 8601 string. `undefined` when
@@ -3340,7 +3352,7 @@ type PostContextType = PostDerivedData & {
3340
3352
  *
3341
3353
  * @example Show the like count once it's final
3342
3354
  * ```tsx
3343
- * import { usePostByIdContext } from '@wix/blog/post-by-id-context-provider';
3355
+ * import { usePostByIdContext } from '@wix/blog/context/post-by-id';
3344
3356
  *
3345
3357
  * function LikeCount() {
3346
3358
  * const { isEmpty, likeCountValue, isLikeCountLoaded } = usePostByIdContext();
@@ -3374,7 +3386,7 @@ type PostContextType = PostDerivedData & {
3374
3386
  *
3375
3387
  * @example Add a like button
3376
3388
  * ```tsx
3377
- * import { usePostByIdContext } from '@wix/blog/post-by-id-context-provider';
3389
+ * import { usePostByIdContext } from '@wix/blog/context/post-by-id';
3378
3390
  *
3379
3391
  * function LikeButton() {
3380
3392
  * const { isEmpty, isLiked, toggleLike } = usePostByIdContext();
@@ -3423,6 +3435,8 @@ type PostContextType = PostDerivedData & {
3423
3435
  * IDs used to pick the posts related to this post: the post's own ID, its category IDs,
3424
3436
  * and the related posts its author chose. The object stays the same when
3425
3437
  * the like state changes, so you can use it as an effect dependency.
3438
+ *
3439
+ * In a repeater item of a post list, only the post's ID.
3426
3440
  */
3427
3441
  relatedPostsSource: RelatedPostsSource;
3428
3442
  /**
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- //#region ../../node_modules/@wix/editor-react-types/dist/links.d.ts
3
+ //#region ../../node_modules/.pnpm/@wix+editor-react-types@1.0.110/node_modules/@wix/editor-react-types/dist/links.d.ts
4
4
  type LinkTarget = '_self' | '_blank';
5
5
  /**
6
6
  * A link to a URL, used for navigation within components.
@@ -36,7 +36,7 @@ type Link = {
36
36
  pageRole?: string;
37
37
  };
38
38
  //#endregion
39
- //#region ../../node_modules/@wix/editor-react-types/dist/image.d.ts
39
+ //#region ../../node_modules/.pnpm/@wix+editor-react-types@1.0.110/node_modules/@wix/editor-react-types/dist/image.d.ts
40
40
  type Point = {
41
41
  x: number;
42
42
  y: number;
@@ -73,7 +73,7 @@ type Image = {
73
73
  alt?: string;
74
74
  };
75
75
  //#endregion
76
- //#region ../../node_modules/@wix/editor-react-types/dist/base.d.ts
76
+ //#region ../../node_modules/.pnpm/@wix+editor-react-types@1.0.110/node_modules/@wix/editor-react-types/dist/base.d.ts
77
77
  /**
78
78
  * Rich text content with resolved links.
79
79
  *
@@ -110,7 +110,7 @@ interface EmptyStateLabels {
110
110
  description: string;
111
111
  }
112
112
  //#endregion
113
- //#region ../../node_modules/type-fest/source/observable-like.d.ts
113
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/observable-like.d.ts
114
114
  declare global {
115
115
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
116
116
  interface SymbolConstructor {
@@ -128,7 +128,7 @@ As well, some guidance on making an `Observable` to not include `closed` propert
128
128
  @category Observable
129
129
  */
130
130
  //#endregion
131
- //#region ../../node_modules/@wix/sdk-types/build/index.d.ts
131
+ //#region ../../node_modules/.pnpm/@wix+sdk-types@1.17.12/node_modules/@wix/sdk-types/build/index.d.ts
132
132
  declare global {
133
133
  interface ContextualClient {}
134
134
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- //#region ../../node_modules/type-fest/source/observable-like.d.ts
3
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/observable-like.d.ts
4
4
  declare global {
5
5
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
6
6
  interface SymbolConstructor {
@@ -18,7 +18,7 @@ As well, some guidance on making an `Observable` to not include `closed` propert
18
18
  @category Observable
19
19
  */
20
20
  //#endregion
21
- //#region ../../node_modules/@wix/sdk-types/build/index.d.ts
21
+ //#region ../../node_modules/.pnpm/@wix+sdk-types@1.17.12/node_modules/@wix/sdk-types/build/index.d.ts
22
22
  declare global {
23
23
  interface ContextualClient {}
24
24
  }
@@ -65,7 +65,7 @@ declare global {
65
65
  interface SDKTypeMode {}
66
66
  }
67
67
  //#endregion
68
- //#region ../../node_modules/@wix/editor-react-types/dist/links.d.ts
68
+ //#region ../../node_modules/.pnpm/@wix+editor-react-types@1.0.110/node_modules/@wix/editor-react-types/dist/links.d.ts
69
69
  type LinkTarget = '_self' | '_blank';
70
70
  /**
71
71
  * A link to a URL, used for navigation within components.
@@ -101,7 +101,7 @@ type Link = {
101
101
  pageRole?: string;
102
102
  };
103
103
  //#endregion
104
- //#region ../../node_modules/@wix/editor-react-types/dist/base.d.ts
104
+ //#region ../../node_modules/.pnpm/@wix+editor-react-types@1.0.110/node_modules/@wix/editor-react-types/dist/base.d.ts
105
105
  /**
106
106
  * Rich text content with resolved links.
107
107
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/blog",
3
- "version": "1.0.704",
3
+ "version": "1.0.706",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -113,16 +113,6 @@
113
113
  "require": "./build/cjs/context-related-posts.js",
114
114
  "types": "./build/es/context-related-posts.d.mts"
115
115
  },
116
- "./context/post-item": {
117
- "import": "./build/es/context-post-item.mjs",
118
- "require": "./build/cjs/context-post-item.js",
119
- "types": "./build/es/context-post-item.d.mts"
120
- },
121
- "./post-item-context-provider": {
122
- "import": "./build/es/context-post-item.mjs",
123
- "require": "./build/cjs/context-post-item.js",
124
- "types": "./build/es/context-post-item.d.mts"
125
- },
126
116
  "./context/post-by-id": {
127
117
  "import": "./build/es/context-post-by-id.mjs",
128
118
  "require": "./build/cjs/context-post-by-id.js",
@@ -156,8 +146,6 @@
156
146
  "services",
157
147
  "context/related-posts",
158
148
  "related-posts-context-provider",
159
- "context/post-item",
160
- "post-item-context-provider",
161
149
  "context/post-by-id",
162
150
  "post-by-id-context-provider"
163
151
  ],
@@ -205,5 +193,5 @@
205
193
  "optional": true
206
194
  }
207
195
  },
208
- "falconPackageHash": "82e7e79a10c6959a19da1f738992f53ef688777e732376c5eecb9b31"
196
+ "falconPackageHash": "ee0ab6e08220d2e7eae13a63d24c6bafa61f9bb96593c0980a4cf751"
209
197
  }