@puckeditor/core 0.21.2-canary.edc81920 → 0.21.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.
- package/dist/{Editor-JHS34JLP.mjs → Editor-EPSED64A.mjs} +6 -6
- package/dist/{actions-BRYM0ifH.d.mts → actions-C3e2nJ9v.d.mts} +1 -1
- package/dist/{actions-BRYM0ifH.d.ts → actions-C3e2nJ9v.d.ts} +1 -1
- package/dist/{chunk-AFOEZCNE.mjs → chunk-22UJFAFA.mjs} +35 -37
- package/dist/{chunk-JGZBBNEW.mjs → chunk-BCL7VBTL.mjs} +1 -1
- package/dist/{chunk-46RDHJGL.mjs → chunk-G74MZKKD.mjs} +7 -7
- package/dist/{chunk-BSAENBPL.mjs → chunk-K23YHISE.mjs} +1 -1
- package/dist/{chunk-LBGOSTI5.mjs → chunk-PK2F2YZX.mjs} +1128 -633
- package/dist/{chunk-TVE6QYBR.mjs → chunk-U6THAD4G.mjs} +1 -1
- package/dist/{chunk-GYDP2UKB.mjs → chunk-WCC2G7U7.mjs} +3 -3
- package/dist/{full-ATSD2DNB.mjs → full-N67EAB2Q.mjs} +5 -5
- package/dist/{index-D_Idfrfb.d.ts → index-Cx46WIFC.d.ts} +9 -10
- package/dist/{index-BVLGipsj.d.mts → index-zHrchQGY.d.mts} +9 -10
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1192 -717
- package/dist/index.mjs +7 -7
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/{loaded-BKAMJ2FS.mjs → loaded-F37CNCVG.mjs} +2 -2
- package/dist/{loaded-2765LE3N.mjs → loaded-H325ZSK5.mjs} +2 -2
- package/dist/{loaded-ANEJLSYJ.mjs → loaded-MIY725CK.mjs} +2 -2
- package/dist/no-external.d.mts +3 -3
- package/dist/no-external.d.ts +3 -3
- package/dist/no-external.js +1192 -717
- package/dist/no-external.mjs +7 -7
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +42 -24
- package/dist/rsc.mjs +42 -24
- package/dist/{walk-tree-C1Zdgx7d.d.mts → walk-tree-BJoNgZ0l.d.mts} +1 -1
- package/dist/{walk-tree-DQyC1GA7.d.ts → walk-tree-f8Yzs5o3.d.ts} +1 -1
- package/package.json +2 -1
package/dist/no-external.mjs
CHANGED
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
setDeep,
|
|
18
18
|
useGetPuck,
|
|
19
19
|
usePuck
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-PK2F2YZX.mjs";
|
|
21
|
+
import "./chunk-WCC2G7U7.mjs";
|
|
22
22
|
import {
|
|
23
23
|
migrate,
|
|
24
24
|
resolveAllData,
|
|
@@ -33,11 +33,11 @@ import {
|
|
|
33
33
|
Label,
|
|
34
34
|
RichTextMenu,
|
|
35
35
|
Separator
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-G74MZKKD.mjs";
|
|
37
|
+
import "./chunk-BCL7VBTL.mjs";
|
|
38
|
+
import "./chunk-K23YHISE.mjs";
|
|
39
|
+
import "./chunk-U6THAD4G.mjs";
|
|
40
|
+
import "./chunk-22UJFAFA.mjs";
|
|
41
41
|
import "./chunk-YLLE6KXH.mjs";
|
|
42
42
|
import "./chunk-BOKX3EBR.mjs";
|
|
43
43
|
import "./chunk-Y2EFNT5P.mjs";
|
package/dist/rsc.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as Config, U as UserGenerics, M as Metadata } from './actions-
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './actions-C3e2nJ9v.mjs';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BJoNgZ0l.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tiptap/react';
|
|
6
6
|
import '@tiptap/extension-blockquote';
|
package/dist/rsc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as Config, U as UserGenerics, M as Metadata } from './actions-
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './actions-C3e2nJ9v.js';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-f8Yzs5o3.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tiptap/react';
|
|
6
6
|
import '@tiptap/extension-blockquote';
|
package/dist/rsc.js
CHANGED
|
@@ -755,6 +755,38 @@ var SlotRender = (0, import_react5.forwardRef)(
|
|
|
755
755
|
|
|
756
756
|
// components/ServerRender/index.tsx
|
|
757
757
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
758
|
+
function DropZoneRenderItem({
|
|
759
|
+
item,
|
|
760
|
+
data,
|
|
761
|
+
config,
|
|
762
|
+
metadata
|
|
763
|
+
}) {
|
|
764
|
+
const Component = config.components[item.type];
|
|
765
|
+
const props = __spreadProps(__spreadValues({}, item.props), {
|
|
766
|
+
puck: {
|
|
767
|
+
renderDropZone: ({ zone }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
768
|
+
DropZoneRender,
|
|
769
|
+
{
|
|
770
|
+
zone,
|
|
771
|
+
data,
|
|
772
|
+
areaId: item.props.id,
|
|
773
|
+
config,
|
|
774
|
+
metadata
|
|
775
|
+
}
|
|
776
|
+
),
|
|
777
|
+
metadata,
|
|
778
|
+
dragRef: null,
|
|
779
|
+
isEditing: false
|
|
780
|
+
}
|
|
781
|
+
});
|
|
782
|
+
const renderItem = __spreadProps(__spreadValues({}, item), { props });
|
|
783
|
+
const propsWithSlots = useSlots(config, renderItem, (slotProps) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SlotRenderPure, __spreadProps(__spreadValues({}, slotProps), { config, metadata })));
|
|
784
|
+
const richtextProps = useRichtextProps(Component == null ? void 0 : Component.fields, propsWithSlots);
|
|
785
|
+
if (!Component) {
|
|
786
|
+
return null;
|
|
787
|
+
}
|
|
788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Component.render, __spreadValues(__spreadValues({}, propsWithSlots), richtextProps));
|
|
789
|
+
}
|
|
758
790
|
function DropZoneRender({
|
|
759
791
|
zone,
|
|
760
792
|
data,
|
|
@@ -772,30 +804,16 @@ function DropZoneRender({
|
|
|
772
804
|
content = setupZone(data, zoneCompound).zones[zoneCompound];
|
|
773
805
|
}
|
|
774
806
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: content.map((item) => {
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
metadata
|
|
786
|
-
}
|
|
787
|
-
),
|
|
788
|
-
metadata,
|
|
789
|
-
dragRef: null,
|
|
790
|
-
isEditing: false
|
|
791
|
-
}
|
|
792
|
-
});
|
|
793
|
-
const renderItem = __spreadProps(__spreadValues({}, item), { props });
|
|
794
|
-
const propsWithSlots = useSlots(config, renderItem, (props2) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SlotRenderPure, __spreadProps(__spreadValues({}, props2), { config, metadata })));
|
|
795
|
-
if (Component) {
|
|
796
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Component.render, __spreadValues({}, propsWithSlots), renderItem.props.id);
|
|
797
|
-
}
|
|
798
|
-
return null;
|
|
807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
808
|
+
DropZoneRenderItem,
|
|
809
|
+
{
|
|
810
|
+
item,
|
|
811
|
+
data,
|
|
812
|
+
config,
|
|
813
|
+
metadata
|
|
814
|
+
},
|
|
815
|
+
item.props.id
|
|
816
|
+
);
|
|
799
817
|
}) });
|
|
800
818
|
}
|
|
801
819
|
function Render({
|
package/dist/rsc.mjs
CHANGED
|
@@ -28,6 +28,38 @@ init_react_import();
|
|
|
28
28
|
// components/ServerRender/index.tsx
|
|
29
29
|
init_react_import();
|
|
30
30
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
31
|
+
function DropZoneRenderItem({
|
|
32
|
+
item,
|
|
33
|
+
data,
|
|
34
|
+
config,
|
|
35
|
+
metadata
|
|
36
|
+
}) {
|
|
37
|
+
const Component = config.components[item.type];
|
|
38
|
+
const props = __spreadProps(__spreadValues({}, item.props), {
|
|
39
|
+
puck: {
|
|
40
|
+
renderDropZone: ({ zone }) => /* @__PURE__ */ jsx(
|
|
41
|
+
DropZoneRender,
|
|
42
|
+
{
|
|
43
|
+
zone,
|
|
44
|
+
data,
|
|
45
|
+
areaId: item.props.id,
|
|
46
|
+
config,
|
|
47
|
+
metadata
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
metadata,
|
|
51
|
+
dragRef: null,
|
|
52
|
+
isEditing: false
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const renderItem = __spreadProps(__spreadValues({}, item), { props });
|
|
56
|
+
const propsWithSlots = useSlots(config, renderItem, (slotProps) => /* @__PURE__ */ jsx(SlotRenderPure, __spreadProps(__spreadValues({}, slotProps), { config, metadata })));
|
|
57
|
+
const richtextProps = useRichtextProps(Component == null ? void 0 : Component.fields, propsWithSlots);
|
|
58
|
+
if (!Component) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return /* @__PURE__ */ jsx(Component.render, __spreadValues(__spreadValues({}, propsWithSlots), richtextProps));
|
|
62
|
+
}
|
|
31
63
|
function DropZoneRender({
|
|
32
64
|
zone,
|
|
33
65
|
data,
|
|
@@ -45,30 +77,16 @@ function DropZoneRender({
|
|
|
45
77
|
content = setupZone(data, zoneCompound).zones[zoneCompound];
|
|
46
78
|
}
|
|
47
79
|
return /* @__PURE__ */ jsx(Fragment, { children: content.map((item) => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
metadata
|
|
59
|
-
}
|
|
60
|
-
),
|
|
61
|
-
metadata,
|
|
62
|
-
dragRef: null,
|
|
63
|
-
isEditing: false
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
const renderItem = __spreadProps(__spreadValues({}, item), { props });
|
|
67
|
-
const propsWithSlots = useSlots(config, renderItem, (props2) => /* @__PURE__ */ jsx(SlotRenderPure, __spreadProps(__spreadValues({}, props2), { config, metadata })));
|
|
68
|
-
if (Component) {
|
|
69
|
-
return /* @__PURE__ */ jsx(Component.render, __spreadValues({}, propsWithSlots), renderItem.props.id);
|
|
70
|
-
}
|
|
71
|
-
return null;
|
|
80
|
+
return /* @__PURE__ */ jsx(
|
|
81
|
+
DropZoneRenderItem,
|
|
82
|
+
{
|
|
83
|
+
item,
|
|
84
|
+
data,
|
|
85
|
+
config,
|
|
86
|
+
metadata
|
|
87
|
+
},
|
|
88
|
+
item.props.id
|
|
89
|
+
);
|
|
72
90
|
}) });
|
|
73
91
|
}
|
|
74
92
|
function Render({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Config, D as Data, W as WithId, U as UserGenerics, b as Content, c as ComponentData, d as DefaultComponents, e as DefaultComponentProps, f as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-
|
|
1
|
+
import { C as Config, D as Data, W as WithId, U as UserGenerics, b as Content, c as ComponentData, d as DefaultComponents, e as DefaultComponentProps, f as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-C3e2nJ9v.mjs';
|
|
2
2
|
|
|
3
3
|
type MigrationOptions<UserConfig extends Config> = {
|
|
4
4
|
migrateDynamicZonesForComponent?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Config, D as Data, W as WithId, U as UserGenerics, b as Content, c as ComponentData, d as DefaultComponents, e as DefaultComponentProps, f as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-
|
|
1
|
+
import { C as Config, D as Data, W as WithId, U as UserGenerics, b as Content, c as ComponentData, d as DefaultComponents, e as DefaultComponentProps, f as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-C3e2nJ9v.js';
|
|
2
2
|
|
|
3
3
|
type MigrationOptions<UserConfig extends Config> = {
|
|
4
4
|
migrateDynamicZonesForComponent?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puckeditor/core",
|
|
3
|
-
"version": "0.21.2
|
|
3
|
+
"version": "0.21.2",
|
|
4
4
|
"description": "The open-source visual editor for React",
|
|
5
5
|
"author": "Chris Villa <chris@puckeditor.com>",
|
|
6
6
|
"repository": "puckeditor/puck",
|
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
"@dnd-kit/helpers": "0.1.18",
|
|
102
102
|
"@dnd-kit/react": "0.1.18",
|
|
103
103
|
"@radix-ui/react-popover": "^1.1.15",
|
|
104
|
+
"@tanstack/react-virtual": "^3.13.9",
|
|
104
105
|
"@tiptap/core": "^3.11.1",
|
|
105
106
|
"@tiptap/extension-blockquote": "^3.11.1",
|
|
106
107
|
"@tiptap/extension-bold": "^3.11.1",
|