@koine/next 2.0.0-beta.54 → 2.0.0-beta.55

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,5 +1,5 @@
1
1
  export type AnalyticsGoogleProps = {
2
2
  id?: string;
3
3
  };
4
- export declare const AnalyticsGoogle: ({ id }: AnalyticsGoogleProps) => import("react/jsx-runtime").JSX.Element | null;
4
+ export declare let AnalyticsGoogle: ({ id }: AnalyticsGoogleProps) => import("react/jsx-runtime").JSX.Element | null;
5
5
  export default AnalyticsGoogle;
@@ -1,2 +1,2 @@
1
- export declare const DisableErrorOverlay: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare let DisableErrorOverlay: () => import("react/jsx-runtime").JSX.Element;
2
2
  export default DisableErrorOverlay;
package/12/Seo.d.ts CHANGED
@@ -1,6 +1,12 @@
1
1
  import type { NextSeoProps } from "next-seo/lib/types";
2
2
  import { type LinkTag, type MetaTag } from "./seoBuildTags";
3
- import type { SeoData } from "./types-seo";
3
+ export type SeoData = {
4
+ hidden?: boolean;
5
+ title?: string;
6
+ description?: string;
7
+ keywords?: string | string[];
8
+ ogimage?: string;
9
+ };
4
10
  type SeoPropsOpenGraph = NextSeoProps["openGraph"] & {
5
11
  image?: string;
6
12
  };
@@ -13,5 +19,5 @@ export type SeoProps = Omit<NextSeoProps, "additionalMetaTags" | "additionalLink
13
19
  openGraph?: SeoPropsOpenGraph;
14
20
  og?: SeoPropsOpenGraph;
15
21
  };
