@se-studio/core-ui 1.30.0 → 1.30.1
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/CHANGELOG.md +9 -0
- package/CMS_INFRASTRUCTURE.md +1 -1
- package/README.md +2 -1
- package/dist/CmsRendererConfig.d.ts +9 -1
- package/dist/CmsRendererConfig.d.ts.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/index.js.map +1 -1
- package/docs/PACKAGE_EXPORT_BOUNDARIES.md +1 -1
- package/docs/llms.md +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @se-studio/core-ui
|
|
2
2
|
|
|
3
|
+
## 1.30.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 91eebfb: Optional `maxItems` on FetchOptions / LinkFetchOptions. `contentfulAll*Links` memoizes the full catalog once per request and slices `maxItems` for that caller (`pageSize` stays the CDA chunk; `count` stays post-filter). Direct `fetchAllLinks` still stops paging at the cap. Add `IListCard` and `articleLinkToListCard` for RSC listing UIs.
|
|
8
|
+
- Updated dependencies [91eebfb]
|
|
9
|
+
- @se-studio/core-data-types@1.13.5
|
|
10
|
+
- @se-studio/contentful-rest-api@1.27.2
|
|
11
|
+
|
|
3
12
|
## 1.30.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
package/CMS_INFRASTRUCTURE.md
CHANGED
|
@@ -286,7 +286,7 @@ Error panels (unknown types, render errors) are shown when `!buildInformation.is
|
|
|
286
286
|
- **`hidden` entities:** Entity fetchers (`getPageWithErrors`, `getArticleWithErrors`, etc.) return `null` data when the entity has `hidden === true` in production. Callers treat `null` as `notFound()`. In non-production environments, hidden entities are returned normally so content authors can preview them.
|
|
287
287
|
- **`indexed` filtering:** Link fetchers (`getAllPageLinks`, `getAllArticleLinks`, etc.) exclude entries with `indexed === false` by default. Pass `{ allowUnindexed: true }` (via `LinkFetchOptions`) to include them. This applies in all environments. `filterRelatedArticles`, `getRelatedPeople`, and `getRelatedTags` apply the same rule on auto-filled slots.
|
|
288
288
|
- **Link-shaped UI and revalidation:** Collection `contents` link refs (person, article, tag) provide **selection and order only**. `getRelatedArticles`, `getRelatedPeople`, and `getRelatedTags` always resolve display fields from `getAll*Links` listing fetches (`article`, `person`, `tag` cache tags). Entity detail routes use entity fetches (`article#slug`, etc.). Do not render portraits, titles, or hrefs from embedded page-include link objects in collection renderers.
|
|
289
|
-
- **Full-list article filtering (`getAllArticleLinks`):** Pass article filter criteria directly: `articleTypeSlugs`/`articleTypeIds`, `tagSlugs`/`tagIds`, `tagType*`, `authorSlugs`/`authorIds` + `strictAuthorMatch: true` (hard filter for person pages), `before`/`after`, `excludeArticleIds`, `count`. The wrapper in `createAppHelpers` runs the base list through `filterRelatedArticles` (after indexed filtering). Use for News Grids / Publications Lists / ArticleFilter collections that need the *complete* matching set (client-side search UI, "latest N" on indexes, person-scoped lists). See also `getRelatedArticles` for limited related sets driven by collection `links`.
|
|
289
|
+
- **Full-list article filtering (`getAllArticleLinks`):** Pass article filter criteria directly: `articleTypeSlugs`/`articleTypeIds`, `tagSlugs`/`tagIds`, `tagType*`, `authorSlugs`/`authorIds` + `strictAuthorMatch: true` (hard filter for person pages), `before`/`after`, `excludeArticleIds`, `count`. Optional `maxItems` slices this caller after a shared unbounded CDA memo (omit = full memoized list). `pageSize` is the CDA chunk only. `count` is ranked top-N after `filterRelatedArticles` and is not the same as `maxItems` plus filters. The wrapper in `createAppHelpers` runs the base list through `filterRelatedArticles` (after indexed filtering). Use for News Grids / Publications Lists / ArticleFilter collections that need the *complete* matching set (client-side search UI, "latest N" on indexes, person-scoped lists). Render listing cards as **RSC children**; pass slim `IListCard` / filter meta to client islands — never `IArticleLink[]`. See also `getRelatedArticles` for limited related sets driven by collection `links`.
|
|
290
290
|
- **Related Articles tag criteria (`getRelatedArticles`):** Tag filters are taken from tag links in the collection `links` or `contents`. When none are set, `applyFallbackCriteria` uses `pageContext.tag.id` (tag index pages), then `pageContext.article.tags` (article detail pages). Explicit CMS tag links always win. When `tagIds` reach `filterRelatedArticles`, articles must match at least one tag (OR semantics).
|
|
291
291
|
- **`buildPageMetadata`** calls `notFound()` when `model.hidden === true` in production, providing a second safety net at the metadata layer.
|
|
292
292
|
|
package/README.md
CHANGED
|
@@ -426,6 +426,7 @@ const previewConfig = mergeCmsRendererConfig(
|
|
|
426
426
|
#### Server-only exports (import from `@se-studio/core-ui/server`)
|
|
427
427
|
- **`createAppHelpers`** — Factory for `getAll*Links`, `getPageWithErrors`, `getRelatedArticles`, `getSitemapEntries` (when configured), etc. Wire with your converterContext + buildOptions.
|
|
428
428
|
- **`filterRelatedArticles`** + **`RelatedArticlesOptions`** — Re-export of the pure article list filter/ranker (articleType/tag/author/tagType slugs+ids, strict author mode, scoring, dates, etc.). Use in collection renderers or custom full-list logic (e.g. News Grids, person-scoped Publications lists). `getAllArticleLinks(options)` on the helpers already applies these filters when you pass `articleTypeSlugs`, `strictAuthorMatch`, etc.
|
|
429
|
+
- **`articleLinkToListCard`** — Maps `IArticleLink` → `IListCard` for RSC listing rows. Collection files should import this from `/server`, not the rest-api main barrel.
|
|
429
430
|
- **`getRelatedArticles`** / **`getRelatedPeople`** / **`getRelatedTags`** (also re-exported here for server collections)
|
|
430
431
|
- **`buildListingItems`** / **`buildListingStructuredDataContext`** — ItemList JSON-LD context for article-type, tag, and person listing pages (async CMS fetch via `getAllArticleLinks` + `filterRelatedArticles`)
|
|
431
432
|
|
|
@@ -443,7 +444,7 @@ const previewConfig = mergeCmsRendererConfig(
|
|
|
443
444
|
- **`MarketingSiteSitemapConfig`** - Config for `getSitemapEntries` when using createAppHelpers (optional articlesSlug when enableArticleTypeIndex, tagsSlug, enableArticleTypeIndex, other feature flags, optional additionalSources)
|
|
444
445
|
- **`AppHelpersWithSitemap`** - Return type of `createAppHelpers` when `marketingSiteSitemap` is provided; use when you need to type helpers that include `getSitemapEntries`
|
|
445
446
|
- **`SitemapEntry`**, **`SitemapSource`**, **`GenerateSitemapOptions`** - Types for building custom sitemap sources
|
|
446
|
-
- **`LinkFetchOptions`** - Options for all `getAll*Links` helpers (and `rendererConfig.fetchHelpers`). Article-specific keys (`articleTypeSlugs`, `tagSlugs`, `authorSlugs`, `strictAuthorMatch`, `tagType*`, `before`/`after`, `count`, `excludeArticleIds`) only affect `getAllArticleLinks` (delegated to `filterRelatedArticles` after the raw fetch + indexed filter).
|
|
447
|
+
- **`LinkFetchOptions`** - Options for all `getAll*Links` helpers (and `rendererConfig.fetchHelpers`). Article-specific keys (`articleTypeSlugs`, `tagSlugs`, `authorSlugs`, `strictAuthorMatch`, `tagType*`, `before`/`after`, `count`, `excludeArticleIds`) only affect `getAllArticleLinks` (delegated to `filterRelatedArticles` after the raw fetch + indexed filter). `pageSize` is the CDA chunk; `maxItems` (docs alias: fetch `limit`) slices this caller after a shared unbounded listing memo; `count` is the post-filter slice.
|
|
447
448
|
|
|
448
449
|
For detailed JSDoc documentation on all exports, see the TypeScript declaration files (`.d.ts`) in the package.
|
|
449
450
|
|
|
@@ -67,8 +67,16 @@ export type LinkFetchOptions = Partial<FetchOptions> & {
|
|
|
67
67
|
* Only affects getAllArticleLinks. Default `listing`.
|
|
68
68
|
*/
|
|
69
69
|
fetchProfile?: 'page' | 'listing';
|
|
70
|
-
/** Pagination page size for getAllArticleLinks. Default 100. */
|
|
70
|
+
/** Pagination page size for getAllArticleLinks. Default 100. CDA chunk only — not a total cap. */
|
|
71
71
|
pageSize?: number;
|
|
72
|
+
/**
|
|
73
|
+
* Slice this caller's result after the shared unbounded listing memo.
|
|
74
|
+
* Distinct from `pageSize` (CDA chunk) and `count` (post-filter slice).
|
|
75
|
+
* Docs alias: fetch `limit`. Omit = return the full memoized list.
|
|
76
|
+
* Direct `fetchAllLinks` still stops paging when `maxItems` is set.
|
|
77
|
+
* `contentfulAllArticleLinksForIntegrity` ignores `maxItems`.
|
|
78
|
+
*/
|
|
79
|
+
maxItems?: number;
|
|
72
80
|
};
|
|
73
81
|
/** Fetch helpers for components that need to load data (avoids circular cms-server imports) */
|
|
74
82
|
export type FetchHelpers = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsRendererConfig.d.ts","sourceRoot":"","sources":["../src/CmsRendererConfig.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,aAAa,EACb,WAAW,EACX,QAAQ,EACT,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,iCAAiC,EACjC,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,4BAA4B,EAC5B,oBAAoB,EACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAExE,+DAA+D;AAC/D,MAAM,MAAM,qBAAqB,GAC7B;IACE,0BAA0B,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,0BAA0B,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,0BAA0B,EAAE,MAAM,GAAG,SAAS,CAAC;CAChD,GACD,SAAS,CAAC;AAEd,2FAA2F;AAC3F,MAAM,MAAM,cAAc,GAAG;IAC3B,sBAAsB,EAAE,CAAC,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;;;OAUG;IACH,oBAAoB,EAAE,oBAAoB,CAAC;IAE3C;;;;;;OAMG;IACH,iCAAiC,CAAC,EAAE,iCAAiC,CAAC;IAEtE;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,EAAE,OAAO,CACxB,MAAM,CACJ,MAAM,EACN,KAAK,CAAC,EAAE,CAAC;QACP,WAAW,EAAE,GAAG,CAAC;QACjB,cAAc,EAAE,eAAe,CAAC;KACjC,CAAC,CACH,CACF,CAAC;IAEF;;;OAGG;IACH,+BAA+B,CAAC,EAAE,MAAM,CAAC;IAEzC;;;;OAIG;IACH,gCAAgC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAErD;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAEvC;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,eAAe,KAAK,KAAK,CAAC,SAAS,CAAC;IAElF;;;;OAIG;IACH,cAAc,EAAE,cAAc,CAAC;IAE/B;;;OAGG;IACH,YAAY,EAAE,YAAY,CAAC;IAE3B;;;OAGG;IACH,gBAAgB,EAAE,iBAAiB,CAAC;IAEpC,wBAAwB,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACjD,yBAAyB,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;CACpD"}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'server-only';
|
|
2
2
|
export type { RelatedArticlesOptions } from '@se-studio/contentful-rest-api';
|
|
3
|
-
export { filterRelatedArticles } from '@se-studio/contentful-rest-api';
|
|
3
|
+
export { articleLinkToListCard, filterRelatedArticles } from '@se-studio/contentful-rest-api';
|
|
4
4
|
export type { AppHelpers, AppHelpersConfig, AppHelpersWithSitemap, } from '../app-helpers';
|
|
5
5
|
export { createAppHelpers } from '../app-helpers';
|
|
6
6
|
export type { AgentDiscoveryLinkOptions } from '../utils/agent-ready';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,YAAY,EACV,UAAU,EACV,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAC/B,6BAA6B,EAC7B,sBAAsB,EACtB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EACL,wCAAwC,EACxC,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,oCAAoC,GACrC,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,iBAAiB,EACjB,iCAAiC,GAClC,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,uBAAuB,EACvB,cAAc,EACd,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,eAAe,EACf,8BAA8B,GAC/B,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EACV,wBAAwB,EACxB,uBAAuB,EACvB,2BAA2B,EAC3B,iCAAiC,EACjC,8BAA8B,EAC9B,0BAA0B,EAC1B,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/server/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'server-only';
|
|
2
|
-
export { filterRelatedArticles } from '@se-studio/contentful-rest-api';
|
|
2
|
+
export { articleLinkToListCard, filterRelatedArticles } from '@se-studio/contentful-rest-api';
|
|
3
3
|
export { createAppHelpers } from '../app-helpers';
|
|
4
4
|
export { apiPathNeedingTrailingSlash, appendAgentDiscoveryLinkHeaders, buildAgentDiscoveryLinkValues, htmlPathToMarkdownPath, prefersMarkdownAccept, resolveMarkdownNegotiationPath, } from '../utils/agent-ready';
|
|
5
5
|
export { DEFAULT_RELATED_ARTICLES_FALLBACK_POLICY, getRelatedArticles, getRelatedPeople, getRelatedTags, resolveRelatedArticlesFallbackPolicy, } from '../utils/componentUtils';
|
package/dist/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAM9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAC/B,6BAA6B,EAC7B,sBAAsB,EACtB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,wCAAwC,EACxC,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,oCAAoC,GACrC,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EACL,iBAAiB,EACjB,iCAAiC,GAClC,MAAM,gCAAgC,CAAC;AAOxC,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,eAAe,EACf,8BAA8B,GAC/B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAuBvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -11,7 +11,7 @@ Next.js App Router mixes **Server Components** and **Client Components** (`'use
|
|
|
11
11
|
| Entry | Who may import | Contents |
|
|
12
12
|
|-------|----------------|----------|
|
|
13
13
|
| `@se-studio/core-ui` | **Everyone** — `'use client'` files, server components, registrations | React UI, hooks, `cn`, CMS renderers, registration helpers, shared types |
|
|
14
|
-
| `@se-studio/core-ui/server` | **Server only** — `import 'server-only'` at top | `createAppHelpers`, `createRouteHandlers`, `getRelated*`, `filterRelatedArticles`, listing structured-data helpers, etc. |
|
|
14
|
+
| `@se-studio/core-ui/server` | **Server only** — `import 'server-only'` at top | `createAppHelpers`, `createRouteHandlers`, `getRelated*`, `filterRelatedArticles`, `articleLinkToListCard`, listing structured-data helpers, etc. |
|
|
15
15
|
| `@se-studio/core-ui/route-handlers` | **App route modules** (Node `fs`) | Discovery/guidelines/cms.txt/OG image handlers |
|
|
16
16
|
|
|
17
17
|
**Do not add a `/client` entry** unless you want stricter enforcement. The main barrel *is* the client-safe surface; `/server` is the explicit server escape hatch.
|
package/docs/llms.md
CHANGED
|
@@ -392,7 +392,7 @@ import type { CmsRouteConfig } from '@se-studio/core-ui/server';
|
|
|
392
392
|
|
|
393
393
|
Resolve canonical path with `findCanonicalPath(testsByPath, variantSlug)` from `@se-studio/ab-testing`.
|
|
394
394
|
|
|
395
|
-
`getRelatedArticles` tag criteria: explicit tag links in the collection → `pageContext.tag` → `pageContext.article.tags`. Pass via `rendererConfig.fetchHelpers.getRelatedArticles` in collections (do not import `cms-server` in registrations). Curated article/person/tag refs in `contents` are **selection and order only** — `getRelated*` helpers always hydrate from `getAll*Links` so publish webhooks revalidate link-shaped UI. For full-list cases (News Grids, Publications Lists, person-scoped or tag-filtered indexes) use `rendererConfig.fetchHelpers.getAllArticleLinks?.({ articleTypeSlugs: [...], tagSlugs: [...], authorIds: [...], strictAuthorMatch: true, ... })` — the wrapper applies `filterRelatedArticles` (OR semantics, scoring, indexed rules). Import `filterRelatedArticles` / `RelatedArticlesOptions` (and the richer `LinkFetchOptions`) from `@se-studio/core-ui/server`. For all people (e.g. team index collections), use `rendererConfig.fetchHelpers.getAllPersonLinks?.()` — returns `CmsResponse<IPersonLink[]>` including resolved `bio` when set. For related tag chips/lists, use `rendererConfig.fetchHelpers.getRelatedTags?.(information, contentContext, count)`.
|
|
395
|
+
`getRelatedArticles` tag criteria: explicit tag links in the collection → `pageContext.tag` → `pageContext.article.tags`. Pass via `rendererConfig.fetchHelpers.getRelatedArticles` in collections (do not import `cms-server` in registrations). Curated article/person/tag refs in `contents` are **selection and order only** — `getRelated*` helpers always hydrate from `getAll*Links` so publish webhooks revalidate link-shaped UI. For full-list cases (News Grids, Publications Lists, person-scoped or tag-filtered indexes) use `rendererConfig.fetchHelpers.getAllArticleLinks?.({ articleTypeSlugs: [...], tagSlugs: [...], authorIds: [...], strictAuthorMatch: true, count?, ... })` — the wrapper applies `filterRelatedArticles` (OR semantics, scoring, indexed rules). `maxItems` slices this caller after a shared unbounded listing memo; `pageSize` is the CDA chunk; `count` is post-filter top-N. Map to `IListCard` on the server (`articleLinkToListCard` from `@se-studio/core-ui/server`) and pass RSC card children + slim filter meta to client islands — never `IArticleLink[]`. Import `filterRelatedArticles` / `RelatedArticlesOptions` (and the richer `LinkFetchOptions`) from `@se-studio/core-ui/server`. For all people (e.g. team index collections), use `rendererConfig.fetchHelpers.getAllPersonLinks?.()` — returns `CmsResponse<IPersonLink[]>` including resolved `bio` when set. For related tag chips/lists, use `rendererConfig.fetchHelpers.getRelatedTags?.(information, contentContext, count)`.
|
|
396
396
|
|
|
397
397
|
## App route factories (`@se-studio/core-ui/route-handlers`)
|
|
398
398
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@se-studio/core-ui",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.1",
|
|
4
4
|
"description": "Shared React UI component library with Tailwind CSS v4 for SE Studio applications",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"@contentful/rich-text-react-renderer": "^16.2.2",
|
|
77
77
|
"@contentful/rich-text-types": "^17.2.7",
|
|
78
78
|
"@radix-ui/react-slot": "1.3.3",
|
|
79
|
-
"@se-studio/contentful-rest-api": "1.27.
|
|
80
|
-
"@se-studio/core-data-types": "1.13.
|
|
79
|
+
"@se-studio/contentful-rest-api": "1.27.2",
|
|
80
|
+
"@se-studio/core-data-types": "1.13.5",
|
|
81
81
|
"@types/mustache": "4.2.6",
|
|
82
82
|
"@vimeo/player": "^2.30.4",
|
|
83
83
|
"clsx": "^2.1.1",
|