@puckeditor/core 0.21.0-canary.08cd0aca

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 (52) hide show
  1. package/README.md +114 -0
  2. package/dist/Editor-IQP25PUX.css +404 -0
  3. package/dist/Editor-L7XD2QW3.mjs +204 -0
  4. package/dist/Render-3OV4N4MT.css +102 -0
  5. package/dist/Render-FXZX6NFH.mjs +55 -0
  6. package/dist/actions-BkBoKAc5.d.mts +838 -0
  7. package/dist/actions-BkBoKAc5.d.ts +838 -0
  8. package/dist/chunk-7TZD3NRP.mjs +450 -0
  9. package/dist/chunk-AHX7X7NZ.mjs +156 -0
  10. package/dist/chunk-AOEDIUVK.mjs +11 -0
  11. package/dist/chunk-GLWC4QRX.mjs +8074 -0
  12. package/dist/chunk-HLB66X4S.mjs +1813 -0
  13. package/dist/chunk-M6W7YEVX.mjs +95 -0
  14. package/dist/chunk-MNNPATDB.mjs +63 -0
  15. package/dist/chunk-QIJR53IK.mjs +528 -0
  16. package/dist/chunk-RYILZVCB.mjs +708 -0
  17. package/dist/chunk-UFXHMVJE.mjs +53 -0
  18. package/dist/chunk-V5I7CVLT.mjs +103 -0
  19. package/dist/chunk-WB2EIKOA.mjs +445 -0
  20. package/dist/chunk-Y2EFNT5P.mjs +108 -0
  21. package/dist/chunk-YBJ32VYI.mjs +33 -0
  22. package/dist/chunk-ZPR7EC3T.mjs +111 -0
  23. package/dist/full-2GJTAAZE.css +301 -0
  24. package/dist/full-4UGAOTTB.mjs +93 -0
  25. package/dist/index-bqD1SEOb.d.mts +118 -0
  26. package/dist/index-lt1zf5WR.d.ts +118 -0
  27. package/dist/index.css +2629 -0
  28. package/dist/index.d.mts +309 -0
  29. package/dist/index.d.ts +309 -0
  30. package/dist/index.js +14191 -0
  31. package/dist/index.mjs +78 -0
  32. package/dist/internal.d.mts +27 -0
  33. package/dist/internal.d.ts +27 -0
  34. package/dist/internal.js +926 -0
  35. package/dist/internal.mjs +13 -0
  36. package/dist/loaded-5AM4V5PV.mjs +57 -0
  37. package/dist/loaded-G2WSQZO7.mjs +57 -0
  38. package/dist/loaded-MYALJBRK.mjs +60 -0
  39. package/dist/loaded-RVWBFK7L.css +87 -0
  40. package/dist/no-external.css +2631 -0
  41. package/dist/no-external.d.mts +21 -0
  42. package/dist/no-external.d.ts +21 -0
  43. package/dist/no-external.js +14194 -0
  44. package/dist/no-external.mjs +83 -0
  45. package/dist/rsc.css +102 -0
  46. package/dist/rsc.d.mts +27 -0
  47. package/dist/rsc.d.ts +27 -0
  48. package/dist/rsc.js +1444 -0
  49. package/dist/rsc.mjs +130 -0
  50. package/dist/walk-tree-CRRDqx6_.d.mts +29 -0
  51. package/dist/walk-tree-CS7sEpfG.d.ts +29 -0
  52. package/package.json +137 -0
