@puckeditor/core 0.22.0 → 0.22.1-canary.1a601e70
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/dist/{Editor-FJJNKTC3.mjs → Editor-QIQPMANU.mjs} +9 -9
- package/dist/{chunk-6MO3E35Y.mjs → chunk-6OH6TK4W.mjs} +1 -1
- package/dist/{chunk-SHVCBQDY.mjs → chunk-74HKFKJU.mjs} +19 -6
- package/dist/{chunk-XQHCQEAF.mjs → chunk-7GC7VDF5.mjs} +3 -3
- package/dist/{chunk-ELDOSC5Y.mjs → chunk-D5XBGQMA.mjs} +9 -9
- package/dist/{chunk-SSXLOL3N.mjs → chunk-EBQAEORX.mjs} +2 -2
- package/dist/{chunk-DVZWVU66.mjs → chunk-HRNJ42TO.mjs} +1 -1
- package/dist/{chunk-M5GPDW62.mjs → chunk-IJFV2K62.mjs} +1 -1
- package/dist/{chunk-XIGSFEU7.mjs → chunk-ITBZKLEX.mjs} +1 -1
- package/dist/{chunk-3RQGAM3Z.mjs → chunk-N7MM7M4J.mjs} +1 -1
- package/dist/{chunk-4US666EQ.mjs → chunk-W3MKRR57.mjs} +7 -7
- package/dist/{chunk-GKUX6MNS.mjs → chunk-ZKITKQLC.mjs} +3 -3
- package/dist/{full-6ZILLKCS.mjs → full-RD42FH2H.mjs} +8 -8
- package/dist/index.js +19 -6
- package/dist/index.mjs +11 -11
- package/dist/internal.js +19 -6
- package/dist/internal.mjs +2 -2
- package/dist/{loaded-QH5RKCGC.mjs → loaded-CKBHTJRT.mjs} +5 -5
- package/dist/{loaded-LAKI4KDY.mjs → loaded-JDYKEESX.mjs} +5 -5
- package/dist/{loaded-PILFUJGA.mjs → loaded-VOKJEO7E.mjs} +5 -5
- package/dist/no-external.js +19 -6
- package/dist/no-external.mjs +11 -11
- package/dist/rsc.js +19 -6
- package/dist/rsc.mjs +3 -3
- package/package.json +4 -1
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
EditorInner,
|
|
6
6
|
LoadedRichTextMenu
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZKITKQLC.mjs";
|
|
8
8
|
import "./chunk-H635BA2V.mjs";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-W3MKRR57.mjs";
|
|
10
|
+
import "./chunk-IJFV2K62.mjs";
|
|
11
|
+
import "./chunk-N7MM7M4J.mjs";
|
|
12
|
+
import "./chunk-ITBZKLEX.mjs";
|
|
13
13
|
import {
|
|
14
14
|
useAppStore,
|
|
15
15
|
useAppStoreApi
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-7GC7VDF5.mjs";
|
|
17
|
+
import "./chunk-HRNJ42TO.mjs";
|
|
18
|
+
import "./chunk-6OH6TK4W.mjs";
|
|
19
19
|
import "./chunk-Y2EFNT5P.mjs";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-74HKFKJU.mjs";
|
|
21
21
|
import {
|
|
22
22
|
__spreadProps,
|
|
23
23
|
__spreadValues,
|
|
@@ -31,7 +31,7 @@ var walkField = ({
|
|
|
31
31
|
config,
|
|
32
32
|
recurseSlots = false
|
|
33
33
|
}) => {
|
|
34
|
-
var _a, _b, _c;
|
|
34
|
+
var _a, _b, _c, _d;
|
|
35
35
|
const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
|
|
36
36
|
const map = mappers[fieldType];
|
|
37
37
|
if (map && fieldType === "slot") {
|
|
@@ -92,7 +92,9 @@ var walkField = ({
|
|
|
92
92
|
id,
|
|
93
93
|
getPropPath: (k) => `${propPath}.${k}`,
|
|
94
94
|
config,
|
|
95
|
-
recurseSlots
|
|
95
|
+
recurseSlots,
|
|
96
|
+
// Only default missing fields when objectFields describe this value
|
|
97
|
+
ownedFields: ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object"
|
|
96
98
|
});
|
|
97
99
|
}
|
|
98
100
|
}
|
|
@@ -105,11 +107,21 @@ var walkObject = ({
|
|
|
105
107
|
id,
|
|
106
108
|
getPropPath,
|
|
107
109
|
config,
|
|
108
|
-
recurseSlots
|
|
110
|
+
recurseSlots,
|
|
111
|
+
ownedFields
|
|
109
112
|
}) => {
|
|
110
|
-
const
|
|
113
|
+
const keys = Object.keys(value);
|
|
114
|
+
if (ownedFields) {
|
|
115
|
+
for (const fieldName in fields) {
|
|
116
|
+
const fieldType = fields[fieldName].type;
|
|
117
|
+
if (fieldType !== "slot" && mappers[fieldType] && !(fieldName in value)) {
|
|
118
|
+
keys.push(fieldName);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
const newProps = keys.map((k) => {
|
|
111
123
|
const opts = {
|
|
112
|
-
value:
|
|
124
|
+
value: value[k],
|
|
113
125
|
fields,
|
|
114
126
|
mappers,
|
|
115
127
|
propKey: k,
|
|
@@ -144,7 +156,8 @@ function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlo
|
|
|
144
156
|
id: item.props ? (_e = item.props.id) != null ? _e : "root" : "root",
|
|
145
157
|
getPropPath: (k) => k,
|
|
146
158
|
config,
|
|
147
|
-
recurseSlots
|
|
159
|
+
recurseSlots,
|
|
160
|
+
ownedFields: true
|
|
148
161
|
});
|
|
149
162
|
if (isPromise(newProps)) {
|
|
150
163
|
return newProps.then((resolvedProps) => __spreadProps(__spreadValues({}, item), {
|
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
generateId,
|
|
4
4
|
getItem,
|
|
5
5
|
makeStatePublic
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HRNJ42TO.mjs";
|
|
7
7
|
import {
|
|
8
8
|
defaultAppState,
|
|
9
9
|
defaultViewports,
|
|
10
10
|
getChanged,
|
|
11
11
|
resolveComponentData
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6OH6TK4W.mjs";
|
|
13
13
|
import {
|
|
14
14
|
get_class_name_factory_default
|
|
15
15
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
16
16
|
import {
|
|
17
17
|
walkAppState
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-74HKFKJU.mjs";
|
|
19
19
|
import {
|
|
20
20
|
__async,
|
|
21
21
|
__objRest,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EditorInner,
|
|
3
3
|
LoadedRichTextMenu
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZKITKQLC.mjs";
|
|
5
5
|
import {
|
|
6
6
|
RichTextRenderFallback,
|
|
7
7
|
SlotRender,
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
getSlotTransform,
|
|
11
11
|
useRichtextProps,
|
|
12
12
|
useSlots
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EBQAEORX.mjs";
|
|
14
14
|
import {
|
|
15
15
|
LoadedRichTextMenuInner
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-W3MKRR57.mjs";
|
|
17
17
|
import {
|
|
18
18
|
ActionBar,
|
|
19
19
|
ChevronDown,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
useRegisterHistorySlice,
|
|
69
69
|
useRegisterPermissionsSlice,
|
|
70
70
|
useResetAutoZoom
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-7GC7VDF5.mjs";
|
|
72
72
|
import {
|
|
73
73
|
generateId,
|
|
74
74
|
getItem,
|
|
@@ -76,11 +76,11 @@ import {
|
|
|
76
76
|
insertAction,
|
|
77
77
|
makeStatePublic,
|
|
78
78
|
populateIds
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-HRNJ42TO.mjs";
|
|
80
80
|
import {
|
|
81
81
|
defaultAppState,
|
|
82
82
|
defaultViewports
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-6OH6TK4W.mjs";
|
|
84
84
|
import {
|
|
85
85
|
get_class_name_factory_default
|
|
86
86
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
toComponent,
|
|
96
96
|
walkAppState,
|
|
97
97
|
walkField
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-74HKFKJU.mjs";
|
|
99
99
|
import {
|
|
100
100
|
__async,
|
|
101
101
|
__objRest,
|
|
@@ -1999,7 +1999,7 @@ EditorFallback.displayName = "EditorFallback";
|
|
|
1999
1999
|
// components/AutoField/fields/RichtextField/index.tsx
|
|
2000
2000
|
import { Fragment as Fragment5, jsx as jsx18 } from "react/jsx-runtime";
|
|
2001
2001
|
var Editor = lazy(
|
|
2002
|
-
() => import("./Editor-
|
|
2002
|
+
() => import("./Editor-QIQPMANU.mjs").then((m) => ({
|
|
2003
2003
|
default: m.Editor
|
|
2004
2004
|
}))
|
|
2005
2005
|
);
|
|
@@ -4499,7 +4499,7 @@ import {
|
|
|
4499
4499
|
} from "react";
|
|
4500
4500
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4501
4501
|
var Editor2 = lazy2(
|
|
4502
|
-
() => import("./Editor-
|
|
4502
|
+
() => import("./Editor-QIQPMANU.mjs").then((m) => ({
|
|
4503
4503
|
default: m.Editor
|
|
4504
4504
|
}))
|
|
4505
4505
|
);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
defaultAppState,
|
|
6
6
|
resolveComponentData
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6OH6TK4W.mjs";
|
|
8
8
|
import {
|
|
9
9
|
get_class_name_factory_default
|
|
10
10
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
toComponent,
|
|
15
15
|
walkAppState,
|
|
16
16
|
walkTree
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-74HKFKJU.mjs";
|
|
18
18
|
import {
|
|
19
19
|
__async,
|
|
20
20
|
__objRest,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAlignOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IJFV2K62.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useHeadingOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-N7MM7M4J.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useListOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ITBZKLEX.mjs";
|
|
10
10
|
import {
|
|
11
11
|
Action,
|
|
12
12
|
AlignCenter,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
Strikethrough,
|
|
29
29
|
Underline,
|
|
30
30
|
useControlContext
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7GC7VDF5.mjs";
|
|
32
32
|
import {
|
|
33
33
|
get_class_name_factory_default
|
|
34
34
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -199,7 +199,7 @@ function AlignSelectFallback() {
|
|
|
199
199
|
// components/RichTextMenu/controls/AlignSelect/index.tsx
|
|
200
200
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
201
201
|
var AlignSelectLoaded = lazy(
|
|
202
|
-
() => import("./loaded-
|
|
202
|
+
() => import("./loaded-CKBHTJRT.mjs").then((m) => ({
|
|
203
203
|
default: m.AlignSelectLoaded
|
|
204
204
|
}))
|
|
205
205
|
);
|
|
@@ -430,7 +430,7 @@ function HeadingSelectFallback() {
|
|
|
430
430
|
// components/RichTextMenu/controls/HeadingSelect/index.tsx
|
|
431
431
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
432
432
|
var HeadingSelectLoaded = lazy2(
|
|
433
|
-
() => import("./loaded-
|
|
433
|
+
() => import("./loaded-JDYKEESX.mjs").then((m) => ({
|
|
434
434
|
default: m.HeadingSelectLoaded
|
|
435
435
|
}))
|
|
436
436
|
);
|
|
@@ -462,7 +462,7 @@ function ListSelectFallback() {
|
|
|
462
462
|
// components/RichTextMenu/controls/ListSelect/index.tsx
|
|
463
463
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
464
464
|
var ListSelectLoaded = lazy3(
|
|
465
|
-
() => import("./loaded-
|
|
465
|
+
() => import("./loaded-VOKJEO7E.mjs").then((m) => ({
|
|
466
466
|
default: m.ListSelectLoaded
|
|
467
467
|
}))
|
|
468
468
|
);
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-H635BA2V.mjs";
|
|
4
4
|
import {
|
|
5
5
|
LoadedRichTextMenuInner
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W3MKRR57.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useAppStore,
|
|
9
9
|
useAppStoreApi
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7GC7VDF5.mjs";
|
|
11
11
|
import {
|
|
12
12
|
get_class_name_factory_default
|
|
13
13
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -100,7 +100,7 @@ init_react_import();
|
|
|
100
100
|
import { lazy, Suspense } from "react";
|
|
101
101
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
102
102
|
var LoadedRichTextMenuFull = lazy(
|
|
103
|
-
() => import("./full-
|
|
103
|
+
() => import("./full-RD42FH2H.mjs").then((m) => ({
|
|
104
104
|
default: m.LoadedRichTextMenuFull
|
|
105
105
|
}))
|
|
106
106
|
);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadedRichTextMenuInner
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-W3MKRR57.mjs";
|
|
4
|
+
import "./chunk-IJFV2K62.mjs";
|
|
5
|
+
import "./chunk-N7MM7M4J.mjs";
|
|
6
|
+
import "./chunk-ITBZKLEX.mjs";
|
|
7
|
+
import "./chunk-7GC7VDF5.mjs";
|
|
8
|
+
import "./chunk-HRNJ42TO.mjs";
|
|
9
|
+
import "./chunk-6OH6TK4W.mjs";
|
|
10
10
|
import "./chunk-Y2EFNT5P.mjs";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-74HKFKJU.mjs";
|
|
12
12
|
import {
|
|
13
13
|
__spreadValues,
|
|
14
14
|
init_react_import
|
package/dist/index.js
CHANGED
|
@@ -1438,7 +1438,8 @@ function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlo
|
|
|
1438
1438
|
id: item.props ? (_e = item.props.id) != null ? _e : "root" : "root",
|
|
1439
1439
|
getPropPath: (k) => k,
|
|
1440
1440
|
config,
|
|
1441
|
-
recurseSlots
|
|
1441
|
+
recurseSlots,
|
|
1442
|
+
ownedFields: true
|
|
1442
1443
|
});
|
|
1443
1444
|
if (isPromise(newProps)) {
|
|
1444
1445
|
return newProps.then((resolvedProps) => __spreadProps(__spreadValues({}, item), {
|
|
@@ -1468,7 +1469,7 @@ var init_map_fields = __esm({
|
|
|
1468
1469
|
config,
|
|
1469
1470
|
recurseSlots = false
|
|
1470
1471
|
}) => {
|
|
1471
|
-
var _a, _b, _c;
|
|
1472
|
+
var _a, _b, _c, _d;
|
|
1472
1473
|
const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
|
|
1473
1474
|
const map = mappers[fieldType];
|
|
1474
1475
|
if (map && fieldType === "slot") {
|
|
@@ -1529,7 +1530,9 @@ var init_map_fields = __esm({
|
|
|
1529
1530
|
id,
|
|
1530
1531
|
getPropPath: (k) => `${propPath}.${k}`,
|
|
1531
1532
|
config,
|
|
1532
|
-
recurseSlots
|
|
1533
|
+
recurseSlots,
|
|
1534
|
+
// Only default missing fields when objectFields describe this value
|
|
1535
|
+
ownedFields: ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object"
|
|
1533
1536
|
});
|
|
1534
1537
|
}
|
|
1535
1538
|
}
|
|
@@ -1542,11 +1545,21 @@ var init_map_fields = __esm({
|
|
|
1542
1545
|
id,
|
|
1543
1546
|
getPropPath,
|
|
1544
1547
|
config,
|
|
1545
|
-
recurseSlots
|
|
1548
|
+
recurseSlots,
|
|
1549
|
+
ownedFields
|
|
1546
1550
|
}) => {
|
|
1547
|
-
const
|
|
1551
|
+
const keys = Object.keys(value);
|
|
1552
|
+
if (ownedFields) {
|
|
1553
|
+
for (const fieldName in fields) {
|
|
1554
|
+
const fieldType = fields[fieldName].type;
|
|
1555
|
+
if (fieldType !== "slot" && mappers[fieldType] && !(fieldName in value)) {
|
|
1556
|
+
keys.push(fieldName);
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
const newProps = keys.map((k) => {
|
|
1548
1561
|
const opts = {
|
|
1549
|
-
value:
|
|
1562
|
+
value: value[k],
|
|
1550
1563
|
fields,
|
|
1551
1564
|
mappers,
|
|
1552
1565
|
propKey: k,
|
package/dist/index.mjs
CHANGED
|
@@ -17,20 +17,20 @@ import {
|
|
|
17
17
|
setDeep,
|
|
18
18
|
useGetPuck,
|
|
19
19
|
usePuck
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-D5XBGQMA.mjs";
|
|
21
|
+
import "./chunk-ZKITKQLC.mjs";
|
|
22
22
|
import {
|
|
23
23
|
migrate,
|
|
24
24
|
resolveAllData,
|
|
25
25
|
transformProps
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-EBQAEORX.mjs";
|
|
27
27
|
import "./chunk-H635BA2V.mjs";
|
|
28
28
|
import {
|
|
29
29
|
RichTextMenu
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-W3MKRR57.mjs";
|
|
31
|
+
import "./chunk-IJFV2K62.mjs";
|
|
32
|
+
import "./chunk-N7MM7M4J.mjs";
|
|
33
|
+
import "./chunk-ITBZKLEX.mjs";
|
|
34
34
|
import {
|
|
35
35
|
Action,
|
|
36
36
|
ActionBar,
|
|
@@ -38,13 +38,13 @@ import {
|
|
|
38
38
|
IconButton,
|
|
39
39
|
Label,
|
|
40
40
|
Separator
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-7GC7VDF5.mjs";
|
|
42
|
+
import "./chunk-HRNJ42TO.mjs";
|
|
43
|
+
import "./chunk-6OH6TK4W.mjs";
|
|
44
44
|
import "./chunk-Y2EFNT5P.mjs";
|
|
45
45
|
import {
|
|
46
46
|
walkTree
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-74HKFKJU.mjs";
|
|
48
48
|
import {
|
|
49
49
|
init_react_import
|
|
50
50
|
} from "./chunk-M6W7YEVX.mjs";
|
package/dist/internal.js
CHANGED
|
@@ -100,7 +100,7 @@ var walkField = ({
|
|
|
100
100
|
config,
|
|
101
101
|
recurseSlots = false
|
|
102
102
|
}) => {
|
|
103
|
-
var _a, _b, _c;
|
|
103
|
+
var _a, _b, _c, _d;
|
|
104
104
|
const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
|
|
105
105
|
const map = mappers[fieldType];
|
|
106
106
|
if (map && fieldType === "slot") {
|
|
@@ -161,7 +161,9 @@ var walkField = ({
|
|
|
161
161
|
id,
|
|
162
162
|
getPropPath: (k) => `${propPath}.${k}`,
|
|
163
163
|
config,
|
|
164
|
-
recurseSlots
|
|
164
|
+
recurseSlots,
|
|
165
|
+
// Only default missing fields when objectFields describe this value
|
|
166
|
+
ownedFields: ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object"
|
|
165
167
|
});
|
|
166
168
|
}
|
|
167
169
|
}
|
|
@@ -174,11 +176,21 @@ var walkObject = ({
|
|
|
174
176
|
id,
|
|
175
177
|
getPropPath,
|
|
176
178
|
config,
|
|
177
|
-
recurseSlots
|
|
179
|
+
recurseSlots,
|
|
180
|
+
ownedFields
|
|
178
181
|
}) => {
|
|
179
|
-
const
|
|
182
|
+
const keys = Object.keys(value);
|
|
183
|
+
if (ownedFields) {
|
|
184
|
+
for (const fieldName in fields) {
|
|
185
|
+
const fieldType = fields[fieldName].type;
|
|
186
|
+
if (fieldType !== "slot" && mappers[fieldType] && !(fieldName in value)) {
|
|
187
|
+
keys.push(fieldName);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const newProps = keys.map((k) => {
|
|
180
192
|
const opts = {
|
|
181
|
-
value:
|
|
193
|
+
value: value[k],
|
|
182
194
|
fields,
|
|
183
195
|
mappers,
|
|
184
196
|
propKey: k,
|
|
@@ -213,7 +225,8 @@ function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlo
|
|
|
213
225
|
id: item.props ? (_e = item.props.id) != null ? _e : "root" : "root",
|
|
214
226
|
getPropPath: (k) => k,
|
|
215
227
|
config,
|
|
216
|
-
recurseSlots
|
|
228
|
+
recurseSlots,
|
|
229
|
+
ownedFields: true
|
|
217
230
|
});
|
|
218
231
|
if (isPromise(newProps)) {
|
|
219
232
|
return newProps.then((resolvedProps) => __spreadProps(__spreadValues({}, item), {
|
package/dist/internal.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAlignOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IJFV2K62.mjs";
|
|
4
4
|
import {
|
|
5
5
|
AlignLeft,
|
|
6
6
|
SelectControl,
|
|
7
7
|
useControlContext
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GC7VDF5.mjs";
|
|
9
|
+
import "./chunk-HRNJ42TO.mjs";
|
|
10
|
+
import "./chunk-6OH6TK4W.mjs";
|
|
11
11
|
import "./chunk-Y2EFNT5P.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-74HKFKJU.mjs";
|
|
13
13
|
import {
|
|
14
14
|
init_react_import
|
|
15
15
|
} from "./chunk-M6W7YEVX.mjs";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useHeadingOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N7MM7M4J.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Heading,
|
|
6
6
|
SelectControl,
|
|
7
7
|
useControlContext
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GC7VDF5.mjs";
|
|
9
|
+
import "./chunk-HRNJ42TO.mjs";
|
|
10
|
+
import "./chunk-6OH6TK4W.mjs";
|
|
11
11
|
import "./chunk-Y2EFNT5P.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-74HKFKJU.mjs";
|
|
13
13
|
import {
|
|
14
14
|
init_react_import
|
|
15
15
|
} from "./chunk-M6W7YEVX.mjs";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useListOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ITBZKLEX.mjs";
|
|
4
4
|
import {
|
|
5
5
|
List,
|
|
6
6
|
SelectControl,
|
|
7
7
|
useControlContext
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7GC7VDF5.mjs";
|
|
9
|
+
import "./chunk-HRNJ42TO.mjs";
|
|
10
|
+
import "./chunk-6OH6TK4W.mjs";
|
|
11
11
|
import "./chunk-Y2EFNT5P.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-74HKFKJU.mjs";
|
|
13
13
|
import {
|
|
14
14
|
init_react_import
|
|
15
15
|
} from "./chunk-M6W7YEVX.mjs";
|
package/dist/no-external.js
CHANGED
|
@@ -1438,7 +1438,8 @@ function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlo
|
|
|
1438
1438
|
id: item.props ? (_e = item.props.id) != null ? _e : "root" : "root",
|
|
1439
1439
|
getPropPath: (k) => k,
|
|
1440
1440
|
config,
|
|
1441
|
-
recurseSlots
|
|
1441
|
+
recurseSlots,
|
|
1442
|
+
ownedFields: true
|
|
1442
1443
|
});
|
|
1443
1444
|
if (isPromise(newProps)) {
|
|
1444
1445
|
return newProps.then((resolvedProps) => __spreadProps(__spreadValues({}, item), {
|
|
@@ -1468,7 +1469,7 @@ var init_map_fields = __esm({
|
|
|
1468
1469
|
config,
|
|
1469
1470
|
recurseSlots = false
|
|
1470
1471
|
}) => {
|
|
1471
|
-
var _a, _b, _c;
|
|
1472
|
+
var _a, _b, _c, _d;
|
|
1472
1473
|
const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
|
|
1473
1474
|
const map = mappers[fieldType];
|
|
1474
1475
|
if (map && fieldType === "slot") {
|
|
@@ -1529,7 +1530,9 @@ var init_map_fields = __esm({
|
|
|
1529
1530
|
id,
|
|
1530
1531
|
getPropPath: (k) => `${propPath}.${k}`,
|
|
1531
1532
|
config,
|
|
1532
|
-
recurseSlots
|
|
1533
|
+
recurseSlots,
|
|
1534
|
+
// Only default missing fields when objectFields describe this value
|
|
1535
|
+
ownedFields: ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object"
|
|
1533
1536
|
});
|
|
1534
1537
|
}
|
|
1535
1538
|
}
|
|
@@ -1542,11 +1545,21 @@ var init_map_fields = __esm({
|
|
|
1542
1545
|
id,
|
|
1543
1546
|
getPropPath,
|
|
1544
1547
|
config,
|
|
1545
|
-
recurseSlots
|
|
1548
|
+
recurseSlots,
|
|
1549
|
+
ownedFields
|
|
1546
1550
|
}) => {
|
|
1547
|
-
const
|
|
1551
|
+
const keys = Object.keys(value);
|
|
1552
|
+
if (ownedFields) {
|
|
1553
|
+
for (const fieldName in fields) {
|
|
1554
|
+
const fieldType = fields[fieldName].type;
|
|
1555
|
+
if (fieldType !== "slot" && mappers[fieldType] && !(fieldName in value)) {
|
|
1556
|
+
keys.push(fieldName);
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
const newProps = keys.map((k) => {
|
|
1548
1561
|
const opts = {
|
|
1549
|
-
value:
|
|
1562
|
+
value: value[k],
|
|
1550
1563
|
fields,
|
|
1551
1564
|
mappers,
|
|
1552
1565
|
propKey: k,
|
package/dist/no-external.mjs
CHANGED
|
@@ -17,20 +17,20 @@ import {
|
|
|
17
17
|
setDeep,
|
|
18
18
|
useGetPuck,
|
|
19
19
|
usePuck
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-D5XBGQMA.mjs";
|
|
21
|
+
import "./chunk-ZKITKQLC.mjs";
|
|
22
22
|
import {
|
|
23
23
|
migrate,
|
|
24
24
|
resolveAllData,
|
|
25
25
|
transformProps
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-EBQAEORX.mjs";
|
|
27
27
|
import "./chunk-H635BA2V.mjs";
|
|
28
28
|
import {
|
|
29
29
|
RichTextMenu
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-W3MKRR57.mjs";
|
|
31
|
+
import "./chunk-IJFV2K62.mjs";
|
|
32
|
+
import "./chunk-N7MM7M4J.mjs";
|
|
33
|
+
import "./chunk-ITBZKLEX.mjs";
|
|
34
34
|
import {
|
|
35
35
|
Action,
|
|
36
36
|
ActionBar,
|
|
@@ -38,13 +38,13 @@ import {
|
|
|
38
38
|
IconButton,
|
|
39
39
|
Label,
|
|
40
40
|
Separator
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-7GC7VDF5.mjs";
|
|
42
|
+
import "./chunk-HRNJ42TO.mjs";
|
|
43
|
+
import "./chunk-6OH6TK4W.mjs";
|
|
44
44
|
import "./chunk-Y2EFNT5P.mjs";
|
|
45
45
|
import {
|
|
46
46
|
walkTree
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-74HKFKJU.mjs";
|
|
48
48
|
import {
|
|
49
49
|
init_react_import
|
|
50
50
|
} from "./chunk-M6W7YEVX.mjs";
|
package/dist/rsc.js
CHANGED
|
@@ -420,7 +420,7 @@ var walkField = ({
|
|
|
420
420
|
config,
|
|
421
421
|
recurseSlots = false
|
|
422
422
|
}) => {
|
|
423
|
-
var _a, _b, _c;
|
|
423
|
+
var _a, _b, _c, _d;
|
|
424
424
|
const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
|
|
425
425
|
const map = mappers[fieldType];
|
|
426
426
|
if (map && fieldType === "slot") {
|
|
@@ -481,7 +481,9 @@ var walkField = ({
|
|
|
481
481
|
id,
|
|
482
482
|
getPropPath: (k) => `${propPath}.${k}`,
|
|
483
483
|
config,
|
|
484
|
-
recurseSlots
|
|
484
|
+
recurseSlots,
|
|
485
|
+
// Only default missing fields when objectFields describe this value
|
|
486
|
+
ownedFields: ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object"
|
|
485
487
|
});
|
|
486
488
|
}
|
|
487
489
|
}
|
|
@@ -494,11 +496,21 @@ var walkObject = ({
|
|
|
494
496
|
id,
|
|
495
497
|
getPropPath,
|
|
496
498
|
config,
|
|
497
|
-
recurseSlots
|
|
499
|
+
recurseSlots,
|
|
500
|
+
ownedFields
|
|
498
501
|
}) => {
|
|
499
|
-
const
|
|
502
|
+
const keys = Object.keys(value);
|
|
503
|
+
if (ownedFields) {
|
|
504
|
+
for (const fieldName in fields) {
|
|
505
|
+
const fieldType = fields[fieldName].type;
|
|
506
|
+
if (fieldType !== "slot" && mappers[fieldType] && !(fieldName in value)) {
|
|
507
|
+
keys.push(fieldName);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
const newProps = keys.map((k) => {
|
|
500
512
|
const opts = {
|
|
501
|
-
value:
|
|
513
|
+
value: value[k],
|
|
502
514
|
fields,
|
|
503
515
|
mappers,
|
|
504
516
|
propKey: k,
|
|
@@ -533,7 +545,8 @@ function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlo
|
|
|
533
545
|
id: item.props ? (_e = item.props.id) != null ? _e : "root" : "root",
|
|
534
546
|
getPropPath: (k) => k,
|
|
535
547
|
config,
|
|
536
|
-
recurseSlots
|
|
548
|
+
recurseSlots,
|
|
549
|
+
ownedFields: true
|
|
537
550
|
});
|
|
538
551
|
if (isPromise(newProps)) {
|
|
539
552
|
return newProps.then((resolvedProps) => __spreadProps(__spreadValues({}, item), {
|
package/dist/rsc.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
transformProps,
|
|
6
6
|
useRichtextProps,
|
|
7
7
|
useSlots
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EBQAEORX.mjs";
|
|
9
9
|
import "./chunk-H635BA2V.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-6OH6TK4W.mjs";
|
|
11
11
|
import "./chunk-Y2EFNT5P.mjs";
|
|
12
12
|
import {
|
|
13
13
|
rootAreaId,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
rootZone,
|
|
16
16
|
setupZone,
|
|
17
17
|
walkTree
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-74HKFKJU.mjs";
|
|
19
19
|
import {
|
|
20
20
|
__spreadProps,
|
|
21
21
|
__spreadValues,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puckeditor/core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.1-canary.1a601e70",
|
|
4
4
|
"description": "The open-source visual editor for React",
|
|
5
5
|
"author": "Chris Villa <chris@puckeditor.com>",
|
|
6
6
|
"repository": "puckeditor/puck",
|
|
@@ -63,6 +63,9 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"license": "MIT",
|
|
66
|
+
"engines": {
|
|
67
|
+
"node": ">=20.0.0"
|
|
68
|
+
},
|
|
66
69
|
"scripts": {
|
|
67
70
|
"lint": "eslint \"**/*.ts*\"",
|
|
68
71
|
"build": "rm -rf dist && tsup bundle/index.ts bundle/rsc.tsx bundle/no-external.ts bundle/internal.ts",
|