@puckeditor/core 0.21.3 → 0.22.0-canary.08eaa6ba
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/README.md +1 -4
- package/dist/{Editor-MCVDFQH6.mjs → Editor-K6FPIMNH.mjs} +8 -8
- package/dist/{actions-C3e2nJ9v.d.mts → actions-Csn3gOP8.d.mts} +3 -1
- package/dist/{actions-C3e2nJ9v.d.ts → actions-Csn3gOP8.d.ts} +3 -1
- package/dist/{chunk-DPDJ67KA.mjs → chunk-4X2SLJRQ.mjs} +1 -1
- package/dist/{chunk-4HOGLOEA.mjs → chunk-6MO3E35Y.mjs} +5 -3
- package/dist/{chunk-X2ZFWNCU.mjs → chunk-CO6PRTVM.mjs} +12 -9
- package/dist/{chunk-6XCJ3Y7O.mjs → chunk-DVZWVU66.mjs} +55 -2
- package/dist/{chunk-TDQEUXB2.mjs → chunk-FE7T3PZI.mjs} +3 -3
- package/dist/{chunk-ZMTK7SMX.mjs → chunk-GFIZBMKN.mjs} +1 -1
- package/dist/{chunk-LODTL5KW.mjs → chunk-MQKADUDK.mjs} +1 -1
- package/dist/{chunk-YXFTA2VL.mjs → chunk-MYHXN3XX.mjs} +3131 -319
- package/dist/{chunk-HGJWUFLT.mjs → chunk-NWL4JLKR.mjs} +7 -7
- package/dist/{chunk-O7FT3KAM.mjs → chunk-OVPTKQ2P.mjs} +4 -3
- package/dist/{full-5QCBHXRC.mjs → full-L4ITHDQO.mjs} +7 -7
- package/dist/{index-Cx46WIFC.d.ts → index-B1b1cFug.d.ts} +1 -1
- package/dist/{index-zHrchQGY.d.mts → index-ClzBCbx_.d.mts} +1 -1
- package/dist/index.css +60 -54
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3206 -326
- package/dist/index.mjs +10 -10
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +48 -2
- package/dist/internal.mjs +1 -1
- package/dist/{loaded-Y4ZWZC55.mjs → loaded-2QS7VXZ6.mjs} +4 -4
- package/dist/{loaded-OMRIYZIQ.mjs → loaded-A7UUCT2O.mjs} +4 -4
- package/dist/{loaded-54625GTL.mjs → loaded-JHBS3QYA.mjs} +4 -4
- package/dist/no-external.css +60 -54
- package/dist/no-external.d.mts +3 -3
- package/dist/no-external.d.ts +3 -3
- package/dist/no-external.js +3206 -326
- package/dist/no-external.mjs +10 -10
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +16 -11
- package/dist/rsc.mjs +2 -2
- package/dist/{walk-tree-BJoNgZ0l.d.mts → walk-tree-BrW9VQ_t.d.mts} +1 -1
- package/dist/{walk-tree-f8Yzs5o3.d.ts → walk-tree-CWrsBHHe.d.ts} +1 -1
- package/package.json +13 -5
package/dist/no-external.mjs
CHANGED
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
setDeep,
|
|
18
18
|
useGetPuck,
|
|
19
19
|
usePuck
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-MYHXN3XX.mjs";
|
|
21
|
+
import "./chunk-FE7T3PZI.mjs";
|
|
22
22
|
import {
|
|
23
23
|
migrate,
|
|
24
24
|
resolveAllData,
|
|
25
25
|
transformProps
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-CO6PRTVM.mjs";
|
|
27
27
|
import "./chunk-AOEDIUVK.mjs";
|
|
28
28
|
import {
|
|
29
29
|
Action,
|
|
@@ -33,13 +33,13 @@ 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-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-NWL4JLKR.mjs";
|
|
37
|
+
import "./chunk-4X2SLJRQ.mjs";
|
|
38
|
+
import "./chunk-GFIZBMKN.mjs";
|
|
39
|
+
import "./chunk-MQKADUDK.mjs";
|
|
40
|
+
import "./chunk-OVPTKQ2P.mjs";
|
|
41
|
+
import "./chunk-DVZWVU66.mjs";
|
|
42
|
+
import "./chunk-6MO3E35Y.mjs";
|
|
43
43
|
import "./chunk-Y2EFNT5P.mjs";
|
|
44
44
|
import {
|
|
45
45
|
walkTree
|
package/dist/rsc.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { m as Config, am as UserGenerics, V as Metadata } from './actions-Csn3gOP8.mjs';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BrW9VQ_t.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 {
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { m as Config, am as UserGenerics, V as Metadata } from './actions-Csn3gOP8.js';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CWrsBHHe.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tiptap/react';
|
|
6
6
|
import '@tiptap/extension-blockquote';
|
package/dist/rsc.js
CHANGED
|
@@ -886,7 +886,7 @@ var getChanged = (newItem, oldItem) => {
|
|
|
886
886
|
// lib/resolve-component-data.ts
|
|
887
887
|
var import_fast_equals2 = require("fast-equals");
|
|
888
888
|
var cache = { lastChange: {} };
|
|
889
|
-
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null) {
|
|
889
|
+
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null, root = { props: {} }) {
|
|
890
890
|
const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
|
|
891
891
|
const resolvedItem = __spreadValues({}, item);
|
|
892
892
|
const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
|
|
@@ -913,7 +913,8 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
913
913
|
lastData: oldItem,
|
|
914
914
|
metadata: __spreadValues(__spreadValues({}, metadata), configForItem.metadata),
|
|
915
915
|
trigger,
|
|
916
|
-
parent
|
|
916
|
+
parent,
|
|
917
|
+
root
|
|
917
918
|
});
|
|
918
919
|
resolvedItem.props = __spreadValues(__spreadValues({}, item.props), resolvedProps);
|
|
919
920
|
if (Object.keys(readOnly).length) {
|
|
@@ -936,7 +937,8 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
936
937
|
onResolveStart,
|
|
937
938
|
onResolveEnd,
|
|
938
939
|
trigger,
|
|
939
|
-
itemAsComponentData
|
|
940
|
+
itemAsComponentData,
|
|
941
|
+
root
|
|
940
942
|
)).node;
|
|
941
943
|
})
|
|
942
944
|
)
|
|
@@ -1002,7 +1004,7 @@ function resolveAllData(_0, _1) {
|
|
|
1002
1004
|
const defaultedData = defaultData(data);
|
|
1003
1005
|
const zonesByComponent = groupZonesByComponent(defaultedData);
|
|
1004
1006
|
let resolvedZones = {};
|
|
1005
|
-
const resolveNode = (_node, parent) => __async(null, null, function* () {
|
|
1007
|
+
const resolveNode = (_node, parent, root) => __async(null, null, function* () {
|
|
1006
1008
|
const node = toComponent(_node);
|
|
1007
1009
|
onResolveStart == null ? void 0 : onResolveStart(node);
|
|
1008
1010
|
const resolved = (yield resolveComponentData(
|
|
@@ -1014,13 +1016,14 @@ function resolveAllData(_0, _1) {
|
|
|
1014
1016
|
() => {
|
|
1015
1017
|
},
|
|
1016
1018
|
"force",
|
|
1017
|
-
parent
|
|
1019
|
+
parent,
|
|
1020
|
+
root
|
|
1018
1021
|
)).node;
|
|
1019
1022
|
const resolvedAsComponent = toComponent(resolved);
|
|
1020
1023
|
const resolvedDeepPromise = mapFields(
|
|
1021
1024
|
resolved,
|
|
1022
1025
|
{
|
|
1023
|
-
slot: ({ value }) => processContent(value, resolvedAsComponent)
|
|
1026
|
+
slot: ({ value }) => processContent(value, resolvedAsComponent, root)
|
|
1024
1027
|
},
|
|
1025
1028
|
config
|
|
1026
1029
|
);
|
|
@@ -1030,7 +1033,8 @@ function resolveAllData(_0, _1) {
|
|
|
1030
1033
|
(_02) => __async(null, [_02], function* ({ zoneCompound, content }) {
|
|
1031
1034
|
resolvedZones[zoneCompound] = yield processContent(
|
|
1032
1035
|
content,
|
|
1033
|
-
resolvedAsComponent
|
|
1036
|
+
resolvedAsComponent,
|
|
1037
|
+
root
|
|
1034
1038
|
);
|
|
1035
1039
|
})
|
|
1036
1040
|
);
|
|
@@ -1040,14 +1044,15 @@ function resolveAllData(_0, _1) {
|
|
|
1040
1044
|
onResolveEnd == null ? void 0 : onResolveEnd(toComponent(resolvedDeep));
|
|
1041
1045
|
return resolvedDeep;
|
|
1042
1046
|
});
|
|
1043
|
-
const processContent = (content, parent) => __async(null, null, function* () {
|
|
1044
|
-
return Promise.all(content.map((item) => resolveNode(item, parent)));
|
|
1047
|
+
const processContent = (content, parent, root) => __async(null, null, function* () {
|
|
1048
|
+
return Promise.all(content.map((item) => resolveNode(item, parent, root)));
|
|
1045
1049
|
});
|
|
1046
1050
|
const result = defaultData({});
|
|
1047
|
-
result.root = yield resolveNode(defaultedData.root, null);
|
|
1051
|
+
result.root = yield resolveNode(defaultedData.root, null, defaultedData.root);
|
|
1048
1052
|
result.content = yield processContent(
|
|
1049
1053
|
defaultedData.content,
|
|
1050
|
-
toComponent(result.root)
|
|
1054
|
+
toComponent(result.root),
|
|
1055
|
+
result.root
|
|
1051
1056
|
);
|
|
1052
1057
|
result.zones = resolvedZones;
|
|
1053
1058
|
return result;
|
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-CO6PRTVM.mjs";
|
|
9
9
|
import "./chunk-AOEDIUVK.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-6MO3E35Y.mjs";
|
|
11
11
|
import "./chunk-Y2EFNT5P.mjs";
|
|
12
12
|
import {
|
|
13
13
|
rootAreaId,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as Config, D as Data, aq as WithId, am as UserGenerics, o as Content, i as ComponentData, s as DefaultComponents, r as DefaultComponentProps, t as DefaultRootFieldProps, V as Metadata, ac as RootData } from './actions-Csn3gOP8.mjs';
|
|
2
2
|
|
|
3
3
|
type MigrationOptions<UserConfig extends Config> = {
|
|
4
4
|
migrateDynamicZonesForComponent?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as Config, D as Data, aq as WithId, am as UserGenerics, o as Content, i as ComponentData, s as DefaultComponents, r as DefaultComponentProps, t as DefaultRootFieldProps, V as Metadata, ac as RootData } from './actions-Csn3gOP8.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.
|
|
3
|
+
"version": "0.22.0-canary.08eaa6ba",
|
|
4
4
|
"description": "The open-source visual editor for React",
|
|
5
5
|
"author": "Chris Villa <chris@puckeditor.com>",
|
|
6
6
|
"repository": "puckeditor/puck",
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
],
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@juggle/resize-observer": "^3.4.0",
|
|
78
|
+
"@testing-library/dom": "^10.4.0",
|
|
78
79
|
"@testing-library/jest-dom": "^6.6.3",
|
|
79
80
|
"@testing-library/react": "^16.1.0",
|
|
80
81
|
"@types/deep-diff": "^1.0.3",
|
|
@@ -85,21 +86,29 @@
|
|
|
85
86
|
"@types/react-dom": "^19.2.3",
|
|
86
87
|
"@types/uuid": "^10.0.0",
|
|
87
88
|
"css-box-model": "^1.2.1",
|
|
88
|
-
"
|
|
89
|
+
"esbuild": "^0.25.11",
|
|
90
|
+
"eslint": "^9.0.0",
|
|
89
91
|
"eslint-config-custom": "*",
|
|
90
92
|
"identity-obj-proxy": "^3.0.0",
|
|
91
93
|
"jest": "^29.7.0",
|
|
92
94
|
"jest-environment-jsdom": "^30.0.0-beta.3",
|
|
93
95
|
"lucide-react": "^0.468.0",
|
|
96
|
+
"postcss": "^8.5.6",
|
|
97
|
+
"postcss-modules": "^6.0.1",
|
|
94
98
|
"ts-jest": "^29.3.4",
|
|
99
|
+
"ts-node": "^10.9.2",
|
|
95
100
|
"tsconfig": "*",
|
|
96
101
|
"tsup": "^8.2.4",
|
|
97
102
|
"tsup-config": "*",
|
|
98
103
|
"typescript": "^5.5.4"
|
|
99
104
|
},
|
|
100
105
|
"dependencies": {
|
|
101
|
-
"@dnd-kit/
|
|
102
|
-
"@dnd-kit/
|
|
106
|
+
"@dnd-kit/abstract": "0.4.0",
|
|
107
|
+
"@dnd-kit/dom": "0.4.0",
|
|
108
|
+
"@dnd-kit/geometry": "0.4.0",
|
|
109
|
+
"@dnd-kit/helpers": "0.4.0",
|
|
110
|
+
"@dnd-kit/react": "0.4.0",
|
|
111
|
+
"@dnd-kit/state": "0.4.0",
|
|
103
112
|
"@radix-ui/react-popover": "^1.1.15",
|
|
104
113
|
"@tanstack/react-virtual": "^3.13.9",
|
|
105
114
|
"@tiptap/core": "^3.11.1",
|
|
@@ -129,7 +138,6 @@
|
|
|
129
138
|
"object-hash": "^3.0.0",
|
|
130
139
|
"react-hotkeys-hook": "^4.6.1",
|
|
131
140
|
"use-debounce": "^9.0.4",
|
|
132
|
-
"uuid": "^9.0.1",
|
|
133
141
|
"zustand": "^5.0.3"
|
|
134
142
|
},
|
|
135
143
|
"peerDependencies": {
|