@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
package/dist/index.mjs CHANGED
@@ -1,10 +1,11 @@
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";
2
- import { u } from "./index-xuSxvz5z.mjs";
3
- import { a as a2, G as G2, r } from "./index-DoBCANwf.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
+ import { u } from "./index-CkTgVjZS.mjs";
3
+ import { a as a2, G as G2, r } from "./index-BE9gNdXx.mjs";
4
4
  import { M } from "./index-CcsbqDXL.mjs";
5
5
  import { S as S2, u as u2 } from "./index-BNb-P8a6.mjs";
6
- import { A as A2, f as f2, b as b2, c as c2, a as a3, g as g2, e as e2, p, d as d2, r as r2, t } from "./index-Db-ZIQ0A.mjs";
7
- import { e as e3, g as g3, t as t2 } from "./index-DzEvPZny.mjs";
6
+ import { A as A2, D, L as L2 } from "./index-MpNfBHkQ.mjs";
7
+ import { f as f2, b as b2, c as c2, a as a3, g as g2, e as e2, p, d as d2, r as r2, t } from "./index-DPO0aIC3.mjs";
8
+ import { t as t2 } from "./index-Ca_M-II5.mjs";
8
9
  import { default as default2 } from "i18next";
9
10
  export {
10
11
  A2 as Animation,
@@ -14,6 +15,7 @@ export {
14
15
  a as BonusCardGrid,
15
16
  l as Center,
16
17
  C as ContactForm,
18
+ D as DARK_THEME_COLOR,
17
19
  F as Faq,
18
20
  b as FeatureCard,
19
21
  c as FeatureCardGrid,
@@ -25,23 +27,21 @@ export {
25
27
  G2 as GameVolatility,
26
28
  m as Grid,
27
29
  H as HowTo,
30
+ L2 as LIGHT_THEME_COLOR,
28
31
  L as Layout,
29
32
  n as LinkButton,
30
33
  g as List,
31
34
  M as MdxProvider,
32
35
  N as NotFound,
33
36
  P as ProsCons,
34
- o as PulseButton,
35
37
  S as Seo,
36
38
  S2 as SiteProvider,
37
39
  h as StrapiContentRenderer,
38
40
  T as Table,
39
41
  i as Tabs,
40
42
  j as Tip,
41
- e3 as extractTheme,
42
43
  f2 as formatDate,
43
44
  b2 as formatNumber,
44
- g3 as generateColorPalette,
45
45
  c2 as getCurrencySymbol,
46
46
  a3 as getCurrentMonth,
47
47
  g2 as getCurrentYear,
@@ -1,6 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
- import { IBonus, ILink } from '../../content';
2
+ import { IBonus } from '../../content';
3
3
  import { Color } from '../common';
4
+ import { ILink } from '../link';
4
5
  type TextContent = string | ReactElement;
5
6
  export interface IBonusCardCustomizationProps {
6
7
  color?: Color;
@@ -0,0 +1,6 @@
1
+ import { ButtonProps } from '@chakra-ui/react';
2
+ import { BaseSize, IAnimation } from '../common';
3
+ export type BaseButtonProps = Pick<ButtonProps, 'width' | 'textTransform' | 'textDecoration' | 'onClick'> & {
4
+ size?: 'xs' | BaseSize | 'auto';
5
+ animation?: IAnimation;
6
+ };
@@ -6,4 +6,16 @@ type BoxPaddingProps = Pick<BoxProps, 'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | '
6
6
  type BoxMarginProps = Pick<BoxProps, 'm' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'ms' | 'me'>;
7
7
  export type BoxPositionProps = BoxMarginProps & BoxPaddingProps;
8
8
  export type Color = ColorProps['color'];
9
+ export type BaseSize = 'sm' | 'md' | 'lg';
10
+ export type AnimationType = 'pulse';
11
+ export interface IAnimationParams {
12
+ duration?: number;
13
+ timingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out';
14
+ isInfinite?: boolean;
15
+ }
16
+ export interface IAnimation {
17
+ type: AnimationType;
18
+ params?: IAnimationParams;
19
+ }
20
+ export type AnimationGetter = (params?: IAnimationParams) => string;
9
21
  export {};
@@ -1,7 +1,8 @@
1
1
  import { ReactElement } from 'react';
2
- import { IGame, ILink } from '../../content';
2
+ import { IGame } from '../../content';
3
+ import { ILink } from '../link';
3
4
  export interface IGameCard extends IGame {
4
- link?: ILink['url'];
5
+ href?: ILink['href'];
5
6
  image?: string | ReactElement;
6
7
  }
7
8
  export type GameCardHeight = 'full' | 'auto';
@@ -1,4 +1,5 @@
1
1
  export * from './bonus-card';
2
+ export * from './button';
2
3
  export * from './common';
3
4
  export * from './external-image';
4
5
  export * from './faq';
@@ -7,6 +8,7 @@ export * from './game-info';
7
8
  export * from './grid';
8
9
  export * from './how-to';
9
10
  export * from './image';
11
+ export * from './link';
10
12
  export * from './navigation';
11
13
  export * from './pros-cons';
12
14
  export * from './strapi-component';
@@ -0,0 +1,5 @@
1
+ export interface ILink {
2
+ label: string;
3
+ href: string;
4
+ }
5
+ export type LinkType = 'direct' | 'redirect';
@@ -2,5 +2,4 @@ export * from './author';
2
2
  export * from './bonus';
3
3
  export * from './feature';
4
4
  export * from './game';
5
- export * from './link';
6
5
  export * from './seo';
@@ -11,9 +11,13 @@ interface ISiteFooterConfig {
11
11
  extra?: ReactNode;
12
12
  showDisclaimer?: boolean;
13
13
  }
14
+ interface ISiteThemeConfig {
15
+ isInvertedColor?: boolean;
16
+ }
14
17
  export interface ISiteConfigs {
15
18
  header?: ISiteHeaderConfig;
16
19
  footer?: ISiteFooterConfig;
20
+ theme?: ISiteThemeConfig;
17
21
  }
18
22
  export interface ISiteMetadata {
19
23
  name: string;
@@ -1,8 +1,2 @@
1
- export declare const Animation: {
2
- readonly pulse: {
3
- name: string;
4
- styles: string;
5
- anim: 1;
6
- toString: () => string;
7
- } & string;
8
- };
1
+ import { AnimationGetter, AnimationType } from '../../types';
2
+ export declare const Animation: Record<AnimationType, AnimationGetter>;
@@ -1,18 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../index-CpjGjVVj.js");
4
- const index$1 = require("../index-NsIHOkeN.js");
3
+ const index = require("../index-DVcQxWMZ.js");
4
+ const index$1 = require("../index-DuQjQMNN.js");
5
+ const index$2 = require("../index-BClxYYix.js");
5
6
  exports.Animation = index.Animation;
6
- exports.formatDate = index.formatDate;
7
- exports.formatNumber = index.formatNumber;
8
- exports.getCurrencySymbol = index.getCurrencySymbol;
9
- exports.getCurrentMonth = index.getCurrentMonth;
10
- exports.getCurrentYear = index.getCurrentYear;
11
- exports.getSeededRandomComparator = index.getSeededRandomComparator;
12
- exports.parseNumber = index.parseNumber;
13
- exports.randomComparator = index.randomComparator;
14
- exports.round = index.round;
15
- exports.toFixedTwo = index.toFixedTwo;
16
- exports.extractTheme = index$1.extractTheme;
17
- exports.generateColorPalette = index$1.generateColorPalette;
18
- exports.transformSiteNavigation = index$1.transformSiteNavigation;
7
+ exports.DARK_THEME_COLOR = index.DARK_THEME_COLOR;
8
+ exports.LIGHT_THEME_COLOR = index.LIGHT_THEME_COLOR;
9
+ exports.formatDate = index$1.formatDate;
10
+ exports.formatNumber = index$1.formatNumber;
11
+ exports.getCurrencySymbol = index$1.getCurrencySymbol;
12
+ exports.getCurrentMonth = index$1.getCurrentMonth;
13
+ exports.getCurrentYear = index$1.getCurrentYear;
14
+ exports.getSeededRandomComparator = index$1.getSeededRandomComparator;
15
+ exports.parseNumber = index$1.parseNumber;
16
+ exports.randomComparator = index$1.randomComparator;
17
+ exports.round = index$1.round;
18
+ exports.toFixedTwo = index$1.toFixedTwo;
19
+ exports.transformSiteNavigation = index$2.transformSiteNavigation;
@@ -1,11 +1,12 @@
1
- import { A, f, b, c, a, g, e, p, d, r, t } from "../index-Db-ZIQ0A.mjs";
2
- import { e as e2, g as g2, t as t2 } from "../index-DzEvPZny.mjs";
1
+ import { A, D, L } from "../index-MpNfBHkQ.mjs";
2
+ import { f, b, c, a, g, e, p, d, r, t } from "../index-DPO0aIC3.mjs";
3
+ import { t as t2 } from "../index-Ca_M-II5.mjs";
3
4
  export {
4
5
  A as Animation,
5
- e2 as extractTheme,
6
+ D as DARK_THEME_COLOR,
7
+ L as LIGHT_THEME_COLOR,
6
8
  f as formatDate,
7
9
  b as formatNumber,
8
- g2 as generateColorPalette,
9
10
  c as getCurrencySymbol,
10
11
  a as getCurrentMonth,
11
12
  g as getCurrentYear,
@@ -1,3 +1,2 @@
1
- import { ColorShadeMap, ColorValue, Theme } from '../../types';
2
- export declare function extractTheme(value: unknown, defaultTheme?: Theme): Theme;
3
- export declare function generateColorPalette(value: unknown, defaultColor?: string, colorShadeMap?: ColorShadeMap): ColorValue;
1
+ export declare const DARK_THEME_COLOR = "white";
2
+ export declare const LIGHT_THEME_COLOR = "gray.800";
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": "4.1.0",
4
+ "version": "4.2.1",
5
5
  "keywords": [
6
6
  "react",
7
7
  "ui",
@@ -1,15 +0,0 @@
1
- import { FC } from 'react';
2
- import { BoxPositionProps } from '../../../types';
3
- type PulseButtonActionProps = {
4
- to?: never;
5
- onClick: VoidFunction;
6
- } | {
7
- to: string;
8
- onClick?: never;
9
- };
10
- type PulseButtonProps = {
11
- label: string;
12
- colorScheme?: 'dark' | 'light';
13
- } & PulseButtonActionProps & BoxPositionProps;
14
- declare const PulseButton: FC<PulseButtonProps>;
15
- export default PulseButton;
@@ -1,4 +0,0 @@
1
- export declare const ColorMap: {
2
- readonly light: "gray.200";
3
- readonly dark: "gray.700";
4
- };
@@ -1,8 +0,0 @@
1
- "use strict";
2
- const react = require("@chakra-ui/react");
3
- function usePrimaryColors() {
4
- const color = react.useColorModeValue("white", "gray.800");
5
- const bgColor = react.useColorModeValue("brand.500", "brand.200");
6
- return { color, bgColor };
7
- }
8
- exports.usePrimaryColors = usePrimaryColors;
@@ -1,9 +0,0 @@
1
- import { useColorModeValue } from "@chakra-ui/react";
2
- function usePrimaryColors() {
3
- const color = useColorModeValue("white", "gray.800");
4
- const bgColor = useColorModeValue("brand.500", "brand.200");
5
- return { color, bgColor };
6
- }
7
- export {
8
- usePrimaryColors as u
9
- };
@@ -1,4 +0,0 @@
1
- export interface ILink {
2
- label: string;
3
- url: string;
4
- }