@puckeditor/core 0.21.1 → 0.22.0-canary.1a6a10ed

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.
@@ -733,6 +733,7 @@ type Permissions = {
733
733
  type IframeConfig = {
734
734
  enabled?: boolean;
735
735
  waitForStyles?: boolean;
736
+ srcDoc?: string;
736
737
  };
737
738
  type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
738
739
  type Plugin<UserConfig extends Config = Config> = {
@@ -733,6 +733,7 @@ type Permissions = {
733
733
  type IframeConfig = {
734
734
  enabled?: boolean;
735
735
  waitForStyles?: boolean;
736
+ srcDoc?: string;
736
737
  };
737
738
  type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
738
739
  type Plugin<UserConfig extends Config = Config> = {
@@ -5670,7 +5670,6 @@ var CopyHostStyles = ({
5670
5670
  }
5671
5671
  };
5672
5672
  });
5673
- doc.head.innerHTML = "";
5674
5673
  doc.head.append(...filtered);
5675
5674
  observer.observe(parentDocument.head, { childList: true, subtree: true });
5676
5675
  filtered.forEach((el) => {
@@ -5706,12 +5705,16 @@ function AutoFrame(_a) {
5706
5705
  "onNotReady",
5707
5706
  "frameRef"
5708
5707
  ]);
5708
+ var _a2;
5709
5709
  const [loaded, setLoaded] = useState18(false);
5710
5710
  const [ctx, setCtx] = useState18({});
5711
5711
  const [mountTarget, setMountTarget] = useState18();
5712
5712
  const [stylesLoaded, setStylesLoaded] = useState18(false);
5713
+ const {
5714
+ srcDoc = '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry></div></body></html>'
5715
+ } = (_a2 = usePropsContext().iframe) != null ? _a2 : {};
5713
5716
  useEffect20(() => {
5714
- var _a2;
5717
+ var _a3;
5715
5718
  if (frameRef.current) {
5716
5719
  const doc = frameRef.current.contentDocument;
5717
5720
  const win = frameRef.current.contentWindow;
@@ -5720,7 +5723,7 @@ function AutoFrame(_a) {
5720
5723
  window: win || void 0
5721
5724
  });
5722
5725
  setMountTarget(
5723
- (_a2 = frameRef.current.contentDocument) == null ? void 0 : _a2.getElementById("frame-root")
5726
+ (_a3 = frameRef.current.contentDocument) == null ? void 0 : _a3.getElementById("frame-root")
5724
5727
  );
5725
5728
  if (doc && win && stylesLoaded) {
5726
5729
  onReady();
@@ -5734,7 +5737,7 @@ function AutoFrame(_a) {
5734
5737
  __spreadProps(__spreadValues({}, props), {
5735
5738
  className,
5736
5739
  id,
5737
- srcDoc: '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry></div></body></html>',
5740
+ srcDoc,
5738
5741
  ref: frameRef,
5739
5742
  onLoad: () => {
5740
5743
  setLoaded(true);
@@ -1,4 +1,4 @@
1
- import { H as History, g as Permissions, c as ComponentData, C as Config, U as UserGenerics, F as Fields, a as PuckAction, h as RootDataWithProps, i as ResolveDataTrigger, j as Plugin, k as Overrides, V as Viewports, I as IframeConfig, l as UiState, m as ComponentConfig, A as AppState, M as Metadata, n as FieldTransforms, o as RichtextField } from './actions-BkBoKAc5.js';
1
+ import { H as History, g as Permissions, c as ComponentData, C as Config, U as UserGenerics, F as Fields, a as PuckAction, h as RootDataWithProps, i as ResolveDataTrigger, j as Plugin, k as Overrides, V as Viewports, I as IframeConfig, l as UiState, m as ComponentConfig, A as AppState, M as Metadata, n as FieldTransforms, o as RichtextField } from './actions-BrxBrqKj.js';
2
2
  import { Editor } from '@tiptap/react';
3
3
 
4
4
  type HistorySlice<D = any> = {
@@ -1,4 +1,4 @@
1
- import { H as History, g as Permissions, c as ComponentData, C as Config, U as UserGenerics, F as Fields, a as PuckAction, h as RootDataWithProps, i as ResolveDataTrigger, j as Plugin, k as Overrides, V as Viewports, I as IframeConfig, l as UiState, m as ComponentConfig, A as AppState, M as Metadata, n as FieldTransforms, o as RichtextField } from './actions-BkBoKAc5.mjs';
1
+ import { H as History, g as Permissions, c as ComponentData, C as Config, U as UserGenerics, F as Fields, a as PuckAction, h as RootDataWithProps, i as ResolveDataTrigger, j as Plugin, k as Overrides, V as Viewports, I as IframeConfig, l as UiState, m as ComponentConfig, A as AppState, M as Metadata, n as FieldTransforms, o as RichtextField } from './actions-BrxBrqKj.mjs';
2
2
  import { Editor } from '@tiptap/react';
3
3
 
4
4
  type HistorySlice<D = any> = {
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
- import { p as Field, q as FieldProps, r as DropZoneProps, C as Config, U as UserGenerics, D as Data, l as UiState, O as OnAction, g as Permissions, j as Plugin, k as Overrides, n as FieldTransforms, a as PuckAction, V as Viewports, I as IframeConfig, s as InitialHistory, M as Metadata, i as ResolveDataTrigger, t as ItemSelector, c as ComponentData, u as PluginInternal } from './actions-BkBoKAc5.mjs';
2
- export { ag as Adaptor, A as AppState, ae as ArrayField, N as ArrayState, ar as AsFieldProps, a0 as BaseData, a8 as BaseField, ai as CacheOpts, m as ComponentConfig, X as ComponentConfigExtensions, $ as ComponentConfigParams, a4 as ComponentDataMap, a2 as ComponentDataOptionalId, a6 as ComponentMetadata, _ as ConfigParams, b as Content, al as CustomField, ak as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, ap as DefaultRootProps, ao as DefaultRootRenderProps, x as Direction, y as DragAxis, aj as ExternalField, ah as ExternalFieldWithAdaptor, Z as ExtractConfigParams, at as ExtractField, a7 as FieldMetadata, K as FieldRenderFunctions, E as FieldTransformFn, B as FieldTransformFnParams, F as Fields, H as History, L as ItemWithId, a3 as MappedItem, aa as NumberField, af as ObjectField, J as OverrideKey, T as PuckComponent, an as PuckContext, a5 as PuckMetadata, ad as RadioField, w as RichText, o as RichtextField, Y as RootConfig, R as RootData, h as RootDataWithProps, a1 as RootDataWithoutProps, ac as SelectField, S as Slot, Q as SlotComponent, am as SlotField, a9 as TextField, ab as TextareaField, z as Viewport, as as WithChildren, W as WithId, aq as WithPuckProps, v as WithSlotProps, G as overrideKeys } from './actions-BkBoKAc5.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CRRDqx6_.mjs';
1
+ import { p as Field, q as FieldProps, r as DropZoneProps, C as Config, U as UserGenerics, D as Data, l as UiState, O as OnAction, g as Permissions, j as Plugin, k as Overrides, n as FieldTransforms, a as PuckAction, V as Viewports, I as IframeConfig, s as InitialHistory, M as Metadata, i as ResolveDataTrigger, t as ItemSelector, c as ComponentData, u as PluginInternal } from './actions-BrxBrqKj.mjs';
2
+ export { ag as Adaptor, A as AppState, ae as ArrayField, N as ArrayState, ar as AsFieldProps, a0 as BaseData, a8 as BaseField, ai as CacheOpts, m as ComponentConfig, X as ComponentConfigExtensions, $ as ComponentConfigParams, a4 as ComponentDataMap, a2 as ComponentDataOptionalId, a6 as ComponentMetadata, _ as ConfigParams, b as Content, al as CustomField, ak as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, ap as DefaultRootProps, ao as DefaultRootRenderProps, x as Direction, y as DragAxis, aj as ExternalField, ah as ExternalFieldWithAdaptor, Z as ExtractConfigParams, at as ExtractField, a7 as FieldMetadata, K as FieldRenderFunctions, E as FieldTransformFn, B as FieldTransformFnParams, F as Fields, H as History, L as ItemWithId, a3 as MappedItem, aa as NumberField, af as ObjectField, J as OverrideKey, T as PuckComponent, an as PuckContext, a5 as PuckMetadata, ad as RadioField, w as RichText, o as RichtextField, Y as RootConfig, R as RootData, h as RootDataWithProps, a1 as RootDataWithoutProps, ac as SelectField, S as Slot, Q as SlotComponent, am as SlotField, a9 as TextField, ab as TextareaField, z as Viewport, as as WithChildren, W as WithId, aq as WithPuckProps, v as WithSlotProps, G as overrideKeys } from './actions-BrxBrqKj.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CQfHfM9_.mjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as react from 'react';
6
6
  import react__default, { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
7
- import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-bqD1SEOb.mjs';
7
+ import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-sczExwEC.mjs';
8
8
  import '@tiptap/react';
9
9
  import '@tiptap/extension-blockquote';
10
10
  import '@tiptap/extension-bold';
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { p as Field, q as FieldProps, r as DropZoneProps, C as Config, U as UserGenerics, D as Data, l as UiState, O as OnAction, g as Permissions, j as Plugin, k as Overrides, n as FieldTransforms, a as PuckAction, V as Viewports, I as IframeConfig, s as InitialHistory, M as Metadata, i as ResolveDataTrigger, t as ItemSelector, c as ComponentData, u as PluginInternal } from './actions-BkBoKAc5.js';
2
- export { ag as Adaptor, A as AppState, ae as ArrayField, N as ArrayState, ar as AsFieldProps, a0 as BaseData, a8 as BaseField, ai as CacheOpts, m as ComponentConfig, X as ComponentConfigExtensions, $ as ComponentConfigParams, a4 as ComponentDataMap, a2 as ComponentDataOptionalId, a6 as ComponentMetadata, _ as ConfigParams, b as Content, al as CustomField, ak as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, ap as DefaultRootProps, ao as DefaultRootRenderProps, x as Direction, y as DragAxis, aj as ExternalField, ah as ExternalFieldWithAdaptor, Z as ExtractConfigParams, at as ExtractField, a7 as FieldMetadata, K as FieldRenderFunctions, E as FieldTransformFn, B as FieldTransformFnParams, F as Fields, H as History, L as ItemWithId, a3 as MappedItem, aa as NumberField, af as ObjectField, J as OverrideKey, T as PuckComponent, an as PuckContext, a5 as PuckMetadata, ad as RadioField, w as RichText, o as RichtextField, Y as RootConfig, R as RootData, h as RootDataWithProps, a1 as RootDataWithoutProps, ac as SelectField, S as Slot, Q as SlotComponent, am as SlotField, a9 as TextField, ab as TextareaField, z as Viewport, as as WithChildren, W as WithId, aq as WithPuckProps, v as WithSlotProps, G as overrideKeys } from './actions-BkBoKAc5.js';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CS7sEpfG.js';
1
+ import { p as Field, q as FieldProps, r as DropZoneProps, C as Config, U as UserGenerics, D as Data, l as UiState, O as OnAction, g as Permissions, j as Plugin, k as Overrides, n as FieldTransforms, a as PuckAction, V as Viewports, I as IframeConfig, s as InitialHistory, M as Metadata, i as ResolveDataTrigger, t as ItemSelector, c as ComponentData, u as PluginInternal } from './actions-BrxBrqKj.js';
2
+ export { ag as Adaptor, A as AppState, ae as ArrayField, N as ArrayState, ar as AsFieldProps, a0 as BaseData, a8 as BaseField, ai as CacheOpts, m as ComponentConfig, X as ComponentConfigExtensions, $ as ComponentConfigParams, a4 as ComponentDataMap, a2 as ComponentDataOptionalId, a6 as ComponentMetadata, _ as ConfigParams, b as Content, al as CustomField, ak as CustomFieldRender, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, ap as DefaultRootProps, ao as DefaultRootRenderProps, x as Direction, y as DragAxis, aj as ExternalField, ah as ExternalFieldWithAdaptor, Z as ExtractConfigParams, at as ExtractField, a7 as FieldMetadata, K as FieldRenderFunctions, E as FieldTransformFn, B as FieldTransformFnParams, F as Fields, H as History, L as ItemWithId, a3 as MappedItem, aa as NumberField, af as ObjectField, J as OverrideKey, T as PuckComponent, an as PuckContext, a5 as PuckMetadata, ad as RadioField, w as RichText, o as RichtextField, Y as RootConfig, R as RootData, h as RootDataWithProps, a1 as RootDataWithoutProps, ac as SelectField, S as Slot, Q as SlotComponent, am as SlotField, a9 as TextField, ab as TextareaField, z as Viewport, as as WithChildren, W as WithId, aq as WithPuckProps, v as WithSlotProps, G as overrideKeys } from './actions-BrxBrqKj.js';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-B8hGlO4f.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as react from 'react';
6
6
  import react__default, { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
7
- import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-lt1zf5WR.js';
7
+ import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-GB3Q5h0c.js';
8
8
  import '@tiptap/react';
9
9
  import '@tiptap/extension-blockquote';
10
10
  import '@tiptap/extension-bold';
package/dist/index.js CHANGED
@@ -11415,7 +11415,6 @@ var CopyHostStyles = ({
11415
11415
  }
11416
11416
  };
11417
11417
  });
11418
- doc.head.innerHTML = "";
11419
11418
  doc.head.append(...filtered);
11420
11419
  observer.observe(parentDocument.head, { childList: true, subtree: true });
11421
11420
  filtered.forEach((el) => {
@@ -11451,12 +11450,16 @@ function AutoFrame(_a) {
11451
11450
  "onNotReady",
11452
11451
  "frameRef"
11453
11452
  ]);
11453
+ var _a2;
11454
11454
  const [loaded, setLoaded] = (0, import_react76.useState)(false);
11455
11455
  const [ctx, setCtx] = (0, import_react76.useState)({});
11456
11456
  const [mountTarget, setMountTarget] = (0, import_react76.useState)();
11457
11457
  const [stylesLoaded, setStylesLoaded] = (0, import_react76.useState)(false);
11458
+ const {
11459
+ srcDoc = '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry></div></body></html>'
11460
+ } = (_a2 = usePropsContext().iframe) != null ? _a2 : {};
11458
11461
  (0, import_react76.useEffect)(() => {
11459
- var _a2;
11462
+ var _a3;
11460
11463
  if (frameRef.current) {
11461
11464
  const doc = frameRef.current.contentDocument;
11462
11465
  const win = frameRef.current.contentWindow;
@@ -11465,7 +11468,7 @@ function AutoFrame(_a) {
11465
11468
  window: win || void 0
11466
11469
  });
11467
11470
  setMountTarget(
11468
- (_a2 = frameRef.current.contentDocument) == null ? void 0 : _a2.getElementById("frame-root")
11471
+ (_a3 = frameRef.current.contentDocument) == null ? void 0 : _a3.getElementById("frame-root")
11469
11472
  );
11470
11473
  if (doc && win && stylesLoaded) {
11471
11474
  onReady();
@@ -11479,7 +11482,7 @@ function AutoFrame(_a) {
11479
11482
  __spreadProps(__spreadValues({}, props), {
11480
11483
  className,
11481
11484
  id,
11482
- srcDoc: '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry></div></body></html>',
11485
+ srcDoc,
11483
11486
  ref: frameRef,
11484
11487
  onLoad: () => {
11485
11488
  setLoaded(true);
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  setDeep,
18
18
  useGetPuck,
19
19
  usePuck
20
- } from "./chunk-EBISZQTK.mjs";
20
+ } from "./chunk-3YEEKEJI.mjs";
21
21
  import "./chunk-RHVK562Z.mjs";
22
22
  import {
23
23
  migrate,
@@ -1,6 +1,6 @@
1
1
  import { Reducer } from 'react';
2
- import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, a as PuckAction } from './actions-BkBoKAc5.mjs';
3
- import { A as AppStore } from './index-bqD1SEOb.mjs';
2
+ import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, a as PuckAction } from './actions-BrxBrqKj.mjs';
3
+ import { A as AppStore } from './index-sczExwEC.mjs';
4
4
  import '@tiptap/react';
5
5
  import '@tiptap/extension-blockquote';
6
6
  import '@tiptap/extension-bold';
@@ -1,6 +1,6 @@
1
1
  import { Reducer } from 'react';
2
- import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, a as PuckAction } from './actions-BkBoKAc5.js';
3
- import { A as AppStore } from './index-lt1zf5WR.js';
2
+ import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, a as PuckAction } from './actions-BrxBrqKj.js';
3
+ import { A as AppStore } from './index-GB3Q5h0c.js';
4
4
  import '@tiptap/react';
5
5
  import '@tiptap/extension-blockquote';
6
6
  import '@tiptap/extension-bold';
@@ -1,6 +1,6 @@
1
- export { ag as Adaptor, A as AppState, ae as ArrayField, N as ArrayState, ar as AsFieldProps, a0 as BaseData, a8 as BaseField, ai as CacheOpts, m as ComponentConfig, X as ComponentConfigExtensions, $ as ComponentConfigParams, c as ComponentData, a4 as ComponentDataMap, a2 as ComponentDataOptionalId, a6 as ComponentMetadata, C as Config, _ as ConfigParams, b as Content, al as CustomField, ak as CustomFieldRender, D as Data, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, ap as DefaultRootProps, ao as DefaultRootRenderProps, x as Direction, y as DragAxis, aj as ExternalField, ah as ExternalFieldWithAdaptor, Z as ExtractConfigParams, at as ExtractField, p as Field, a7 as FieldMetadata, q as FieldProps, K as FieldRenderFunctions, E as FieldTransformFn, B as FieldTransformFnParams, n as FieldTransforms, F as Fields, H as History, I as IframeConfig, s as InitialHistory, L as ItemWithId, a3 as MappedItem, M as Metadata, aa as NumberField, af as ObjectField, O as OnAction, J as OverrideKey, k as Overrides, g as Permissions, j as Plugin, a as PuckAction, T as PuckComponent, an as PuckContext, a5 as PuckMetadata, ad as RadioField, i as ResolveDataTrigger, w as RichText, o as RichtextField, Y as RootConfig, R as RootData, h as RootDataWithProps, a1 as RootDataWithoutProps, ac as SelectField, S as Slot, Q as SlotComponent, am as SlotField, a9 as TextField, ab as TextareaField, l as UiState, U as UserGenerics, z as Viewport, V as Viewports, as as WithChildren, W as WithId, aq as WithPuckProps, v as WithSlotProps, G as overrideKeys } from './actions-BkBoKAc5.mjs';
1
+ export { ag as Adaptor, A as AppState, ae as ArrayField, N as ArrayState, ar as AsFieldProps, a0 as BaseData, a8 as BaseField, ai as CacheOpts, m as ComponentConfig, X as ComponentConfigExtensions, $ as ComponentConfigParams, c as ComponentData, a4 as ComponentDataMap, a2 as ComponentDataOptionalId, a6 as ComponentMetadata, C as Config, _ as ConfigParams, b as Content, al as CustomField, ak as CustomFieldRender, D as Data, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, ap as DefaultRootProps, ao as DefaultRootRenderProps, x as Direction, y as DragAxis, aj as ExternalField, ah as ExternalFieldWithAdaptor, Z as ExtractConfigParams, at as ExtractField, p as Field, a7 as FieldMetadata, q as FieldProps, K as FieldRenderFunctions, E as FieldTransformFn, B as FieldTransformFnParams, n as FieldTransforms, F as Fields, H as History, I as IframeConfig, s as InitialHistory, L as ItemWithId, a3 as MappedItem, M as Metadata, aa as NumberField, af as ObjectField, O as OnAction, J as OverrideKey, k as Overrides, g as Permissions, j as Plugin, a as PuckAction, T as PuckComponent, an as PuckContext, a5 as PuckMetadata, ad as RadioField, i as ResolveDataTrigger, w as RichText, o as RichtextField, Y as RootConfig, R as RootData, h as RootDataWithProps, a1 as RootDataWithoutProps, ac as SelectField, S as Slot, Q as SlotComponent, am as SlotField, a9 as TextField, ab as TextareaField, l as UiState, U as UserGenerics, z as Viewport, V as Viewports, as as WithChildren, W as WithId, aq as WithPuckProps, v as WithSlotProps, G as overrideKeys } from './actions-BrxBrqKj.mjs';
2
2
  export { Action, ActionBar, AutoField, Button, Drawer, DropZone, FieldLabel, Group, IconButton, Label, Puck, PuckApi, Render, RichTextMenu, Separator, UsePuckData, blocksPlugin, createUsePuck, fieldsPlugin, legacySideBarPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck } from './index.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CRRDqx6_.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CQfHfM9_.mjs';
4
4
  import 'react';
5
5
  import '@tiptap/react';
6
6
  import '@tiptap/extension-blockquote';
@@ -18,4 +18,4 @@ import '@tiptap/extension-strike';
18
18
  import '@tiptap/extension-text-align';
19
19
  import '@tiptap/extension-underline';
20
20
  import 'react/jsx-runtime';
21
- import './index-bqD1SEOb.mjs';
21
+ import './index-sczExwEC.mjs';
@@ -1,6 +1,6 @@
1
- export { ag as Adaptor, A as AppState, ae as ArrayField, N as ArrayState, ar as AsFieldProps, a0 as BaseData, a8 as BaseField, ai as CacheOpts, m as ComponentConfig, X as ComponentConfigExtensions, $ as ComponentConfigParams, c as ComponentData, a4 as ComponentDataMap, a2 as ComponentDataOptionalId, a6 as ComponentMetadata, C as Config, _ as ConfigParams, b as Content, al as CustomField, ak as CustomFieldRender, D as Data, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, ap as DefaultRootProps, ao as DefaultRootRenderProps, x as Direction, y as DragAxis, aj as ExternalField, ah as ExternalFieldWithAdaptor, Z as ExtractConfigParams, at as ExtractField, p as Field, a7 as FieldMetadata, q as FieldProps, K as FieldRenderFunctions, E as FieldTransformFn, B as FieldTransformFnParams, n as FieldTransforms, F as Fields, H as History, I as IframeConfig, s as InitialHistory, L as ItemWithId, a3 as MappedItem, M as Metadata, aa as NumberField, af as ObjectField, O as OnAction, J as OverrideKey, k as Overrides, g as Permissions, j as Plugin, a as PuckAction, T as PuckComponent, an as PuckContext, a5 as PuckMetadata, ad as RadioField, i as ResolveDataTrigger, w as RichText, o as RichtextField, Y as RootConfig, R as RootData, h as RootDataWithProps, a1 as RootDataWithoutProps, ac as SelectField, S as Slot, Q as SlotComponent, am as SlotField, a9 as TextField, ab as TextareaField, l as UiState, U as UserGenerics, z as Viewport, V as Viewports, as as WithChildren, W as WithId, aq as WithPuckProps, v as WithSlotProps, G as overrideKeys } from './actions-BkBoKAc5.js';
1
+ export { ag as Adaptor, A as AppState, ae as ArrayField, N as ArrayState, ar as AsFieldProps, a0 as BaseData, a8 as BaseField, ai as CacheOpts, m as ComponentConfig, X as ComponentConfigExtensions, $ as ComponentConfigParams, c as ComponentData, a4 as ComponentDataMap, a2 as ComponentDataOptionalId, a6 as ComponentMetadata, C as Config, _ as ConfigParams, b as Content, al as CustomField, ak as CustomFieldRender, D as Data, e as DefaultComponentProps, d as DefaultComponents, f as DefaultRootFieldProps, ap as DefaultRootProps, ao as DefaultRootRenderProps, x as Direction, y as DragAxis, aj as ExternalField, ah as ExternalFieldWithAdaptor, Z as ExtractConfigParams, at as ExtractField, p as Field, a7 as FieldMetadata, q as FieldProps, K as FieldRenderFunctions, E as FieldTransformFn, B as FieldTransformFnParams, n as FieldTransforms, F as Fields, H as History, I as IframeConfig, s as InitialHistory, L as ItemWithId, a3 as MappedItem, M as Metadata, aa as NumberField, af as ObjectField, O as OnAction, J as OverrideKey, k as Overrides, g as Permissions, j as Plugin, a as PuckAction, T as PuckComponent, an as PuckContext, a5 as PuckMetadata, ad as RadioField, i as ResolveDataTrigger, w as RichText, o as RichtextField, Y as RootConfig, R as RootData, h as RootDataWithProps, a1 as RootDataWithoutProps, ac as SelectField, S as Slot, Q as SlotComponent, am as SlotField, a9 as TextField, ab as TextareaField, l as UiState, U as UserGenerics, z as Viewport, V as Viewports, as as WithChildren, W as WithId, aq as WithPuckProps, v as WithSlotProps, G as overrideKeys } from './actions-BrxBrqKj.js';
2
2
  export { Action, ActionBar, AutoField, Button, Drawer, DropZone, FieldLabel, Group, IconButton, Label, Puck, PuckApi, Render, RichTextMenu, Separator, UsePuckData, blocksPlugin, createUsePuck, fieldsPlugin, legacySideBarPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck } from './index.js';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CS7sEpfG.js';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-B8hGlO4f.js';
4
4
  import 'react';
5
5
  import '@tiptap/react';
6
6
  import '@tiptap/extension-blockquote';
@@ -18,4 +18,4 @@ import '@tiptap/extension-strike';
18
18
  import '@tiptap/extension-text-align';
19
19
  import '@tiptap/extension-underline';
20
20
  import 'react/jsx-runtime';
21
- import './index-lt1zf5WR.js';
21
+ import './index-GB3Q5h0c.js';
@@ -11418,7 +11418,6 @@ var CopyHostStyles = ({
11418
11418
  }
11419
11419
  };
11420
11420
  });
11421
- doc.head.innerHTML = "";
11422
11421
  doc.head.append(...filtered);
11423
11422
  observer.observe(parentDocument.head, { childList: true, subtree: true });
11424
11423
  filtered.forEach((el) => {
@@ -11454,12 +11453,16 @@ function AutoFrame(_a) {
11454
11453
  "onNotReady",
11455
11454
  "frameRef"
11456
11455
  ]);
11456
+ var _a2;
11457
11457
  const [loaded, setLoaded] = (0, import_react76.useState)(false);
11458
11458
  const [ctx, setCtx] = (0, import_react76.useState)({});
11459
11459
  const [mountTarget, setMountTarget] = (0, import_react76.useState)();
11460
11460
  const [stylesLoaded, setStylesLoaded] = (0, import_react76.useState)(false);
11461
+ const {
11462
+ srcDoc = '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry></div></body></html>'
11463
+ } = (_a2 = usePropsContext().iframe) != null ? _a2 : {};
11461
11464
  (0, import_react76.useEffect)(() => {
11462
- var _a2;
11465
+ var _a3;
11463
11466
  if (frameRef.current) {
11464
11467
  const doc = frameRef.current.contentDocument;
11465
11468
  const win = frameRef.current.contentWindow;
@@ -11468,7 +11471,7 @@ function AutoFrame(_a) {
11468
11471
  window: win || void 0
11469
11472
  });
11470
11473
  setMountTarget(
11471
- (_a2 = frameRef.current.contentDocument) == null ? void 0 : _a2.getElementById("frame-root")
11474
+ (_a3 = frameRef.current.contentDocument) == null ? void 0 : _a3.getElementById("frame-root")
11472
11475
  );
11473
11476
  if (doc && win && stylesLoaded) {
11474
11477
  onReady();
@@ -11482,7 +11485,7 @@ function AutoFrame(_a) {
11482
11485
  __spreadProps(__spreadValues({}, props), {
11483
11486
  className,
11484
11487
  id,
11485
- srcDoc: '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry></div></body></html>',
11488
+ srcDoc,
11486
11489
  ref: frameRef,
11487
11490
  onLoad: () => {
11488
11491
  setLoaded(true);
@@ -17,7 +17,7 @@ import {
17
17
  setDeep,
18
18
  useGetPuck,
19
19
  usePuck
20
- } from "./chunk-EBISZQTK.mjs";
20
+ } from "./chunk-3YEEKEJI.mjs";
21
21
  import "./chunk-RHVK562Z.mjs";
22
22
  import {
23
23
  migrate,
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-BkBoKAc5.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CRRDqx6_.mjs';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './actions-BrxBrqKj.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CQfHfM9_.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-BkBoKAc5.js';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CS7sEpfG.js';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './actions-BrxBrqKj.js';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-B8hGlO4f.js';
4
4
  import 'react';
5
5
  import '@tiptap/react';
6
6
  import '@tiptap/extension-blockquote';
@@ -1,4 +1,4 @@
1
- import { C as Config, D as Data, W as WithId, U as UserGenerics, b as Content, c as ComponentData, d as DefaultComponents, e as DefaultComponentProps, f as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-BkBoKAc5.js';
1
+ import { C as Config, D as Data, W as WithId, U as UserGenerics, b as Content, c as ComponentData, d as DefaultComponents, e as DefaultComponentProps, f as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-BrxBrqKj.js';
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, b as Content, c as ComponentData, d as DefaultComponents, e as DefaultComponentProps, f as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-BkBoKAc5.mjs';
1
+ import { C as Config, D as Data, W as WithId, U as UserGenerics, b as Content, c as ComponentData, d as DefaultComponents, e as DefaultComponentProps, f as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-BrxBrqKj.mjs';
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.21.1",
3
+ "version": "0.22.0-canary.1a6a10ed",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Chris Villa <chris@puckeditor.com>",
6
6
  "repository": "puckeditor/puck",