@puckeditor/core 0.24.1-canary.f6828352 → 0.25.0-canary.2c02416e

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.
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
  _The visual editor for React_
13
13
 
14
- [Documentation](https://puckeditor.com/docs?utm_source=readme&utm_medium=code&utm_campaign=repo&utm_contents=docs_link) • [Puck AI](https://puckeditor.com/docs/ai/overview?utm_source=readme&utm_medium=code&utm_campaign=repo&utm_contents=ai_link) • [Demo](https://demo.puckeditor.com/edit?utm_source=readme&utm_medium=code&utm_campaign=repo&utm_contents=demo_link) • [Discord](https://discord.gg/V9mDAhuxyZ)
14
+ [Documentation](https://puckeditor.com/docs?utm_source=readme&utm_medium=code&utm_campaign=repo&utm_contents=docs_link) • [Demo](https://demo.puckeditor.com/edit?utm_source=readme&utm_medium=code&utm_campaign=repo&utm_contents=demo_link) • [Discord](https://discord.gg/V9mDAhuxyZ) • [Contributing](https://github.com/puckeditor/puck/blob/main/CONTRIBUTING.md)
15
15
 
16
16
  ⭐️ Enjoying Puck? Please [leave a star](https://github.com/puckeditor/puck)!
17
17
 
@@ -23,28 +23,18 @@ _The visual editor for React_
23
23
 
24
24
  ## What is Puck?
25
25
 
26
- Puck is an open-source visual editor for React. Embed it in your application to build interfaces with drag-and-drop, powered by your own React components.
26
+ Puck is a modular, open-source visual editor for React.js. You can use Puck to build custom drag-and-drop experiences with your own application and React components.
27
27
 
28
- Because Puck is just a React component, it fits into existing React applications. You own your components and data, with no vendor lock-in.
28
+ Because Puck is just a React component, it plays well with all React.js environments, including Next.js. You own your data and there’s no vendor lock-in.
29
29
 
30
30
  Puck is also [licensed under MIT](https://github.com/puckeditor/puck?tab=MIT-1-ov-file#readme), making it suitable for both internal systems and commercial applications.
31
31
 
32
32
  ## Quick start
33
33
 
34
- Run the [Puck CLI](https://puckeditor.com/docs/cli):
35
-
36
- ```sh
37
- npx @puckeditor/cli@0.24.0-canary.fd916921 init
38
- ```
39
-
40
- <details>
41
- <summary><strong>Manual setup</strong></summary>
42
- <br />
43
-
44
34
  Install the package:
45
35
 
46
36
  ```sh
47
- npm i @puckeditor/core --save
37
+ npm i @puckeditor/core --save # or npx create-puck-app my-app
48
38
  ```
49
39
 
50
40
  Render the editor:
@@ -72,8 +62,7 @@ const config = {
72
62
  // Describe the initial data
73
63
  const initialData = {};
74
64
 
75
- // Store pages in your own database, or run `npx @puckeditor/cli@0.24.0-canary.fd916921 add pages`
76
- // to store, version and publish them with Puck Pages
65
+ // Save the data to your database
77
66
  const save = (data) => {};
78
67
 
79
68
  // Render Puck editor
@@ -93,48 +82,51 @@ export function Page() {
93
82
  }
94
83
  ```
95
84
 
96
- </details>
97
-
98
- ## Puck Cloud
85
+ ## CLI
99
86
 
100
- Puck Cloud is a modular backend for your Puck editor:
87
+ Set up Puck and Puck Cloud in a new or existing Next.js, React Router, TanStack Start, vinext, Vite or Astro app, or a Hono or Express server. Built for coding agents, friendly for humans:
101
88
 
102
- - **Pages**: store, version and publish pages
103
- - **Auth**: sign editors in
104
- - **Assets**: store images and files
105
- - **AI**: generate pages with an AI copilot
89
+ ```sh
90
+ npx @puckeditor/cli init
91
+ ```
106
92
 
107
- Puck Cloud is free to start with, and scales with usage.
93
+ See the [CLI docs](https://puckeditor.com/docs/cli) for agent usage.
108
94
 
109
- ### Pages
95
+ ## For agents
110
96
 
111
- [Puck Pages](#) is a hosted page store built for Puck, providing version history and data migrations.
97
+ Puck is built to be set up and used by coding agents as well as people. The CLI sets up Puck without prompting, and ships with the docs for its release, so agents can read the docs for the version a project uses:
112
98
 
113
99
  ```sh
114
- npx @puckeditor/cli@0.24.0-canary.fd916921 add pages
100
+ npx @puckeditor/cli init --yes --json
101
+ npx @puckeditor/cli docs find "dynamic fields"
102
+ npx @puckeditor/cli docs cat api-reference/fields/text
115
103
  ```
116
104
 
117
- Or [set it up manually](https://puckeditor.com/docs/…).
118
-
119
- ### Auth
120
-
121
- [Puck Auth](#) provides managed authentication for Puck, allowing users to sign-in with a Puck Cloud account.
105
+ Agents with skill support can install the [Puck skill](https://github.com/puckeditor/skills):
122
106
 
123
107
  ```sh
124
- npx @puckeditor/cli@0.24.0-canary.fd916921 add auth
108
+ npx skills add puckeditor/skills --skill puck
125
109
  ```
126
110
 
127
- Or [set it up manually](https://puckeditor.com/docs/…).
111
+ The latest docs are indexed at [llms.txt](https://puckeditor.com/llms.txt), and any page is available as markdown by adding `.md` to its URL.
128
112
 
129
- ### AI
113
+ ## Recipes
130
114
 
131
- [Puck AI](https://puckeditor.com/docs/ai/overview) is an AI agent for Puck for generating interfaces directly from the editor.
115
+ Use `create-puck-app` to quickly spin up a a pre-configured app based on our provided [recipes](https://github.com/puckeditor/puck/tree/main/recipes):
132
116
 
133
117
  ```sh
134
- npx @puckeditor/cli@0.24.0-canary.fd916921 add ai
118
+ npx create-puck-app my-app
135
119
  ```
136
120
 
137
- Or [set it up manually](https://puckeditor.com/docs/…).
121
+ Available recipes include:
122
+
123
+ - [**next**](https://github.com/puckeditor/puck/tree/main/recipes/next): Next.js example, using App Router and static page generation
124
+ - [**react-router**](https://github.com/puckeditor/puck/tree/main/recipes/react-router): React Router v8 app example, using dynamic routes to create pages at any level
125
+ - [**tanstack-start**](https://github.com/puckeditor/puck/tree/main/recipes/tanstack-start): [TanStack Start](https://tanstack.com/start) example, using a splat route and server functions to create pages at any level
126
+ - [**hono**](https://github.com/puckeditor/puck/tree/main/recipes/hono) and [**express**](https://github.com/puckeditor/puck/tree/main/recipes/express): Hono and Express servers exposing a pages API, and Puck AI in the `-ai` variants, for an editor in another app
127
+ - [**astro**](https://github.com/puckeditor/puck/tree/main/recipes/astro): Astro example, rendering Puck pages on the server with the Node adapter
128
+ - [**vite**](https://github.com/puckeditor/puck/tree/main/recipes/vite): Vite React app example, with a small Hono server for pages
129
+ - [**vinext**](https://github.com/puckeditor/puck/tree/main/recipes/vinext): [vinext](https://github.com/cloudflare/vinext) example, running the Next.js App Router on Vite
138
130
 
139
131
  ## Community
140
132
 
@@ -145,6 +137,8 @@ Or [set it up manually](https://puckeditor.com/docs/…).
145
137
 
146
138
  If you have any questions about Puck, please open a [GitHub issue](https://github.com/puckeditor/puck/issues) or join us on [Discord](https://discord.gg/D9e4E3MQVZ).
147
139
 
140
+ Or [book a discovery call](https://app.cal.com/chrisvxd/puck-enquiry/) for hands-on support and consultancy.
141
+
148
142
  ## License
149
143
 
150
144
  MIT © [The Puck Contributors](https://github.com/puckeditor/puck/graphs/contributors)
@@ -386,9 +386,21 @@ interface SlotField extends BaseField {
386
386
  allow?: string[];
387
387
  disallow?: string[];
388
388
  }
389
+ /**
390
+ * Register your own field types by augmenting this interface.
391
+ *
392
+ * @example
393
+ * declare module "@puckeditor/core" {
394
+ * interface FieldTypes {
395
+ * switch: { type: "switch"; options: string[] };
396
+ * }
397
+ * }
398
+ */
399
+ interface FieldTypes {
400
+ }
389
401
  type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | CheckboxField | ArrayField<ValueType extends {
390
402
  [key: string]: any;
391
- }[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField;
403
+ }[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField | (FieldTypes[keyof FieldTypes] & BaseField);
392
404
  type Fields<ComponentProps extends DefaultComponentProps = DefaultComponentProps, UserField extends {} = {}> = {
393
405
  [PropName in keyof Omit<ComponentProps, "editMode">]: UserField extends {
394
406
  type: PropertyKey;
@@ -925,4 +937,4 @@ type PuckAction = {
925
937
  recordHistory?: boolean;
926
938
  } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
927
939
 
928
- export { type ObjectField as $, type Adaptor as A, type BaseData as B, type CacheOpts as C, type Data as D, type DragAxis as E, type DropZoneProps as F, type ExternalField as G, type ExternalFieldWithAdaptor as H, type ExtractConfigParams as I, type ExtractField as J, type Field as K, type FieldGroupVariant as L, type FieldMetadata as M, type FieldProps as N, type FieldRenderFunctions as O, type FieldTransformFn as P, type FieldTransformFnParams as Q, type FieldTransforms as R, type Fields as S, type History as T, type IframeConfig as U, type InitialHistory as V, type ItemSelector as W, type ItemWithId as X, type MappedItem as Y, type Metadata as Z, type NumberField as _, type AppState as a, type OnAction as a0, type OverrideKey as a1, type Overrides as a2, type Permissions as a3, type Plugin as a4, type PluginInternal as a5, type PrivateAppState as a6, type PuckAction as a7, type PuckComponent as a8, type PuckContext as a9, type PuckMetadata as aa, type RadioField as ab, type ResolveDataTrigger as ac, type RichText as ad, type RichtextField as ae, type RootConfig as af, type RootData as ag, type RootDataWithProps 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 UiState as ap, type UserGenerics as aq, type Viewport as ar, type Viewports as as, type WithChildren as at, type WithDefaultRootFieldProps as au, type WithId as av, type WithPuckProps as aw, type WithSlotProps as ax, overrideKeys as ay, type ArrayField as b, type ArrayState as c, type AsFieldProps as d, type BaseField as e, type CheckboxField as f, type ComponentConfig as g, type ComponentConfigExtensions as h, type ComponentConfigParams as i, type ComponentData as j, type ComponentDataMap as k, type ComponentDataOptionalId as l, type ComponentMetadata as m, type Config as n, type ConfigParams as o, type Content as p, type CustomField as q, type CustomFieldRender as r, type DefaultComponentProps as s, type DefaultComponents as t, type DefaultRootFieldProps as u, type DefaultRootProps as v, type DefaultRootRenderProps as w, type Direction as x, type DndBehavior as y, type DndConfig as z };
940
+ export { type NumberField as $, type Adaptor as A, type BaseData as B, type CacheOpts as C, type Data as D, type DragAxis as E, type DropZoneProps as F, type ExternalField as G, type ExternalFieldWithAdaptor as H, type ExtractConfigParams as I, type ExtractField as J, type Field as K, type FieldGroupVariant as L, type FieldMetadata as M, type FieldProps as N, type FieldRenderFunctions as O, type FieldTransformFn as P, type FieldTransformFnParams as Q, type FieldTransforms as R, type FieldTypes as S, type Fields as T, type History as U, type IframeConfig as V, type InitialHistory as W, type ItemSelector as X, type ItemWithId as Y, type MappedItem as Z, type Metadata as _, type AppState as a, type ObjectField as a0, type OnAction as a1, type OverrideKey as a2, type Overrides as a3, type Permissions as a4, type Plugin as a5, type PluginInternal as a6, type PrivateAppState as a7, type PuckAction as a8, type PuckComponent as a9, type PuckContext as aa, type PuckMetadata as ab, type RadioField as ac, type ResolveDataTrigger as ad, type RichText as ae, type RichtextField as af, type RootConfig as ag, type RootData as ah, type RootDataWithProps as ai, type RootDataWithoutProps as aj, type SelectField as ak, type Slot as al, type SlotComponent as am, type SlotField as an, type TextField as ao, type TextareaField as ap, type UiState as aq, type UserGenerics as ar, type Viewport as as, type Viewports as at, type WithChildren as au, type WithDefaultRootFieldProps as av, type WithId as aw, type WithPuckProps as ax, type WithSlotProps as ay, overrideKeys as az, type ArrayField as b, type ArrayState as c, type AsFieldProps as d, type BaseField as e, type CheckboxField as f, type ComponentConfig as g, type ComponentConfigExtensions as h, type ComponentConfigParams as i, type ComponentData as j, type ComponentDataMap as k, type ComponentDataOptionalId as l, type ComponentMetadata as m, type Config as n, type ConfigParams as o, type Content as p, type CustomField as q, type CustomFieldRender as r, type DefaultComponentProps as s, type DefaultComponents as t, type DefaultRootFieldProps as u, type DefaultRootProps as v, type DefaultRootRenderProps as w, type Direction as x, type DndBehavior as y, type DndConfig as z };
@@ -386,9 +386,21 @@ interface SlotField extends BaseField {
386
386
  allow?: string[];
387
387
  disallow?: string[];
388
388
  }
389
+ /**
390
+ * Register your own field types by augmenting this interface.
391
+ *
392
+ * @example
393
+ * declare module "@puckeditor/core" {
394
+ * interface FieldTypes {
395
+ * switch: { type: "switch"; options: string[] };
396
+ * }
397
+ * }
398
+ */
399
+ interface FieldTypes {
400
+ }
389
401
  type Field<ValueType = any, UserField extends {} = {}> = TextField | RichtextField | NumberField | TextareaField | SelectField | RadioField | CheckboxField | ArrayField<ValueType extends {
390
402
  [key: string]: any;
391
- }[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField;
403
+ }[] ? ValueType : never, UserField> | ObjectField<ValueType, UserField> | ExternalField<ValueType> | ExternalFieldWithAdaptor<ValueType> | CustomField<ValueType> | SlotField | (FieldTypes[keyof FieldTypes] & BaseField);
392
404
  type Fields<ComponentProps extends DefaultComponentProps = DefaultComponentProps, UserField extends {} = {}> = {
393
405
  [PropName in keyof Omit<ComponentProps, "editMode">]: UserField extends {
394
406
  type: PropertyKey;
@@ -925,4 +937,4 @@ type PuckAction = {
925
937
  recordHistory?: boolean;
926
938
  } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
927
939
 
928
- export { type ObjectField as $, type Adaptor as A, type BaseData as B, type CacheOpts as C, type Data as D, type DragAxis as E, type DropZoneProps as F, type ExternalField as G, type ExternalFieldWithAdaptor as H, type ExtractConfigParams as I, type ExtractField as J, type Field as K, type FieldGroupVariant as L, type FieldMetadata as M, type FieldProps as N, type FieldRenderFunctions as O, type FieldTransformFn as P, type FieldTransformFnParams as Q, type FieldTransforms as R, type Fields as S, type History as T, type IframeConfig as U, type InitialHistory as V, type ItemSelector as W, type ItemWithId as X, type MappedItem as Y, type Metadata as Z, type NumberField as _, type AppState as a, type OnAction as a0, type OverrideKey as a1, type Overrides as a2, type Permissions as a3, type Plugin as a4, type PluginInternal as a5, type PrivateAppState as a6, type PuckAction as a7, type PuckComponent as a8, type PuckContext as a9, type PuckMetadata as aa, type RadioField as ab, type ResolveDataTrigger as ac, type RichText as ad, type RichtextField as ae, type RootConfig as af, type RootData as ag, type RootDataWithProps 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 UiState as ap, type UserGenerics as aq, type Viewport as ar, type Viewports as as, type WithChildren as at, type WithDefaultRootFieldProps as au, type WithId as av, type WithPuckProps as aw, type WithSlotProps as ax, overrideKeys as ay, type ArrayField as b, type ArrayState as c, type AsFieldProps as d, type BaseField as e, type CheckboxField as f, type ComponentConfig as g, type ComponentConfigExtensions as h, type ComponentConfigParams as i, type ComponentData as j, type ComponentDataMap as k, type ComponentDataOptionalId as l, type ComponentMetadata as m, type Config as n, type ConfigParams as o, type Content as p, type CustomField as q, type CustomFieldRender as r, type DefaultComponentProps as s, type DefaultComponents as t, type DefaultRootFieldProps as u, type DefaultRootProps as v, type DefaultRootRenderProps as w, type Direction as x, type DndBehavior as y, type DndConfig as z };
940
+ export { type NumberField as $, type Adaptor as A, type BaseData as B, type CacheOpts as C, type Data as D, type DragAxis as E, type DropZoneProps as F, type ExternalField as G, type ExternalFieldWithAdaptor as H, type ExtractConfigParams as I, type ExtractField as J, type Field as K, type FieldGroupVariant as L, type FieldMetadata as M, type FieldProps as N, type FieldRenderFunctions as O, type FieldTransformFn as P, type FieldTransformFnParams as Q, type FieldTransforms as R, type FieldTypes as S, type Fields as T, type History as U, type IframeConfig as V, type InitialHistory as W, type ItemSelector as X, type ItemWithId as Y, type MappedItem as Z, type Metadata as _, type AppState as a, type ObjectField as a0, type OnAction as a1, type OverrideKey as a2, type Overrides as a3, type Permissions as a4, type Plugin as a5, type PluginInternal as a6, type PrivateAppState as a7, type PuckAction as a8, type PuckComponent as a9, type PuckContext as aa, type PuckMetadata as ab, type RadioField as ac, type ResolveDataTrigger as ad, type RichText as ae, type RichtextField as af, type RootConfig as ag, type RootData as ah, type RootDataWithProps as ai, type RootDataWithoutProps as aj, type SelectField as ak, type Slot as al, type SlotComponent as am, type SlotField as an, type TextField as ao, type TextareaField as ap, type UiState as aq, type UserGenerics as ar, type Viewport as as, type Viewports as at, type WithChildren as au, type WithDefaultRootFieldProps as av, type WithId as aw, type WithPuckProps as ax, type WithSlotProps as ay, overrideKeys as az, type ArrayField as b, type ArrayState as c, type AsFieldProps as d, type BaseField as e, type CheckboxField as f, type ComponentConfig as g, type ComponentConfigExtensions as h, type ComponentConfigParams as i, type ComponentData as j, type ComponentDataMap as k, type ComponentDataOptionalId as l, type ComponentMetadata as m, type Config as n, type ConfigParams as o, type Content as p, type CustomField as q, type CustomFieldRender as r, type DefaultComponentProps as s, type DefaultComponents as t, type DefaultRootFieldProps as u, type DefaultRootProps as v, type DefaultRootRenderProps as w, type Direction as x, type DndBehavior as y, type DndConfig as z };
@@ -23,21 +23,6 @@ import {
23
23
  init_react_import
24
24
  } from "./chunk-M6W7YEVX.mjs";
25
25
 
26
- // lib/log-agent-message.ts
27
- init_react_import();
28
- var hasLogged = false;
29
- var logAgentMessage = () => {
30
- if (hasLogged || typeof window !== "undefined") return;
31
- hasLogged = true;
32
- import("@vercel/detect-agent").then(({ determineAgent }) => determineAgent()).then(({ isAgent }) => {
33
- if (!isAgent) return;
34
- console.warn(
35
- "[Puck] AI agent detected. This is NOT the Puck you know. You MUST read the Puck README before working with Puck: node_modules/@puckeditor/core/README.md (https://github.com/puckeditor/puck#readme)"
36
- );
37
- }).catch(() => {
38
- });
39
- };
40
-
41
26
  // lib/migrate.ts
42
27
  init_react_import();
43
28
  var migrations = [
@@ -567,7 +552,6 @@ var SlotRender = forwardRef(
567
552
  );
568
553
 
569
554
  export {
570
- logAgentMessage,
571
555
  getDropZoneProps,
572
556
  buildMappers,
573
557
  getSlotTransform,
@@ -9,9 +9,8 @@ import {
9
9
  buildMappers,
10
10
  getDropZoneProps,
11
11
  getSlotTransform,
12
- logAgentMessage,
13
12
  use_render_props_default
14
- } from "./chunk-D2RRIQZP.mjs";
13
+ } from "./chunk-3GJJSXCL.mjs";
15
14
  import {
16
15
  LoadedRichTextMenuInner
17
16
  } from "./chunk-5L3MP6BU.mjs";
@@ -14761,9 +14760,6 @@ init_react_import();
14761
14760
  // types/Utils.tsx
14762
14761
  init_react_import();
14763
14762
 
14764
- // bundle/core.ts
14765
- logAgentMessage();
14766
-
14767
14763
  export {
14768
14764
  overrideKeys,
14769
14765
  setDeep,
@@ -1,4 +1,4 @@
1
- import { T as History, a3 as Permissions, j as ComponentData, n as Config, aq as UserGenerics, S as Fields, a7 as PuckAction, ah as RootDataWithProps, ac as ResolveDataTrigger, a4 as Plugin, a2 as Overrides, as as Viewports, U as IframeConfig, ap as UiState, g as ComponentConfig, a as AppState, Z as Metadata, z as DndConfig, R as FieldTransforms, ae as RichtextField } from './actions-Dgllwd-W.mjs';
1
+ import { U as History, a4 as Permissions, j as ComponentData, n as Config, ar as UserGenerics, T as Fields, a8 as PuckAction, ai as RootDataWithProps, ad as ResolveDataTrigger, a5 as Plugin, a3 as Overrides, at as Viewports, V as IframeConfig, aq as UiState, g as ComponentConfig, a as AppState, _ as Metadata, z as DndConfig, R as FieldTransforms, af as RichtextField } from './actions-0EHeGita.mjs';
2
2
  import { Editor } from '@tiptap/react';
3
3
 
4
4
  type HistorySlice<D = any> = {
@@ -1,4 +1,4 @@
1
- import { T as History, a3 as Permissions, j as ComponentData, n as Config, aq as UserGenerics, S as Fields, a7 as PuckAction, ah as RootDataWithProps, ac as ResolveDataTrigger, a4 as Plugin, a2 as Overrides, as as Viewports, U as IframeConfig, ap as UiState, g as ComponentConfig, a as AppState, Z as Metadata, z as DndConfig, R as FieldTransforms, ae as RichtextField } from './actions-Dgllwd-W.js';
1
+ import { U as History, a4 as Permissions, j as ComponentData, n as Config, ar as UserGenerics, T as Fields, a8 as PuckAction, ai as RootDataWithProps, ad as ResolveDataTrigger, a5 as Plugin, a3 as Overrides, at as Viewports, V as IframeConfig, aq as UiState, g as ComponentConfig, a as AppState, _ as Metadata, z as DndConfig, R as FieldTransforms, af as RichtextField } from './actions-0EHeGita.js';
2
2
  import { Editor } from '@tiptap/react';
3
3
 
4
4
  type HistorySlice<D = any> = {
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { K as Field, N as FieldProps, L as FieldGroupVariant, F as DropZoneProps, n as Config, aq as UserGenerics, D as Data, ap as UiState, a0 as OnAction, a3 as Permissions, a4 as Plugin, a2 as Overrides, R as FieldTransforms, a7 as PuckAction, as as Viewports, U as IframeConfig, z as DndConfig, V as InitialHistory, Z as Metadata, ac as ResolveDataTrigger, W as ItemSelector, j as ComponentData, a5 as PluginInternal } from './actions-Dgllwd-W.mjs';
2
- export { A as Adaptor, a as AppState, b as ArrayField, c as ArrayState, d as AsFieldProps, B as BaseData, e as BaseField, C as CacheOpts, f as CheckboxField, g as ComponentConfig, h as ComponentConfigExtensions, i as ComponentConfigParams, k as ComponentDataMap, l as ComponentDataOptionalId, m as ComponentMetadata, o as ConfigParams, p as Content, q as CustomField, r as CustomFieldRender, s as DefaultComponentProps, t as DefaultComponents, u as DefaultRootFieldProps, v as DefaultRootProps, w as DefaultRootRenderProps, x as Direction, y as DndBehavior, E as DragAxis, G as ExternalField, H as ExternalFieldWithAdaptor, I as ExtractConfigParams, J as ExtractField, M as FieldMetadata, O as FieldRenderFunctions, P as FieldTransformFn, Q as FieldTransformFnParams, S as Fields, T as History, X as ItemWithId, Y as MappedItem, _ as NumberField, $ as ObjectField, a1 as OverrideKey, a8 as PuckComponent, a9 as PuckContext, aa as PuckMetadata, ab as RadioField, ad as RichText, ae as RichtextField, af as RootConfig, ag as RootData, ah as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ar as Viewport, at as WithChildren, au as WithDefaultRootFieldProps, av as WithId, aw as WithPuckProps, ax as WithSlotProps, ay as overrideKeys } from './actions-Dgllwd-W.mjs';
3
- import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-DDjbEIfs.mjs';
4
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BA4pi921.mjs';
1
+ import { K as Field, N as FieldProps, L as FieldGroupVariant, F as DropZoneProps, n as Config, ar as UserGenerics, D as Data, aq as UiState, a1 as OnAction, a4 as Permissions, a5 as Plugin, a3 as Overrides, R as FieldTransforms, a8 as PuckAction, at as Viewports, V as IframeConfig, z as DndConfig, W as InitialHistory, _ as Metadata, ad as ResolveDataTrigger, X as ItemSelector, j as ComponentData, a6 as PluginInternal } from './actions-0EHeGita.mjs';
2
+ export { A as Adaptor, a as AppState, b as ArrayField, c as ArrayState, d as AsFieldProps, B as BaseData, e as BaseField, C as CacheOpts, f as CheckboxField, g as ComponentConfig, h as ComponentConfigExtensions, i as ComponentConfigParams, k as ComponentDataMap, l as ComponentDataOptionalId, m as ComponentMetadata, o as ConfigParams, p as Content, q as CustomField, r as CustomFieldRender, s as DefaultComponentProps, t as DefaultComponents, u as DefaultRootFieldProps, v as DefaultRootProps, w as DefaultRootRenderProps, x as Direction, y as DndBehavior, E as DragAxis, G as ExternalField, H as ExternalFieldWithAdaptor, I as ExtractConfigParams, J as ExtractField, M as FieldMetadata, O as FieldRenderFunctions, P as FieldTransformFn, Q as FieldTransformFnParams, S as FieldTypes, T as Fields, U as History, Y as ItemWithId, Z as MappedItem, $ as NumberField, a0 as ObjectField, a2 as OverrideKey, a9 as PuckComponent, aa as PuckContext, ab as PuckMetadata, ac as RadioField, ae as RichText, af as RichtextField, ag as RootConfig, ah as RootData, ai as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, as as Viewport, au as WithChildren, av as WithDefaultRootFieldProps, aw as WithId, ax as WithPuckProps, ay as WithSlotProps, az as overrideKeys } from './actions-0EHeGita.mjs';
3
+ import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-BPkpm4Az.mjs';
4
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BFTZdvq8.mjs';
5
5
  import * as react from 'react';
6
6
  import react__default, { ReactNode, SyntheticEvent, ReactElement, ElementType, Ref, CSSProperties } from 'react';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -192,20 +192,6 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
192
192
  data: Partial<G["UserData"] | Data>;
193
193
  ui?: Partial<UiState>;
194
194
  onChange?: (data: G["UserData"]) => void;
195
- /**
196
- * Trigger a callback when the "Publish" button is pressed. Use it to store
197
- * the page, then render it with `<Render>`.
198
- *
199
- * You can store data to your own database, or use Puck Pages, a hosted
200
- * solution from Puck Cloud that provides built-in version history and
201
- * data migration:
202
- *
203
- * ```sh
204
- * npx @puckeditor/cli add pages
205
- * ```
206
- *
207
- * @see https://puckeditor.com/docs/api-reference/components/puck#onpublishdata
208
- */
209
195
  onPublish?: (data: G["UserData"]) => void;
210
196
  onAction?: OnAction<G["UserData"]>;
211
197
  permissions?: Partial<Permissions>;
@@ -233,11 +219,6 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
233
219
  _experimentalFullScreenCanvas?: boolean;
234
220
  _experimentalVirtualization?: boolean;
235
221
  };
236
- /**
237
- * Render the Puck editor for your `config` and `data`.
238
- *
239
- * @see https://puckeditor.com/docs/api-reference/components/puck
240
- */
241
222
  declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
242
223
  declare namespace Puck {
243
224
  var Components: () => react_jsx_runtime.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { K as Field, N as FieldProps, L as FieldGroupVariant, F as DropZoneProps, n as Config, aq as UserGenerics, D as Data, ap as UiState, a0 as OnAction, a3 as Permissions, a4 as Plugin, a2 as Overrides, R as FieldTransforms, a7 as PuckAction, as as Viewports, U as IframeConfig, z as DndConfig, V as InitialHistory, Z as Metadata, ac as ResolveDataTrigger, W as ItemSelector, j as ComponentData, a5 as PluginInternal } from './actions-Dgllwd-W.js';
2
- export { A as Adaptor, a as AppState, b as ArrayField, c as ArrayState, d as AsFieldProps, B as BaseData, e as BaseField, C as CacheOpts, f as CheckboxField, g as ComponentConfig, h as ComponentConfigExtensions, i as ComponentConfigParams, k as ComponentDataMap, l as ComponentDataOptionalId, m as ComponentMetadata, o as ConfigParams, p as Content, q as CustomField, r as CustomFieldRender, s as DefaultComponentProps, t as DefaultComponents, u as DefaultRootFieldProps, v as DefaultRootProps, w as DefaultRootRenderProps, x as Direction, y as DndBehavior, E as DragAxis, G as ExternalField, H as ExternalFieldWithAdaptor, I as ExtractConfigParams, J as ExtractField, M as FieldMetadata, O as FieldRenderFunctions, P as FieldTransformFn, Q as FieldTransformFnParams, S as Fields, T as History, X as ItemWithId, Y as MappedItem, _ as NumberField, $ as ObjectField, a1 as OverrideKey, a8 as PuckComponent, a9 as PuckContext, aa as PuckMetadata, ab as RadioField, ad as RichText, ae as RichtextField, af as RootConfig, ag as RootData, ah as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ar as Viewport, at as WithChildren, au as WithDefaultRootFieldProps, av as WithId, aw as WithPuckProps, ax as WithSlotProps, ay as overrideKeys } from './actions-Dgllwd-W.js';
3
- import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-CT0X7S4r.js';
4
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-zKkZGcaE.js';
1
+ import { K as Field, N as FieldProps, L as FieldGroupVariant, F as DropZoneProps, n as Config, ar as UserGenerics, D as Data, aq as UiState, a1 as OnAction, a4 as Permissions, a5 as Plugin, a3 as Overrides, R as FieldTransforms, a8 as PuckAction, at as Viewports, V as IframeConfig, z as DndConfig, W as InitialHistory, _ as Metadata, ad as ResolveDataTrigger, X as ItemSelector, j as ComponentData, a6 as PluginInternal } from './actions-0EHeGita.js';
2
+ export { A as Adaptor, a as AppState, b as ArrayField, c as ArrayState, d as AsFieldProps, B as BaseData, e as BaseField, C as CacheOpts, f as CheckboxField, g as ComponentConfig, h as ComponentConfigExtensions, i as ComponentConfigParams, k as ComponentDataMap, l as ComponentDataOptionalId, m as ComponentMetadata, o as ConfigParams, p as Content, q as CustomField, r as CustomFieldRender, s as DefaultComponentProps, t as DefaultComponents, u as DefaultRootFieldProps, v as DefaultRootProps, w as DefaultRootRenderProps, x as Direction, y as DndBehavior, E as DragAxis, G as ExternalField, H as ExternalFieldWithAdaptor, I as ExtractConfigParams, J as ExtractField, M as FieldMetadata, O as FieldRenderFunctions, P as FieldTransformFn, Q as FieldTransformFnParams, S as FieldTypes, T as Fields, U as History, Y as ItemWithId, Z as MappedItem, $ as NumberField, a0 as ObjectField, a2 as OverrideKey, a9 as PuckComponent, aa as PuckContext, ab as PuckMetadata, ac as RadioField, ae as RichText, af as RichtextField, ag as RootConfig, ah as RootData, ai as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, as as Viewport, au as WithChildren, av as WithDefaultRootFieldProps, aw as WithId, ax as WithPuckProps, ay as WithSlotProps, az as overrideKeys } from './actions-0EHeGita.js';
3
+ import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-UEGrr-Tp.js';
4
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-vgdtHk4C.js';
5
5
  import * as react from 'react';
6
6
  import react__default, { ReactNode, SyntheticEvent, ReactElement, ElementType, Ref, CSSProperties } from 'react';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -192,20 +192,6 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
192
192
  data: Partial<G["UserData"] | Data>;
193
193
  ui?: Partial<UiState>;
194
194
  onChange?: (data: G["UserData"]) => void;
195
- /**
196
- * Trigger a callback when the "Publish" button is pressed. Use it to store
197
- * the page, then render it with `<Render>`.
198
- *
199
- * You can store data to your own database, or use Puck Pages, a hosted
200
- * solution from Puck Cloud that provides built-in version history and
201
- * data migration:
202
- *
203
- * ```sh
204
- * npx @puckeditor/cli add pages
205
- * ```
206
- *
207
- * @see https://puckeditor.com/docs/api-reference/components/puck#onpublishdata
208
- */
209
195
  onPublish?: (data: G["UserData"]) => void;
210
196
  onAction?: OnAction<G["UserData"]>;
211
197
  permissions?: Partial<Permissions>;
@@ -233,11 +219,6 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
233
219
  _experimentalFullScreenCanvas?: boolean;
234
220
  _experimentalVirtualization?: boolean;
235
221
  };
236
- /**
237
- * Render the Puck editor for your `config` and `data`.
238
- *
239
- * @see https://puckeditor.com/docs/api-reference/components/puck
240
- */
241
222
  declare function Puck<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: PuckProps<UserConfig>): react_jsx_runtime.JSX.Element;
242
223
  declare namespace Puck {
243
224
  var Components: () => react_jsx_runtime.JSX.Element;
package/dist/index.js CHANGED
@@ -6042,21 +6042,6 @@ init_react_import();
6042
6042
  // bundle/core.ts
6043
6043
  init_react_import();
6044
6044
 
6045
- // lib/log-agent-message.ts
6046
- init_react_import();
6047
- var hasLogged = false;
6048
- var logAgentMessage = () => {
6049
- if (hasLogged || typeof window !== "undefined") return;
6050
- hasLogged = true;
6051
- import("@vercel/detect-agent").then(({ determineAgent }) => determineAgent()).then(({ isAgent }) => {
6052
- if (!isAgent) return;
6053
- console.warn(
6054
- "[Puck] AI agent detected. This is NOT the Puck you know. You MUST read the Puck README before working with Puck: node_modules/@puckeditor/core/README.md (https://github.com/puckeditor/puck#readme)"
6055
- );
6056
- }).catch(() => {
6057
- });
6058
- };
6059
-
6060
6045
  // types/API/index.ts
6061
6046
  init_react_import();
6062
6047
 
@@ -21380,9 +21365,6 @@ var legacySideBarPlugin = (props = {}) => ({
21380
21365
  }
21381
21366
  )
21382
21367
  });
21383
-
21384
- // bundle/core.ts
21385
- logAgentMessage();
21386
21368
  // Annotate the CommonJS export names for ESM import in node:
21387
21369
  0 && (module.exports = {
21388
21370
  Action,
package/dist/index.mjs CHANGED
@@ -20,13 +20,13 @@ import {
20
20
  setDeep,
21
21
  useGetPuck,
22
22
  usePuck
23
- } from "./chunk-P4UAFT7F.mjs";
23
+ } from "./chunk-7CQJTM2E.mjs";
24
24
  import "./chunk-UIJZMSVU.mjs";
25
25
  import {
26
26
  migrate,
27
27
  resolveAllData,
28
28
  transformProps
29
- } from "./chunk-D2RRIQZP.mjs";
29
+ } from "./chunk-3GJJSXCL.mjs";
30
30
  import "./chunk-H635BA2V.mjs";
31
31
  import {
32
32
  RichTextMenu
@@ -1,6 +1,6 @@
1
1
  import { Reducer } from 'react';
2
- import { D as Data, a as AppState, a0 as OnAction, a6 as PrivateAppState, a7 as PuckAction } from './actions-Dgllwd-W.mjs';
3
- import { A as AppStore } from './index-DDjbEIfs.mjs';
2
+ import { D as Data, a as AppState, a1 as OnAction, a7 as PrivateAppState, a8 as PuckAction } from './actions-0EHeGita.mjs';
3
+ import { A as AppStore } from './index-BPkpm4Az.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, a0 as OnAction, a6 as PrivateAppState, a7 as PuckAction } from './actions-Dgllwd-W.js';
3
- import { A as AppStore } from './index-CT0X7S4r.js';
2
+ import { D as Data, a as AppState, a1 as OnAction, a7 as PrivateAppState, a8 as PuckAction } from './actions-0EHeGita.js';
3
+ import { A as AppStore } from './index-UEGrr-Tp.js';
4
4
  import '@tiptap/react';
5
5
  import '@tiptap/extension-blockquote';
6
6
  import '@tiptap/extension-bold';
@@ -1,7 +1,7 @@
1
- export { A as Adaptor, a as AppState, b as ArrayField, c as ArrayState, d as AsFieldProps, B as BaseData, e as BaseField, C as CacheOpts, f as CheckboxField, g as ComponentConfig, h as ComponentConfigExtensions, i as ComponentConfigParams, j as ComponentData, k as ComponentDataMap, l as ComponentDataOptionalId, m as ComponentMetadata, n as Config, o as ConfigParams, p as Content, q as CustomField, r as CustomFieldRender, D as Data, s as DefaultComponentProps, t as DefaultComponents, u as DefaultRootFieldProps, v as DefaultRootProps, w as DefaultRootRenderProps, x as Direction, y as DndBehavior, z as DndConfig, E as DragAxis, G as ExternalField, H as ExternalFieldWithAdaptor, I as ExtractConfigParams, J as ExtractField, K as Field, L as FieldGroupVariant, M as FieldMetadata, N as FieldProps, O as FieldRenderFunctions, P as FieldTransformFn, Q as FieldTransformFnParams, R as FieldTransforms, S as Fields, T as History, U as IframeConfig, V as InitialHistory, X as ItemWithId, Y as MappedItem, Z as Metadata, _ as NumberField, $ as ObjectField, a0 as OnAction, a1 as OverrideKey, a2 as Overrides, a3 as Permissions, a4 as Plugin, a7 as PuckAction, a8 as PuckComponent, a9 as PuckContext, aa as PuckMetadata, ab as RadioField, ac as ResolveDataTrigger, ad as RichText, ae as RichtextField, af as RootConfig, ag as RootData, ah as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ap as UiState, aq as UserGenerics, ar as Viewport, as as Viewports, at as WithChildren, au as WithDefaultRootFieldProps, av as WithId, aw as WithPuckProps, ax as WithSlotProps, ay as overrideKeys } from './actions-Dgllwd-W.mjs';
2
- export { D as Dictionary } from './index-DDjbEIfs.mjs';
1
+ export { A as Adaptor, a as AppState, b as ArrayField, c as ArrayState, d as AsFieldProps, B as BaseData, e as BaseField, C as CacheOpts, f as CheckboxField, g as ComponentConfig, h as ComponentConfigExtensions, i as ComponentConfigParams, j as ComponentData, k as ComponentDataMap, l as ComponentDataOptionalId, m as ComponentMetadata, n as Config, o as ConfigParams, p as Content, q as CustomField, r as CustomFieldRender, D as Data, s as DefaultComponentProps, t as DefaultComponents, u as DefaultRootFieldProps, v as DefaultRootProps, w as DefaultRootRenderProps, x as Direction, y as DndBehavior, z as DndConfig, E as DragAxis, G as ExternalField, H as ExternalFieldWithAdaptor, I as ExtractConfigParams, J as ExtractField, K as Field, L as FieldGroupVariant, M as FieldMetadata, N as FieldProps, O as FieldRenderFunctions, P as FieldTransformFn, Q as FieldTransformFnParams, R as FieldTransforms, S as FieldTypes, T as Fields, U as History, V as IframeConfig, W as InitialHistory, Y as ItemWithId, Z as MappedItem, _ as Metadata, $ as NumberField, a0 as ObjectField, a1 as OnAction, a2 as OverrideKey, a3 as Overrides, a4 as Permissions, a5 as Plugin, a8 as PuckAction, a9 as PuckComponent, aa as PuckContext, ab as PuckMetadata, ac as RadioField, ad as ResolveDataTrigger, ae as RichText, af as RichtextField, ag as RootConfig, ah as RootData, ai as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, aq as UiState, ar as UserGenerics, as as Viewport, at as Viewports, au as WithChildren, av as WithDefaultRootFieldProps, aw as WithId, ax as WithPuckProps, ay as WithSlotProps, az as overrideKeys } from './actions-0EHeGita.mjs';
2
+ export { D as Dictionary } from './index-BPkpm4Az.mjs';
3
3
  export { Action, ActionBar, AutoField, BlocksPluginProps, Button, DragHandle, Drawer, DropZone, FieldGroup, FieldLabel, FieldTab, Group, IconButton, InlineTextField, Label, OutlinePluginProps, Puck, PuckApi, Render, RichTextMenu, Separator, UsePuckData, blocksPlugin, createUsePuck, fieldsPlugin, legacySideBarPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck } from './index.mjs';
4
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BA4pi921.mjs';
4
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BFTZdvq8.mjs';
5
5
  import 'react';
6
6
  import '@tiptap/react';
7
7
  import '@tiptap/extension-blockquote';
@@ -1,7 +1,7 @@
1
- export { A as Adaptor, a as AppState, b as ArrayField, c as ArrayState, d as AsFieldProps, B as BaseData, e as BaseField, C as CacheOpts, f as CheckboxField, g as ComponentConfig, h as ComponentConfigExtensions, i as ComponentConfigParams, j as ComponentData, k as ComponentDataMap, l as ComponentDataOptionalId, m as ComponentMetadata, n as Config, o as ConfigParams, p as Content, q as CustomField, r as CustomFieldRender, D as Data, s as DefaultComponentProps, t as DefaultComponents, u as DefaultRootFieldProps, v as DefaultRootProps, w as DefaultRootRenderProps, x as Direction, y as DndBehavior, z as DndConfig, E as DragAxis, G as ExternalField, H as ExternalFieldWithAdaptor, I as ExtractConfigParams, J as ExtractField, K as Field, L as FieldGroupVariant, M as FieldMetadata, N as FieldProps, O as FieldRenderFunctions, P as FieldTransformFn, Q as FieldTransformFnParams, R as FieldTransforms, S as Fields, T as History, U as IframeConfig, V as InitialHistory, X as ItemWithId, Y as MappedItem, Z as Metadata, _ as NumberField, $ as ObjectField, a0 as OnAction, a1 as OverrideKey, a2 as Overrides, a3 as Permissions, a4 as Plugin, a7 as PuckAction, a8 as PuckComponent, a9 as PuckContext, aa as PuckMetadata, ab as RadioField, ac as ResolveDataTrigger, ad as RichText, ae as RichtextField, af as RootConfig, ag as RootData, ah as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ap as UiState, aq as UserGenerics, ar as Viewport, as as Viewports, at as WithChildren, au as WithDefaultRootFieldProps, av as WithId, aw as WithPuckProps, ax as WithSlotProps, ay as overrideKeys } from './actions-Dgllwd-W.js';
2
- export { D as Dictionary } from './index-CT0X7S4r.js';
1
+ export { A as Adaptor, a as AppState, b as ArrayField, c as ArrayState, d as AsFieldProps, B as BaseData, e as BaseField, C as CacheOpts, f as CheckboxField, g as ComponentConfig, h as ComponentConfigExtensions, i as ComponentConfigParams, j as ComponentData, k as ComponentDataMap, l as ComponentDataOptionalId, m as ComponentMetadata, n as Config, o as ConfigParams, p as Content, q as CustomField, r as CustomFieldRender, D as Data, s as DefaultComponentProps, t as DefaultComponents, u as DefaultRootFieldProps, v as DefaultRootProps, w as DefaultRootRenderProps, x as Direction, y as DndBehavior, z as DndConfig, E as DragAxis, G as ExternalField, H as ExternalFieldWithAdaptor, I as ExtractConfigParams, J as ExtractField, K as Field, L as FieldGroupVariant, M as FieldMetadata, N as FieldProps, O as FieldRenderFunctions, P as FieldTransformFn, Q as FieldTransformFnParams, R as FieldTransforms, S as FieldTypes, T as Fields, U as History, V as IframeConfig, W as InitialHistory, Y as ItemWithId, Z as MappedItem, _ as Metadata, $ as NumberField, a0 as ObjectField, a1 as OnAction, a2 as OverrideKey, a3 as Overrides, a4 as Permissions, a5 as Plugin, a8 as PuckAction, a9 as PuckComponent, aa as PuckContext, ab as PuckMetadata, ac as RadioField, ad as ResolveDataTrigger, ae as RichText, af as RichtextField, ag as RootConfig, ah as RootData, ai as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, aq as UiState, ar as UserGenerics, as as Viewport, at as Viewports, au as WithChildren, av as WithDefaultRootFieldProps, aw as WithId, ax as WithPuckProps, ay as WithSlotProps, az as overrideKeys } from './actions-0EHeGita.js';
2
+ export { D as Dictionary } from './index-UEGrr-Tp.js';
3
3
  export { Action, ActionBar, AutoField, BlocksPluginProps, Button, DragHandle, Drawer, DropZone, FieldGroup, FieldLabel, FieldTab, Group, IconButton, InlineTextField, Label, OutlinePluginProps, Puck, PuckApi, Render, RichTextMenu, Separator, UsePuckData, blocksPlugin, createUsePuck, fieldsPlugin, legacySideBarPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck } from './index.js';
4
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-zKkZGcaE.js';
4
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-vgdtHk4C.js';
5
5
  import 'react';
6
6
  import '@tiptap/react';
7
7
  import '@tiptap/extension-blockquote';
@@ -6042,21 +6042,6 @@ init_react_import();
6042
6042
  // bundle/core.ts
6043
6043
  init_react_import();
6044
6044
 
6045
- // lib/log-agent-message.ts
6046
- init_react_import();
6047
- var hasLogged = false;
6048
- var logAgentMessage = () => {
6049
- if (hasLogged || typeof window !== "undefined") return;
6050
- hasLogged = true;
6051
- import("@vercel/detect-agent").then(({ determineAgent }) => determineAgent()).then(({ isAgent }) => {
6052
- if (!isAgent) return;
6053
- console.warn(
6054
- "[Puck] AI agent detected. This is NOT the Puck you know. You MUST read the Puck README before working with Puck: node_modules/@puckeditor/core/README.md (https://github.com/puckeditor/puck#readme)"
6055
- );
6056
- }).catch(() => {
6057
- });
6058
- };
6059
-
6060
6045
  // types/API/index.ts
6061
6046
  init_react_import();
6062
6047
 
@@ -21380,9 +21365,6 @@ var legacySideBarPlugin = (props = {}) => ({
21380
21365
  }
21381
21366
  )
21382
21367
  });
21383
-
21384
- // bundle/core.ts
21385
- logAgentMessage();
21386
21368
  // Annotate the CommonJS export names for ESM import in node:
21387
21369
  0 && (module.exports = {
21388
21370
  Action,
@@ -20,13 +20,13 @@ import {
20
20
  setDeep,
21
21
  useGetPuck,
22
22
  usePuck
23
- } from "./chunk-P4UAFT7F.mjs";
23
+ } from "./chunk-7CQJTM2E.mjs";
24
24
  import "./chunk-UIJZMSVU.mjs";
25
25
  import {
26
26
  migrate,
27
27
  resolveAllData,
28
28
  transformProps
29
- } from "./chunk-D2RRIQZP.mjs";
29
+ } from "./chunk-3GJJSXCL.mjs";
30
30
  import "./chunk-H635BA2V.mjs";
31
31
  import {
32
32
  RichTextMenu
package/dist/rsc.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { n as Config, aq as UserGenerics, Z as Metadata, R as FieldTransforms } from './actions-Dgllwd-W.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BA4pi921.mjs';
2
+ import { n as Config, ar as UserGenerics, _ as Metadata, R as FieldTransforms } from './actions-0EHeGita.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BFTZdvq8.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 { n as Config, aq as UserGenerics, Z as Metadata, R as FieldTransforms } from './actions-Dgllwd-W.js';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-zKkZGcaE.js';
2
+ import { n as Config, ar as UserGenerics, _ as Metadata, R as FieldTransforms } from './actions-0EHeGita.js';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-vgdtHk4C.js';
4
4
  import 'react';
5
5
  import '@tiptap/react';
6
6
  import '@tiptap/extension-blockquote';
package/dist/rsc.js CHANGED
@@ -370,21 +370,6 @@ __export(rsc_exports, {
370
370
  module.exports = __toCommonJS(rsc_exports);
371
371
  init_react_import();
372
372
 
373
- // lib/log-agent-message.ts
374
- init_react_import();
375
- var hasLogged = false;
376
- var logAgentMessage = () => {
377
- if (hasLogged || typeof window !== "undefined") return;
378
- hasLogged = true;
379
- import("@vercel/detect-agent").then(({ determineAgent }) => determineAgent()).then(({ isAgent }) => {
380
- if (!isAgent) return;
381
- console.warn(
382
- "[Puck] AI agent detected. This is NOT the Puck you know. You MUST read the Puck README before working with Puck: node_modules/@puckeditor/core/README.md (https://github.com/puckeditor/puck#readme)"
383
- );
384
- }).catch(() => {
385
- });
386
- };
387
-
388
373
  // components/ServerRender/index.tsx
389
374
  init_react_import();
390
375
 
@@ -1623,9 +1608,6 @@ function migrate(data, config, migrationOptions) {
1623
1608
  data
1624
1609
  );
1625
1610
  }
1626
-
1627
- // bundle/rsc.tsx
1628
- logAgentMessage();
1629
1611
  // Annotate the CommonJS export names for ESM import in node:
1630
1612
  0 && (module.exports = {
1631
1613
  Render,
package/dist/rsc.mjs CHANGED
@@ -1,11 +1,10 @@
1
1
  import {
2
2
  SlotRenderPure,
3
- logAgentMessage,
4
3
  migrate,
5
4
  resolveAllData,
6
5
  transformProps,
7
6
  use_render_props_default
8
- } from "./chunk-D2RRIQZP.mjs";
7
+ } from "./chunk-3GJJSXCL.mjs";
9
8
  import "./chunk-H635BA2V.mjs";
10
9
  import "./chunk-XMN55NON.mjs";
11
10
  import "./chunk-OT7NKYY4.mjs";
@@ -170,9 +169,6 @@ function Render({
170
169
  }
171
170
  );
172
171
  }
173
-
174
- // bundle/rsc.tsx
175
- logAgentMessage();
176
172
  export {
177
173
  Render,
178
174
  migrate,
@@ -1,4 +1,4 @@
1
- import { n as Config, D as Data, av as WithId, aq as UserGenerics, p as Content, j as ComponentData, t as DefaultComponents, s as DefaultComponentProps, u as DefaultRootFieldProps, Z as Metadata, ag as RootData } from './actions-Dgllwd-W.mjs';
1
+ import { n as Config, D as Data, aw as WithId, ar as UserGenerics, p as Content, j as ComponentData, t as DefaultComponents, s as DefaultComponentProps, u as DefaultRootFieldProps, _ as Metadata, ah as RootData } from './actions-0EHeGita.mjs';
2
2
 
3
3
  type MigrationOptions<UserConfig extends Config> = {
4
4
  migrateDynamicZonesForComponent?: {
@@ -1,4 +1,4 @@
1
- import { n as Config, D as Data, av as WithId, aq as UserGenerics, p as Content, j as ComponentData, t as DefaultComponents, s as DefaultComponentProps, u as DefaultRootFieldProps, Z as Metadata, ag as RootData } from './actions-Dgllwd-W.js';
1
+ import { n as Config, D as Data, aw as WithId, ar as UserGenerics, p as Content, j as ComponentData, t as DefaultComponents, s as DefaultComponentProps, u as DefaultRootFieldProps, _ as Metadata, ah as RootData } from './actions-0EHeGita.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": "@puckeditor/core",
3
- "version": "0.24.1-canary.f6828352",
3
+ "version": "0.25.0-canary.2c02416e",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Chris Villa <chris@puckeditor.com>",
6
6
  "repository": {
@@ -30,9 +30,6 @@
30
30
  "private": false,
31
31
  "main": "./dist/index.js",
32
32
  "types": "./dist/index.d.ts",
33
- "browser": {
34
- "@vercel/detect-agent": false
35
- },
36
33
  "exports": {
37
34
  ".": {
38
35
  "react-server": {
@@ -74,15 +71,13 @@
74
71
  },
75
72
  "files": [
76
73
  "dist",
77
- "CHANGELOG.md",
78
- "CLAUDE.md"
74
+ "CHANGELOG.md"
79
75
  ],
80
76
  "devDependencies": {
81
77
  "@juggle/resize-observer": "^3.4.0",
82
78
  "@testing-library/dom": "^10.4.0",
83
79
  "@testing-library/jest-dom": "^6.6.3",
84
80
  "@testing-library/react": "^16.1.0",
85
- "@types/deep-diff": "^1.0.3",
86
81
  "@types/flat": "^5.0.5",
87
82
  "@types/jest": "^29.5.14",
88
83
  "@types/object-hash": "^3.0.6",
@@ -99,6 +94,8 @@
99
94
  "lucide-react": "^0.468.0",
100
95
  "postcss": "^8.5.6",
101
96
  "postcss-modules": "^6.0.1",
97
+ "react": "^19.2.1",
98
+ "react-dom": "^19.2.1",
102
99
  "ts-jest": "^29.3.4",
103
100
  "ts-node": "^10.9.2",
104
101
  "tsconfig": "0.0.0",
@@ -135,8 +132,6 @@
135
132
  "@tiptap/html": "^3.30.4",
136
133
  "@tiptap/pm": "^3.30.4",
137
134
  "@tiptap/react": "^3.30.4",
138
- "@vercel/detect-agent": "^1.2.7",
139
- "deep-diff": "^1.0.2",
140
135
  "fast-equals": "5.2.2",
141
136
  "flat": "^5.0.2",
142
137
  "happy-dom": "^21.0.4",
@@ -150,7 +145,7 @@
150
145
  },
151
146
  "scripts": {
152
147
  "lint": "eslint \"**/*.ts*\"",
153
- "build": "rm -rf dist && tsup bundle/index.ts bundle/rsc.tsx bundle/no-external.ts bundle/internal.ts && cp CLAUDE.package.md dist/CLAUDE.md",
148
+ "build": "rm -rf dist && tsup bundle/index.ts bundle/rsc.tsx bundle/no-external.ts bundle/internal.ts",
154
149
  "test": "jest"
155
150
  }
156
151
  }
package/CLAUDE.md DELETED
@@ -1,10 +0,0 @@
1
- <!--
2
- Published as CLAUDE.md and dist/CLAUDE.md (see the prepack and build scripts).
3
- Agents spot them when listing the package or its dist folder, and Claude Code
4
- loads each one when an agent reads a file beside it. It's kept under another
5
- name in the repo so it doesn't load for agents working on Puck itself.
6
- -->
7
-
8
- # @puckeditor/core
9
-
10
- This is NOT the Puck you know. You MUST read the Puck README before working with Puck: node_modules/@puckeditor/core/README.md (https://github.com/puckeditor/puck#readme)
package/dist/CLAUDE.md DELETED
@@ -1,10 +0,0 @@
1
- <!--
2
- Published as CLAUDE.md and dist/CLAUDE.md (see the prepack and build scripts).
3
- Agents spot them when listing the package or its dist folder, and Claude Code
4
- loads each one when an agent reads a file beside it. It's kept under another
5
- name in the repo so it doesn't load for agents working on Puck itself.
6
- -->
7
-
8
- # @puckeditor/core
9
-
10
- This is NOT the Puck you know. You MUST read the Puck README before working with Puck: node_modules/@puckeditor/core/README.md (https://github.com/puckeditor/puck#readme)