@firecms/core 3.1.0-canary.8958c1b → 3.1.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/core",
3
3
  "type": "module",
4
- "version": "3.1.0-canary.8958c1b",
4
+ "version": "3.1.0",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -53,9 +53,9 @@
53
53
  "@dnd-kit/core": "^6.3.1",
54
54
  "@dnd-kit/modifiers": "^9.0.0",
55
55
  "@dnd-kit/sortable": "^10.0.0",
56
- "@firecms/editor": "^3.1.0-canary.8958c1b",
57
- "@firecms/formex": "^3.1.0-canary.8958c1b",
58
- "@firecms/ui": "^3.1.0-canary.8958c1b",
56
+ "@firecms/editor": "^3.1.0",
57
+ "@firecms/formex": "^3.1.0",
58
+ "@firecms/ui": "^3.1.0",
59
59
  "@radix-ui/react-portal": "^1.1.10",
60
60
  "clsx": "^2.1.1",
61
61
  "compressorjs": "^1.2.1",
@@ -76,8 +76,8 @@
76
76
  "yup": "^1.7.1"
77
77
  },
78
78
  "peerDependencies": {
79
- "react": ">=18.0.0",
80
- "react-dom": ">=18.0.0",
79
+ "react": ">=18.3.1 || >=19.0.0",
80
+ "react-dom": ">=18.3.1 || >=19.0.0",
81
81
  "react-router": "^6.28.0",
82
82
  "react-router-dom": "^6.28.0"
83
83
  },
@@ -89,8 +89,8 @@
89
89
  "@types/json-logic-js": "^2.0.8",
90
90
  "@types/node": "^20.19.17",
91
91
  "@types/object-hash": "^3.0.6",
92
- "@types/react": "^19.1.0",
93
- "@types/react-dom": "^19.1.0",
92
+ "@types/react": "^19.2.3",
93
+ "@types/react-dom": "^19.2.3",
94
94
  "@types/react-measure": "^2.0.12",
95
95
  "@vitejs/plugin-react": "^4.7.0",
96
96
  "babel-plugin-react-compiler": "^19.0.0-beta-af1b7da-20250417",
@@ -111,7 +111,7 @@
111
111
  "dist",
112
112
  "src"
113
113
  ],
114
- "gitHead": "c415ea47be324c74539718a2c108ea89fa78e3a1",
114
+ "gitHead": "40f8d9860cb2649c0a195ecebd1a92ccb37f33a6",
115
115
  "publishConfig": {
116
116
  "access": "public"
117
117
  },
@@ -11,8 +11,8 @@ import { sortProperties } from "./collections";
11
11
  import { isPropertyBuilder } from "./entities";
12
12
 
13
13
  function applyModifyFunction(modifyCollection: ((props: ModifyCollectionProps) => (EntityCollection | void)) | undefined,
14
- collection: EntityCollection,
15
- parentPaths: string[]) {
14
+ collection: EntityCollection,
15
+ parentPaths: string[]) {
16
16
  if (modifyCollection) {
17
17
  const modified = modifyCollection({
18
18
  collection,
@@ -34,9 +34,9 @@ function applyModifyFunction(modifyCollection: ((props: ModifyCollectionProps) =
34
34
  *
35
35
  */
36
36
  export function joinCollectionLists(targetCollections: EntityCollection[],
37
- sourceCollections: EntityCollection[] | undefined,
38
- parentPaths: string[] = [],
39
- modifyCollection?: (props: ModifyCollectionProps) => EntityCollection | void): EntityCollection[] {
37
+ sourceCollections: EntityCollection[] | undefined,
38
+ parentPaths: string[] = [],
39
+ modifyCollection?: (props: ModifyCollectionProps) => EntityCollection | void): EntityCollection[] {
40
40
 
41
41
  // merge collections that are in both lists
42
42
  const updatedCollections = (sourceCollections ?? [])
@@ -73,9 +73,9 @@ export function joinCollectionLists(targetCollections: EntityCollection[],
73
73
  *
74
74
  */
75
75
  export function mergeCollection(target: EntityCollection,
76
- source: EntityCollection,
77
- parentPaths: string[] = [],
78
- modifyCollection?: (props: ModifyCollectionProps) => EntityCollection | void
76
+ source: EntityCollection,
77
+ parentPaths: string[] = [],
78
+ modifyCollection?: (props: ModifyCollectionProps) => EntityCollection | void
79
79
  ): EntityCollection {
80
80
 
81
81
  const subcollectionsMerged = joinCollectionLists(
@@ -125,6 +125,8 @@ export function mergeCollection(target: EntityCollection,
125
125
  }
126
126
 
127
127
  function mergePropertyOrBuilder(target: PropertyOrBuilder, source: PropertyOrBuilder): PropertyOrBuilder {
128
+ if (!source) return target;
129
+ if (!target) return source;
128
130
  if (isPropertyBuilder(source)) {
129
131
  return source;
130
132
  } else if (isPropertyBuilder(target)) {