@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.
@@ -1,3 +1,3 @@
1
1
  import type { GetServerSidePropsContext, GetStaticPropsContext } from 'next';
2
2
  import type { PageProps } from '../../../types';
3
- export declare type PropsFunction<CustomProps, Context extends GetServerSidePropsContext | GetStaticPropsContext = GetServerSidePropsContext> = (context: Context, props: PageProps) => CustomProps | Promise<CustomProps>;
3
+ export type PropsFunction<CustomProps, Context extends GetServerSidePropsContext | GetStaticPropsContext = GetServerSidePropsContext> = (context: Context, props: PageProps) => CustomProps | Promise<CustomProps>;
@@ -1,4 +1,4 @@
1
- export declare type SitemapUrl = {
1
+ export type SitemapUrl = {
2
2
  location: string;
3
3
  changeFrequency?: string;
4
4
  priority?: string;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { NextSeoProps } from 'next-seo';
3
- declare type Props = NextSeoProps & {
3
+ type Props = NextSeoProps & {
4
4
  imageUrl?: string;
5
5
  };
6
6
  /**
@@ -1,4 +1,4 @@
1
- export declare type AlternateLanguageLink = {
1
+ export type AlternateLanguageLink = {
2
2
  href: string;
3
3
  hrefLang: string;
4
4
  };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { ExtendedStory } from '@prezly/sdk';
3
- declare type Props = {
3
+ type Props = {
4
4
  story: ExtendedStory;
5
5
  noindex?: boolean;
6
6
  };
@@ -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
- declare type SortOrder = 'desc' | 'asc';
5
+ type SortOrder = 'desc' | 'asc';
6
6
  interface GetStoriesOptions {
7
7
  page?: number;
8
8
  pageSize?: number;
@@ -1,2 +1,3 @@
1
- export { NewsroomContext, NewsroomContextProvider, NewsroomContextProps } from './context';
1
+ export { NewsroomContext, NewsroomContextProvider } from './context';
2
+ export type { NewsroomContextProps } from './context';
2
3
  export * from './hooks';
@@ -1,2 +1,2 @@
1
- export { NewsroomContext, NewsroomContextProvider, NewsroomContextProps } from "./context.js";
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,EAAwB,MAAM,WAAW,CAAC;AAC3F,cAAc,SAAS,CAAC"}
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 declare type AlgoliaStory = Pick<Story, 'uuid' | 'slug' | 'title' | 'subtitle'> & Pick<Story.ExtraFields, 'thumbnail_image'> & {
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;
@@ -1,6 +1,6 @@
1
1
  import type { Newsroom } from '@prezly/sdk';
2
2
  import type { LocaleObject } from '../intl';
3
- declare type PrivacyPortalUrlOptions = {
3
+ type PrivacyPortalUrlOptions = {
4
4
  email?: string;
5
5
  action?: 'data-request' | 'subscribe' | 'unsubscribe';
6
6
  };
@@ -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('/', '_'))}.zip`;
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,GAAG,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC;AAClG,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"}
@@ -1,5 +1,5 @@
1
1
  import type { Story } from '@prezly/sdk';
2
- export declare type EmbargoStory = Omit<Story, 'is_embargo' | 'published_at'> & {
2
+ export type EmbargoStory = Omit<Story, 'is_embargo' | 'published_at'> & {
3
3
  is_embargo: true;
4
4
  published_at: string;
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/theme-kit-nextjs",
3
- "version": "2.0.0-2",
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": "^7.19.4",
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.17.1",
74
- "@types/jest": "29.2.0",
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.24",
78
- "@types/react-dom": "18.0.8",
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.26.0",
81
- "jest": "29.2.2",
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.8.4"
86
+ "typescript": "4.9.3"
87
87
  },
88
88
  "publishConfig": {
89
89
  "access": "public"