@puckeditor/core 0.24.0-canary.cb7360dd → 0.24.0-canary.d629cffa
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-IOB6CBHE.mjs → Editor-ACJTGLLR.mjs} +6 -6
- package/dist/{actions-DzP_zhsF.d.mts → actions-D2lY1CZb.d.mts} +7 -3
- package/dist/{actions-DzP_zhsF.d.ts → actions-D2lY1CZb.d.ts} +7 -3
- package/dist/{chunk-6MVGICFW.mjs → chunk-AVZ47Q6I.mjs} +1 -1
- package/dist/{chunk-MVHLONPE.mjs → chunk-CAEACQ3G.mjs} +12 -0
- package/dist/{chunk-3YSLTDRT.mjs → chunk-EAAIN3F7.mjs} +1 -1
- package/dist/{chunk-3OECBDNE.mjs → chunk-GVMWPICP.mjs} +7 -7
- package/dist/{chunk-3CZRCHCU.mjs → chunk-IVDY77GH.mjs} +3 -3
- package/dist/{chunk-XAJK3MOG.mjs → chunk-LOYIZ2TT.mjs} +45 -12
- package/dist/{chunk-WQ2SNIVF.mjs → chunk-R5Z2GLXF.mjs} +801 -570
- package/dist/{chunk-3USGHYFG.mjs → chunk-WEHOKKUT.mjs} +1 -1
- package/dist/{full-G3HMYLKK.mjs → full-WPLMFLUO.mjs} +5 -5
- package/dist/{index-Cv-eVWCd.d.ts → index-B5D647N_.d.ts} +1 -1
- package/dist/{index-poi3aTIz.d.mts → index-D8gs5tgA.d.mts} +1 -1
- package/dist/index.css +116 -38
- package/dist/index.d.mts +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.js +1033 -749
- package/dist/index.mjs +8 -8
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/{loaded-4W6LSSFR.mjs → loaded-BIKODANT.mjs} +2 -2
- package/dist/{loaded-2R7Z7VD4.mjs → loaded-II5A5RFH.mjs} +2 -2
- package/dist/{loaded-O7MEOBEX.mjs → loaded-MGQ2LS57.mjs} +2 -2
- package/dist/no-external.css +116 -38
- package/dist/no-external.d.mts +3 -3
- package/dist/no-external.d.ts +3 -3
- package/dist/no-external.js +1033 -749
- package/dist/no-external.mjs +8 -8
- package/dist/rsc.d.mts +4 -3
- package/dist/rsc.d.ts +4 -3
- package/dist/rsc.js +98 -24
- package/dist/rsc.mjs +54 -13
- package/dist/{walk-tree-iWDqHBcM.d.mts → walk-tree-B2S_ycOm.d.mts} +1 -1
- package/dist/{walk-tree-Bu3IHwm_.d.ts → walk-tree-CmOcI1Cn.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
EditorInner,
|
|
6
6
|
LoadedRichTextMenu
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IVDY77GH.mjs";
|
|
8
8
|
import "./chunk-H635BA2V.mjs";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-GVMWPICP.mjs";
|
|
10
|
+
import "./chunk-AVZ47Q6I.mjs";
|
|
11
|
+
import "./chunk-EAAIN3F7.mjs";
|
|
12
|
+
import "./chunk-WEHOKKUT.mjs";
|
|
13
13
|
import {
|
|
14
14
|
useAppStore,
|
|
15
15
|
useAppStoreApi
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CAEACQ3G.mjs";
|
|
17
17
|
import "./chunk-Z2MS6UIF.mjs";
|
|
18
18
|
import "./chunk-ZRAERXB4.mjs";
|
|
19
19
|
import "./chunk-OT7NKYY4.mjs";
|
|
@@ -53,7 +53,7 @@ type NonForwardableProps = {
|
|
|
53
53
|
/**
|
|
54
54
|
* Keys internally consumed by Puck and never forwarded to `as`.
|
|
55
55
|
*/
|
|
56
|
-
type ConsumedPropKey = keyof DropZoneOwnProps | "as" | "content" | "config" | "metadata";
|
|
56
|
+
type ConsumedPropKey = keyof DropZoneOwnProps | "as" | "content" | "config" | "metadata" | "fieldTransforms";
|
|
57
57
|
/**
|
|
58
58
|
* Additional props forwarded to the element or component provided via `as`,
|
|
59
59
|
* typed against it.
|
|
@@ -272,6 +272,10 @@ interface RadioField extends BaseField {
|
|
|
272
272
|
type: "radio";
|
|
273
273
|
options: FieldOptions;
|
|
274
274
|
}
|
|
275
|
+
interface CheckboxField extends BaseField {
|
|
276
|
+
type: "checkbox";
|
|
277
|
+
options: FieldOptions;
|
|
278
|
+
}
|
|
275
279
|
interface RichtextField<UserSelector extends RichTextSelector = RichTextSelector> extends BaseField {
|
|
276
280
|
type: "richtext";
|
|
277
281
|
contentEditable?: boolean;
|
|
@@ -378,7 +382,7 @@ interface SlotField extends BaseField {
|
|
|
378
382
|
allow?: string[];
|
|
379
383
|
disallow?: string[];
|
|
380
384
|
}
|
|
381
|
-
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<ValueType extends {
|
|
385
|
+
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | CheckboxField | ArrayField<ValueType extends {
|
|
382
386
|
[key: string]: any;
|
|
383
387
|
}[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField;
|
|
384
388
|
type Fields<ComponentProps extends DefaultComponentProps = DefaultComponentProps, UserField extends {} = {}> = {
|
|
@@ -905,4 +909,4 @@ type PuckAction = {
|
|
|
905
909
|
recordHistory?: boolean;
|
|
906
910
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
907
911
|
|
|
908
|
-
export { type
|
|
912
|
+
export { type OnAction as $, type Adaptor as A, type BaseData as B, type CacheOpts as C, type Data as D, type DragAxis as E, type DropZoneProps as F, type ExternalField as G, type ExternalFieldWithAdaptor as H, type ExtractConfigParams as I, type ExtractField as J, type Field as K, type FieldMetadata as L, type FieldProps as M, type FieldRenderFunctions as N, type FieldTransformFn as O, type FieldTransformFnParams as P, type FieldTransforms as Q, type Fields as R, type History as S, type IframeConfig as T, type InitialHistory as U, type ItemSelector as V, type ItemWithId as W, type MappedItem as X, type Metadata as Y, type NumberField as Z, type ObjectField as _, type AppState as a, type OverrideKey as a0, type Overrides as a1, type Permissions as a2, type Plugin as a3, type PluginInternal as a4, type PrivateAppState as a5, type PuckAction as a6, type PuckComponent as a7, type PuckContext as a8, type PuckMetadata as a9, type RadioField as aa, type ResolveDataTrigger as ab, type RichText as ac, type RichtextField as ad, type RootConfig as ae, type RootData as af, type RootDataWithProps as ag, type RootDataWithoutProps as ah, type SelectField as ai, type Slot as aj, type SlotComponent as ak, type SlotField as al, type TextField as am, type TextareaField as an, type UiState as ao, type UserGenerics as ap, type Viewport as aq, type Viewports as ar, type WithChildren as as, type WithDefaultRootFieldProps as at, type WithId as au, type WithPuckProps as av, type WithSlotProps as aw, overrideKeys as ax, type ArrayField as b, type ArrayState as c, type AsFieldProps as d, type BaseField as e, type CheckboxField as f, type ComponentConfig as g, type ComponentConfigExtensions as h, type ComponentConfigParams as i, type ComponentData as j, type ComponentDataMap as k, type ComponentDataOptionalId as l, type ComponentMetadata as m, type Config as n, type ConfigParams as o, type Content as p, type CustomField as q, type CustomFieldRender as r, type DefaultComponentProps as s, type DefaultComponents as t, type DefaultRootFieldProps as u, type DefaultRootProps as v, type DefaultRootRenderProps as w, type Direction as x, type DndBehavior as y, type DndConfig as z };
|
|
@@ -53,7 +53,7 @@ type NonForwardableProps = {
|
|
|
53
53
|
/**
|
|
54
54
|
* Keys internally consumed by Puck and never forwarded to `as`.
|
|
55
55
|
*/
|
|
56
|
-
type ConsumedPropKey = keyof DropZoneOwnProps | "as" | "content" | "config" | "metadata";
|
|
56
|
+
type ConsumedPropKey = keyof DropZoneOwnProps | "as" | "content" | "config" | "metadata" | "fieldTransforms";
|
|
57
57
|
/**
|
|
58
58
|
* Additional props forwarded to the element or component provided via `as`,
|
|
59
59
|
* typed against it.
|
|
@@ -272,6 +272,10 @@ interface RadioField extends BaseField {
|
|
|
272
272
|
type: "radio";
|
|
273
273
|
options: FieldOptions;
|
|
274
274
|
}
|
|
275
|
+
interface CheckboxField extends BaseField {
|
|
276
|
+
type: "checkbox";
|
|
277
|
+
options: FieldOptions;
|
|
278
|
+
}
|
|
275
279
|
interface RichtextField<UserSelector extends RichTextSelector = RichTextSelector> extends BaseField {
|
|
276
280
|
type: "richtext";
|
|
277
281
|
contentEditable?: boolean;
|
|
@@ -378,7 +382,7 @@ interface SlotField extends BaseField {
|
|
|
378
382
|
allow?: string[];
|
|
379
383
|
disallow?: string[];
|
|
380
384
|
}
|
|
381
|
-
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | ArrayField<ValueType extends {
|
|
385
|
+
type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | CheckboxField | ArrayField<ValueType extends {
|
|
382
386
|
[key: string]: any;
|
|
383
387
|
}[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField;
|
|
384
388
|
type Fields<ComponentProps extends DefaultComponentProps = DefaultComponentProps, UserField extends {} = {}> = {
|
|
@@ -905,4 +909,4 @@ type PuckAction = {
|
|
|
905
909
|
recordHistory?: boolean;
|
|
906
910
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
907
911
|
|
|
908
|
-
export { type
|
|
912
|
+
export { type OnAction as $, type Adaptor as A, type BaseData as B, type CacheOpts as C, type Data as D, type DragAxis as E, type DropZoneProps as F, type ExternalField as G, type ExternalFieldWithAdaptor as H, type ExtractConfigParams as I, type ExtractField as J, type Field as K, type FieldMetadata as L, type FieldProps as M, type FieldRenderFunctions as N, type FieldTransformFn as O, type FieldTransformFnParams as P, type FieldTransforms as Q, type Fields as R, type History as S, type IframeConfig as T, type InitialHistory as U, type ItemSelector as V, type ItemWithId as W, type MappedItem as X, type Metadata as Y, type NumberField as Z, type ObjectField as _, type AppState as a, type OverrideKey as a0, type Overrides as a1, type Permissions as a2, type Plugin as a3, type PluginInternal as a4, type PrivateAppState as a5, type PuckAction as a6, type PuckComponent as a7, type PuckContext as a8, type PuckMetadata as a9, type RadioField as aa, type ResolveDataTrigger as ab, type RichText as ac, type RichtextField as ad, type RootConfig as ae, type RootData as af, type RootDataWithProps as ag, type RootDataWithoutProps as ah, type SelectField as ai, type Slot as aj, type SlotComponent as ak, type SlotField as al, type TextField as am, type TextareaField as an, type UiState as ao, type UserGenerics as ap, type Viewport as aq, type Viewports as ar, type WithChildren as as, type WithDefaultRootFieldProps as at, type WithId as au, type WithPuckProps as av, type WithSlotProps as aw, overrideKeys as ax, type ArrayField as b, type ArrayState as c, type AsFieldProps as d, type BaseField as e, type CheckboxField as f, type ComponentConfig as g, type ComponentConfigExtensions as h, type ComponentConfigParams as i, type ComponentData as j, type ComponentDataMap as k, type ComponentDataOptionalId as l, type ComponentMetadata as m, type Config as n, type ConfigParams as o, type Content as p, type CustomField as q, type CustomFieldRender as r, type DefaultComponentProps as s, type DefaultComponents as t, type DefaultRootFieldProps as u, type DefaultRootProps as v, type DefaultRootRenderProps as w, type Direction as x, type DndBehavior as y, type DndConfig as z };
|
|
@@ -437,6 +437,15 @@ var Link = createLucideIcon("Link", [
|
|
|
437
437
|
["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
|
|
438
438
|
]);
|
|
439
439
|
|
|
440
|
+
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.6/node_modules/lucide-react/dist/esm/icons/list-check.js
|
|
441
|
+
init_react_import();
|
|
442
|
+
var ListCheck = createLucideIcon("ListCheck", [
|
|
443
|
+
["path", { d: "M11 18H3", key: "n3j2dh" }],
|
|
444
|
+
["path", { d: "m15 18 2 2 4-4", key: "1szwhi" }],
|
|
445
|
+
["path", { d: "M16 12H3", key: "1a2rj7" }],
|
|
446
|
+
["path", { d: "M16 6H3", key: "1wxfjs" }]
|
|
447
|
+
]);
|
|
448
|
+
|
|
440
449
|
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.6/node_modules/lucide-react/dist/esm/icons/list-ordered.js
|
|
441
450
|
init_react_import();
|
|
442
451
|
var ListOrdered = createLucideIcon("ListOrdered", [
|
|
@@ -2032,6 +2041,7 @@ export {
|
|
|
2032
2041
|
Layers,
|
|
2033
2042
|
LayoutGrid,
|
|
2034
2043
|
Link,
|
|
2044
|
+
ListCheck,
|
|
2035
2045
|
ListOrdered,
|
|
2036
2046
|
List,
|
|
2037
2047
|
LockOpen,
|
|
@@ -2068,6 +2078,7 @@ export {
|
|
|
2068
2078
|
useRegisterHistorySlice,
|
|
2069
2079
|
useRegisterPermissionsSlice,
|
|
2070
2080
|
useRegisterFieldsSlice,
|
|
2081
|
+
toRoot,
|
|
2071
2082
|
createAppStore,
|
|
2072
2083
|
appStoreContext,
|
|
2073
2084
|
useAppStore,
|
|
@@ -2117,6 +2128,7 @@ lucide-react/dist/esm/icons/italic.js:
|
|
|
2117
2128
|
lucide-react/dist/esm/icons/layers.js:
|
|
2118
2129
|
lucide-react/dist/esm/icons/layout-grid.js:
|
|
2119
2130
|
lucide-react/dist/esm/icons/link.js:
|
|
2131
|
+
lucide-react/dist/esm/icons/list-check.js:
|
|
2120
2132
|
lucide-react/dist/esm/icons/list-ordered.js:
|
|
2121
2133
|
lucide-react/dist/esm/icons/lock-open.js:
|
|
2122
2134
|
lucide-react/dist/esm/icons/lock.js:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAlignOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AVZ47Q6I.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useHeadingOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EAAIN3F7.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useListOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WEHOKKUT.mjs";
|
|
10
10
|
import {
|
|
11
11
|
Action,
|
|
12
12
|
AlignCenter,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
Underline,
|
|
30
30
|
useControlContext,
|
|
31
31
|
useMessage
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-CAEACQ3G.mjs";
|
|
33
33
|
import {
|
|
34
34
|
get_class_name_factory_default
|
|
35
35
|
} from "./chunk-OT7NKYY4.mjs";
|
|
@@ -204,7 +204,7 @@ function AlignSelectFallback() {
|
|
|
204
204
|
// components/RichTextMenu/controls/AlignSelect/index.tsx
|
|
205
205
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
206
206
|
var AlignSelectLoaded = lazy(
|
|
207
|
-
() => import("./loaded-
|
|
207
|
+
() => import("./loaded-MGQ2LS57.mjs").then((m) => ({
|
|
208
208
|
default: m.AlignSelectLoaded
|
|
209
209
|
}))
|
|
210
210
|
);
|
|
@@ -445,7 +445,7 @@ function HeadingSelectFallback() {
|
|
|
445
445
|
// components/RichTextMenu/controls/HeadingSelect/index.tsx
|
|
446
446
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
447
447
|
var HeadingSelectLoaded = lazy2(
|
|
448
|
-
() => import("./loaded-
|
|
448
|
+
() => import("./loaded-II5A5RFH.mjs").then((m) => ({
|
|
449
449
|
default: m.HeadingSelectLoaded
|
|
450
450
|
}))
|
|
451
451
|
);
|
|
@@ -477,7 +477,7 @@ function ListSelectFallback() {
|
|
|
477
477
|
// components/RichTextMenu/controls/ListSelect/index.tsx
|
|
478
478
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
479
479
|
var ListSelectLoaded = lazy3(
|
|
480
|
-
() => import("./loaded-
|
|
480
|
+
() => import("./loaded-BIKODANT.mjs").then((m) => ({
|
|
481
481
|
default: m.ListSelectLoaded
|
|
482
482
|
}))
|
|
483
483
|
);
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-H635BA2V.mjs";
|
|
4
4
|
import {
|
|
5
5
|
LoadedRichTextMenuInner
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GVMWPICP.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useAppStore,
|
|
9
9
|
useAppStoreApi
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CAEACQ3G.mjs";
|
|
11
11
|
import {
|
|
12
12
|
get_class_name_factory_default
|
|
13
13
|
} from "./chunk-OT7NKYY4.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-WPLMFLUO.mjs").then((m) => ({
|
|
104
104
|
default: m.LoadedRichTextMenuFull
|
|
105
105
|
}))
|
|
106
106
|
);
|
|
@@ -281,7 +281,8 @@ var CONSUMED_PROP_KEYS = {
|
|
|
281
281
|
as: true,
|
|
282
282
|
content: true,
|
|
283
283
|
config: true,
|
|
284
|
-
metadata: true
|
|
284
|
+
metadata: true,
|
|
285
|
+
fieldTransforms: true
|
|
285
286
|
};
|
|
286
287
|
var NON_FORWARDABLE_PROP_KEYS = {
|
|
287
288
|
children: true,
|
|
@@ -378,13 +379,13 @@ function useFieldTransforms(config, item, transforms, readOnly, forceReadOnly) {
|
|
|
378
379
|
}
|
|
379
380
|
|
|
380
381
|
// lib/use-slots.tsx
|
|
381
|
-
function useSlots(config, item,
|
|
382
|
+
function useSlots(config, item, renderSlot, fieldTransforms) {
|
|
382
383
|
return useFieldTransforms(
|
|
383
384
|
config,
|
|
384
385
|
item,
|
|
385
|
-
getSlotTransform(
|
|
386
|
-
|
|
387
|
-
|
|
386
|
+
__spreadValues(__spreadValues({}, getSlotTransform(renderSlot)), fieldTransforms),
|
|
387
|
+
void 0,
|
|
388
|
+
true
|
|
388
389
|
);
|
|
389
390
|
}
|
|
390
391
|
|
|
@@ -431,11 +432,14 @@ var RichTextRender = lazy(
|
|
|
431
432
|
default: m.RichTextRender
|
|
432
433
|
}))
|
|
433
434
|
);
|
|
434
|
-
function useRichtextProps(fields, props) {
|
|
435
|
+
function useRichtextProps(fields, props, fieldTransforms) {
|
|
435
436
|
const findAllRichtextKeys = (fields2, path = []) => {
|
|
436
437
|
if (!fields2) return [];
|
|
437
438
|
const result = [];
|
|
438
439
|
for (const [key, field] of Object.entries(fields2)) {
|
|
440
|
+
if (fieldTransforms == null ? void 0 : fieldTransforms[field.type]) {
|
|
441
|
+
continue;
|
|
442
|
+
}
|
|
439
443
|
const currentPath = [...path, key];
|
|
440
444
|
if (field.type === "richtext") {
|
|
441
445
|
result.push({
|
|
@@ -452,7 +456,10 @@ function useRichtextProps(fields, props) {
|
|
|
452
456
|
}
|
|
453
457
|
return result;
|
|
454
458
|
};
|
|
455
|
-
const richtextKeys = useMemo2(
|
|
459
|
+
const richtextKeys = useMemo2(
|
|
460
|
+
() => findAllRichtextKeys(fields),
|
|
461
|
+
[fields, fieldTransforms]
|
|
462
|
+
);
|
|
456
463
|
const richtextProps = useMemo2(() => {
|
|
457
464
|
if (!(richtextKeys == null ? void 0 : richtextKeys.length)) return {};
|
|
458
465
|
let result = __spreadValues({}, props);
|
|
@@ -479,11 +486,28 @@ var SlotRenderPure = (props) => /* @__PURE__ */ jsx3(SlotRender, __spreadValues(
|
|
|
479
486
|
var Item = ({
|
|
480
487
|
config,
|
|
481
488
|
item,
|
|
482
|
-
metadata
|
|
489
|
+
metadata,
|
|
490
|
+
fieldTransforms
|
|
483
491
|
}) => {
|
|
484
492
|
const Component = config.components[item.type];
|
|
485
|
-
const props = useSlots(
|
|
486
|
-
|
|
493
|
+
const props = useSlots(
|
|
494
|
+
config,
|
|
495
|
+
item,
|
|
496
|
+
(slotProps) => /* @__PURE__ */ jsx3(
|
|
497
|
+
SlotRenderPure,
|
|
498
|
+
__spreadProps(__spreadValues({}, slotProps), {
|
|
499
|
+
config,
|
|
500
|
+
metadata,
|
|
501
|
+
fieldTransforms
|
|
502
|
+
})
|
|
503
|
+
),
|
|
504
|
+
fieldTransforms
|
|
505
|
+
);
|
|
506
|
+
const richtextProps = useRichtextProps(
|
|
507
|
+
Component.fields,
|
|
508
|
+
props,
|
|
509
|
+
fieldTransforms
|
|
510
|
+
);
|
|
487
511
|
return /* @__PURE__ */ jsx3(
|
|
488
512
|
Component.render,
|
|
489
513
|
__spreadProps(__spreadValues(__spreadValues({}, props), richtextProps), {
|
|
@@ -496,7 +520,15 @@ var Item = ({
|
|
|
496
520
|
var SlotRender = forwardRef(
|
|
497
521
|
function SlotRenderInternal(allProps, ref) {
|
|
498
522
|
const {
|
|
499
|
-
props: {
|
|
523
|
+
props: {
|
|
524
|
+
className,
|
|
525
|
+
style,
|
|
526
|
+
content,
|
|
527
|
+
config,
|
|
528
|
+
metadata,
|
|
529
|
+
as,
|
|
530
|
+
fieldTransforms
|
|
531
|
+
},
|
|
500
532
|
forwardableProps
|
|
501
533
|
} = getDropZoneProps(allProps);
|
|
502
534
|
const El = as != null ? as : "div";
|
|
@@ -509,7 +541,8 @@ var SlotRender = forwardRef(
|
|
|
509
541
|
{
|
|
510
542
|
config,
|
|
511
543
|
item,
|
|
512
|
-
metadata
|
|
544
|
+
metadata,
|
|
545
|
+
fieldTransforms
|
|
513
546
|
},
|
|
514
547
|
item.props.id
|
|
515
548
|
);
|