@prezly/theme-kit-nextjs 6.4.6-alpha.1 → 6.5.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/README.md CHANGED
@@ -73,6 +73,10 @@ module.exports = withPrezlyConfig(config);
73
73
 
74
74
  You can also add the properties manually if you want even more control over the config.
75
75
 
76
+ #### Usage with `basePath` setting
77
+
78
+ When using `basePath` setting in your next.config.js, wrapping your config with `withPrezlyConfig` will automatically populate `NEXT_PUBLIC_BASE_PATH` env variable, which will be respected by Theme Kit helpers and hooks (like `useInfiniteStoriesLoading`). We also export `getResolvedPath` helper that can be used to resolve paths with respect to your `basePath` setting.
79
+
76
80
  #### Using next/image to display images served from Prezly
77
81
 
78
82
  We provide `@prezly/uploadcare-image` package to conveniently display images inside Prezly content, and this is the recommended way to display images in your theme.
package/build/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './intl';
4
4
  export * from './newsroom-context';
5
5
  export * from './sentry';
6
6
  export * from './types';
7
+ export * from './utils';
package/build/index.js CHANGED
@@ -20,4 +20,5 @@ __exportStar(require("./intl"), exports);
20
20
  __exportStar(require("./newsroom-context"), exports);
21
21
  __exportStar(require("./sentry"), exports);
22
22
  __exportStar(require("./types"), exports);
23
+ __exportStar(require("./utils"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,qDAAmC;AACnC,yCAAuB;AACvB,qDAAmC;AACnC,2CAAyB;AACzB,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,qDAAmC;AACnC,yCAAuB;AACvB,qDAAmC;AACnC,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB"}
@@ -15,7 +15,7 @@ function getRedirectToCanonicalLocale(shortestLocaleCode, nextLocaleIsoCode, red
15
15
  ? theme_kit_core_1.LocaleObject.fromAnyCode(shortestLocaleCode).toUrlSlug()
16
16
  : shortestLocaleCode;
17
17
  if (shortestLocaleSlug !== nextLocaleIsoCode) {
18
- const prefixedPath = redirectPath.startsWith('/') ? redirectPath : `/${redirectPath}`;
18
+ const prefixedPath = redirectPath && !redirectPath.startsWith('/') ? `/${redirectPath}` : redirectPath;
19
19
  const finalPath = shortestLocaleSlug
20
20
  ? `/${shortestLocaleSlug}${prefixedPath}`
21
21
  : prefixedPath;
@@ -1 +1 @@
1
- {"version":3,"file":"locale.js","sourceRoot":"","sources":["../../src/intl/locale.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AAGtD,6CAAwC;AAExC,oCAA2C;AAE3C,oIAAoI;AACvH,QAAA,oBAAoB,GAAG,UAAU,CAAC;AAE/C,SAAgB,4BAA4B,CACxC,kBAAkC,EAClC,iBAAqC,EACrC,YAAoB,EACpB,KAAsB;IAEtB,+EAA+E;IAC/E,IAAI,CAAC,iBAAiB,IAAI,iBAAiB,KAAK,4BAAoB,EAAE;QAClE,OAAO,SAAS,CAAC;KACpB;IAED,MAAM,kBAAkB,GAAG,kBAAkB;QACzC,CAAC,CAAC,6BAAY,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,SAAS,EAAE;QAC1D,CAAC,CAAC,kBAAkB,CAAC;IAEzB,IAAI,kBAAkB,KAAK,iBAAiB,EAAE;QAC1C,MAAM,YAAY,GAAG,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,YAAY,EAAE,CAAC;QACtF,MAAM,SAAS,GAAG,kBAAkB;YAChC,CAAC,CAAC,IAAI,kBAAkB,GAAG,YAAY,EAAE;YACzC,CAAC,CAAC,YAAY,CAAC;QAEnB,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,IAAA,uBAAS,EAAC,KAAK,C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D,SAAS,EAAE,KAAK;SACnB,CAAC;KACL;IAED,OAAO,SAAS,CAAC;AACrB,CAAC;AA/BD,oEA+BC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/theme-kit-nextjs",
3
- "version": "6.4.6-alpha.1",
3
+ "version": "6.5.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",
@@ -71,7 +71,7 @@
71
71
  }
72
72
  },
73
73
  "dependencies": {
74
- "@prezly/theme-kit-core": "^6.4.6-alpha.0",
74
+ "@prezly/theme-kit-core": "^6.5.0",
75
75
  "next-seo": "^5.4.0"
76
76
  },
77
77
  "devDependencies": {
@@ -81,5 +81,5 @@
81
81
  "access": "public"
82
82
  },
83
83
  "sideEffects": false,
84
- "gitHead": "19e5d6a949578977c48eff0db851b9e032ce9345"
84
+ "gitHead": "d93fbf2e1019c10c59facf7ca0323fe968d07718"
85
85
  }