@anywayseo/tools 5.7.2 → 5.8.1

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,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../index-Cl0ZvmOD.js");
3
+ const index = require("../index-p4b9Kywi.js");
4
4
  const index$1 = require("../index-BrpyfyHr.js");
5
5
  const index$2 = require("../index-DDg_PkD2.js");
6
6
  const index$3 = require("../index-BNkvrBOj.js");
@@ -1,4 +1,4 @@
1
- import { A, a, b, c, n, o, d, B, e, C, r, q, F, f, g, G, h, i, j, p, H, I, L, N, s, P, S, k, T, l, t, m } from "../index-QmNh8L3Y.mjs";
1
+ import { A, a, b, c, n, o, d, B, e, C, r, q, F, f, g, G, h, i, j, p, H, I, L, N, s, P, S, k, T, l, t, m } from "../index-CxXqR9sV.mjs";
2
2
  import { C as C2, a as a2, b as b2, L as L2, c as c2, R, S as S2, d as d2 } from "../index-CodGh8Sq.mjs";
3
3
  import { H as H2, a as a3, b as b3, O, P as P2, U } from "../index-BEjKnOZA.mjs";
4
4
  import { I as I2, L as L3 } from "../index-C3FKVt3V.mjs";
@@ -1,10 +1,11 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
2
  import { ILocale, ISeo } from '../../types';
3
- import { SeoItemGetter } from './types';
3
+ import { IHrefLang, SeoItemGetter } from './types';
4
4
  type SeoProps = PropsWithChildren<{
5
5
  title?: ISeo['title'] | SeoItemGetter;
6
6
  description?: ISeo['description'] | SeoItemGetter;
7
7
  lang?: ILocale['code'];
8
+ hrefLangs?: IHrefLang[];
8
9
  }>;
9
10
  declare const Seo: FC<SeoProps>;
10
11
  export default Seo;
@@ -4,3 +4,7 @@ export interface ISeoItemPlaceholders {
4
4
  currentMonth: string;
5
5
  }
6
6
  export type SeoItemGetter = (placeholders: ISeoItemPlaceholders) => string;
7
+ export interface IHrefLang {
8
+ href: string;
9
+ hrefLang: string;
10
+ }
@@ -405,7 +405,7 @@ const buttonAnimationProps = {
405
405
  type: "pulse",
406
406
  params: { duration: 2, timingFunction: "ease-out", isInfinite: true }
407
407
  };
