@puckeditor/core 0.24.0-canary.ea71a404 → 0.24.0-canary.edf8229c

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
@@ -82,6 +82,34 @@ export function Page() {
82
82
  }
83
83
  ```
84
84
 
85
+ ## CLI
86
+
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:
88
+
89
+ ```sh
90
+ npx @puckeditor/cli init
91
+ ```
92
+
93
+ See the [CLI docs](https://puckeditor.com/docs/cli) for agent usage.
94
+
95
+ ## For agents
96
+
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:
98
+
99
+ ```sh
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
103
+ ```
104
+
105
+ Agents with skill support can install the [Puck skill](https://github.com/puckeditor/skills):
106
+
107
+ ```sh
108
+ npx skills add puckeditor/skills --skill puck
109
+ ```
110
+
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.
112
+
85
113
  ## Recipes
86
114
 
87
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):
@@ -93,7 +121,12 @@ npx create-puck-app my-app
93
121
  Available recipes include:
94
122
 
95
123
  - [**next**](https://github.com/puckeditor/puck/tree/main/recipes/next): Next.js example, using App Router and static page generation
96
- - [**react-router**](https://github.com/puckeditor/puck/tree/main/recipes/react-router): React Router v7 app example, using dynamic routes to create pages at any level
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
97
130
 
98
131
  ## Community
99
132
 
@@ -4,16 +4,16 @@ import {
4
4
  import {
5
5
  EditorInner,
6
6
  LoadedRichTextMenu
7
- } from "./chunk-3CZRCHCU.mjs";
7
+ } from "./chunk-PFNS3HDM.mjs";
8
8
  import "./chunk-H635BA2V.mjs";
9
- import "./chunk-3OECBDNE.mjs";
10
- import "./chunk-6MVGICFW.mjs";
11
- import "./chunk-3YSLTDRT.mjs";
12
- import "./chunk-3USGHYFG.mjs";
9
+ import "./chunk-CKY5CKSU.mjs";
10
+ import "./chunk-EHTFXUBU.mjs";
11
+ import "./chunk-NBTE2AWP.mjs";
12
+ import "./chunk-PJDBGMYG.mjs";
13
13
  import {
14
14
  useAppStore,
15
15
  useAppStoreApi
16
- } from "./chunk-MVHLONPE.mjs";
16
+ } from "./chunk-XTIXX7I3.mjs";
17
17
  import "./chunk-Z2MS6UIF.mjs";
18
18
  import "./chunk-ZRAERXB4.mjs";
19
19
  import "./chunk-OT7NKYY4.mjs";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useAlignOptions
3
- } from "./chunk-6MVGICFW.mjs";
3
+ } from "./chunk-EHTFXUBU.mjs";
4
4
  import {
5
5
  useHeadingOptions
6
- } from "./chunk-3YSLTDRT.mjs";
6
+ } from "./chunk-NBTE2AWP.mjs";
7
7
  import {
8
8
  useListOptions
9
- } from "./chunk-3USGHYFG.mjs";
9
+ } from "./chunk-PJDBGMYG.mjs";
10
10
  import {
11
11
  Action,
12
12
  AlignCenter,
@@ -29,7 +29,7 @@ import {
29
29
  Underline,
30
30
  useControlContext,
31
31
  useMessage
32
- } from "./chunk-MVHLONPE.mjs";
32
+ } from "./chunk-XTIXX7I3.mjs";
33
33
  import {
34
34
  get_class_name_factory_default
35
35
  } from "./chunk-OT7NKYY4.mjs";
@@ -204,7 +204,7 @@ function AlignSelectFallback() {
204
204
  // components/RichTextMenu/controls/AlignSelect/index.tsx
205
205
  import { jsx as jsx7 } from "react/jsx-runtime";
206
206
  var AlignSelectLoaded = lazy(
207
- () => import("./loaded-O7MEOBEX.mjs").then((m) => ({
207
+ () => import("./loaded-IRK2RWX3.mjs").then((m) => ({
208
208
  default: m.AlignSelectLoaded
209
209
  }))
210
210
  );
@@ -445,7 +445,7 @@ function HeadingSelectFallback() {
445
445
  // components/RichTextMenu/controls/HeadingSelect/index.tsx
446
446
  import { jsx as jsx19 } from "react/jsx-runtime";
447
447
  var HeadingSelectLoaded = lazy2(
448
- () => import("./loaded-2R7Z7VD4.mjs").then((m) => ({
448
+ () => import("./loaded-OZ2F7R6I.mjs").then((m) => ({
449
449
  default: m.HeadingSelectLoaded
450
450
  }))
451
451
  );
@@ -477,7 +477,7 @@ function ListSelectFallback() {
477
477
  // components/RichTextMenu/controls/ListSelect/index.tsx
478
478
  import { jsx as jsx21 } from "react/jsx-runtime";
479
479
  var ListSelectLoaded = lazy3(
480
- () => import("./loaded-4W6LSSFR.mjs").then((m) => ({
480
+ () => import("./loaded-TUHXN2Y2.mjs").then((m) => ({
481
481
  default: m.ListSelectLoaded
482
482
  }))
483
483
  );
@@ -4,7 +4,7 @@ import {
4
4
  AlignLeft,
5
5
  AlignRight,
6
6
  useMessage
7
- } from "./chunk-MVHLONPE.mjs";
7
+ } from "./chunk-XTIXX7I3.mjs";
8
8
  import {
9
9
  init_react_import
10
10
  } from "./chunk-M6W7YEVX.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EditorInner,
3
3
  LoadedRichTextMenu
4
- } from "./chunk-3CZRCHCU.mjs";
4
+ } from "./chunk-PFNS3HDM.mjs";
5
5
  import {
6
6
  RichTextRenderFallback,
7
7
  SlotRender,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-XAJK3MOG.mjs";
15
15
  import {
16
16
  LoadedRichTextMenuInner
17
- } from "./chunk-3OECBDNE.mjs";
17
+ } from "./chunk-CKY5CKSU.mjs";
18
18
  import {
19
19
  ActionBar,
20
20
  ChevronDown,
@@ -71,7 +71,7 @@ import {
71
71
  useRegisterHistorySlice,
72
72
  useRegisterPermissionsSlice,
73
73
  useResetAutoZoom
74
- } from "./chunk-MVHLONPE.mjs";
74
+ } from "./chunk-XTIXX7I3.mjs";
75
75
  import {
76
76
  generateId,
77
77
  getItem,
@@ -2070,7 +2070,7 @@ EditorFallback.displayName = "EditorFallback";
2070
2070
  // components/AutoField/fields/RichtextField/index.tsx
2071
2071
  import { Fragment as Fragment5, jsx as jsx18 } from "react/jsx-runtime";
2072
2072
  var Editor = lazy(
2073
- () => import("./Editor-IOB6CBHE.mjs").then((m) => ({
2073
+ () => import("./Editor-QKVNUOPH.mjs").then((m) => ({
2074
2074
  default: m.Editor
2075
2075
  }))
2076
2076
  );
@@ -3333,13 +3333,14 @@ var DraggableComponent = ({
3333
3333
  /* @__PURE__ */ jsxs8(
3334
3334
  "div",
3335
3335
  {
3336
- className: getClassName14({
3336
+ className: `${getClassName14({
3337
3337
  isSelected,
3338
3338
  isDragging: thisIsDragging,
3339
3339
  hover: hover || indicativeHover
3340
- }),
3340
+ })} notranslate`,
3341
3341
  style: __spreadValues({}, style),
3342
3342
  "data-puck-overlay": true,
3343
+ translate: "no",
3343
3344
  children: [
3344
3345
  debug,
3345
3346
  isLoading && /* @__PURE__ */ jsx22("div", { className: getClassName14("loadingOverlay"), children: /* @__PURE__ */ jsx22(Loader, {}) }),
@@ -5310,7 +5311,7 @@ import {
5310
5311
  } from "react";
5311
5312
  import { jsx as jsx28 } from "react/jsx-runtime";
5312
5313
  var Editor2 = lazy2(
5313
- () => import("./Editor-IOB6CBHE.mjs").then((m) => ({
5314
+ () => import("./Editor-QKVNUOPH.mjs").then((m) => ({
5314
5315
  default: m.Editor
5315
5316
  }))
5316
5317
  );
@@ -11736,7 +11737,7 @@ function AutoFrame(_a) {
11736
11737
  __spreadProps(__spreadValues({}, props), {
11737
11738
  className,
11738
11739
  id,
11739
- srcDoc: '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry></div></body></html>',
11740
+ srcDoc: '<!DOCTYPE html><html><head></head><body><div id="frame-root" data-puck-entry translate="no" class="notranslate"></div></body></html>',
11740
11741
  ref: frameRef,
11741
11742
  onLoad: () => {
11742
11743
  setLoaded(true);
@@ -11924,9 +11925,10 @@ var Preview2 = ({ id = "puck-preview" }) => {
11924
11925
  "div",
11925
11926
  {
11926
11927
  id: "preview-frame",
11927
- className: getClassName35("frame"),
11928
+ className: `${getClassName35("frame")} notranslate`,
11928
11929
  ref,
11929
11930
  "data-puck-entry": true,
11931
+ translate: "no",
11930
11932
  children: inner
11931
11933
  }
11932
11934
  )
@@ -13304,10 +13306,11 @@ var Layout = ({ children }) => {
13304
13306
  return /* @__PURE__ */ jsxs30(
13305
13307
  "div",
13306
13308
  {
13307
- className: `Puck ${getClassName44({
13309
+ className: `Puck notranslate ${getClassName44({
13308
13310
  hidePlugins: hasLegacySideBarPlugin
13309
13311
  })}`,
13310
13312
  id: instanceId,
13313
+ translate: "no",
13311
13314
  style: { height, visibility: "hidden" },
13312
13315
  children: [
13313
13316
  /* @__PURE__ */ jsx67(
@@ -6,7 +6,7 @@ import {
6
6
  Heading5,
7
7
  Heading6,
8
8
  useMessage
9
- } from "./chunk-MVHLONPE.mjs";
9
+ } from "./chunk-XTIXX7I3.mjs";
10
10
  import {
11
11
  init_react_import
12
12
  } from "./chunk-M6W7YEVX.mjs";
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-H635BA2V.mjs";
4
4
  import {
5
5
  LoadedRichTextMenuInner
6
- } from "./chunk-3OECBDNE.mjs";
6
+ } from "./chunk-CKY5CKSU.mjs";
7
7
  import {
8
8
  useAppStore,
9
9
  useAppStoreApi
10
- } from "./chunk-MVHLONPE.mjs";
10
+ } from "./chunk-XTIXX7I3.mjs";
11
11
  import {
12
12
  get_class_name_factory_default
13
13
  } from "./chunk-OT7NKYY4.mjs";
@@ -100,7 +100,7 @@ init_react_import();
100
100
  import { lazy, Suspense } from "react";
101
101
  import { jsx as jsx2 } from "react/jsx-runtime";
102
102
  var LoadedRichTextMenuFull = lazy(
103
- () => import("./full-G3HMYLKK.mjs").then((m) => ({
103
+ () => import("./full-3BPAMA2C.mjs").then((m) => ({
104
104
  default: m.LoadedRichTextMenuFull
105
105
  }))
106
106
  );
@@ -2,7 +2,7 @@ import {
2
2
  List,
3
3
  ListOrdered,
4
4
  useMessage
5
- } from "./chunk-MVHLONPE.mjs";
5
+ } from "./chunk-XTIXX7I3.mjs";
6
6
  import {
7
7
  init_react_import
8
8
  } from "./chunk-M6W7YEVX.mjs";