@anywayseo/tools 4.1.0 → 4.2.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.
Files changed (48) hide show
  1. package/dist/components/base/index.d.ts +0 -1
  2. package/dist/components/base/link-button/index.d.ts +3 -3
  3. package/dist/components/game-demo/content/index.d.ts +1 -0
  4. package/dist/components/game-demo/index.d.ts +1 -0
  5. package/dist/components/game-demo/preview/index.d.ts +5 -4
  6. package/dist/components/index.cjs +1 -2
  7. package/dist/components/index.mjs +1 -2
  8. package/dist/hooks/index.cjs +1 -1
  9. package/dist/hooks/index.mjs +1 -1
  10. package/dist/hooks/use-primary-colors/index.d.ts +1 -0
  11. package/dist/i18n/index.cjs +1 -1
  12. package/dist/i18n/index.mjs +1 -1
  13. package/dist/i18n/resources/de/index.d.ts +2 -0
  14. package/dist/i18n/resources/en/index.d.ts +2 -0
  15. package/dist/i18n/resources/it/index.d.ts +2 -0
  16. package/dist/i18n/resources/ru/index.d.ts +2 -0
  17. package/dist/{index-NsIHOkeN.js → index-BClxYYix.js} +0 -46
  18. package/dist/{index-DoBCANwf.mjs → index-BE9gNdXx.mjs} +15 -7
  19. package/dist/{index-Biz1dDqA.js → index-BPLxhZG_.js} +15 -7
  20. package/dist/index-BV0hDmYP.js +11 -0
  21. package/dist/{index-BxPYJ5OB.js → index-BrOQF5EQ.js} +138 -89
  22. package/dist/{index-BKg1_9Hw.mjs → index-CaIyg0au.mjs} +132 -83
  23. package/dist/{index-DzEvPZny.mjs → index-Ca_M-II5.mjs} +0 -46
  24. package/dist/index-CkTgVjZS.mjs +12 -0
  25. package/dist/{index-Db-ZIQ0A.mjs → index-DPO0aIC3.mjs} +1 -19
  26. package/dist/index-DVcQxWMZ.js +36 -0
  27. package/dist/{index-CpjGjVVj.js → index-DuQjQMNN.js} +1 -19
  28. package/dist/index-MpNfBHkQ.mjs +37 -0
  29. package/dist/index.cjs +19 -19
  30. package/dist/index.mjs +8 -8
  31. package/dist/types/components/bonus-card/index.d.ts +2 -1
  32. package/dist/types/components/button/index.d.ts +6 -0
  33. package/dist/types/components/common/index.d.ts +12 -0
  34. package/dist/types/components/game-card/index.d.ts +3 -2
  35. package/dist/types/components/index.d.ts +2 -0
  36. package/dist/types/components/link/index.d.ts +5 -0
  37. package/dist/types/content/index.d.ts +0 -1
  38. package/dist/types/site/index.d.ts +4 -0
  39. package/dist/utils/animation/index.d.ts +2 -8
  40. package/dist/utils/index.cjs +16 -15
  41. package/dist/utils/index.mjs +5 -4
  42. package/dist/utils/theme/index.d.ts +2 -3
  43. package/package.json +1 -1
  44. package/dist/components/base/pulse-button/index.d.ts +0 -15
  45. package/dist/components/base/pulse-button/utils.d.ts +0 -4
  46. package/dist/index-IpSV-c71.js +0 -8
  47. package/dist/index-xuSxvz5z.mjs +0 -9
  48. package/dist/types/content/link/index.d.ts +0 -4
@@ -2,4 +2,3 @@ export { default as Author } from './author';
2
2
  export { default as Center } from './center';
3
3
  export { default as Grid } from './grid';
4
4
  export { default as LinkButton } from './link-button';
