@prezly/theme-kit-nextjs 2.0.0-2 → 2.0.0-4
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/lib/types.d.ts +1 -1
- package/build/adapter-nextjs/page-props/sitemap/types.d.ts +1 -1
- package/build/components-nextjs/PageSeo/PageSeo.d.ts +1 -1
- package/build/components-nextjs/PageSeo/lib/types.d.ts +1 -1
- package/build/components-nextjs/StorySeo/StorySeo.d.ts +1 -1
- package/build/data-fetching/api/PrezlyApi.d.ts +1 -1
- package/build/newsroom-context/index.d.ts +2 -1
- package/build/newsroom-context/index.js +1 -1
- package/build/newsroom-context/index.js.map +1 -1
- package/build/types.d.ts +1 -1
- package/build/utils/getPrivacyPortalUrl.d.ts +1 -1
- package/build/utils/getUploadcareGroupUrl.js +1 -1
- package/build/utils/getUploadcareGroupUrl.js.map +1 -1
- package/build/utils/isEmbargoStory.d.ts +1 -1
- package/package.json +9 -9
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { GetServerSidePropsContext, GetStaticPropsContext } from 'next';
|
|
2
2
|
import type { PageProps } from '../../../types';
|
|
3
|
-
export
|
|
3
|
+
export type PropsFunction<CustomProps, Context extends GetServerSidePropsContext | GetStaticPropsContext = GetServerSidePropsContext> = (context: Context, props: PageProps) => CustomProps | Promise<CustomProps>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { Category, Newsroom, NewsroomLanguageSettings, Stories, Story } from '@prezly/sdk';
|
|
3
3
|
import type { IncomingMessage } from 'http';
|
|
4
4
|
import type { PageProps, ServerSidePageProps } from '../../types';
|
|
5
|
-
|
|
5
|
+
type SortOrder = 'desc' | 'asc';
|
|
6
6
|
interface GetStoriesOptions {
|
|
7
7
|
page?: number;
|
|
8
8
|
pageSize?: number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { NewsroomContext, NewsroomContextProvider
|
|
1
|
+
export { NewsroomContext, NewsroomContextProvider } from "./context.js";
|
|
2
2
|
export * from "./hooks/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/newsroom-context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/newsroom-context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAErE,cAAc,SAAS,CAAC"}
|
package/build/types.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface AlgoliaCategoryRef {
|
|
|
24
24
|
/**
|
|
25
25
|
* Stories in Algolia index are stored in a simplified format, with only minimal subset of fields.
|
|
26
26
|
*/
|
|
27
|
-
export
|
|
27
|
+
export type AlgoliaStory = Pick<Story, 'uuid' | 'slug' | 'title' | 'subtitle'> & Pick<Story.ExtraFields, 'thumbnail_image'> & {
|
|
28
28
|
content_text: string;
|
|
29
29
|
updated_at: number;
|
|
30
30
|
published_at: number;
|
|
@@ -8,5 +8,5 @@ import { ASSETS_URL } from "./constants.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export function getUploadcareGroupUrl(uuid, title) {
|
|
10
10
|
// UploadCare doesn't like slashes in filenames even in encoded form.
|
|
11
|
-
return `${ASSETS_URL}/${uuid}/archive/zip/${encodeURIComponent(title.replace(
|
|
11
|
+
return `${ASSETS_URL}/${uuid}/archive/zip/${encodeURIComponent(title.replace(/\//g, '_'))}.zip`;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUploadcareGroupUrl.js","sourceRoot":"","sources":["../../src/utils/getUploadcareGroupUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAY,EAAE,KAAa;IAC7D,qEAAqE;IACrE,OAAO,GAAG,UAAU,IAAI,IAAI,gBAAgB,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"getUploadcareGroupUrl.js","sourceRoot":"","sources":["../../src/utils/getUploadcareGroupUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAY,EAAE,KAAa;IAC7D,qEAAqE;IACrE,OAAO,GAAG,UAAU,IAAI,IAAI,gBAAgB,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC;AACpG,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prezly/theme-kit-nextjs",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-4",
|
|
4
4
|
"description": "Data layer and utility library for developing Prezly themes with NextJS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -66,24 +66,24 @@
|
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@babel/cli": "7.19.3",
|
|
69
|
-
"@babel/preset-env": "
|
|
69
|
+
"@babel/preset-env": "7.20.2",
|
|
70
70
|
"@babel/preset-react": "7.18.6",
|
|
71
71
|
"@babel/preset-typescript": "7.18.6",
|
|
72
72
|
"@prezly/eslint-config": "4.2.0",
|
|
73
|
-
"@sentry/nextjs": "7.
|
|
74
|
-
"@types/jest": "29.2.
|
|
73
|
+
"@sentry/nextjs": "7.20.0",
|
|
74
|
+
"@types/jest": "29.2.3",
|
|
75
75
|
"@types/node": "17.0.14",
|
|
76
76
|
"@types/parse-data-url": "3.0.0",
|
|
77
|
-
"@types/react": "18.0.
|
|
78
|
-
"@types/react-dom": "18.0.
|
|
77
|
+
"@types/react": "18.0.25",
|
|
78
|
+
"@types/react-dom": "18.0.9",
|
|
79
79
|
"babel-plugin-add-import-extension": "1.6.0",
|
|
80
|
-
"eslint": "8.
|
|
81
|
-
"jest": "29.
|
|
80
|
+
"eslint": "8.27.0",
|
|
81
|
+
"jest": "29.3.1",
|
|
82
82
|
"np": "7.6.2",
|
|
83
83
|
"prettier": "2.7.1",
|
|
84
84
|
"rimraf": "3.0.2",
|
|
85
85
|
"ts-jest": "29.0.3",
|
|
86
|
-
"typescript": "4.
|
|
86
|
+
"typescript": "4.9.3"
|
|
87
87
|
},
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|