🎉 New Features & Improvements
- Design Library Early Access enablers:
🛠 Breaking Changes
-
Refactored
SitecoreProvider
and enhancedSitecoreClient
(#158):Reworked
SitecoreProvider
and Context- Refactored components that use
SitecoreProvider
and related utilities. SitecoreProvider
now accepts apage
prop (Page
type fromSitecoreClient
) instead oflayoutData
.- Context state updates:
pageContext
→ renamed topage
.page
representsPage
interface.setContext
→ renamed tosetPage
. The method updates thepage
state.
- Removed
SitecoreProviderPageContext
interface.- Consumers should now access
page
via thePage
interface.
- Consumers should now access
Updated
withSitecore
anduseSitecore
APIs- Updated naming for clarity and consistency:
pageContext
→page
updateContext
→updatePage
Improvements to
SitecoreClient
-
Type cleanup and consistency:
- Removed
NextjsPage
interface. - All methods that generate page data now return a consistent
Page
object. - Properties
componentProps
andnotFound
are now part of theSitecorePageProps
interface and are treated as optional. SitecorePageProps
now requires a standalonepage
field instead of merging all data into one props object.
- Removed
-
New
getErrorPage()
method:- Replaces
getErrorPages()
, exposing only necessary data. - Introduces a new
ErrorPage
enum to select specific error types (e.g.,ErrorPage.NotFound
)
- Replaces
-
New
PageMode
Type- The
Page
type now includes amode
field of typePageMode
, providing runtime context (e.g. editing, design library, preview). - Replaces older properties like
pageState
,pageEditing
,componentType
.
mode: { isNormal: boolean; isPreview: boolean; isEditing: boolean; isDesignLibrary: boolean; }
- The
DesignLibrary Component
- The
DesignLibrary
component no longer accepts alayoutData
prop. - It now accesses
page
directly fromSitecoreProvider
.
- Refactored components that use
-
Refactor and simplify service names (#133):
You will be affected by the following changes only if:
- You are referencing Content SDK services directly rather than using the
SitecoreClient
methods.
If you're using the
SitecoreClient
to access services, no changes are required.Service class and config names have been refactored for clarity and consistency:
- Renamed:
RestComponentLayoutService
→ComponentLayoutService
RestComponentLayoutServiceConfig
→ComponentLayoutServiceConfig
GraphQLEditingService
→EditingService
GraphQLEditingServiceConfig
→EditingServiceConfig
GraphQLDictionaryService
→DictionaryService
GraphQLDictionaryServiceConfig
→DictionaryServiceConfig
GraphQLLayoutService
→LayoutService
GraphQLLayoutServiceConfig
→LayoutServiceConfig
GraphQLPersonalizeService
→PersonalizeService
GraphQLPersonalizeServiceConfig
→PersonalizeServiceConfig
GraphQLErrorPagesService
→ErrorPagesService
GraphQLErrorPagesServiceConfig
→ErrorPagesServiceConfig
GraphQLRedirectsService
→RedirectsService
GraphQLRedirectsServiceConfig
→RedirectsServiceConfig
GraphQLRobotsService
→RobotsService
GraphQLRobotsServiceConfig
→RobotsServiceConfig
GraphQLSiteInfoService
→SiteInfoService
GraphQLSiteInfoServiceConfig
→SiteInfoServiceConfig
GraphQLSitemapXmlService
→SitemapXmlService
GraphQLSitemapXmlServiceConfig
→SitemapXmlServiceConfig
GraphQLSitePathService
→SitePathService
GraphQLSitePathServiceConfig
→SitePathServiceConfig
- Removed
DictionaryService
interface
- You are referencing Content SDK services directly rather than using the
-
[core]
[nextjs]
[templates/nextjs]
Refactor site resolution logic across packages (#141)(#155)- Removed
sites
parameter fromSitecoreClientInit
type - Removed
SiteResolver
dependency andresolveSite()
fromSitecoreClient
- Removed support for passing a custom siteResolver to
SitecoreClient
- Updated
SitecoreClient
to construct thePage
usingsiteName
instead of the fullSiteInfo
. - Updated SitecoreClient's
getPagePaths()
to accept asites
parameter - Modified the
getPagePaths
method inSitecoreClient
to accept asites
parameter. - Updated Next.js
SitemapMiddleware
andRobotsMiddleware
to use their own instance ofSiteResolver
and accept asites
parameter via the constructor.
- Removed
🐛 Bug Fixes
[nextjs]
Ensure Redirect Middleware handles case-insensitive path matching to prevent missed redirects due to casing differences (#159)[core]
[nextjs]
Standardized way of handling contextId/clientContextId and related fallbacks (#150)
🧹 Chores
- Add Github action workflow to generate package size and test coverage metrics report (#151)