@griddo/core 12.11.1-rc.0 → 12.11.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 (43) hide show
  1. package/dist/autotypes.js +2 -0
  2. package/dist/autotypes.js.map +1 -0
  3. package/dist/autotypes.mjs +1 -2
  4. package/dist/autotypes.mjs.map +1 -1
  5. package/dist/bin-tools/autotypes/index.d.ts +0 -1
  6. package/dist/bin-tools/autotypes/misc/utils.d.ts +3 -6
  7. package/dist/bin-tools/autotypes/parser/index.d.ts +1 -1
  8. package/dist/components/CloudinaryImage/index.d.ts +2 -1
  9. package/dist/components/GriddoImage/index.d.ts +1 -0
  10. package/dist/components/GriddoImageExp/GriddoImageExp.stories.d.ts +25 -0
  11. package/dist/components/GriddoImageExp/GriddoImageExp.test.d.ts +1 -0
  12. package/dist/components/GriddoImageExp/utils.d.ts +1 -1
  13. package/dist/components/GriddoLink/index.d.ts +1 -1
  14. package/dist/components/Page/index.d.ts +1 -1
  15. package/dist/contexts/Form/index.d.ts +1 -1
  16. package/dist/contexts/Navigation/index.d.ts +1 -1
  17. package/dist/contexts/Site/index.d.ts +1 -1
  18. package/dist/functions/index.d.ts +2 -2
  19. package/dist/hooks/index.d.ts +1 -1
  20. package/dist/hooks/useAiAnswers.d.ts +2 -2
  21. package/dist/hooks/useAiSearch.d.ts +2 -2
  22. package/dist/hooks/useReceiveInterests.d.ts +1 -1
  23. package/dist/index.d.ts +7 -7
  24. package/dist/index.js +1 -3
  25. package/dist/index.js.map +1 -1
  26. package/dist/types/api-response-fields/index.d.ts +1 -1
  27. package/dist/types/core/index.d.ts +1 -1
  28. package/dist/types/global.d.ts +1 -1
  29. package/dist/types/schema-fields/page-content-type-fields.d.ts +1 -1
  30. package/dist/types/schema-fields/props.d.ts +1 -1
  31. package/dist/types/schemas/ContentType.d.ts +1 -1
  32. package/dist/types/schemas/HeaderFooter.d.ts +1 -1
  33. package/dist/types/schemas/Menu.d.ts +1 -1
  34. package/dist/types/schemas/PageContentType.d.ts +2 -2
  35. package/dist/types/schemas/SimpleContentType.d.ts +2 -2
  36. package/dist/types/schemas/UI.d.ts +3 -3
  37. package/dist/types/schemas/base.d.ts +1 -1
  38. package/dist/types/schemas/props.d.ts +1 -1
  39. package/dist/types/theme/index.d.ts +1 -1
  40. package/dist/types/utilities.d.ts +1 -1
  41. package/dist/utils/index.d.ts +1 -7
  42. package/package.json +73 -34
  43. package/dist/vendor/react-aspect-ratio/index.d.ts +0 -15
@@ -1,6 +1,6 @@
1
- import type __AT__ from "@/autotypes";
2
1
  import type { ImagePosition } from "../core";
3
2
  import type { FilterItemFromFilterEndPoint, HTMLHeadingTag } from "../global";
3
+ import type __AT__ from "@/autotypes";
4
4
  /** Return the `__contentTypeName` if it exists. */
5
5
  type ContentTypeName<T> = T extends {
6
6
  __contentTypeName: string;
@@ -499,4 +499,4 @@ interface Config {
499
499
  };
500
500
  };
501
501
  }
502
- export type { BackgroundImageSizesProps, Breadcrumb, CloudinaryDefaults, Config, ContentPresence, ContentTypeRelations, DeprecatedLlmsConfig, FetchPriority, FooterModule, FullPath, GriddoDamDefaults, HeaderModule, ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform, ISOLocale, JsConversionOptions, JsPreprocessingOptions, LibraryComponentProps, ListContentType, LlmsConfig, LlmsImages, LlmsIndexConfig, LlmsMarkdownConfig, Locale, LocaleTranslations, NavigationModule, Page, PageIntegration, PageLanguage, Renderers, ResponsiveImageProps, Site, SiteLanguage, SocialName, TimeZone, };
502
+ export type { BackgroundImageSizesProps, Breadcrumb, CloudinaryDefaults, Config, ContentPresence, ContentTypeRelations, DeprecatedLlmsConfig, FetchPriority, FooterModule, FullPath, GriddoDamDefaults, HeaderModule, ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform, ISOLocale, JsConversionOptions, JsPreprocessingOptions, LibraryComponentProps, ListContentType, LlmsConfig, LlmsImages, LlmsIndexConfig, LlmsMarkdownConfig, Locale, LocaleTranslations, NavigationModule, Page, PageIntegration, PageLanguage, Renderers, ResponsiveImageProps, Site, SiteLanguage, SocialName, TimeZone };
@@ -1,5 +1,5 @@
1
- import type { Fields } from "../index";
2
1
  import type { KeysOfUnion } from "./utilities";
