@prezly/theme-kit-nextjs 1.6.4-3 → 1.7.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/getNewsroomServerSideProps.js +63 -9
- package/build/adapter-nextjs/getNewsroomServerSideProps.js.map +1 -1
- package/build/adapter-nextjs/index.js +14 -2
- package/build/adapter-nextjs/index.js.map +1 -1
- package/build/adapter-nextjs/processRequest.js +25 -10
- package/build/adapter-nextjs/processRequest.js.map +1 -1
- package/build/components-nextjs/PageSeo/PageSeo.js +58 -43
- package/build/components-nextjs/PageSeo/PageSeo.js.map +1 -1
- package/build/components-nextjs/PageSeo/index.js +16 -2
- package/build/components-nextjs/PageSeo/index.js.map +1 -1
- package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js +6 -2
- package/build/components-nextjs/PageSeo/lib/getAbsoluteUrl.js.map +1 -1
- package/build/components-nextjs/PageSeo/lib/types.js +2 -1
- package/build/components-nextjs/Sitemap/SitemapBuilder.js +22 -18
- package/build/components-nextjs/Sitemap/SitemapBuilder.js.map +1 -1
- package/build/components-nextjs/Sitemap/createPaths.js +45 -10
- package/build/components-nextjs/Sitemap/createPaths.js.map +1 -1
- package/build/components-nextjs/Sitemap/getInitialProps.js +75 -23
- package/build/components-nextjs/Sitemap/getInitialProps.js.map +1 -1
- package/build/components-nextjs/Sitemap/index.js +20 -4
- package/build/components-nextjs/Sitemap/index.js.map +1 -1
- package/build/components-nextjs/Sitemap/types.js +2 -1
- package/build/components-nextjs/StorySeo/StorySeo.js +34 -26
- package/build/components-nextjs/StorySeo/StorySeo.js.map +1 -1
- package/build/components-nextjs/StorySeo/index.js +5 -1
- package/build/components-nextjs/StorySeo/index.js.map +1 -1
- package/build/components-nextjs/index.js +18 -3
- package/build/components-nextjs/index.js.map +1 -1
- package/build/data-fetching/api/PrezlyApi.js +297 -132
- package/build/data-fetching/api/PrezlyApi.js.map +1 -1
- package/build/data-fetching/api/getPrezlyApi.js +9 -5
- package/build/data-fetching/api/getPrezlyApi.js.map +1 -1
- package/build/data-fetching/api/index.js +14 -2
- package/build/data-fetching/api/index.js.map +1 -1
- package/build/data-fetching/api/languages.js +85 -43
- package/build/data-fetching/api/languages.js.map +1 -1
- package/build/data-fetching/api/queries.js +45 -13
- package/build/data-fetching/api/queries.js.map +1 -1
- package/build/data-fetching/constants.js +5 -2
- package/build/data-fetching/constants.js.map +1 -1
- package/build/data-fetching/getAssetsUrl.js +7 -3
- package/build/data-fetching/getAssetsUrl.js.map +1 -1
- package/build/data-fetching/getLocalizedCategoryData.js +32 -15
- package/build/data-fetching/getLocalizedCategoryData.js.map +1 -1
- package/build/data-fetching/getNewsroomLogoUrl.js +12 -6
- package/build/data-fetching/getNewsroomLogoUrl.js.map +1 -1
- package/build/data-fetching/getPrivacyPortalUrl.js +7 -3
- package/build/data-fetching/getPrivacyPortalUrl.js.map +1 -1
- package/build/data-fetching/getStoryPublicationDate.js +6 -2
- package/build/data-fetching/getStoryPublicationDate.js.map +1 -1
- package/build/data-fetching/getUploadcareGroupUrl.js +7 -3
- package/build/data-fetching/getUploadcareGroupUrl.js.map +1 -1
- package/build/data-fetching/index.js +22 -10
- package/build/data-fetching/index.js.map +1 -1
- package/build/data-fetching/lib/getAlgoliaSettings.js +10 -6
- package/build/data-fetching/lib/getAlgoliaSettings.js.map +1 -1
- package/build/data-fetching/lib/getEnvVariables.js +29 -11
- package/build/data-fetching/lib/getEnvVariables.js.map +1 -1
- package/build/data-fetching/lib/index.js +5 -1
- package/build/data-fetching/lib/index.js.map +1 -1
- package/build/data-fetching/types.js +2 -1
- package/build/index.js +19 -7
- package/build/index.js.map +1 -1
- package/build/infinite-loading/apiHandlers/fetchGalleries.js +69 -15
- package/build/infinite-loading/apiHandlers/fetchGalleries.js.map +1 -1
- package/build/infinite-loading/apiHandlers/fetchStories.js +71 -17
- package/build/infinite-loading/apiHandlers/fetchStories.js.map +1 -1
- package/build/infinite-loading/apiHandlers/index.js +7 -2
- package/build/infinite-loading/apiHandlers/index.js.map +1 -1
- package/build/infinite-loading/index.js +21 -5
- package/build/infinite-loading/index.js.map +1 -1
- package/build/infinite-loading/types.js +2 -1
- package/build/infinite-loading/useInfiniteGalleriesLoading.js +83 -25
- package/build/infinite-loading/useInfiniteGalleriesLoading.js.map +1 -1
- package/build/infinite-loading/useInfiniteLoading.js +97 -21
- package/build/infinite-loading/useInfiniteLoading.js.map +1 -1
- package/build/infinite-loading/useInfiniteStoriesLoading.js +99 -36
- package/build/infinite-loading/useInfiniteStoriesLoading.js.map +1 -1
- package/build/intl/index.d.ts +1 -2
- package/build/intl/index.js +21 -5
- package/build/intl/index.js.map +1 -1
- package/build/intl/lang.js +11 -4
- package/build/intl/lang.js.map +1 -1
- package/build/intl/locale.js +27 -21
- package/build/intl/locale.js.map +1 -1
- package/build/intl/localeConfig.d.ts +2 -1
- package/build/intl/localeConfig.js +30 -8
- package/build/intl/localeConfig.js.map +1 -1
- package/build/intl/localeList.d.ts +56 -4
- package/build/intl/localeList.js +2 -1
- package/build/intl/localeList.js.map +1 -1
- package/build/intl/localeObject.js +49 -30
- package/build/intl/localeObject.js.map +1 -1
- package/build/newsroom-context/context.js +34 -18
- package/build/newsroom-context/context.js.map +1 -1
- package/build/newsroom-context/hooks/index.js +23 -11
- package/build/newsroom-context/hooks/index.js.map +1 -1
- package/build/newsroom-context/hooks/useAlgoliaSettings.js +7 -3
- package/build/newsroom-context/hooks/useAlgoliaSettings.js.map +1 -1
- package/build/newsroom-context/hooks/useCategories.js +7 -3
- package/build/newsroom-context/hooks/useCategories.js.map +1 -1
- package/build/newsroom-context/hooks/useCompanyInformation.js +7 -3
- package/build/newsroom-context/hooks/useCompanyInformation.js.map +1 -1
- package/build/newsroom-context/hooks/useCurrentCategory.js +7 -3
- package/build/newsroom-context/hooks/useCurrentCategory.js.map +1 -1
- package/build/newsroom-context/hooks/useCurrentLocale.js +7 -3
- package/build/newsroom-context/hooks/useCurrentLocale.js.map +1 -1
- package/build/newsroom-context/hooks/useCurrentStory.js +7 -3
- package/build/newsroom-context/hooks/useCurrentStory.js.map +1 -1
- package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js +15 -11
- package/build/newsroom-context/hooks/useGetLinkLocaleSlug.js.map +1 -1
- package/build/newsroom-context/hooks/useGetTranslationUrl.js +24 -15
- package/build/newsroom-context/hooks/useGetTranslationUrl.js.map +1 -1
- package/build/newsroom-context/hooks/useLanguages.js +7 -3
- package/build/newsroom-context/hooks/useLanguages.js.map +1 -1
- package/build/newsroom-context/hooks/useNewsroom.js +7 -3
- package/build/newsroom-context/hooks/useNewsroom.js.map +1 -1
- package/build/newsroom-context/hooks/useNewsroomContext.js +8 -4
- package/build/newsroom-context/hooks/useNewsroomContext.js.map +1 -1
- package/build/newsroom-context/index.js +17 -2
- package/build/newsroom-context/index.js.map +1 -1
- package/build/types.js +2 -1
- package/package.json +3 -5
- package/src/intl/index.ts +1 -2
- package/src/intl/{localeConfig.ts → localeConfig.js} +3 -3
- package/src/intl/{localeList.ts → localeList.js} +1 -1
- package/src/intl/localeObject.ts +1 -1
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
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);
|
|
3
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/newsroom-context/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/newsroom-context/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAA2F;AAAlF,0GAAA,eAAe,OAAA;AAAE,kHAAA,uBAAuB,OAAA;AACjD,0CAAwB"}
|
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.
|
|
3
|
+
"version": "1.7.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",
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
"build",
|
|
9
9
|
"src"
|
|
10
10
|
],
|
|
11
|
-
"type": "module",
|
|
12
11
|
"engines": {
|
|
13
12
|
"node": ">= 14.x",
|
|
14
13
|
"npm": ">= 7.x"
|
|
@@ -53,7 +52,7 @@
|
|
|
53
52
|
"@react-hookz/web": "^13.2.1",
|
|
54
53
|
"next-seo": "^5.4.0",
|
|
55
54
|
"parse-data-url": "^4.0.1",
|
|
56
|
-
"string-strip-html": "^
|
|
55
|
+
"string-strip-html": "^8.3.0"
|
|
57
56
|
},
|
|
58
57
|
"devDependencies": {
|
|
59
58
|
"@prezly/eslint-config": "^4.0.0",
|
|
@@ -69,6 +68,5 @@
|
|
|
69
68
|
},
|
|
70
69
|
"publishConfig": {
|
|
71
70
|
"access": "public"
|
|
72
|
-
}
|
|
73
|
-
"prettier": "@prezly/eslint-config/prettier"
|
|
71
|
+
}
|
|
74
72
|
}
|
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
|
+
const supportedLocales = require('./localeList');
|
|
7
7
|
|
|
8
|
-
const lowercaseLocales =
|
|
8
|
+
const lowercaseLocales = supportedLocales.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
|
+
module.exports = lowercaseLocalPermutations;
|
package/src/intl/localeObject.ts
CHANGED