@measured/puck 0.14.0-canary.924c85a → 0.14.0-canary.95280e6

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as Config, D as Data, I as ItemSelector, U as UiState, A as AppState, F as Field, V as Viewports, a as DefaultComponentProps, b as DefaultRootProps, M as MappedItem, R as RootDataWithProps, c as RootData } from './Config-29dc2731.js';
2
- export { g as Adaptor, f as ArrayField, r as ArrayState, n as BaseData, B as BaseField, m as ComponentConfig, o as ComponentData, k as Content, i as CustomField, s as DropZone, h as ExternalField, E as ExternalFieldWithAdaptor, j as Fields, q as ItemWithId, N as NumberField, O as ObjectField, P as PuckComponent, l as PuckContext, e as RadioField, p as RootDataWithoutProps, S as SelectField, T as TextField, d as TextareaField } from './Config-29dc2731.js';
1
+ import { C as Config, D as Data, I as ItemSelector, U as UiState, A as AppState, F as Field, V as Viewports, a as DefaultComponentProps, b as DefaultRootProps, M as MappedItem, R as RootDataWithProps, c as RootData, d as ComponentData } from './Config-DXxsEDkF.js';
2
+ export { h as Adaptor, g as ArrayField, r as ArrayState, o as BaseData, B as BaseField, n as ComponentConfig, l as Content, j as CustomField, s as DropZone, i as ExternalField, E as ExternalFieldWithAdaptor, k as Fields, q as ItemWithId, N as NumberField, O as ObjectField, P as PuckComponent, m as PuckContext, f as RadioField, p as RootDataWithoutProps, S as SelectField, T as TextField, e as TextareaField } from './Config-DXxsEDkF.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode, CSSProperties, ReactElement, SyntheticEvent } from 'react';
@@ -223,7 +223,11 @@ type Plugin = {
223
223
  overrides: Partial<Overrides>;
224
224
  };
225
225
 
226
- declare function Puck<UserConfig extends Config<any, any, any> = Config<any, any, any>>({ children, config, data: initialData, ui: initialUi, onChange, onPublish, plugins, overrides, renderHeader, renderHeaderActions, headerTitle, headerPath, viewports, }: {
226
+ type IframeConfig = {
227
+ enabled?: boolean;
228
+ };
229
+
230
+ declare function Puck<UserConfig extends Config<any, any, any> = Config<any, any, any>>({ children, config, data: initialData, ui: initialUi, onChange, onPublish, plugins, overrides, renderHeader, renderHeaderActions, headerTitle, headerPath, viewports, iframe, }: {
227
231
  children?: ReactNode;
228
232
  config: UserConfig;
229
233
  data: Data;
@@ -244,6 +248,7 @@ declare function Puck<UserConfig extends Config<any, any, any> = Config<any, any
244
248
  headerTitle?: string;
245
249
  headerPath?: string;
246
250
  viewports?: Viewports;
251
+ iframe?: IframeConfig;
247
252
  }): react_jsx_runtime.JSX.Element;
248
253
  declare namespace Puck {
249
254
  var Components: () => react_jsx_runtime.JSX.Element;
@@ -306,6 +311,9 @@ declare const usePuck: () => {
306
311
  config: Config<any, any, any>;
307
312
  dispatch: (action: PuckAction) => void;
308
313
  history: Partial<PuckHistory>;
314
+ selectedItem: ComponentData<DefaultComponentProps & {
315
+ id: string;
316
+ }> | null;
309
317
  };
310
318
 
311
- export { AppState, Button, Config, Data, DefaultComponentProps, DefaultRootProps, Drawer, DropZoneProvider, Field, FieldLabel, IconButton, MappedItem, Puck, PuckAction, Render, RootData, RootDataWithProps, UiState, dropZoneContext, migrate, resolveAllData, transformProps, usePuck };
319
+ export { AppState, Button, ComponentData, Config, Data, DefaultComponentProps, DefaultRootProps, Drawer, DropZoneProvider, Field, FieldLabel, IconButton, MappedItem, Puck, type PuckAction, Render, RootData, RootDataWithProps, UiState, dropZoneContext, migrate, resolveAllData, transformProps, usePuck };