@puckeditor/core 0.23.0 → 0.24.0-canary.34794e5d
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-44C53YAG.mjs → Editor-7HVJABBS.mjs} +6 -6
- package/dist/{actions-DA1J5F56.d.mts → actions-DzP_zhsF.d.mts} +65 -18
- package/dist/{actions-DA1J5F56.d.ts → actions-DzP_zhsF.d.ts} +65 -18
- package/dist/{chunk-NJTGWYYH.mjs → chunk-75VT4L37.mjs} +1 -1
- package/dist/{chunk-55V3NZVF.mjs → chunk-A3M7OOIH.mjs} +98 -51
- package/dist/{chunk-YQWFSBOU.mjs → chunk-DWQZNG26.mjs} +58 -3
- package/dist/{chunk-GNR2HNTB.mjs → chunk-FHGOTDB5.mjs} +7 -7
- package/dist/{chunk-WF6I3XOL.mjs → chunk-FVMO3IOJ.mjs} +3 -3
- package/dist/{chunk-4P4VZS4P.mjs → chunk-L24AF7CT.mjs} +1 -1
- package/dist/{chunk-K2LNXU54.mjs → chunk-OOTCJDR3.mjs} +16 -0
- package/dist/{chunk-67Y7M4OJ.mjs → chunk-YBKRDXOL.mjs} +1 -1
- package/dist/{full-7ZJV44EE.mjs → full-35XZI7ZG.mjs} +5 -5
- package/dist/{index-DIZKfHDN.d.ts → index-Cv-eVWCd.d.ts} +1 -1
- package/dist/{index-n9eR_SWx.d.mts → index-poi3aTIz.d.mts} +1 -1
- package/dist/index.css +4 -3
- package/dist/index.d.mts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +169 -51
- package/dist/index.mjs +8 -8
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/{loaded-SMPR6KZF.mjs → loaded-2NYAMF3O.mjs} +2 -2
- package/dist/{loaded-JKA25A3T.mjs → loaded-ESP3PLMN.mjs} +2 -2
- package/dist/{loaded-36WRJPBT.mjs → loaded-RS7ITDTL.mjs} +2 -2
- package/dist/no-external.css +4 -3
- package/dist/no-external.d.mts +3 -3
- package/dist/no-external.d.ts +3 -3
- package/dist/no-external.js +169 -51
- package/dist/no-external.mjs +8 -8
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +57 -3
- package/dist/rsc.mjs +1 -1
- package/dist/{walk-tree-DbY5zG2K.d.ts → walk-tree-Bu3IHwm_.d.ts} +1 -1
- package/dist/{walk-tree-DHP1pWEM.d.mts → walk-tree-iWDqHBcM.d.mts} +1 -1
- package/package.json +1 -1
package/dist/rsc.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { m as Config, ao as UserGenerics, X as Metadata } from './actions-
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { m as Config, ao as UserGenerics, X as Metadata } from './actions-DzP_zhsF.mjs';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-iWDqHBcM.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 { m as Config, ao as UserGenerics, X as Metadata } from './actions-
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { m as Config, ao as UserGenerics, X as Metadata } from './actions-DzP_zhsF.js';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Bu3IHwm_.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tiptap/react';
|
|
6
6
|
import '@tiptap/extension-blockquote';
|
package/dist/rsc.js
CHANGED
|
@@ -713,6 +713,56 @@ function useRichtextProps(fields, props) {
|
|
|
713
713
|
return richtextProps;
|
|
714
714
|
}
|
|
715
715
|
|
|
716
|
+
// lib/props/shared/get-drop-zone-props.ts
|
|
717
|
+
init_react_import();
|
|
718
|
+
var CONSUMED_PROP_KEYS = {
|
|
719
|
+
zone: true,
|
|
720
|
+
allow: true,
|
|
721
|
+
disallow: true,
|
|
722
|
+
style: true,
|
|
723
|
+
minEmptyHeight: true,
|
|
724
|
+
className: true,
|
|
725
|
+
collisionAxis: true,
|
|
726
|
+
ref: true,
|
|
727
|
+
as: true,
|
|
728
|
+
content: true,
|
|
729
|
+
config: true,
|
|
730
|
+
metadata: true
|
|
731
|
+
};
|
|
732
|
+
var NON_FORWARDABLE_PROP_KEYS = {
|
|
733
|
+
children: true,
|
|
734
|
+
dangerouslySetInnerHTML: true
|
|
735
|
+
};
|
|
736
|
+
var CONSUMED_KEY_SET = new Set(
|
|
737
|
+
Object.keys(CONSUMED_PROP_KEYS)
|
|
738
|
+
);
|
|
739
|
+
var NON_FORWARDABLE_KEY_SET = new Set(
|
|
740
|
+
Object.keys(NON_FORWARDABLE_PROP_KEYS)
|
|
741
|
+
);
|
|
742
|
+
var getDropZoneProps = (allProps) => {
|
|
743
|
+
const props = /* @__PURE__ */ Object.create(null);
|
|
744
|
+
const forwardableProps = /* @__PURE__ */ Object.create(null);
|
|
745
|
+
const nonForwardableProps = /* @__PURE__ */ Object.create(null);
|
|
746
|
+
for (const key of Object.keys(allProps)) {
|
|
747
|
+
if (NON_FORWARDABLE_KEY_SET.has(key)) {
|
|
748
|
+
console.warn(
|
|
749
|
+
"The following prop is not supported by Puck DropZones or slots and will not be forwarded to the `as` element:",
|
|
750
|
+
key
|
|
751
|
+
);
|
|
752
|
+
nonForwardableProps[key] = allProps[key];
|
|
753
|
+
} else if (CONSUMED_KEY_SET.has(key)) {
|
|
754
|
+
props[key] = allProps[key];
|
|
755
|
+
} else {
|
|
756
|
+
forwardableProps[key] = allProps[key];
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
return {
|
|
760
|
+
props,
|
|
761
|
+
forwardableProps,
|
|
762
|
+
nonForwardableProps
|
|
763
|
+
};
|
|
764
|
+
};
|
|
765
|
+
|
|
716
766
|
// components/SlotRender/server.tsx
|
|
717
767
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
718
768
|
var SlotRenderPure = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SlotRender, __spreadValues({}, props));
|
|
@@ -734,9 +784,13 @@ var Item = ({
|
|
|
734
784
|
);
|
|
735
785
|
};
|
|
736
786
|
var SlotRender = (0, import_react5.forwardRef)(
|
|
737
|
-
function SlotRenderInternal(
|
|
787
|
+
function SlotRenderInternal(allProps, ref) {
|
|
788
|
+
const {
|
|
789
|
+
props: { className, style, content, config, metadata, as },
|
|
790
|
+
forwardableProps
|
|
791
|
+
} = getDropZoneProps(allProps);
|
|
738
792
|
const El = as != null ? as : "div";
|
|
739
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(El, { className, style, ref, children: content.map((item) => {
|
|
793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(El, __spreadProps(__spreadValues({}, forwardableProps), { className, style, ref, children: content.map((item) => {
|
|
740
794
|
if (!config.components[item.type]) {
|
|
741
795
|
return null;
|
|
742
796
|
}
|
|
@@ -749,7 +803,7 @@ var SlotRender = (0, import_react5.forwardRef)(
|
|
|
749
803
|
},
|
|
750
804
|
item.props.id
|
|
751
805
|
);
|
|
752
|
-
}) });
|
|
806
|
+
}) }));
|
|
753
807
|
}
|
|
754
808
|
);
|
|
755
809
|
|
package/dist/rsc.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as Config, D as Data, at as WithId, ao as UserGenerics, o as Content, i as ComponentData, s as DefaultComponents, r as DefaultComponentProps, t as DefaultRootFieldProps, X as Metadata, ae as RootData } from './actions-
|
|
1
|
+
import { m as Config, D as Data, at as WithId, ao as UserGenerics, o as Content, i as ComponentData, s as DefaultComponents, r as DefaultComponentProps, t as DefaultRootFieldProps, X as Metadata, ae as RootData } from './actions-DzP_zhsF.js';
|
|
2
2
|
|
|
3
3
|
type MigrationOptions<UserConfig extends Config> = {
|
|
4
4
|
migrateDynamicZonesForComponent?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as Config, D as Data, at as WithId, ao as UserGenerics, o as Content, i as ComponentData, s as DefaultComponents, r as DefaultComponentProps, t as DefaultRootFieldProps, X as Metadata, ae as RootData } from './actions-
|
|
1
|
+
import { m as Config, D as Data, at as WithId, ao as UserGenerics, o as Content, i as ComponentData, s as DefaultComponents, r as DefaultComponentProps, t as DefaultRootFieldProps, X as Metadata, ae as RootData } from './actions-DzP_zhsF.mjs';
|
|
2
2
|
|
|
3
3
|
type MigrationOptions<UserConfig extends Config> = {
|
|
4
4
|
migrateDynamicZonesForComponent?: {
|