@prezly/theme-kit-nextjs 1.6.4-0 → 1.6.4-3
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/getNewsroomServerSideProps.js +9 -63
- package/build/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -1
- package/build/adapter-nextjs/index.js +2 -14
- package/build/adapter-nextjs/index.js.map +1 -1
- package/build/adapter-nextjs/processRequest.js +10 -25
- package/build/adapter-nextjs/processRequest.js.map +1 -1
- package/build/components-nextjs/PageSeo/PageSeo.js +43 -58
- package/build/components-nextjs/PageSeo/PageSeo.js.map +1 -1
- package/build/components-nextjs/PageSeo/index.js +2 -16
- package/build/components-nextjs/PageSeo/index.js.map +1 -1
- package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js +2 -6
- package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +1 -1
- package/build/components-nextjs/PageSeo/lib/types.js +1 -2
- package/build/components-nextjs/Sitemap/SitemapBuilder.js +18 -22
- package/build/components-nextjs/Sitemap/SitemapBuilder.js.map +1 -1
- package/build/components-nextjs/Sitemap/createPaths.js +10 -45
- package/build/components-nextjs/Sitemap/createPaths.js.map +1 -1
- package/build/components-nextjs/Sitemap/getInitialProps.js +23 -75
- package/build/components-nextjs/Sitemap/getInitialProps.js.map +1 -1
- package/build/components-nextjs/Sitemap/index.js +4 -20
- package/build/components-nextjs/Sitemap/index.js.map +1 -1
- package/build/components-nextjs/Sitemap/types.js +1 -2
- package/build/components-nextjs/StorySeo/StorySeo.js +26 -34
- package/build/components-nextjs/StorySeo/StorySeo.js.map +1 -1
- package/build/components-nextjs/StorySeo/index.js +1 -5
- package/build/components-nextjs/StorySeo/index.js.map +1 -1
- package/build/components-nextjs/index.js +3 -18
- package/build/components-nextjs/index.js.map +1 -1
- package/build/data-fetching/api/PrezlyApi.js +132 -297
- package/build/data-fetching/api/PrezlyApi.js.map +1 -1
- package/build/data-fetching/api/getPrezlyApi.js +5 -9
- package/build/data-fetching/api/getPrezlyApi.js.map +1 -1
- package/build/data-fetching/api/index.js +2 -14
- package/build/data-fetching/api/index.js.map +1 -1
- package/build/data-fetching/api/languages.js +43 -85
- package/build/data-fetching/api/languages.js.map +1 -1
- package/build/data-fetching/api/queries.js +13 -45
- package/build/data-fetching/api/queries.js.map +1 -1
- package/build/data-fetching/constants.js +2 -5
- package/build/data-fetching/constants.js.map +1 -1
- package/build/data-fetching/getAssetsUrl.js +3 -7
- package/build/data-fetching/getAssetsUrl.js.map +1 -1
- package/build/data-fetching/getLocalizedCategoryData.js +15 -32
- package/build/data-fetching/getLocalizedCategoryData.js.map +1 -1
- package/build/data-fetching/getNewsroomLogoUrl.js +6 -12
- package/build/data-fetching/getNewsroomLogoUrl.js.map +1 -1
- package/build/data-fetching/getPrivacyPortalUrl.js +3 -7
- package/build/data-fetching/getPrivacyPortalUrl.js.map +1 -1
- package/build/data-fetching/getStoryPublicationDate.js +2 -6
- package/build/data-fetching/getStoryPublicationDate.js.map +1 -1
- package/build/data-fetching/getUploadcareGroupUrl.js +3 -7
- package/build/data-fetching/getUploadcareGroupUrl.js.map +1 -1
- package/build/data-fetching/index.js +10 -22
- package/build/data-fetching/index.js.map +1 -1
- package/build/data-fetching/lib/getAlgoliaSettings.js +6 -10
- package/build/data-fetching/lib/getAlgoliaSettings.js.map +1 -1
- package/build/data-fetching/lib/getEnvVariables.js +11 -29
- package/build/data-fetching/lib/getEnvVariables.js.map +1 -1
- package/build/data-fetching/lib/index.js +1 -5
- package/build/data-fetching/lib/index.js.map +1 -1
- package/build/data-fetching/types.js +1 -2
- package/build/index.js +7 -19
- package/build/index.js.map +1 -1
- package/build/infinite-loading/apiHandlers/fetchGalleries.js +15 -69
- package/build/infinite-loading/apiHandlers/fetchGalleries.js.map +1 -1
- package/build/infinite-loading/apiHandlers/fetchStories.js +17 -71
- package/build/infinite-loading/apiHandlers/fetchStories.js.map +1 -1
- package/build/infinite-loading/apiHandlers/index.js +2 -7
- package/build/infinite-loading/apiHandlers/index.js.map +1 -1
- package/build/infinite-loading/index.js +5 -21
- package/build/infinite-loading/index.js.map +1 -1
- package/build/infinite-loading/types.js +1 -2
- package/build/infinite-loading/useInfiniteGalleriesLoading.js +25 -83
- package/build/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -1
- package/build/infinite-loading/useInfiniteLoading.js +21 -97
- package/build/infinite-loading/useInfiniteLoading.js.map +1 -1
- package/build/infinite-loading/useInfiniteStoriesLoading.js +36 -99
- package/build/infinite-loading/useInfiniteStoriesLoading.js.map +1 -1
- package/build/intl/index.d.ts +2 -1
- package/build/intl/index.js +5 -21
- package/build/intl/index.js.map +1 -1
- package/build/intl/lang.js +4 -11
- package/build/intl/lang.js.map +1 -1
- package/build/intl/locale.js +21 -27
- package/build/intl/locale.js.map +1 -1
- package/build/intl/localeConfig.d.ts +1 -2
- package/build/intl/localeConfig.js +8 -30
- package/build/intl/localeConfig.js.map +1 -1
- package/build/intl/localeList.d.ts +4 -56
- package/build/intl/localeList.js +1 -2
- package/build/intl/localeList.js.map +1 -1
- package/build/intl/localeObject.js +30 -49
- package/build/intl/localeObject.js.map +1 -1
- package/build/newsroom-context/context.js +18 -34
- package/build/newsroom-context/context.js.map +1 -1
- package/build/newsroom-context/hooks/index.js +11 -23
- package/build/newsroom-context/hooks/index.js.map +1 -1
- package/build/newsroom-context/hooks/useAlgoliaSettings.js +3 -7
- package/build/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -1
- package/build/newsroom-context/hooks/useCategories.js +3 -7
- package/build/newsroom-context/hooks/useCategories.js.map +1 -1
- package/build/newsroom-context/hooks/useCompanyInformation.js +3 -7
- package/build/newsroom-context/hooks/useCompanyInformation.js.map +1 -1
- package/build/newsroom-context/hooks/useCurrentCategory.js +3 -7
- package/build/newsroom-context/hooks/useCurrentCategory.js.map +1 -1
- package/build/newsroom-context/hooks/useCurrentLocale.js +3 -7
- package/build/newsroom-context/hooks/useCurrentLocale.js.map +1 -1
- package/build/newsroom-context/hooks/useCurrentStory.js +3 -7
- package/build/newsroom-context/hooks/useCurrentStory.js.map +1 -1
- package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js +11 -15
- package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -1
- package/build/newsroom-context/hooks/useGetTranslationUrl.js +15 -24
- package/build/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -1
- package/build/newsroom-context/hooks/useLanguages.js +3 -7
- package/build/newsroom-context/hooks/useLanguages.js.map +1 -1
- package/build/newsroom-context/hooks/useNewsroom.js +3 -7
- package/build/newsroom-context/hooks/useNewsroom.js.map +1 -1
- package/build/newsroom-context/hooks/useNewsroomContext.js +4 -8
- package/build/newsroom-context/hooks/useNewsroomContext.js.map +1 -1
- package/build/newsroom-context/index.js +2 -17
- package/build/newsroom-context/index.js.map +1 -1
- package/build/types.js +1 -2
- package/package.json +4 -2
- package/src/intl/index.ts +2 -1
- package/src/intl/{localeConfig.js → localeConfig.ts} +3 -3
- package/src/intl/{localeList.js → localeList.ts} +1 -1
- package/src/intl/localeObject.ts +1 -1
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.NewsroomContextProvider = exports.NewsroomContext = void 0;
|
|
14
|
-
var context_1 = require("./context");
|
|
15
|
-
Object.defineProperty(exports, "NewsroomContext", { enumerable: true, get: function () { return context_1.NewsroomContext; } });
|
|
16
|
-
Object.defineProperty(exports, "NewsroomContextProvider", { enumerable: true, get: function () { return context_1.NewsroomContextProvider; } });
|
|
17
|
-
__exportStar(require("./hooks"), exports);
|
|
1
|
+
export { NewsroomContext, NewsroomContextProvider } from './context';
|
|
2
|
+
export * from './hooks';
|
|
18
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/newsroom-context/index.ts"],"names":[],"mappings":"
|
|
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"}
|
package/build/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prezly/theme-kit-nextjs",
|
|
3
|
-
"version": "1.6.4-
|
|
3
|
+
"version": "1.6.4-3",
|
|
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",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"build",
|
|
9
9
|
"src"
|
|
10
10
|
],
|
|
11
|
+
"type": "module",
|
|
11
12
|
"engines": {
|
|
12
13
|
"node": ">= 14.x",
|
|
13
14
|
"npm": ">= 7.x"
|
|
@@ -68,5 +69,6 @@
|
|
|
68
69
|
},
|
|
69
70
|
"publishConfig": {
|
|
70
71
|
"access": "public"
|
|
71
|
-
}
|
|
72
|
+
},
|
|
73
|
+
"prettier": "@prezly/eslint-config/prettier"
|
|
72
74
|
}
|
package/src/intl/index.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Together with permutation performed lower in the code,
|
|
4
4
|
* the exported list represents all of the possible locale codes that Next.js theme application might accept.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
import { localeList } from './localeList';
|
|
7
7
|
|
|
8
|
-
const lowercaseLocales =
|
|
8
|
+
const lowercaseLocales = localeList.map((l) => l.toLowerCase());
|
|
9
9
|
|
|
10
10
|
// Get all permutations for the shorter locale codes supported by Prezly (e.g. short region codes and neutral language codes)
|
|
11
11
|
const lowercaseLocalPermutations = Array.from(
|
|
@@ -16,4 +16,4 @@ const lowercaseLocalPermutations = Array.from(
|
|
|
16
16
|
]),
|
|
17
17
|
).sort();
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
export const localeConfig = lowercaseLocalPermutations;
|
package/src/intl/localeObject.ts
CHANGED