@puckeditor/core 0.22.0-canary.e741fbb0 → 0.22.0-canary.ed7231bb

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 (42) hide show
  1. package/README.md +0 -3
  2. package/dist/{Editor-B4XBFE6T.mjs → Editor-KEM37W75.mjs} +9 -9
  3. package/dist/{actions-WBE4JXM_.d.mts → actions-BNVZoC77.d.mts} +2 -2
  4. package/dist/{actions-WBE4JXM_.d.ts → actions-BNVZoC77.d.ts} +2 -2
  5. package/dist/{chunk-LWA6664X.mjs → chunk-5K6QEDSO.mjs} +10 -15
  6. package/dist/{chunk-MODCHPUF.mjs → chunk-7HLEYXQ2.mjs} +3 -3
  7. package/dist/{chunk-IRT55QMB.mjs → chunk-C3DADWZ5.mjs} +1 -1
  8. package/dist/{chunk-FVCNE73M.mjs → chunk-GWROLTHW.mjs} +1 -1
  9. package/dist/{chunk-6MDV6FPH.mjs → chunk-H7CHELWC.mjs} +4 -8
  10. package/dist/{chunk-YLLE6KXH.mjs → chunk-IPJJYG5V.mjs} +60 -2
  11. package/dist/{chunk-LFUXRW6C.mjs → chunk-NOLIVOCU.mjs} +7 -7
  12. package/dist/{chunk-754HNMU2.mjs → chunk-QUQNXLVA.mjs} +0 -6
  13. package/dist/{chunk-Z6HTWEAL.mjs → chunk-U6VOPOM5.mjs} +3145 -330
  14. package/dist/{chunk-R27N4Y2L.mjs → chunk-YGQOG33Q.mjs} +1 -1
  15. package/dist/{chunk-TTQH6OMN.mjs → chunk-ZWCLCAIH.mjs} +5 -9
  16. package/dist/{full-JULOSDQK.mjs → full-5FICA5Q4.mjs} +8 -8
  17. package/dist/{index-rW_NN8GM.d.mts → index-CLl8T9T-.d.mts} +1 -1
  18. package/dist/{index-DH7q-bs9.d.ts → index-S3JYh45C.d.ts} +1 -1
  19. package/dist/index.css +65 -59
  20. package/dist/index.d.mts +4 -4
  21. package/dist/index.d.ts +4 -4
  22. package/dist/index.js +3212 -349
  23. package/dist/index.mjs +11 -11
  24. package/dist/internal.d.mts +2 -2
  25. package/dist/internal.d.ts +2 -2
  26. package/dist/internal.js +48 -2
  27. package/dist/internal.mjs +2 -2
  28. package/dist/{loaded-33PTDNED.mjs → loaded-35AVIWCK.mjs} +5 -5
  29. package/dist/{loaded-S64W25CI.mjs → loaded-NBCRQQKO.mjs} +5 -5
  30. package/dist/{loaded-ON3FMYL5.mjs → loaded-ZHVN4E25.mjs} +5 -5
  31. package/dist/no-external.css +65 -59
  32. package/dist/no-external.d.mts +3 -3
  33. package/dist/no-external.d.ts +3 -3
  34. package/dist/no-external.js +3212 -349
  35. package/dist/no-external.mjs +11 -11
  36. package/dist/rsc.d.mts +2 -2
  37. package/dist/rsc.d.ts +2 -2
  38. package/dist/rsc.js +11 -24
  39. package/dist/rsc.mjs +3 -3
  40. package/dist/{walk-tree-BAQ1Jdlh.d.mts → walk-tree-CvK-gJ1U.d.mts} +1 -1
  41. package/dist/{walk-tree-CagzlNEC.d.ts → walk-tree-YOk8UlkR.d.ts} +1 -1
  42. package/package.json +10 -5