2
+ import type { Fields } from "../index";
3
3
  type HTMLHeadingTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
4
4
  interface SetQueryProps<ContentType> {
5
5
  /** The ReferenceField prop */
@@ -38,4 +38,4 @@ type Wysiwyg = BaseWysiwyg & Common;
38
38
  type CommonPageContentTypeFields = AIReferenceField | ArrayFieldGroup | ConditionalField | FieldGroup | AsyncCheckGroup | AsyncSelect | CheckGroup | ColorPicker | ComponentContainer | DateField | FieldsDivider | FileField | HeadingField | ImageField | LinkField | MultiCheckSelect | MultiCheckSelectGroup | NoteField | NumberField | RadioGroup | ReferenceField | RichText | Select | SliderField | TagsField | TextArea | TextField | TimeField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
39
39
  type PageContentTypeFields = CommonPageContentTypeFields | ComponentArray;
40
40
  type PageContentTypeFieldsForArrayFieldGroup = CommonPageContentTypeFields;
41
- export type { AIReferenceField, ArrayFieldGroup, AsyncCheckGroup, AsyncSelect, CheckGroup, ColorPicker, ComponentArray, ComponentContainer, ConditionalField, DateField, FieldGroup, FieldsDivider, FileField, HeadingField, ImageField, LinkField, MultiCheckSelect, MultiCheckSelectGroup, NoteField, NumberField, PageContentTypeFields, RadioGroup, ReferenceField, RichText, Select, SliderField, TagsField, TextArea, TextField, TimeField, ToggleField, UniqueCheck, UrlField, VisualUniqueSelection, Wysiwyg, };
41
+ export type { AIReferenceField, ArrayFieldGroup, ConditionalField, FieldGroup, AsyncCheckGroup, AsyncSelect, CheckGroup, ColorPicker, ComponentArray, ComponentContainer, DateField, FieldsDivider, FileField, HeadingField, ImageField, LinkField, MultiCheckSelect, MultiCheckSelectGroup, NoteField, NumberField, RadioGroup, ReferenceField, RichText, Select, SliderField, TagsField, TextArea, TextField, TimeField, ToggleField, UniqueCheck, UrlField, VisualUniqueSelection, Wysiwyg, PageContentTypeFields, };
@@ -1,6 +1,6 @@
1
- import type __AT__ from "@/autotypes";
2
1
  import type { Core } from "../..";
3
2
  import type { SimpleContentType, Source } from "../api-response-fields";
3
+ import type __AT__ from "@/autotypes";
4
4
  type WithAuxText = {
5
5
  /** Sets a label text to show besides the toggle field control */
6
6
  auxText?: string;
@@ -1,4 +1,4 @@
1
1
  import type { Categories } from "./Categories";
2
2
  import type { PageContentType } from "./PageContentType";
3
3
  import type { SimpleContentType } from "./SimpleContentType";
4
- export type { Categories as CategoryContentType, PageContentType, SimpleContentType, };
4
+ export type { PageContentType, SimpleContentType, Categories as CategoryContentType, };
@@ -43,4 +43,4 @@ type Footer<T = unknown> = HeaderFooter & {
43
43
  type: "footer";
44
44
  } & TypedOrNotHeaderFooterDefault<T>;
45
45
  };
46
- export type { Footer, Header, HeaderFooter };
46
+ export type { HeaderFooter, Header, Footer };
@@ -17,4 +17,4 @@ interface MenuItem {
17
17
  };
18
18
  }
19
19
  type Menu = Array<MenuEntry>;
20
- export type { Menu, MenuEntry, MenuFields, MenuItem };
20
+ export type { MenuEntry, MenuFields, MenuItem, Menu };
@@ -1,7 +1,7 @@
1
- import type { PageContentTypeFields, TextField } from "../schema-fields/page-content-type-fields";
2
- import type { SearchFrom, WithSearchable } from "../schema-fields/props";
3
1
  import type { BaseContentType } from "./base";