16
- export declare const Seo: (props: SeoProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare let Seo: (props: SeoProps) => import("react/jsx-runtime").JSX.Element;
17
23
  export default Seo;
@@ -1,8 +1,10 @@
1
1
  import type { DefaultSeoProps } from "next-seo/lib/types";
2
+ import type { JsonObject } from "@koine/utils";
2
3
  import { type LinkTag, type MetaTag } from "./seoBuildTags";
3
4
  export type SeoDefaultsProps = Omit<DefaultSeoProps, "additionalMetaTags" | "additionalLinkTags" | "dangerouslySetAllPagesToNoIndex" | "dangerouslySetAllPagesToNoFollow" | "defaultOpenGraphImageWidth" | "defaultOpenGraphImageHeight" | "defaultOpenGraphVideoWidth" | "defaultOpenGraphVideoHeight" | "mobileAlternate" | "robotsProps"> & {
4
5
  metaTags?: ReadonlyArray<MetaTag>;
5
6
  linkTags?: ReadonlyArray<LinkTag>;
7
+ schema?: JsonObject;
6
8
  };
7
- export declare const SeoDefaults: (props: SeoDefaultsProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare let SeoDefaults: (props: SeoDefaultsProps) => import("react/jsx-runtime").JSX.Element;
8
10
  export default SeoDefaults;
@@ -4,5 +4,5 @@ import type { SeoDefaultsProps } from "./SeoDefaults";
4
4
  export type MetaTag = React.DetailedHTMLProps<React.MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>;
5
5
  export type LinkTag = React.DetailedHTMLProps<React.LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>;
6
6
  type BuildTagsParams = SeoProps & SeoDefaultsProps;
7
- export declare const seoBuildTags: ({ seo, hidden, keywords, title, titleTemplate, defaultTitle, noindex, nofollow, description, languageAlternates, twitter, facebook, openGraph, og: ogAlias, canonical, metaTags, linkTags, }?: BuildTagsParams) => React.ReactNode[];
7
+ export declare const seoBuildTags: ({ seo, hidden, keywords, title, titleTemplate, defaultTitle, noindex, nofollow, description, languageAlternates, twitter, facebook, openGraph, og: ogAlias, canonical, metaTags, linkTags, schema, }?: BuildTagsParams) => React.ReactNode[];
8
8
  export default seoBuildTags;
package/12/types.d.ts CHANGED
@@ -1 +1,2 @@
1
+ export type { SeoData } from "./Seo";
1
2
  export type { SeoDefaultsProps } from "./SeoDefaults";
package/12.cjs.js CHANGED
@@ -14,15 +14,15 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
14
14
  var o__default = /*#__PURE__*/_interopDefaultLegacy(o);
15
15
  var r__default = /*#__PURE__*/_interopDefaultLegacy(r);
16
16
 
17
- const AnalyticsGoogle=({id:i})=>{let l=i||process.env.NEXT_PUBLIC_GTM_ID,{events:m,asPath:c,query:d}=router.useRouter(),[p,f]=react.useState(!1),[w,u]=react.useState(!1);return (react.useEffect(()=>{let e=()=>{u(!0);};return m.on("routeChangeComplete",e),()=>{m.off("routeChangeComplete",e);}},[m]),react.useEffect(()=>{w&&p&&c&&browser.gtagPageview(c);},[c,d,w,p]),l)?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(o__default["default"],{id:"google-tagmanager",src:`https://www.googletagmanager.com/gtag/js?id=${i}`,strategy:"afterInteractive",onLoad:()=>f(!0)}),jsxRuntime.jsx(o__default["default"],{id:"google-analytics",strategy:"afterInteractive",children:`
17
+ let AnalyticsGoogle=({id:s})=>{let l=s||process.env.NEXT_PUBLIC_GTM_ID,{events:m,asPath:c,query:d}=router.useRouter(),[p,f]=react.useState(!1),[w,u]=react.useState(!1);return (react.useEffect(()=>{let e=()=>{u(!0);};return m.on("routeChangeComplete",e),()=>{m.off("routeChangeComplete",e);}},[m]),react.useEffect(()=>{w&&p&&c&&browser.gtagPageview(c);},[c,d,w,p]),l)?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(o__default["default"],{id:"google-tagmanager",src:`https://www.googletagmanager.com/gtag/js?id=${s}`,strategy:"afterInteractive",onLoad:()=>f(!0)}),jsxRuntime.jsx(o__default["default"],{id:"google-analytics",strategy:"afterInteractive",children:`
18
18
  window.dataLayer = window.dataLayer || [];
19
19
  function gtag(){window.dataLayer.push(arguments);}
20
20
  gtag('js', new Date());
21
21
 
22
- gtag('config', '${i}', { 'send_page_view': false });
22
+ gtag('config', '${s}', { 'send_page_view': false });
23
23
  `})]}):null};
24
24
 
25
- const DisableErrorOverlay=()=>jsxRuntime.jsx(r__default["default"],{children:"development"===process.env.NODE_ENV&&jsxRuntime.jsx("script",{dangerouslySetInnerHTML:{__html:"window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});"}})});
25
+ let DisableErrorOverlay=()=>jsxRuntime.jsx(r__default["default"],{children:"development"===process.env.NODE_ENV&&jsxRuntime.jsx("script",{dangerouslySetInnerHTML:{__html:"window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});"}})});
26
26
 
27
27
  exports.AnalyticsGoogle = AnalyticsGoogle;
28
28
  exports.DisableErrorOverlay = DisableErrorOverlay;
package/12.esm.js CHANGED
@@ -5,14 +5,14 @@ import { useState, useEffect } from 'react';
5
5
  import { gtagPageview } from '@koine/browser';
6
6
  import r from 'next/head';
7
7
 
8
- const AnalyticsGoogle=({id:i})=>{let l=i||process.env.NEXT_PUBLIC_GTM_ID,{events:m,asPath:c,query:d}=useRouter(),[p,f]=useState(!1),[w,u]=useState(!1);return (useEffect(()=>{let e=()=>{u(!0);};return m.on("routeChangeComplete",e),()=>{m.off("routeChangeComplete",e);}},[m]),useEffect(()=>{w&&p&&c&&gtagPageview(c);},[c,d,w,p]),l)?jsxs(Fragment,{children:[jsx(o,{id:"google-tagmanager",src:`https://www.googletagmanager.com/gtag/js?id=${i}`,strategy:"afterInteractive",onLoad:()=>f(!0)}),jsx(o,{id:"google-analytics",strategy:"afterInteractive",children:`
8
+ let AnalyticsGoogle=({id:s})=>{let l=s||process.env.NEXT_PUBLIC_GTM_ID,{events:m,asPath:c,query:d}=useRouter(),[p,f]=useState(!1),[w,u]=useState(!1);return (useEffect(()=>{let e=()=>{u(!0);};return m.on("routeChangeComplete",e),()=>{m.off("routeChangeComplete",e);}},[m]),useEffect(()=>{w&&p&&c&&gtagPageview(c);},[c,d,w,p]),l)?jsxs(Fragment,{children:[jsx(o,{id:"google-tagmanager",src:`https://www.googletagmanager.com/gtag/js?id=${s}`,strategy:"afterInteractive",onLoad:()=>f(!0)}),jsx(o,{id:"google-analytics",strategy:"afterInteractive",children:`
9
9
  window.dataLayer = window.dataLayer || [];
10
10
  function gtag(){window.dataLayer.push(arguments);}
11
11
  gtag('js', new Date());
12
12
 
13
- gtag('config', '${i}', { 'send_page_view': false });
13
+ gtag('config', '${s}', { 'send_page_view': false });
14
14
  `})]}):null};
15
15
 
16
- const DisableErrorOverlay=()=>jsx(r,{children:"development"===process.env.NODE_ENV&&jsx("script",{dangerouslySetInnerHTML:{__html:"window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});"}})});
16
+ let DisableErrorOverlay=()=>jsx(r,{children:"development"===process.env.NODE_ENV&&jsx("script",{dangerouslySetInnerHTML:{__html:"window.addEventListener('error',event =>{event.stopImmediatePropagation()});window.addEventListener('unhandledrejection',event =>{event.stopImmediatePropagation()});"}})});
17
17
 
18
18
  export { AnalyticsGoogle, DisableErrorOverlay };
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "name": "@koine/next",
3
3
  "sideEffects": false,
4
4
  "dependencies": {
5
- "@koine/browser": "2.0.0-beta.54",
6
- "@koine/react": "2.0.0-beta.54",
7
- "@koine/utils": "2.0.0-beta.54",
8
- "@koine/i18n": "2.0.0-beta.54"
5
+ "@koine/browser": "2.0.0-beta.55",
6
+ "@koine/react": "2.0.0-beta.55",
7
+ "@koine/utils": "2.0.0-beta.55",
8
+ "@koine/i18n": "2.0.0-beta.55"
9
9
  },
10
10
  "peerDependencies": {
11
11
  "next": "^14.0.4",
@@ -46,5 +46,5 @@
46
46
  },
47
47
  "module": "./index.esm.js",
48
48
  "main": "./index.cjs.js",
49
- "version": "2.0.0-beta.54"
49
+ "version": "2.0.0-beta.55"
50
50
  }
package/typings.d.ts CHANGED
@@ -1,3 +1,16 @@
1
+ /**
2
+ * Nx types
3
+ *
4
+ * Allow to embed SVGs as both URLs string and as React components
5
+ */
6
+ declare module "*.svg" {
7
+ const content: unknown;
8
+ export const ReactComponent: import("react").FC<
9
+ import("react").ComponentProps<"svg">
10
+ >;
11
+ export default content;
12
+ }
13
+
1
14
  /**
2
15
  * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
3
16
  */
@@ -11,7 +24,7 @@ type NextGetStaticPathsResult<Params extends { [key: string]: any }> = Omit<
11
24
  /**
12
25
  * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
13
26
  */
14
- declare type PageDataStaticPaths<Params extends { [key: string]: any }> = (
27
+ declare type NextPageDataStaticPaths<Params extends { [key: string]: any }> = (
15
28
  context: import("next").GetStaticPathsContext,
16
29
  ) =>
17
30
  | Promise<NextGetStaticPathsResult<Params>>
@@ -21,14 +34,14 @@ declare type PageDataStaticPaths<Params extends { [key: string]: any }> = (
21
34
  * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
22
35
  */
23
36
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
- declare type PageDataStatic<P extends { [key: string]: any }> =
37
+ declare type NextPageDataStatic<P extends { [key: string]: any }> =
25
38
  import("next").GetStaticProps<P, import("querystring").ParsedUrlQuery>;
26
39
 
27
40
  /**
28
41
  * [`next.js` pages router](https://nextjs.org/docs/pages) utility type
29
42
  */
30
43
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
- declare type PageDataServer<P extends { [key: string]: any }> =
44
+ declare type NextPageDataServer<P extends { [key: string]: any }> =
32
45
  import("next").GetServerSideProps<P, import("querystring").ParsedUrlQuery>;
33
46
 
34
47
  /**
@@ -1,22 +0,0 @@
1
- import type { Simplify } from "@koine/utils";
2
- import type { WithComponents } from "@koine/react";
3
- type OwnProps = {
4
- startAt?: number;
5
- showOnShallow?: boolean;
6
- stopDelayMs?: number;
7
- };
8
- export type Components = {
9
- Overlay: {
10
- type: "div";
11
- props: {
12
- running?: boolean;
13
- };
14
- };
15
- };
16
- export type ComponentsProps = {
17
- [Name in keyof Components]: Components[Name]["props"];
18
- };
19
- type Props = Simplify<WithComponents<OwnProps, Components>>;
20
- export type NextProgressProps = Props;
21
- export declare const NextProgress: ({ startAt, showOnShallow, stopDelayMs, Overlay, }: NextProgressProps) => import("react/jsx-runtime").JSX.Element;
22
- export default NextProgress;
package/12/types-seo.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export type SeoData = {
2
- hidden?: boolean;
3
- title?: string;
4
- description?: string;
5
- keywords?: string | string[];
6
- ogimage?: string;
7
- };