@anywayseo/tools 1.0.1 → 1.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.
Files changed (59) hide show
  1. package/dist/components/base/center/index.d.ts +6 -0
  2. package/dist/components/base/grid/index.d.ts +19 -0
  3. package/dist/components/base/grid/types.d.ts +3 -0
  4. package/dist/components/base/grid/utils.d.ts +2 -0
  5. package/dist/components/base/index.d.ts +3 -0
  6. package/dist/components/base/link-button/index.d.ts +7 -0
  7. package/dist/components/bonus-card/content/index.d.ts +7 -0
  8. package/dist/components/bonus-card/index.d.ts +7 -0
  9. package/dist/components/bonus-card/title/index.d.ts +7 -0
  10. package/dist/components/game-card/index.d.ts +7 -0
  11. package/dist/components/game-info/utils.d.ts +1 -1
  12. package/dist/components/index.cjs +9 -1
  13. package/dist/components/index.d.ts +6 -0
  14. package/dist/components/index.mjs +12 -4
  15. package/dist/components/layout/container/index.d.ts +3 -0
  16. package/dist/components/layout/hero/index.d.ts +2 -0
  17. package/dist/components/list/index.d.ts +13 -0
  18. package/dist/components/table/index.d.ts +12 -0
  19. package/dist/components/tabs/index.d.ts +8 -0
  20. package/dist/i18n/index.cjs +1 -1
  21. package/dist/i18n/index.mjs +1 -1
  22. package/dist/i18n/resources/de/index.d.ts +108 -0
  23. package/dist/i18n/resources/en/index.d.ts +9 -0
  24. package/dist/i18n/resources/it/index.d.ts +9 -0
  25. package/dist/index-B-5oUop6.js +47 -0
  26. package/dist/index-BUx1Bxrs.mjs +48 -0
  27. package/dist/{index-alye-Zt-.js → index-CB4bJU2N.js} +182 -10
  28. package/dist/{index-D5QkKj_Z.mjs → index-CD5ZU1Gw.mjs} +194 -22
  29. package/dist/{index-BtWxmLHW.mjs → index-CJvs4SfG.mjs} +12 -2
  30. package/dist/{index-DB1dS9cp.js → index-DCIXk-YH.js} +140 -4
  31. package/dist/{index-Bh5idiRE.mjs → index-DxLcykuT.mjs} +140 -4
  32. package/dist/{index-JMmaWcmu.js → index-jvxaXXE3.js} +11 -1
  33. package/dist/index.cjs +15 -3
  34. package/dist/index.mjs +20 -8
  35. package/dist/types/components/bonus-card/index.d.ts +9 -0
  36. package/dist/types/components/common/index.d.ts +3 -0
  37. package/dist/types/components/game-card/index.d.ts +6 -0
  38. package/dist/types/{game-info → components/game-info}/index.d.ts +2 -2
  39. package/dist/types/components/index.d.ts +8 -0
  40. package/dist/types/components/tabs/index.d.ts +8 -0
  41. package/dist/types/i18n/index.d.ts +2 -2
  42. package/dist/types/index.d.ts +4 -7
  43. package/dist/types/models/bonus/index.d.ts +4 -0
  44. package/dist/types/models/game/index.d.ts +3 -0
  45. package/dist/types/models/index.d.ts +5 -0
  46. package/dist/types/models/link/index.d.ts +4 -0
  47. package/dist/types/site-metadata/index.d.ts +1 -1
  48. package/dist/types/theme/index.d.ts +27 -0
  49. package/dist/utils/index.cjs +5 -1
  50. package/dist/utils/index.d.ts +1 -0
  51. package/dist/utils/index.mjs +6 -2
  52. package/dist/utils/numbers/index.d.ts +1 -0
  53. package/dist/utils/theme/index.d.ts +3 -0
  54. package/package.json +3 -1
  55. /package/dist/types/{faq → components/faq}/index.d.ts +0 -0
  56. /package/dist/types/{how-to → components/how-to}/index.d.ts +0 -0
  57. /package/dist/types/{pros-cons → components/pros-cons}/index.d.ts +0 -0
  58. /package/dist/types/{author → models/author}/index.d.ts +0 -0
  59. /package/dist/types/{feature → models/feature}/index.d.ts +0 -0
