@griddo/core 10.7.9 → 11.0.2

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 (86) hide show
  1. package/dist/assets/svg/Delete.d.ts +2 -2
  2. package/dist/assets/svg/Duplicate.d.ts +2 -2
  3. package/dist/autotypes.js +1 -1
  4. package/dist/autotypes.js.map +1 -1
  5. package/dist/components/CloudinaryBackgroundImage/index.d.ts +0 -2
  6. package/dist/components/CloudinaryImage/index.d.ts +5 -5
  7. package/dist/components/Component/ComponentWrapper/index.d.ts +1 -1
  8. package/dist/components/Component/index.d.ts +0 -2
  9. package/dist/components/GriddoBackgroundImage/index.d.ts +3 -2
  10. package/dist/components/GriddoImage/index.d.ts +1 -3
  11. package/dist/components/GriddoImageExp/types.d.ts +9 -8
  12. package/dist/components/GriddoImageExp/utils.d.ts +3 -3
  13. package/dist/components/GriddoLink/index.d.ts +8 -10
  14. package/dist/components/GriddoLink/utils.d.ts +6 -5
  15. package/dist/components/LdJson/index.d.ts +0 -2
  16. package/dist/components/Link/index.d.ts +1 -3
  17. package/dist/components/ModulePreview/index.d.ts +5 -5
  18. package/dist/components/Page/index.d.ts +6 -6
  19. package/dist/components/Preview/index.d.ts +3 -3
  20. package/dist/contexts/I18n/index.d.ts +1 -3
  21. package/dist/contexts/Navigation/index.d.ts +3 -3
  22. package/dist/contexts/Page/index.d.ts +1 -1
  23. package/dist/contexts/Session/index.d.ts +2 -2
  24. package/dist/contexts/Site/index.d.ts +6 -6
  25. package/dist/functions/autotypes/ascii.d.ts +3 -2
  26. package/dist/functions/autotypes/getTypeFromField.d.ts +3 -2
  27. package/dist/functions/autotypes/main.d.ts +2 -2
  28. package/dist/functions/autotypes/types.d.ts +9 -8
  29. package/dist/functions/image-utils.d.ts +5 -5
  30. package/dist/functions/index.d.ts +4 -4
  31. package/dist/functions/utils.d.ts +6 -6
  32. package/dist/hooks/__mocks__/page-provider-props.d.ts +1 -1
  33. package/dist/hooks/__mocks__/site-provider-props.d.ts +1 -1
  34. package/dist/hooks/themes/useGlobalTheme.d.ts +1 -1
  35. package/dist/hooks/themes/useTheme.d.ts +2 -2
  36. package/dist/hooks/themes/useThemeColors.d.ts +2 -2
  37. package/dist/hooks/themes/useThemeFont.d.ts +2 -2
  38. package/dist/hooks/themes/useThemePrimitives.d.ts +2 -2
  39. package/dist/hooks/themes/utils.d.ts +1 -1
  40. package/dist/hooks/useContentType.d.ts +1 -1
  41. package/dist/hooks/useContentTypeNavigation.d.ts +1 -1
  42. package/dist/hooks/useDataFilters.d.ts +2 -2
  43. package/dist/hooks/useGriddoImage.d.ts +1 -1
  44. package/dist/hooks/useGriddoImageExp.d.ts +1 -1
  45. package/dist/hooks/useI18n.d.ts +1 -1
  46. package/dist/hooks/useImage.d.ts +1 -1
  47. package/dist/hooks/useList.d.ts +4 -4
  48. package/dist/hooks/useListWithDefaultStaticPage.d.ts +3 -3
  49. package/dist/hooks/useLocaleDate.d.ts +1 -1
  50. package/dist/hooks/usePage.d.ts +1 -1
  51. package/dist/hooks/useReferenceFieldData.d.ts +1 -1
  52. package/dist/hooks/useSite.d.ts +1 -1
  53. package/dist/hooks/utils.d.ts +3 -3
  54. package/dist/index.js +1 -1
  55. package/dist/index.js.map +1 -1
  56. package/dist/node/index.js +4 -4
  57. package/dist/types/api-response-fields/index.d.ts +57 -57
  58. package/dist/types/core/index.d.ts +37 -37
  59. package/dist/types/global.d.ts +25 -15
  60. package/dist/types/schema-fields/base.d.ts +4 -4
  61. package/dist/types/schema-fields/page-content-type-fields.d.ts +37 -37
  62. package/dist/types/schema-fields/props.d.ts +37 -36
  63. package/dist/types/schema-fields/simple-content-type-fields.d.ts +3 -3
  64. package/dist/types/schema-fields/ui-fields.d.ts +2 -2
  65. package/dist/types/schema-fields/ui-template-fields.d.ts +3 -3
  66. package/dist/types/schemas/AutoTypes.d.ts +2 -1
  67. package/dist/types/schemas/Categories.d.ts +4 -3
  68. package/dist/types/schemas/ContentType.d.ts +4 -4
  69. package/dist/types/schemas/DamDefaults.d.ts +3 -2
  70. package/dist/types/schemas/DataPack.d.ts +3 -2
  71. package/dist/types/schemas/HeaderFooter.d.ts +5 -5
  72. package/dist/types/schemas/Languages.d.ts +3 -3
  73. package/dist/types/schemas/Menu.d.ts +5 -5
  74. package/dist/types/schemas/ModuleCategories.d.ts +3 -2
  75. package/dist/types/schemas/PageContentType.d.ts +6 -6
  76. package/dist/types/schemas/RichTextConfig.d.ts +2 -1
  77. package/dist/types/schemas/SimpleContentType.d.ts +6 -6
  78. package/dist/types/schemas/Themes.d.ts +4 -4
  79. package/dist/types/schemas/Translations.d.ts +3 -2
  80. package/dist/types/schemas/UI.d.ts +27 -19
  81. package/dist/types/schemas/base.d.ts +3 -3
  82. package/dist/types/schemas/index.d.ts +14 -14
  83. package/dist/types/schemas/props.d.ts +4 -4
  84. package/dist/types/theme/index.d.ts +10 -10
  85. package/dist/types/utilities.d.ts +7 -6
  86. package/package.json +32 -15
