@reacteditor/core 0.0.6 → 0.0.8

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 (40) hide show
  1. package/dist/{Editor-YNFB7B6Z.mjs → Editor-KXEVJBNG.mjs} +9 -9
  2. package/dist/{actions-CQmL3wwa.d.mts → actions-2L-1hQ7r.d.mts} +7 -2
  3. package/dist/{actions-CQmL3wwa.d.ts → actions-2L-1hQ7r.d.ts} +7 -2
  4. package/dist/{chunk-6LG4Q4HO.mjs → chunk-AD7BMXAA.mjs} +1 -1
  5. package/dist/{chunk-DB4R5IWG.mjs → chunk-AJWRDM22.mjs} +3 -3
  6. package/dist/{chunk-WGPCLAZR.mjs → chunk-FT6UFK7G.mjs} +1 -1
  7. package/dist/{chunk-VOLQMQPK.mjs → chunk-IIRJMJFU.mjs} +1 -1
  8. package/dist/{chunk-CRF2GWQA.mjs → chunk-LRFRIIKG.mjs} +6 -4
  9. package/dist/{chunk-UB2DES2O.mjs → chunk-M4JDRFYB.mjs} +8 -6
  10. package/dist/{chunk-Z6IIVDFY.mjs → chunk-OIFPBVSF.mjs} +1 -1
  11. package/dist/{chunk-HCFEY5Y7.mjs → chunk-R5DQGUQS.mjs} +949 -610
  12. package/dist/{chunk-275EJPEB.mjs → chunk-TI3KC54Y.mjs} +18 -18
  13. package/dist/{chunk-BRDUM7MJ.mjs → chunk-U7VW3V3W.mjs} +7 -7
  14. package/dist/{full-24FOTNTB.mjs → full-ZFZZ626B.mjs} +8 -8
  15. package/dist/{index-BOP2qNVA.d.mts → index-BNsSzMCj.d.ts} +2 -1
  16. package/dist/{index-_G46lHpL.d.ts → index-BXuSeNez.d.mts} +2 -1
  17. package/dist/index.css +99 -26
  18. package/dist/index.d.mts +36 -8
  19. package/dist/index.d.ts +36 -8
  20. package/dist/index.js +1448 -1097
  21. package/dist/index.mjs +14 -14
  22. package/dist/internal.d.mts +2 -2
  23. package/dist/internal.d.ts +2 -2
  24. package/dist/internal.js +7 -5
  25. package/dist/internal.mjs +2 -2
  26. package/dist/{loaded-BQVZGQG2.mjs → loaded-GLBLMTBL.mjs} +5 -5
  27. package/dist/{loaded-6IBSSOXD.mjs → loaded-O4QHGE26.mjs} +5 -5
  28. package/dist/{loaded-6NPDD7SF.mjs → loaded-R34BR6I5.mjs} +5 -5
  29. package/dist/no-external.css +99 -26
  30. package/dist/no-external.d.mts +4 -4
  31. package/dist/no-external.d.ts +4 -4
  32. package/dist/no-external.js +1448 -1097
  33. package/dist/no-external.mjs +14 -14
  34. package/dist/rsc.d.mts +2 -2
  35. package/dist/rsc.d.ts +2 -2
  36. package/dist/rsc.mjs +3 -3
  37. package/dist/{walk-tree-Dwv3c_9M.d.mts → walk-tree-4C3ODO3X.d.mts} +1 -1
  38. package/dist/{walk-tree-DxSkPLnl.d.ts → walk-tree-C9GrSWsR.d.ts} +1 -1
  39. package/package.json +1 -1
  40. package/dist/{chunk-GAUBBDIR.mjs → chunk-JIXMPJZA.mjs} +37 -37