@@ -0,0 +1,6 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ type CenterProps = PropsWithChildren<{
3
+ className: string;
4
+ }>;
5
+ declare const Center: FC<CenterProps>;
6
+ export default Center;
@@ -0,0 +1,19 @@
1
+ import { Key } from 'react';
2
+ import { KeyGetter, RenderFunction } from '../../../types';
3
+ import { ColumnsConfig, SpacingConfig } from './types';
4
+ type GridGetKeyProp<T> = T extends {
5
+ key: Key;
6
+ } ? {
7
+ getKey?: KeyGetter<T>;
8
+ } : {
9
+ getKey: KeyGetter<T>;
10
+ };
11
+ type GridProps<T> = {
12
+ items: T[];
13
+ columns?: ColumnsConfig;
14
+ gap?: SpacingConfig;
15
+ className?: string;
16
+ render: RenderFunction<T>;
17
+ } & GridGetKeyProp<T>;
18
+ declare const Grid: <T>({ items, columns, gap, render, getKey, className }: GridProps<T>) => import("react/jsx-runtime").JSX.Element;
19
+ export default Grid;
@@ -0,0 +1,3 @@
1
+ import { ResponsiveObject } from '@chakra-ui/react';
2
+ export type ColumnsConfig = ResponsiveObject<number>;
3
+ export type SpacingConfig = ResponsiveObject<number> | number;
@@ -0,0 +1,2 @@
1
+ import { ColumnsConfig } from './types';
2
+ export declare const defaultColumns: ColumnsConfig;
@@ -0,0 +1,3 @@
1
+ export { default as Center } from './center';
2
+ export { default as Grid } from './center';
3
+ export { default as LinkButton } from './link-button';
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { ILink } from '../../../types';
3
+ type LinkButtonProps = ILink & {
4
+ width?: 'auto' | 'full' | number;
5
+ };
6
+ declare const LinkButton: FC<LinkButtonProps>;
7
+ export default LinkButton;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { IBonusCard } from '../../../types';
3
+ type BonusCardContentProps = {
4
+ content: IBonusCard['content'];
5
+ };
6
+ declare const BonusCardContent: FC<BonusCardContentProps>;
7
+ export default BonusCardContent;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { IBonusCard } from '../../types';
3
+ type BonusCardProps = IBonusCard & {
4
+ className?: string;
5
+ };
6
+ declare const BonusCard: FC<BonusCardProps>;
7
+ export default BonusCard;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { IBonusCard } from '../../../types';
3
+ type BonusCardTitleProps = {
4
+ content: IBonusCard['title'];
5
+ };
6
+ declare const BonusCardTitle: FC<BonusCardTitleProps>;
7
+ export default BonusCardTitle;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { IGameCard } from '../../types';
3
+ type GameCardProps = IGameCard & {
4
+ className?: string;
5
+ };
6
+ declare const GameCard: FC<GameCardProps>;
7
+ export default GameCard;
@@ -1,2 +1,2 @@
1
1
  import { Currency, GameCharacteristic } from '../../types';
2
- export declare function getGameInfoItemValue(key: GameCharacteristic, value: unknown, currency: Currency): string;
2
+ export declare function getGameInfoItemValue(key: GameCharacteristic, value: unknown, currency: Currency | Currency[]): string;
@@ -1,14 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../index-alye-Zt-.js");
3
+ const index = require("../index-CB4bJU2N.js");
4
4
  exports.Author = index.Author;
5
+ exports.BonusCard = index.BonusCard;
6
+ exports.Center = index.Center;
5
7
  exports.ContactForm = index.ContactForm;
6
8
  exports.ExpertTip = index.ExpertTip;
7
9
  exports.Faq = index.Faq;
8
10
  exports.Features = index.Features;
11
+ exports.GameCard = index.GameCard;
9
12
  exports.GameDemo = index.GameDemo;
10
13
  exports.GameInfo = index.GameInfo;
14
+ exports.Grid = index.Center;
11
15
  exports.HowTo = index.HowTo;
12
16
  exports.Layout = index.Layout;
17
+ exports.LinkButton = index.LinkButton;
18
+ exports.List = index.List;
13
19
  exports.ProsCons = index.ProsCons;
