@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.
Files changed (33) hide show
  1. package/dist/{Editor-JHS34JLP.mjs → Editor-EPSED64A.mjs} +6 -6
  2. package/dist/{actions-BRYM0ifH.d.mts → actions-C3e2nJ9v.d.mts} +1 -1
  3. package/dist/{actions-BRYM0ifH.d.ts → actions-C3e2nJ9v.d.ts} +1 -1
  4. package/dist/{chunk-AFOEZCNE.mjs → chunk-22UJFAFA.mjs} +35 -37
  5. package/dist/{chunk-JGZBBNEW.mjs → chunk-BCL7VBTL.mjs} +1 -1
  6. package/dist/{chunk-46RDHJGL.mjs → chunk-G74MZKKD.mjs} +7 -7
  7. package/dist/{chunk-BSAENBPL.mjs → chunk-K23YHISE.mjs} +1 -1
  8. package/dist/{chunk-LBGOSTI5.mjs → chunk-PK2F2YZX.mjs} +1128 -633
  9. package/dist/{chunk-TVE6QYBR.mjs → chunk-U6THAD4G.mjs} +1 -1
  10. package/dist/{chunk-GYDP2UKB.mjs → chunk-WCC2G7U7.mjs} +3 -3
  11. package/dist/{full-ATSD2DNB.mjs → full-N67EAB2Q.mjs} +5 -5
  12. package/dist/{index-D_Idfrfb.d.ts → index-Cx46WIFC.d.ts} +9 -10
  13. package/dist/{index-BVLGipsj.d.mts → index-zHrchQGY.d.mts} +9 -10
  14. package/dist/index.d.mts +5 -4
  15. package/dist/index.d.ts +5 -4
  16. package/dist/index.js +1192 -717
  17. package/dist/index.mjs +7 -7
  18. package/dist/internal.d.mts +2 -2
  19. package/dist/internal.d.ts +2 -2
  20. package/dist/{loaded-BKAMJ2FS.mjs → loaded-F37CNCVG.mjs} +2 -2
  21. package/dist/{loaded-2765LE3N.mjs → loaded-H325ZSK5.mjs} +2 -2
  22. package/dist/{loaded-ANEJLSYJ.mjs → loaded-MIY725CK.mjs} +2 -2
  23. package/dist/no-external.d.mts +3 -3
  24. package/dist/no-external.d.ts +3 -3
  25. package/dist/no-external.js +1192 -717
  26. package/dist/no-external.mjs +7 -7
  27. package/dist/rsc.d.mts +2 -2
  28. package/dist/rsc.d.ts +2 -2
  29. package/dist/rsc.js +42 -24
  30. package/dist/rsc.mjs +42 -24
  31. package/dist/{walk-tree-C1Zdgx7d.d.mts → walk-tree-BJoNgZ0l.d.mts} +1 -1
  32. package/dist/{walk-tree-DQyC1GA7.d.ts → walk-tree-f8Yzs5o3.d.ts} +1 -1
  33. package/package.json +2 -1
@@ -17,8 +17,8 @@ import {
17
17
  setDeep,
18
18
  useGetPuck,
19
19
  usePuck
20
- } from "./chunk-LBGOSTI5.mjs";
21
- import "./chunk-GYDP2UKB.mjs";
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-46RDHJGL.mjs";
37
- import "./chunk-JGZBBNEW.mjs";
38
- import "./chunk-BSAENBPL.mjs";
39
- import "./chunk-TVE6QYBR.mjs";
40
- import "./chunk-AFOEZCNE.mjs";
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-BRYM0ifH.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-C1Zdgx7d.mjs';
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-BRYM0ifH.js';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DQyC1GA7.js';
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
- const Component = config.components[item.type];
776
- const props = __spreadProps(__spreadValues({}, item.props), {
777
- puck: {
778
- renderDropZone: ({ zone: zone2 }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
779
- DropZoneRender,
780
- {
781
- zone: zone2,
782
- data,
783
- areaId: item.props.id,
784
- config,
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
- const Component = config.components[item.type];
49
- const props = __spreadProps(__spreadValues({}, item.props), {
50
- puck: {
51
- renderDropZone: ({ zone: zone2 }) => /* @__PURE__ */ jsx(
52
- DropZoneRender,
53
- {
54
- zone: zone2,
55
- data,
56
- areaId: item.props.id,
57
- config,
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-BRYM0ifH.mjs';
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-BRYM0ifH.js';
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-canary.edc81920",
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",