@delmaredigital/payload-puck 0.3.1 → 0.6.0

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.
Files changed (467) hide show
  1. package/README.md +396 -19
  2. package/dist/admin/EditWithPuckButton.d.ts +1 -1
  3. package/dist/admin/EditWithPuckButton.d.ts.map +1 -1
  4. package/dist/admin/EditWithPuckButton.js +2 -2
  5. package/dist/admin/EditWithPuckButton.js.map +1 -1
  6. package/dist/admin/EditWithPuckCell.js +1 -1
  7. package/dist/admin/EditWithPuckCell.js.map +1 -1
  8. package/dist/admin/PuckEditorView.d.ts +1 -1
  9. package/dist/admin/PuckEditorView.d.ts.map +1 -1
  10. package/dist/admin/PuckEditorView.js +1 -1
  11. package/dist/admin/PuckEditorView.js.map +1 -1
  12. package/dist/admin/generateAdminComponents.d.ts +1 -1
  13. package/dist/admin/generateAdminComponents.js +1 -1
  14. package/dist/admin/generateAdminComponents.js.map +1 -1
  15. package/dist/ai/collections/AiContext.d.ts +16 -0
  16. package/dist/ai/collections/AiContext.d.ts.map +1 -0
  17. package/dist/ai/collections/AiContext.js +87 -0
  18. package/dist/ai/collections/AiContext.js.map +1 -0
  19. package/dist/ai/collections/AiPrompts.d.ts +10 -0
  20. package/dist/ai/collections/AiPrompts.d.ts.map +1 -0
  21. package/dist/ai/collections/AiPrompts.js +63 -0
  22. package/dist/ai/collections/AiPrompts.js.map +1 -0
  23. package/dist/ai/createAiApiRoutes.d.ts +40 -0
  24. package/dist/ai/createAiApiRoutes.d.ts.map +1 -0
  25. package/dist/ai/createAiApiRoutes.js +106 -0
  26. package/dist/ai/createAiApiRoutes.js.map +1 -0
  27. package/dist/ai/createAiGenerate.d.ts +65 -0
  28. package/dist/ai/createAiGenerate.d.ts.map +1 -0
  29. package/dist/ai/createAiGenerate.js +106 -0
  30. package/dist/ai/createAiGenerate.js.map +1 -0
  31. package/dist/ai/createAiPlugin.d.ts +39 -0
  32. package/dist/ai/createAiPlugin.d.ts.map +1 -0
  33. package/dist/ai/createAiPlugin.js +61 -0
  34. package/dist/ai/createAiPlugin.js.map +1 -0
  35. package/dist/ai/hooks/useAiContext.d.ts +63 -0
  36. package/dist/ai/hooks/useAiContext.d.ts.map +1 -0
  37. package/dist/ai/hooks/useAiContext.js +146 -0
  38. package/dist/ai/hooks/useAiContext.js.map +1 -0
  39. package/dist/ai/hooks/useAiPrompts.d.ts +25 -0
  40. package/dist/ai/hooks/useAiPrompts.d.ts.map +1 -0
  41. package/dist/ai/hooks/useAiPrompts.js +74 -0
  42. package/dist/ai/hooks/useAiPrompts.js.map +1 -0
  43. package/dist/ai/index.d.ts +51 -0
  44. package/dist/ai/index.d.ts.map +1 -0
  45. package/dist/ai/index.js +69 -0
  46. package/dist/ai/index.js.map +1 -0
  47. package/dist/ai/plugins/ContextEditorPanel.d.ts +9 -0
  48. package/dist/ai/plugins/ContextEditorPanel.d.ts.map +1 -0
  49. package/dist/ai/plugins/ContextEditorPanel.js +399 -0
  50. package/dist/ai/plugins/ContextEditorPanel.js.map +1 -0
  51. package/dist/ai/plugins/PromptEditorPanel.d.ts +9 -0
  52. package/dist/ai/plugins/PromptEditorPanel.d.ts.map +1 -0
  53. package/dist/ai/plugins/PromptEditorPanel.js +270 -0
  54. package/dist/ai/plugins/PromptEditorPanel.js.map +1 -0
  55. package/dist/ai/plugins/contextEditorPlugin.d.ts +30 -0
  56. package/dist/ai/plugins/contextEditorPlugin.d.ts.map +1 -0
  57. package/dist/ai/plugins/contextEditorPlugin.js +40 -0
  58. package/dist/ai/plugins/contextEditorPlugin.js.map +1 -0
  59. package/dist/ai/plugins/promptApiRoutes.d.ts +68 -0
  60. package/dist/ai/plugins/promptApiRoutes.d.ts.map +1 -0
  61. package/dist/ai/plugins/promptApiRoutes.js +181 -0
  62. package/dist/ai/plugins/promptApiRoutes.js.map +1 -0
  63. package/dist/ai/plugins/promptEditorPlugin.d.ts +29 -0
  64. package/dist/ai/plugins/promptEditorPlugin.d.ts.map +1 -0
  65. package/dist/ai/plugins/promptEditorPlugin.js +39 -0
  66. package/dist/ai/plugins/promptEditorPlugin.js.map +1 -0
  67. package/dist/ai/presets/componentAiDefaults.d.ts +40 -0
  68. package/dist/ai/presets/componentAiDefaults.d.ts.map +1 -0
  69. package/dist/ai/presets/componentAiDefaults.js +239 -0
  70. package/dist/ai/presets/componentAiDefaults.js.map +1 -0
  71. package/dist/ai/presets/index.d.ts +94 -0
  72. package/dist/ai/presets/index.d.ts.map +1 -0
  73. package/dist/ai/presets/index.js +110 -0
  74. package/dist/ai/presets/index.js.map +1 -0
  75. package/dist/ai/presets/instructions/interactive.d.ts +15 -0
  76. package/dist/ai/presets/instructions/interactive.d.ts.map +1 -0
  77. package/dist/ai/presets/instructions/interactive.js +334 -0
  78. package/dist/ai/presets/instructions/interactive.js.map +1 -0
  79. package/dist/ai/presets/instructions/layout.d.ts +16 -0
  80. package/dist/ai/presets/instructions/layout.d.ts.map +1 -0
  81. package/dist/ai/presets/instructions/layout.js +486 -0
  82. package/dist/ai/presets/instructions/layout.js.map +1 -0
  83. package/dist/ai/presets/instructions/media.d.ts +15 -0
  84. package/dist/ai/presets/instructions/media.d.ts.map +1 -0
  85. package/dist/ai/presets/instructions/media.js +136 -0
  86. package/dist/ai/presets/instructions/media.js.map +1 -0
  87. package/dist/ai/presets/instructions/pagePatterns.d.ts +20 -0
  88. package/dist/ai/presets/instructions/pagePatterns.d.ts.map +1 -0
  89. package/dist/ai/presets/instructions/pagePatterns.js +290 -0
  90. package/dist/ai/presets/instructions/pagePatterns.js.map +1 -0
  91. package/dist/ai/presets/instructions/schemas.d.ts +1247 -0
  92. package/dist/ai/presets/instructions/schemas.d.ts.map +1 -0
  93. package/dist/ai/presets/instructions/schemas.js +240 -0
  94. package/dist/ai/presets/instructions/schemas.js.map +1 -0
  95. package/dist/ai/presets/instructions/typography.d.ts +16 -0
  96. package/dist/ai/presets/instructions/typography.d.ts.map +1 -0
  97. package/dist/ai/presets/instructions/typography.js +192 -0
  98. package/dist/ai/presets/instructions/typography.js.map +1 -0
  99. package/dist/ai/tools/index.d.ts +116 -0
  100. package/dist/ai/tools/index.d.ts.map +1 -0
  101. package/dist/ai/tools/index.js +214 -0
  102. package/dist/ai/tools/index.js.map +1 -0
  103. package/dist/ai/types.d.ts +507 -0
  104. package/dist/ai/types.d.ts.map +1 -0
  105. package/dist/ai/types.js +2 -0
  106. package/dist/ai/types.js.map +1 -0
  107. package/dist/ai/utils/injectAiConfig.d.ts +67 -0
  108. package/dist/ai/utils/injectAiConfig.d.ts.map +1 -0
  109. package/dist/ai/utils/injectAiConfig.js +216 -0
  110. package/dist/ai/utils/injectAiConfig.js.map +1 -0
  111. package/dist/api/createPuckApiRoutesWithId.d.ts.map +1 -1
  112. package/dist/api/createPuckApiRoutesWithId.js +12 -5
  113. package/dist/api/createPuckApiRoutesWithId.js.map +1 -1
  114. package/dist/api/types.d.ts +1 -1
  115. package/dist/api/types.d.ts.map +1 -1
  116. package/dist/components/exports.d.ts +1 -1
  117. package/dist/components/exports.d.ts.map +1 -1
  118. package/dist/components/exports.js +1 -1
  119. package/dist/components/exports.js.map +1 -1
  120. package/dist/components/interactive/Accordion.d.ts +1 -1
  121. package/dist/components/interactive/Accordion.d.ts.map +1 -1
  122. package/dist/components/interactive/Accordion.js +4 -4
  123. package/dist/components/interactive/Accordion.js.map +1 -1
  124. package/dist/components/interactive/Accordion.server.d.ts +1 -1
  125. package/dist/components/interactive/Accordion.server.d.ts.map +1 -1
  126. package/dist/components/interactive/Button.d.ts +1 -1
  127. package/dist/components/interactive/Button.d.ts.map +1 -1
  128. package/dist/components/interactive/Button.server.d.ts +2 -3
  129. package/dist/components/interactive/Button.server.d.ts.map +1 -1
  130. package/dist/components/interactive/Button.server.js +1 -2
  131. package/dist/components/interactive/Button.server.js.map +1 -1
  132. package/dist/components/interactive/Card.d.ts +1 -1
  133. package/dist/components/interactive/Card.d.ts.map +1 -1
  134. package/dist/components/interactive/Card.server.d.ts +1 -1
  135. package/dist/components/interactive/Card.server.d.ts.map +1 -1
  136. package/dist/components/interactive/Divider.d.ts +1 -1
  137. package/dist/components/interactive/Divider.d.ts.map +1 -1
  138. package/dist/components/interactive/Divider.server.d.ts +1 -1
  139. package/dist/components/interactive/Divider.server.d.ts.map +1 -1
  140. package/dist/components/layout/Container.d.ts +3 -1
  141. package/dist/components/layout/Container.d.ts.map +1 -1
  142. package/dist/components/layout/Container.js +16 -2
  143. package/dist/components/layout/Container.js.map +1 -1
  144. package/dist/components/layout/Container.server.d.ts +3 -1
  145. package/dist/components/layout/Container.server.d.ts.map +1 -1
  146. package/dist/components/layout/Container.server.js +5 -2
  147. package/dist/components/layout/Container.server.js.map +1 -1
  148. package/dist/components/layout/Flex.d.ts +3 -1
  149. package/dist/components/layout/Flex.d.ts.map +1 -1
  150. package/dist/components/layout/Flex.js +18 -2
  151. package/dist/components/layout/Flex.js.map +1 -1
  152. package/dist/components/layout/Flex.server.d.ts +3 -1
  153. package/dist/components/layout/Flex.server.d.ts.map +1 -1
  154. package/dist/components/layout/Flex.server.js +5 -2
  155. package/dist/components/layout/Flex.server.js.map +1 -1
  156. package/dist/components/layout/Grid.d.ts +3 -1
  157. package/dist/components/layout/Grid.d.ts.map +1 -1
  158. package/dist/components/layout/Grid.js +15 -2
  159. package/dist/components/layout/Grid.js.map +1 -1
  160. package/dist/components/layout/Grid.server.d.ts +3 -1
  161. package/dist/components/layout/Grid.server.d.ts.map +1 -1
  162. package/dist/components/layout/Grid.server.js +5 -2
  163. package/dist/components/layout/Grid.server.js.map +1 -1
  164. package/dist/components/layout/Section.d.ts +3 -1
  165. package/dist/components/layout/Section.d.ts.map +1 -1
  166. package/dist/components/layout/Section.js +32 -5
  167. package/dist/components/layout/Section.js.map +1 -1
  168. package/dist/components/layout/Section.server.d.ts +3 -1
  169. package/dist/components/layout/Section.server.d.ts.map +1 -1
  170. package/dist/components/layout/Section.server.js +16 -4
  171. package/dist/components/layout/Section.server.js.map +1 -1
  172. package/dist/components/layout/Spacer.d.ts +1 -1
  173. package/dist/components/layout/Spacer.d.ts.map +1 -1
  174. package/dist/components/layout/Spacer.server.d.ts +1 -1
  175. package/dist/components/layout/Spacer.server.d.ts.map +1 -1
  176. package/dist/components/layout/Template.d.ts +1 -1
  177. package/dist/components/layout/Template.d.ts.map +1 -1
  178. package/dist/components/layout/Template.server.d.ts +1 -1
  179. package/dist/components/layout/Template.server.d.ts.map +1 -1
  180. package/dist/components/media/Image.d.ts +1 -1
  181. package/dist/components/media/Image.d.ts.map +1 -1
  182. package/dist/components/media/Image.server.d.ts +1 -1
  183. package/dist/components/media/Image.server.d.ts.map +1 -1
  184. package/dist/components/typography/Heading.d.ts +1 -1
  185. package/dist/components/typography/Heading.d.ts.map +1 -1
  186. package/dist/components/typography/Heading.server.d.ts +1 -1
  187. package/dist/components/typography/Heading.server.d.ts.map +1 -1
  188. package/dist/components/typography/RichText.editor.d.ts +15 -2
  189. package/dist/components/typography/RichText.editor.d.ts.map +1 -1
  190. package/dist/components/typography/RichText.editor.js +18 -11
  191. package/dist/components/typography/RichText.editor.js.map +1 -1
  192. package/dist/components/typography/RichText.server.d.ts +3 -2
  193. package/dist/components/typography/RichText.server.d.ts.map +1 -1
  194. package/dist/components/typography/RichText.server.js +10 -5
  195. package/dist/components/typography/RichText.server.js.map +1 -1
  196. package/dist/components/typography/Text.d.ts +1 -1
  197. package/dist/components/typography/Text.d.ts.map +1 -1
  198. package/dist/components/typography/Text.server.d.ts +1 -1
  199. package/dist/components/typography/Text.server.d.ts.map +1 -1
  200. package/dist/components/typography/index.d.ts +1 -1
  201. package/dist/components/typography/index.d.ts.map +1 -1
  202. package/dist/components/typography/index.js +1 -1
  203. package/dist/components/typography/index.js.map +1 -1
  204. package/dist/config/config.editor.d.ts +4 -4
  205. package/dist/config/config.editor.d.ts.map +1 -1
  206. package/dist/config/index.d.ts +1 -1
  207. package/dist/config/index.d.ts.map +1 -1
  208. package/dist/config/merge.d.ts +4 -4
  209. package/dist/config/merge.d.ts.map +1 -1
  210. package/dist/config/merge.js +3 -3
  211. package/dist/config/presets.d.ts +15 -15
  212. package/dist/config/presets.d.ts.map +1 -1
  213. package/dist/editor/PuckEditor.d.ts +255 -0
  214. package/dist/editor/PuckEditor.d.ts.map +1 -0
  215. package/dist/editor/PuckEditor.js +205 -0
  216. package/dist/editor/PuckEditor.js.map +1 -0
  217. package/dist/editor/{PuckEditorCore.client.d.ts → PuckEditorImpl.client.d.ts} +53 -30
  218. package/dist/editor/PuckEditorImpl.client.d.ts.map +1 -0
  219. package/dist/editor/{PuckEditorCore.client.js → PuckEditorImpl.client.js} +194 -39
  220. package/dist/editor/PuckEditorImpl.client.js.map +1 -0
  221. package/dist/editor/ai-plugin-overrides.css +20 -0
  222. package/dist/editor/components/HeaderActions.d.ts +7 -2
  223. package/dist/editor/components/HeaderActions.d.ts.map +1 -1
  224. package/dist/editor/components/HeaderActions.js +18 -4
  225. package/dist/editor/components/HeaderActions.js.map +1 -1
  226. package/dist/editor/components/IframeWrapper.d.ts +13 -0
  227. package/dist/editor/components/IframeWrapper.d.ts.map +1 -1
  228. package/dist/editor/components/IframeWrapper.js +60 -4
  229. package/dist/editor/components/IframeWrapper.js.map +1 -1
  230. package/dist/editor/components/PreviewModal.d.ts +9 -1
  231. package/dist/editor/components/PreviewModal.d.ts.map +1 -1
  232. package/dist/editor/components/PreviewModal.js +36 -1
  233. package/dist/editor/components/PreviewModal.js.map +1 -1
  234. package/dist/editor/index.d.ts +34 -19
  235. package/dist/editor/index.d.ts.map +1 -1
  236. package/dist/editor/index.js +37 -21
  237. package/dist/editor/index.js.map +1 -1
  238. package/dist/editor/plugins/VersionHistoryPanel.d.ts +43 -0
  239. package/dist/editor/plugins/VersionHistoryPanel.d.ts.map +1 -0
  240. package/dist/editor/plugins/VersionHistoryPanel.js +303 -0
  241. package/dist/editor/plugins/VersionHistoryPanel.js.map +1 -0
  242. package/dist/editor/plugins/index.d.ts +6 -3
  243. package/dist/editor/plugins/index.d.ts.map +1 -1
  244. package/dist/editor/plugins/index.js +7 -3
  245. package/dist/editor/plugins/index.js.map +1 -1
  246. package/dist/editor/plugins/versionHistoryPlugin.d.ts +37 -0
  247. package/dist/editor/plugins/versionHistoryPlugin.d.ts.map +1 -0
  248. package/dist/editor/plugins/versionHistoryPlugin.js +36 -0
  249. package/dist/editor/plugins/versionHistoryPlugin.js.map +1 -0
  250. package/dist/editor/utils/detectPageTree.d.ts +22 -0
  251. package/dist/editor/utils/detectPageTree.d.ts.map +1 -0
  252. package/dist/editor/utils/detectPageTree.js +36 -0
  253. package/dist/editor/utils/detectPageTree.js.map +1 -0
  254. package/dist/editor/utils/index.d.ts +3 -0
  255. package/dist/editor/utils/index.d.ts.map +1 -0
  256. package/dist/editor/utils/index.js +3 -0
  257. package/dist/editor/utils/index.js.map +1 -0
  258. package/dist/editor/utils/injectPageTreeFields.d.ts +10 -0
  259. package/dist/editor/utils/injectPageTreeFields.d.ts.map +1 -0
  260. package/dist/editor/utils/injectPageTreeFields.js +35 -0
  261. package/dist/editor/utils/injectPageTreeFields.js.map +1 -0
  262. package/dist/endpoints/ai.d.ts +36 -0
  263. package/dist/endpoints/ai.d.ts.map +1 -0
  264. package/dist/endpoints/ai.js +315 -0
  265. package/dist/endpoints/ai.js.map +1 -0
  266. package/dist/endpoints/context.d.ts +30 -0
  267. package/dist/endpoints/context.d.ts.map +1 -0
  268. package/dist/endpoints/context.js +123 -0
  269. package/dist/endpoints/context.js.map +1 -0
  270. package/dist/endpoints/prompts.d.ts +28 -0
  271. package/dist/endpoints/prompts.d.ts.map +1 -0
  272. package/dist/endpoints/prompts.js +118 -0
  273. package/dist/endpoints/prompts.js.map +1 -0
  274. package/dist/endpoints/styles.d.ts +19 -0
  275. package/dist/endpoints/styles.d.ts.map +1 -0
  276. package/dist/endpoints/styles.js +116 -0
  277. package/dist/endpoints/styles.js.map +1 -0
  278. package/dist/exports/client.d.ts +7 -6
  279. package/dist/exports/client.d.ts.map +1 -1
  280. package/dist/exports/client.js +9 -8
  281. package/dist/exports/client.js.map +1 -1
  282. package/dist/fields/AlignmentField.d.ts +1 -1
  283. package/dist/fields/AlignmentField.d.ts.map +1 -1
  284. package/dist/fields/AlignmentField.js +1 -0
  285. package/dist/fields/AlignmentField.js.map +1 -1
  286. package/dist/fields/AnimationField.d.ts +1 -1
  287. package/dist/fields/AnimationField.d.ts.map +1 -1
  288. package/dist/fields/BackgroundField.d.ts +1 -1
  289. package/dist/fields/BackgroundField.d.ts.map +1 -1
  290. package/dist/fields/BackgroundField.js +9 -4
  291. package/dist/fields/BackgroundField.js.map +1 -1
  292. package/dist/fields/BorderField.d.ts +1 -1
  293. package/dist/fields/BorderField.d.ts.map +1 -1
  294. package/dist/fields/BorderField.js +1 -0
  295. package/dist/fields/BorderField.js.map +1 -1
  296. package/dist/fields/ColorPickerField.d.ts +1 -1
  297. package/dist/fields/ColorPickerField.d.ts.map +1 -1
  298. package/dist/fields/ColorPickerField.js +4 -2
  299. package/dist/fields/ColorPickerField.js.map +1 -1
  300. package/dist/fields/ContentAlignmentField.d.ts +66 -0
  301. package/dist/fields/ContentAlignmentField.d.ts.map +1 -0
  302. package/dist/fields/ContentAlignmentField.js +255 -0
  303. package/dist/fields/ContentAlignmentField.js.map +1 -0
  304. package/dist/fields/DimensionsField.d.ts +1 -1
  305. package/dist/fields/DimensionsField.d.ts.map +1 -1
  306. package/dist/fields/DimensionsField.js +8 -2
  307. package/dist/fields/DimensionsField.js.map +1 -1
  308. package/dist/fields/FlexAlignmentField.d.ts +1 -1
  309. package/dist/fields/FlexAlignmentField.d.ts.map +1 -1
  310. package/dist/fields/FolderPickerField.d.ts +1 -1
  311. package/dist/fields/FolderPickerField.d.ts.map +1 -1
  312. package/dist/fields/GradientEditor.d.ts.map +1 -1
  313. package/dist/fields/GradientEditor.js +3 -0
  314. package/dist/fields/GradientEditor.js.map +1 -1
  315. package/dist/fields/LockedField.d.ts +1 -1
  316. package/dist/fields/LockedField.d.ts.map +1 -1
  317. package/dist/fields/MarginField.d.ts +1 -1
  318. package/dist/fields/MarginField.d.ts.map +1 -1
  319. package/dist/fields/MediaField.d.ts +1 -1
  320. package/dist/fields/MediaField.d.ts.map +1 -1
  321. package/dist/fields/MediaField.js +3 -2
  322. package/dist/fields/MediaField.js.map +1 -1
  323. package/dist/fields/PaddingField.d.ts +1 -1
  324. package/dist/fields/PaddingField.d.ts.map +1 -1
  325. package/dist/fields/PageSegmentField.d.ts +1 -1
  326. package/dist/fields/PageSegmentField.d.ts.map +1 -1
  327. package/dist/fields/ResetField.d.ts +1 -1
  328. package/dist/fields/ResetField.d.ts.map +1 -1
  329. package/dist/fields/ResetField.js +1 -1
  330. package/dist/fields/ResetField.js.map +1 -1
  331. package/dist/fields/ResponsiveField.d.ts +1 -1
  332. package/dist/fields/ResponsiveField.d.ts.map +1 -1
  333. package/dist/fields/ResponsiveField.js +5 -2
  334. package/dist/fields/ResponsiveField.js.map +1 -1
  335. package/dist/fields/ResponsiveVisibilityField.d.ts +1 -1
  336. package/dist/fields/ResponsiveVisibilityField.d.ts.map +1 -1
  337. package/dist/fields/ResponsiveVisibilityField.js +4 -3
  338. package/dist/fields/ResponsiveVisibilityField.js.map +1 -1
  339. package/dist/fields/SizeField.d.ts +3 -25
  340. package/dist/fields/SizeField.d.ts.map +1 -1
  341. package/dist/fields/SizeField.js +8 -34
  342. package/dist/fields/SizeField.js.map +1 -1
  343. package/dist/fields/SlugPreviewField.d.ts +1 -1
  344. package/dist/fields/SlugPreviewField.d.ts.map +1 -1
  345. package/dist/fields/TemplateField.d.ts +1 -1
  346. package/dist/fields/TemplateField.d.ts.map +1 -1
  347. package/dist/fields/TemplateField.js +1 -1
  348. package/dist/fields/TemplateField.js.map +1 -1
  349. package/dist/fields/TransformField.d.ts +1 -1
  350. package/dist/fields/TransformField.d.ts.map +1 -1
  351. package/dist/fields/TransformField.js +2 -0
  352. package/dist/fields/TransformField.js.map +1 -1
  353. package/dist/fields/VerticalAlignmentField.d.ts +1 -1
  354. package/dist/fields/VerticalAlignmentField.d.ts.map +1 -1
  355. package/dist/fields/WidthField.d.ts +1 -1
  356. package/dist/fields/WidthField.d.ts.map +1 -1
  357. package/dist/fields/index.d.ts +8 -36
  358. package/dist/fields/index.d.ts.map +1 -1
  359. package/dist/fields/index.js +20 -78
  360. package/dist/fields/index.js.map +1 -1
  361. package/dist/fields/richtext/controls/ColorPickerControl.d.ts +16 -0
  362. package/dist/fields/richtext/controls/ColorPickerControl.d.ts.map +1 -0
  363. package/dist/fields/richtext/controls/ColorPickerControl.js +116 -0
  364. package/dist/fields/richtext/controls/ColorPickerControl.js.map +1 -0
  365. package/dist/fields/richtext/controls/DropdownPortal.d.ts +17 -0
  366. package/dist/fields/richtext/controls/DropdownPortal.d.ts.map +1 -0
  367. package/dist/fields/richtext/controls/DropdownPortal.js +90 -0
  368. package/dist/fields/richtext/controls/DropdownPortal.js.map +1 -0
  369. package/dist/fields/richtext/controls/FontSizeControl.d.ts +8 -0
  370. package/dist/fields/richtext/controls/FontSizeControl.d.ts.map +1 -0
  371. package/dist/fields/richtext/controls/FontSizeControl.js +62 -0
  372. package/dist/fields/richtext/controls/FontSizeControl.js.map +1 -0
  373. package/dist/fields/richtext/controls/HighlightControl.d.ts +9 -0
  374. package/dist/fields/richtext/controls/HighlightControl.d.ts.map +1 -0
  375. package/dist/fields/richtext/controls/HighlightControl.js +44 -0
  376. package/dist/fields/richtext/controls/HighlightControl.js.map +1 -0
  377. package/dist/fields/richtext/controls/index.d.ts +11 -0
  378. package/dist/fields/richtext/controls/index.d.ts.map +1 -0
  379. package/dist/fields/richtext/controls/index.js +16 -0
  380. package/dist/fields/richtext/controls/index.js.map +1 -0
  381. package/dist/fields/richtext/controls/shared.d.ts +97 -0
  382. package/dist/fields/richtext/controls/shared.d.ts.map +1 -0
  383. package/dist/fields/richtext/controls/shared.js +344 -0
  384. package/dist/fields/richtext/controls/shared.js.map +1 -0
  385. package/dist/fields/richtext/createRichTextField.d.ts +165 -0
  386. package/dist/fields/richtext/createRichTextField.d.ts.map +1 -0
  387. package/dist/fields/richtext/createRichTextField.js +139 -0
  388. package/dist/fields/richtext/createRichTextField.js.map +1 -0
  389. package/dist/fields/richtext/extensions/FontSize.d.ts +23 -0
  390. package/dist/fields/richtext/extensions/FontSize.d.ts.map +1 -0
  391. package/dist/fields/richtext/extensions/FontSize.js +47 -0
  392. package/dist/fields/richtext/extensions/FontSize.js.map +1 -0
  393. package/dist/fields/richtext/extensions/index.d.ts +5 -0
  394. package/dist/fields/richtext/extensions/index.d.ts.map +1 -0
  395. package/dist/fields/richtext/extensions/index.js +5 -0
  396. package/dist/fields/richtext/extensions/index.js.map +1 -0
  397. package/dist/fields/richtext/index.d.ts +14 -0
  398. package/dist/fields/richtext/index.d.ts.map +1 -0
  399. package/dist/fields/richtext/index.js +19 -0
  400. package/dist/fields/richtext/index.js.map +1 -0
  401. package/dist/fields/richtext/richtext-menu.css +50 -0
  402. package/dist/fields/shared.d.ts +27 -1
  403. package/dist/fields/shared.d.ts.map +1 -1
  404. package/dist/fields/shared.js +34 -0
  405. package/dist/fields/shared.js.map +1 -1
  406. package/dist/layouts/types.d.ts +30 -0
  407. package/dist/layouts/types.d.ts.map +1 -1
  408. package/dist/plugin/index.d.ts +1 -0
  409. package/dist/plugin/index.d.ts.map +1 -1
  410. package/dist/plugin/index.js +112 -2
  411. package/dist/plugin/index.js.map +1 -1
  412. package/dist/render/HybridPageRenderer.d.ts +1 -1
  413. package/dist/render/HybridPageRenderer.d.ts.map +1 -1
  414. package/dist/render/PageRenderer.d.ts +1 -1
  415. package/dist/render/PageRenderer.d.ts.map +1 -1
  416. package/dist/render/PageRenderer.js +1 -1
  417. package/dist/render/PageRenderer.js.map +1 -1
  418. package/dist/render/PuckEditor.client.d.ts +2 -2
  419. package/dist/render/PuckEditor.client.d.ts.map +1 -1
  420. package/dist/render/PuckEditor.client.js +2 -2
  421. package/dist/render/PuckEditor.client.js.map +1 -1
  422. package/dist/types/index.d.ts +37 -12
  423. package/dist/types/index.d.ts.map +1 -1
  424. package/dist/version.d.ts +2 -0
  425. package/dist/version.d.ts.map +1 -0
  426. package/dist/version.js +3 -0
  427. package/dist/version.js.map +1 -0
  428. package/dist/views/PuckConfigContext.d.ts +56 -2
  429. package/dist/views/PuckConfigContext.d.ts.map +1 -1
  430. package/dist/views/PuckConfigContext.js +6 -3
  431. package/dist/views/PuckConfigContext.js.map +1 -1
  432. package/dist/views/PuckEditorView.d.ts.map +1 -1
  433. package/dist/views/PuckEditorView.js +29 -2
  434. package/dist/views/PuckEditorView.js.map +1 -1
  435. package/dist/views/index.d.ts +0 -2
  436. package/dist/views/index.d.ts.map +1 -1
  437. package/dist/views/index.js +0 -2
  438. package/dist/views/index.js.map +1 -1
  439. package/package.json +42 -12
  440. package/dist/components/typography/RichText.d.ts +0 -20
  441. package/dist/components/typography/RichText.d.ts.map +0 -1
  442. package/dist/components/typography/RichText.js +0 -73
  443. package/dist/components/typography/RichText.js.map +0 -1
  444. package/dist/editor/PuckEditor.client.d.ts +0 -131
  445. package/dist/editor/PuckEditor.client.d.ts.map +0 -1
  446. package/dist/editor/PuckEditor.client.js +0 -42
  447. package/dist/editor/PuckEditor.client.js.map +0 -1
  448. package/dist/editor/PuckEditorCore.client.d.ts.map +0 -1
  449. package/dist/editor/PuckEditorCore.client.js.map +0 -1
  450. package/dist/fields/TiptapField.d.ts +0 -40
  451. package/dist/fields/TiptapField.d.ts.map +0 -1
  452. package/dist/fields/TiptapField.js +0 -857
  453. package/dist/fields/TiptapField.js.map +0 -1
  454. package/dist/fields/TiptapModal.d.ts +0 -10
  455. package/dist/fields/TiptapModal.d.ts.map +0 -1
  456. package/dist/fields/TiptapModal.js +0 -114
  457. package/dist/fields/TiptapModal.js.map +0 -1
  458. package/dist/fields/TiptapModalField.d.ts +0 -23
  459. package/dist/fields/TiptapModalField.d.ts.map +0 -1
  460. package/dist/fields/TiptapModalField.js +0 -55
  461. package/dist/fields/TiptapModalField.js.map +0 -1
  462. package/dist/fields/richtext-output.css +0 -219
  463. package/dist/fields/tiptap-styles.css +0 -248
  464. package/dist/views/PuckEditorClient.d.ts +0 -73
  465. package/dist/views/PuckEditorClient.d.ts.map +0 -1
  466. package/dist/views/PuckEditorClient.js +0 -130
  467. package/dist/views/PuckEditorClient.js.map +0 -1