14
20
  exports.Seo = index.Seo;
21
+ exports.Table = index.Table;
22
+ exports.Tabs = index.Tabs;
@@ -1,11 +1,17 @@
1
1
  export { default as Author } from './author';
2
+ export * from './base';
3
+ export { default as BonusCard } from './bonus-card';
2
4
  export { default as ContactForm } from './contact-form';
3
5
  export { default as ExpertTip } from './expert-tip';
4
6
  export { default as Faq } from './faq';
5
7
  export { default as Features } from './features';
8
+ export { default as GameCard } from './game-card';
6
9
  export { default as GameDemo } from './game-demo';
7
10
  export { default as GameInfo } from './game-info';
8
11
  export { default as HowTo } from './how-to';
9
12
  export { default as Layout } from './layout';
13
+ export { default as List } from './list';
10
14
  export { default as ProsCons } from './pros-cons';
11
15
  export { default as Seo } from './seo';
16
+ export { default as Table } from './table';
17
+ export { default as Tabs } from './tabs';
@@ -1,14 +1,22 @@
1
- import { A, C, E, F, a, G, b, H, L, P, S } from "../index-D5QkKj_Z.mjs";
1
+ import { A, B, f, C, E, F, a, G, b, c, f as f2, H, L, g, d, P, S, T, e } from "../index-CD5ZU1Gw.mjs";
2
2
  export {
3
3
  A as Author,
4
+ B as BonusCard,
5
+ f as Center,
4
6
  C as ContactForm,
5
7
  E as ExpertTip,
6
8
  F as Faq,
7
9
  a as Features,
8
- G as GameDemo,
9
- b as GameInfo,
10
+ G as GameCard,
11
+ b as GameDemo,
12
+ c as GameInfo,
13
+ f2 as Grid,
10
14
  H as HowTo,
11
15
  L as Layout,
16
+ g as LinkButton,
17
+ d as List,
12
18
  P as ProsCons,
13
- S as Seo
19
+ S as Seo,
20
+ T as Table,
21
+ e as Tabs
14
22
  };
@@ -0,0 +1,3 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ declare const Container: FC<PropsWithChildren>;
3
+ export default Container;
@@ -1,8 +1,10 @@
1
1
  import { FC, ReactElement } from 'react';
2
+ import { ILink } from '../../../types';
2
3
  type HeroProps = {
3
4
  title: string;
4
5
  subtitle?: string;
5
6
  content?: string;
7
+ link?: ILink;
6
8
  image?: ReactElement;
7
9
  };
8
10
  declare const Hero: FC<HeroProps>;