package/README.md CHANGED
@@ -42,7 +42,6 @@ Render the editor:
42
42
  ```jsx
43
43
  // Editor.jsx
44
44
  import { Puck } from "@puckeditor/core";
45
- import "@puckeditor/core/puck.css";
46
45
 
47
46
  // Create Puck component config
48
47
  const config = {
@@ -77,7 +76,6 @@ Render the page:
77
76
  ```jsx
78
77
  // Page.jsx
79
78
  import { Render } from "@puckeditor/core";
80
- import "@puckeditor/core/puck.css";
81
79
 
82
80
  export function Page() {
83
81
  return <Render config={config} data={data} />;
@@ -95,7 +93,6 @@ npx create-puck-app my-app
95
93
  Available recipes include:
96
94
 
97
95
  - [**next**](https://github.com/puckeditor/puck/tree/main/recipes/next): Next.js example, using App Router and static page generation
98
- - [**remix**](https://github.com/puckeditor/puck/tree/main/recipes/remix): Remix Run v2 example, using dynamic routes at root-level
99
96
  - [**react-router**](https://github.com/puckeditor/puck/tree/main/recipes/react-router): React Router v7 app example, using dynamic routes to create pages at any level
100
97
 
101
98
  ## Community
@@ -4,20 +4,20 @@ import {
4
4
  import {
5
5
  EditorInner,
6
6
  LoadedRichTextMenu
7
- } from "./chunk-MODCHPUF.mjs";
7
+ } from "./chunk-7HLEYXQ2.mjs";
8
8
  import "./chunk-AOEDIUVK.mjs";
9
- import "./chunk-LFUXRW6C.mjs";
10
- import "./chunk-FVCNE73M.mjs";
11
- import "./chunk-IRT55QMB.mjs";
12
- import "./chunk-R27N4Y2L.mjs";
9
+ import "./chunk-NOLIVOCU.mjs";
10
+ import "./chunk-GWROLTHW.mjs";
11
+ import "./chunk-C3DADWZ5.mjs";
12
+ import "./chunk-YGQOG33Q.mjs";
13
13
  import {
14
14
  useAppStore,
15
15
  useAppStoreApi
16
- } from "./chunk-TTQH6OMN.mjs";
17
- import "./chunk-YLLE6KXH.mjs";
18
- import "./chunk-6MDV6FPH.mjs";
16
+ } from "./chunk-ZWCLCAIH.mjs";
17
+ import "./chunk-IPJJYG5V.mjs";
18
+ import "./chunk-H7CHELWC.mjs";
19
19
  import "./chunk-Y2EFNT5P.mjs";
20
- import "./chunk-754HNMU2.mjs";
20
+ import "./chunk-QUQNXLVA.mjs";
21
21
  import {
22
22
  __spreadProps,
23
23
  __spreadValues,
@@ -430,7 +430,6 @@ UserField extends BaseField = {}> = {
430
430
  metadata: ComponentMetadata;
431
431
  trigger: ResolveDataTrigger;
432
432
  parent: ComponentData | null;
433
- root: ComponentData | null;
434
433
  }) => Promise<WithPartialProps<DataShape, FieldProps>> | WithPartialProps<DataShape, FieldProps>;
435
434
  resolvePermissions?: (data: DataShape, params: {
436
435
  changed: Partial<Record<keyof FieldProps, boolean> & {
@@ -734,6 +733,7 @@ type Permissions = {
734
733
  type IframeConfig = {
735
734
  enabled?: boolean;
736
735
  waitForStyles?: boolean;
736
+ syncHostStyles?: boolean;
737
737
  };
738
738
  type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
739
739
  type Plugin<UserConfig extends Config = Config> = {
@@ -836,4 +836,4 @@ type PuckAction = {
836
836
  recordHistory?: boolean;
837
837
  } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
838
838
 
839
- export { type ExternalField as $, type AppState as A, type BaseData as B, type Config as C, type Data as D, type CacheOpts as E, type Fields as F, type ComponentConfigExtensions as G, type History as H, type IframeConfig as I, type ComponentConfigParams as J, type ComponentDataMap as K, type ComponentDataOptionalId as L, type Metadata as M, type ComponentMetadata as N, type OnAction as O, type PrivateAppState as P, type ConfigParams as Q, type RootData as R, type CustomField as S, type CustomFieldRender as T, type UserGenerics as U, type Viewports as V, type WithId as W, type DefaultRootProps as X, type DefaultRootRenderProps as Y, type Direction as Z, type DragAxis as _, type PuckAction as a, type ExternalFieldWithAdaptor as a0, type ExtractConfigParams as a1, type ExtractField as a2, type FieldMetadata as a3, type FieldRenderFunctions as a4, type FieldTransformFn as a5, type FieldTransformFnParams as a6, type ItemWithId as a7, type MappedItem as a8, type NumberField as a9, type ObjectField as aa, type OverrideKey as ab, type PuckComponent as ac, type PuckContext as ad, type PuckMetadata as ae, type RadioField as af, type RichText as ag, type RootConfig as ah, type RootDataWithoutProps as ai, type SelectField as aj, type Slot as ak, type SlotComponent as al, type SlotField as am, type TextField as an, type TextareaField as ao, type Viewport as ap, type WithChildren as aq, type WithPuckProps as ar, type WithSlotProps as as, overrideKeys as at, type Content as b, type ComponentData as c, type DefaultComponents as d, type DefaultComponentProps as e, type DefaultRootFieldProps as f, type Permissions as g, type RootDataWithProps as h, type ResolveDataTrigger as i, type Plugin as j, type Overrides as k, type UiState as l, type ComponentConfig as m, type FieldTransforms as n, type RichtextField as o, type Field as p, type FieldProps as q, type DropZoneProps as r, type InitialHistory as s, type ItemSelector as t, type PluginInternal as u, type Adaptor as v, type ArrayField as w, type ArrayState as x, type AsFieldProps as y, type BaseField as z };
839
+ export { type Permissions as $, type Adaptor as A, type BaseData as B, type CacheOpts as C, type Data as D, type ExternalField as E, type ExtractConfigParams as F, type ExtractField as G, type Field as H, type FieldMetadata as I, type FieldProps as J, type FieldRenderFunctions as K, type FieldTransformFn as L, type FieldTransformFnParams as M, type FieldTransforms as N, type Fields as O, type History as P, type IframeConfig as Q, type InitialHistory as R, type ItemSelector as S, type ItemWithId as T, type MappedItem as U, type Metadata as V, type NumberField as W, type ObjectField as X, type OnAction as Y, type OverrideKey as Z, type Overrides as _, type AppState as a, type Plugin as a0, type PluginInternal as a1, type PrivateAppState as a2, type PuckAction as a3, type PuckComponent as a4, type PuckContext as a5, type PuckMetadata as a6, type RadioField as a7, type ResolveDataTrigger as a8, type RichText as a9, type RichtextField as aa, type RootConfig as ab, type RootData as ac, type RootDataWithProps as ad, type RootDataWithoutProps as ae, type SelectField as af, type Slot as ag, type SlotComponent as ah, type SlotField as ai, type TextField as aj, type TextareaField as ak, type UiState as al, type UserGenerics as am, type Viewport as an, type Viewports as ao, type WithChildren as ap, type WithId as aq, type WithPuckProps as ar, type WithSlotProps as as, overrideKeys as at, type ArrayField as b, type ArrayState as c, type AsFieldProps as d, type BaseField as e, type ComponentConfig as f, type ComponentConfigExtensions as g, type ComponentConfigParams as h, type ComponentData as i, type ComponentDataMap as j, type ComponentDataOptionalId as k, type ComponentMetadata as l, type Config as m, type ConfigParams as n, type Content as o, type CustomField as p, type CustomFieldRender as q, type DefaultComponentProps as r, type DefaultComponents as s, type DefaultRootFieldProps as t, type DefaultRootProps as u, type DefaultRootRenderProps as v, type Direction as w, type DragAxis as x, type DropZoneProps as y, type ExternalFieldWithAdaptor as z };
@@ -430,7 +430,6 @@ UserField extends BaseField = {}> = {
430
430
  metadata: ComponentMetadata;
431
431
  trigger: ResolveDataTrigger;
432
432
  parent: ComponentData | null;
433
- root: ComponentData | null;
434
433
  }) => Promise<WithPartialProps<DataShape, FieldProps>> | WithPartialProps<DataShape, FieldProps>;
435
434
  resolvePermissions?: (data: DataShape, params: {
436
435
  changed: Partial<Record<keyof FieldProps, boolean> & {
@@ -734,6 +733,7 @@ type Permissions = {
734
733
  type IframeConfig = {
735
734
  enabled?: boolean;
736
735
  waitForStyles?: boolean;
736
+ syncHostStyles?: boolean;
737
737
  };
738
738
  type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
739
739
  type Plugin<UserConfig extends Config = Config> = {
@@ -836,4 +836,4 @@ type PuckAction = {
836
836
  recordHistory?: boolean;
837
837
  } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
838
838
 
839
- export { type ExternalField as $, type AppState as A, type BaseData as B, type Config as C, type Data as D, type CacheOpts as E, type Fields as F, type ComponentConfigExtensions as G, type History as H, type IframeConfig as I, type ComponentConfigParams as J, type ComponentDataMap as K, type ComponentDataOptionalId as L, type Metadata as M, type ComponentMetadata as N, type OnAction as O, type PrivateAppState as P, type ConfigParams as Q, type RootData as R, type CustomField as S, type CustomFieldRender as T, type UserGenerics as U, type Viewports as V, type WithId as W, type DefaultRootProps as X, type DefaultRootRenderProps as Y, type Direction as Z, type DragAxis as _, type PuckAction as a, type ExternalFieldWithAdaptor as a0, type ExtractConfigParams as a1, type ExtractField as a2, type FieldMetadata as a3, type FieldRenderFunctions as a4, type FieldTransformFn as a5, type FieldTransformFnParams as a6, type ItemWithId as a7, type MappedItem as a8, type NumberField as a9, type ObjectField as aa, type OverrideKey as ab, type PuckComponent as ac, type PuckContext as ad, type PuckMetadata as ae, type RadioField as af, type RichText as ag, type RootConfig as ah, type RootDataWithoutProps as ai, type SelectField as aj, type Slot as ak, type SlotComponent as al, type SlotField as am, type TextField as an, type TextareaField as ao, type Viewport as ap, type WithChildren as aq, type WithPuckProps as ar, type WithSlotProps as as, overrideKeys as at, type Content as b, type ComponentData as c, type DefaultComponents as d, type DefaultComponentProps as e, type DefaultRootFieldProps as f, type Permissions as g, type RootDataWithProps as h, type ResolveDataTrigger as i, type Plugin as j, type Overrides as k, type UiState as l, type ComponentConfig as m, type FieldTransforms as n, type RichtextField as o, type Field as p, type FieldProps as q, type DropZoneProps as r, type InitialHistory as s, type ItemSelector as t, type PluginInternal as u, type Adaptor as v, type ArrayField as w, type ArrayState as x, type AsFieldProps as y, type BaseField as z };
839
+ export { type Permissions as $, type Adaptor as A, type BaseData as B, type CacheOpts as C, type Data as D, type ExternalField as E, type ExtractConfigParams as F, type ExtractField as G, type Field as H, type FieldMetadata as I, type FieldProps as J, type FieldRenderFunctions as K, type FieldTransformFn as L, type FieldTransformFnParams as M, type FieldTransforms as N, type Fields as O, type History as P, type IframeConfig as Q, type InitialHistory as R, type ItemSelector as S, type ItemWithId as T, type MappedItem as U, type Metadata as V, type NumberField as W, type ObjectField as X, type OnAction as Y, type OverrideKey as Z, type Overrides as _, type AppState as a, type Plugin as a0, type PluginInternal as a1, type PrivateAppState as a2, type PuckAction as a3, type PuckComponent as a4, type PuckContext as a5, type PuckMetadata as a6, type RadioField as a7, type ResolveDataTrigger as a8, type RichText as a9, type RichtextField as aa, type RootConfig as ab, type RootData as ac, type RootDataWithProps as ad, type RootDataWithoutProps as ae, type SelectField as af, type Slot as ag, type SlotComponent as ah, type SlotField as ai, type TextField as aj, type TextareaField as ak, type UiState as al, type UserGenerics as am, type Viewport as an, type Viewports as ao, type WithChildren as ap, type WithId as aq, type WithPuckProps as ar, type WithSlotProps as as, overrideKeys as at, type ArrayField as b, type ArrayState as c, type AsFieldProps as d, type BaseField as e, type ComponentConfig as f, type ComponentConfigExtensions as g, type ComponentConfigParams as h, type ComponentData as i, type ComponentDataMap as j, type ComponentDataOptionalId as k, type ComponentMetadata as l, type Config as m, type ConfigParams as n, type Content as o, type CustomField as p, type CustomFieldRender as q, type DefaultComponentProps as r, type DefaultComponents as s, type DefaultRootFieldProps as t, type DefaultRootProps as u, type DefaultRootRenderProps as v, type Direction as w, type DragAxis as x, type DropZoneProps as y, type ExternalFieldWithAdaptor as z };
@@ -4,18 +4,17 @@ import {
4
4
  import {
5
5
  defaultAppState,
6
6
  resolveComponentData
7
- } from "./chunk-6MDV6FPH.mjs";
7
+ } from "./chunk-H7CHELWC.mjs";
8
8
  import {
9
9
  get_class_name_factory_default
10
10
  } from "./chunk-Y2EFNT5P.mjs";
11
11
  import {
12
- generateId,
13
12
  getZoneId,
14
13
  mapFields,
15
14
  toComponent,
16
15
  walkAppState,
17
16
  walkTree
18
- } from "./chunk-754HNMU2.mjs";
17
+ } from "./chunk-QUQNXLVA.mjs";
19
18
  import {
20
19
  __async,
21
20
  __objRest,
@@ -211,7 +210,7 @@ function resolveAllData(_0, _1) {
211
210
  const defaultedData = defaultData(data);
212
211
  const zonesByComponent = groupZonesByComponent(defaultedData);
213
212
  let resolvedZones = {};
214
- const resolveNode = (_node, parent, root) => __async(null, null, function* () {
213
+ const resolveNode = (_node, parent) => __async(null, null, function* () {
215
214
  const node = toComponent(_node);
216
215
  onResolveStart == null ? void 0 : onResolveStart(node);
217
216
  const resolved = (yield resolveComponentData(
@@ -223,15 +222,13 @@ function resolveAllData(_0, _1) {
223
222
  () => {
224
223
  },
225
224
  "force",
226
- parent,
227
- root
225
+ parent
228
226
  )).node;
229
227
  const resolvedAsComponent = toComponent(resolved);
230
- const rootForChildren = resolvedAsComponent.type === "root" ? resolvedAsComponent : root;
231
228
  const resolvedDeepPromise = mapFields(
232
229
  resolved,
233
230
  {
234
- slot: ({ value }) => processContent(value, resolvedAsComponent, rootForChildren)
231
+ slot: ({ value }) => processContent(value, resolvedAsComponent)
235
232
  },
236
233
  config
237
234
  );
@@ -241,8 +238,7 @@ function resolveAllData(_0, _1) {
241
238
  (_02) => __async(null, [_02], function* ({ zoneCompound, content }) {
242
239
  resolvedZones[zoneCompound] = yield processContent(
243
240
  content,
244
- resolvedAsComponent,
245
- rootForChildren
241
+ resolvedAsComponent
246
242
  );
247
243
  })
248
244
  );
@@ -252,14 +248,13 @@ function resolveAllData(_0, _1) {
252
248
  onResolveEnd == null ? void 0 : onResolveEnd(toComponent(resolvedDeep));
253
249
  return resolvedDeep;
254
250
  });
255
- const processContent = (content, parent, root) => __async(null, null, function* () {
256
- return Promise.all(content.map((item) => resolveNode(item, parent, root)));
251
+ const processContent = (content, parent) => __async(null, null, function* () {
252
+ return Promise.all(content.map((item) => resolveNode(item, parent)));
257
253
  });
258
254
  const result = defaultData({});
259
- result.root = yield resolveNode(defaultedData.root, null, null);
255
+ result.root = yield resolveNode(defaultedData.root, null);
260
256
  result.content = yield processContent(
261
257
  defaultedData.content,
262
- toComponent(result.root),
263
258
  toComponent(result.root)
264
259
  );
265
260
  result.zones = resolvedZones;
@@ -416,7 +411,7 @@ function useRichtextProps(fields, props) {
416
411
  fallback: /* @__PURE__ */ jsx2(RichTextRenderFallback, { content }),
417
412
  children: /* @__PURE__ */ jsx2(RichTextRender, { content, field })
418
413
  },
419
- generateId()
414
+ path.join(".")
420
415
  ));
421
416
  }
422
417
  return result;
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-AOEDIUVK.mjs";
4
4
  import {
5
5
  LoadedRichTextMenuInner
6
- } from "./chunk-LFUXRW6C.mjs";
6
+ } from "./chunk-NOLIVOCU.mjs";
7
7
  import {
8
8
  useAppStore,
9
9
  useAppStoreApi
10
- } from "./chunk-TTQH6OMN.mjs";
10
+ } from "./chunk-ZWCLCAIH.mjs";
11
11
  import {
12
12
  get_class_name_factory_default
13
13
  } from "./chunk-Y2EFNT5P.mjs";
@@ -100,7 +100,7 @@ init_react_import();
100
100
  import { lazy, Suspense } from "react";
101
101
  import { jsx as jsx2 } from "react/jsx-runtime";
102
102
  var LoadedRichTextMenuFull = lazy(
103
- () => import("./full-JULOSDQK.mjs").then((m) => ({
103
+ () => import("./full-5FICA5Q4.mjs").then((m) => ({
104
104
  default: m.LoadedRichTextMenuFull
105
105
  }))
106
106
  );
@@ -5,7 +5,7 @@ import {
5
5
  Heading4,
6
6
  Heading5,
7
7
  Heading6
8
- } from "./chunk-TTQH6OMN.mjs";
8
+ } from "./chunk-ZWCLCAIH.mjs";
9
9
  import {
10
10
  init_react_import
11
11
  } from "./chunk-M6W7YEVX.mjs";
@@ -3,7 +3,7 @@ import {
3
3
  AlignJustify,
4
4
  AlignLeft,
5
5
  AlignRight
6
- } from "./chunk-TTQH6OMN.mjs";
6
+ } from "./chunk-ZWCLCAIH.mjs";
7
7
  import {
8
8
  init_react_import
9
9
  } from "./chunk-M6W7YEVX.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  mapFields,
3
3
  toComponent
4
- } from "./chunk-754HNMU2.mjs";
4
+ } from "./chunk-QUQNXLVA.mjs";
5
5
  import {
6
6
  __async,
7
7
  __spreadProps,
@@ -37,12 +37,11 @@ var getChanged = (newItem, oldItem) => {
37
37
  // lib/resolve-component-data.ts
38
38
  import { deepEqual as deepEqual2 } from "fast-equals";
39
39
  var cache = { lastChange: {} };
40
- var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null, root = null) {
40
+ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null) {
41
41
  const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
42
42
  const resolvedItem = __spreadValues({}, item);
43
43
  const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
44
44
  const id = "id" in item.props ? item.props.id : "root";
45
- const rootForItem = root != null ? root : "type" in item && item.type === "root" ? toComponent(item) : null;
46
45
  if (shouldRunResolver) {
47
46
  const {
48
47
  item: oldItem = null,
@@ -65,8 +64,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
65
64
  lastData: oldItem,
66
65
  metadata: __spreadValues(__spreadValues({}, metadata), configForItem.metadata),
67
66
  trigger,
68
- parent,
69
- root: rootForItem
67
+ parent
70
68
  });
71
69
  resolvedItem.props = __spreadValues(__spreadValues({}, item.props), resolvedProps);
72
70
  if (Object.keys(readOnly).length) {
@@ -74,7 +72,6 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
74
72
  }
75
73
  }
76
74
  const itemAsComponentData = toComponent(resolvedItem);
77
- const rootForChildren = itemAsComponentData.type === "root" ? itemAsComponentData : rootForItem;
78
75
  let itemWithResolvedChildren = yield mapFields(
79
76
  resolvedItem,
80
77
  {
@@ -90,8 +87,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
90
87
  onResolveStart,
91
88
  onResolveEnd,
92
89
  trigger,
93
- itemAsComponentData,
94
- rootForChildren
90
+ itemAsComponentData
95
91
  )).node;
96
92
  })
97
93
  )
@@ -1,10 +1,9 @@
1
1
  import {
2
- generateId,
3
2
  rootDroppableId,
4
3
  setupZone,
5
4
  walkAppState,
6
5
  walkTree
7
- } from "./chunk-754HNMU2.mjs";
6
+ } from "./chunk-QUQNXLVA.mjs";
8
7
  import {
9
8
  __spreadProps,
10
9
  __spreadValues,
@@ -41,6 +40,64 @@ var insert = (list, index, item) => {
41
40
  return result;
42
41
  };
43
42
 
43
+ // lib/generate-id.ts
44
+ init_react_import();
45
+
46
+ // lib/uuid/index.ts
47
+ init_react_import();
48
+
49
+ // lib/uuid/rng.ts
50
+ init_react_import();
51
+ var rnds8 = new Uint8Array(16);
52
+ function rng() {
53
+ return crypto.getRandomValues(rnds8);
54
+ }
55
+
56
+ // lib/uuid/stringify.ts
57
+ init_react_import();
58
+ var byteToHex = [];
59
+ for (let i = 0; i < 256; ++i) {
60
+ byteToHex.push((i + 256).toString(16).slice(1));
61
+ }
62
+ function unsafeStringify(arr, offset = 0) {
63
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
64
+ }
65
+
66
+ // lib/uuid/index.ts
67
+ function v4(options, buf, offset) {
68
+ if (!buf && !options && crypto.randomUUID) {
69
+ return crypto.randomUUID();
70
+ }
71
+ return _v4(options, buf, offset);
72
+ }
73
+ function _v4(options, buf, offset) {
74
+ var _a, _b, _c;
75
+ options = options || {};
76
+ const rnds = (_c = (_b = options.random) != null ? _b : (_a = options.rng) == null ? void 0 : _a.call(options)) != null ? _c : rng();
77
+ if (rnds.length < 16) {
78
+ throw new Error("Random bytes length must be >= 16");
79
+ }
80
+ rnds[6] = rnds[6] & 15 | 64;
81
+ rnds[8] = rnds[8] & 63 | 128;
82
+ if (buf) {
83
+ offset = offset || 0;
84
+ if (offset < 0 || offset + 16 > buf.length) {
85
+ throw new RangeError(
86
+ `UUID byte range ${offset}:${offset + 15} is out of buffer bounds`
87
+ );
88
+ }
89
+ for (let i = 0; i < 16; ++i) {
90
+ buf[offset + i] = rnds[i];
91
+ }
92
+ return buf;
93
+ }
94
+ return unsafeStringify(rnds);
95
+ }
96
+ var uuid_default = v4;
97
+
98
+ // lib/generate-id.ts
99
+ var generateId = (type) => type ? `${type}-${uuid_default()}` : uuid_default();
100
+
44
101
  // lib/data/get-ids-for-parent.ts
45
102
  init_react_import();
46
103
  var getIdsForParent = (zoneCompound, state) => {
@@ -515,6 +572,7 @@ function createReducer({
515
572
 
516
573
  export {
517
574
  insert,
575
+ generateId,
518
576
  populateIds,
519
577
  insertAction,
520
578
  getItem,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useAlignOptions
3
- } from "./chunk-FVCNE73M.mjs";
3
+ } from "./chunk-GWROLTHW.mjs";
4
4
  import {
5
5
  useHeadingOptions
6
- } from "./chunk-IRT55QMB.mjs";
6
+ } from "./chunk-C3DADWZ5.mjs";
7
7
  import {
8
8
  useListOptions
9
- } from "./chunk-R27N4Y2L.mjs";
9
+ } from "./chunk-YGQOG33Q.mjs";
10
10
  import {
11
11
  AlignCenter,
12
12
  AlignJustify,
@@ -26,7 +26,7 @@ import {
26
26
  Strikethrough,
27
27
  Underline,
28
28
  useControlContext
29
- } from "./chunk-TTQH6OMN.mjs";
29
+ } from "./chunk-ZWCLCAIH.mjs";
30
30
  import {
31
31
  get_class_name_factory_default
32
32
  } from "./chunk-Y2EFNT5P.mjs";
@@ -349,7 +349,7 @@ function AlignSelectFallback() {
349
349
  // components/RichTextMenu/controls/AlignSelect/index.tsx
350
350
  import { jsx as jsx10 } from "react/jsx-runtime";
351
351
  var AlignSelectLoaded = lazy(
352
- () => import("./loaded-33PTDNED.mjs").then((m) => ({
352
+ () => import("./loaded-35AVIWCK.mjs").then((m) => ({
353
353
  default: m.AlignSelectLoaded
354
354
  }))
355
355
  );
@@ -580,7 +580,7 @@ function HeadingSelectFallback() {
580
580
  // components/RichTextMenu/controls/HeadingSelect/index.tsx
581
581
  import { jsx as jsx22 } from "react/jsx-runtime";
582
582
  var HeadingSelectLoaded = lazy2(
583
- () => import("./loaded-ON3FMYL5.mjs").then((m) => ({
583
+ () => import("./loaded-ZHVN4E25.mjs").then((m) => ({
584
584
  default: m.HeadingSelectLoaded
585
585
  }))
586
586
  );
@@ -612,7 +612,7 @@ function ListSelectFallback() {
612
612
  // components/RichTextMenu/controls/ListSelect/index.tsx
613
613
  import { jsx as jsx24 } from "react/jsx-runtime";
614
614
  var ListSelectLoaded = lazy3(
615
- () => import("./loaded-S64W25CI.mjs").then((m) => ({
615
+ () => import("./loaded-NBCRQQKO.mjs").then((m) => ({
616
616
  default: m.ListSelectLoaded
617
617
  }))
618
618
  );
@@ -428,11 +428,6 @@ function walkAppState(state, config, mapContent = (content) => content, mapNodeO
428
428
  });
429
429
  }
430
430
 
431
- // lib/generate-id.ts
432
- init_react_import();
433
- import { v4 as uuidv4 } from "uuid";
434
- var generateId = (type) => type ? `${type}-${uuidv4()}` : uuidv4();
435
-
436
431
  // lib/data/setup-zone.ts
437
432
  init_react_import();
438
433
  var setupZone = (data, zoneKey) => {
@@ -457,7 +452,6 @@ export {
457
452
  expandNode,
458
453
  toComponent,
459
454
  walkAppState,
460
- generateId,
461
455
  walkTree,
462
456
  setupZone
463
457
  };