@wix/blog 1.0.691 → 1.0.692

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 (85) hide show
  1. package/_sdk-exports/context-blog-feed-context-provider/runtime.d.ts +483 -0
  2. package/_sdk-exports/context-blog-feed-context-provider/runtime.js +5 -0
  3. package/_sdk-exports/context-category-item-context-provider/runtime.d.ts +189 -0
  4. package/_sdk-exports/context-category-item-context-provider/runtime.js +2 -0
  5. package/_sdk-exports/context-post-by-id-context-provider/runtime.d.ts +31 -0
  6. package/_sdk-exports/context-post-by-id-context-provider/runtime.js +5 -0
  7. package/_sdk-exports/context-post-context-provider/runtime.d.ts +3213 -0
  8. package/_sdk-exports/context-post-context-provider/runtime.js +5 -0
  9. package/_sdk-exports/context-post-item-context-provider/runtime.d.ts +386 -0
  10. package/_sdk-exports/context-post-item-context-provider/runtime.js +5 -0
  11. package/_sdk-exports/context-related-posts-context-provider/runtime.d.ts +341 -0
  12. package/_sdk-exports/context-related-posts-context-provider/runtime.js +5 -0
  13. package/_sdk-exports/context-tag-item-context-provider/runtime.d.ts +185 -0
  14. package/_sdk-exports/context-tag-item-context-provider/runtime.js +2 -0
  15. package/blog-feed-context-provider/package.json +3 -0
  16. package/build/cjs/context-blog-feed-context-provider.d.ts +483 -0
  17. package/build/cjs/context-blog-feed-context-provider.js +4601 -0
  18. package/build/cjs/context-blog-feed-context-provider.js.map +1 -0
  19. package/build/cjs/context-category-item-context-provider.d.ts +189 -0
  20. package/build/cjs/context-category-item-context-provider.js +578 -0
  21. package/build/cjs/context-category-item-context-provider.js.map +1 -0
  22. package/build/cjs/context-post-by-id-context-provider.d.ts +31 -0
  23. package/build/cjs/context-post-by-id-context-provider.js +4531 -0
  24. package/build/cjs/context-post-by-id-context-provider.js.map +1 -0
  25. package/build/cjs/context-post-context-provider.d.ts +3213 -0
  26. package/build/cjs/context-post-context-provider.js +5404 -0
  27. package/build/cjs/context-post-context-provider.js.map +1 -0
  28. package/build/cjs/context-post-item-context-provider.d.ts +386 -0
  29. package/build/cjs/context-post-item-context-provider.js +3682 -0
  30. package/build/cjs/context-post-item-context-provider.js.map +1 -0
  31. package/build/cjs/context-related-posts-context-provider.d.ts +341 -0
  32. package/build/cjs/context-related-posts-context-provider.js +4355 -0
  33. package/build/cjs/context-related-posts-context-provider.js.map +1 -0
  34. package/build/cjs/context-tag-item-context-provider.d.ts +185 -0
  35. package/build/cjs/context-tag-item-context-provider.js +578 -0
  36. package/build/cjs/context-tag-item-context-provider.js.map +1 -0
  37. package/build/es/context-blog-feed-context-provider.d.mts +483 -0
  38. package/build/es/context-blog-feed-context-provider.mjs +4571 -0
  39. package/build/es/context-blog-feed-context-provider.mjs.map +1 -0
  40. package/build/es/context-category-item-context-provider.d.mts +189 -0
  41. package/build/es/context-category-item-context-provider.mjs +549 -0
  42. package/build/es/context-category-item-context-provider.mjs.map +1 -0
  43. package/build/es/context-post-by-id-context-provider.d.mts +31 -0
  44. package/build/es/context-post-by-id-context-provider.mjs +4491 -0
  45. package/build/es/context-post-by-id-context-provider.mjs.map +1 -0
  46. package/build/es/context-post-context-provider.d.mts +3213 -0
  47. package/build/es/context-post-context-provider.mjs +5374 -0
  48. package/build/es/context-post-context-provider.mjs.map +1 -0
  49. package/build/es/context-post-item-context-provider.d.mts +386 -0
  50. package/build/es/context-post-item-context-provider.mjs +3652 -0
  51. package/build/es/context-post-item-context-provider.mjs.map +1 -0
  52. package/build/es/context-related-posts-context-provider.d.mts +341 -0
  53. package/build/es/context-related-posts-context-provider.mjs +4325 -0
  54. package/build/es/context-related-posts-context-provider.mjs.map +1 -0
  55. package/build/es/context-tag-item-context-provider.d.mts +185 -0
  56. package/build/es/context-tag-item-context-provider.mjs +549 -0
  57. package/build/es/context-tag-item-context-provider.mjs.map +1 -0
  58. package/build/internal/cjs/context-blog-feed-context-provider.d.ts +483 -0
  59. package/build/internal/cjs/context-category-item-context-provider.d.ts +189 -0
  60. package/build/internal/cjs/context-post-by-id-context-provider.d.ts +31 -0
  61. package/build/internal/cjs/context-post-context-provider.d.ts +3213 -0
  62. package/build/internal/cjs/context-post-item-context-provider.d.ts +386 -0
  63. package/build/internal/cjs/context-related-posts-context-provider.d.ts +341 -0
  64. package/build/internal/cjs/context-tag-item-context-provider.d.ts +185 -0
  65. package/build/internal/es/context-blog-feed-context-provider.d.mts +483 -0
  66. package/build/internal/es/context-category-item-context-provider.d.mts +189 -0
  67. package/build/internal/es/context-post-by-id-context-provider.d.mts +31 -0
  68. package/build/internal/es/context-post-context-provider.d.mts +3213 -0
  69. package/build/internal/es/context-post-item-context-provider.d.mts +386 -0
  70. package/build/internal/es/context-related-posts-context-provider.d.mts +341 -0
  71. package/build/internal/es/context-tag-item-context-provider.d.mts +185 -0
  72. package/category-item-context-provider/package.json +3 -0
  73. package/context/blog-feed-context-provider/package.json +3 -0
  74. package/context/category-item-context-provider/package.json +3 -0
  75. package/context/post-by-id-context-provider/package.json +3 -0
  76. package/context/post-context-provider/package.json +3 -0
  77. package/context/post-item-context-provider/package.json +3 -0
  78. package/context/related-posts-context-provider/package.json +3 -0
  79. package/context/tag-item-context-provider/package.json +3 -0
  80. package/package.json +103 -4
  81. package/post-by-id-context-provider/package.json +3 -0
  82. package/post-context-provider/package.json +3 -0
  83. package/post-item-context-provider/package.json +3 -0
  84. package/related-posts-context-provider/package.json +3 -0
  85. package/tag-item-context-provider/package.json +3 -0