4
2
  import type { DataPacks, ExpirationData } from "./props";
3
+ import type { PageContentTypeFields, TextField } from "../schema-fields/page-content-type-fields";
4
+ import type { SearchFrom, WithSearchable } from "../schema-fields/props";
5
5
  type PageContentTypeProp = SearchFrom & {
6
6
  /** The name of the Reacttemplates to use with the page type Schema. */
7
7
  templates: Array<string>;
@@ -1,7 +1,7 @@
1
- import type { SearchFrom, WithSearchable } from "../schema-fields/props";
2
- import type { SimpleContentTypeFields, TextField } from "../schema-fields/simple-content-type-fields";
3
1
  import type { BaseContentType } from "./base";
4
2
  import type { DataPacks, ExpirationData } from "./props";
3
+ import type { SearchFrom, WithSearchable } from "../schema-fields/props";
4
+ import type { SimpleContentTypeFields, TextField } from "../schema-fields/simple-content-type-fields";
5
5
  type SimpleContentTypeProp<ContentType> = SearchFrom & {
6
6
  /** An array of Griddo fields. */
7
7
  fields: [
@@ -1,11 +1,11 @@
1
- import type __AT__ from "@/autotypes";
2
1
  import type { Fields } from "../..";
3
2
  import type { FormFieldArray, Source } from "../api-response-fields";
4
- import type { UIFormTemplateFields } from "../schema-fields/ui-form-template-fields";
5
- import type { UITemplateFields } from "../schema-fields/ui-template-fields";
6
3
  import type { BaseUI } from "./base";
7
4
  import type { FormTemplateCategoryEntry } from "./FormCategories";
8
5
  import type { ConfigTabs, Dimension, Thumbnails } from "./props";
6
+ import type { UIFormTemplateFields } from "../schema-fields/ui-form-template-fields";
7
+ import type { UITemplateFields } from "../schema-fields/ui-template-fields";
8
+ import type __AT__ from "@/autotypes";
9
9
  interface ComponentAndModuleBase extends BaseUI {
10
10
  /** Type of schema. */
11
11
  schemaType: "component" | "module" | "template" | "formComponent";
@@ -1,5 +1,5 @@
1
+ import type { DataPacks, Thumbnails, _AutoTypes } from "./props";
1
2
  import type __AT__ from "@/autotypes";
2
- import type { _AutoTypes, DataPacks, Thumbnails } from "./props";
3
3
  interface BaseContentType extends _AutoTypes {
4
4
  /** Title for the Content Type */
5
5
  title: string;
@@ -1,6 +1,6 @@
1
- import type __AT__ from "@/autotypes";
2
1
  import type { UIFields } from "../schema-fields/ui-fields";
3
2
  import type { NonEmptyArray } from "../utilities";
3
+ import type __AT__ from "@/autotypes";
4
4
  type DataPacks = {
5
5
  /** Sets the Data Packs to which this schema belongs. */
6
6
  dataPacks?: NonEmptyArray<__AT__.Datapacks> | null;
@@ -59,4 +59,4 @@ interface GriddoTheme {
59
59
  /** Instance themes array */
60
60
  themes: Array<Theme>;
61
61
  }
62
- export type { BaseTheme, BaseThemeBase, BaseThemeNormal, BaseThemeWithColorScheme, GlobalTheme, GriddoTheme, Primitive, Primitives, PrimitivesObj, Theme, };
62
+ export type { Primitive, PrimitivesObj, Primitives, BaseThemeBase, BaseThemeWithColorScheme, BaseThemeNormal, BaseTheme, GlobalTheme, Theme, GriddoTheme, };
@@ -6,4 +6,4 @@ type ContentTypeNameOfUnion<T> = T extends {
6
6
  __contentTypeName: string;
7
7
  } ? T["__contentTypeName"] : never;
8
8
  type Replace<S extends string, From extends string, To extends string> = From extends "" ? S : S extends `${infer Start}${From}${infer Rest}` ? `${Start}${To}${Replace<Rest, From, To>}` : S;
9
- export type { ContentTypeNameOfUnion, DistributiveOmit, KeysOfUnion, NonEmptyArray, PartiallyRequired, Replace, };
9
+ export type { NonEmptyArray, DistributiveOmit, PartiallyRequired, KeysOfUnion, ContentTypeNameOfUnion, Replace, };
@@ -17,10 +17,4 @@ declare function getLangFromLocalStorage(): number | null;
17
17
  * @returns a string with the params concatenated
18
18
  */
19
19
  declare function concatParams({ baseUrl, params }: ConcatParams): string;
20
- /**
21
- * A v4 UUID. `crypto.randomUUID` only exists in secure contexts (HTTPS or
22
- * localhost) and in modern browsers, so fall back to `getRandomValues`, which
23
- * is available everywhere.
24
- */
25
- declare function randomUUID(): string;
26
- export { concatParams, getLangFromLocalStorage, getSiteID, getToken, isLocalStorageAvailable, randomUUID, };
20
+ export { concatParams, getLangFromLocalStorage, getSiteID, getToken, isLocalStorageAvailable, };
package/package.json CHANGED
@@ -1,8 +1,16 @@
1
1
  {
2
2
  "name": "@griddo/core",
3
- "description": "Components, hooks and types for Griddo instances",
3
+ "description": "Reload version of Griddo Core",
4
4
  "license": "UNLICENSED",
5
- "version": "12.11.1-rc.0",
5
+ "version": "12.11.1",
6
+ "authors": [
7
+ "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
8
+ "Diego M. Béjar <diego.bejar@secuoyas.com>",
9
+ "Francis Vega <francis.vega@secuoyas.com>",
10
+ "Gonzalo Hernández <gonzalo.hernandez@secuoyas.com>",
11
+ "Sergio Ródenas <sergio.rodenas@secuoyas.com>",
12
+ "Txema León <txema.leon@secuoyas.com>"
13
+ ],
6
14
  "homepage": "https://griddo.io",
7
15
  "repository": {
8
16
  "type": "git",
@@ -11,6 +19,7 @@
11
19
  "main": "dist/index.js",
12
20
  "types": "dist/index.d.ts",
13
21
  "bin": {
22
+ "griddo-autotypes-legacy": "dist/autotypes.js",
14
23
  "griddo-autotypes": "dist/autotypes.mjs"
15
24
  },
16
25
  "exports": {
@@ -21,46 +30,75 @@
21
30
  }
22
31
  },
23
32
  "scripts": {
24
- "prepare": "npm run build",
25
- "build": "rollup -c --sourcemap --bundleConfigAsCjs",
33
+ "// CORE (JSX) EXPORT": "",
34
+ "build:core": "rollup -c --sourcemap --bundleConfigAsCjs",
35
+ "prepare": "yarn build",
36
+ "// MONOREPO SCRIPTS": "",
37
+ "build": "npm run build:core",
26
38
  "clean": "rm -rf ./dist",
39
+ "// DEV": "",
27
40
  "watch": "rollup -cw --bundleConfigAsCjs",
41
+ "// TEST": "",
28
42
  "test": "vitest run",
29
43
  "test:watch": "vitest",
30
44
  "test:coverage": "vitest run --coverage",
31
- "lint": "biome check --write",
32
- "format": "biome format --write"
45
+ "// TEST HOOKS": "",
46
+ "test:hooks": "vitest run src/hooks/__tests__",
47
+ "test:hooks:watch": "vitest src/hooks/__tests__",
48
+ "test:hooks:coverage": "vitest run src/hooks/__tests__ --coverage",
49
+ "// LINTER": "",
50
+ "run:lint": "eslint .",
51
+ "// FORMATTER": "",
52
+ "run:format": "prettier --write ."
33
53
  },
34
54
  "dependencies": {
35
- "prettier": "3.9.9",
36
- "tsx": "4.23.15"
55
+ "kleur": "3.0.3",
56
+ "prettier": "3.6.2",
57
+ "react-aspect-ratio": "1.1.8",
58
+ "tsx": "4.20.6"
37
59
  },
38
60
  "devDependencies": {
39
- "@biomejs/biome": "2.5.14",
40
- "@rollup/plugin-commonjs": "29.0.3",
61
+ "@babel/core": "7.26.0",
62
+ "@babel/preset-env": "7.26.0",
63
+ "@babel/preset-react": "7.26.3",
64
+ "@eslint/js": "9.30.1",
65
+ "@rollup/plugin-babel": "6.0.4",
66
+ "@rollup/plugin-commonjs": "28.0.1",
41
67
  "@rollup/plugin-json": "6.1.0",
42
- "@rollup/plugin-node-resolve": "16.0.3",
43
- "@rollup/plugin-replace": "6.0.3",
44
- "@rollup/plugin-terser": "1.0.0",
45
- "@rollup/plugin-typescript": "12.3.0",
46
- "@testing-library/dom": "10.4.2",
47
- "@testing-library/jest-dom": "7.0.1",
48
- "@testing-library/react": "16.3.3",
49
- "@types/node": "24.19.0",
50
- "@types/react": "18.2.79",
51
- "@types/react-dom": "18.2.25",
52
- "@vitest/coverage-v8": "5.0.2",
53
- "jsdom": "29.1.1",
54
- "postcss": "8.5.28",
55
- "react": "18.2.0",
56
- "react-dom": "18.2.0",
57
- "rollup": "4.63.5",
68
+ "@rollup/plugin-node-resolve": "15.3.0",
69
+ "@rollup/plugin-replace": "6.0.1",
70
+ "@rollup/plugin-terser": "0.4.4",
71
+ "@rollup/plugin-typescript": "9.0.2",
72
+ "@testing-library/jest-dom": "^6.6.3",
73
+ "@testing-library/react": "13.4.0",
74
+ "@types/node": "24.0.10",
75
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
76
+ "@typescript-eslint/parser": "^8.0.0",
77
+ "@vitest/coverage-v8": "^3.0.0",
78
+ "babel-core": "6.26.3",
79
+ "babel-preset-env": "1.7.0",
80
+ "babel-preset-react": "6.24.1",
81
+ "babel-preset-stage-0": "6.24.1",
82
+ "cheerio": "1.0.0",
83
+ "esbuild": "0.24.0",
84
+ "eslint": "^9.0.0",
85
+ "eslint-plugin-import": "2.31.0",
86
+ "eslint-plugin-node": "11.1.0",
87
+ "eslint-plugin-react": "7.37.4",
88
+ "eslint-plugin-react-hooks": "^4.6.0",
89
+ "eslint-plugin-testing-library": "^6.2.0",
90
+ "globals": "^16.0.0",
91
+ "jsdom": "^25.0.0",
92
+ "pkg-dir": "6.0.1",
93
+ "postcss": "8.4.49",
94
+ "rollup": "3.29.5",
95
+ "rollup-plugin-local-resolve": "1.0.7",
58
96
  "rollup-plugin-postcss": "4.0.2",
59
- "tslib": "2.8.1",
60
- "typescript": "6.0.3",
61
- "vite": "8.3.1",
62
- "vitest": "5.0.2",
63
- "vitest-fetch-mock": "0.4.5"
97
+ "rollup-plugin-preserve-shebang": "1.0.1",
98
+ "typescript": "5.7.2",
99
+ "uuid": "8.3.2",
100
+ "vitest": "^3.0.0",
101
+ "vitest-fetch-mock": "^0.4.0"
64
102
  },
65
103
  "peerDependencies": {
66
104
  "@types/react": ">=18 <19",
@@ -69,16 +107,17 @@
69
107
  "react-dom": ">=18 <19"
70
108
  },
71
109
  "engines": {
72
- "node": ">=24.12.0"
110
+ "node": ">=20"
73
111
  },
74
112
  "files": [
75
113
  "dist"
76
114
  ],
77
115
  "keywords": [
78
- "griddo"
116
+ "griddo",
117
+ "secuoyas"
79
118
  ],
80
119
  "publishConfig": {
81
120
  "access": "public"
82
121
  },
83
- "gitHead": "7ac7ef01e60f52a92be0b5414c50cd60e5f0714e"
122
+ "gitHead": "fd686f96ec397d69623e1827cb2ecb87a06b280f"
84
123
  }
@@ -1,15 +0,0 @@
1
- /*! react-aspect-ratio 1.1.9 | MIT License | Copyright (c) 2017 Roderick Hsiao */
2
- /**
3
- * Vendored from react-aspect-ratio 1.1.9 (`AspectRatio`, the React >= 15.6
4
- * export), MIT © Roderick Hsiao — see ./LICENSE.
5
- * https://github.com/roderickhsiao/react-aspect-ratio
6
- *
7
- * Its 2.x line requires React 19, which core does not support yet.
8
- */
9
- import * as React from "react";
10
- import "./aspect-ratio.css";
11
- type AspectRatioProps = React.ComponentProps<"div"> & {
12
- ratio?: string | number;
13
- };
14
- declare const AspectRatio: React.ForwardRefExoticComponent<Omit<AspectRatioProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
- export { AspectRatio };