@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,6 +1,6 @@
1
- import __AT__ from "@autoTypes";
2
- import { UIFields } from "../schema-fields/ui-fields";
3
- import { NonEmptyArray } from "../utilities";
1
+ import type { UIFields } from "../schema-fields/ui-fields";
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;
@@ -36,4 +36,4 @@ interface _AutoTypes {
36
36
  relations?: boolean | "off" | "simple" | "full";
37
37
  };
38
38
  }
39
- export { ConfigTabs, Thumbnails, ExpirationData, Dimension, DataPacks, _AutoTypes, };
39
+ export type { _AutoTypes, ConfigTabs, DataPacks, Dimension, ExpirationData, Thumbnails, };
@@ -1,4 +1,4 @@
1
- export interface Primitive {
1
+ interface Primitive {
2
2
  /** Unique primitive group id */
3
3
  id: string;
4
4
  /** Name for the primitive group */
@@ -15,12 +15,12 @@ export interface Primitive {
15
15
  value: string;
16
16
  }>;
17
17
  }
18
- export type PrimitivesObj = {
18
+ type PrimitivesObj = {
19
19
  common?: Array<Primitive>;
20
20
  light: Array<Primitive>;
21
21
  dark: Array<Primitive>;
22
22
  };
23
- export type Primitives = Array<Primitive> | PrimitivesObj;
23
+ type Primitives = Array<Primitive> | PrimitivesObj;
24
24
  interface BaseThemeBase {
25
25
  /** Unique theme id */
26
26
  id: string;
@@ -33,30 +33,30 @@ interface BaseThemeBase {
33
33
  /** Prefer colorScheme media query */
34
34
  preferColorScheme?: boolean;
35
35
  }
36
- export interface BaseThemeWithColorScheme extends BaseThemeBase {
36
+ interface BaseThemeWithColorScheme extends BaseThemeBase {
37
37
  primitives: PrimitivesObj;
38
38
  preferColorScheme: true;
39
39
  }
40
- export interface BaseThemeNormal extends BaseThemeBase {
40
+ interface BaseThemeNormal extends BaseThemeBase {
41
41
  primitives: Array<Primitive>;
42
42
  preferColorScheme?: false;
43
43
  }
44
- export type BaseTheme = BaseThemeWithColorScheme | BaseThemeNormal;
45
- export type GlobalTheme = BaseTheme & {
44
+ type BaseTheme = BaseThemeWithColorScheme | BaseThemeNormal;
45
+ type GlobalTheme = BaseTheme & {
46
46
  id: string;
47
47
  selector: string;
48
48
  customMedia?: {
49
49
  [key: `--${string}`]: string;
50
50
  };
51
51
  };
52
- export type Theme = BaseTheme & {
52
+ type Theme = BaseTheme & {
53
53
  /** Subthemes */
54
54
  subthemes?: Array<BaseTheme>;
55
55
  };
56
- export interface GriddoTheme {
56
+ interface GriddoTheme {
57
57
  /** Global theme entry */
58
58
  global: GlobalTheme;
59
59
  /** Instance themes array */
60
60
  themes: Array<Theme>;
61
61
  }
62
- export {};
62
+ export type { Primitive, PrimitivesObj, Primitives, BaseThemeBase, BaseThemeWithColorScheme, BaseThemeNormal, BaseTheme, GlobalTheme, Theme, GriddoTheme, };
@@ -1,8 +1,9 @@
1
- export type NonEmptyArray<T> = [T, ...Array<T>];
2
- export type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
3
- export type PartiallyRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
4
- export type KeysOfUnion<T> = T extends T ? keyof T : never;
5
- export type ContentTypeNameOfUnion<T> = T extends {
1
+ type NonEmptyArray<T> = [T, ...Array<T>];
2
+ type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
3
+ type PartiallyRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
4
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
5
+ type ContentTypeNameOfUnion<T> = T extends {
6
6
  __contentTypeName: string;
7
7
  } ? T["__contentTypeName"] : never;
8
- export 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;
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 { NonEmptyArray, DistributiveOmit, PartiallyRequired, KeysOfUnion, ContentTypeNameOfUnion, Replace, };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@griddo/core",
3
3
  "description": "Reload version of Griddo Core",
4
4
  "license": "UNLICENSED",
5
- "version": "10.7.9",
5
+ "version": "11.0.2",
6
6
  "authors": [
7
7
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
8
8
  "Diego M. Béjar <diego.bejar@secuoyas.com>",
@@ -23,46 +23,63 @@
23
23
  },
24
24
  "exports": {
25
25
  ".": {
26
+ "types": "./dist/index.d.ts",
26
27
  "import": "./dist/index.js",
27
- "require": "./dist/index.js",
28
- "types": "./dist/index.d.ts"
28
+ "require": "./dist/index.js"
29
29
  },
30
30
  "./node": {
31
+ "types": "./dist/node/index.d.ts",
31
32
  "import": "./dist/node/index.js",
32
- "require": "./dist/node/index.js",
33
- "types": "./dist/node/index.d.ts"
33
+ "require": "./dist/node/index.js"
34
34
  }
35
35
  },
36
36
  "scripts": {
37
+ "// NODE": "",
37
38
  "build:node-types": "../../node_modules/.bin/tsc --emitDeclarationOnly --declaration --outDir dist --project ./tsconfig.node.json",
38
- "build:node-js": "npx esbuild ./src/node/index.ts --bundle --platform=node --minify --outfile=./dist/node/index.js",
39
+ "build:node-js": "esbuild ./src/node/index.ts --bundle --platform=node --minify --outfile=./dist/node/index.js",
39
40
  "build:node": "npm run build:node-js && npm run build:node-types",
41
+ "// CORE (JSX) EXPORT": "",
40
42
  "build:core": "rollup -c --sourcemap --bundleConfigAsCjs",
43
+ "prepare": "yarn build",
44
+ "// MONOREPO SCRIPTS": "",
41
45
  "build": "npm run build:core && npm run build:node",
42
- "watch": "rollup -cw --bundleConfigAsCjs",
43
46
  "clean": "rm -rf ./dist",
44
- "prepare": "yarn build",
47
+ "// DEV": "",
48
+ "watch": "rollup -cw --bundleConfigAsCjs",
49
+ "// TEST": "",
45
50
  "test": "jest",
46
51
  "test:watch": "jest --watch",
47
52
  "test:watch-all": "jest --watch",
48
53
  "test:coverage": "jest --coverage",
49
- "test:clear": "jest --clearCache"
54
+ "test:clear": "jest --clearCache",
55
+ "// LINTER": "",
56
+ "run:lint": "eslint . -c=./.eslintrc.js",
57
+ "// FORMATTER": "",
58
+ "run:format": "prettier --write ."
50
59
  },
51
60
  "dependencies": {
52
61
  "react-aspect-ratio": "^1.0.49"
53
62
  },
54
63
  "devDependencies": {
55
64
  "@babel/core": "^7.21.0",
56
- "@babel/preset-env": "^7.12.17",
57
- "@babel/preset-react": "^7.12.13",
65
+ "@babel/plugin-proposal-class-properties": "^7.12.13",
66
+ "@babel/preset-env": "^7.16.11",
67
+ "@babel/preset-react": "^7.14.5",
58
68
  "@rollup/plugin-node-resolve": "^15.2.3",
59
69
  "@rollup/plugin-typescript": "^8.3.2",
60
- "babel-core": "^6.21.0",
70
+ "@typescript-eslint/eslint-plugin": "^7.14.1",
71
+ "@typescript-eslint/parser": "^7.14.1",
72
+ "babel-core": "^6.26.3",
61
73
  "babel-loader": "^7.1.4",
62
- "babel-preset-env": "^1.6.1",
74
+ "babel-preset-env": "^1.7.0",
63
75
  "babel-preset-react": "^6.16.0",
64
76
  "babel-preset-stage-0": "^6.24.1",
65
- "eslint-plugin-react-hooks": "^4.0.5",
77
+ "cheerio": "^1.0.0-rc.12",
78
+ "esbuild": "^0.24.0",
79
+ "eslint": "^8.0.0",
80
+ "eslint-plugin-node": "^11.1.0",
81
+ "eslint-plugin-react": "7.34.2",
82
+ "eslint-plugin-react-hooks": "^4.2.0",
66
83
  "eslint-plugin-testing-library": "^6.2.0",
67
84
  "jest": "^29.7.0",
68
85
  "jest-environment-jsdom": "^29.7.0",
@@ -91,5 +108,5 @@
91
108
  "publishConfig": {
92
109
  "access": "public"
93
110
  },
94
- "gitHead": "406e9f612d8587a5b08436e7e822bcc8782e0094"
111
+ "gitHead": "52234fea5357b3aea22140b23a681c50e8255962"
95
112
  }