@@ -0,0 +1,450 @@
1
+ import {
2
+ __spreadProps,
3
+ __spreadValues,
4
+ init_react_import
5
+ } from "./chunk-M6W7YEVX.mjs";
6
+
7
+ // lib/data/walk-tree.ts
8
+ init_react_import();
9
+
10
+ // lib/data/map-fields.ts
11
+ init_react_import();
12
+
13
+ // lib/data/default-slots.ts
14
+ init_react_import();
15
+ var defaultSlots = (value, fields) => Object.keys(fields).reduce(
16
+ (acc, fieldName) => fields[fieldName].type === "slot" ? __spreadValues({ [fieldName]: [] }, acc) : acc,
17
+ value
18
+ );
19
+
20
+ // lib/data/map-fields.ts
21
+ var isPromise = (v) => !!v && typeof v.then === "function";
22
+ var flatten = (values) => values.reduce((acc, item) => __spreadValues(__spreadValues({}, acc), item), {});
23
+ var containsPromise = (arr) => arr.some(isPromise);
24
+ var walkField = ({
25
+ value,
26
+ fields,
27
+ mappers,
28
+ propKey = "",
29
+ propPath = "",
30
+ id = "",
31
+ config,
32
+ recurseSlots = false
33
+ }) => {
34
+ var _a, _b, _c;
35
+ const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
36
+ const map = mappers[fieldType];
37
+ if (map && fieldType === "slot") {
38
+ const content = value || [];
39
+ const mappedContent = recurseSlots ? content.map((el) => {
40
+ var _a2;
41
+ const componentConfig = config.components[el.type];
42
+ if (!componentConfig) {
43
+ throw new Error(`Could not find component config for ${el.type}`);
44
+ }
45
+ const fields2 = (_a2 = componentConfig.fields) != null ? _a2 : {};
46
+ return walkField({
47
+ value: __spreadProps(__spreadValues({}, el), { props: defaultSlots(el.props, fields2) }),
48
+ fields: fields2,
49
+ mappers,
50
+ id: el.props.id,
51
+ config,
52
+ recurseSlots
53
+ });
54
+ }) : content;
55
+ if (containsPromise(mappedContent)) {
56
+ return Promise.all(mappedContent);
57
+ }
58
+ return map({
59
+ value: mappedContent,
60
+ parentId: id,
61
+ propName: propPath,
62
+ field: fields[propKey],
63
+ propPath
64
+ });
65
+ } else if (map && fields[propKey]) {
66
+ return map({
67
+ value,
68
+ parentId: id,
69
+ propName: propKey,
70
+ field: fields[propKey],
71
+ propPath
72
+ });
73
+ }
74
+ if (value && typeof value === "object") {
75
+ if (Array.isArray(value)) {
76
+ const arrayFields = ((_b = fields[propKey]) == null ? void 0 : _b.type) === "array" ? fields[propKey].arrayFields : null;
77
+ if (!arrayFields) return value;
78
+ const newValue = value.map(
79
+ (el, idx) => walkField({
80
+ value: el,
81
+ fields: arrayFields,
82
+ mappers,
83
+ propKey,
84
+ propPath: `${propPath}[${idx}]`,
85
+ id,
86
+ config,
87
+ recurseSlots
88
+ })
89
+ );
90
+ if (containsPromise(newValue)) {
91
+ return Promise.all(newValue);
92
+ }
93
+ return newValue;
94
+ } else if ("$$typeof" in value) {
95
+ return value;
96
+ } else {
97
+ const objectFields = ((_c = fields[propKey]) == null ? void 0 : _c.type) === "object" ? fields[propKey].objectFields : fields;
98
+ return walkObject({
99
+ value,
100
+ fields: objectFields,
101
+ mappers,
102
+ id,
103
+ getPropPath: (k) => `${propPath}.${k}`,
104
+ config,
105
+ recurseSlots
106
+ });
107
+ }
108
+ }
109
+ return value;
110
+ };
111
+ var walkObject = ({
112
+ value,
113
+ fields,
114
+ mappers,
115
+ id,
116
+ getPropPath,
117
+ config,
118
+ recurseSlots
119
+ }) => {
120
+ const newProps = Object.entries(value).map(([k, v]) => {
121
+ const opts = {
122
+ value: v,
123
+ fields,
124
+ mappers,
125
+ propKey: k,
126
+ propPath: getPropPath(k),
127
+ id,
128
+ config,
129
+ recurseSlots
130
+ };
131
+ const newValue = walkField(opts);
132
+ if (isPromise(newValue)) {
133
+ return newValue.then((resolvedValue) => ({
134
+ [k]: resolvedValue
135
+ }));
136
+ }
137
+ return {
138
+ [k]: newValue
139
+ };
140
+ }, {});
141
+ if (containsPromise(newProps)) {
142
+ return Promise.all(newProps).then(flatten);
143
+ }
144
+ return flatten(newProps);
145
+ };
146
+ function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlots = true) {
147
+ var _a, _b, _c, _d, _e;
148
+ const itemType = "type" in item ? item.type : "root";
149
+ const componentConfig = itemType === "root" ? config.root : (_a = config.components) == null ? void 0 : _a[itemType];
150
+ const newProps = walkObject({
151
+ value: shouldDefaultSlots ? defaultSlots((_b = item.props) != null ? _b : {}, (_c = componentConfig == null ? void 0 : componentConfig.fields) != null ? _c : {}) : item.props,
152
+ fields: (_d = componentConfig == null ? void 0 : componentConfig.fields) != null ? _d : {},
153
+ mappers,
154
+ id: item.props ? (_e = item.props.id) != null ? _e : "root" : "root",
155
+ getPropPath: (k) => k,
156
+ config,
157
+ recurseSlots
158
+ });
159
+ if (isPromise(newProps)) {
160
+ return newProps.then((resolvedProps) => __spreadProps(__spreadValues({}, item), {
161
+ props: resolvedProps
162
+ }));
163
+ }
164
+ return __spreadProps(__spreadValues({}, item), {
165
+ props: newProps
166
+ });
167
+ }
168
+
169
+ // lib/data/walk-tree.ts
170
+ function walkTree(data, config, callbackFn) {
171
+ var _a, _b;
172
+ const walkItem = (item) => {
173
+ return mapFields(
174
+ item,
175
+ {
176
+ slot: ({ value, parentId, propName }) => {
177
+ var _a2;
178
+ const content = value;
179
+ return (_a2 = callbackFn(content, { parentId, propName })) != null ? _a2 : content;
180
+ }
181
+ },
182
+ config,
183
+ true
184
+ );
185
+ };
186
+ if ("props" in data) {
187
+ return walkItem(data);
188
+ }
189
+ const _data = data;
190
+ const zones = (_a = _data.zones) != null ? _a : {};
191
+ const mappedContent = _data.content.map(walkItem);
192
+ return {
193
+ root: walkItem(_data.root),
194
+ content: (_b = callbackFn(mappedContent, {
195
+ parentId: "root",
196
+ propName: "default-zone"
197
+ })) != null ? _b : mappedContent,
198
+ zones: Object.keys(zones).reduce(
199
+ (acc, zoneCompound) => __spreadProps(__spreadValues({}, acc), {
200
+ [zoneCompound]: zones[zoneCompound].map(walkItem)
201
+ }),
202
+ {}
203
+ )
204
+ };
205
+ }
206
+
207
+ // lib/root-droppable-id.ts
208
+ init_react_import();
209
+ var rootAreaId = "root";
210
+ var rootZone = "default-zone";
211
+ var rootDroppableId = `${rootAreaId}:${rootZone}`;
212
+
213
+ // lib/data/flatten-node.ts
214
+ init_react_import();
215
+ import flat from "flat";
216
+
217
+ // lib/data/strip-slots.ts
218
+ init_react_import();
219
+ var stripSlots = (data, config) => {
220
+ return mapFields(data, { slot: () => null }, config);
221
+ };
222
+
223
+ // lib/data/flatten-node.ts
224
+ var { flatten: flatten2, unflatten } = flat;
225
+ var isPureObject = (val) => val != null && Object.prototype.toString.call(val) === "[object Object]";
226
+ var emptyArrayStr = "__puck_[]";
227
+ var emptyObjectStr = "__puck_{}";
228
+ function encodeEmptyObjects(props = {}) {
229
+ const result = {};
230
+ for (const key in props) {
231
+ if (!Object.prototype.hasOwnProperty.call(props, key)) continue;
232
+ const val = props[key];
233
+ if (Array.isArray(val) && val.length === 0) {
234
+ result[key] = emptyArrayStr;
235
+ } else if (isPureObject(val) && Object.keys(val).length === 0) {
236
+ result[key] = emptyObjectStr;
237
+ } else {
238
+ result[key] = val;
239
+ }
240
+ }
241
+ return result;
242
+ }
243
+ function decodeEmptyObjects(props = {}) {
244
+ const result = {};
245
+ for (const key in props) {
246
+ if (!Object.prototype.hasOwnProperty.call(props, key)) continue;
247
+ const val = props[key];
248
+ if (val === emptyArrayStr) {
249
+ result[key] = [];
250
+ } else if (val === emptyObjectStr) {
251
+ result[key] = {};
252
+ } else {
253
+ result[key] = val;
254
+ }
255
+ }
256
+ return result;
257
+ }
258
+ var flattenNode = (node, config) => {
259
+ return __spreadProps(__spreadValues({}, node), {
260
+ props: encodeEmptyObjects(flatten2(stripSlots(node, config).props))
261
+ });
262
+ };
263
+ var expandNode = (node) => {
264
+ const props = unflatten(decodeEmptyObjects(node.props));
265
+ return __spreadProps(__spreadValues({}, node), {
266
+ props
267
+ });
268
+ };
269
+
270
+ // lib/data/walk-app-state.ts
271
+ init_react_import();
272
+
273
+ // lib/data/for-related-zones.ts
274
+ init_react_import();
275
+
276
+ // lib/get-zone-id.ts
277
+ init_react_import();
278
+ var getZoneId = (zoneCompound) => {
279
+ if (!zoneCompound) {
280
+ return [];
281
+ }
282
+ if (zoneCompound && zoneCompound.indexOf(":") > -1) {
283
+ return zoneCompound.split(":");
284
+ }
285
+ return [rootDroppableId, zoneCompound];
286
+ };
287
+
288
+ // lib/data/for-related-zones.ts
289
+ function forRelatedZones(item, data, cb, path = []) {
290
+ Object.entries(data.zones || {}).forEach(([zoneCompound, content]) => {
291
+ const [parentId] = getZoneId(zoneCompound);
292
+ if (parentId === item.props.id) {
293
+ cb(path, zoneCompound, content);
294
+ }
295
+ });
296
+ }
297
+
298
+ // lib/data/walk-app-state.ts
299
+ function walkAppState(state, config, mapContent = (content) => content, mapNodeOrSkip = (item) => item) {
300
+ var _a;
301
+ let newZones = {};
302
+ const newZoneIndex = {};
303
+ const newNodeIndex = {};
304
+ const processContent = (path, zoneCompound, content, zoneType, newId) => {
305
+ var _a2;
306
+ const [parentId] = zoneCompound.split(":");
307
+ const mappedContent = ((_a2 = mapContent(content, zoneCompound, zoneType)) != null ? _a2 : content) || [];
308
+ const [_2, zone] = zoneCompound.split(":");
309
+ const newZoneCompound = `${newId || parentId}:${zone}`;
310
+ const newContent2 = mappedContent.map(
311
+ (zoneChild, index) => processItem(zoneChild, [...path, newZoneCompound], index)
312
+ );
313
+ newZoneIndex[newZoneCompound] = {
314
+ contentIds: newContent2.map((item) => item.props.id),
315
+ type: zoneType
316
+ };
317
+ return [newZoneCompound, newContent2];
318
+ };
319
+ const processRelatedZones = (item, newId, initialPath) => {
320
+ forRelatedZones(
321
+ item,
322
+ state.data,
323
+ (relatedPath, relatedZoneCompound, relatedContent) => {
324
+ const [zoneCompound, newContent2] = processContent(
325
+ relatedPath,
326
+ relatedZoneCompound,
327
+ relatedContent,
328
+ "dropzone",
329
+ newId
330
+ );
331
+ newZones[zoneCompound] = newContent2;
332
+ },
333
+ initialPath
334
+ );
335
+ };
336
+ const processItem = (item, path, index) => {
337
+ const mappedItem = mapNodeOrSkip(item, path, index);
338
+ if (!mappedItem) return item;
339
+ const id = mappedItem.props.id;
340
+ const newProps = __spreadProps(__spreadValues({}, mapFields(
341
+ mappedItem,
342
+ {
343
+ slot: ({ value, parentId: parentId2, propPath }) => {
344
+ const content = value;
345
+ const zoneCompound = `${parentId2}:${propPath}`;
346
+ const [_2, newContent2] = processContent(
347
+ path,
348
+ zoneCompound,
349
+ content,
350
+ "slot",
351
+ parentId2
352
+ );
353
+ return newContent2;
354
+ }
355
+ },
356
+ config
357
+ ).props), {
358
+ id
359
+ });
360
+ processRelatedZones(item, id, path);
361
+ const newItem = __spreadProps(__spreadValues({}, item), { props: newProps });
362
+ const thisZoneCompound = path[path.length - 1];
363
+ const [parentId, zone] = thisZoneCompound ? thisZoneCompound.split(":") : [null, ""];
364
+ newNodeIndex[id] = {
365
+ data: newItem,
366
+ flatData: flattenNode(newItem, config),
367
+ path,
368
+ parentId,
369
+ zone
370
+ };
371
+ const finalData = __spreadProps(__spreadValues({}, newItem), { props: __spreadValues({}, newItem.props) });
372
+ if (newProps.id === "root") {
373
+ delete finalData["type"];
374
+ delete finalData.props["id"];
375
+ }
376
+ return finalData;
377
+ };
378
+ const zones = state.data.zones || {};
379
+ const [_, newContent] = processContent(
380
+ [],
381
+ rootDroppableId,
382
+ state.data.content,
383
+ "root"
384
+ );
385
+ const processedContent = newContent;
386
+ const zonesAlreadyProcessed = Object.keys(newZones);
387
+ Object.keys(zones || {}).forEach((zoneCompound) => {
388
+ const [parentId] = zoneCompound.split(":");
389
+ if (zonesAlreadyProcessed.includes(zoneCompound)) {
390
+ return;
391
+ }
392
+ const [_2, newContent2] = processContent(
393
+ [rootDroppableId],
394
+ zoneCompound,
395
+ zones[zoneCompound],
396
+ "dropzone",
397
+ parentId
398
+ );
399
+ newZones[zoneCompound] = newContent2;
400
+ }, newZones);
401
+ const processedRoot = processItem(
402
+ {
403
+ type: "root",
404
+ props: __spreadProps(__spreadValues({}, (_a = state.data.root.props) != null ? _a : state.data.root), { id: "root" })
405
+ },
406
+ [],
407
+ -1
408
+ );
409
+ const root = __spreadProps(__spreadValues({}, state.data.root), {
410
+ props: processedRoot.props
411
+ });
412
+ return __spreadProps(__spreadValues({}, state), {
413
+ data: {
414
+ root,
415
+ content: processedContent,
416
+ zones: __spreadValues(__spreadValues({}, state.data.zones), newZones)
417
+ },
418
+ indexes: {
419
+ nodes: __spreadValues(__spreadValues({}, state.indexes.nodes), newNodeIndex),
420
+ zones: __spreadValues(__spreadValues({}, state.indexes.zones), newZoneIndex)
421
+ }
422
+ });
423
+ }
424
+
425
+ // lib/data/setup-zone.ts
426
+ init_react_import();
427
+ var setupZone = (data, zoneKey) => {
428
+ if (zoneKey === rootDroppableId) {
429
+ return data;
430
+ }
431
+ const newData = __spreadProps(__spreadValues({}, data), {
432
+ zones: data.zones ? __spreadValues({}, data.zones) : {}
433
+ });
434
+ newData.zones[zoneKey] = newData.zones[zoneKey] || [];
435
+ return newData;
436
+ };
437
+
438
+ export {
439
+ rootAreaId,
440
+ rootZone,
441
+ rootDroppableId,
442
+ getZoneId,
443
+ defaultSlots,
444
+ walkField,
445
+ mapFields,
446
+ expandNode,
447
+ walkAppState,
448
+ walkTree,
449
+ setupZone
450
+ };
@@ -0,0 +1,156 @@
1
+ import {
2
+ mapFields
3
+ } from "./chunk-7TZD3NRP.mjs";
4
+ import {
5
+ __async,
6
+ __spreadProps,
7
+ __spreadValues,
8
+ init_react_import
9
+ } from "./chunk-M6W7YEVX.mjs";
10
+
11
+ // components/ViewportControls/default-viewports.ts
12
+ init_react_import();
13
+ var defaultViewports = [
14
+ { width: 360, height: "auto", icon: "Smartphone", label: "Small" },
15
+ { width: 768, height: "auto", icon: "Tablet", label: "Medium" },
16
+ { width: 1280, height: "auto", icon: "Monitor", label: "Large" },
17
+ { width: "100%", height: "auto", icon: "FullWidth", label: "Full-width" }
18
+ ];
19
+
20
+ // lib/data/to-component.ts
21
+ init_react_import();
22
+ var toComponent = (item) => {
23
+ return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
24
+ props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
25
+ type: "root"
26
+ });
27
+ };
28
+
29
+ // lib/resolve-component-data.ts
30
+ init_react_import();
31
+
32
+ // lib/get-changed.ts
33
+ init_react_import();
34
+ import { deepEqual } from "fast-equals";
35
+ var getChanged = (newItem, oldItem) => {
36
+ return newItem ? Object.keys(newItem.props || {}).reduce((acc, item) => {
37
+ const newItemProps = (newItem == null ? void 0 : newItem.props) || {};
38
+ const oldItemProps = (oldItem == null ? void 0 : oldItem.props) || {};
39
+ return __spreadProps(__spreadValues({}, acc), {
40
+ [item]: !deepEqual(oldItemProps[item], newItemProps[item])
41
+ });
42
+ }, {}) : {};
43
+ };
44
+
45
+ // lib/resolve-component-data.ts
46
+ import { deepEqual as deepEqual2 } from "fast-equals";
47
+ var cache = { lastChange: {} };
48
+ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null) {
49
+ const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
50
+ const resolvedItem = __spreadValues({}, item);
51
+ const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
52
+ const id = "id" in item.props ? item.props.id : "root";
53
+ if (shouldRunResolver) {
54
+ const {
55
+ item: oldItem = null,
56
+ resolved = {},
57
+ parentId: oldParentId = null
58
+ } = cache.lastChange[id] || {};
59
+ const isRootOrInserted = oldParentId === null;
60
+ const parentChanged = !isRootOrInserted && (parent == null ? void 0 : parent.props.id) !== oldParentId;
61
+ const dataChanged = item && !deepEqual2(item, oldItem);
62
+ const shouldSkip = trigger === "move" && !parentChanged || trigger !== "move" && trigger !== "force" && !dataChanged;
63
+ if (shouldSkip) {
64
+ return { node: resolved, didChange: false };
65
+ }
66
+ const changed = getChanged(item, oldItem);
67
+ if (onResolveStart) {
68
+ onResolveStart(item);
69
+ }
70
+ const { props: resolvedProps, readOnly = {} } = yield configForItem.resolveData(item, {
71
+ changed,
72
+ lastData: oldItem,
73
+ metadata: __spreadValues(__spreadValues({}, metadata), configForItem.metadata),
74
+ trigger,
75
+ parent
76
+ });
77
+ resolvedItem.props = __spreadValues(__spreadValues({}, item.props), resolvedProps);
78
+ if (Object.keys(readOnly).length) {
79
+ resolvedItem.readOnly = readOnly;
80
+ }
81
+ }
82
+ const itemAsComponentData = toComponent(resolvedItem);
83
+ let itemWithResolvedChildren = yield mapFields(
84
+ resolvedItem,
85
+ {
86
+ slot: (_02) => __async(null, [_02], function* ({ value }) {
87
+ const content = value;
88
+ return yield Promise.all(
89
+ content.map(
90
+ (childItem) => __async(null, null, function* () {
91
+ return (yield resolveComponentData(
92
+ childItem,
93
+ config,
94
+ metadata,
95
+ onResolveStart,
96
+ onResolveEnd,
97
+ trigger,
98
+ itemAsComponentData
99
+ )).node;
100
+ })
101
+ )
102
+ );
103
+ })
104
+ },
105
+ config
106
+ );
107
+ if (shouldRunResolver && onResolveEnd) {
108
+ onResolveEnd(resolvedItem);
109
+ }
110
+ cache.lastChange[id] = {
111
+ item,
112
+ resolved: itemWithResolvedChildren,
113
+ parentId: parent == null ? void 0 : parent.props.id
114
+ };
115
+ return {
116
+ node: itemWithResolvedChildren,
117
+ didChange: !deepEqual2(item, itemWithResolvedChildren)
118
+ };
119
+ });
120
+
121
+ // store/default-app-state.ts
122
+ init_react_import();
123
+ var defaultAppState = {
124
+ data: { content: [], root: {}, zones: {} },
125
+ ui: {
126
+ leftSideBarVisible: true,
127
+ rightSideBarVisible: true,
128
+ arrayState: {},
129
+ itemSelector: null,
130
+ componentList: {},
131
+ isDragging: false,
132
+ previewMode: "edit",
133
+ viewports: {
134
+ current: {
135
+ width: defaultViewports[0].width,
136
+ height: defaultViewports[0].height || "auto"
137
+ },
138
+ options: [],
139
+ controlsVisible: true
140
+ },
141
+ field: { focus: null },
142
+ plugin: { current: null }
143
+ },
144
+ indexes: {
145
+ nodes: {},
146
+ zones: {}
147
+ }
148
+ };
149
+
150
+ export {
151
+ defaultViewports,
152
+ getChanged,
153
+ toComponent,
154
+ resolveComponentData,
155
+ defaultAppState
156
+ };
@@ -0,0 +1,11 @@
1
+ import {
2
+ init_react_import
3
+ } from "./chunk-M6W7YEVX.mjs";
4
+
5
+ // css-module:/home/runner/work/puck/puck/packages/core/components/RichTextEditor/styles.module.css#css-module
6
+ init_react_import();
7
+ var styles_module_default = { "RichTextEditor": "_RichTextEditor_z25h4_1", "RichTextEditor--editor": "_RichTextEditor--editor_z25h4_50", "RichTextEditor--disabled": "_RichTextEditor--disabled_z25h4_107", "RichTextEditor--isActive": "_RichTextEditor--isActive_z25h4_111", "RichTextEditor-menu": "_RichTextEditor-menu_z25h4_117" };
8
+
9
+ export {
10
+ styles_module_default
11
+ };