@anywayseo/tools 6.0.0 → 6.2.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/dist/components/index.cjs +3 -3
- package/dist/components/index.mjs +3 -3
- package/dist/components/seo/href-langs/index.d.ts +2 -2
- package/dist/components/seo/index.d.ts +2 -8
- package/dist/components/seo/open-graph/index.d.ts +8 -0
- package/dist/components/seo/utils.d.ts +2 -2
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/i18n/index.cjs +24 -12
- package/dist/i18n/index.mjs +24 -12
- package/dist/i18n/resources/bn/index.d.ts +331 -0
- package/dist/i18n/resources/cs/index.d.ts +331 -0
- package/dist/i18n/resources/el/index.d.ts +331 -0
- package/dist/i18n/resources/hu/index.d.ts +331 -0
- package/dist/i18n/resources/nb/index.d.ts +331 -0
- package/dist/i18n/resources/nl/index.d.ts +331 -0
- package/dist/i18n/resources/pl/index.d.ts +331 -0
- package/dist/i18n/resources/ro/index.d.ts +331 -0
- package/dist/i18n/resources/sr/index.d.ts +331 -0
- package/dist/i18n/resources/sv/index.d.ts +331 -0
- package/dist/i18n/resources/tr/index.d.ts +331 -0
- package/dist/i18n/resources/uz/index.d.ts +331 -0
- package/dist/{index-C7buhUOk.mjs → index-2sU4ya6z.mjs} +3 -3
- package/dist/{index-CUDzMwnz.mjs → index-B--qmL1V.mjs} +29 -20
- package/dist/{index-U-DmPFa7.mjs → index-B5WurBlm.mjs} +1 -1
- package/dist/{index-DJSBjQzq.js → index-BAxlqkw0.js} +2 -2
- package/dist/{index-BJsA8Upb.js → index-BKWX6mIo.js} +29 -20
- package/dist/{index-C1kr7Vd-.mjs → index-BS5T9Il4.mjs} +1 -1
- package/dist/{index-0AAkKSsc.mjs → index-BTfTkIed.mjs} +63 -9
- package/dist/{index-BhzKUTPZ.mjs → index-BtS01kyg.mjs} +45 -33
- package/dist/{index-RzByAgHO.mjs → index-C6A-3gBz.mjs} +4577 -432
- package/dist/{index-CBRFCYhV.js → index-CMLDQbgR.js} +4577 -432
- package/dist/{index-CVv755RW.js → index-CuIVcnIS.js} +1 -1
- package/dist/{index-BSAasfl2.js → index-CxuOu0E2.js} +3 -3
- package/dist/{index-DZc8PJET.js → index-DAPaiozu.js} +1 -1
- package/dist/{index-BU1gLt1p.js → index-DHKoOk4o.js} +54 -0
- package/dist/{index-B5SWTYZm.js → index-ISfgFSXE.js} +45 -33
- package/dist/{index-B5C9u9UE.mjs → index-TcBorTSf.mjs} +2 -2
- package/dist/index.cjs +11 -9
- package/dist/index.mjs +20 -18
- package/dist/layout/header/locale-switcher/icons/bangladesh/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/belgium/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/canada/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/czechia/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/greece/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/hungary/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/index.d.ts +20 -1
- package/dist/layout/header/locale-switcher/icons/india/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/morocco/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/netherlands/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/nigeria/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/norway/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/poland/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/romania/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/serbia/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/south-africa/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/sweden/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/switzerland/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/turkey/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/uzbekistan/index.d.ts +2 -0
- package/dist/layout/index.cjs +392 -48
- package/dist/layout/index.mjs +392 -48
- package/dist/providers/index.cjs +2 -2
- package/dist/providers/index.mjs +2 -2
- package/dist/types/api/strapi-page.d.ts +13 -12
- package/dist/types/content/seo/index.d.ts +56 -3
- package/dist/types/i18n/index.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/seo/index.d.ts +2 -0
- package/dist/types/seo/open-graph/index.d.ts +11 -0
- package/dist/utils/api/strapi-guards.d.ts +2 -1
- package/dist/utils/api/strapi-seo.d.ts +2 -13
- package/dist/utils/index.cjs +5 -3
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.mjs +14 -12
- package/dist/utils/seo/index.d.ts +2 -0
- package/dist/utils/{json-ld → seo/json-ld}/index.d.ts +1 -1
- package/dist/utils/seo/open-graph/index.d.ts +15 -0
- package/package.json +1 -1
- package/dist/components/seo/types.d.ts +0 -14
- /package/dist/types/{json-ld → seo/json-ld}/index.d.ts +0 -0
|
@@ -1,11 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Nullable } from '../../common';
|
|
2
|
+
import { ILocale } from '../../i18n';
|
|
3
|
+
/** Meta */
|
|
4
|
+
export interface ISeoMetaItemPlaceholders {
|
|
5
|
+
siteName: string;
|
|
6
|
+
currentYear: string;
|
|
7
|
+
currentMonth: string;
|
|
8
|
+
}
|
|
9
|
+
type SeoMetaItemGetter = (placeholders: ISeoMetaItemPlaceholders) => string;
|
|
10
|
+
export type SeoMetaItem = string | SeoMetaItemGetter;
|
|
11
|
+
export interface ISeoMetadata<T = string> {
|
|
12
|
+
title: T;
|
|
13
|
+
description: T;
|
|
4
14
|
}
|
|
15
|
+
/** Href Langs */
|
|
5
16
|
export interface IHrefLang {
|
|
6
17
|
href: string;
|
|
7
18
|
hrefLang: string;
|
|
8
19
|
}
|
|
20
|
+
/** Structured Data */
|
|
21
|
+
interface IStructuredDataImage {
|
|
22
|
+
url: string;
|
|
23
|
+
alt?: string;
|
|
24
|
+
width?: number;
|
|
25
|
+
height?: number;
|
|
26
|
+
}
|
|
9
27
|
interface IStructuredDataAuthor {
|
|
10
28
|
name: string;
|
|
11
29
|
url?: string;
|
|
@@ -21,10 +39,12 @@ interface IStructuredDataReview {
|
|
|
21
39
|
publishedAt: string;
|
|
22
40
|
updatedAt?: string;
|
|
23
41
|
rating?: IStructuredDataRating;
|
|
42
|
+
image?: IStructuredDataImage;
|
|
24
43
|
}
|
|
25
44
|
interface IStructuredDataGame {
|
|
26
45
|
name: string;
|
|
27
46
|
genre?: string;
|
|
47
|
+
image?: IStructuredDataImage;
|
|
28
48
|
}
|
|
29
49
|
export interface IStructuredDataContent {
|
|
30
50
|
author?: IStructuredDataAuthor;
|
|
@@ -38,4 +58,37 @@ export interface IStructuredData {
|
|
|
38
58
|
entity: StructuredDataEntity;
|
|
39
59
|
content: IStructuredDataContent;
|
|
40
60
|
}
|
|
61
|
+
/** Open Graph */
|
|
62
|
+
interface IOpenGraphImageData {
|
|
63
|
+
url: string;
|
|
64
|
+
alt: string;
|
|
65
|
+
width?: number;
|
|
66
|
+
height?: number;
|
|
67
|
+
}
|
|
68
|
+
interface IOpenGraphArticleData {
|
|
69
|
+
createdAt: string;
|
|
70
|
+
updatedAt: string;
|
|
71
|
+
author?: string;
|
|
72
|
+
section?: string;
|
|
73
|
+
tags?: string[];
|
|
74
|
+
}
|
|
75
|
+
interface IOpenGraphContent {
|
|
76
|
+
image?: IOpenGraphImageData;
|
|
77
|
+
article?: IOpenGraphArticleData;
|
|
78
|
+
}
|
|
79
|
+
interface IOpenGraphOptions {
|
|
80
|
+
withTwitterCard?: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface IOpenGraph {
|
|
83
|
+
content: IOpenGraphContent;
|
|
84
|
+
options?: IOpenGraphOptions;
|
|
85
|
+
}
|
|
86
|
+
export interface ISeo {
|
|
87
|
+
lang?: Nullable<ILocale['code']>;
|
|
88
|
+
meta?: Nullable<ISeoMetadata<Nullable<SeoMetaItem>>>;
|
|
89
|
+
canonicalUrl?: Nullable<string>;
|
|
90
|
+
hrefLangs?: Nullable<IHrefLang[]>;
|
|
91
|
+
structuredData?: Nullable<IStructuredData>;
|
|
92
|
+
openGraph?: Nullable<IOpenGraph>;
|
|
93
|
+
}
|
|
41
94
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type LanguageCode = 'en' | 'es' | 'it' | 'de' | 'fr' | 'ru' | 'pt' | 'ka' | 'fi' | 'bg' | 'da';
|
|
1
|
+
export type LanguageCode = 'en' | 'es' | 'it' | 'de' | 'fr' | 'ru' | 'pt' | 'ka' | 'fi' | 'bg' | 'da' | 'bn' | 'nl' | 'hu' | 'el' | 'nb' | 'pl' | 'ro' | 'sr' | 'tr' | 'uz' | 'cs' | 'sv';
|
|
2
2
|
type SpanishSpeakingCurrencyCode = 'ARS' | 'BOB' | 'CLP' | 'COP' | 'CRC' | 'CUP' | 'DOP' | 'USD' | 'BTC' | 'XAF' | 'GTQ' | 'HNL' | 'MXN' | 'NIO' | 'PAB' | 'PYG' | 'PEN' | 'EUR' | 'UYU' | 'VES';
|
|
3
3
|
export type Currency = 'USD' | 'EUR' | 'GBP' | 'RUB' | 'BRL' | SpanishSpeakingCurrencyCode;
|
|
4
4
|
type LocaleCode = string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type OpenGraphImageMetaTag = 'image' | 'image:alt' | 'image:width' | 'image:height';
|
|
2
|
+
type OpenGraphArticleMetaTag = 'article:published_time' | 'article:modified_time' | 'article:author' | 'article:section' | 'article:tag';
|
|
3
|
+
type OpenGraphSiteMetaTag = 'site_name' | 'locale';
|
|
4
|
+
type OpenGraphPageMetaTag = 'type' | 'url' | 'title' | 'description' | OpenGraphImageMetaTag | OpenGraphArticleMetaTag;
|
|
5
|
+
type OpenGraphMetaTag = OpenGraphSiteMetaTag | OpenGraphPageMetaTag;
|
|
6
|
+
export type OpenGraphType = 'website' | 'article';
|
|
7
|
+
export interface IOpenGraphMetaItem {
|
|
8
|
+
property: `og:${OpenGraphMetaTag}`;
|
|
9
|
+
content: string;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { IStrapiComponentFragment, IStrapiPageContext, IStrapiPageData } from '../../types';
|
|
1
|
+
import { IStrapiComponentFragment, IStrapiPageContext, IStrapiPageData, IStrapiRichText } from '../../types';
|
|
2
2
|
export declare function isStrapiContent(array: unknown): array is IStrapiComponentFragment[];
|
|
3
|
+
export declare function isStrapiRichText(value?: unknown): value is IStrapiRichText;
|
|
3
4
|
export declare function isStrapiPageData(data: unknown): data is Partial<IStrapiPageData>;
|
|
4
5
|
export declare function isStrapiPageContext(context: unknown): context is Partial<IStrapiPageContext>;
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
locale: Nullable<ILocale['code']>;
|
|
4
|
-
meta: {
|
|
5
|
-
title: Nullable<ISeoMetadata['title']>;
|
|
6
|
-
description: Nullable<ISeoMetadata['description']>;
|
|
7
|
-
};
|
|
8
|
-
canonicalUrl: Nullable<string>;
|
|
9
|
-
hrefLangs: IHrefLang[];
|
|
10
|
-
structuredData: Nullable<IStructuredData>;
|
|
11
|
-
}
|
|
12
|
-
export declare function extractSeoData(pageData: unknown, pageContext?: unknown): ISeoData;
|
|
13
|
-
export {};
|
|
1
|
+
import { ISeo } from '../../types';
|
|
2
|
+
export declare function buildSeoFromStrapi(pageData: unknown, pageContext?: unknown): ISeo;
|
package/dist/utils/index.cjs
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const index = require("../index-C6MG_f24.js");
|
|
4
|
-
const index$1 = require("../index-
|
|
5
|
-
const index$2 = require("../index-
|
|
4
|
+
const index$1 = require("../index-BKWX6mIo.js");
|
|
5
|
+
const index$2 = require("../index-DHKoOk4o.js");
|
|
6
6
|
const index$3 = require("../index-ov4J7p3D.js");
|
|
7
7
|
const index$4 = require("../index-CAjUjAgI.js");
|
|
8
8
|
const index$5 = require("../index-CbuiYkSg.js");
|
|
9
9
|
exports.Animation = index.Animation;
|
|
10
|
-
exports.
|
|
10
|
+
exports.buildSeoFromStrapi = index$1.buildSeoFromStrapi;
|
|
11
11
|
exports.getLocale = index$1.getLocale;
|
|
12
12
|
exports.getLocales = index$1.getLocales;
|
|
13
13
|
exports.getNavigation = index$1.getNavigation;
|
|
14
14
|
exports.getSiteName = index$1.getSiteName;
|
|
15
15
|
exports.buildGameReviewSchema = index$2.buildGameReviewSchema;
|
|
16
16
|
exports.buildGraph = index$2.buildGraph;
|
|
17
|
+
exports.buildOpenGraphMeta = index$2.buildOpenGraphMeta;
|
|
17
18
|
exports.buildOrganizationSchema = index$2.buildOrganizationSchema;
|
|
18
19
|
exports.buildWebpageSchema = index$2.buildWebpageSchema;
|
|
19
20
|
exports.buildWebsiteSchema = index$2.buildWebsiteSchema;
|
|
@@ -23,6 +24,7 @@ exports.getSeededRandomComparator = index$2.getSeededRandomComparator;
|
|
|
23
24
|
exports.isStrapiContent = index$2.isStrapiContent;
|
|
24
25
|
exports.isStrapiPageContext = index$2.isStrapiPageContext;
|
|
25
26
|
exports.isStrapiPageData = index$2.isStrapiPageData;
|
|
27
|
+
exports.isStrapiRichText = index$2.isStrapiRichText;
|
|
26
28
|
exports.randomComparator = index$2.randomComparator;
|
|
27
29
|
exports.formatDate = index$3.formatDate;
|
|
28
30
|
exports.formatNumber = index$3.formatNumber;
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A } from "../index-BJRvnR8Q.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { d, a, b, c, g } from "../index-B--qmL1V.mjs";
|
|
3
|
+
import { k, d as d2, l, e, j, f, g as g2, h, m, i, c as c2, b as b2, a as a2, r } from "../index-BTfTkIed.mjs";
|
|
4
4
|
import { f as f2, b as b3, a as a3, g as g3, r as r2, t } from "../index-BPthShL-.mjs";
|
|
5
5
|
import { a as a4, b as b4, c as c3, i as i2 } from "../index-CQC6DRGf.mjs";
|
|
6
6
|
import { D, L } from "../index-BRVKhbs6.mjs";
|
|
@@ -9,29 +9,31 @@ export {
|
|
|
9
9
|
D as DARK_THEME_COLOR,
|
|
10
10
|
L as LIGHT_THEME_COLOR,
|
|
11
11
|
a4 as buildCanonicalUrl,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
k as buildGameReviewSchema,
|
|
13
|
+
d2 as buildGraph,
|
|
14
|
+
l as buildOpenGraphMeta,
|
|
15
|
+
e as buildOrganizationSchema,
|
|
15
16
|
b4 as buildPath,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
d as buildSeoFromStrapi,
|
|
18
|
+
j as buildWebpageSchema,
|
|
19
|
+
f as buildWebsiteSchema,
|
|
19
20
|
f2 as formatDate,
|
|
20
21
|
b3 as formatNumber,
|
|
21
22
|
g2 as getCurrencySymbol,
|
|
22
23
|
a3 as getCurrentMonth,
|
|
23
24
|
g3 as getCurrentYear,
|
|
24
|
-
|
|
25
|
+
h as getEntitySchema,
|
|
25
26
|
a as getLocale,
|
|
26
27
|
b as getLocales,
|
|
27
28
|
c as getNavigation,
|
|
28
|
-
|
|
29
|
+
m as getSeededRandomComparator,
|
|
29
30
|
g as getSiteName,
|
|
30
31
|
c3 as isAbsolutePath,
|
|
31
32
|
i2 as isRelativePath,
|
|
32
33
|
i as isStrapiContent,
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
c2 as isStrapiPageContext,
|
|
35
|
+
b2 as isStrapiPageData,
|
|
36
|
+
a2 as isStrapiRichText,
|
|
35
37
|
r as randomComparator,
|
|
36
38
|
r2 as round,
|
|
37
39
|
t as toFixedTwo
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GameSchema, ILocale, ISiteLogo, IStructuredData, Nullable, OrganizationSchema, ReviewSchema, Schema, Schemas, WebPageSchema, WebSiteSchema } from '
|
|
1
|
+
import { GameSchema, ILocale, ISiteLogo, IStructuredData, Nullable, OrganizationSchema, ReviewSchema, Schema, Schemas, WebPageSchema, WebSiteSchema } from '../../../types';
|
|
2
2
|
export declare function buildGraph(schemas: Schemas): Schema[];
|
|
3
3
|
interface BuildOrganizationSchemaParams {
|
|
4
4
|
site: {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ILocale, IOpenGraph, IOpenGraphMetaItem } from '../../../types';
|
|
2
|
+
interface BuildOpenGraphParams {
|
|
3
|
+
site: {
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
page: {
|
|
7
|
+
url: string;
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
lang: ILocale['code'];
|
|
12
|
+
content?: IOpenGraph['content'];
|
|
13
|
+
}
|
|
14
|
+
export declare function buildOpenGraphMeta(params: BuildOpenGraphParams): IOpenGraphMetaItem[];
|
|
15
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IHrefLang, ILocale, ISeoMetadata, IStructuredData, Nullable } from '../../types';
|
|
2
|
-
export interface ISeoMetaItemPlaceholders {
|
|
3
|
-
siteName: string;
|
|
4
|
-
currentYear: string;
|
|
5
|
-
currentMonth: string;
|
|
6
|
-
}
|
|
7
|
-
type SeoMetaItemGetter = (placeholders: ISeoMetaItemPlaceholders) => string;
|
|
8
|
-
export type SeoLocale = Nullable<ILocale['code']>;
|
|
9
|
-
export type SeoTitle = Nullable<ISeoMetadata['title'] | SeoMetaItemGetter>;
|
|
10
|
-
export type SeoDescription = Nullable<ISeoMetadata['description'] | SeoMetaItemGetter>;
|
|
11
|
-
export type SeoCanonical = Nullable<string>;
|
|
12
|
-
export type SeoHrefLangs = IHrefLang[];
|
|
13
|
-
export type SeoStructuredData = Nullable<IStructuredData>;
|
|
14
|
-
export {};
|
|
File without changes
|