@puckeditor/core 0.24.1-canary.f6828352 → 0.24.1
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/CHANGELOG.md +18 -0
- package/CLAUDE.md +3 -8
- package/README.md +22 -38
- package/bin/cli.mjs +25 -0
- package/dist/AGENTS.md +5 -0
- package/dist/CLAUDE.md +3 -8
- package/dist/{actions-Dgllwd-W.d.mts → actions-0EHeGita.d.mts} +14 -2
- package/dist/{actions-Dgllwd-W.d.ts → actions-0EHeGita.d.ts} +14 -2
- package/dist/{chunk-D2RRIQZP.mjs → chunk-6J54T4F5.mjs} +1 -1
- package/dist/{chunk-P4UAFT7F.mjs → chunk-T2XFCN6B.mjs} +20 -14
- package/dist/{index-DDjbEIfs.d.mts → index-BPkpm4Az.d.mts} +1 -1
- package/dist/{index-CT0X7S4r.d.ts → index-UEGrr-Tp.d.ts} +1 -1
- package/dist/index.d.mts +4 -23
- package/dist/index.d.ts +4 -23
- package/dist/index.js +19 -13
- package/dist/index.mjs +2 -2
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/no-external.d.mts +3 -3
- package/dist/no-external.d.ts +3 -3
- package/dist/no-external.js +19 -13
- package/dist/no-external.mjs +2 -2
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +1 -1
- package/dist/rsc.mjs +1 -1
- package/dist/{walk-tree-BA4pi921.d.mts → walk-tree-BFTZdvq8.d.mts} +1 -1
- package/dist/{walk-tree-zKkZGcaE.d.ts → walk-tree-vgdtHk4C.d.ts} +1 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
<!--__CHANGELOG_ENTRY__-->
|
|
4
4
|
|
|
5
|
+
## [0.24.1](https://github.com/puckeditor/puck/compare/v0.24.0...v0.24.1) (2026-11-18)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* allow developers to add new field types via modules ([81566a7](https://github.com/puckeditor/puck/commit/81566a77c87e307ce7d015b0d9089ba928360edc))
|
|
11
|
+
* clean up resize handle listeners on unmount ([caa28d2](https://github.com/puckeditor/puck/commit/caa28d2bafe0b028348d041efe552fa92be972dc))
|
|
12
|
+
* don't crash richtext editor when revealed inside <Activity> ([2978ed6](https://github.com/puckeditor/puck/commit/2978ed6a1e1eeffd379f3e491835aa33184e47ef))
|
|
13
|
+
* hide sidebar resize handle when sidebar is not visible ([7fabe52](https://github.com/puckeditor/puck/commit/7fabe52bc8e07892fa234182b08ce1452cb8687a))
|
|
14
|
+
* respect user-defined Dictionary type extensions ([609983d](https://github.com/puckeditor/puck/commit/609983dba9293aa63bef2921a9b20759ff1a758e))
|
|
15
|
+
* show headings in heading-analyzer on first load ([d05542f](https://github.com/puckeditor/puck/commit/d05542f4ddc3ade0275860cb91756dadd7ea791a))
|
|
16
|
+
|
|
17
|
+
### Experimental
|
|
18
|
+
|
|
19
|
+
* add agent-friendly Puck CLI to @puckeditor/core bin
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
5
23
|
## [0.24.0](https://github.com/measuredco/puck/compare/v0.23.0...v0.24.0) (2026-10-29)
|
|
6
24
|
|
|
7
25
|
|
package/CLAUDE.md
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
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
1
|
# @puckeditor/core
|
|
9
2
|
|
|
10
|
-
This is NOT the Puck you know. You MUST read the Puck README before working with Puck: node_modules/@puckeditor/core/README.md
|
|
3
|
+
This is NOT the Puck you know. You MUST read the Puck README before working with Puck: node_modules/@puckeditor/core/README.md
|
|
4
|
+
|
|
5
|
+
Read the Puck CHANGELOG for updates: node_modules/@puckeditor/core/CHANGELOG.md
|
package/README.md
CHANGED
|
@@ -23,31 +23,21 @@ _The visual editor for React_
|
|
|
23
23
|
|
|
24
24
|
## What is Puck?
|
|
25
25
|
|
|
26
|
-
Puck is an open-source visual editor for React.
|
|
26
|
+
Puck is an open-source visual editor for React. Build drag-and-drop interfaces with your own components.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Embed Puck as a React component in your existing application. You own your components and data, with no vendor lock-in.
|
|
29
29
|
|
|
30
|
-
Puck
|
|
30
|
+
Puck's [MIT license](https://github.com/puckeditor/puck?tab=MIT-1-ov-file#readme) permits internal and commercial use.
|
|
31
31
|
|
|
32
|
-
## Quick
|
|
32
|
+
## Quick Start
|
|
33
33
|
|
|
34
|
-
|
|
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
|
-
Install the package:
|
|
34
|
+
### 1. Install the package
|
|
45
35
|
|
|
46
36
|
```sh
|
|
47
37
|
npm i @puckeditor/core --save
|
|
48
38
|
```
|
|
49
39
|
|
|
50
|
-
Render the editor
|
|
40
|
+
### 2. Render the editor
|
|
51
41
|
|
|
52
42
|
```jsx
|
|
53
43
|
// Editor.jsx
|
|
@@ -72,8 +62,7 @@ const config = {
|
|
|
72
62
|
// Describe the initial data
|
|
73
63
|
const initialData = {};
|
|
74
64
|
|
|
75
|
-
//
|
|
76
|
-
// to store, version and publish them with Puck Pages
|
|
65
|
+
// Save pages to your backend (see step 4)
|
|
77
66
|
const save = (data) => {};
|
|
78
67
|
|
|
79
68
|
// Render Puck editor
|
|
@@ -82,7 +71,7 @@ export function Editor() {
|
|
|
82
71
|
}
|
|
83
72
|
```
|
|
84
73
|
|
|
85
|
-
Render the page
|
|
74
|
+
### 3. Render the page
|
|
86
75
|
|
|
87
76
|
```jsx
|
|
88
77
|
// Page.jsx
|
|
@@ -93,49 +82,44 @@ export function Page() {
|
|
|
93
82
|
}
|
|
94
83
|
```
|
|
95
84
|
|
|
96
|
-
|
|
85
|
+
### 4. Choose a backend (optional)
|
|
86
|
+
|
|
87
|
+
Puck is designed to integrate into your existing backend. If you don't already have one or are building a new app, consider Puck Cloud.
|
|
97
88
|
|
|
98
89
|
## Puck Cloud
|
|
99
90
|
|
|
100
|
-
Puck Cloud is
|
|
91
|
+
[Puck Cloud](https://puckeditor.com/docs/cloud/overview) is our modular, hosted backend for Puck with a versioned page database, managed authentication, and much more. It's best for when you have no existing backend or database, and is free to start.
|
|
101
92
|
|
|
102
|
-
|
|
103
|
-
- **Auth**: sign editors in
|
|
104
|
-
- **Assets**: store images and files
|
|
105
|
-
- **AI**: generate pages with an AI copilot
|
|
93
|
+
To configure it, run the Puck CLI, and select the modules you require:
|
|
106
94
|
|
|
107
|
-
|
|
95
|
+
```sh
|
|
96
|
+
npx @puckeditor/core init
|
|
97
|
+
```
|
|
108
98
|
|
|
109
99
|
### Pages
|
|
110
100
|
|
|
111
|
-
[Puck Pages](
|
|
101
|
+
[Puck Pages](https://puckeditor.com/docs/cloud/pages/overview) is a hosted page store built for Puck, providing version history and data migrations.
|
|
112
102
|
|
|
113
103
|
```sh
|
|
114
|
-
npx @puckeditor/
|
|
104
|
+
npx @puckeditor/core add pages
|
|
115
105
|
```
|
|
116
106
|
|
|
117
|
-
Or [set it up manually](https://puckeditor.com/docs/…).
|
|
118
|
-
|
|
119
107
|
### Auth
|
|
120
108
|
|
|
121
|
-
[Puck Auth](
|
|
109
|
+
[Puck Auth](https://puckeditor.com/docs/cloud/auth/overview) provides managed authentication for Puck, allowing users to sign-in with a Puck Cloud account.
|
|
122
110
|
|
|
123
111
|
```sh
|
|
124
|
-
npx @puckeditor/
|
|
112
|
+
npx @puckeditor/core add auth
|
|
125
113
|
```
|
|
126
114
|
|
|
127
|
-
Or [set it up manually](https://puckeditor.com/docs/…).
|
|
128
|
-
|
|
129
115
|
### AI
|
|
130
116
|
|
|
131
|
-
[Puck AI](https://puckeditor.com/docs/ai/overview) is an AI agent for Puck for generating interfaces directly from the editor.
|
|
117
|
+
[Puck AI](https://puckeditor.com/docs/cloud/ai/overview) is an AI agent for Puck for generating interfaces directly from the editor.
|
|
132
118
|
|
|
133
119
|
```sh
|
|
134
|
-
npx @puckeditor/
|
|
120
|
+
npx @puckeditor/core add ai
|
|
135
121
|
```
|
|
136
122
|
|
|
137
|
-
Or [set it up manually](https://puckeditor.com/docs/…).
|
|
138
|
-
|
|
139
123
|
## Community
|
|
140
124
|
|
|
141
125
|
- [Discord server](https://discord.gg/D9e4E3MQVZ) for discussions
|
package/bin/cli.mjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Runs the Puck CLI (@puckeditor/cli), which is installed as a dependency of
|
|
3
|
+
// @puckeditor/core, so `npx @puckeditor/core <command>` uses the version that
|
|
4
|
+
// ships with the installed package instead of fetching one.
|
|
5
|
+
import { spawnSync } from "node:child_process";
|
|
6
|
+
import { createRequire } from "node:module";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
|
|
9
|
+
const require = createRequire(import.meta.url);
|
|
10
|
+
const pkgPath = require.resolve("@puckeditor/cli/package.json");
|
|
11
|
+
const { bin } = require(pkgPath);
|
|
12
|
+
const binPath = path.join(
|
|
13
|
+
path.dirname(pkgPath),
|
|
14
|
+
typeof bin === "string" ? bin : bin.puck
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
const { status, signal } = spawnSync(
|
|
18
|
+
process.execPath,
|
|
19
|
+
[binPath, ...process.argv.slice(2)],
|
|
20
|
+
{ stdio: "inherit" }
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
if (signal) process.kill(process.pid, signal);
|
|
24
|
+
|
|
25
|
+
process.exit(status ?? 1);
|
package/dist/AGENTS.md
ADDED
package/dist/CLAUDE.md
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
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
1
|
# @puckeditor/core
|
|
9
2
|
|
|
10
|
-
This is NOT the Puck you know. You MUST read the Puck README before working with Puck: node_modules/@puckeditor/core/README.md
|
|
3
|
+
This is NOT the Puck you know. You MUST read the Puck README before working with Puck: node_modules/@puckeditor/core/README.md
|
|
4
|
+
|
|
5
|
+
Read the Puck CHANGELOG for updates: node_modules/@puckeditor/core/CHANGELOG.md
|
|
@@ -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
|
|
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
|
|
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 };
|
|
@@ -32,7 +32,7 @@ var logAgentMessage = () => {
|
|
|
32
32
|
import("@vercel/detect-agent").then(({ determineAgent }) => determineAgent()).then(({ isAgent }) => {
|
|
33
33
|
if (!isAgent) return;
|
|
34
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
|
|
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"
|
|
36
36
|
);
|
|
37
37
|
}).catch(() => {
|
|
38
38
|
});
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getSlotTransform,
|
|
12
12
|
logAgentMessage,
|
|
13
13
|
use_render_props_default
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6J54T4F5.mjs";
|
|
15
15
|
import {
|
|
16
16
|
LoadedRichTextMenuInner
|
|
17
17
|
} from "./chunk-5L3MP6BU.mjs";
|
|
@@ -13985,7 +13985,7 @@ init_react_import();
|
|
|
13985
13985
|
|
|
13986
13986
|
// components/Puck/components/ResizeHandle/index.tsx
|
|
13987
13987
|
init_react_import();
|
|
13988
|
-
import { useCallback as useCallback29, useRef as useRef19 } from "react";
|
|
13988
|
+
import { useCallback as useCallback29, useEffect as useEffect32, useRef as useRef19 } from "react";
|
|
13989
13989
|
|
|
13990
13990
|
// css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/ResizeHandle/styles.module.css#css-module
|
|
13991
13991
|
init_react_import();
|
|
@@ -14006,6 +14006,7 @@ var ResizeHandle = ({
|
|
|
14006
14006
|
const isDragging = useRef19(false);
|
|
14007
14007
|
const startX = useRef19(0);
|
|
14008
14008
|
const startWidth = useRef19(0);
|
|
14009
|
+
const endDrag = useRef19(null);
|
|
14009
14010
|
const handleMouseMove = useCallback29(
|
|
14010
14011
|
(e) => {
|
|
14011
14012
|
if (!isDragging.current) return;
|
|
@@ -14018,18 +14019,10 @@ var ResizeHandle = ({
|
|
|
14018
14019
|
[onResize, position]
|
|
14019
14020
|
);
|
|
14020
14021
|
const handleMouseUp = useCallback29(() => {
|
|
14021
|
-
var _a;
|
|
14022
|
+
var _a, _b;
|
|
14022
14023
|
if (!isDragging.current) return;
|
|
14023
|
-
|
|
14024
|
-
|
|
14025
|
-
document.body.style.userSelect = "";
|
|
14026
|
-
const overlay = document.getElementById("resize-overlay");
|
|
14027
|
-
if (overlay) {
|
|
14028
|
-
document.body.removeChild(overlay);
|
|
14029
|
-
}
|
|
14030
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
14031
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
14032
|
-
const finalWidth = ((_a = sidebarRef.current) == null ? void 0 : _a.getBoundingClientRect().width) || 0;
|
|
14024
|
+
(_a = endDrag.current) == null ? void 0 : _a.call(endDrag);
|
|
14025
|
+
const finalWidth = ((_b = sidebarRef.current) == null ? void 0 : _b.getBoundingClientRect().width) || 0;
|
|
14033
14026
|
onResizeEnd(finalWidth);
|
|
14034
14027
|
resetAutoZoom();
|
|
14035
14028
|
}, [onResizeEnd]);
|
|
@@ -14047,10 +14040,23 @@ var ResizeHandle = ({
|
|
|
14047
14040
|
document.body.appendChild(overlay);
|
|
14048
14041
|
document.addEventListener("mousemove", handleMouseMove);
|
|
14049
14042
|
document.addEventListener("mouseup", handleMouseUp);
|
|
14043
|
+
endDrag.current = () => {
|
|
14044
|
+
isDragging.current = false;
|
|
14045
|
+
document.body.style.cursor = "";
|
|
14046
|
+
document.body.style.userSelect = "";
|
|
14047
|
+
overlay.remove();
|
|
14048
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
14049
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
14050
|
+
endDrag.current = null;
|
|
14051
|
+
};
|
|
14050
14052
|
e.preventDefault();
|
|
14051
14053
|
},
|
|
14052
14054
|
[position, handleMouseMove, handleMouseUp]
|
|
14053
14055
|
);
|
|
14056
|
+
useEffect32(() => () => {
|
|
14057
|
+
var _a;
|
|
14058
|
+
return (_a = endDrag.current) == null ? void 0 : _a.call(endDrag);
|
|
14059
|
+
}, []);
|
|
14054
14060
|
return /* @__PURE__ */ jsx69(
|
|
14055
14061
|
"div",
|
|
14056
14062
|
{
|
|
@@ -14085,7 +14091,7 @@ var Sidebar = ({
|
|
|
14085
14091
|
children
|
|
14086
14092
|
}
|
|
14087
14093
|
),
|
|
14088
|
-
/* @__PURE__ */ jsx70("div", { className: `${getClassName44("resizeHandle")}`, children: /* @__PURE__ */ jsx70(
|
|
14094
|
+
isVisible && /* @__PURE__ */ jsx70("div", { className: `${getClassName44("resizeHandle")}`, children: /* @__PURE__ */ jsx70(
|
|
14089
14095
|
ResizeHandle,
|
|
14090
14096
|
{
|
|
14091
14097
|
position,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
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,
|
|
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
|
|
3
|
-
import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-
|
|
4
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
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,
|
|
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
|
|
3
|
-
import { D as Dictionary, A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-
|
|
4
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
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
|
@@ -6051,7 +6051,7 @@ var logAgentMessage = () => {
|
|
|
6051
6051
|
import("@vercel/detect-agent").then(({ determineAgent }) => determineAgent()).then(({ isAgent }) => {
|
|
6052
6052
|
if (!isAgent) return;
|
|
6053
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
|
|
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"
|
|
6055
6055
|
);
|
|
6056
6056
|
}).catch(() => {
|
|
6057
6057
|
});
|
|
@@ -20321,6 +20321,7 @@ var ResizeHandle = ({
|
|
|
20321
20321
|
const isDragging = (0, import_react110.useRef)(false);
|
|
20322
20322
|
const startX = (0, import_react110.useRef)(0);
|
|
20323
20323
|
const startWidth = (0, import_react110.useRef)(0);
|
|
20324
|
+
const endDrag = (0, import_react110.useRef)(null);
|
|
20324
20325
|
const handleMouseMove = (0, import_react110.useCallback)(
|
|
20325
20326
|
(e) => {
|
|
20326
20327
|
if (!isDragging.current) return;
|
|
@@ -20333,18 +20334,10 @@ var ResizeHandle = ({
|
|
|
20333
20334
|
[onResize, position]
|
|
20334
20335
|
);
|
|
20335
20336
|
const handleMouseUp = (0, import_react110.useCallback)(() => {
|
|
20336
|
-
var _a;
|
|
20337
|
+
var _a, _b;
|
|
20337
20338
|
if (!isDragging.current) return;
|
|
20338
|
-
|
|
20339
|
-
|
|
20340
|
-
document.body.style.userSelect = "";
|
|
20341
|
-
const overlay = document.getElementById("resize-overlay");
|
|
20342
|
-
if (overlay) {
|
|
20343
|
-
document.body.removeChild(overlay);
|
|
20344
|
-
}
|
|
20345
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
20346
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
20347
|
-
const finalWidth = ((_a = sidebarRef.current) == null ? void 0 : _a.getBoundingClientRect().width) || 0;
|
|
20339
|
+
(_a = endDrag.current) == null ? void 0 : _a.call(endDrag);
|
|
20340
|
+
const finalWidth = ((_b = sidebarRef.current) == null ? void 0 : _b.getBoundingClientRect().width) || 0;
|
|
20348
20341
|
onResizeEnd(finalWidth);
|
|
20349
20342
|
resetAutoZoom();
|
|
20350
20343
|
}, [onResizeEnd]);
|
|
@@ -20362,10 +20355,23 @@ var ResizeHandle = ({
|
|
|
20362
20355
|
document.body.appendChild(overlay);
|
|
20363
20356
|
document.addEventListener("mousemove", handleMouseMove);
|
|
20364
20357
|
document.addEventListener("mouseup", handleMouseUp);
|
|
20358
|
+
endDrag.current = () => {
|
|
20359
|
+
isDragging.current = false;
|
|
20360
|
+
document.body.style.cursor = "";
|
|
20361
|
+
document.body.style.userSelect = "";
|
|
20362
|
+
overlay.remove();
|
|
20363
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
20364
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
20365
|
+
endDrag.current = null;
|
|
20366
|
+
};
|
|
20365
20367
|
e.preventDefault();
|
|
20366
20368
|
},
|
|
20367
20369
|
[position, handleMouseMove, handleMouseUp]
|
|
20368
20370
|
);
|
|
20371
|
+
(0, import_react110.useEffect)(() => () => {
|
|
20372
|
+
var _a;
|
|
20373
|
+
return (_a = endDrag.current) == null ? void 0 : _a.call(endDrag);
|
|
20374
|
+
}, []);
|
|
20369
20375
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
20370
20376
|
"div",
|
|
20371
20377
|
{
|
|
@@ -20403,7 +20409,7 @@ var Sidebar = ({
|
|
|
20403
20409
|
children
|
|
20404
20410
|
}
|
|
20405
20411
|
),
|
|
20406
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `${getClassName50("resizeHandle")}`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
20412
|
+
isVisible && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `${getClassName50("resizeHandle")}`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
20407
20413
|
ResizeHandle,
|
|
20408
20414
|
{
|
|
20409
20415
|
position,
|
package/dist/index.mjs
CHANGED
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
setDeep,
|
|
21
21
|
useGetPuck,
|
|
22
22
|
usePuck
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-T2XFCN6B.mjs";
|
|
24
24
|
import "./chunk-UIJZMSVU.mjs";
|
|
25
25
|
import {
|
|
26
26
|
migrate,
|
|
27
27
|
resolveAllData,
|
|
28
28
|
transformProps
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6J54T4F5.mjs";
|
|
30
30
|
import "./chunk-H635BA2V.mjs";
|
|
31
31
|
import {
|
|
32
32
|
RichTextMenu
|
package/dist/internal.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Reducer } from 'react';
|
|
2
|
-
import { D as Data, a as AppState,
|
|
3
|
-
import { A as AppStore } from './index-
|
|
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';
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Reducer } from 'react';
|
|
2
|
-
import { D as Data, a as AppState,
|
|
3
|
-
import { A as AppStore } from './index-
|
|
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';
|
package/dist/no-external.d.mts
CHANGED
|
@@ -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
|
|
2
|
-
export { D as Dictionary } from './index-
|
|
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-
|
|
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';
|
package/dist/no-external.d.ts
CHANGED
|
@@ -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
|
|
2
|
-
export { D as Dictionary } from './index-
|
|
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-
|
|
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';
|
package/dist/no-external.js
CHANGED
|
@@ -6051,7 +6051,7 @@ var logAgentMessage = () => {
|
|
|
6051
6051
|
import("@vercel/detect-agent").then(({ determineAgent }) => determineAgent()).then(({ isAgent }) => {
|
|
6052
6052
|
if (!isAgent) return;
|
|
6053
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
|
|
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"
|
|
6055
6055
|
);
|
|
6056
6056
|
}).catch(() => {
|
|
6057
6057
|
});
|
|
@@ -20321,6 +20321,7 @@ var ResizeHandle = ({
|
|
|
20321
20321
|
const isDragging = (0, import_react110.useRef)(false);
|
|
20322
20322
|
const startX = (0, import_react110.useRef)(0);
|
|
20323
20323
|
const startWidth = (0, import_react110.useRef)(0);
|
|
20324
|
+
const endDrag = (0, import_react110.useRef)(null);
|
|
20324
20325
|
const handleMouseMove = (0, import_react110.useCallback)(
|
|
20325
20326
|
(e) => {
|
|
20326
20327
|
if (!isDragging.current) return;
|
|
@@ -20333,18 +20334,10 @@ var ResizeHandle = ({
|
|
|
20333
20334
|
[onResize, position]
|
|
20334
20335
|
);
|
|
20335
20336
|
const handleMouseUp = (0, import_react110.useCallback)(() => {
|
|
20336
|
-
var _a;
|
|
20337
|
+
var _a, _b;
|
|
20337
20338
|
if (!isDragging.current) return;
|
|
20338
|
-
|
|
20339
|
-
|
|
20340
|
-
document.body.style.userSelect = "";
|
|
20341
|
-
const overlay = document.getElementById("resize-overlay");
|
|
20342
|
-
if (overlay) {
|
|
20343
|
-
document.body.removeChild(overlay);
|
|
20344
|
-
}
|
|
20345
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
20346
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
20347
|
-
const finalWidth = ((_a = sidebarRef.current) == null ? void 0 : _a.getBoundingClientRect().width) || 0;
|
|
20339
|
+
(_a = endDrag.current) == null ? void 0 : _a.call(endDrag);
|
|
20340
|
+
const finalWidth = ((_b = sidebarRef.current) == null ? void 0 : _b.getBoundingClientRect().width) || 0;
|
|
20348
20341
|
onResizeEnd(finalWidth);
|
|
20349
20342
|
resetAutoZoom();
|
|
20350
20343
|
}, [onResizeEnd]);
|
|
@@ -20362,10 +20355,23 @@ var ResizeHandle = ({
|
|
|
20362
20355
|
document.body.appendChild(overlay);
|
|
20363
20356
|
document.addEventListener("mousemove", handleMouseMove);
|
|
20364
20357
|
document.addEventListener("mouseup", handleMouseUp);
|
|
20358
|
+
endDrag.current = () => {
|
|
20359
|
+
isDragging.current = false;
|
|
20360
|
+
document.body.style.cursor = "";
|
|
20361
|
+
document.body.style.userSelect = "";
|
|
20362
|
+
overlay.remove();
|
|
20363
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
20364
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
20365
|
+
endDrag.current = null;
|
|
20366
|
+
};
|
|
20365
20367
|
e.preventDefault();
|
|
20366
20368
|
},
|
|
20367
20369
|
[position, handleMouseMove, handleMouseUp]
|
|
20368
20370
|
);
|
|
20371
|
+
(0, import_react110.useEffect)(() => () => {
|
|
20372
|
+
var _a;
|
|
20373
|
+
return (_a = endDrag.current) == null ? void 0 : _a.call(endDrag);
|
|
20374
|
+
}, []);
|
|
20369
20375
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
20370
20376
|
"div",
|
|
20371
20377
|
{
|
|
@@ -20403,7 +20409,7 @@ var Sidebar = ({
|
|
|
20403
20409
|
children
|
|
20404
20410
|
}
|
|
20405
20411
|
),
|
|
20406
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `${getClassName50("resizeHandle")}`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
20412
|
+
isVisible && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `${getClassName50("resizeHandle")}`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
20407
20413
|
ResizeHandle,
|
|
20408
20414
|
{
|
|
20409
20415
|
position,
|
package/dist/no-external.mjs
CHANGED
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
setDeep,
|
|
21
21
|
useGetPuck,
|
|
22
22
|
usePuck
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-T2XFCN6B.mjs";
|
|
24
24
|
import "./chunk-UIJZMSVU.mjs";
|
|
25
25
|
import {
|
|
26
26
|
migrate,
|
|
27
27
|
resolveAllData,
|
|
28
28
|
transformProps
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6J54T4F5.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,
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
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,
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
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
|
@@ -379,7 +379,7 @@ var logAgentMessage = () => {
|
|
|
379
379
|
import("@vercel/detect-agent").then(({ determineAgent }) => determineAgent()).then(({ isAgent }) => {
|
|
380
380
|
if (!isAgent) return;
|
|
381
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
|
|
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"
|
|
383
383
|
);
|
|
384
384
|
}).catch(() => {
|
|
385
385
|
});
|
package/dist/rsc.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Config, D as Data,
|
|
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,
|
|
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
|
|
3
|
+
"version": "0.24.1",
|
|
4
4
|
"description": "The open-source visual editor for React",
|
|
5
5
|
"author": "Chris Villa <chris@puckeditor.com>",
|
|
6
6
|
"repository": {
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
"private": false,
|
|
31
31
|
"main": "./dist/index.js",
|
|
32
32
|
"types": "./dist/index.d.ts",
|
|
33
|
+
"bin": {
|
|
34
|
+
"@puckeditor/core": "./bin/cli.mjs"
|
|
35
|
+
},
|
|
33
36
|
"browser": {
|
|
34
37
|
"@vercel/detect-agent": false
|
|
35
38
|
},
|
|
@@ -73,6 +76,7 @@
|
|
|
73
76
|
"node": ">=20.0.0"
|
|
74
77
|
},
|
|
75
78
|
"files": [
|
|
79
|
+
"bin",
|
|
76
80
|
"dist",
|
|
77
81
|
"CHANGELOG.md",
|
|
78
82
|
"CLAUDE.md"
|
|
@@ -82,7 +86,6 @@
|
|
|
82
86
|
"@testing-library/dom": "^10.4.0",
|
|
83
87
|
"@testing-library/jest-dom": "^6.6.3",
|
|
84
88
|
"@testing-library/react": "^16.1.0",
|
|
85
|
-
"@types/deep-diff": "^1.0.3",
|
|
86
89
|
"@types/flat": "^5.0.5",
|
|
87
90
|
"@types/jest": "^29.5.14",
|
|
88
91
|
"@types/object-hash": "^3.0.6",
|
|
@@ -113,6 +116,7 @@
|
|
|
113
116
|
"@dnd-kit/helpers": "0.4.0",
|
|
114
117
|
"@dnd-kit/react": "0.4.0",
|
|
115
118
|
"@dnd-kit/state": "0.4.0",
|
|
119
|
+
"@puckeditor/cli": "latest",
|
|
116
120
|
"@radix-ui/react-popover": "^1.1.15",
|
|
117
121
|
"@tanstack/react-virtual": "^3.13.9",
|
|
118
122
|
"@tiptap/core": "^3.30.4",
|
|
@@ -136,7 +140,6 @@
|
|
|
136
140
|
"@tiptap/pm": "^3.30.4",
|
|
137
141
|
"@tiptap/react": "^3.30.4",
|
|
138
142
|
"@vercel/detect-agent": "^1.2.7",
|
|
139
|
-
"deep-diff": "^1.0.2",
|
|
140
143
|
"fast-equals": "5.2.2",
|
|
141
144
|
"flat": "^5.0.2",
|
|
142
145
|
"happy-dom": "^21.0.4",
|
|
@@ -150,7 +153,7 @@
|
|
|
150
153
|
},
|
|
151
154
|
"scripts": {
|
|
152
155
|
"lint": "eslint \"**/*.ts*\"",
|
|
153
|
-
"build": "rm -rf dist && tsup bundle/index.ts bundle/rsc.tsx bundle/no-external.ts bundle/internal.ts && cp
|
|
156
|
+
"build": "rm -rf dist && tsup bundle/index.ts bundle/rsc.tsx bundle/no-external.ts bundle/internal.ts && cp AGENTS.package.md dist/CLAUDE.md && cp AGENTS.package.md dist/AGENTS.md",
|
|
154
157
|
"test": "jest"
|
|
155
158
|
}
|
|
156
159
|
}
|