@@ -0,0 +1,13 @@
1
+ import { RenderFunction } from '../../types';
2
+ type ListRenderProps<T> = T extends string ? {
3
+ render?: never;
4
+ } : {
5
+ render: RenderFunction<T>;
6
+ };
7
+ type ListProps<T = string> = {
8
+ items: T[];
9
+ bullet?: string;
10
+ className?: string;
11
+ } & ListRenderProps<T>;
12
+ declare const List: <T>({ items, bullet, render, className }: ListProps<T>) => import("react/jsx-runtime").JSX.Element;
13
+ export default List;
@@ -0,0 +1,12 @@
1
+ import { FC, ReactNode } from 'react';
2
+ type TableProps = {
3
+ columnNumber: number;
4
+ items: ReactNode[];
5
+ caption?: string;
6
+ bordered?: boolean;
7
+ striped?: boolean;
8
+ scrollable?: boolean;
9
+ className?: string;
10
+ };
11
+ declare const Table: FC<TableProps>;
12
+ export default Table;
@@ -0,0 +1,8 @@
1
+ import { ITabItem, RenderFunction } from '../../types';
2
+ type TabsProps<T> = {
3
+ items: ITabItem<T>[];
4
+ className?: string;
5
+ render: RenderFunction<T>;
6
+ };
7
+ declare const Tabs: <T>({ items, className, render }: TabsProps<T>) => import("react/jsx-runtime").JSX.Element;
8
+ export default Tabs;
@@ -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-DB1dS9cp.js");
5
+ const i18n$1 = require("../index-DCIXk-YH.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-Bh5idiRE.mjs";
3
+ import { r } from "../index-DxLcykuT.mjs";
4
4
  export {
5
5
  default2 as i18n,
6
6
  r as resources
@@ -0,0 +1,108 @@
1
+ declare const dictionary: {
2
+ readonly pageNotFound: {
3
+ seo: {
4
+ title: string;
5
+ };
6
+ title: string;
7
+ description: string;
8
+ action: string;
9
+ };
10
+ readonly footer: {
11
+ copyright: string;
12
+ disclaimer: {
13
+ title: string;
14
+ description: string;
15
+ };
16
+ };
17
+ readonly gameDemo: {
18
+ warning: string;
19
+ action: {
20
+ playForFree: string;
21
+ activateFullscreen: string;
22
+ deactivateFullscreen: string;
23
+ };
24
+ };
25
+ readonly gameInfo: {
26
+ title: string;
27
+ group: {
28
+ general: string;
29
+ features: string;
30
+ };
31
+ feature: {
32
+ BONUS_FEATURES: string;
33
+ COMPATIBILITY: string;
34
+ DEVELOPER: string;
35
+ HAS_AUTOPLAY: string;
36
+ HAS_BONUS_PURCHASE: string;
37
+ HAS_COLLECTION_SYMBOLS: string;
38
+ HAS_DEMO: string;
39
+ HAS_FAST_SPIN: string;
40
+ HAS_FREE_SPINS: string;
41
+ HAS_PROGRESSIVE_JACKPOT: string;
42
+ LANGUAGES: string;
43
+ MAX_WIN: string;
44
+ MAX_BET: string;
45
+ MIN_BET: string;
46
+ NAME: string;
47
+ PAY_LINES: string;
48
+ REELS_NUMBER: string;
49
+ RELEASE_DATE: string;
50
+ RTP: string;
51
+ THEME: string;
52
+ TYPE: string;
53
+ VOLATILITY: string;
54
+ };
55
+ value: {
56
+ boolean: {
57
+ true: string;
58
+ false: string;
59
+ };
60
+ volatility: {
61
+ HIGH: string;
62
+ MEDIUM: string;
63
+ LOW: string;
64
+ };
65
+ };
66
+ };
67
+ readonly prosCons: {
68
+ advantages: string;
69
+ disadvantages: string;
70
+ };
71
+ readonly author: {
72
+ title: string;
73
+ action: {
74
+ expand: string;
75
+ collapse: string;
76
+ };
77
+ };
78
+ readonly contactForm: {
79
+ field: {
80
+ name: {
81
+ label: string;
82
+ placeholder: string;
83
+ };
84
+ email: {
85
+ label: string;
86
+ placeholder: string;
87
+ };
88
+ message: {
89
+ label: string;
90
+ placeholder: string;
91
+ };
92
+ };
93
+ notification: {
94
+ title: string;
95
+ description: string;
96
+ };
97
+ action: {
98
+ send: string;
99
+ };
100
+ };
101
+ readonly bonusCard: {
102
+ action: {
103
+ expand: string;
104
+ collapse: string;
105
+ };
106
+ };
107
+ };
108
+ export default dictionary;
@@ -1,5 +1,8 @@
1
1
  declare const dictionary: {
2
2
  readonly pageNotFound: {
3
+ seo: {
4
+ title: string;
5
+ };
3
6
  title: string;
4
7
  description: string;
5
8
  action: string;
@@ -95,5 +98,11 @@ declare const dictionary: {
95
98
  send: string;
96
99
  };
97
100
  };
101
+ readonly bonusCard: {
102
+ action: {
103
+ expand: string;
104
+ collapse: string;
105
+ };
106
+ };
98
107
  };
99
108
  export default dictionary;
@@ -1,5 +1,8 @@
1
1
  declare const dictionary: {
2
2
  readonly pageNotFound: {
3
+ seo: {
4
+ title: string;
5
+ };
3
6
  title: string;
4
7
  description: string;
5
8
  action: string;
@@ -95,5 +98,11 @@ declare const dictionary: {
95
98
  send: string;
96
99
  };
97
100
  };
101
+ readonly bonusCard: {
102
+ action: {
103
+ expand: string;
104
+ collapse: string;
105
+ };
106
+ };
98
107
  };
99
108
  export default dictionary;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ const tinycolor = require("@ctrl/tinycolor");
3
+ const DEFAULT_THEME = "system";
4
+ const DEFAULT_COLOR = "#333333";
5
+ const DefaultColorShadeMap = {
6
+ 50: 52,
7
+ 100: 40,
8
+ 200: 30,
9
+ 300: 20,
10
+ 400: 10,
11
+ 600: 10,
12
+ 700: 20,
13
+ 800: 30,
14
+ 900: 40
15
+ };
16
+ function extractTheme(value, defaultTheme = DEFAULT_THEME) {
17
+ let theme = defaultTheme;
18
+ if (value) {
19
+ const themes = ["dark", "light", "system"];
20
+ const probablyTheme = value;
21
+ if (themes.includes(probablyTheme)) {
22
+ theme = probablyTheme;
23
+ }
24
+ }
25
+ return theme;
26
+ }
27
+ function generateColorPalette(value, defaultColor = DEFAULT_COLOR, colorShadeMap = DefaultColorShadeMap) {
28
+ let baseColor = defaultColor;
29
+ if (value && typeof value === "string") {
30
+ baseColor = value;
31
+ }
32
+ const color = new tinycolor.TinyColor(baseColor);
33
+ return {
34
+ 50: color.lighten(colorShadeMap[50]).toHexString(),
35
+ 100: color.lighten(colorShadeMap[100]).toHexString(),
36
+ 200: color.lighten(colorShadeMap[200]).toHexString(),
37
+ 300: color.lighten(colorShadeMap[300]).toHexString(),
38
+ 400: color.lighten(colorShadeMap[400]).toHexString(),
39
+ 500: color.toHexString(),
40
+ 600: color.darken(colorShadeMap[600]).toHexString(),
41
+ 700: color.darken(colorShadeMap[700]).toHexString(),
42
+ 800: color.darken(colorShadeMap[800]).toHexString(),
43
+ 900: color.darken(colorShadeMap[900]).toHexString()
44
+ };
45
+ }
46
+ exports.extractTheme = extractTheme;
47
+ exports.generateColorPalette = generateColorPalette;
@@ -0,0 +1,48 @@
1
+ import { TinyColor } from "@ctrl/tinycolor";
2
+ const DEFAULT_THEME = "system";
3
+ const DEFAULT_COLOR = "#333333";
4
+ const DefaultColorShadeMap = {
5
+ 50: 52,
6
+ 100: 40,
7
+ 200: 30,
8
+ 300: 20,
9
+ 400: 10,
10
+ 600: 10,
11
+ 700: 20,
12
+ 800: 30,
13
+ 900: 40
14
+ };
15
+ function extractTheme(value, defaultTheme = DEFAULT_THEME) {
16
+ let theme = defaultTheme;
17
+ if (value) {
18
+ const themes = ["dark", "light", "system"];
19
+ const probablyTheme = value;
20
+ if (themes.includes(probablyTheme)) {
21
+ theme = probablyTheme;
22
+ }
23
+ }
24
+ return theme;
25
+ }
26
+ function generateColorPalette(value, defaultColor = DEFAULT_COLOR, colorShadeMap = DefaultColorShadeMap) {
27
+ let baseColor = defaultColor;
28
+ if (value && typeof value === "string") {
29
+ baseColor = value;
30
+ }
31
+ const color = new TinyColor(baseColor);
32
+ return {
33
+ 50: color.lighten(colorShadeMap[50]).toHexString(),
34
+ 100: color.lighten(colorShadeMap[100]).toHexString(),
35
+ 200: color.lighten(colorShadeMap[200]).toHexString(),
36
+ 300: color.lighten(colorShadeMap[300]).toHexString(),
37
+ 400: color.lighten(colorShadeMap[400]).toHexString(),
38
+ 500: color.toHexString(),
39
+ 600: color.darken(colorShadeMap[600]).toHexString(),
40
+ 700: color.darken(colorShadeMap[700]).toHexString(),
41
+ 800: color.darken(colorShadeMap[800]).toHexString(),
42
+ 900: color.darken(colorShadeMap[900]).toHexString()
43
+ };
44
+ }
45
+ export {
46
+ extractTheme as e,
47
+ generateColorPalette as g
48
+ };