5
- export { default as PulseButton } from './pulse-button';
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
- import { BoxPositionProps, ILink } from '../../../types';
3
- type LinkButtonProps = ILink & {
4
- width?: 'auto' | 'full' | number;
2
+ import { BaseButtonProps, BoxPositionProps, ILink, LinkType } from '../../../types';
3
+ type LinkButtonProps = BaseButtonProps & Partial<ILink> & {
4
+ linkType?: LinkType;
5
5
  } & BoxPositionProps;
6
6
  declare const LinkButton: FC<LinkButtonProps>;
7
7
  export default LinkButton;
@@ -4,6 +4,7 @@ type GameDemoContentProps = {
4
4
  isFullscreen: boolean;
5
5
  isLoaded: boolean;
6
6
  onLoad: VoidFunction;
7
+ onExit: VoidFunction;
7
8
  onToggleFullscreen: VoidFunction;
8
9
  };
9
10
  declare const GameDemoContent: FC<GameDemoContentProps>;
@@ -10,6 +10,7 @@ type GamePreviewImageProps = {
10
10
  type GameDemoProps = {
11
11
  name: string;
12
12
  src: string;
13
+ href?: string;
13
14
  } & BoxPositionProps & GamePreviewImageProps;
14
15
  declare const GameDemo: FC<GameDemoProps>;
15
16
  export default GameDemo;
@@ -1,10 +1,11 @@
1
- import { FC, ReactElement } from 'react';
2
- import { ImageFit } from '../../../types';
1
+ import { FC } from 'react';
2
+ import { Image as TImage, ImageFit } from '../../../types';
3
3
  type GameDemoPreviewProps = {
4
- image: string | ReactElement;
4
+ image: TImage;
5
5
  alt: string;
6
+ href?: string;
6
7
  imageFit?: ImageFit;
7
- onPlay: VoidFunction;
8
+ onPlayDemo: VoidFunction;
8
9
  };
9
10
  declare const GameDemoPreview: FC<GameDemoPreviewProps>;
10
11
  export default GameDemoPreview;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../index-BxPYJ5OB.js");
3
+ const index = require("../index-BrOQF5EQ.js");
4
4
  exports.Author = index.Author;
5
5
  exports.AuthorCard = index.AuthorCard;
6
6
  exports.BonusCard = index.BonusCard;
@@ -21,7 +21,6 @@ exports.LinkButton = index.LinkButton;
21
21
  exports.List = index.List;
22
22
  exports.NotFound = index.NotFound;
23
23
  exports.ProsCons = index.ProsCons;
24
- exports.PulseButton = index.PulseButton;
25
24
  exports.Seo = index.Seo;
26
25
  exports.StrapiContentRenderer = index.StrapiContentRenderer;
27
26
  exports.Table = index.Table;
@@ -1,4 +1,4 @@
1
- import { k, A, B, a, l, C, F, b, c, G, d, e, f, m, H, L, n, g, N, P, o, S, h, T, i, j } from "../index-BKg1_9Hw.mjs";
1
+ import { k, A, B, a, l, C, F, b, c, G, d, e, f, m, H, L, n, g, N, P, S, h, T, i, j } from "../index-CaIyg0au.mjs";
2
2
  export {
3
3
  k as Author,
4
4
  A as AuthorCard,
@@ -20,7 +20,6 @@ export {
20
20
  g as List,
21
21
  N as NotFound,
22
22
  P as ProsCons,
23
- o as PulseButton,
24
23
  S as Seo,
25
24
  h as StrapiContentRenderer,
26
25
  T as Table,
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../index-IpSV-c71.js");
3
+ const index = require("../index-BV0hDmYP.js");
4
4
  exports.usePrimaryColors = index.usePrimaryColors;
@@ -1,4 +1,4 @@
1
- import { u } from "../index-xuSxvz5z.mjs";
1
+ import { u } from "../index-CkTgVjZS.mjs";
2
2
  export {
3
3
  u as usePrimaryColors
4
4
  };
@@ -1,5 +1,6 @@
1
1
  interface IUsePrimaryColors {
2
2
  color: string;
3
+ invertedColor: string;
3
4
  bgColor: string;
4
5
  }
5
6
  declare function usePrimaryColors(): IUsePrimaryColors;
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react-i18next");
4
4
  const i18n = require("i18next");
5
- const i18n$1 = require("../index-Biz1dDqA.js");
5
+ const i18n$1 = require("../index-BPLxhZG_.js");
6
6
  exports.i18n = i18n;
7
7
  exports.resources = i18n$1.resources;
@@ -1,6 +1,6 @@
1
1
  import "react-i18next";
2
2
  import { default as default2 } from "i18next";
3
- import { r } from "../index-DoBCANwf.mjs";
3
+ import { r } from "../index-BE9gNdXx.mjs";
4
4
  export {
5
5
  default2 as i18n,
6
6
  r as resources
@@ -17,9 +17,11 @@ declare const dictionary: {
17
17
  readonly gameDemo: {
18
18
  warning: string;
19
19
  action: {
20
+ playForReal: string;
20
21
  playForFree: string;
21
22
  activateFullscreen: string;
22
23
  deactivateFullscreen: string;
24
+ exit: string;
23
25
  };
24
26
  };
25
27
  readonly gameInfo: {
@@ -17,9 +17,11 @@ declare const dictionary: {
17
17
  readonly gameDemo: {
18
18
  warning: string;
19
19
  action: {
20
+ playForReal: string;
20
21
  playForFree: string;
21
22
  activateFullscreen: string;
22
23
  deactivateFullscreen: string;
24
+ exit: string;
23
25
  };
24
26
  };
25
27
  readonly gameInfo: {
@@ -17,9 +17,11 @@ declare const dictionary: {
17
17
  readonly gameDemo: {
18
18
  warning: string;
19
19
  action: {
20
+ playForReal: string;
20
21
  playForFree: string;
21
22
  activateFullscreen: string;
22
23
  deactivateFullscreen: string;
24
+ exit: string;
23
25
  };
24
26
  };
25
27
  readonly gameInfo: {
@@ -17,9 +17,11 @@ declare const dictionary: {
17
17
  readonly gameDemo: {
18
18
  warning: string;
19
19
  action: {
20
+ playForReal: string;
20
21
  playForFree: string;
21
22
  activateFullscreen: string;
22
23
  deactivateFullscreen: string;
24
+ exit: string;
23
25
  };
24
26
  };
25
27
  readonly gameInfo: {
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- const tinycolor = require("@ctrl/tinycolor");
3
2
  const DUMMY_PAGE_TYPE = "DUMMY";
4
3
  function isValidPath(value) {
5
4
  return typeof value === "string" && (value === "" || value.startsWith("/"));
@@ -38,49 +37,4 @@ function transformSiteNavigation(strapiNavigation) {
38
37
  footer: transformNavItems(footerNav == null ? void 0 : footerNav.items)
39
38
  };
40
39
  }
41
- const DEFAULT_THEME = "system";
42
- const DEFAULT_COLOR = "#333333";
43
- const DefaultColorShadeMap = {
44
- 50: 52,
45
- 100: 40,
46
- 200: 30,
47
- 300: 20,
48
- 400: 10,
49
- 600: 10,
50
- 700: 20,
51
- 800: 30,
52
- 900: 40
53
- };
54
- function extractTheme(value, defaultTheme = DEFAULT_THEME) {
55
- let theme = defaultTheme;
56
- if (value) {
57
- const themes = ["dark", "light", "system"];
58
- const probablyTheme = value;
59
- if (themes.includes(probablyTheme)) {
60
- theme = probablyTheme;
61
- }
62
- }
63
- return theme;
64
- }
65
- function generateColorPalette(value, defaultColor = DEFAULT_COLOR, colorShadeMap = DefaultColorShadeMap) {
66
- let baseColor = defaultColor;
67
- if (value && typeof value === "string") {
68
- baseColor = value;
69
- }
70
- const color = new tinycolor.TinyColor(baseColor);
71
- return {
72
- 50: color.lighten(colorShadeMap[50]).toHexString(),
73
- 100: color.lighten(colorShadeMap[100]).toHexString(),
74
- 200: color.lighten(colorShadeMap[200]).toHexString(),
75
- 300: color.lighten(colorShadeMap[300]).toHexString(),
76
- 400: color.lighten(colorShadeMap[400]).toHexString(),
77
- 500: color.toHexString(),
78
- 600: color.darken(colorShadeMap[600]).toHexString(),
79
- 700: color.darken(colorShadeMap[700]).toHexString(),
80
- 800: color.darken(colorShadeMap[800]).toHexString(),
81
- 900: color.darken(colorShadeMap[900]).toHexString()
82
- };
83
- }
84
- exports.extractTheme = extractTheme;
85
- exports.generateColorPalette = generateColorPalette;
86
40
  exports.transformSiteNavigation = transformSiteNavigation;
@@ -51,9 +51,11 @@ const footer$3 = {
51
51
  const gameDemo$3 = {
52
52
  warning: "Ihr Browser ist zu alt, um das iframe-Element anzuzeigen.",
53
53
  action: {
54
- playForFree: "Kostenlos spielen",
54
+ playForReal: "Spiele Mit Echtgeld",
55
+ playForFree: "Kostenlos Spielen",
55
56
  activateFullscreen: "Vollbildmodus aktivieren",
56
- deactivateFullscreen: "Vollbildmodus deaktivieren"
57
+ deactivateFullscreen: "Vollbildmodus deaktivieren",
58
+ exit: "Beenden"
57
59
  }
58
60
  };
59
61
  const gameInfo$3 = {
@@ -168,9 +170,11 @@ const footer$2 = {
168
170
  const gameDemo$2 = {
169
171
  warning: "Your browser is too old to display the iframe element",
170
172
  action: {
173
+ playForReal: "Play for Real",
171
174
  playForFree: "Play for Free",
172
175
  activateFullscreen: "Activate Fullscreen mode",
173
- deactivateFullscreen: "Deactivate Fullscreen mode"
176
+ deactivateFullscreen: "Deactivate Fullscreen mode",
177
+ exit: "Exit"
174
178
  }
175
179
  };
176
180
  const gameInfo$2 = {
@@ -285,9 +289,11 @@ const footer$1 = {
285
289
  const gameDemo$1 = {
286
290
  warning: "Il tuo browser è troppo vecchio per visualizzare l'elemento iframe",
287
291
  action: {
288
- playForFree: "Gioca gratis",
292
+ playForReal: "Gioca ora",
293
+ playForFree: "Gioco demo gratuito",
289
294
  activateFullscreen: "Attiva la modalità a schermo intero",
290
- deactivateFullscreen: "Disattiva la modalità a schermo intero"
295
+ deactivateFullscreen: "Disattiva la modalità a schermo intero",
296
+ exit: "Esci"
291
297
  }
292
298
  };
293
299
  const gameInfo$1 = {
@@ -402,9 +408,11 @@ const footer = {
402
408
  const gameDemo = {
403
409
  warning: "Ваш браузер слишком устарел для отображения элемента iframe",
404
410
  action: {
405
- playForFree: "Играть бесплатно",
411
+ playForReal: "Играть на деньги",
412
+ playForFree: "Демо — бесплатно",
406
413
  activateFullscreen: "Включить полноэкранный режим",
407
- deactivateFullscreen: "Выключить полноэкранный режим"
414
+ deactivateFullscreen: "Выключить полноэкранный режим",
415
+ exit: "Выйти"
408
416
  }
409
417
  };
410
418
  const gameInfo = {
@@ -52,9 +52,11 @@ const footer$3 = {
52
52
  const gameDemo$3 = {
53
53
  warning: "Ihr Browser ist zu alt, um das iframe-Element anzuzeigen.",
54
54
  action: {
55
- playForFree: "Kostenlos spielen",
55
+ playForReal: "Spiele Mit Echtgeld",
56
+ playForFree: "Kostenlos Spielen",
56
57
  activateFullscreen: "Vollbildmodus aktivieren",
57
- deactivateFullscreen: "Vollbildmodus deaktivieren"
58
+ deactivateFullscreen: "Vollbildmodus deaktivieren",
59
+ exit: "Beenden"
58
60
  }
59
61
  };
60
62
  const gameInfo$3 = {
@@ -169,9 +171,11 @@ const footer$2 = {
169
171
  const gameDemo$2 = {
170
172
  warning: "Your browser is too old to display the iframe element",
171
173
  action: {
174
+ playForReal: "Play for Real",
172
175
  playForFree: "Play for Free",
173
176
  activateFullscreen: "Activate Fullscreen mode",
174
- deactivateFullscreen: "Deactivate Fullscreen mode"
177
+ deactivateFullscreen: "Deactivate Fullscreen mode",
178
+ exit: "Exit"
175
179
  }
176
180
  };
177
181
  const gameInfo$2 = {
@@ -286,9 +290,11 @@ const footer$1 = {
286
290
  const gameDemo$1 = {
287
291
  warning: "Il tuo browser è troppo vecchio per visualizzare l'elemento iframe",
288
292
  action: {
289
- playForFree: "Gioca gratis",
293
+ playForReal: "Gioca ora",
294
+ playForFree: "Gioco demo gratuito",
290
295
  activateFullscreen: "Attiva la modalità a schermo intero",
291
- deactivateFullscreen: "Disattiva la modalità a schermo intero"
296
+ deactivateFullscreen: "Disattiva la modalità a schermo intero",
297
+ exit: "Esci"
292
298
  }
293
299
  };
294
300
  const gameInfo$1 = {
@@ -403,9 +409,11 @@ const footer = {
403
409
  const gameDemo = {
404
410
  warning: "Ваш браузер слишком устарел для отображения элемента iframe",
405
411
  action: {
406
- playForFree: "Играть бесплатно",
412
+ playForReal: "Играть на деньги",
413
+ playForFree: "Демо — бесплатно",
407
414
  activateFullscreen: "Включить полноэкранный режим",
408
- deactivateFullscreen: "Выключить полноэкранный режим"
415
+ deactivateFullscreen: "Выключить полноэкранный режим",
416
+ exit: "Выйти"
409
417
  }
410
418
  };
411
419
  const gameInfo = {
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ const react = require("@chakra-ui/react");
3
+ const index = require("./index-DVcQxWMZ.js");
4
+ require("./index-BPLxhZG_.js");
5
+ function usePrimaryColors() {
6
+ const color = react.useColorModeValue(index.LIGHT_THEME_COLOR, index.DARK_THEME_COLOR);
7
+ const bgColor = react.useColorModeValue("brand.500", "brand.200");
8
+ const invertedColor = react.useColorModeValue(index.DARK_THEME_COLOR, index.LIGHT_THEME_COLOR);
9
+ return { color, bgColor, invertedColor };
10
+ }
11
+ exports.usePrimaryColors = usePrimaryColors;