@@ -1,9 +1,9 @@
1
- import * as React from "react";
1
+ import type { CloudinaryImageCrop, CloudinaryImageFormat, CloudinaryResponsiveImageProps } from "../../hooks/useImage";
2
+ import type { ImageDecoding, ImageLoading } from "../../types/core";
3
+ import type { CSSProperties } from "react";
2
4
  import "react-aspect-ratio/aspect-ratio.css";
3
- import { CloudinaryImageCrop, CloudinaryImageFormat, CloudinaryResponsiveImageProps } from "../../hooks/useImage";
4
- import { ImageDecoding, ImageLoading } from "../../types/core";
5
5
  /**
6
- * `<CloudinaryImage>`
6
+ * <CloudinaryImage>
7
7
  *
8
8
  * @deprecated This component will be removed from Griddo in the future.
9
9
  */
@@ -16,7 +16,7 @@ export interface CloudinaryImageProps {
16
16
  fixed?: boolean;
17
17
  publicId?: string;
18
18
  src?: string;
19
- objectFit?: React.CSSProperties["objectFit"];
19
+ objectFit?: CSSProperties["objectFit"];
20
20
  quality?: number;
21
21
  crop?: CloudinaryImageCrop;
22
22
  gravity?: string;
@@ -1,6 +1,6 @@
1
1
  import "./style.css";
2
2
  /**
3
- * `<Wrapper>`
3
+ * <Wrapper>
4
4
  */
5
5
  declare const Wrapper: (props: WrapperProps) => JSX.Element;
6
6
  interface WrapperProps {
@@ -1,6 +1,4 @@
1
1
  /**
2
- * `<Component>`
3
- *
4
2
  * Griddo core component to render dynamically a component/module (using the `component` prop) from the `libComponents` (a list of React components) with the props we provide to it
5
3
  *
6
4
  * @example
@@ -1,5 +1,5 @@
1
+ import type { Core } from "../..";
1
2
  import * as React from "react";
2
- import { Core } from "../..";
3
3
  import "./styles.css";
4
4
  export interface GriddoBackgroundImageProps {
5
5
  format?: Core.ImageFormats;
@@ -18,9 +18,10 @@ export interface GriddoBackgroundImageProps {
18
18
  loading?: Core.ImageLoading;
19
19
  children?: React.ReactNode | Array<React.ReactNode>;
20
20
  className?: string;
21
+ style?: React.CSSProperties;
21
22
  }
22
23
  /**
23
- * `<GriddoBackgroundImage>`
24
+ * <GriddoBackgroundImage>
24
25
  */
25
26
  declare const GriddoBackgroundImage: React.ForwardRefExoticComponent<GriddoBackgroundImageProps & React.RefAttributes<unknown>>;
26
27
  export { GriddoBackgroundImage };
@@ -1,10 +1,8 @@
1
+ import type { FetchPriority, ImageCropType, ImageDecoding, ImageLoading, ImagePosition, ImageTransform, ResponsiveImageProps } from "../../types/core";
1
2
  import * as React from "react";
2
3
  import "react-aspect-ratio/aspect-ratio.css";
3
- import { FetchPriority, ImageCropType, ImageDecoding, ImageLoading, ImagePosition, ImageTransform, ResponsiveImageProps } from "../../types/core";
4
4
  import "./styles.css";
5
5
  /**
6
- * `<GriddoImage>`
7
- *
8
6
  * Renders an image from the **Griddo** cdn.
9
7
  * Also return a ref with the `<picture>` tag.
10
8
  * @see [Documentation](https://www.notion.so/griddoio/GriddoImage-a3973298b4e7447884f29185dae2d07e)
@@ -1,6 +1,6 @@
1
- import { Fields } from "../..";
2
- import { FetchPriority, ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform } from "../../types/core";
3
- export interface Source {
1
+ import type { Fields } from "../..";
2
+ import type { FetchPriority, ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform } from "../../types/core";
3
+ interface Source {
4
4
  sizes?: string;
5
5
  media?: string;
6
6
  width?: string;
@@ -11,7 +11,7 @@ export interface Source {
11
11
  crop?: ImageCropType;
12
12
  image?: Fields.Image;
13
13
  }
14
- export interface GriddoImageCommonPropsExperimental extends Omit<React.ComponentPropsWithRef<"img">, "src" | "srcSet" | "width" | "height"> {
14
+ interface GriddoImageCommonPropsExperimental extends Omit<React.ComponentPropsWithRef<"img">, "src" | "srcSet" | "width" | "height"> {
15
15
  crop?: ImageCropType;
16
16
  fetchpriority?: FetchPriority;
17
17
  /** @deprecated `<GriddoImageExp>` uses `position` from the `image` prop. */
@@ -33,22 +33,23 @@ export interface GriddoImageCommonPropsExperimental extends Omit<React.Component
33
33
  /** Griddo ImageField */
34
34
  image?: Fields.Image;
35
35
  }
36
- export interface GriddoImageSvgExperimental extends GriddoImageCommonPropsExperimental {
36
+ interface GriddoImageSvgExperimental extends GriddoImageCommonPropsExperimental {
37
37
  format?: "svg";
38
38
  responsive?: never;
39
39
  quality?: never;
40
40
  formats?: never;
41
41
  transforms?: never;
42
42
  }
43
- export interface GriddoImageGifExperimental extends GriddoImageCommonPropsExperimental {
43
+ interface GriddoImageGifExperimental extends GriddoImageCommonPropsExperimental {
44
44
  format?: "gif";
45
45
  responsive?: never;
46
46
  quality?: never;
47
47
  formats?: never;
48
48
  transforms?: never;
49
49
  }
50
- export interface GriddoImageJpgWebpAvifExperimental extends GriddoImageCommonPropsExperimental {
50
+ interface GriddoImageJpgWebpAvifExperimental extends GriddoImageCommonPropsExperimental {
51
51
  /** Format is set automatically based on formats prop */
52
52
  format?: never;
53
53
  }
54
- export type GriddoImagePropsExperimental = GriddoImageJpgWebpAvifExperimental | GriddoImageGifExperimental | GriddoImageSvgExperimental;
54
+ type GriddoImagePropsExperimental = GriddoImageJpgWebpAvifExperimental | GriddoImageGifExperimental | GriddoImageSvgExperimental;
55
+ export type { GriddoImageCommonPropsExperimental, GriddoImageGifExperimental, GriddoImageJpgWebpAvifExperimental, GriddoImagePropsExperimental, GriddoImageSvgExperimental, Source, };
@@ -1,6 +1,6 @@
1
- import { Source } from "./types";
2
- import { Core, Fields } from "../..";
3
- import { GriddoDamDefaults, ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform } from "../../types/core";
1
+ import type { Source } from "./types";
2
+ import type { Core, Fields } from "../..";
3
+ import type { GriddoDamDefaults, ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform } from "../../types/core";
4
4
  interface GetGriddoArtDirectionImage {
5
5
  sources: Array<Source>;
6
6
  width?: string;
@@ -1,8 +1,6 @@
1
- import * as React from "react";
2
- import { Url } from "../../types/api-response-fields";
1
+ import type { Url } from "../../types/api-response-fields";
2
+ import type { ComponentPropsWithoutRef, CSSProperties, MouseEvent, ReactNode, Ref } from "react";
3
3
  /**
4
- * <`GriddoLink>`
5
- *
6
4
  * Renders a router component from internal/external Griddo link.
7
5
  * You may want to use `<GriddoLink>` instead of an `<a>` tag for internal Griddo pages.
8
6
  * @see [Documentation](https://www.notion.so/griddoio/GriddoLink-bc4f7cddd1484648b024d4bebe4b74c3)
@@ -32,7 +30,7 @@ export interface LinkGetProps {
32
30
  /** The app’s location. */
33
31
  location: WindowLocation;
34
32
  }
35
- export interface GriddoLinkProps extends Omit<React.ComponentPropsWithoutRef<"a">, "href"> {
33
+ export interface GriddoLinkProps extends Omit<ComponentPropsWithoutRef<"a">, "href"> {
36
34
  /** Griddo Url with the link data */
37
35
  url?: Url;
38
36
  /** Calls up to you to get props for the underlying anchor element. Useful for styling the anchor as active. */
@@ -40,7 +38,7 @@ export interface GriddoLinkProps extends Omit<React.ComponentPropsWithoutRef<"a"
40
38
  /** A class name that will be applied the current item is active. */
41
39
  activeClassName?: string;
42
40
  /** A style object that will be applied when the current item is active. */
43
- activeStyle?: React.CSSProperties;
41
+ activeStyle?: CSSProperties;
44
42
  /** Whether partial URLs are considered active (e.g. /blog#hello-world matches <Link to="/blog"> if partiallyActive is true). */
45
43
  partiallyActive?: boolean;
46
44
  /** If `true`, the latest entry on the history stack will be replaced with a new one. Use this when you don’t want the previous page to show up when the user clicks the back button. */
@@ -49,11 +47,11 @@ export interface GriddoLinkProps extends Omit<React.ComponentPropsWithoutRef<"a"
49
47
  * The linked page will have a `location` prop containing a nested `state` object structure containing the passed data. */
50
48
  state?: Record<string, unknown>;
51
49
  /** @deprecated If using React >= 16.4, use ref instead. */
52
- innerRef?: React.Ref<HTMLAnchorElement> | undefined;
50
+ innerRef?: Ref<HTMLAnchorElement> | undefined;
53
51
  /** If using React >=16.4, Link will forward its ref to you. */
54
- ref?: (node: HTMLAnchorElement | null) => React.ReactNode;
52
+ ref?: (node: HTMLAnchorElement | null) => ReactNode;
55
53
  /** onCLick event */
56
- onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
57
- children?: React.ReactNode;
54
+ onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
55
+ children?: ReactNode;
58
56
  }
59
57
  export { GriddoLink };
@@ -1,9 +1,10 @@
1
- import { FullPath } from "../../types/core";
2
- export declare function getEnvironment(fullPath?: FullPath): "pre" | "pro";
3
- export declare function getRel(newTab: boolean, noFollow: boolean): string;
4
- export declare function getTarget(newTab: boolean): "_blank" | "_self";
5
- export declare function getRelativeToRootPath({ env, fullPath, to, }: {
1
+ import type { FullPath } from "../../types/core";
2
+ declare function getEnvironment(fullPath?: FullPath): "pre" | "pro";
3
+ declare function getRel(newTab: boolean, noFollow: boolean): string;
4
+ declare function getTarget(newTab: boolean): "_blank" | "_self";
5
+ declare function getRelativeToRootPath({ env, fullPath, to, }: {
6
6
  env: string;
7
7
  fullPath: FullPath;
8
8
  to?: string;
9
9
  }): string | undefined;
10
+ export { getEnvironment, getRel, getRelativeToRootPath, getTarget };
@@ -1,6 +1,4 @@
1
1
  /**
2
- * `<LdJson>`
3
- *
4
2
  * Inject a google structured data into the `<header>`
5
3
  *
6
4
  * @example
@@ -1,7 +1,5 @@
1
- import { Url } from "../../types/api-response-fields";
1
+ import type { Url } from "../../types/api-response-fields";
2
2
  /**
3
- * `<Link>`
4
- *
5
3
  * @deprecated This component will be removed from Griddo in the future.
6
4
  */
7
5
  declare function Link(props: LinkProps): JSX.Element;
@@ -1,15 +1,15 @@
1
- import * as React from "react";
2
- import { Page } from "../../types/core";
3
- import { ComponentProps } from "../Component";
1
+ import type { Page } from "../../types/core";
2
+ import type { FC } from "react";
3
+ import { type ComponentProps } from "../Component";
4
4
  /**
5
- * `<ModulePreview>`
5
+ * <ModulePreview>
6
6
  */
7
7
  declare function ModulePreview(props: ModulePreviewProps): JSX.Element | null;
8
8
  export interface ModulePreviewProps {
9
9
  component: string;
10
10
  content: Pick<Page, "title" | "breadcrumb" | "fullPath" | "fullUrl" | "siteSlug" | "template" | "origin" | "site" | "modified" | "published" | "structuredData" | "structuredDataContent" | "dimensions" | "isHome">;
11
11
  library: {
12
- components: Record<string, React.FC<Omit<ComponentProps, "libComponents">>>;
12
+ components: Record<string, FC<Omit<ComponentProps, "libComponents">>>;
13
13
  };
14
14
  }
15
15
  export { ModulePreview };
@@ -1,15 +1,15 @@
1
- import * as React from "react";
2
- import { Page } from "../../types/core";
3
- import { ComponentProps } from "../Component";
1
+ import type { Page } from "../../types/core";
2
+ import type { FC } from "react";
3
+ import { type ComponentProps } from "../Component";
4
4
  /**
5
- * `<PageComponent>`
5
+ * <PageComponent>
6
6
  */
7
7
  declare function PageComponent(props: PageProps): JSX.Element;
8
8
  export interface PageProps extends Pick<Page, "apiUrl" | "footer" | "header" | "languageId" | "pageLanguages" | "siteMetadata"> {
9
9
  content: Pick<Page, "breadcrumb" | "canonicalURL" | "dimensions" | "footerTheme" | "fullPath" | "fullUrl" | "headerTheme" | "isHome" | "isIndexed" | "metaDescription" | "metasAdvanced" | "metaTitle" | "modified" | "origin" | "published" | "site" | "siteSlug" | "socialDescription" | "socialImage" | "socialTitle" | "structuredData" | "structuredDataContent" | "template" | "theme" | "title">;
10
10
  library: {
11
- components: Record<string, React.FC<Omit<ComponentProps, "libComponents">>>;
12
- templates: Record<string, React.FC<Omit<ComponentProps, "libComponents">>>;
11
+ components: Record<string, FC<Omit<ComponentProps, "libComponents">>>;
12
+ templates: Record<string, FC<Omit<ComponentProps, "libComponents">>>;
13
13
  };
14
14
  children?: JSX.Element;
15
15
  }
@@ -1,7 +1,7 @@
1
- import { ModulePreviewProps } from "../ModulePreview";
2
- import { PageProps } from "../Page";
1
+ import { type ModulePreviewProps } from "../ModulePreview";
2
+ import { type PageProps } from "../Page";
3
3
  /**
4
- * `<Preview>`
4
+ * <Preview>
5
5
  */
6
6
  declare function Preview(props: PreviewProps): JSX.Element;
7
7
  export type PreviewProps = {
@@ -1,9 +1,7 @@
1
+ import type { LocaleTranslations } from "../../types/core";
1
2
  import * as React from "react";
2
- import { LocaleTranslations } from "../../types/core";
3
3
  declare const I18nContext: React.Context<I18nContextProps>;
4
4
  /**
5
- * `<I18nProvider>`
6
- *
7
5
  * This provider component inject the `translation` object in the context of the site. Then you can retrieve the translation based on the page language using the `useI18n()` hook.
8
6
  */
9
7
  declare function I18nProvider(props: I18nProviderProps): JSX.Element;
@@ -1,13 +1,13 @@
1
1
  import * as React from "react";
2
2
  declare const NavigationContext: React.Context<NavigationContextProps | null>;
3
3
  /**
4
- * `<NavigationProvider>`
4
+ * <NavigationProvider>
5
5
  */
6
6
  declare function NavigationProvider(props: NavigationProviderProps): JSX.Element;
7
- export interface NavigationContextProps {
7
+ interface NavigationContextProps {
8
8
  isNavigation: true;
9
9
  }
10
10
  interface NavigationProviderProps {
11
11
  children: JSX.Element;
12
12
  }
13
- export { NavigationContext, NavigationProvider };
13
+ export { NavigationContext, NavigationProvider, type NavigationContextProps };
@@ -1,5 +1,5 @@
1
+ import type { ISOLocale, Locale, Page } from "../../types/core";
1
2
  import * as React from "react";
2
- import { ISOLocale, Locale, Page } from "../../types/core";
3
3
  declare const PageContext: React.Context<PageContextProps>;
4
4
  /**
5
5
  * `<PageProvider>`
@@ -1,7 +1,7 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  declare const SessionContext: React.Context<ProviderValue>;
3
3
  /**
4
- * `<SessionProvider>`
4
+ * <SessionProvider>
5
5
  */
6
6
  declare const SessionProvider: (props: ProviderProps) => JSX.Element;
7
7
  interface ProviderProps {
@@ -1,12 +1,12 @@
1
+ import type { GriddoLinkProps } from "../../components/GriddoLink";
2
+ import type { Site } from "../../types/core";
1
3
  import * as React from "react";
2
- import { GriddoLinkProps } from "../../components/GriddoLink";
3
- import { Site } from "../../types/core";
4
4
  declare const SiteContext: React.Context<SiteContextProps>;
5
5
  /**
6
- * `<SiteProvider>`
6
+ * <SiteProvider>
7
7
  */
8
8
  declare function SiteProvider(props: SiteProviderProps): JSX.Element;
9
- export interface SiteContextProps extends Site {
9
+ interface SiteContextProps extends Site {
10
10
  [key: string]: unknown;
11
11
  linkComponent: (props: GriddoLinkProps) => JSX.Element;
12
12
  navigate: () => null;
@@ -22,7 +22,7 @@ export interface SiteContextProps extends Site {
22
22
  duplicateModuleAction: (editorID: number) => void;
23
23
  };
24
24
  }
25
- export interface SiteProviderProps extends Site {
25
+ interface SiteProviderProps extends Site {
26
26
  children: JSX.Element;
27
27
  }
28
- export { SiteContext, SiteProvider };
28
+ export { SiteContext, SiteProvider, type SiteContextProps, type SiteProviderProps, };
@@ -1,2 +1,3 @@
1
- export declare const HEAD_DESIGN = "/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-use-before-define */\n//\n//\n// ' ____\n// /\\ \\\n// \u00BA / /\\ \\\n// ' / / \\ _>\n// ' _\\ \\__> \\__\n// ' O ( __;\u00B7;______ ) AutoTypes\n// O \u00BA, | , , \\ \\\\ \u00B7..~~.\u00B7~.\u00B7\n// ,,, /| , , /\\ <\\\\\n// \\''\\-' \u23A9, <\\/\\ \\ \\\n// \\_/ /\\_____\u23A9/ > > >\n// '___' <_(_)__> / \\ <\n// / / \u00B4 \\ | \\___//\\\\\n// / / | / > > \\\\\n// \u00B7 \u00B7\u00B7~~~~\u00B7~\u00B7~~~~~~~\u00B7~\u00B7\u00B7~~~~~\u00B7~\u00B7~~\u00B7~~~~\u00B7~~~~~\u00B7\u00B7 \u00B7 \u00B7\n//\n// Embrace the beauty of effortless typing by indulging in the benefits of them\n// sans the actual typing!\n//\n// Behold! These dynamically generated types were conjured from the schemas\n// nestled within this repository. However, should you yearn to expand upon\n// these types, kindly abstain from doing so in this file, lest AutoTypes'\n// magic shall smite your changes with each schema modification.\n//\n// Check out the details of Griddo AutoTypes in:\n// https://griddoio.notion.site/Griddo-AutoTypes-e7420867dd2e489c8da34a493b763cd8>\n//\n// Happy magic types!\n//\nimport { Core, Fields, Hideable, NonEmptyArray } from \"@griddo/core\"\n//\n";
2
- export declare const FOOTER_DESIGN = "\n//\n// . + . . . . . . . ..\n// . . . *\n// . * . . . . . . + . +\n// . . . . + . . .\n// . . . . . . .\n// . . . . . +. + . *\n// + . . . .\n// . . . * . . . . + . .\n// + . . . + . .\n// . . + .+. . .\n// . . . + . . . . .\n// . . . . . . . . ! / +\n// * . . . + . . - O -\n// . . . + . . * . . / | . .\n// . + . . . .. + .\n// . . . . * . * . +.. . * +\n// . . . . . . . . + . . +\n//\n//\n// The beauty of a living thing is not the atoms that go into it,\n// but the way those atoms are put together\n//\n// Carl Sagan\n//\n";
1
+ declare const HEAD_DESIGN = "/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-use-before-define */\n//\n//\n// ' ____\n// /\\ \\\n// \u00BA / /\\ \\\n// ' / / \\ _>\n// ' _\\ \\__> \\__\n// ' O ( __;\u00B7;______ ) AutoTypes\n// O \u00BA, | , , \\ \\\\ \u00B7..~~.\u00B7~.\u00B7\n// ,,, /| , , /\\ <\\\\\n// \\''\\-' \u23A9, <\\/\\ \\ \\\n// \\_/ /\\_____\u23A9/ > > >\n// '___' <_(_)__> / \\ <\n// / / \u00B4 \\ | \\___//\\\\\n// / / | / > > \\\\\n// \u00B7 \u00B7\u00B7~~~~\u00B7~\u00B7~~~~~~~\u00B7~\u00B7\u00B7~~~~~\u00B7~\u00B7~~\u00B7~~~~\u00B7~~~~~\u00B7\u00B7 \u00B7 \u00B7\n//\n// Embrace the beauty of effortless typing by indulging in the benefits of them\n// sans the actual typing!\n//\n// Behold! These dynamically generated types were conjured from the schemas\n// nestled within this repository. However, should you yearn to expand upon\n// these types, kindly abstain from doing so in this file, lest AutoTypes'\n// magic shall smite your changes with each schema modification.\n//\n// Check out the details of Griddo AutoTypes in:\n// https://griddoio.notion.site/Griddo-AutoTypes-e7420867dd2e489c8da34a493b763cd8>\n//\n// Happy magic types!\n//\nimport { Core, Fields, Hideable, NonEmptyArray } from \"@griddo/core\"\n//\n";
2
+ declare const FOOTER_DESIGN = "\n//\n// . + . . . . . . . ..\n// . . . *\n// . * . . . . . . + . +\n// . . . . + . . .\n// . . . . . . .\n// . . . . . +. + . *\n// + . . . .\n// . . . * . . . . + . .\n// + . . . + . .\n// . . + .+. . .\n// . . . + . . . . .\n// . . . . . . . . ! / +\n// * . . . + . . - O -\n// . . . + . . * . . / | . .\n// . + . . . .. + .\n// . . . . * . * . +.. . * +\n// . . . . . . . . + . . +\n//\n//\n// The beauty of a living thing is not the atoms that go into it,\n// but the way those atoms are put together\n//\n// Carl Sagan\n//\n";
3
+ export { FOOTER_DESIGN, HEAD_DESIGN };
@@ -1,10 +1,10 @@
1
1
  import type { KindSchema, SchemaTypeWithComponentProp } from "./types";
2
+ import type { PageContentTypeFields } from "../../types/schema-fields/page-content-type-fields";
3
+ import type { SimpleContentTypeFields } from "../../types/schema-fields/simple-content-type-fields";
2
4
  import type { UIFields } from "../../types/schema-fields/ui-fields";
3
5
  import type { UITemplateFields } from "../../types/schema-fields/ui-template-fields";
4
6
  import type { Module } from "../../types/schemas";
5
7
  import type { AutoTypesConfig } from "../../types/schemas/AutoTypes";
6
- import { PageContentTypeFields } from "../../types/schema-fields/page-content-type-fields";
7
- import { SimpleContentTypeFields } from "../../types/schema-fields/simple-content-type-fields";
8
8
  /**
9
9
  * Return a property with a Griddo type (serialized) based on a schema field.
10
10
  *
@@ -17,6 +17,7 @@ import { SimpleContentTypeFields } from "../../types/schema-fields/simple-conten
17
17
  */
18
18
  declare function getTypeFromField(field: UIFields | UITemplateFields | SimpleContentTypeFields | PageContentTypeFields, kind: KindSchema, options: {
19
19
  hasDistributorData: boolean;
20
+ getStaticData: boolean;
20
21
  moduleSchemas: Array<Module | undefined>;
21
22
  schema: SchemaTypeWithComponentProp;
22
23
  }, config?: AutoTypesConfig): string | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { LanguagesSchema, MenuItemsSchema, SchemaType } from "./types";
2
+ import type { DataPack, DataPackCategory, ModuleCategories } from "../../types/schemas";
2
3
  import type { AutoTypesConfig } from "../../types/schemas/AutoTypes";
3
- import { DataPack, DataPackCategory, ModuleCategories } from "../../types/schemas";
4
- import { ThemeEntry } from "../../types/schemas/Themes";
4
+ import type { ThemeEntry } from "../../types/schemas/Themes";
5
5
  export declare function main(inputSchemas: Record<string, SchemaType>, menuItemsSchemas: MenuItemsSchema, languagesSchemas: LanguagesSchema, moduleCategoriesSchema: ModuleCategories, datapacksSchema: Record<string, DataPack>, datapacksCategoriesSchema: Record<string, DataPackCategory>, themesSchema: Array<ThemeEntry>, subthemesSchema: Array<string>, config?: AutoTypesConfig): Promise<void>;
@@ -3,21 +3,22 @@ import type * as PageContentType_Fields from "../../types/schema-fields/page-con
3
3
  import type * as SimpleContentType_Fields from "../../types/schema-fields/simple-content-type-fields";
4
4
  import type * as UI_Fields from "../../types/schema-fields/ui-fields";
5
5
  import type * as UITemplate_Fields from "../../types/schema-fields/ui-template-fields";
6
- export type SchemaFieldTypes = "ArrayFieldGroup" | "AsyncCheckGroup" | "AsyncSelect" | "AsyncSelect" | "CheckGroup" | "ColorPicker" | "ComponentArray" | "ComponentContainer" | "ConditionalField" | "DateField" | "FieldGroup" | "FieldsDivider" | "FileField" | "HeadingField" | "ImageField" | "LinkField" | "MultiCheckSelect" | "MultiCheckSelectGroup" | "NoteField" | "NumberField" | "RadioGroup" | "ReferenceField" | "RichText" | "Select" | "SliderField" | "TagsField" | "TextArea" | "TextField" | "TimeField" | "ToggleField" | "UniqueCheck" | "UrlField" | "VisualUniqueSelection" | "Wysiwyg";
7
- export type FieldReturnTypes = "Fields.ArrayFieldGroup" | "Fields.AsyncCheckGroup" | "Fields.AsyncSelect" | "Fields.CheckGroup" | "Fields.ColorPicker" | "Fields.ColorPickerFixed" | "Fields.ComponentArray" | "Fields.ComponentContainer" | "Fields.Conditional" | "Fields.Date" | "Fields.FieldGroup" | "Fields.FieldsDivider" | "Fields.File" | "Fields.Heading" | "Fields.Image" | "Fields.Link" | "Fields.MultiCheckSelect" | "Fields.MultiCheckSelectGroup" | "Fields.Note" | "Fields.Number" | "Fields.RadioGroup" | "Fields.Reference" | "Fields.RichText" | "Fields.Select" | "Fields.Slider" | "Fields.Tags" | "Fields.TextArea" | "Fields.Text" | "Fields.Time" | "Fields.Toggle" | "Fields.UniqueCheck" | "Fields.Url" | "Fields.VisualUniqueSelection" | "Fields.Wysiwyg";
8
- export type SchemaType = Schema.Component | Schema.ContentTypeModule | Schema.MultiPageModule | Schema.Module | Schema.Template | Schema.ListTemplate | Schema.SimpleContentType | Schema.PageContentType;
9
- export type SchemaTypeWithComponentProp = Schema.Component | Schema.ContentTypeModule | Schema.MultiPageModule | Schema.Module | Schema.Template | Schema.ListTemplate | (Schema.SimpleContentType & {
6
+ type SchemaFieldTypes = "ArrayFieldGroup" | "AsyncCheckGroup" | "AsyncSelect" | "AsyncSelect" | "CheckGroup" | "ColorPicker" | "ComponentArray" | "ComponentContainer" | "ConditionalField" | "DateField" | "FieldGroup" | "FieldsDivider" | "FileField" | "HeadingField" | "ImageField" | "LinkField" | "MultiCheckSelect" | "MultiCheckSelectGroup" | "NoteField" | "NumberField" | "RadioGroup" | "ReferenceField" | "RichText" | "Select" | "SliderField" | "TagsField" | "TextArea" | "TextField" | "TimeField" | "ToggleField" | "UniqueCheck" | "UrlField" | "VisualUniqueSelection" | "Wysiwyg";
7
+ type FieldReturnTypes = "Fields.ArrayFieldGroup" | "Fields.AsyncCheckGroup" | "Fields.AsyncSelect" | "Fields.CheckGroup" | "Fields.ColorPicker" | "Fields.ColorPickerFixed" | "Fields.ComponentArray" | "Fields.ComponentContainer" | "Fields.Conditional" | "Fields.Date" | "Fields.FieldGroup" | "Fields.FieldsDivider" | "Fields.File" | "Fields.Heading" | "Fields.Image" | "Fields.Link" | "Fields.MultiCheckSelect" | "Fields.MultiCheckSelectGroup" | "Fields.Note" | "Fields.Number" | "Fields.RadioGroup" | "Fields.Reference" | "Fields.RichText" | "Fields.Select" | "Fields.Slider" | "Fields.Tags" | "Fields.TextArea" | "Fields.Text" | "Fields.Time" | "Fields.Toggle" | "Fields.UniqueCheck" | "Fields.Url" | "Fields.VisualUniqueSelection" | "Fields.Wysiwyg";
8
+ type SchemaType = Schema.Component | Schema.ContentTypeModule | Schema.MultiPageModule | Schema.Module | Schema.Template | Schema.ListTemplate | Schema.SimpleContentType | Schema.PageContentType;
9
+ type SchemaTypeWithComponentProp = Schema.Component | Schema.ContentTypeModule | Schema.MultiPageModule | Schema.Module | Schema.Template | Schema.ListTemplate | (Schema.SimpleContentType & {
10
10
  component: string;
11
11
  }) | (Schema.PageContentType & {
12
12
  component: string;
13
13
  });
14
- export type Fields = UI_Fields.UIFields | UITemplate_Fields.UITemplateFields | SimpleContentType_Fields.SimpleContentTypeFields | PageContentType_Fields.PageContentTypeFields;
15
- export type KindSchema = "object" | "component" | "module" | "template" | "simpleContentType" | "pageContentType";
16
- export interface MenuItemsSchema {
14
+ type Fields = UI_Fields.UIFields | UITemplate_Fields.UITemplateFields | SimpleContentType_Fields.SimpleContentTypeFields | PageContentType_Fields.PageContentTypeFields;
15
+ type KindSchema = "object" | "component" | "module" | "template" | "simpleContentType" | "pageContentType";
16
+ interface MenuItemsSchema {
17
17
  link: Record<string, SchemaType>;
18
18
  group: Record<string, SchemaType>;
19
19
  }
20
- export type LanguagesSchema = Record<Core.Locale, {
20
+ type LanguagesSchema = Record<Core.Locale, {
21
21
  name: string;
22
22
  label: string;
23
23
  }>;
24
+ export type { FieldReturnTypes, Fields, KindSchema, LanguagesSchema, MenuItemsSchema, SchemaFieldTypes, SchemaType, SchemaTypeWithComponentProp, };
@@ -1,7 +1,7 @@
1
- import { ImageConfig } from "../hooks/useGriddoImage";
2
- import { CloudinaryResponsiveImageProps } from "../hooks/useImage";
3
- import { Core } from "../index";
4
- import { ResponsiveImageProps } from "../types/core";
1
+ import type { ImageConfig } from "../hooks/useGriddoImage";
2
+ import type { CloudinaryResponsiveImageProps } from "../hooks/useImage";
3
+ import type { Core } from "../index";
4
+ import type { ResponsiveImageProps } from "../types/core";
5
5
  declare function rearrangeResponsiveArray(arr: Array<ResponsiveImageProps>): Core.ResponsiveImageProps[];
6
6
  declare function cloudinaryRearrangeResponsiveArray(arr?: Array<CloudinaryResponsiveImageProps>): CloudinaryResponsiveImageProps[];
7
7
  declare function fillIntArray(n: number, from?: number): number[];
@@ -41,4 +41,4 @@ interface GetGriddoDamURIWithParamsProps {
41
41
  imageConfig: ImageConfig;
42
42
  [key: string]: unknown;
43
43
  }
44
- export { rearrangeResponsiveArray, cloudinaryRearrangeResponsiveArray, removeUnit, mergeObjects, cleanCloudinaryURI, getGriddoDamURIWithParams, getDomainFromDamUrl, getDamIdFromDamUrl, fillIntArray, rndHash, };
44
+ export { cleanCloudinaryURI, cloudinaryRearrangeResponsiveArray, fillIntArray, getDamIdFromDamUrl, getDomainFromDamUrl, getGriddoDamURIWithParams, mergeObjects, rearrangeResponsiveArray, removeUnit, rndHash, };
@@ -1,7 +1,7 @@
1
- import * as React from "react";
2
- import { ComponentProps } from "../components/Component";
3
- declare const getComponent: (components: Record<string, React.FC<Omit<ComponentProps, "libComponents">>>, props: {
1
+ import type { ComponentProps } from "../components/Component";
2
+ import type { FC } from "react";
3
+ declare const getComponent: (components: Record<string, FC<Omit<ComponentProps, "libComponents">>>, props: {
4
4
  component: string;
5
5
  [key: string]: unknown;
6
- }) => React.FC<Omit<ComponentProps, "libComponents">> | null;
6
+ }) => FC<Omit<ComponentProps, "libComponents">> | null;
7
7
  export { getComponent };
@@ -28,17 +28,17 @@ declare function getLang(): number | false;
28
28
  * recursiveSearch
29
29
  * Devuelve una lista con los valores de una prop dentro de un objeto
30
30
  * La búsqueda es recursiva en todo el objeto
31
- * @param {object} config Un objeto con los parámetros de la función
32
- * @param {object} config.obj El objeto donde buscar
33
- * @param {string} config.searchKey El nombre de la propiedad a buscar
34
- * @param {array} config.results El array de resultados, se van añadiendo recursivamente los resultados.
35
- * @param {boolean} config.unique Si es true elimina los resultados repetidos
31
+ * @param config Un objeto con los parámetros de la función
32
+ * @param config.obj El objeto donde buscar
33
+ * @param config.searchKey El nombre de la propiedad a buscar
34
+ * @param config.results El array de resultados, se van añadiendo recursivamente los resultados.
35
+ * @param config.unique Si es true elimina los resultados repetidos
36
36
  * @example
37
37
  * Obtiene una lista con los valores de la prop "a"
38
38
  * recursiveSearch({ obj: {a: 1, b: {a: "foo"}}, "a"})
39
39
  * -> [1, "foo"]
40
40
  *
41
- * @return {array} Un array con los valores de la propiedad `searchValue`
41
+ * @return Un array con los valores de la propiedad `searchValue`
42
42
  */
43
43
  declare function recursiveSearch({ obj, searchKey, resultsBuffer, unique, }?: RecursiveSearchProps): string[];
44
44
  /**
@@ -1,4 +1,4 @@
1
- import { PageProviderProps } from "../../contexts/Page";
1
+ import type { PageProviderProps } from "../../contexts/Page";
2
2
  export declare const pageProviderProps: ({ lang, }: {
3
3
  lang?: 1 | 2 | undefined;
4
4
  }) => PageProviderProps;
@@ -1,2 +1,2 @@
1
- import { SiteProviderProps } from "../../contexts/Site";
1
+ import type { SiteProviderProps } from "../../contexts/Site";
2
2
  export declare const siteProviderProps: () => SiteProviderProps;
@@ -1,4 +1,4 @@
1
- import { Theme } from "../..";
1
+ import type { Theme } from "../..";
2
2
  /**
3
3
  * `useGlobalTheme()`
4
4
  *
@@ -1,5 +1,5 @@
1
- import { UseThemeProps } from "./types";
2
- import { Theme } from "../..";
1
+ import type { Theme } from "../..";
2
+ import type { UseThemeProps } from "./types";
3
3
  /**
4
4
  * `useTheme()`
5
5
  *
@@ -1,5 +1,5 @@
1
- import { UseThemeColorsProps } from "./types";
2
- import { Theme } from "../..";
1
+ import type { Theme } from "../..";
2
+ import type { UseThemeColorsProps } from "./types";
3
3
  /**
4
4
  * `useThemeColors()`
5
5
  *
@@ -1,5 +1,5 @@
1
- import { UseThemeFontProps } from "./types";
2
- import { Theme } from "../..";
1
+ import type { Theme } from "../..";
2
+ import type { UseThemeFontProps } from "./types";
3
3
  /**
4
4
  * `useThemeFont()`
5
5
  *
@@ -1,5 +1,5 @@
1
- import { UseThemePrimitivesProps } from "./types";
2
- import { Theme } from "../..";
1
+ import type { Theme } from "../..";
2
+ import type { UseThemePrimitivesProps } from "./types";
3
3
  /**
4
4
  * `useThemePrimitives()`
5
5
  *
@@ -1,4 +1,4 @@
1
- import { Theme } from "../..";
1
+ import type { Theme } from "../..";
2
2
  export declare const filterThemePrimitivesByType: (themes: Array<Theme.GlobalTheme | Theme.Theme>, primitives: string | Array<string>, subtheme?: string) => ({
3
3
  primitives: Theme.Primitives;
4
4
  subthemes: ({
@@ -1,4 +1,4 @@
1
- import { Fields } from "..";
1
+ import type { Fields } from "..";
2
2
  /**
3
3
  * `useContentType<ContentType>()`
4
4
  *
@@ -1,4 +1,4 @@
1
- import { Fields } from "..";
1
+ import type { Fields } from "..";
2
2
  /**
3
3
  * `useContentTypeNavigation<ContentType>()`
4
4
  *
@@ -1,5 +1,5 @@
1
- import { UseFetchStateProps } from "./useFetch";
2
- import { FiltersDataApiQueryResponseProps, PickRename, SetQueryProps } from "../types/global";
1
+ import type { FiltersDataApiQueryResponseProps, PickRename, SetQueryProps } from "../types/global";
2
+ import { type UseFetchStateProps } from "./useFetch";
3
3
  /**
4
4
  * `useDataFilters()`
5
5
  *
@@ -1,4 +1,4 @@
1
- import { ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform, ResponsiveImageProps } from "../types/core";
1
+ import type { ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform, ResponsiveImageProps } from "../types/core";
2
2
  /**
3
3
  * `useGriddoImage()`
4
4
  */
@@ -1,4 +1,4 @@
1
- import { ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform } from "../types/core";
1
+ import type { ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform } from "../types/core";
2
2
  /**
3
3
  * `useGriddoImage()`
4
4
  */
@@ -1,4 +1,4 @@
1
- import { Locale } from "../types/core";
1
+ import type { Locale } from "../types/core";
2
2
  type I18nTranslationFunction = (
3
3
  /** Key from the translation object that will be obtained */
4
4
  key: string,
@@ -1,4 +1,4 @@
1
- import { ImageDecoding, ImageLoading } from "../types/core";
1
+ import type { ImageDecoding, ImageLoading } from "../types/core";
2
2
  /**
3
3
  * `useImage()`
4
4
  *