@@ -3,7 +3,6 @@ import {
3
3
  Button,
4
4
  ComponentList,
5
5
  Drawer,
6
- DropZone,
7
6
  Editor,
8
7
  FieldLabel,
9
8
  Render,
@@ -18,14 +17,15 @@ import {
18
17
  renderContext,
19
18
  setDeep,
20
19
  useEditor,
21
- useGetEditor
22
- } from "./chunk-HCFEY5Y7.mjs";
23
- import "./chunk-DB4R5IWG.mjs";
20
+ useGetEditor,
21
+ usePropsContext
22
+ } from "./chunk-R5DQGUQS.mjs";
23
+ import "./chunk-AJWRDM22.mjs";
24
24
  import {
25
25
  migrate,
26
26
  resolveAllData,
27
27
  transformProps
28
- } from "./chunk-275EJPEB.mjs";
28
+ } from "./chunk-TI3KC54Y.mjs";
29
29
  import "./chunk-6QJ2HF4O.mjs";
30
30
  import {
31
31
  Action,
@@ -35,17 +35,17 @@ import {
35
35
  Label,
36
36
  RichTextMenu,
37
37
  Separator
38
- } from "./chunk-BRDUM7MJ.mjs";
39
- import "./chunk-Z6IIVDFY.mjs";
40
- import "./chunk-6LG4Q4HO.mjs";
41
- import "./chunk-WGPCLAZR.mjs";
42
- import "./chunk-CRF2GWQA.mjs";
43
- import "./chunk-UB2DES2O.mjs";
44
- import "./chunk-VOLQMQPK.mjs";
38
+ } from "./chunk-U7VW3V3W.mjs";
39
+ import "./chunk-OIFPBVSF.mjs";
40
+ import "./chunk-AD7BMXAA.mjs";
41
+ import "./chunk-FT6UFK7G.mjs";
42
+ import "./chunk-LRFRIIKG.mjs";
43
+ import "./chunk-M4JDRFYB.mjs";
44
+ import "./chunk-IIRJMJFU.mjs";
45
45
  import "./chunk-Y2EFNT5P.mjs";
46
46
  import {
47
47
  walkTree
48
- } from "./chunk-GAUBBDIR.mjs";
48
+ } from "./chunk-JIXMPJZA.mjs";
49
49
  import {
50
50
  init_react_import
51
51
  } from "./chunk-M6W7YEVX.mjs";
@@ -59,7 +59,6 @@ export {
59
59
  Button,
60
60
  ComponentList,
61
61
  Drawer,
62
- DropZone,
63
62
  Editor,
64
63
  FieldLabel,
65
64
  Group,
@@ -83,5 +82,6 @@ export {
83
82
  transformProps,
84
83
  useEditor,
85
84
  useGetEditor,
85
+ usePropsContext,
86
86
  walkTree
87
87
  };
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-CQmL3wwa.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Dwv3c_9M.mjs';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './actions-2L-1hQ7r.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-4C3ODO3X.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-CQmL3wwa.js';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DxSkPLnl.js';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './actions-2L-1hQ7r.js';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-C9GrSWsR.js';
4
4
  import 'react';
5
5
  import '@tiptap/react';
6
6
  import '@tiptap/extension-blockquote';
package/dist/rsc.mjs CHANGED
@@ -5,9 +5,9 @@ import {
5
5
  transformProps,
6
6
  useRichtextProps,
7
7
  useSlots
8
- } from "./chunk-275EJPEB.mjs";
8
+ } from "./chunk-TI3KC54Y.mjs";
9
9
  import "./chunk-6QJ2HF4O.mjs";
10
- import "./chunk-VOLQMQPK.mjs";
10
+ import "./chunk-IIRJMJFU.mjs";
11
11
  import "./chunk-Y2EFNT5P.mjs";