408
- const GameDemoPreview = ({ image, alt, src, refLink, imageFit = "contain", onPlayDemo }) => {
408
+ const GameDemoPreview = ({ image, alt, src, refLink, imageFit = "cover", onPlayDemo }) => {
409
409
  const { t: t2 } = useTranslation("gameDemo");
410
410
  function getPrimaryButton() {
411
411
  if (refLink) {
@@ -435,7 +435,7 @@ const GameDemoPreview = ({ image, alt, src, refLink, imageFit = "contain", onPla
435
435
  }
436
436
  return /* @__PURE__ */ jsxs(Stack, { children: [
437
437
  !src && /* @__PURE__ */ jsx(GameDemoAlert, {}),
438
- /* @__PURE__ */ jsxs(Box, { position: "relative", children: [
438
+ /* @__PURE__ */ jsxs(Box, { position: "relative", flex: 1, children: [
439
439
  /* @__PURE__ */ jsx(Image, { src: image, alt, objectFit: imageFit, w: "100%", h: "100%" }),
440
440
  /* @__PURE__ */ jsx(AbsoluteCenter, { children: /* @__PURE__ */ jsxs(Stack, { spacing: 4, children: [
441
441
  getPrimaryButton(),
@@ -928,7 +928,7 @@ function replacePlaceholders(text, placeholders) {
928
928
  });
929
929
  return text;
930
930
  }
931
- const Seo = ({ children, title, description, lang }) => {
931
+ const Seo = ({ children, title, description, lang, hrefLangs = [] }) => {
932
932
  const { metadata } = useSiteContext();
933
933
  const { name: siteName, lang: defaultLang, seo } = metadata;
934
934
  const { title: defaultTitle, description: defaultDescription } = seo;
@@ -951,6 +951,7 @@ const Seo = ({ children, title, description, lang }) => {
951
951
  content: description ? typeof description === "string" ? replacePlaceholders(description, placeholders) : description(placeholders) : defaultDescription
952
952
  }
953
953
  ),
954
+ hrefLangs.map(({ href, hrefLang }, index) => /* @__PURE__ */ jsx("link", { rel: "alternate", hrefLang, href: `https://${siteName}${href}` }, index)),
954
955
  children
955
956
  ] });
956
957
  };
@@ -406,7 +406,7 @@ const buttonAnimationProps = {
406
406
  type: "pulse",
407
407
  params: { duration: 2, timingFunction: "ease-out", isInfinite: true }
408
408
  };
409
- const GameDemoPreview = ({ image, alt, src, refLink, imageFit = "contain", onPlayDemo }) => {
409
+ const GameDemoPreview = ({ image, alt, src, refLink, imageFit = "cover", onPlayDemo }) => {
410
410
  const { t } = reactI18next.useTranslation("gameDemo");
411
411
  function getPrimaryButton() {
412
412
  if (refLink) {
@@ -436,7 +436,7 @@ const GameDemoPreview = ({ image, alt, src, refLink, imageFit = "contain", onPla
436
436
  }
437
437
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { children: [
438
438
  !src && /* @__PURE__ */ jsxRuntime.jsx(GameDemoAlert, {}),
439
- /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { position: "relative", children: [
439
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { position: "relative", flex: 1, children: [
440
440
  /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: image, alt, objectFit: imageFit, w: "100%", h: "100%" }),
441
441
  /* @__PURE__ */ jsxRuntime.jsx(react.AbsoluteCenter, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { spacing: 4, children: [
442
442
  getPrimaryButton(),
@@ -929,7 +929,7 @@ function replacePlaceholders(text, placeholders) {
929
929
  });
930
930
  return text;
931
931
  }
932
- const Seo = ({ children, title, description, lang }) => {
932
+ const Seo = ({ children, title, description, lang, hrefLangs = [] }) => {
933
933
  const { metadata } = index.useSiteContext();
934
934
  const { name: siteName, lang: defaultLang, seo } = metadata;
935
935
  const { title: defaultTitle, description: defaultDescription } = seo;
@@ -952,6 +952,7 @@ const Seo = ({ children, title, description, lang }) => {
952
952
  content: description ? typeof description === "string" ? replacePlaceholders(description, placeholders) : description(placeholders) : defaultDescription
953
953
  }
954
954
  ),
955
+ hrefLangs.map(({ href, hrefLang }, index2) => /* @__PURE__ */ jsxRuntime.jsx("link", { rel: "alternate", hrefLang, href: `https://${siteName}${href}` }, index2)),
955
956
  children
956
957
  ] });
957
958
  };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-Cl0ZvmOD.js");
3
+ const index = require("./index-p4b9Kywi.js");
4
4
  const index$1 = require("./index-BrpyfyHr.js");
5
5
  const index$2 = require("./index-DDg_PkD2.js");
6
6
  const index$3 = require("./index-BNkvrBOj.js");
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A, a, b, c, n, o, d, B, e, C, r, q, F, f, g, G, h, i, j, p, H, I, L, N, s, P, S, k, T, l, t, m } from "./index-QmNh8L3Y.mjs";
1
+ import { A, a, b, c, n, o, d, B, e, C, r, q, F, f, g, G, h, i, j, p, H, I, L, N, s, P, S, k, T, l, t, m } from "./index-CxXqR9sV.mjs";
2
2
  import { C as C2, a as a2, b as b2, L as L2, c as c2, R, S as S2, d as d2 } from "./index-CodGh8Sq.mjs";
3
3
  import { H as H2, a as a3, b as b3, O, P as P2, U } from "./index-BEjKnOZA.mjs";
4
4
  import { I as I2, L as L3, P as P3, S as S3, u, a as a4 } from "./index-C3FKVt3V.mjs";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@anywayseo/tools",
3
3
  "description": "Shared UI Components and Modules",
4
- "version": "5.7.2",
4
+ "version": "5.8.1",
5
5
  "keywords": [
6
6
  "react",
7
7
  "ui",