@prezly/theme-kit-nextjs 7.1.0 → 7.3.0
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/build/adapter-nextjs/page-props/galleryAlbum.js +1 -0
- package/build/adapter-nextjs/page-props/galleryAlbum.js.map +1 -1
- package/build/newsroom-context/context.d.ts +6 -2
- package/build/newsroom-context/context.js +2 -1
- package/build/newsroom-context/context.js.map +1 -1
- package/package.json +5 -5
|
@@ -15,6 +15,7 @@ function getGalleryAlbumPageServerSideProps(customProps) {
|
|
|
15
15
|
if (!gallery || (0, theme_kit_core_1.isGalleryEmpty)(gallery)) {
|
|
16
16
|
return { notFound: true };
|
|
17
17
|
}
|
|
18
|
+
serverSideProps.newsroomContextProps.currentGallery = gallery;
|
|
18
19
|
return (0, processRequest_1.processRequest)(context, {
|
|
19
20
|
...serverSideProps,
|
|
20
21
|
gallery,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"galleryAlbum.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/galleryAlbum.ts"],"names":[],"mappings":";;;AACA,2DAAwD;AASxD,uDAA0D;AAC1D,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAQ/D,SAAgB,kCAAkC,CAC9C,WAAqD;IAErD,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,uDAA0B,EAAC,OAAO,CAAC,CAAC;QAE3E,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,MAA0B,CAAC;QACpD,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAExC,IAAI,CAAC,OAAO,IAAI,IAAA,+BAAc,EAAC,OAAO,CAAC,EAAE,CAAC;YACtC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC9B,CAAC;QAED,OAAO,IAAA,+BAAc,EACjB,OAAO,EACP;YACI,GAAG,eAAe;YAClB,OAAO;YACP,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAA0C,CAAC,OAAO,EAAE,eAAe,CAAC;gBAC7E,CAAC,CAAC,WAAW,CAAC;SACrB,EACD,gBAAgB,IAAI,EAAE,CACzB,CAAC;IACN,CAAC,CAAC;AACN,CAAC;
|
|
1
|
+
{"version":3,"file":"galleryAlbum.js","sourceRoot":"","sources":["../../../src/adapter-nextjs/page-props/galleryAlbum.ts"],"names":[],"mappings":";;;AACA,2DAAwD;AASxD,uDAA0D;AAC1D,8EAA2E;AAC3E,sEAAmE;AACnE,sDAAmD;AACnD,kEAA+D;AAQ/D,SAAgB,kCAAkC,CAC9C,WAAqD;IAErD,OAAO,KAAK,UAAU,kBAAkB,CACpC,OAAkC;QAElC,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,uDAA0B,EAAC,OAAO,CAAC,CAAC;QAE3E,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,MAA0B,CAAC;QACpD,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAExC,IAAI,CAAC,OAAO,IAAI,IAAA,+BAAc,EAAC,OAAO,CAAC,EAAE,CAAC;YACtC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC9B,CAAC;QAED,eAAe,CAAC,oBAAoB,CAAC,cAAc,GAAG,OAAO,CAAC;QAE9D,OAAO,IAAA,+BAAc,EACjB,OAAO,EACP;YACI,GAAG,eAAe;YAClB,OAAO;YACP,GAAG,CAAC,OAAO,WAAW,KAAK,UAAU;gBACjC,CAAC,CAAC,MAAO,WAA0C,CAAC,OAAO,EAAE,eAAe,CAAC;gBAC7E,CAAC,CAAC,WAAW,CAAC;SACrB,EACD,gBAAgB,IAAI,EAAE,CACzB,CAAC;IACN,CAAC,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, NewsroomLanguageSettings, NewsroomThemePreset, Notification } from '@prezly/sdk';
|
|
1
|
+
import type { Category, Culture, ExtendedStory, Newsroom, NewsroomCompanyInformation, NewsroomContact, NewsroomGallery, NewsroomLanguageSettings, NewsroomThemePreset, Notification } from '@prezly/sdk';
|
|
2
2
|
import { LocaleObject } from '@prezly/theme-kit-core';
|
|
3
3
|
import type { AlgoliaSettings } from '@prezly/theme-kit-core/server';
|
|
4
4
|
import type { PropsWithChildren } from 'react';
|
|
@@ -24,6 +24,10 @@ export interface NewsroomContextType {
|
|
|
24
24
|
* Optional: Refers to a currently selected category when navigated to `/category/[slug]` page.
|
|
25
25
|
*/
|
|
26
26
|
currentCategory?: Category;
|
|
27
|
+
/**
|
|
28
|
+
* Optional: Refers to a currently selected media gallery when navigated to `/media/album/[uuid]` page.
|
|
29
|
+
*/
|
|
30
|
+
currentGallery?: NewsroomGallery;
|
|
27
31
|
/**
|
|
28
32
|
* Optional: Refers to a currently selected story when navigated to `/[slug]` page.
|
|
29
33
|
*/
|
|
@@ -59,4 +63,4 @@ export declare const NewsroomContext: import("react").Context<NewsroomContextTyp
|
|
|
59
63
|
* This context provides common Newsroom information retrieved by `getNewsroomServerSideProps` helper.
|
|
60
64
|
* Please refer to the `NewsroomContextType` definition for more info on what's exposed from the context.
|
|
61
65
|
*/
|
|
62
|
-
export declare function NewsroomContextProvider({ categories, contacts, newsroom, currentCategory, currentStory, companyInformation, languages, localeCode, notifications, themePreset, algoliaSettings, children, }: PropsWithChildren<NewsroomContextProps>): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export declare function NewsroomContextProvider({ categories, contacts, newsroom, currentCategory, currentGallery, currentStory, companyInformation, languages, localeCode, notifications, themePreset, algoliaSettings, children, }: PropsWithChildren<NewsroomContextProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,13 +9,14 @@ exports.NewsroomContext = (0, react_1.createContext)(undefined);
|
|
|
9
9
|
* This context provides common Newsroom information retrieved by `getNewsroomServerSideProps` helper.
|
|
10
10
|
* Please refer to the `NewsroomContextType` definition for more info on what's exposed from the context.
|
|
11
11
|
*/
|
|
12
|
-
function NewsroomContextProvider({ categories, contacts, newsroom, currentCategory, currentStory, companyInformation, languages, localeCode, notifications, themePreset, algoliaSettings, children, }) {
|
|
12
|
+
function NewsroomContextProvider({ categories, contacts, newsroom, currentCategory, currentGallery, currentStory, companyInformation, languages, localeCode, notifications, themePreset, algoliaSettings, children, }) {
|
|
13
13
|
const locale = (0, react_1.useMemo)(() => theme_kit_core_1.LocaleObject.fromAnyCode(localeCode || theme_kit_core_1.DEFAULT_LOCALE), [localeCode]);
|
|
14
14
|
return ((0, jsx_runtime_1.jsx)(exports.NewsroomContext.Provider, { value: {
|
|
15
15
|
categories,
|
|
16
16
|
contacts,
|
|
17
17
|
newsroom,
|
|
18
18
|
currentCategory,
|
|
19
|
+
currentGallery,
|
|
19
20
|
currentStory,
|
|
20
21
|
companyInformation,
|
|
21
22
|
languages,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/newsroom-context/context.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/newsroom-context/context.tsx"],"names":[],"mappings":";;;;AAYA,2DAAsE;AAGtE,iCAA+C;AA4DlC,QAAA,eAAe,GAAG,IAAA,qBAAa,EAAkC,SAAS,CAAC,CAAC;AAEzF;;;GAGG;AACH,SAAgB,uBAAuB,CAAC,EACpC,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,aAAa,EACb,WAAW,EACX,eAAe,EACf,QAAQ,GAC8B;IACtC,MAAM,MAAM,GAAG,IAAA,eAAO,EAClB,GAAG,EAAE,CAAC,6BAAY,CAAC,WAAW,CAAC,UAAU,IAAI,+BAAc,CAAC,EAC5D,CAAC,UAAU,CAAC,CACf,CAAC;IAEF,OAAO,CACH,uBAAC,uBAAe,CAAC,QAAQ,IACrB,KAAK,EAAE;YACH,UAAU;YACV,QAAQ;YACR,QAAQ;YACR,eAAe;YACf,cAAc;YACd,YAAY;YACZ,kBAAkB;YAClB,SAAS;YACT,MAAM;YACN,aAAa;YACb,WAAW;YACX,eAAe;SAClB,YAEA,QAAQ,GACc,CAC9B,CAAC;AACN,CAAC;AAxCD,0DAwCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prezly/theme-kit-nextjs",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"description": "Data layer and utility library for developing Prezly themes with NextJS",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"@playwright/test": "1.x",
|
|
63
|
-
"@prezly/sdk": "^18.3.0",
|
|
63
|
+
"@prezly/sdk": "^18.3.0 || ^19.0.0",
|
|
64
64
|
"next": "^12.x || ^13.x || ^14.x",
|
|
65
65
|
"react": "^17.x || ^18.x",
|
|
66
66
|
"react-dom": "^17.x || ^18.x"
|
|
@@ -71,16 +71,16 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@prezly/theme-kit-core": "^7.
|
|
74
|
+
"@prezly/theme-kit-core": "^7.2.0",
|
|
75
75
|
"@technically/omit-undefined": "^1.0.2",
|
|
76
76
|
"next-seo": "^5.4.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@sentry/nextjs": "7.
|
|
79
|
+
"@sentry/nextjs": "7.93.0"
|
|
80
80
|
},
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
84
|
"sideEffects": false,
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "7c05126f687eb562409e0dbad1ceb77813c7ce5b"
|
|
86
86
|
}
|