@puckeditor/core 0.21.1 → 0.22.0-canary.f642568b

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> = {
@@ -5706,12 +5706,16 @@ function AutoFrame(_a) {
5706
5706
  "onNotReady",
5707
5707
  "frameRef"
5708
5708
  ]);
5709
+ var _a2;
5709
5710
  const [loaded, setLoaded] = useState18(false);
5710
5711
  const [ctx, setCtx] = useState18({});
5711
5712
  const [mountTarget, setMountTarget] = useState18();
5712
5713
  const [stylesLoaded, setStylesLoaded] = useState18(false);
5714
+ const {
5715
+ srcDoc = '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry></div></body></html>'
5716
+ } = (_a2 = usePropsContext().iframe) != null ? _a2 : {};
5713
5717
  useEffect20(() => {
5714
- var _a2;
5718
+ var _a3;
5715
5719
  if (frameRef.current) {
5716
5720
  const doc = frameRef.current.contentDocument;
5717
5721
  const win = frameRef.current.contentWindow;
@@ -5720,7 +5724,7 @@ function AutoFrame(_a) {
5720
5724
  window: win || void 0
5721
5725
  });
5722
5726
  setMountTarget(
5723
- (_a2 = frameRef.current.contentDocument) == null ? void 0 : _a2.getElementById("frame-root")
5727
+ (_a3 = frameRef.current.contentDocument) == null ? void 0 : _a3.getElementById("frame-root")
5724
5728
  );
5725
5729
  if (doc && win && stylesLoaded) {
5726
5730
  onReady();
@@ -5734,7 +5738,7 @@ function AutoFrame(_a) {
5734
5738
  __spreadProps(__spreadValues({}, props), {
5735
5739
  className,
5736
5740
  id,
5737
- srcDoc: '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry></div></body></html>',
5741
+ srcDoc,
5738
5742
  ref: frameRef,
5739
5743
  onLoad: () => {
5740
5744
  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
@@ -11451,12 +11451,16 @@ function AutoFrame(_a) {
11451
11451
  "onNotReady",
11452
11452
  "frameRef"
11453
11453
  ]);
11454
+ var _a2;
11454
11455
  const [loaded, setLoaded] = (0, import_react76.useState)(false);
11455
11456
  const [ctx, setCtx] = (0, import_react76.useState)({});
11456
11457
  const [mountTarget, setMountTarget] = (0, import_react76.useState)();
11457
11458
  const [stylesLoaded, setStylesLoaded] = (0, import_react76.useState)(false);
11459
+ const {
11460
+ srcDoc = '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry></div></body></html>'
11461
+ } = (_a2 = usePropsContext().iframe) != null ? _a2 : {};
11458
11462
  (0, import_react76.useEffect)(() => {
11459
- var _a2;
11463
+ var _a3;
11460
11464
  if (frameRef.current) {
11461
11465
  const doc = frameRef.current.contentDocument;
11462
11466
  const win = frameRef.current.contentWindow;
@@ -11465,7 +11469,7 @@ function AutoFrame(_a) {
11465
11469
  window: win || void 0
11466
11470
  });
11467
11471
  setMountTarget(
11468
- (_a2 = frameRef.current.contentDocument) == null ? void 0 : _a2.getElementById("frame-root")
11472
+ (_a3 = frameRef.current.contentDocument) == null ? void 0 : _a3.getElementById("frame-root")
11469
11473
  );
11470
11474
  if (doc && win && stylesLoaded) {
11471
11475
  onReady();
@@ -11479,7 +11483,7 @@ function AutoFrame(_a) {
11479
11483
  __spreadProps(__spreadValues({}, props), {
11480
11484
  className,
11481
11485
  id,
11482
- srcDoc: '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry></div></body></html>',
11486
+ srcDoc,
11483
11487
  ref: frameRef,
11484
11488
  onLoad: () => {
11485
11489
  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-46VXQRS6.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';
@@ -11454,12 +11454,16 @@ function AutoFrame(_a) {
11454
11454
  "onNotReady",
11455
11455
  "frameRef"
11456
11456
  ]);
11457
+ var _a2;
11457
11458
  const [loaded, setLoaded] = (0, import_react76.useState)(false);
11458
11459
  const [ctx, setCtx] = (0, import_react76.useState)({});
11459
11460
  const [mountTarget, setMountTarget] = (0, import_react76.useState)();
11460
11461
  const [stylesLoaded, setStylesLoaded] = (0, import_react76.useState)(false);
11462
+ const {
11463
+ srcDoc = '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry></div></body></html>'
11464
+ } = (_a2 = usePropsContext().iframe) != null ? _a2 : {};
11461
11465
  (0, import_react76.useEffect)(() => {
11462
- var _a2;
11466
+ var _a3;
11463
11467
  if (frameRef.current) {
11464
11468
  const doc = frameRef.current.contentDocument;
11465
11469
  const win = frameRef.current.contentWindow;
@@ -11468,7 +11472,7 @@ function AutoFrame(_a) {
11468
11472
  window: win || void 0
11469
11473
  });
11470
11474
  setMountTarget(
11471
- (_a2 = frameRef.current.contentDocument) == null ? void 0 : _a2.getElementById("frame-root")
11475
+ (_a3 = frameRef.current.contentDocument) == null ? void 0 : _a3.getElementById("frame-root")
11472
11476
  );
11473
11477
  if (doc && win && stylesLoaded) {
11474
11478
  onReady();
@@ -11482,7 +11486,7 @@ function AutoFrame(_a) {
11482
11486
  __spreadProps(__spreadValues({}, props), {
11483
11487
  className,
11484
11488
  id,
11485
- srcDoc: '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry></div></body></html>',
11489
+ srcDoc,
11486
11490
  ref: frameRef,
11487
11491
  onLoad: () => {
11488
11492
  setLoaded(true);
@@ -17,7 +17,7 @@ import {
17
17
  setDeep,
18
18
  useGetPuck,
19
19
  usePuck
20
- } from "./chunk-EBISZQTK.mjs";
20
+ } from "./chunk-46VXQRS6.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.f642568b",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Chris Villa <chris@puckeditor.com>",
6
6
  "repository": "puckeditor/puck",