12
12
  import {
13
13
  rootAreaId,
@@ -15,7 +15,7 @@ import {
15
15
  rootZone,
16
16
  setupZone,
17
17
  walkTree
18
- } from "./chunk-GAUBBDIR.mjs";
18
+ } from "./chunk-JIXMPJZA.mjs";
19
19
  import {
20
20
  __spreadProps,
21
21
  __spreadValues,
@@ -1,4 +1,4 @@
1
- import { C as Config, D as Data, W as WithId, U as UserGenerics, a as Content, b as ComponentData, c as DefaultComponents, d as DefaultComponentProps, e as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-CQmL3wwa.mjs';
1
+ import { C as Config, D as Data, W as WithId, U as UserGenerics, a as Content, b as ComponentData, c as DefaultComponents, d as DefaultComponentProps, e as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-2L-1hQ7r.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, a as Content, b as ComponentData, c as DefaultComponents, d as DefaultComponentProps, e as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-CQmL3wwa.js';
1
+ import { C as Config, D as Data, W as WithId, U as UserGenerics, a as Content, b as ComponentData, c as DefaultComponents, d as DefaultComponentProps, e as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-2L-1hQ7r.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": "@reacteditor/core",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Rami Bitar <rami@frontend.co>",
6
6
  "repository": "frontend-inc/react-editor",
@@ -210,6 +210,43 @@ var rootAreaId = "root";
210
210
  var rootZone = "default-zone";
211
211
  var rootDroppableId = `${rootAreaId}:${rootZone}`;
212
212
 
213
+ // lib/data/to-component.ts
214
+ init_react_import();
215
+ var toComponent = (item) => {
216
+ return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
217
+ props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
218
+ type: "root"
219
+ });
220
+ };
221
+
222
+ // lib/data/walk-app-state.ts
223
+ init_react_import();
224
+
225
+ // lib/data/for-related-zones.ts
226
+ init_react_import();
227
+
228
+ // lib/get-zone-id.ts
229
+ init_react_import();
230
+ var getZoneId = (zoneCompound) => {
231
+ if (!zoneCompound) {
232
+ return [];
233
+ }
234
+ if (zoneCompound && zoneCompound.indexOf(":") > -1) {
235
+ return zoneCompound.split(":");
236
+ }
237
+ return [rootDroppableId, zoneCompound];
238
+ };
239
+
240
+ // lib/data/for-related-zones.ts
241
+ function forRelatedZones(item, data, cb, path = []) {
242
+ Object.entries(data.zones || {}).forEach(([zoneCompound, content]) => {
243
+ const [parentId] = getZoneId(zoneCompound);
244
+ if (parentId === item.props.id) {
245
+ cb(path, zoneCompound, content);
246
+ }
247
+ });
248
+ }
249
+
213
250
  // lib/data/flatten-node.ts
214
251
  init_react_import();
215
252
  import flat from "flat";
@@ -267,43 +304,6 @@ var expandNode = (node) => {
267
304
  });
268
305
  };
269
306
 
270
- // lib/data/to-component.ts
271
- init_react_import();
272
- var toComponent = (item) => {
273
- return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
274
- props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
275
- type: "root"
276
- });
277
- };
278
-
279
- // lib/data/walk-app-state.ts
280
- init_react_import();
281
-
282
- // lib/data/for-related-zones.ts
283
- init_react_import();
284
-
285
- // lib/get-zone-id.ts
286
- init_react_import();
287
- var getZoneId = (zoneCompound) => {
288
- if (!zoneCompound) {
289
- return [];
290
- }
291
- if (zoneCompound && zoneCompound.indexOf(":") > -1) {
292
- return zoneCompound.split(":");
293
- }
294
- return [rootDroppableId, zoneCompound];
295
- };
296
-
297
- // lib/data/for-related-zones.ts
298
- function forRelatedZones(item, data, cb, path = []) {
299
- Object.entries(data.zones || {}).forEach(([zoneCompound, content]) => {
300
- const [parentId] = getZoneId(zoneCompound);
301
- if (parentId === item.props.id) {
302
- cb(path, zoneCompound, content);
303
- }
304
- });
305
- }
306
-
307
307
  // lib/data/walk-app-state.ts
308
308
  function walkAppState(state, config, mapContent = (content) => content, mapNodeOrSkip = (item) => item) {
309
309
  var _a;