package/README.md CHANGED
@@ -17,6 +17,7 @@ A PayloadCMS plugin for integrating [Puck](https://puckeditor.com) visual page b
17
17
  - [Layouts](#layouts)
18
18
  - [Page-Tree Integration](#page-tree-integration)
19
19
  - [Hybrid Integration](#hybrid-integration)
20
+ - [AI Integration](#ai-integration)
20
21
  - [Advanced Configuration](#advanced-configuration)
21
22
  - [License](#license)
22
23
 
@@ -28,17 +29,19 @@ A PayloadCMS plugin for integrating [Puck](https://puckeditor.com) visual page b
28
29
 
29
30
  | Dependency | Version | Purpose |
30
31
  |------------|---------|---------|
31
- | `@measured/puck` | >= 0.20.0 | Visual editor core |
32
- | `payload` | >= 3.0.0 | CMS backend |
33
- | `@payloadcms/next` | >= 3.0.0 | Payload Next.js integration |
34
- | `next` | >= 14.0.0 | React framework |
35
- | `react` | >= 18.0.0 | UI library |
32
+ | `@puckeditor/core` | >= 0.21.0 | Visual editor core |
33
+ | `payload` | >= 3.69.0 | CMS backend |
34
+ | `@payloadcms/next` | >= 3.69.0 | Payload Next.js integration |
35
+ | `next` | >= 15.4.8 | React framework |
36
+ | `react` | >= 19.2.1 | UI library |
36
37
  | `@tailwindcss/typography` | >= 0.5.0 | RichText component styling |
37
38
 
39
+ > **Note:** Puck 0.21+ moved from `@measured/puck` to `@puckeditor/core`. This plugin requires the new package scope.
40
+
38
41
  ### Install
39
42
 
40
43
  ```bash
41
- pnpm add @delmaredigital/payload-puck @measured/puck
44
+ pnpm add @delmaredigital/payload-puck @puckeditor/core
42
45
  ```
43
46
 
44
47
  ---
@@ -72,7 +75,7 @@ This automatically:
72
75
 
73
76
  ### Step 2: Provide Puck Configuration
74
77
 
75
- Wrap your app with `PuckConfigProvider` to supply the Puck configuration. This is required because Puck configs contain React components that cannot be serialized from server to client.
78
+ Wrap your app with `PuckConfigProvider` to supply the Puck configuration. This makes the config available to the editor via React context.
76
79
 
77
80
  ```typescript
78
81
  // app/(app)/layout.tsx (covers both admin and frontend)
@@ -92,6 +95,10 @@ export default function RootLayout({ children }: { children: React.ReactNode })
92
95
  }
93
96
  ```
94
97
 
98
+ > **Tip:** `PuckConfigProvider` also accepts `layouts` and `theme` props. See [Layouts](#layouts) and [Theming](#theming) sections.
99
+
100
+ > **Note:** For custom editor UIs (outside Payload admin), you can also pass the config directly to `PuckEditor` instead of using the context provider.
101
+
95
102
  ### Step 3: Create a Frontend Route
96
103
 
97
104
  The plugin can't auto-create frontend routes (Next.js App Router is file-based), but here's copy-paste ready code:
@@ -108,16 +115,23 @@ import { notFound } from 'next/navigation'
108
115
  import type { Metadata } from 'next'
109
116
 
110
117
  // Fetch page by slug (or homepage if no slug)
118
+ // Only returns published pages - unpublished pages will 404
111
119
  async function getPage(slug?: string[]) {
112
120
  const payload = await getPayload({ config })
113
121
  const slugPath = slug?.join('/') || ''
114
122
 
115
123
  // Try to find by slug, or find homepage
124
+ // Filter for published pages only (_status: 'published')
116
125
  const { docs } = await payload.find({
117
126
  collection: 'pages',
118
- where: slugPath
119
- ? { slug: { equals: slugPath } }
120
- : { isHomepage: { equals: true } },
127
+ where: {
128
+ and: [
129
+ { _status: { equals: 'published' } },
130
+ slugPath
131
+ ? { slug: { equals: slugPath } }
132
+ : { isHomepage: { equals: true } },
133
+ ],
134
+ },
121
135
  limit: 1,
122
136
  })
123
137
 
@@ -281,6 +295,11 @@ The editor uses Payload's native draft system. The plugin automatically enables
281
295
  }
282
296
  ```
283
297
 
298
+ The editor header provides:
299
+ - **Save** - Saves as draft without publishing
300
+ - **Publish** - Publishes the page (sets `_status: 'published'`)
301
+ - **Unpublish** - Reverts a published page to draft status (appears only when published)
302
+
284
303
  ---
285
304
 
286
305
  ## Components
@@ -302,7 +321,7 @@ The editor uses Payload's native draft system. The plugin automatically enables
302
321
  |-----------|-------------|
303
322
  | **Heading** | H1-H6 headings with size and alignment |
304
323
  | **Text** | Paragraph text with styling options |
305
- | **RichText** | TipTap-powered WYSIWYG editor |
324
+ | **RichText** | Puck's native richtext editor with enhancements: font sizes, text colors with opacity, highlights, superscript/subscript, and inline editing on canvas |
306
325
 
307
326
  ### Media & Interactive
308
327
 
@@ -312,7 +331,20 @@ The editor uses Payload's native draft system. The plugin automatically enables
312
331
  | **Button** | Styled button/link with variants |
313
332
  | **Card** | Content card with optional image |
314
333
  | **Divider** | Horizontal rule with styles |
315
- | **Accordion** | Expandable content sections |
334
+ | **Accordion** | Expandable content sections (first item opens by default) |
335
+
336
+ ### Semantic HTML Elements
337
+
338
+ Layout components (Section, Flex, Container, Grid) support semantic HTML output for better SEO and accessibility:
339
+
340
+ | Component | Available Elements |
341
+ |-----------|-------------------|
342
+ | **Section** | `section`, `article`, `aside`, `nav`, `header`, `footer`, `main`, `div` |
343
+ | **Flex** | `div`, `nav`, `ul`, `ol`, `aside`, `section` |
344
+ | **Container** | `div`, `article`, `aside`, `section` |
345
+ | **Grid** | `div`, `ul`, `ol` |
346
+
347
+ Select the appropriate HTML element in the component's sidebar to output semantic markup.
316
348
 
317
349
  ### Responsive Controls
318
350
 
@@ -320,6 +352,7 @@ Layout components support per-breakpoint customization:
320
352
  - **Dimensions** - Width, max-width, height constraints
321
353
  - **Padding/Margin** - Spacing per breakpoint
322
354
  - **Visibility** - Show/hide at specific breakpoints
355
+ - **Viewport Preview** - Mobile, Tablet, Desktop, and Full Width options
323
356
 
324
357
  ---
325
358
 
@@ -332,13 +365,15 @@ All fields are imported from `@delmaredigital/payload-puck/fields`.
332
365
  | Field | Description |
333
366
  |-------|-------------|
334
367
  | **MediaField** | Payload media library integration |
335
- | **TiptapField** | Rich text editor with formatting |
368
+ | **RichTextField** | Puck's native richtext with enhancements (colors, font sizes, highlights) |
336
369
  | **ColorPickerField** | Color picker with opacity and presets |
337
370
  | **BackgroundField** | Solid colors, gradients, images |
338
371
  | **PaddingField / MarginField** | Visual spacing editors |
339
372
  | **BorderField** | Border width, style, color, radius |
340
373
  | **DimensionsField** | Width/height with constraints |
341
- | **AlignmentField** | Text alignment options |
374
+ | **AlignmentField** | Text alignment (left, center, right) |
375
+ | **ContentAlignmentField** | Visual 3x3 grid selector for positioning (d-pad style) |
376
+ | **SizeField** | Preset sizes (sm, default, lg) with custom mode |
342
377
  | **AnimationField** | Entrance animations |
343
378
  | **ResponsiveVisibilityField** | Show/hide per breakpoint |
344
379
  | **FolderPickerField** | Hierarchical folder selection (page-tree) |
@@ -371,9 +406,46 @@ import {
371
406
  dimensionsValueToCSS,
372
407
  animationValueToCSS,
373
408
  visibilityValueToCSS,
409
+ alignmentToFlexCSS,
410
+ alignmentToGridCSS,
411
+ sizeValueToCSS,
412
+ getSizeClasses,
374
413
  } from '@delmaredigital/payload-puck/fields'
375
414
  ```
376
415
 
416
+ ### ContentAlignmentField Example
417
+
418
+ The ContentAlignmentField provides a visual 3x3 grid selector for content positioning:
419
+
420
+ ```typescript
421
+ import {
422
+ createContentAlignmentField,
423
+ alignmentToFlexCSS,
424
+ alignmentToGridCSS,
425
+ } from '@delmaredigital/payload-puck/fields'
426
+
427
+ const BannerConfig = {
428
+ fields: {
429
+ contentPosition: createContentAlignmentField({ label: 'Content Position' }),
430
+ },
431
+ render: ({ contentPosition }) => (
432
+ <div style={{
433
+ display: 'flex',
434
+ minHeight: '400px',
435
+ ...alignmentToFlexCSS(contentPosition), // Converts to justify-content + align-items
436
+ }}>
437
+ <div>Positioned content</div>
438
+ </div>
439
+ ),
440
+ }
441
+ ```
442
+
443
+ Helper functions:
444
+ - `alignmentToFlexCSS()` - For Flexbox containers (`justify-content` + `align-items`)
445
+ - `alignmentToGridCSS()` - For Grid containers (`justify-content` + `align-content`)
446
+ - `alignmentToPlaceSelfCSS()` - For individual grid items (`place-self`)
447
+ - `alignmentToTailwind()` - Returns Tailwind classes (`justify-* items-*`)
448
+
377
449
  ---
378
450
 
379
451
  ## Building Custom Components
@@ -413,7 +485,7 @@ export const puckConfig: Config = {
413
485
  Build custom components with pre-built fields:
414
486
 
415
487
  ```typescript
416
- import type { ComponentConfig } from '@measured/puck'
488
+ import type { ComponentConfig } from '@puckeditor/core'
417
489
  import {
418
490
  createMediaField,
419
491
  createBackgroundField,
@@ -487,6 +559,42 @@ export const puckConfig = extendConfig({
487
559
 
488
560
  > **Note:** Use `fullConfig` from `/config/editor` for extending the editor. For server-side rendering, use `baseConfig` from `/config`.
489
561
 
562
+ ### Using Custom Config with Provider
563
+
564
+ After creating your custom config, pass it to `PuckConfigProvider`:
565
+
566
+ ```typescript
567
+ // components/admin/PuckProvider.tsx
568
+ 'use client'
569
+ import { PuckConfigProvider } from '@delmaredigital/payload-puck/client'
570
+ import { puckConfig } from '@/puck/config.editor'
571
+ import { siteLayouts } from '@/lib/puck-layouts'
572
+
573
+ export default function PuckProvider({ children }: { children: React.ReactNode }) {
574
+ return (
575
+ <PuckConfigProvider config={puckConfig} layouts={siteLayouts}>
576
+ {children}
577
+ </PuckConfigProvider>
578
+ )
579
+ }
580
+ ```
581
+
582
+ **For Payload admin**, register the provider in your Payload config:
583
+
584
+ ```typescript
585
+ // payload.config.ts
586
+ export default buildConfig({
587
+ admin: {
588
+ components: {
589
+ providers: ['@/components/admin/PuckProvider'],
590
+ },
591
+ },
592
+ // ...
593
+ })
594
+ ```
595
+
596
+ This is the recommended pattern for Payload apps. The provider wraps only the admin UI, keeping your frontend layout separate.
597
+
490
598
  ### Available Field Factories
491
599
 
492
600
  | Factory | Description |
@@ -499,8 +607,11 @@ export const puckConfig = extendConfig({
499
607
  | `createBorderField()` | Border styling |
500
608
  | `createDimensionsField()` | Width/height constraints |
501
609
  | `createAnimationField()` | Entrance animations |
502
- | `createAlignmentField()` | Text alignment |
503
- | `createTiptapField()` | Inline rich text editor |
610
+ | `createAlignmentField()` | Text alignment (left, center, right) |
611
+ | `createContentAlignmentField()` | Visual 3x3 grid positioning selector |
612
+ | `createSizeField()` | Size presets with custom mode |
613
+ | `createRichTextField()` | Puck's native richtext with colors, font sizes, highlights |
614
+ | `createResponsiveVisibilityField()` | Show/hide per breakpoint |
504
615
 
505
616
  ### CSS Helper Functions
506
617
 
@@ -514,12 +625,17 @@ import {
514
625
  borderValueToCSS,
515
626
  dimensionsValueToCSS,
516
627
  colorValueToCSS,
628
+ alignmentToFlexCSS,
629
+ alignmentToGridCSS,
630
+ sizeValueToCSS,
517
631
  } from '@delmaredigital/payload-puck/fields'
518
632
 
519
633
  const style = {
520
634
  background: backgroundValueToCSS(props.background),
521
635
  padding: paddingValueToCSS(props.padding),
522
636
  ...dimensionsValueToCSS(props.dimensions),
637
+ ...alignmentToFlexCSS(props.contentAlignment),
638
+ ...sizeValueToCSS(props.size),
523
639
  }
524
640
  ```
525
641
 
@@ -625,7 +741,7 @@ The plugin checks if your collection has a `pageSegment` field (page-tree's sign
625
741
  2. **Page Segment** - Edit the page's URL segment
626
742
  3. **Slug Preview** - See the computed slug (folder path + segment)
627
743
 
628
- ### Configuration
744
+ ### Plugin Configuration
629
745
 
630
746
  ```typescript
631
747
  createPuckPlugin({
@@ -643,6 +759,27 @@ createPuckPlugin({
643
759
  })
644
760
  ```
645
761
 
762
+ ### Custom Editor UI
763
+
764
+ For custom editor implementations outside Payload admin, use the `hasPageTree` prop:
765
+
766
+ ```typescript
767
+ import { PuckEditor } from '@delmaredigital/payload-puck/client'
768
+ import { editorConfig } from '@delmaredigital/payload-puck/config/editor'
769
+
770
+ <PuckEditor
771
+ config={editorConfig}
772
+ pageId={page.id}
773
+ initialData={page.puckData}
774
+ pageTitle={page.title}
775
+ pageSlug={page.slug}
776
+ apiEndpoint="/api/puck/pages"
777
+ hasPageTree={true}
778
+ folder={page.folder}
779
+ pageSegment={page.pageSegment}
780
+ />
781
+ ```
782
+
646
783
  ### Performance
647
784
 
648
785
  Detection is instant - it reads the in-memory collection config, no database queries.
@@ -711,6 +848,196 @@ import { LegacyBlockRenderer } from '@/components/LegacyBlockRenderer'
711
848
 
712
849
  ---
713
850
 
851
+ ## AI Integration
852
+
853
+ > **Early Preview:** While Puck's AI features are powerful, this plugin's implementation is still in early stages and under active development. Expect changes as we refine the integration.
854
+
855
+ The plugin integrates with [Puck AI](https://puckeditor.com/docs/integrating-puck/ai) to enable AI-assisted page generation. Users can describe what they want in natural language, and the AI builds complete page layouts using your components.
856
+
857
+ ### Requirements
858
+
859
+ - `PUCK_API_KEY` environment variable (from [Puck Cloud](https://puckeditor.com))
860
+ - AI features require `@puckeditor/plugin-ai` and `@puckeditor/cloud-client` (bundled with the plugin)
861
+
862
+ ### Quick Start
863
+
864
+ Enable AI in your plugin configuration:
865
+
866
+ ```typescript
867
+ createPuckPlugin({
868
+ pagesCollection: 'pages',
869
+ ai: {
870
+ enabled: true,
871
+ context: 'We are Acme Corp, a B2B SaaS company. Use professional language.',
872
+ },
873
+ })
874
+ ```
875
+
876
+ This automatically:
877
+ - Registers the AI chat endpoint at `/api/puck/ai`
878
+ - Adds the AI chat plugin to the editor
879
+ - Applies comprehensive component instructions for better generation quality
880
+
881
+ ### Dynamic Business Context
882
+
883
+ Instead of hardcoding context in your config, you can manage it through Payload admin:
884
+
885
+ ```typescript
886
+ createPuckPlugin({
887
+ ai: {
888
+ enabled: true,
889
+ contextCollection: true, // Creates puck-ai-context collection
890
+ },
891
+ })
892
+ ```
893
+
894
+ This creates a `puck-ai-context` collection where you can add entries for:
895
+ - **Brand Guidelines** - Colors, fonts, brand voice
896
+ - **Tone of Voice** - How to communicate
897
+ - **Product Information** - What you sell/offer
898
+ - **Industry Context** - Your market and audience
899
+ - **Technical Requirements** - Specific constraints
900
+ - **Page Patterns** - Common layout structures
901
+
902
+ Context entries can be enabled/disabled and ordered. The AI receives all enabled entries sorted by order.
903
+
904
+ ### Context Editor Plugin
905
+
906
+ When `contextCollection: true`, a "Context" panel appears in the Puck plugin rail. Users can view, create, edit, and toggle context entries directly in the editor without visiting Payload admin.
907
+
908
+ ### Prompt Management
909
+
910
+ Store reusable prompts in Payload:
911
+
912
+ ```typescript
913
+ createPuckPlugin({
914
+ ai: {
915
+ enabled: true,
916
+ promptsCollection: true, // Creates puck-ai-prompts collection
917
+ examplePrompts: [
918
+ { label: 'Landing page', prompt: 'Create a landing page for...' },
919
+ ],
920
+ },
921
+ })
922
+ ```
923
+
924
+ Prompts from the collection appear in the AI chat interface. A "Prompts" panel in the plugin rail allows in-editor prompt management.
925
+
926
+ ### Custom Tools
927
+
928
+ Enable the AI to query your data:
929
+
930
+ ```typescript
931
+ import { z } from 'zod'
932
+
933
+ createPuckPlugin({
934
+ ai: {
935
+ enabled: true,
936
+ tools: {
937
+ getProducts: {
938
+ description: 'Get products from the database',
939
+ inputSchema: z.object({ category: z.string() }),
940
+ execute: async ({ category }, { payload }) => {
941
+ return await payload.find({
942
+ collection: 'products',
943
+ where: { category: { equals: category } },
944
+ })
945
+ },
946
+ },
947
+ },
948
+ },
949
+ })
950
+ ```
951
+
952
+ Tools receive a context object with the Payload instance and authenticated user.
953
+
954
+ ### AI Configuration Options
955
+
956
+ | Option | Default | Description |
957
+ |--------|---------|-------------|
958
+ | `enabled` | `false` | Enable AI features |
959
+ | `context` | `undefined` | Static system context for the AI |
960
+ | `contextCollection` | `false` | Create `puck-ai-context` collection for dynamic context |
961
+ | `promptsCollection` | `false` | Create `puck-ai-prompts` collection for reusable prompts |
962
+ | `examplePrompts` | `[]` | Static example prompts for the chat interface |
963
+ | `tools` | `undefined` | Custom tools for AI to query your system |
964
+ | `componentInstructions` | `undefined` | Override default component AI instructions |
965
+
966
+ ### Component Instructions
967
+
968
+ The plugin includes comprehensive instructions for all built-in components, teaching the AI:
969
+ - Correct field names and values
970
+ - Component composition patterns
971
+ - Page structure best practices (Hero → Features → CTA flow)
972
+ - Semantic HTML usage
973
+
974
+ To customize or extend:
975
+
976
+ ```typescript
977
+ createPuckPlugin({
978
+ ai: {
979
+ enabled: true,
980
+ componentInstructions: {
981
+ Heading: {
982
+ ai: { instructions: 'Use our brand voice: professional but approachable' },
983
+ fields: {
984
+ text: { ai: { instructions: 'Keep under 8 words' } },
985
+ },
986
+ },
987
+ },
988
+ },
989
+ })
990
+ ```
991
+
992
+ ### Standalone API Routes
993
+
994
+ For custom implementations outside the plugin:
995
+
996
+ ```typescript
997
+ // app/api/puck/[...all]/route.ts
998
+ import { createPuckAiApiRoutes } from '@delmaredigital/payload-puck/ai'
999
+ import config from '@payload-config'
1000
+
1001
+ export const POST = createPuckAiApiRoutes({
1002
+ payloadConfig: config,
1003
+ auth: {
1004
+ authenticate: async (request) => {
1005
+ // Your auth implementation
1006
+ return { user: { id: '...' } }
1007
+ },
1008
+ },
1009
+ ai: {
1010
+ context: 'Your business context...',
1011
+ },
1012
+ })
1013
+ ```
1014
+
1015
+ ### AI Exports
1016
+
1017
+ ```typescript
1018
+ import {
1019
+ // Plugins
1020
+ createAiPlugin,
1021
+ createPromptEditorPlugin,
1022
+ createContextEditorPlugin,
1023
+
1024
+ // Hooks
1025
+ useAiPrompts,
1026
+ useAiContext,
1027
+
1028
+ // Config utilities
1029
+ injectAiConfig,
1030
+ comprehensiveComponentAiConfig,
1031
+ pagePatternSystemContext,
1032
+
1033
+ // API routes
1034
+ createPuckAiApiRoutes,
1035
+ createAiGenerate,
1036
+ } from '@delmaredigital/payload-puck/ai'
1037
+ ```
1038
+
1039
+ ---
1040
+
714
1041
  ## Advanced Configuration
715
1042
 
716
1043
  ### Plugin Options
@@ -724,6 +1051,8 @@ import { LegacyBlockRenderer } from '@/components/LegacyBlockRenderer'
724
1051
  | `adminViewPath` | `'/puck-editor'` | Path for the editor (full path: `/admin/puck-editor/:collection/:id`) |
725
1052
  | `pageTreeIntegration` | auto-detect | Integration with `@delmaredigital/payload-page-tree` |
726
1053
  | `layouts` | `undefined` | Layout definitions for page templates |
1054
+ | `editorStylesheet` | `undefined` | Path to CSS file for editor iframe styling (e.g., `'src/app/globals.css'`) |
1055
+ | `editorStylesheetUrls` | `[]` | Additional stylesheet URLs for the editor (e.g., Google Fonts) |
727
1056
 
728
1057
  ```typescript
729
1058
  createPuckPlugin({
@@ -751,6 +1080,52 @@ createPuckPlugin({
751
1080
  })
752
1081
  ```
753
1082
 
1083
+ ### Editor Stylesheet (Iframe Styling)
1084
+
1085
+ The Puck editor renders page content in an iframe. By default, this iframe doesn't have access to your frontend's CSS (Tailwind utilities, CSS variables, fonts). The `editorStylesheet` option solves this by compiling and serving your CSS.
1086
+
1087
+ **How it works:**
1088
+ 1. You specify your CSS file path in the plugin config
1089
+ 2. The plugin creates an endpoint at `/api/puck/styles`
1090
+ 3. On first request, the CSS is compiled with PostCSS/Tailwind and cached
1091
+ 4. The iframe loads this compiled CSS
1092
+
1093
+ ```typescript
1094
+ createPuckPlugin({
1095
+ pagesCollection: 'pages',
1096
+ // Your frontend's main CSS file
1097
+ editorStylesheet: 'src/app/(frontend)/globals.css',
1098
+ // External stylesheets (Google Fonts, etc.)
1099
+ editorStylesheetUrls: [
1100
+ 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'
1101
+ ],
1102
+ })
1103
+ ```
1104
+
1105
+ Then update your `PuckConfigProvider` to use the compiled stylesheet:
1106
+
1107
+ ```typescript
1108
+ <PuckConfigProvider
1109
+ config={editorConfig}
1110
+ layouts={siteLayouts}
1111
+ editorStylesheets={[
1112
+ '/api/puck/styles', // Plugin-created endpoint
1113
+ 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'
1114
+ ]}
1115
+ >
1116
+ {children}
1117
+ </PuckConfigProvider>
1118
+ ```
1119
+
1120
+ **Requirements:**
1121
+ - `postcss` must be installed in your project
1122
+ - For Tailwind v4: `@tailwindcss/postcss`
1123
+ - For Tailwind v3: `tailwindcss`
1124
+
1125
+ The CSS is compiled at runtime (cached after first request) using your project's PostCSS/Tailwind installation.
1126
+
1127
+ ---
1128
+
754
1129
  ### Custom API Routes (Advanced)
755
1130
 
756
1131
  The built-in endpoints handle most use cases. Only disable them if you need custom authentication or middleware.
@@ -775,7 +1150,8 @@ See the JSDoc in `@delmaredigital/payload-puck/api` for usage examples.
775
1150
  | `@delmaredigital/payload-puck/plugin` | `createPuckPlugin` |
776
1151
  | `@delmaredigital/payload-puck/config` | `baseConfig`, `createConfig()`, `extendConfig()` |
777
1152
  | `@delmaredigital/payload-puck/config/editor` | `editorConfig` for editing |
778
- | `@delmaredigital/payload-puck/client` | `PuckConfigProvider`, `usePuckConfig`, client components |
1153
+ | `@delmaredigital/payload-puck/client` | `PuckEditor`, `PuckConfigProvider`, page-tree utilities |
1154
+ | `@delmaredigital/payload-puck/editor` | `PuckEditor`, `HeaderActions`, editor hooks |
779
1155
  | `@delmaredigital/payload-puck/rsc` | `PuckEditorView` for Payload admin views |
780
1156
  | `@delmaredigital/payload-puck/render` | `PageRenderer`, `HybridPageRenderer` |
781
1157
  | `@delmaredigital/payload-puck/fields` | Custom Puck fields and CSS helpers |
@@ -783,6 +1159,7 @@ See the JSDoc in `@delmaredigital/payload-puck/api` for usage examples.
783
1159
  | `@delmaredigital/payload-puck/theme` | `ThemeProvider`, theme utilities |
784
1160
  | `@delmaredigital/payload-puck/layouts` | Layout definitions, `LayoutWrapper` |
785
1161
  | `@delmaredigital/payload-puck/api` | API route factories (for custom implementations) |
1162
+ | `@delmaredigital/payload-puck/ai` | AI plugins, hooks, config utilities, API routes |
786
1163
  | `@delmaredigital/payload-puck/admin/client` | `EditWithPuckButton`, `EditWithPuckCell` |
787
1164
 
788
1165
  ---
@@ -20,7 +20,7 @@ export interface EditWithPuckButtonProps {
20
20
  editorPathPattern?: string;
21
21
  /**
22
22
  * Button label
23
- * @default 'Edit with Puck'
23
+ * @default 'Visual Editor'
24
24
  */
25
25
  label?: string;
26
26
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"EditWithPuckButton.d.ts","sourceRoot":"","sources":["../../src/admin/EditWithPuckButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAGrD;;GAEG;AACH,MAAM,W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B,KAAuB,EACvB,QAAgB,GACjB,EAAE,uBAAuB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,2CAkC/D;AAED,eAAe,kBAAkB,CAAA"}
@@ -37,7 +37,7 @@ export const EditWithPuckButton = (props) => {
37
37
  const { config } = useConfig();
38
38
  // Extract custom props passed via field config
39
39
  const customProps = props?.field?.custom;
40
- const label = customProps?.label || 'Edit with Puck';
40
+ const label = customProps?.label || 'Visual Editor';
41
41
  const iconOnly = customProps?.iconOnly || false;
42
42
  const collection = customProps?.collectionSlug || collectionSlug || 'pages';
43
43
  // Get admin route from config
@@ -87,7 +87,7 @@ export const EditWithPuckButton = (props) => {
87
87
  * />
88
88
  * ```
89
89
  */
90
- export function EditWithPuckLink({ id, collectionSlug = 'pages', editorPathPattern, label = 'Edit with Puck', iconOnly = false, }) {
90
+ export function EditWithPuckLink({ id, collectionSlug = 'pages', editorPathPattern, label = 'Visual Editor', iconOnly = false, }) {
91
91
  // Build path - prefer admin view by default
92
92
  const path = editorPathPattern
93
93
  ? editorPathPattern.replace('{id}', id).replace('{collection}', collectionSlug)
@@ -1 +1 @@
1
- {"version":3,"file":"EditWithPuckButton.js","sourceRoot":"","sources":["../../src/admin/EditWithPuckButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAiC3D;;GAEG;AACH,SAAS,QAAQ,CAAC,EAAE,IAAI,GAAG,EAAE,EAAqB;IAChD,OAAO,CACL,eACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,aAEtB,eAAM,CAAC,EAAC,4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,EAAE,cAAc,CAAC;QAC/E,CAAC,CAAC,sBAAsB,cAAc,IAAI,EAAE,EAAE,CAAA;IAEhD,OAAO,CACL,aACE,IAAI,EAAE,IAAI,EACV,KAAK,EAAE;YACL,OAAO,EAAE,aAAa;YACtB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,KAAK;YACV,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW;YACvC,eAAe,EAAE,mCAAmC;YACpD,KAAK,EAAE,OAAO;YACd,YAAY,EAAE,KAAK;YACnB,cAAc,EAAE,MAAM;YACtB,QAAQ,EAAE,MAAM;YAChB,UAAU,EAAE,GAAG;YACf,UAAU,EAAE,eAAe;SAC5B,EACD,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE;YAClB,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAA;QACvC,CAAC,EACD,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE;YAClB,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAA;QACrC,CAAC,EACD,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,aAEnC,KAAC,QAAQ,IAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAI,EACrC,CAAC,QAAQ,IAAI,KAAK,IACjB,CACL,CAAA;AACH,CAAC;AAED,eAAe,kBAAkB,CAAA"}
@@ -60,7 +60,7 @@ export const EditWithPuckCell = ({ rowData, field, collectionSlug: contextCollec
60
60
  e.currentTarget.style.backgroundColor = '#1d4ed8';
61
61
  }, onMouseLeave: (e) => {
62
62
  e.currentTarget.style.backgroundColor = '#2563eb';
63
- }, title: "Edit with Puck Visual Editor", children: [_jsx(PuckIcon, { size: 14 }), _jsx("span", { children: "Visual Editor" })] }));
63
+ }, title: "Visual Editor", children: [_jsx(PuckIcon, { size: 14 }), _jsx("span", { children: "Visual Editor" })] }));
64
64
  };
65
65
  export default EditWithPuckCell;
66
66
  //# sourceMappingURL=EditWithPuckCell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditWithPuckCell.js","sourceRoot":"","sources":["../../src/admin/EditWithPuckCell.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAqBZ;;GAEG;AACH,SAAS,QAAQ,CAAC,EAAE,IAAI,GAAG,EAAE,EAAqB;IAChD,OAAO,CACL,eACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,aAEtB,eAAM,CAAC,EAAC,4DAA4D,GAAG,EACvE,eAAM,CAAC,EAAC,qDAAqD,GAAG,IAC5D,CACP,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAwC,CAAC,EACpE,OAAO,EACP,KAAK,EACL,cAAc,EAAE,qBAAqB,GACtC,EAAE,EAAE;IACH,gCAAgC;IAChC,MAAM,EAAE,GAAG,OAAO,EAAE,EAAwB,CAAA;IAE5C,+BAA+B;IAC/B,MAAM,YAAY,GAAI,KAAa,EAAE,MAA4C,CAAA;IACjF,MAAM,cAAc,GAAG,YAAY,EAAE,cAAc,IAAI,qBAAqB,IAAI,OAAO,CAAA;IAEvF,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,OAAO,IAAI,CAAA;IACb,CAAC;IAED,mBAAmB;IACnB,MAAM,UAAU,GAAG,YAAY,EAAE,iBAAiB;QAChD,CAAC,CAAC,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,cAAc,C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AE,KAAK;YACV,UAAU,EAAE,uBAAuB;YACnC,UAAU,EAAE,QAAQ;SACrB,EACD,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE;YAClB,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,eAAe,GAAG,SAAS,CAAA;QACnD,CAAC,EACD,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE;YAClB,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,eAAe,GAAG,SAAS,CAAA;QACnD,CAAC,EACD,KAAK,EAAC,eAAe,aAErB,KAAC,QAAQ,IAAC,IAAI,EAAE,EAAE,GAAI,EACtB,2CAA0B,IACxB,CACL,CAAA;AACH,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { Config as PuckConfig, Data, Plugin as PuckPlugin } from '@measured/puck';
1
+ import type { Config as PuckConfig, Data, Plugin as PuckPlugin } from '@puckeditor/core';
2
2
  /**
3
3
  * Props for the PuckEditorView component
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"PuckEditorView.d.ts","sourceRoot":"","sources":["../../src/admin/PuckEditorView.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,IAAI,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEtF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,MAAM,EAAE,UAAU,CAAA;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,CAAA;IAChD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,M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