@@ -0,0 +1,341 @@
1
+ import React from 'react';
2
+
3
+ //#region ../../node_modules/@wix/editor-react-types/dist/links.d.ts
4
+ type LinkTarget = '_self' | '_blank';
5
+ /**
6
+ * A link to a URL, used for navigation within components.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * import type { Link } from '@wix/editor-react-types';
11
+ *
12
+ * interface MyComponentProps {
13
+ * link?: Link;
14
+ * }
15
+ * ```
16
+ */
17
+ type Link = {
18
+ /**
19
+ * The link URL. For partial links (see `pageRole`), this is the router prefix
20
+ * (e.g. `https://www.my-site.com/prefix`) rather than a fully resolved URL.
21
+ */
22
+ href?: string;
23
+ /**
24
+ * Where this link should open.
25
+ * - `'_self'` — opens in the same page.
26
+ * - `'_blank'` — opens in a new tab.
27
+ */
28
+ target?: LinkTarget; /** The `rel` attribute of the link. Accepts LinkRel values separated by a space. */
29
+ rel?: string;
30
+ /**
31
+ * Page role identifier. Present only on partial links, where only the router prefix is
32
+ * known and the full URL format is owned by the Router/App. Applications can use such
33
+ * links in functions to resolve the complete URL at runtime (e.g. for binding links).
34
+ * Resolved links will not have this field.
35
+ */
36
+ pageRole?: string;
37
+ };
38
+ //#endregion
39
+ //#region ../../node_modules/@wix/editor-react-types/dist/image.d.ts
40
+ type Point = {
41
+ x: number;
42
+ y: number;
43
+ };
44
+ type Crop = Point & {
45
+ width: number;
46
+ height: number;
47
+ };
48
+ /**
49
+ * An image from Wix Media.
50
+ *
51
+ * @example
52
+ * ```tsx
53
+ * import type { Image } from '@wix/editor-react-types';
54
+ *
55
+ * interface MyComponentProps {
56
+ * image?: Image;
57
+ * }
58
+ *
59
+ * const MyComponent = ({ image }: MyComponentProps) => (
60
+ * <img src={image?.url} alt={image?.alt} />
61
+ * );
62
+ * ```
63
+ */
64
+ type Image = {
65
+ /** The image URI. */uri?: string; /** The image URL. */
66
+ url: string; /** The image file name. */
67
+ name?: string; /** The image height in pixels. */
68
+ height?: number; /** The image width in pixels. */
69
+ width?: number; /** Whether the image is animated (e.g. GIF). */
70
+ animated?: boolean; /** The crop region applied to the image. */
71
+ crop?: Crop; /** The image quality, as a percentage from 0 to 100. */
72
+ quality?: number; /** The image alt text for accessibility. */
73
+ alt?: string;
74
+ };
75
+ //#endregion
76
+ //#region ../../node_modules/@wix/editor-react-types/dist/base.d.ts
77
+ /**
78
+ * Rich text content with resolved links.
79
+ *
80
+ * @example
81
+ * ```tsx
82
+ * import type { RichText } from '@wix/editor-react-types';
83
+ *
84
+ * interface MyComponentProps {
85
+ * description?: RichText;
86
+ * }
87
+ *
88
+ * const MyComponent = ({ description }: MyComponentProps) => (
89
+ * <div>
90
+ * {description?.html}
91
+ * {description?.linkList.map((link) => (
92
+ * <a key={link.href} href={link.href}>{link.href}</a>
93
+ * ))}
94
+ * </div>
95
+ * );
96
+ * ```
97
+ */
98
+ type RichText = {
99
+ /** The original rich text content. */text: string; /** The HTML content with all links resolved. */
100
+ html: string; /** All links present in the rich text content. */
101
+ linkList: Array<Link>;
102
+ };
103
+ //#endregion
104
+ //#region src/i18n/post-labels.types.d.ts
105
+ /** Display-ready copy for the Repeater's bindable `emptyState: {title, description}` prop. */
106
+ interface EmptyStateLabels {
107
+ title: string;
108
+ description: string;
109
+ }
110
+ //#endregion
111
+ //#region ../../node_modules/type-fest/source/observable-like.d.ts
112
+ declare global {
113
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
114
+ interface SymbolConstructor {
115
+ readonly observable: symbol;
116
+ }
117
+ }
118
+ /**
119
+ @remarks
120
+ The TC39 observable proposal defines a `closed` property, but some implementations (such as xstream) do not as of 10/08/2021.
121
+ As well, some guidance on making an `Observable` to not include `closed` property.
122
+ @see https://github.com/tc39/proposal-observable/blob/master/src/Observable.js#L129-L130
123
+ @see https://github.com/staltz/xstream/blob/6c22580c1d84d69773ee4b0905df44ad464955b3/src/index.ts#L79-L85
124
+ @see https://github.com/benlesh/symbol-observable#making-an-object-observable
125
+
126
+ @category Observable
127
+ */
128
+ //#endregion
129
+ //#region ../../node_modules/@wix/sdk-types/build/index.d.ts
130
+ declare global {
131
+ interface ContextualClient {}
132
+ }
133
+ /**
134
+ * Creates concrete types from SDK descriptors when a contextual client is
135
+ * available.
136
+ *
137
+ * For a REST descriptor the built (bound) API is intersected with the original
138
+ * descriptor, matching what `contextualizeRESTModuleV2` returns at runtime — a
139
+ * value callable as the bound API and still usable as a descriptor. Keeping the
140
+ * descriptor half lets contextual modules be passed to descriptor-constrained
141
+ * helpers such as `elevate` from `@wix/sdk/context` (FEDINF-14092).
142
+ *
143
+ * The `& T` is scoped to REST descriptors — the only shape codegen wraps in
144
+ * `MaybeContext` — so `BuildDescriptors` (used by `createClient().use`) is left
145
+ * unchanged and stays bound-only. The fix lives here rather than in `elevate`,
146
+ * which is kept strict on purpose (see #941) so it still rejects bound-only
147
+ * functions that are unsafe through `createRESTModule`.
148
+ */
149
+ declare global {
150
+ /**
151
+ * A global interface to set the exposure toggle for the SDK.
152
+ * @example
153
+ * ```ts
154
+ * declare global {
155
+ * interface SDKExposureToggle {
156
+ * alpha: true;
157
+ * }
158
+ * }
159
+ */
160
+ interface SDKExposureToggle {}
161
+ }
162
+ declare global {
163
+ /**
164
+ * A global interface to set the type mode for the SDK.
165
+ * @example
166
+ * ```ts
167
+ * declare global {
168
+ * interface SDKTypeMode {
169
+ * strict: true;
170
+ * }
171
+ * }
172
+ */
173
+ interface SDKTypeMode {}
174
+ }
175
+ //#endregion
176
+ //#region src/lib/parse-post-cover-media.d.ts
177
+ /** One playable rendition of a Wix-hosted cover video (a raw REST `VideoResolution`). */
178
+ interface VideoSource {
179
+ url: string;
180
+ width?: number;
181
+ height?: number;
182
+ }
183
+ type EmbedProvider = 'youtube' | 'vimeo' | 'unknown';
184
+ /**
185
+ * The post cover as the Cover Media widget consumes it — a discriminated union over the
186
+ * `post.media` oneof: a Wix-hosted image, a Wix-hosted video (`wixMedia.videoV2`), or an
187
+ * externally hosted embed (`embedMedia`, YouTube/Vimeo).
188
+ */
189
+ type CoverMedia = {
190
+ kind: 'image';
191
+ image: Image;
192
+ } | {
193
+ kind: 'wixVideo'; /** The WixMedia video id — the `wix:video://v1/<id>/...` path segment. */
194
+ id: string;
195
+ posterUrl?: string;
196
+ posterWidth?: number;
197
+ posterHeight?: number;
198
+ /**
199
+ * Playable mp4 renditions, optimal-first. Empty when the raw REST join was
200
+ * unavailable — the widget then renders the poster alone (see post-video-api.ts
201
+ * for why the SDK's `videoV2` string cannot carry these).
202
+ */
203
+ sources: VideoSource[];
204
+ altText: string;
205
+ } | {
206
+ kind: 'embed';
207
+ provider: EmbedProvider; /** The author-supplied external video URL, as the Blog API stores it. */
208
+ videoUrl: string; /** Provider player URL for click-to-play; absent for an unrecognized provider. */
209
+ embedUrl?: string;
210
+ thumbnailUrl?: string;
211
+ thumbnailWidth?: number;
212
+ thumbnailHeight?: number;
213
+ altText: string;
214
+ };
215
+ //#endregion
216
+ //#region src/extensions/post-list-context-provider/utils.d.ts
217
+ /**
218
+ * One item of the `postsList` array — the object the platform hands the Post Item
219
+ * context provider as its `postData` prop (via the manifest's `contextImplementor`).
220
+ * The `item*`/`recentPostItem` keys must match the Post Item context manifest's
221
+ * `context.items` keys — the runtime resolves an element's binding by looking the key
222
+ * up on the per-item hook's return value.
223
+ */
224
+ interface PostListItem {
225
+ /** Repeater item identity; also the manifest contract's `_id`. */
226
+ _id: string;
227
+ /** The manifest contract's `title` (plain text, non-bindable — see `itemTitle` below). */
228
+ title: string;
229
+ itemTitle: RichText;
230
+ itemExcerpt: RichText;
231
+ itemCoverImage: Image | undefined;
232
+ /**
233
+ * The cover as the Cover Media widget renders it — image OR playable video, where
234
+ * `itemCoverImage` above can only ever be the image. Runtime-only by design: deliberately
235
+ * absent from `POST_ITEM_CONTRACT_ITEMS` and the Post Item manifest (the runtime injects
236
+ * the full item object regardless, and the manifest contract must stay text-scalars-only —
237
+ * see post-item-contract.ts). Not bindable in Connect Value; consumed via
238
+ * `usePostItemContext()` only.
239
+ */
240
+ itemCoverMedia: CoverMedia | undefined;
241
+ itemLink: Link | undefined;
242
+ itemPublishedDate: RichText;
243
+ /**
244
+ * Raw values for the compact widgets (Metadata, Counters), which format for themselves
245
+ * (a design-panel date/number format) instead of parsing the richText labels above.
246
+ * Runtime-only like `itemCoverMedia` — never bindable items. JSON-safe on purpose (ISO
247
+ * string, numbers): the item crosses the platform's per-cell prop injection, and a `Date`
248
+ * would not survive the round-trip.
249
+ */
250
+ /** ISO 8601; `undefined` for a post without `firstPublishedDate`. */
251
+ publishedDateValue: string | undefined;
252
+ /**
253
+ * The clock `itemPublishedDate` was formatted from (`useHydrationClock`) — the compact
254
+ * widgets format `publishedDateValue` for themselves and must use the same one, or their
255
+ * label would hydrate against a different "now" than the bound text did.
256
+ */
257
+ clockValue: number;
258
+ /** `undefined` when absent OR 0 — the same API-artifact rule as `timeToRead` below. */
259
+ minutesToReadValue: number | undefined;
260
+ /**
261
+ * The server-side METRICS counters as raw numbers, the seed the Post Item provider
262
+ * publishes as `viewCountValue`/`commentCountValue` until its client-only metrics read
263
+ * lands (and for good in the editor, where that read is skipped). Same three-way rule as
264
+ * the `viewCount`/`commentCount` labels: metric → canvas stand-in → `undefined`, never 0.
265
+ */
266
+ initialViewCount: number | undefined;
267
+ initialCommentCount: number | undefined;
268
+ /**
269
+ * The remaining keys reuse the Post context's names verbatim — the registry is per app and
270
+ * keyed by item path, so re-declaring a key at the same dataType on the Post Item context
271
+ * costs no new registry rows (the same trick `likeCount` already relies on).
272
+ */
273
+ authorName: RichText;
274
+ authorImage: Image | undefined;
275
+ timeToRead: RichText;
276
+ /**
277
+ * Resolved in priority order by `counterLabel`:
278
+ * 1. the post's own `metrics` (the `METRICS` fieldset) — renders everywhere, including
279
+ * the editor canvas and inside SSR HTML;
280
+ * 2. an editor stand-in, when the API answers without metrics;
281
+ * 3. blank, for the Post Item provider to fill in from its per-cell metrics read.
282
+ *
283
+ * Blank rather than zero at step 3 because a seeded "0 views" reads as a confident wrong
284
+ * number until that read lands. Step 1 exists because step 3 alone is not enough: the
285
+ * per-cell read is client-only by design (personal data must never bake into SSR HTML the
286
+ * host caches for days) AND is skipped outright in the editor, which left a bound counter
287
+ * permanently blank on the canvas.
288
+ */
289
+ viewCount: RichText;
290
+ commentCount: RichText;
291
+ /**
292
+ * The post's MAIN category label — one, not a list. blog-client's feed card renders a single
293
+ * category (`post.categoryIds[0]`); its multi-category `CategoryLabelList` was built for the
294
+ * feed and never shipped, and the 3-chip list lives on the post page only.
295
+ */
296
+ itemCategoryLabel: RichText;
297
+ /** Mirrors the Post Item manifest's nested (non-bindable) `recentPostItem` data item. */
298
+ recentPostItem: {
299
+ title: string;
300
+ slug: string;
301
+ };
302
+ /**
303
+ * Whether the post takes new comments — the Comments widget's lock in a cell. Runtime-only
304
+ * like `itemCoverMedia`; `undefined` (partial fieldset, canvas stand-in) reads as unlocked.
305
+ */
306
+ commentingEnabled: boolean | undefined;
307
+ }
308
+ /** Display-ready copy for the Repeater's bindable `emptyState: {title, description}`
309
+ * prop (the manifest's `emptyState` item). The provider never renders it — the
310
+ * Repeater shows it (editor stage) when its bound items array is empty. The copy comes
311
+ * from the site-language labels (`PostLabels.noPostsEmptyState`). */
312
+ type EmptyStateContent = EmptyStateLabels;
313
+ //#endregion
314
+ //#region src/extensions/related-posts-context-provider/related-posts-context-provider.d.ts
315
+ /** Posts related to the current post, as read through {@link useRelatedPostsContext}. */
316
+ interface RelatedPostsContextType {
317
+ relatedPosts: PostListItem[];
318
+ /** The Repeater's bindable `emptyState` source (the manifest's `emptyState` item) —
319
+ * null while loading or while the strip has posts, same contract as the feed's. */
320
+ emptyState: EmptyStateContent | null;
321
+ /** True only while the strip's first fetch is pending — the manifest's bindable
322
+ * visibility condition (guidelines' Option 1). */
323
+ isLoadingRelatedPosts: boolean;
324
+ /**
325
+ * The strip's read failed. Bindable (see the manifest), and told apart from an empty
326
+ * strip on purpose: `emptyState` goes null while this is true.
327
+ */
328
+ hasError: boolean;
329
+ }
330
+ /** Reads the related posts from the nearest Related Posts context provider; throws outside one. */
331
+ declare function useRelatedPostsContext(): RelatedPostsContextType;
332
+ /** Loads the posts related to the current post and supplies them to its children. */
333
+ declare function RelatedPostsProvider({
334
+ children,
335
+ postsCount
336
+ }: {
337
+ children?: React.ReactNode; /** The manifest's `data.postsCount` input — unset/invalid falls back to 3. */
338
+ postsCount?: number;
339
+ }): React.ReactNode;
340
+
341
+ export { type PostListItem, type RelatedPostsContextType, RelatedPostsProvider, RelatedPostsProvider as default, useRelatedPostsContext };
@@ -0,0 +1,185 @@
1
+ import React from 'react';
2
+
3
+ //#region ../../node_modules/type-fest/source/observable-like.d.ts
4
+ declare global {
5
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
6
+ interface SymbolConstructor {
7
+ readonly observable: symbol;
8
+ }
9
+ }
10
+ /**
11
+ @remarks
12
+ The TC39 observable proposal defines a `closed` property, but some implementations (such as xstream) do not as of 10/08/2021.
13
+ As well, some guidance on making an `Observable` to not include `closed` property.
14
+ @see https://github.com/tc39/proposal-observable/blob/master/src/Observable.js#L129-L130
15
+ @see https://github.com/staltz/xstream/blob/6c22580c1d84d69773ee4b0905df44ad464955b3/src/index.ts#L79-L85
16
+ @see https://github.com/benlesh/symbol-observable#making-an-object-observable
17
+
18
+ @category Observable
19
+ */
20
+ //#endregion
21
+ //#region ../../node_modules/@wix/sdk-types/build/index.d.ts
22
+ declare global {
23
+ interface ContextualClient {}
24
+ }
25
+ /**
26
+ * Creates concrete types from SDK descriptors when a contextual client is
27
+ * available.
28
+ *
29
+ * For a REST descriptor the built (bound) API is intersected with the original
30
+ * descriptor, matching what `contextualizeRESTModuleV2` returns at runtime — a
31
+ * value callable as the bound API and still usable as a descriptor. Keeping the
32
+ * descriptor half lets contextual modules be passed to descriptor-constrained
33
+ * helpers such as `elevate` from `@wix/sdk/context` (FEDINF-14092).
34
+ *
35
+ * The `& T` is scoped to REST descriptors — the only shape codegen wraps in
36
+ * `MaybeContext` — so `BuildDescriptors` (used by `createClient().use`) is left
37
+ * unchanged and stays bound-only. The fix lives here rather than in `elevate`,
38
+ * which is kept strict on purpose (see #941) so it still rejects bound-only
39
+ * functions that are unsafe through `createRESTModule`.
40
+ */
41
+ declare global {
42
+ /**
43
+ * A global interface to set the exposure toggle for the SDK.
44
+ * @example
45
+ * ```ts
46
+ * declare global {
47
+ * interface SDKExposureToggle {
48
+ * alpha: true;
49
+ * }
50
+ * }
51
+ */
52
+ interface SDKExposureToggle {}
53
+ }
54
+ declare global {
55
+ /**
56
+ * A global interface to set the type mode for the SDK.
57
+ * @example
58
+ * ```ts
59
+ * declare global {
60
+ * interface SDKTypeMode {
61
+ * strict: true;
62
+ * }
63
+ * }
64
+ */
65
+ interface SDKTypeMode {}
66
+ }
67
+ //#endregion
68
+ //#region ../../node_modules/@wix/editor-react-types/dist/links.d.ts
69
+ type LinkTarget = '_self' | '_blank';
70
+ /**
71
+ * A link to a URL, used for navigation within components.
72
+ *
73
+ * @example
74
+ * ```tsx
75
+ * import type { Link } from '@wix/editor-react-types';
76
+ *
77
+ * interface MyComponentProps {
78
+ * link?: Link;
79
+ * }
80
+ * ```
81
+ */
82
+ type Link = {
83
+ /**
84
+ * The link URL. For partial links (see `pageRole`), this is the router prefix
85
+ * (e.g. `https://www.my-site.com/prefix`) rather than a fully resolved URL.
86
+ */
87
+ href?: string;
88
+ /**
89
+ * Where this link should open.
90
+ * - `'_self'` — opens in the same page.
91
+ * - `'_blank'` — opens in a new tab.
92
+ */
93
+ target?: LinkTarget; /** The `rel` attribute of the link. Accepts LinkRel values separated by a space. */
94
+ rel?: string;
95
+ /**
96
+ * Page role identifier. Present only on partial links, where only the router prefix is
97
+ * known and the full URL format is owned by the Router/App. Applications can use such
98
+ * links in functions to resolve the complete URL at runtime (e.g. for binding links).
99
+ * Resolved links will not have this field.
100
+ */
101
+ pageRole?: string;
102
+ };
103
+ //#endregion
104
+ //#region ../../node_modules/@wix/editor-react-types/dist/base.d.ts
105
+ /**
106
+ * Rich text content with resolved links.
107
+ *
108
+ * @example
109
+ * ```tsx
110
+ * import type { RichText } from '@wix/editor-react-types';
111
+ *
112
+ * interface MyComponentProps {
113
+ * description?: RichText;
114
+ * }
115
+ *
116
+ * const MyComponent = ({ description }: MyComponentProps) => (
117
+ * <div>
118
+ * {description?.html}
119
+ * {description?.linkList.map((link) => (
120
+ * <a key={link.href} href={link.href}>{link.href}</a>
121
+ * ))}
122
+ * </div>
123
+ * );
124
+ * ```
125
+ */
126
+ type RichText = {
127
+ /** The original rich text content. */text: string; /** The HTML content with all links resolved. */
128
+ html: string; /** All links present in the rich text content. */
129
+ linkList: Array<Link>;
130
+ };
131
+ //#endregion
132
+ //#region src/extensions/post-context-provider/utils.d.ts
133
+ /**
134
+ * One item of the `postTags` array — the object the platform hands the Tag Item context
135
+ * provider as its `tagData` prop. The `PostCategoryItem` twin, same contract rules:
136
+ * `_id`/`label` are the manifest contract (`TAG_ITEM_CONTRACT_ITEMS`, plain text and
137
+ * non-bindable), the remaining keys must match the Tag Item context manifest's `context.items`.
138
+ */
139
+ interface PostTagItem {
140
+ /** Repeater item identity; also the manifest contract's `_id`. */
141
+ _id: string;
142
+ /** The manifest contract's `label` (plain text, non-bindable — see the richText label below). */
143
+ label: string;
144
+ itemTagLabel: RichText;
145
+ /** The tag's feed view; `undefined` (unlinked) without a resolvable base or slug. */
146
+ itemTagLink: Link | undefined;
147
+ /** Mirrors the Tag Item manifest's nested (non-bindable) `tagItem` data item. */
148
+ tagItem: {
149
+ label: string;
150
+ slug: string;
151
+ };
152
+ }
153
+ //#endregion
154
+ //#region src/extensions/tag-item-context-provider/tag-item-context-provider.d.ts
155
+ /**
156
+ * The context value IS the item — its keys sit top-level because the runtime resolves an
157
+ * element's binding by looking the manifest item key up on this hook's return value (through
158
+ * `contextSpecifier.hook`).
159
+ *
160
+ * Nothing is derived per cell: a tag chip has no per-cell network read, so the item the platform
161
+ * injects is published unchanged (the object identity is the platform's, stable per cell render).
162
+ */
163
+ type TagItemContextType = PostTagItem;
164
+ /**
165
+ * Nullable rather than throwing: the hook runs for every element inside the repeater cell,
166
+ * including on the editor stage before the cell is populated.
167
+ */
168
+ declare function useTagItemContext(): TagItemContextType | null;
169
+ /** Props accepted by {@link TagItemContextProvider}. */
170
+ interface TagItemContextProviderProps extends React.PropsWithChildren {
171
+ /**
172
+ * The current item of the `postTags` array, injected by the platform per repeater cell (the
173
+ * Post context manifest's `contextImplementor.propKey`). Absent on the editor's unbound
174
+ * template cell — children then render over a null context, matching the Category Item and
175
+ * Post Item providers; this provider has no standalone fetch path.
176
+ */
177
+ tagData?: PostTagItem;
178
+ }
179
+ /** Supplies one post tag, injected per repeater cell, to its children. */
180
+ declare function TagItemContextProvider({
181
+ tagData,
182
+ children
183
+ }: TagItemContextProviderProps): React.ReactNode;
184
+
185
+ export { type PostTagItem, TagItemContextProvider, type TagItemContextProviderProps, type TagItemContextType, TagItemContextProvider as default, useTagItemContext };
@@ -0,0 +1,3 @@
1
+ {
2
+ "main": "../build/cjs/context-category-item-context-provider.js"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "main": "../../build/cjs/context-blog-feed-context-provider.js"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "main": "../../build/cjs/context-category-item-context-provider.js"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "main": "../../build/cjs/context-post-by-id-context-provider.js"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "main": "../../build/cjs/context-post-context-provider.js"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "main": "../../build/cjs/context-post-item-context-provider.js"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "main": "../../build/cjs/context-related-posts-context-provider.js"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "main": "../../build/cjs/context-tag-item-context-provider.js"
3
+ }