@nodehive/nextjs 0.1.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 (777) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +102 -0
  3. package/dist/auth/index.d.ts +6 -0
  4. package/dist/auth/index.d.ts.map +1 -0
  5. package/dist/auth/index.js +7 -0
  6. package/dist/auth/index.js.map +1 -0
  7. package/dist/auth/internal/config.d.ts +24 -0
  8. package/dist/auth/internal/config.d.ts.map +1 -0
  9. package/dist/auth/internal/config.js +2 -0
  10. package/dist/auth/internal/config.js.map +1 -0
  11. package/dist/auth/internal/draft-mode.d.ts +17 -0
  12. package/dist/auth/internal/draft-mode.d.ts.map +1 -0
  13. package/dist/auth/internal/draft-mode.js +73 -0
  14. package/dist/auth/internal/draft-mode.js.map +1 -0
  15. package/dist/auth/internal/editor-locale.d.ts +4 -0
  16. package/dist/auth/internal/editor-locale.d.ts.map +1 -0
  17. package/dist/auth/internal/editor-locale.js +14 -0
  18. package/dist/auth/internal/editor-locale.js.map +1 -0
  19. package/dist/auth/internal/handoff.d.ts +11 -0
  20. package/dist/auth/internal/handoff.d.ts.map +1 -0
  21. package/dist/auth/internal/handoff.js +44 -0
  22. package/dist/auth/internal/handoff.js.map +1 -0
  23. package/dist/auth/internal/has-session.d.ts +7 -0
  24. package/dist/auth/internal/has-session.d.ts.map +1 -0
  25. package/dist/auth/internal/has-session.js +11 -0
  26. package/dist/auth/internal/has-session.js.map +1 -0
  27. package/dist/auth/internal/logout.d.ts +12 -0
  28. package/dist/auth/internal/logout.d.ts.map +1 -0
  29. package/dist/auth/internal/logout.js +48 -0
  30. package/dist/auth/internal/logout.js.map +1 -0
  31. package/dist/auth/internal/next-cookie-storage.d.ts +28 -0
  32. package/dist/auth/internal/next-cookie-storage.d.ts.map +1 -0
  33. package/dist/auth/internal/next-cookie-storage.js +103 -0
  34. package/dist/auth/internal/next-cookie-storage.js.map +1 -0
  35. package/dist/auth/internal/nodehive-client.d.ts +6 -0
  36. package/dist/auth/internal/nodehive-client.d.ts.map +1 -0
  37. package/dist/auth/internal/nodehive-client.js +64 -0
  38. package/dist/auth/internal/nodehive-client.js.map +1 -0
  39. package/dist/auth/internal/oauth-config.d.ts +37 -0
  40. package/dist/auth/internal/oauth-config.d.ts.map +1 -0
  41. package/dist/auth/internal/oauth-config.js +70 -0
  42. package/dist/auth/internal/oauth-config.js.map +1 -0
  43. package/dist/auth/internal/proxy-helpers.d.ts +15 -0
  44. package/dist/auth/internal/proxy-helpers.d.ts.map +1 -0
  45. package/dist/auth/internal/proxy-helpers.js +43 -0
  46. package/dist/auth/internal/proxy-helpers.js.map +1 -0
  47. package/dist/auth/internal/refresh.d.ts +13 -0
  48. package/dist/auth/internal/refresh.d.ts.map +1 -0
  49. package/dist/auth/internal/refresh.js +170 -0
  50. package/dist/auth/internal/refresh.js.map +1 -0
  51. package/dist/auth/internal/require-auth.d.ts +2 -0
  52. package/dist/auth/internal/require-auth.d.ts.map +1 -0
  53. package/dist/auth/internal/require-auth.js +11 -0
  54. package/dist/auth/internal/require-auth.js.map +1 -0
  55. package/dist/auth/internal/return-to.d.ts +16 -0
  56. package/dist/auth/internal/return-to.d.ts.map +1 -0
  57. package/dist/auth/internal/return-to.js +31 -0
  58. package/dist/auth/internal/return-to.js.map +1 -0
  59. package/dist/auth/internal/routes/callback.d.ts +11 -0
  60. package/dist/auth/internal/routes/callback.d.ts.map +1 -0
  61. package/dist/auth/internal/routes/callback.js +93 -0
  62. package/dist/auth/internal/routes/callback.js.map +1 -0
  63. package/dist/auth/internal/routes/chips-exchange.d.ts +4 -0
  64. package/dist/auth/internal/routes/chips-exchange.d.ts.map +1 -0
  65. package/dist/auth/internal/routes/chips-exchange.js +64 -0
  66. package/dist/auth/internal/routes/chips-exchange.js.map +1 -0
  67. package/dist/auth/internal/routes/draft.d.ts +4 -0
  68. package/dist/auth/internal/routes/draft.d.ts.map +1 -0
  69. package/dist/auth/internal/routes/draft.js +34 -0
  70. package/dist/auth/internal/routes/draft.js.map +1 -0
  71. package/dist/auth/internal/routes/index.d.ts +25 -0
  72. package/dist/auth/internal/routes/index.d.ts.map +1 -0
  73. package/dist/auth/internal/routes/index.js +66 -0
  74. package/dist/auth/internal/routes/index.js.map +1 -0
  75. package/dist/auth/internal/routes/login.d.ts +3 -0
  76. package/dist/auth/internal/routes/login.d.ts.map +1 -0
  77. package/dist/auth/internal/routes/login.js +47 -0
  78. package/dist/auth/internal/routes/login.js.map +1 -0
  79. package/dist/auth/internal/routes/popup-done.d.ts +3 -0
  80. package/dist/auth/internal/routes/popup-done.d.ts.map +1 -0
  81. package/dist/auth/internal/routes/popup-done.js +24 -0
  82. package/dist/auth/internal/routes/popup-done.js.map +1 -0
  83. package/dist/auth/internal/routes/refresh.d.ts +6 -0
  84. package/dist/auth/internal/routes/refresh.d.ts.map +1 -0
  85. package/dist/auth/internal/routes/refresh.js +44 -0
  86. package/dist/auth/internal/routes/refresh.js.map +1 -0
  87. package/dist/auth/internal/same-origin.d.ts +8 -0
  88. package/dist/auth/internal/same-origin.d.ts.map +1 -0
  89. package/dist/auth/internal/same-origin.js +9 -0
  90. package/dist/auth/internal/same-origin.js.map +1 -0
  91. package/dist/auth/internal/session-gates.d.ts +7 -0
  92. package/dist/auth/internal/session-gates.d.ts.map +1 -0
  93. package/dist/auth/internal/session-gates.js +12 -0
  94. package/dist/auth/internal/session-gates.js.map +1 -0
  95. package/dist/auth/internal/update-session.d.ts +17 -0
  96. package/dist/auth/internal/update-session.d.ts.map +1 -0
  97. package/dist/auth/internal/update-session.js +39 -0
  98. package/dist/auth/internal/update-session.js.map +1 -0
  99. package/dist/auth/internal/use-editor-login.d.ts +33 -0
  100. package/dist/auth/internal/use-editor-login.d.ts.map +1 -0
  101. package/dist/auth/internal/use-editor-login.js +143 -0
  102. package/dist/auth/internal/use-editor-login.js.map +1 -0
  103. package/dist/auth/proxy.d.ts +8 -0
  104. package/dist/auth/proxy.d.ts.map +1 -0
  105. package/dist/auth/proxy.js +8 -0
  106. package/dist/auth/proxy.js.map +1 -0
  107. package/dist/auth/react.d.ts +2 -0
  108. package/dist/auth/react.d.ts.map +1 -0
  109. package/dist/auth/react.js +3 -0
  110. package/dist/auth/react.js.map +1 -0
  111. package/dist/auth/routes.d.ts +3 -0
  112. package/dist/auth/routes.d.ts.map +1 -0
  113. package/dist/auth/routes.js +3 -0
  114. package/dist/auth/routes.js.map +1 -0
  115. package/dist/auth/server.d.ts +23 -0
  116. package/dist/auth/server.d.ts.map +1 -0
  117. package/dist/auth/server.js +61 -0
  118. package/dist/auth/server.js.map +1 -0
  119. package/dist/puck-editor/fields.d.ts +7 -0
  120. package/dist/puck-editor/fields.d.ts.map +1 -0
  121. package/dist/puck-editor/fields.js +4 -0
  122. package/dist/puck-editor/fields.js.map +1 -0
  123. package/dist/puck-editor/index.d.ts +14 -0
  124. package/dist/puck-editor/index.d.ts.map +1 -0
  125. package/dist/puck-editor/index.js +12 -0
  126. package/dist/puck-editor/index.js.map +1 -0
  127. package/dist/puck-editor/internal/api/client.d.ts +32 -0
  128. package/dist/puck-editor/internal/api/client.d.ts.map +1 -0
  129. package/dist/puck-editor/internal/api/client.js +128 -0
  130. package/dist/puck-editor/internal/api/client.js.map +1 -0
  131. package/dist/puck-editor/internal/api/config.d.ts +29 -0
  132. package/dist/puck-editor/internal/api/config.d.ts.map +1 -0
  133. package/dist/puck-editor/internal/api/config.js +2 -0
  134. package/dist/puck-editor/internal/api/config.js.map +1 -0
  135. package/dist/puck-editor/internal/api/create-puck-api.d.ts +26 -0
  136. package/dist/puck-editor/internal/api/create-puck-api.d.ts.map +1 -0
  137. package/dist/puck-editor/internal/api/create-puck-api.js +124 -0
  138. package/dist/puck-editor/internal/api/create-puck-api.js.map +1 -0
  139. package/dist/puck-editor/internal/api/handlers/create-page.d.ts +13 -0
  140. package/dist/puck-editor/internal/api/handlers/create-page.d.ts.map +1 -0
  141. package/dist/puck-editor/internal/api/handlers/create-page.js +125 -0
  142. package/dist/puck-editor/internal/api/handlers/create-page.js.map +1 -0
  143. package/dist/puck-editor/internal/api/handlers/entities.d.ts +17 -0
  144. package/dist/puck-editor/internal/api/handlers/entities.d.ts.map +1 -0
  145. package/dist/puck-editor/internal/api/handlers/entities.js +166 -0
  146. package/dist/puck-editor/internal/api/handlers/entities.js.map +1 -0
  147. package/dist/puck-editor/internal/api/handlers/publish.d.ts +6 -0
  148. package/dist/puck-editor/internal/api/handlers/publish.d.ts.map +1 -0
  149. package/dist/puck-editor/internal/api/handlers/publish.js +115 -0
  150. package/dist/puck-editor/internal/api/handlers/publish.js.map +1 -0
  151. package/dist/puck-editor/internal/api/handlers/template.d.ts +15 -0
  152. package/dist/puck-editor/internal/api/handlers/template.d.ts.map +1 -0
  153. package/dist/puck-editor/internal/api/handlers/template.js +222 -0
  154. package/dist/puck-editor/internal/api/handlers/template.js.map +1 -0
  155. package/dist/puck-editor/internal/api/handlers/upload.d.ts +13 -0
  156. package/dist/puck-editor/internal/api/handlers/upload.d.ts.map +1 -0
  157. package/dist/puck-editor/internal/api/handlers/upload.js +129 -0
  158. package/dist/puck-editor/internal/api/handlers/upload.js.map +1 -0
  159. package/dist/puck-editor/internal/api/media-params.d.ts +4 -0
  160. package/dist/puck-editor/internal/api/media-params.d.ts.map +1 -0
  161. package/dist/puck-editor/internal/api/media-params.js +38 -0
  162. package/dist/puck-editor/internal/api/media-params.js.map +1 -0
  163. package/dist/puck-editor/internal/api/media-upload.d.ts +24 -0
  164. package/dist/puck-editor/internal/api/media-upload.d.ts.map +1 -0
  165. package/dist/puck-editor/internal/api/media-upload.js +171 -0
  166. package/dist/puck-editor/internal/api/media-upload.js.map +1 -0
  167. package/dist/puck-editor/internal/api/space.d.ts +4 -0
  168. package/dist/puck-editor/internal/api/space.d.ts.map +1 -0
  169. package/dist/puck-editor/internal/api/space.js +11 -0
  170. package/dist/puck-editor/internal/api/space.js.map +1 -0
  171. package/dist/puck-editor/internal/content-model.d.ts +55 -0
  172. package/dist/puck-editor/internal/content-model.d.ts.map +1 -0
  173. package/dist/puck-editor/internal/content-model.js +73 -0
  174. package/dist/puck-editor/internal/content-model.js.map +1 -0
  175. package/dist/puck-editor/internal/editor/allowed-types.d.ts +4 -0
  176. package/dist/puck-editor/internal/editor/allowed-types.d.ts.map +1 -0
  177. package/dist/puck-editor/internal/editor/allowed-types.js +6 -0
  178. package/dist/puck-editor/internal/editor/allowed-types.js.map +1 -0
  179. package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts +9 -0
  180. package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts.map +1 -0
  181. package/dist/puck-editor/internal/editor/canvas-add-picker.js +231 -0
  182. package/dist/puck-editor/internal/editor/canvas-add-picker.js.map +1 -0
  183. package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts +6 -0
  184. package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts.map +1 -0
  185. package/dist/puck-editor/internal/editor/canvas-empty-state.js +85 -0
  186. package/dist/puck-editor/internal/editor/canvas-empty-state.js.map +1 -0
  187. package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts +2 -0
  188. package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts.map +1 -0
  189. package/dist/puck-editor/internal/editor/canvas-quick-add.js +844 -0
  190. package/dist/puck-editor/internal/editor/canvas-quick-add.js.map +1 -0
  191. package/dist/puck-editor/internal/editor/canvas-scroll.d.ts +3 -0
  192. package/dist/puck-editor/internal/editor/canvas-scroll.d.ts.map +1 -0
  193. package/dist/puck-editor/internal/editor/canvas-scroll.js +16 -0
  194. package/dist/puck-editor/internal/editor/canvas-scroll.js.map +1 -0
  195. package/dist/puck-editor/internal/editor/component-icons.d.ts +14 -0
  196. package/dist/puck-editor/internal/editor/component-icons.d.ts.map +1 -0
  197. package/dist/puck-editor/internal/editor/component-icons.js +35 -0
  198. package/dist/puck-editor/internal/editor/component-icons.js.map +1 -0
  199. package/dist/puck-editor/internal/editor/component-item.d.ts +6 -0
  200. package/dist/puck-editor/internal/editor/component-item.d.ts.map +1 -0
  201. package/dist/puck-editor/internal/editor/component-item.js +42 -0
  202. package/dist/puck-editor/internal/editor/component-item.js.map +1 -0
  203. package/dist/puck-editor/internal/editor/editor-action-bar.d.ts +6 -0
  204. package/dist/puck-editor/internal/editor/editor-action-bar.d.ts.map +1 -0
  205. package/dist/puck-editor/internal/editor/editor-action-bar.js +249 -0
  206. package/dist/puck-editor/internal/editor/editor-action-bar.js.map +1 -0
  207. package/dist/puck-editor/internal/editor/editor-header-actions.d.ts +7 -0
  208. package/dist/puck-editor/internal/editor/editor-header-actions.d.ts.map +1 -0
  209. package/dist/puck-editor/internal/editor/editor-header-actions.js +120 -0
  210. package/dist/puck-editor/internal/editor/editor-header-actions.js.map +1 -0
  211. package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts +15 -0
  212. package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts.map +1 -0
  213. package/dist/puck-editor/internal/editor/find-missing-required-fields.js +61 -0
  214. package/dist/puck-editor/internal/editor/find-missing-required-fields.js.map +1 -0
  215. package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts +15 -0
  216. package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts.map +1 -0
  217. package/dist/puck-editor/internal/editor/grouped-drawer-panel.js +147 -0
  218. package/dist/puck-editor/internal/editor/grouped-drawer-panel.js.map +1 -0
  219. package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts +17 -0
  220. package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts.map +1 -0
  221. package/dist/puck-editor/internal/editor/grouped-entry-list.js +125 -0
  222. package/dist/puck-editor/internal/editor/grouped-entry-list.js.map +1 -0
  223. package/dist/puck-editor/internal/editor/header-save-button.d.ts +5 -0
  224. package/dist/puck-editor/internal/editor/header-save-button.d.ts.map +1 -0
  225. package/dist/puck-editor/internal/editor/header-save-button.js +60 -0
  226. package/dist/puck-editor/internal/editor/header-save-button.js.map +1 -0
  227. package/dist/puck-editor/internal/editor/page-template-picker.d.ts +4 -0
  228. package/dist/puck-editor/internal/editor/page-template-picker.d.ts.map +1 -0
  229. package/dist/puck-editor/internal/editor/page-template-picker.js +140 -0
  230. package/dist/puck-editor/internal/editor/page-template-picker.js.map +1 -0
  231. package/dist/puck-editor/internal/editor/picker-entry-item.d.ts +6 -0
  232. package/dist/puck-editor/internal/editor/picker-entry-item.d.ts.map +1 -0
  233. package/dist/puck-editor/internal/editor/picker-entry-item.js +79 -0
  234. package/dist/puck-editor/internal/editor/picker-entry-item.js.map +1 -0
  235. package/dist/puck-editor/internal/editor/picker-model.d.ts +62 -0
  236. package/dist/puck-editor/internal/editor/picker-model.d.ts.map +1 -0
  237. package/dist/puck-editor/internal/editor/picker-model.js +489 -0
  238. package/dist/puck-editor/internal/editor/picker-model.js.map +1 -0
  239. package/dist/puck-editor/internal/editor/publish-puck-data.d.ts +30 -0
  240. package/dist/puck-editor/internal/editor/publish-puck-data.d.ts.map +1 -0
  241. package/dist/puck-editor/internal/editor/publish-puck-data.js +30 -0
  242. package/dist/puck-editor/internal/editor/publish-puck-data.js.map +1 -0
  243. package/dist/puck-editor/internal/editor/puck-editor.d.ts +15 -0
  244. package/dist/puck-editor/internal/editor/puck-editor.d.ts.map +1 -0
  245. package/dist/puck-editor/internal/editor/puck-editor.js +333 -0
  246. package/dist/puck-editor/internal/editor/puck-editor.js.map +1 -0
  247. package/dist/puck-editor/internal/editor/section-template-modal.d.ts +4 -0
  248. package/dist/puck-editor/internal/editor/section-template-modal.d.ts.map +1 -0
  249. package/dist/puck-editor/internal/editor/section-template-modal.js +71 -0
  250. package/dist/puck-editor/internal/editor/section-template-modal.js.map +1 -0
  251. package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts +15 -0
  252. package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts.map +1 -0
  253. package/dist/puck-editor/internal/editor/use-scroll-lock-outside.js +93 -0
  254. package/dist/puck-editor/internal/editor/use-scroll-lock-outside.js.map +1 -0
  255. package/dist/puck-editor/internal/editor-config.d.ts +30 -0
  256. package/dist/puck-editor/internal/editor-config.d.ts.map +1 -0
  257. package/dist/puck-editor/internal/editor-config.js +57 -0
  258. package/dist/puck-editor/internal/editor-config.js.map +1 -0
  259. package/dist/puck-editor/internal/editor-query-client.d.ts +4 -0
  260. package/dist/puck-editor/internal/editor-query-client.d.ts.map +1 -0
  261. package/dist/puck-editor/internal/editor-query-client.js +8 -0
  262. package/dist/puck-editor/internal/editor-query-client.js.map +1 -0
  263. package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts +14 -0
  264. package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts.map +1 -0
  265. package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js +120 -0
  266. package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js.map +1 -0
  267. package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts +21 -0
  268. package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts.map +1 -0
  269. package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js +24 -0
  270. package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js.map +1 -0
  271. package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts +16 -0
  272. package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts.map +1 -0
  273. package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js +20 -0
  274. package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js.map +1 -0
  275. package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts +8 -0
  276. package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts.map +1 -0
  277. package/dist/puck-editor/internal/fields/date-picker/date-picker.js +151 -0
  278. package/dist/puck-editor/internal/fields/date-picker/date-picker.js.map +1 -0
  279. package/dist/puck-editor/internal/fields/index.d.ts +10 -0
  280. package/dist/puck-editor/internal/fields/index.d.ts.map +1 -0
  281. package/dist/puck-editor/internal/fields/index.js +10 -0
  282. package/dist/puck-editor/internal/fields/index.js.map +1 -0
  283. package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts +33 -0
  284. package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts.map +1 -0
  285. package/dist/puck-editor/internal/fields/link-picker/anchor.js +83 -0
  286. package/dist/puck-editor/internal/fields/link-picker/anchor.js.map +1 -0
  287. package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts +24 -0
  288. package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts.map +1 -0
  289. package/dist/puck-editor/internal/fields/link-picker/create-link-field.js +31 -0
  290. package/dist/puck-editor/internal/fields/link-picker/create-link-field.js.map +1 -0
  291. package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts +2 -0
  292. package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts.map +1 -0
  293. package/dist/puck-editor/internal/fields/link-picker/humanize.js +4 -0
  294. package/dist/puck-editor/internal/fields/link-picker/humanize.js.map +1 -0
  295. package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts +27 -0
  296. package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts.map +1 -0
  297. package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js +564 -0
  298. package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js.map +1 -0
  299. package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts +9 -0
  300. package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts.map +1 -0
  301. package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js +189 -0
  302. package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js.map +1 -0
  303. package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts +72 -0
  304. package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts.map +1 -0
  305. package/dist/puck-editor/internal/fields/link-picker/link-value.js +114 -0
  306. package/dist/puck-editor/internal/fields/link-picker/link-value.js.map +1 -0
  307. package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts +14 -0
  308. package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts.map +1 -0
  309. package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js +667 -0
  310. package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js.map +1 -0
  311. package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts +11 -0
  312. package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts.map +1 -0
  313. package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.js +34 -0
  314. package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.js.map +1 -0
  315. package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts +40 -0
  316. package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts.map +1 -0
  317. package/dist/puck-editor/internal/fields/link-picker/segmented-control.js +146 -0
  318. package/dist/puck-editor/internal/fields/link-picker/segmented-control.js.map +1 -0
  319. package/dist/puck-editor/internal/fields/link-picker/types.d.ts +34 -0
  320. package/dist/puck-editor/internal/fields/link-picker/types.d.ts.map +1 -0
  321. package/dist/puck-editor/internal/fields/link-picker/types.js +2 -0
  322. package/dist/puck-editor/internal/fields/link-picker/types.js.map +1 -0
  323. package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts +27 -0
  324. package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts.map +1 -0
  325. package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js +32 -0
  326. package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js.map +1 -0
  327. package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts +13 -0
  328. package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts.map +1 -0
  329. package/dist/puck-editor/internal/fields/media-array/media-array-field.js +372 -0
  330. package/dist/puck-editor/internal/fields/media-array/media-array-field.js.map +1 -0
  331. package/dist/puck-editor/internal/fields/media-array/reorder.d.ts +2 -0
  332. package/dist/puck-editor/internal/fields/media-array/reorder.d.ts.map +1 -0
  333. package/dist/puck-editor/internal/fields/media-array/reorder.js +8 -0
  334. package/dist/puck-editor/internal/fields/media-array/reorder.js.map +1 -0
  335. package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts +27 -0
  336. package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts.map +1 -0
  337. package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js +32 -0
  338. package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js.map +1 -0
  339. package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts +11 -0
  340. package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts.map +1 -0
  341. package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js +219 -0
  342. package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js.map +1 -0
  343. package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts +24 -0
  344. package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts.map +1 -0
  345. package/dist/puck-editor/internal/fields/media-selector/crop-types.js +8 -0
  346. package/dist/puck-editor/internal/fields/media-selector/crop-types.js.map +1 -0
  347. package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts +8 -0
  348. package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts.map +1 -0
  349. package/dist/puck-editor/internal/fields/media-selector/extract-fields.js +51 -0
  350. package/dist/puck-editor/internal/fields/media-selector/extract-fields.js.map +1 -0
  351. package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts +7 -0
  352. package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts.map +1 -0
  353. package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js +147 -0
  354. package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js.map +1 -0
  355. package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts +30 -0
  356. package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts.map +1 -0
  357. package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js +358 -0
  358. package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js.map +1 -0
  359. package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts +14 -0
  360. package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts.map +1 -0
  361. package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js +355 -0
  362. package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js.map +1 -0
  363. package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts +2 -0
  364. package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts.map +1 -0
  365. package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.js +55 -0
  366. package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.js.map +1 -0
  367. package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts +24 -0
  368. package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts.map +1 -0
  369. package/dist/puck-editor/internal/fields/media-selector/use-media-library.js +229 -0
  370. package/dist/puck-editor/internal/fields/media-selector/use-media-library.js.map +1 -0
  371. package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts +7 -0
  372. package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts.map +1 -0
  373. package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js +120 -0
  374. package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js.map +1 -0
  375. package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts +31 -0
  376. package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts.map +1 -0
  377. package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js +39 -0
  378. package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js.map +1 -0
  379. package/dist/puck-editor/internal/fields/required-field-label.d.ts +16 -0
  380. package/dist/puck-editor/internal/fields/required-field-label.d.ts.map +1 -0
  381. package/dist/puck-editor/internal/fields/required-field-label.js +89 -0
  382. package/dist/puck-editor/internal/fields/required-field-label.js.map +1 -0
  383. package/dist/puck-editor/internal/fields/required.d.ts +19 -0
  384. package/dist/puck-editor/internal/fields/required.d.ts.map +1 -0
  385. package/dist/puck-editor/internal/fields/required.js +20 -0
  386. package/dist/puck-editor/internal/fields/required.js.map +1 -0
  387. package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts +37 -0
  388. package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts.map +1 -0
  389. package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js +26 -0
  390. package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js.map +1 -0
  391. package/dist/puck-editor/internal/i18n.d.ts +188 -0
  392. package/dist/puck-editor/internal/i18n.d.ts.map +1 -0
  393. package/dist/puck-editor/internal/i18n.js +414 -0
  394. package/dist/puck-editor/internal/i18n.js.map +1 -0
  395. package/dist/puck-editor/internal/locale.d.ts +13 -0
  396. package/dist/puck-editor/internal/locale.d.ts.map +1 -0
  397. package/dist/puck-editor/internal/locale.js +20 -0
  398. package/dist/puck-editor/internal/locale.js.map +1 -0
  399. package/dist/puck-editor/internal/localize.d.ts +11 -0
  400. package/dist/puck-editor/internal/localize.d.ts.map +1 -0
  401. package/dist/puck-editor/internal/localize.js +42 -0
  402. package/dist/puck-editor/internal/localize.js.map +1 -0
  403. package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts +21 -0
  404. package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts.map +1 -0
  405. package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js +197 -0
  406. package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js.map +1 -0
  407. package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts +2 -0
  408. package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts.map +1 -0
  409. package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js +131 -0
  410. package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js.map +1 -0
  411. package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts +20 -0
  412. package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts.map +1 -0
  413. package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.js +46 -0
  414. package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.js.map +1 -0
  415. package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts +46 -0
  416. package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts.map +1 -0
  417. package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js +176 -0
  418. package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js.map +1 -0
  419. package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts +20 -0
  420. package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts.map +1 -0
  421. package/dist/puck-editor/internal/plugins/agent-plugin/catalog.js +39 -0
  422. package/dist/puck-editor/internal/plugins/agent-plugin/catalog.js.map +1 -0
  423. package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts +5 -0
  424. package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts.map +1 -0
  425. package/dist/puck-editor/internal/plugins/agent-plugin/constants.js +3 -0
  426. package/dist/puck-editor/internal/plugins/agent-plugin/constants.js.map +1 -0
  427. package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts +17 -0
  428. package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts.map +1 -0
  429. package/dist/puck-editor/internal/plugins/agent-plugin/create-page.js +35 -0
  430. package/dist/puck-editor/internal/plugins/agent-plugin/create-page.js.map +1 -0
  431. package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts +19 -0
  432. package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts.map +1 -0
  433. package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.js +79 -0
  434. package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.js.map +1 -0
  435. package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts +2 -0
  436. package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts.map +1 -0
  437. package/dist/puck-editor/internal/plugins/agent-plugin/help.js +243 -0
  438. package/dist/puck-editor/internal/plugins/agent-plugin/help.js.map +1 -0
  439. package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts +2 -0
  440. package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts.map +1 -0
  441. package/dist/puck-editor/internal/plugins/agent-plugin/index.js +2 -0
  442. package/dist/puck-editor/internal/plugins/agent-plugin/index.js.map +1 -0
  443. package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts +19 -0
  444. package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts.map +1 -0
  445. package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js +31 -0
  446. package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js.map +1 -0
  447. package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts +23 -0
  448. package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts.map +1 -0
  449. package/dist/puck-editor/internal/plugins/agent-plugin/templates.js +72 -0
  450. package/dist/puck-editor/internal/plugins/agent-plugin/templates.js.map +1 -0
  451. package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts +20 -0
  452. package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts.map +1 -0
  453. package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.js +34 -0
  454. package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.js.map +1 -0
  455. package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts +17 -0
  456. package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts.map +1 -0
  457. package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js +70 -0
  458. package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js.map +1 -0
  459. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts +2 -0
  460. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts.map +1 -0
  461. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js +37 -0
  462. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js.map +1 -0
  463. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts +7 -0
  464. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts.map +1 -0
  465. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js +18 -0
  466. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js.map +1 -0
  467. package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts +2 -0
  468. package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts.map +1 -0
  469. package/dist/puck-editor/internal/plugins/blocks-plugin/index.js +2 -0
  470. package/dist/puck-editor/internal/plugins/blocks-plugin/index.js.map +1 -0
  471. package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts +2 -0
  472. package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts.map +1 -0
  473. package/dist/puck-editor/internal/plugins/outline-plugin/index.js +2 -0
  474. package/dist/puck-editor/internal/plugins/outline-plugin/index.js.map +1 -0
  475. package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts +2 -0
  476. package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts.map +1 -0
  477. package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js +861 -0
  478. package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js.map +1 -0
  479. package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts +5 -0
  480. package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts.map +1 -0
  481. package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js +16 -0
  482. package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js.map +1 -0
  483. package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts +53 -0
  484. package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts.map +1 -0
  485. package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.js +145 -0
  486. package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.js.map +1 -0
  487. package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts +2 -0
  488. package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts.map +1 -0
  489. package/dist/puck-editor/internal/plugins/sections-plugin/index.js +2 -0
  490. package/dist/puck-editor/internal/plugins/sections-plugin/index.js.map +1 -0
  491. package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts +2 -0
  492. package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts.map +1 -0
  493. package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js +69 -0
  494. package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js.map +1 -0
  495. package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts +7 -0
  496. package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts.map +1 -0
  497. package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js +18 -0
  498. package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js.map +1 -0
  499. package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts +6 -0
  500. package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts.map +1 -0
  501. package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js +178 -0
  502. package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js.map +1 -0
  503. package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts +3 -0
  504. package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts.map +1 -0
  505. package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js +55 -0
  506. package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js.map +1 -0
  507. package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts +12 -0
  508. package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts.map +1 -0
  509. package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js +125 -0
  510. package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js.map +1 -0
  511. package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts +8 -0
  512. package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts.map +1 -0
  513. package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js +582 -0
  514. package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js.map +1 -0
  515. package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts +6 -0
  516. package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts.map +1 -0
  517. package/dist/puck-editor/internal/plugins/templates-plugin/index.js +6 -0
  518. package/dist/puck-editor/internal/plugins/templates-plugin/index.js.map +1 -0
  519. package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts +4 -0
  520. package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts.map +1 -0
  521. package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js +54 -0
  522. package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js.map +1 -0
  523. package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts +11 -0
  524. package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts.map +1 -0
  525. package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js +92 -0
  526. package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js.map +1 -0
  527. package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts +7 -0
  528. package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts.map +1 -0
  529. package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js +30 -0
  530. package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js.map +1 -0
  531. package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts +2 -0
  532. package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts.map +1 -0
  533. package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js +471 -0
  534. package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js.map +1 -0
  535. package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts +5 -0
  536. package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts.map +1 -0
  537. package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js +16 -0
  538. package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js.map +1 -0
  539. package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts +43 -0
  540. package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts.map +1 -0
  541. package/dist/puck-editor/internal/plugins/templates-plugin/templates.js +115 -0
  542. package/dist/puck-editor/internal/plugins/templates-plugin/templates.js.map +1 -0
  543. package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts +9 -0
  544. package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts.map +1 -0
  545. package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js +152 -0
  546. package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js.map +1 -0
  547. package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts +16 -0
  548. package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts.map +1 -0
  549. package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js +134 -0
  550. package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js.map +1 -0
  551. package/dist/puck-editor/internal/puck-augmentation.d.ts +28 -0
  552. package/dist/puck-editor/internal/puck-augmentation.d.ts.map +1 -0
  553. package/dist/puck-editor/internal/puck-augmentation.js +7 -0
  554. package/dist/puck-editor/internal/puck-augmentation.js.map +1 -0
  555. package/dist/puck-editor/internal/puck-editor-provider.d.ts +12 -0
  556. package/dist/puck-editor/internal/puck-editor-provider.d.ts.map +1 -0
  557. package/dist/puck-editor/internal/puck-editor-provider.js +69 -0
  558. package/dist/puck-editor/internal/puck-editor-provider.js.map +1 -0
  559. package/dist/puck-editor/internal/puck-node.d.ts +29 -0
  560. package/dist/puck-editor/internal/puck-node.d.ts.map +1 -0
  561. package/dist/puck-editor/internal/puck-node.js +2 -0
  562. package/dist/puck-editor/internal/puck-node.js.map +1 -0
  563. package/dist/puck-editor/internal/puck-wrapper.d.ts +19 -0
  564. package/dist/puck-editor/internal/puck-wrapper.d.ts.map +1 -0
  565. package/dist/puck-editor/internal/puck-wrapper.js +270 -0
  566. package/dist/puck-editor/internal/puck-wrapper.js.map +1 -0
  567. package/dist/puck-editor/internal/render/cropped-image.d.ts +19 -0
  568. package/dist/puck-editor/internal/render/cropped-image.d.ts.map +1 -0
  569. package/dist/puck-editor/internal/render/cropped-image.js +126 -0
  570. package/dist/puck-editor/internal/render/cropped-image.js.map +1 -0
  571. package/dist/puck-editor/internal/smart-actions/index.d.ts +13 -0
  572. package/dist/puck-editor/internal/smart-actions/index.d.ts.map +1 -0
  573. package/dist/puck-editor/internal/smart-actions/index.js +29 -0
  574. package/dist/puck-editor/internal/smart-actions/index.js.map +1 -0
  575. package/dist/puck-editor/internal/smart-actions/new-page.d.ts +13 -0
  576. package/dist/puck-editor/internal/smart-actions/new-page.d.ts.map +1 -0
  577. package/dist/puck-editor/internal/smart-actions/new-page.js +80 -0
  578. package/dist/puck-editor/internal/smart-actions/new-page.js.map +1 -0
  579. package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts +2 -0
  580. package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts.map +1 -0
  581. package/dist/puck-editor/internal/smart-actions/open-puck-editor.js +65 -0
  582. package/dist/puck-editor/internal/smart-actions/open-puck-editor.js.map +1 -0
  583. package/dist/puck-editor/internal/ui/calendar.d.ts +9 -0
  584. package/dist/puck-editor/internal/ui/calendar.d.ts.map +1 -0
  585. package/dist/puck-editor/internal/ui/calendar.js +147 -0
  586. package/dist/puck-editor/internal/ui/calendar.js.map +1 -0
  587. package/dist/puck-editor/internal/ui/component-list-accordion.d.ts +13 -0
  588. package/dist/puck-editor/internal/ui/component-list-accordion.d.ts.map +1 -0
  589. package/dist/puck-editor/internal/ui/component-list-accordion.js +93 -0
  590. package/dist/puck-editor/internal/ui/component-list-accordion.js.map +1 -0
  591. package/dist/puck-editor/internal/ui/dialog.d.ts +20 -0
  592. package/dist/puck-editor/internal/ui/dialog.d.ts.map +1 -0
  593. package/dist/puck-editor/internal/ui/dialog.js +286 -0
  594. package/dist/puck-editor/internal/ui/dialog.js.map +1 -0
  595. package/dist/puck-editor/internal/ui/drawer-item-content.d.ts +11 -0
  596. package/dist/puck-editor/internal/ui/drawer-item-content.d.ts.map +1 -0
  597. package/dist/puck-editor/internal/ui/drawer-item-content.js +109 -0
  598. package/dist/puck-editor/internal/ui/drawer-item-content.js.map +1 -0
  599. package/dist/puck-editor/internal/ui/icon-button.d.ts +10 -0
  600. package/dist/puck-editor/internal/ui/icon-button.d.ts.map +1 -0
  601. package/dist/puck-editor/internal/ui/icon-button.js +72 -0
  602. package/dist/puck-editor/internal/ui/icon-button.js.map +1 -0
  603. package/dist/puck-editor/internal/ui/popover.d.ts +9 -0
  604. package/dist/puck-editor/internal/ui/popover.d.ts.map +1 -0
  605. package/dist/puck-editor/internal/ui/popover.js +165 -0
  606. package/dist/puck-editor/internal/ui/popover.js.map +1 -0
  607. package/dist/puck-editor/internal/ui/required-mark.d.ts +2 -0
  608. package/dist/puck-editor/internal/ui/required-mark.d.ts.map +1 -0
  609. package/dist/puck-editor/internal/ui/required-mark.js +12 -0
  610. package/dist/puck-editor/internal/ui/required-mark.js.map +1 -0
  611. package/dist/puck-editor/internal/ui/search-control.d.ts +20 -0
  612. package/dist/puck-editor/internal/ui/search-control.d.ts.map +1 -0
  613. package/dist/puck-editor/internal/ui/search-control.js +156 -0
  614. package/dist/puck-editor/internal/ui/search-control.js.map +1 -0
  615. package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts +2 -0
  616. package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts.map +1 -0
  617. package/dist/puck-editor/internal/ui/use-panel-search-focus.js +40 -0
  618. package/dist/puck-editor/internal/ui/use-panel-search-focus.js.map +1 -0
  619. package/dist/puck-editor/internal/use-puck-overlay.d.ts +16 -0
  620. package/dist/puck-editor/internal/use-puck-overlay.d.ts.map +1 -0
  621. package/dist/puck-editor/internal/use-puck-overlay.js +121 -0
  622. package/dist/puck-editor/internal/use-puck-overlay.js.map +1 -0
  623. package/dist/puck-editor/internal/utils.d.ts +6 -0
  624. package/dist/puck-editor/internal/utils.d.ts.map +1 -0
  625. package/dist/puck-editor/internal/utils.js +57 -0
  626. package/dist/puck-editor/internal/utils.js.map +1 -0
  627. package/dist/puck-editor/puck-theme.css +110 -0
  628. package/dist/puck-editor/render.d.ts +3 -0
  629. package/dist/puck-editor/render.d.ts.map +1 -0
  630. package/dist/puck-editor/render.js +2 -0
  631. package/dist/puck-editor/render.js.map +1 -0
  632. package/dist/puck-editor/server.d.ts +4 -0
  633. package/dist/puck-editor/server.d.ts.map +1 -0
  634. package/dist/puck-editor/server.js +4 -0
  635. package/dist/puck-editor/server.js.map +1 -0
  636. package/dist/puck-editor/smart-actions.d.ts +2 -0
  637. package/dist/puck-editor/smart-actions.d.ts.map +1 -0
  638. package/dist/puck-editor/smart-actions.js +2 -0
  639. package/dist/puck-editor/smart-actions.js.map +1 -0
  640. package/dist/shared/cn.d.ts +3 -0
  641. package/dist/shared/cn.d.ts.map +1 -0
  642. package/dist/shared/cn.js +9 -0
  643. package/dist/shared/cn.js.map +1 -0
  644. package/dist/shared/i18n.d.ts +5 -0
  645. package/dist/shared/i18n.d.ts.map +1 -0
  646. package/dist/shared/i18n.js +18 -0
  647. package/dist/shared/i18n.js.map +1 -0
  648. package/dist/shared/toolbar-action.d.ts +9 -0
  649. package/dist/shared/toolbar-action.d.ts.map +1 -0
  650. package/dist/shared/toolbar-action.js +2 -0
  651. package/dist/shared/toolbar-action.js.map +1 -0
  652. package/dist/smart-actions/internal/get-smart-actions-context.d.ts +19 -0
  653. package/dist/smart-actions/internal/get-smart-actions-context.d.ts.map +1 -0
  654. package/dist/smart-actions/internal/get-smart-actions-context.js +24 -0
  655. package/dist/smart-actions/internal/get-smart-actions-context.js.map +1 -0
  656. package/dist/smart-actions/internal/i18n.d.ts +20 -0
  657. package/dist/smart-actions/internal/i18n.d.ts.map +1 -0
  658. package/dist/smart-actions/internal/i18n.js +35 -0
  659. package/dist/smart-actions/internal/i18n.js.map +1 -0
  660. package/dist/smart-actions/internal/logout-form.d.ts +8 -0
  661. package/dist/smart-actions/internal/logout-form.d.ts.map +1 -0
  662. package/dist/smart-actions/internal/logout-form.js +88 -0
  663. package/dist/smart-actions/internal/logout-form.js.map +1 -0
  664. package/dist/smart-actions/internal/refresh-page.d.ts +2 -0
  665. package/dist/smart-actions/internal/refresh-page.d.ts.map +1 -0
  666. package/dist/smart-actions/internal/refresh-page.js +126 -0
  667. package/dist/smart-actions/internal/refresh-page.js.map +1 -0
  668. package/dist/smart-actions/internal/smart-actions-button.d.ts +24 -0
  669. package/dist/smart-actions/internal/smart-actions-button.d.ts.map +1 -0
  670. package/dist/smart-actions/internal/smart-actions-button.js +41 -0
  671. package/dist/smart-actions/internal/smart-actions-button.js.map +1 -0
  672. package/dist/smart-actions/internal/smart-actions-config.d.ts +13 -0
  673. package/dist/smart-actions/internal/smart-actions-config.d.ts.map +1 -0
  674. package/dist/smart-actions/internal/smart-actions-config.js +101 -0
  675. package/dist/smart-actions/internal/smart-actions-config.js.map +1 -0
  676. package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts +15 -0
  677. package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts.map +1 -0
  678. package/dist/smart-actions/internal/smart-actions-toolbar-client.js +71 -0
  679. package/dist/smart-actions/internal/smart-actions-toolbar-client.js.map +1 -0
  680. package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts +13 -0
  681. package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts.map +1 -0
  682. package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js +323 -0
  683. package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js.map +1 -0
  684. package/dist/smart-actions/internal/toolbar/storage.d.ts +7 -0
  685. package/dist/smart-actions/internal/toolbar/storage.d.ts.map +1 -0
  686. package/dist/smart-actions/internal/toolbar/storage.js +29 -0
  687. package/dist/smart-actions/internal/toolbar/storage.js.map +1 -0
  688. package/dist/smart-actions/internal/toolbar/types.d.ts +4 -0
  689. package/dist/smart-actions/internal/toolbar/types.d.ts.map +1 -0
  690. package/dist/smart-actions/internal/toolbar/types.js +2 -0
  691. package/dist/smart-actions/internal/toolbar/types.js.map +1 -0
  692. package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts +6 -0
  693. package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts.map +1 -0
  694. package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js +43 -0
  695. package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js.map +1 -0
  696. package/dist/smart-actions/internal/ui/tooltip.d.ts +8 -0
  697. package/dist/smart-actions/internal/ui/tooltip.d.ts.map +1 -0
  698. package/dist/smart-actions/internal/ui/tooltip.js +156 -0
  699. package/dist/smart-actions/internal/ui/tooltip.js.map +1 -0
  700. package/dist/smart-actions/internal/user-profile.d.ts +8 -0
  701. package/dist/smart-actions/internal/user-profile.d.ts.map +1 -0
  702. package/dist/smart-actions/internal/user-profile.js +30 -0
  703. package/dist/smart-actions/internal/user-profile.js.map +1 -0
  704. package/dist/smart-actions/server.d.ts +4 -0
  705. package/dist/smart-actions/server.d.ts.map +1 -0
  706. package/dist/smart-actions/server.js +4 -0
  707. package/dist/smart-actions/server.js.map +1 -0
  708. package/dist/theme.css +2 -0
  709. package/dist/visual-editor/index.d.ts +4 -0
  710. package/dist/visual-editor/index.d.ts.map +1 -0
  711. package/dist/visual-editor/index.js +4 -0
  712. package/dist/visual-editor/index.js.map +1 -0
  713. package/dist/visual-editor/internal/bridge/connector.d.ts +7 -0
  714. package/dist/visual-editor/internal/bridge/connector.d.ts.map +1 -0
  715. package/dist/visual-editor/internal/bridge/connector.js +72 -0
  716. package/dist/visual-editor/internal/bridge/connector.js.map +1 -0
  717. package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts +8 -0
  718. package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts.map +1 -0
  719. package/dist/visual-editor/internal/bridge/draft-mode-self-heal.js +44 -0
  720. package/dist/visual-editor/internal/bridge/draft-mode-self-heal.js.map +1 -0
  721. package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts +16 -0
  722. package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts.map +1 -0
  723. package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js +43 -0
  724. package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js.map +1 -0
  725. package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts +15 -0
  726. package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts.map +1 -0
  727. package/dist/visual-editor/internal/bridge/editor-auth-gate.js +146 -0
  728. package/dist/visual-editor/internal/bridge/editor-auth-gate.js.map +1 -0
  729. package/dist/visual-editor/internal/i18n.d.ts +29 -0
  730. package/dist/visual-editor/internal/i18n.d.ts.map +1 -0
  731. package/dist/visual-editor/internal/i18n.js +51 -0
  732. package/dist/visual-editor/internal/i18n.js.map +1 -0
  733. package/dist/visual-editor/internal/overlays/drupal-origin.d.ts +7 -0
  734. package/dist/visual-editor/internal/overlays/drupal-origin.d.ts.map +1 -0
  735. package/dist/visual-editor/internal/overlays/drupal-origin.js +15 -0
  736. package/dist/visual-editor/internal/overlays/drupal-origin.js.map +1 -0
  737. package/dist/visual-editor/internal/overlays/edit-button.d.ts +10 -0
  738. package/dist/visual-editor/internal/overlays/edit-button.d.ts.map +1 -0
  739. package/dist/visual-editor/internal/overlays/edit-button.js +138 -0
  740. package/dist/visual-editor/internal/overlays/edit-button.js.map +1 -0
  741. package/dist/visual-editor/internal/overlays/edit-icon.d.ts +3 -0
  742. package/dist/visual-editor/internal/overlays/edit-icon.d.ts.map +1 -0
  743. package/dist/visual-editor/internal/overlays/edit-icon.js +19 -0
  744. package/dist/visual-editor/internal/overlays/edit-icon.js.map +1 -0
  745. package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts +15 -0
  746. package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts.map +1 -0
  747. package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js +52 -0
  748. package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js.map +1 -0
  749. package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts +6 -0
  750. package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts.map +1 -0
  751. package/dist/visual-editor/internal/overlays/iframe-wrapper.js +42 -0
  752. package/dist/visual-editor/internal/overlays/iframe-wrapper.js.map +1 -0
  753. package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts +9 -0
  754. package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts.map +1 -0
  755. package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js +33 -0
  756. package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js.map +1 -0
  757. package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts +13 -0
  758. package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts.map +1 -0
  759. package/dist/visual-editor/internal/overlays/node/node-metadata.js +17 -0
  760. package/dist/visual-editor/internal/overlays/node/node-metadata.js.map +1 -0
  761. package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts +8 -0
  762. package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts.map +1 -0
  763. package/dist/visual-editor/internal/overlays/node/node-wrapper.js +25 -0
  764. package/dist/visual-editor/internal/overlays/node/node-wrapper.js.map +1 -0
  765. package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts +18 -0
  766. package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts.map +1 -0
  767. package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js +58 -0
  768. package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js.map +1 -0
  769. package/dist/visual-editor/internal/revalidate-route.d.ts +19 -0
  770. package/dist/visual-editor/internal/revalidate-route.d.ts.map +1 -0
  771. package/dist/visual-editor/internal/revalidate-route.js +51 -0
  772. package/dist/visual-editor/internal/revalidate-route.js.map +1 -0
  773. package/dist/visual-editor/server.d.ts +7 -0
  774. package/dist/visual-editor/server.d.ts.map +1 -0
  775. package/dist/visual-editor/server.js +8 -0
  776. package/dist/visual-editor/server.js.map +1 -0
  777. package/package.json +154 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.js","names":["c","_c","createContext","useContext","resolveDictionary","jsx","_jsx","en","common","clearSearch","back","defaultGroup","mediaSelector","selectMedia","addImage","addRemoteVideo","searchPlaceholder","search","mediaType","remoteVideo","noMediaFound","loadingMedia","page","uploadImage","uploadRemoteVideo","uploadVideo","uploading","name","chooseImage","maxFileSize","altText","videoUrl","cancel","imageTooLarge","uploadImageFailed","addRemoteVideoFailed","selectedCount","addSelected","refreshMedia","remove","templates","saveAsTemplate","saveDialogDescription","saveAsComponentTemplate","saveComponentDialogDescription","noTemplatesFound","editTemplate","editDialogDescription","deleteTemplate","deleteDialogDescription","aiOptions","aiDescription","aiInstructions","savedAsLabel","scopePage","scopeSection","save","saving","delete","deleting","saved","updated","deleted","saveFailed","unavailable","wrongZone","broken","brokenHint","insertFailed","partiallyInserted","collapse","expand","customPageTemplates","sections","noSectionsFound","customSections","blocks","noBlocksFound","addBlock","noBlockTarget","outline","empty","noElements","expandAll","collapseAll","rename","duplicate","addSection","noResults","canvas","emptyDescription","startWithTemplate","noPageTemplates","fields","media","date","selectDate","link","options","crop","title","editCrop","desktop","format","original","zoom","usesDesktop","defineOverride","removeOverride","removeCrop","apply","editor","savePageFailed","pageSaved","pageCreateFailed","requiredFieldsMissing","preview","edit","close","add","sectionsTab","blocksTab","templatesTab","outlineTab","agentTab","moveUp","moveDown","linkPicker","internal","external","anchor","all","externalPlaceholder","anchorPlaceholder","loading","loadFailed","linkTarget","editLink","addLink","updateLink","removeLink","otherAnchor","target","targetHelp","displayedText","linkMode","targetAuto","targetSelf","targetBlank","agent","connect","description","copied","copyPrompt","de","dictionaries","getPuckDictionary","locale","overrides","PuckI18nContext","PuckLocaleContext","PuckI18nProvider","t0","$","children","t1","t2","Provider","value","t3","usePuckDictionary","usePuckLocale"],"sources":["../../../src/puck-editor/internal/i18n.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext } from 'react';\n\nimport { resolveDictionary, type DictionaryOverrides } from '../../shared/i18n';\n\nconst en = {\n common: {\n clearSearch: 'Clear search',\n back: 'Back',\n defaultGroup: 'General',\n },\n mediaSelector: {\n selectMedia: 'Select Media',\n addImage: 'Add Image',\n addRemoteVideo: 'Add Remote Video',\n searchPlaceholder: 'Search media',\n search: 'Search',\n clearSearch: 'Clear search',\n mediaType: 'Media Type',\n remoteVideo: 'Remote Video',\n noMediaFound: 'No media found',\n loadingMedia: 'Loading media',\n page: 'Page',\n uploadImage: 'Upload Image',\n uploadRemoteVideo: 'Upload Remote Video',\n uploadVideo: 'Upload Video',\n uploading: 'Uploading...',\n name: 'Name',\n chooseImage: 'Choose Image',\n maxFileSize: 'max. 5MB',\n altText: 'Alt Text',\n videoUrl: 'Video URL (YouTube or Vimeo)',\n cancel: 'Cancel',\n imageTooLarge: 'Image is too large. Maximum file size is 5MB.',\n uploadImageFailed: 'Failed to upload image',\n addRemoteVideoFailed: 'Failed to add remote video',\n selectedCount: '{count} selected',\n addSelected: 'Add selection',\n refreshMedia: 'Refresh media',\n remove: 'Remove',\n },\n templates: {\n saveAsTemplate: 'Save as Page template',\n saveDialogDescription: 'Save the current page as a reusable Page template',\n saveAsComponentTemplate: 'Save as template',\n saveComponentDialogDescription:\n 'Save the selected component as a reusable template',\n searchPlaceholder: 'Search templates...',\n noTemplatesFound: 'No templates found',\n editTemplate: 'Edit template',\n editDialogDescription: 'Change the name and AI options of this template.',\n deleteTemplate: 'Delete template',\n deleteDialogDescription:\n 'Delete \"{title}\"? This cannot be undone. Pages that already use this template stay unchanged.',\n name: 'Name',\n aiOptions: 'AI options',\n aiDescription: 'AI description (optional)',\n aiInstructions: 'AI instructions (optional)',\n savedAsLabel: 'Will be saved as:',\n scopePage: 'Page template',\n scopeSection: 'Section template',\n cancel: 'Cancel',\n save: 'Save',\n saving: 'Saving...',\n delete: 'Delete',\n deleting: 'Deleting...',\n saved: 'Template saved',\n updated: 'Template updated',\n deleted: 'Template deleted',\n saveFailed: 'Failed to save template',\n unavailable: 'Template no longer available',\n wrongZone: 'This template does not belong in this area',\n broken: 'Broken templates',\n brokenHint: 'These templates could not be loaded and can only be deleted.',\n insertFailed: 'Could not insert template',\n partiallyInserted: '{skipped} of {total} elements could not be inserted',\n collapse: 'Collapse',\n expand: 'Expand',\n customPageTemplates: 'Custom page templates',\n },\n sections: {\n searchPlaceholder: 'Search sections...',\n noSectionsFound: 'No sections found',\n customSections: 'Custom sections',\n },\n blocks: {\n searchPlaceholder: 'Search blocks...',\n noBlocksFound: 'No blocks found',\n addBlock: 'Add block',\n noBlockTarget: 'Add a section first',\n },\n outline: {\n empty: 'Empty',\n noElements: 'No elements',\n expand: 'Expand',\n collapse: 'Collapse',\n expandAll: 'Expand all',\n collapseAll: 'Collapse all',\n rename: 'Rename',\n duplicate: 'Duplicate',\n delete: 'Delete',\n addSection: 'Add section',\n searchPlaceholder: 'Search elements …',\n noResults: 'No results',\n },\n canvas: {\n emptyDescription: 'Start from a page template or add a section.',\n startWithTemplate: 'Start with a template',\n noPageTemplates: 'No page templates available',\n },\n fields: {\n media: 'Media',\n date: 'Date',\n selectDate: 'Select date',\n link: 'Link',\n options: 'Options',\n },\n crop: {\n title: 'Image crop',\n editCrop: 'Edit crop',\n desktop: 'Desktop',\n format: 'Format',\n original: 'Original',\n zoom: 'Zoom',\n usesDesktop: 'This breakpoint uses the desktop crop.',\n defineOverride: 'Set custom crop',\n removeOverride: 'Remove override',\n removeCrop: 'Remove crop',\n cancel: 'Cancel',\n apply: 'Apply',\n },\n editor: {\n savePageFailed: 'Failed to save page',\n pageSaved: 'Successfully saved page',\n pageCreateFailed: 'Failed to create page',\n requiredFieldsMissing: 'Cannot publish: required fields are empty',\n save: 'Save',\n preview: 'Preview',\n edit: 'Edit',\n close: 'Close',\n add: 'Add',\n saveAsTemplate: 'Save as template',\n sectionsTab: 'Sections',\n blocksTab: 'Blocks',\n templatesTab: 'Pages',\n outlineTab: 'Structure',\n agentTab: 'Agent',\n moveUp: 'Move up',\n moveDown: 'Move down',\n },\n linkPicker: {\n internal: 'Internal',\n external: 'External',\n anchor: 'Anchor',\n all: 'All',\n searchPlaceholder: 'Search …',\n externalPlaceholder: 'https://… or mailto:…',\n anchorPlaceholder: '/page#anchor or https://…#anchor',\n loading: 'Loading …',\n loadFailed: 'Could not load links.',\n noResults: 'No results.',\n linkTarget: 'Link target',\n editLink: 'Edit link',\n addLink: 'Add link',\n updateLink: 'Update link',\n removeLink: 'Remove link',\n otherAnchor: 'Other …',\n target: 'Target',\n targetHelp:\n '«Automatic»: internal links open in the same window, external links in a new tab.',\n displayedText: 'Displayed text',\n linkMode: 'Link mode',\n targetAuto: 'Automatic',\n targetSelf: 'Same tab',\n targetBlank: 'New tab',\n },\n agent: {\n connect: 'Connect an agent',\n description:\n 'An agent with a browser tool can edit this page live through the window.puckAgent handle. Copy the prompt below and paste it to your agent to get started.',\n copied: 'Copied',\n copyPrompt: 'Copy prompt',\n },\n};\n\nconst de: PuckDictionary = {\n common: {\n clearSearch: 'Suche zurücksetzen',\n back: 'Zurück',\n defaultGroup: 'Allgemein',\n },\n mediaSelector: {\n selectMedia: 'Medien auswählen',\n addImage: 'Bild hinzufügen',\n addRemoteVideo: 'Remote-Video hinzufügen',\n searchPlaceholder: 'Medien suchen',\n search: 'Suchen',\n clearSearch: 'Suche zurücksetzen',\n mediaType: 'Medientyp',\n remoteVideo: 'Remote-Video',\n noMediaFound: 'Keine Medien gefunden',\n loadingMedia: 'Lädt Medien',\n page: 'Seite',\n uploadImage: 'Bild hochladen',\n uploadRemoteVideo: 'Remote-Video hochladen',\n uploadVideo: 'Video hochladen',\n uploading: 'Wird hochgeladen …',\n name: 'Name',\n chooseImage: 'Bild auswählen',\n maxFileSize: 'max. 5MB',\n altText: 'Alt-Text',\n videoUrl: 'Video-URL (YouTube oder Vimeo)',\n cancel: 'Abbrechen',\n imageTooLarge: 'Bild ist zu gross. Maximale Dateigrösse ist 5MB.',\n uploadImageFailed: 'Bild konnte nicht hochgeladen werden',\n addRemoteVideoFailed: 'Remote-Video konnte nicht hinzugefügt werden',\n selectedCount: '{count} ausgewählt',\n addSelected: 'Auswahl übernehmen',\n refreshMedia: 'Medien aktualisieren',\n remove: 'Entfernen',\n },\n templates: {\n saveAsTemplate: 'Seiten-Template speichern',\n saveDialogDescription:\n 'Speichert die aktuelle Seite als wiederverwendbares Seiten-Template',\n saveAsComponentTemplate: 'Als Vorlage speichern',\n saveComponentDialogDescription:\n 'Speichert die ausgewählte Komponente als wiederverwendbare Vorlage',\n searchPlaceholder: 'Seiten-Templates suchen …',\n noTemplatesFound: 'Keine Templates gefunden',\n editTemplate: 'Template bearbeiten',\n editDialogDescription: 'Passe Name und AI-Optionen dieser Vorlage an.',\n deleteTemplate: 'Template löschen',\n deleteDialogDescription:\n '\"{title}\" löschen? Das kann nicht rückgängig gemacht werden. Seiten, die dieses Template bereits verwenden, bleiben unverändert.',\n name: 'Name',\n aiOptions: 'AI-Optionen',\n aiDescription: 'AI-Beschreibung (optional)',\n aiInstructions: 'AI-Anweisungen (optional)',\n savedAsLabel: 'Wird gespeichert als:',\n scopePage: 'Seitenvorlage',\n scopeSection: 'Abschnitt-Vorlage',\n cancel: 'Abbrechen',\n save: 'Speichern',\n saving: 'Speichert …',\n delete: 'Löschen',\n deleting: 'Löscht …',\n saved: 'Template gespeichert',\n updated: 'Template aktualisiert',\n deleted: 'Template gelöscht',\n saveFailed: 'Template konnte nicht gespeichert werden',\n unavailable: 'Template nicht mehr verfügbar',\n wrongZone: 'Diese Vorlage gehört nicht in diesen Bereich',\n broken: 'Defekte Vorlagen',\n brokenHint:\n 'Diese Vorlagen konnten nicht geladen werden und können nur gelöscht werden.',\n insertFailed: 'Template konnte nicht eingefügt werden',\n partiallyInserted:\n '{skipped} von {total} Elementen konnten nicht eingefügt werden',\n collapse: 'Einklappen',\n expand: 'Ausklappen',\n customPageTemplates: 'Eigene Seitenvorlagen',\n },\n sections: {\n searchPlaceholder: 'Abschnitte suchen …',\n noSectionsFound: 'Keine Abschnitte gefunden',\n customSections: 'Eigene Abschnitte',\n },\n blocks: {\n searchPlaceholder: 'Blöcke suchen …',\n noBlocksFound: 'Keine Blöcke gefunden',\n addBlock: 'Block hinzufügen',\n noBlockTarget: 'Zuerst einen Abschnitt hinzufügen',\n },\n outline: {\n empty: 'Leer',\n noElements: 'Keine Elemente',\n expand: 'Ausklappen',\n collapse: 'Einklappen',\n expandAll: 'Alle ausklappen',\n collapseAll: 'Alle einklappen',\n rename: 'Umbenennen',\n duplicate: 'Duplizieren',\n delete: 'Löschen',\n addSection: 'Abschnitt hinzufügen',\n searchPlaceholder: 'Elemente suchen …',\n noResults: 'Keine Treffer',\n },\n canvas: {\n emptyDescription:\n 'Starte mit einer Seitenvorlage oder füge einen Abschnitt hinzu.',\n startWithTemplate: 'Mit Vorlage starten',\n noPageTemplates: 'Keine Seitenvorlagen verfügbar',\n },\n fields: {\n media: 'Medien',\n date: 'Datum',\n selectDate: 'Datum auswählen',\n link: 'Link',\n options: 'Optionen',\n },\n crop: {\n title: 'Bildausschnitt',\n editCrop: 'Bildausschnitt bearbeiten',\n desktop: 'Desktop',\n format: 'Format',\n original: 'Original',\n zoom: 'Zoom',\n usesDesktop: 'Dieser Breakpoint verwendet den Desktop-Ausschnitt.',\n defineOverride: 'Eigenen Ausschnitt festlegen',\n removeOverride: 'Override entfernen',\n removeCrop: 'Ausschnitt entfernen',\n cancel: 'Abbrechen',\n apply: 'Übernehmen',\n },\n editor: {\n savePageFailed: 'Seite konnte nicht gespeichert werden',\n pageSaved: 'Seite gespeichert',\n pageCreateFailed: 'Seite konnte nicht erstellt werden',\n requiredFieldsMissing:\n 'Publizieren nicht möglich: Pflichtfelder sind nicht ausgefüllt',\n save: 'Speichern',\n preview: 'Vorschau',\n edit: 'Bearbeiten',\n close: 'Schliessen',\n add: 'Hinzufügen',\n saveAsTemplate: 'Als Template speichern',\n sectionsTab: 'Abschnitte',\n blocksTab: 'Blöcke',\n templatesTab: 'Seiten',\n outlineTab: 'Struktur',\n agentTab: 'Agent',\n moveUp: 'Nach oben',\n moveDown: 'Nach unten',\n },\n linkPicker: {\n internal: 'Intern',\n external: 'Extern',\n anchor: 'Anker',\n all: 'Alle',\n searchPlaceholder: 'Suchen …',\n externalPlaceholder: 'https://… oder mailto:…',\n anchorPlaceholder: '/seite#anker oder https://…#anker',\n loading: 'Lädt …',\n loadFailed: 'Links konnten nicht geladen werden.',\n noResults: 'Keine Treffer.',\n linkTarget: 'Link-Ziel',\n editLink: 'Link bearbeiten',\n addLink: 'Link hinzufügen',\n updateLink: 'Link aktualisieren',\n removeLink: 'Link entfernen',\n otherAnchor: 'Andere …',\n target: 'Ziel',\n targetHelp:\n '«Automatisch»: interne Links öffnen im gleichen Fenster, externe Links in einem neuen Tab.',\n displayedText: 'Angezeigter Text',\n linkMode: 'Link-Modus',\n targetAuto: 'Automatisch',\n targetSelf: 'Gleicher Tab',\n targetBlank: 'Neuer Tab',\n },\n agent: {\n connect: 'Agent verbinden',\n description:\n 'Ein Agent mit Browser-Tool kann diese Seite live über den window.puckAgent-Handle bearbeiten. Kopiere den Prompt unten und übergib ihn deinem Agenten, um zu starten.',\n copied: 'Kopiert',\n copyPrompt: 'Prompt kopieren',\n },\n};\n\nexport type PuckDictionary = typeof en;\n\nexport type PuckDictionaryOverrides = DictionaryOverrides<PuckDictionary>;\n\nconst dictionaries: Record<string, PuckDictionary> = { en, de };\n\nexport function getPuckDictionary(\n locale: string,\n overrides?: PuckDictionaryOverrides\n): PuckDictionary {\n return resolveDictionary(dictionaries, en, locale, overrides);\n}\n\nconst PuckI18nContext = createContext<PuckDictionary>(en);\nconst PuckLocaleContext = createContext<string>('en');\n\nexport function PuckI18nProvider({\n locale,\n overrides,\n children,\n}: {\n locale: string;\n overrides?: PuckDictionaryOverrides;\n children: React.ReactNode;\n}) {\n return (\n <PuckLocaleContext.Provider value={locale}>\n <PuckI18nContext.Provider value={getPuckDictionary(locale, overrides)}>\n {children}\n </PuckI18nContext.Provider>\n </PuckLocaleContext.Provider>\n );\n}\n\nexport function usePuckDictionary(): PuckDictionary {\n return useContext(PuckI18nContext);\n}\n\nexport function usePuckLocale(): string {\n return useContext(PuckLocaleContext);\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAEjD,SAASC,iBAAiB,QAAkC,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEhF,MAAMC,EAAE,GAAG;EACTC,MAAM,EAAE;IACNC,WAAW,EAAE,cAAc;IAC3BC,IAAI,EAAE,MAAM;IACZC,YAAY,EAAE;EAChB,CAAC;EACDC,aAAa,EAAE;IACbC,WAAW,EAAE,cAAc;IAC3BC,QAAQ,EAAE,WAAW;IACrBC,cAAc,EAAE,kBAAkB;IAClCC,iBAAiB,EAAE,cAAc;IACjCC,MAAM,EAAE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AO,SAAAC,kBAAA;EAAA,OACEvK,UAAU,CAAC4J,eAAe,CAAC;AAAA;AAGpC,OAAO,SAAAY,cAAA;EAAA,OACExK,UAAU,CAAC6J,iBAAiB,CAAC;AAAA","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Keep a value only if it has locale shape, else drop it. Permissive by
3
+ * design: the module does not know the project's configured locales, so it
4
+ * rejects garbage (path/query smuggling into JSON:API URLs) rather than an
5
+ * exact allow-list.
6
+ */
7
+ export declare function normalizeLang(value: string | undefined | null): string | undefined;
8
+ /**
9
+ * Locale from the first path segment. Editor surfaces only mount on localized
10
+ * routes, so the segment is a locale in practice; falls back to English.
11
+ */
12
+ export declare function getPathLocale(pathname: string): string;
13
+ //# sourceMappingURL=locale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../src/puck-editor/internal/locale.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAC/B,MAAM,GAAG,SAAS,CAEpB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtD"}
@@ -0,0 +1,20 @@
1
+ const LOCALE_SEGMENT_RE = /^[a-z]{2,3}(-[a-zA-Z0-9]+)?$/;
2
+
3
+ /**
4
+ * Keep a value only if it has locale shape, else drop it. Permissive by
5
+ * design: the module does not know the project's configured locales, so it
6
+ * rejects garbage (path/query smuggling into JSON:API URLs) rather than an
7
+ * exact allow-list.
8
+ */
9
+ export function normalizeLang(value) {
10
+ return value != null && LOCALE_SEGMENT_RE.test(value) ? value : undefined;
11
+ }
12
+
13
+ /**
14
+ * Locale from the first path segment. Editor surfaces only mount on localized
15
+ * routes, so the segment is a locale in practice; falls back to English.
16
+ */
17
+ export function getPathLocale(pathname) {
18
+ return normalizeLang(pathname.split('/')[1]) ?? 'en';
19
+ }
20
+ //# sourceMappingURL=locale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.js","names":["LOCALE_SEGMENT_RE","normalizeLang","value","test","undefined","getPathLocale","pathname","split"],"sources":["../../../src/puck-editor/internal/locale.ts"],"sourcesContent":["const LOCALE_SEGMENT_RE = /^[a-z]{2,3}(-[a-zA-Z0-9]+)?$/;\n\n/**\n * Keep a value only if it has locale shape, else drop it. Permissive by\n * design: the module does not know the project's configured locales, so it\n * rejects garbage (path/query smuggling into JSON:API URLs) rather than an\n * exact allow-list.\n */\nexport function normalizeLang(\n value: string | undefined | null\n): string | undefined {\n return value != null && LOCALE_SEGMENT_RE.test(value) ? value : undefined;\n}\n\n/**\n * Locale from the first path segment. Editor surfaces only mount on localized\n * routes, so the segment is a locale in practice; falls back to English.\n */\nexport function getPathLocale(pathname: string): string {\n return normalizeLang(pathname.split('/')[1]) ?? 'en';\n}\n"],"mappings":"AAAA,MAAMA,iBAAiB,GAAG,8BAA8B;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAC3BC,KAAgC,EACZ;EACpB,OAAOA,KAAK,IAAI,IAAI,IAAIF,iBAAiB,CAACG,IAAI,CAACD,KAAK,CAAC,GAAGA,KAAK,GAAGE,SAAS;AAC3E;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAACC,QAAgB,EAAU;EACtD,OAAOL,aAAa,CAACK,QAAQ,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI;AACtD","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ import type { Config } from '@puckeditor/core';
2
+ import type { BuiltinTemplate } from './plugins/templates-plugin/templates';
3
+ export type PuckLabelCatalog = {
4
+ components?: Record<string, string>;
5
+ templates?: Record<string, string>;
6
+ groups?: Record<string, string>;
7
+ picker?: Record<string, string>;
8
+ };
9
+ export declare function localizeConfig(config: Config, labels: PuckLabelCatalog): Config;
10
+ export declare function localizeTemplates(templates: BuiltinTemplate[], labels: PuckLabelCatalog): BuiltinTemplate[];
11
+ //# sourceMappingURL=localize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localize.d.ts","sourceRoot":"","sources":["../../../src/puck-editor/internal/localize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAEF,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,gBAAgB,GACvB,MAAM,CAwBR;AAED,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,eAAe,EAAE,EAC5B,MAAM,EAAE,gBAAgB,GACvB,eAAe,EAAE,CAKnB"}
@@ -0,0 +1,42 @@
1
+ export function localizeConfig(config, labels) {
2
+ const components = Object.fromEntries(Object.entries(config.components).map(([type, component]) => {
3
+ const label = labels.components?.[type] ?? component.label;
4
+ const pickerLabel = labels.picker?.[type];
5
+ const metadata = pickerLabel ? {
6
+ ...component.metadata,
7
+ picker: {
8
+ ...component.metadata?.picker,
9
+ label: pickerLabel
10
+ }
11
+ } : component.metadata;
12
+ return [type, {
13
+ ...component,
14
+ label,
15
+ metadata
16
+ }];
17
+ }));
18
+ const categories = {
19
+ ...config.categories
20
+ };
21
+ for (const [id, title] of Object.entries(labels.groups ?? {})) {
22
+ categories[id] = id in categories ? {
23
+ ...categories[id],
24
+ title
25
+ } : {
26
+ visible: false,
27
+ title
28
+ };
29
+ }
30
+ return {
31
+ ...config,
32
+ components,
33
+ categories
34
+ };
35
+ }
36
+ export function localizeTemplates(templates, labels) {
37
+ return templates.map(template => ({
38
+ ...template,
39
+ name: labels.templates?.[template.id] ?? template.name
40
+ }));
41
+ }
42
+ //# sourceMappingURL=localize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localize.js","names":["localizeConfig","config","labels","components","Object","fromEntries","entries","map","type","component","label","pickerLabel","picker","metadata","categories","id","title","groups","visible","localizeTemplates","templates","template","name"],"sources":["../../../src/puck-editor/internal/localize.ts"],"sourcesContent":["import type { Config } from '@puckeditor/core';\n\nimport type { BuiltinTemplate } from './plugins/templates-plugin/templates';\n\nexport type PuckLabelCatalog = {\n components?: Record<string, string>;\n templates?: Record<string, string>;\n groups?: Record<string, string>;\n picker?: Record<string, string>;\n};\n\nexport function localizeConfig(\n config: Config,\n labels: PuckLabelCatalog\n): Config {\n const components = Object.fromEntries(\n Object.entries(config.components).map(([type, component]) => {\n const label = labels.components?.[type] ?? component.label;\n const pickerLabel = labels.picker?.[type];\n const metadata = pickerLabel\n ? {\n ...component.metadata,\n picker: { ...component.metadata?.picker, label: pickerLabel },\n }\n : component.metadata;\n return [type, { ...component, label, metadata }];\n })\n );\n\n const categories = { ...config.categories };\n for (const [id, title] of Object.entries(labels.groups ?? {})) {\n categories[id] =\n id in categories\n ? { ...categories[id], title }\n : { visible: false, title };\n }\n\n return { ...config, components, categories };\n}\n\nexport function localizeTemplates(\n templates: BuiltinTemplate[],\n labels: PuckLabelCatalog\n): BuiltinTemplate[] {\n return templates.map((template) => ({\n ...template,\n name: labels.templates?.[template.id] ?? template.name,\n }));\n}\n"],"mappings":"AAWA,OAAO,SAASA,cAAcA,CAC5BC,MAAc,EACdC,MAAwB,EAChB;EACR,MAAMC,UAAU,GAAGC,MAAM,CAACC,WAAW,CACnCD,MAAM,CAACE,OAAO,CAACL,MAAM,CAACE,UAAU,C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L","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ import { Config, Data } from '@puckeditor/core';
2
+ declare global {
3
+ interface Window {
4
+ puckAgent?: Record<string, unknown>;
5
+ }
6
+ }
7
+ /**
8
+ * Mounts the mechanical `window.puckAgent` handle for a local agent driving the
9
+ * editor via browser automation. Renders nothing. Only mounts inside the Puck
10
+ * editor (already behind requireAuth). Edits are ephemeral dispatches until
11
+ * save(), which persists through the same PATCH as the editor's Save button.
12
+ *
13
+ * Reads live appState/dispatch through a ref (updated every render) so the
14
+ * exposed methods never close over a stale first-render dispatch.
15
+ */
16
+ export declare function AgentBridge({ config, lang, onSave, }: {
17
+ config: Config;
18
+ lang?: string;
19
+ onSave?: (data: Partial<Data>) => Promise<void> | void;
20
+ }): null;
21
+ //# sourceMappingURL=agent-bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-bridge.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/agent-bridge.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAiB,IAAI,EAAc,MAAM,kBAAkB,CAAC;AAwB3E,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrC;CACF;AAID;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,IAAI,EACJ,MAAM,GACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACxD,QA6IA"}
@@ -0,0 +1,197 @@
1
+ 'use client';
2
+
3
+ import { c as _c } from "react/compiler-runtime";
4
+ import { useEffect, useRef } from 'react';
5
+ import { createUsePuck } from '@puckeditor/core';
6
+ import { useBuiltinTemplates, usePuckContentModel, usePuckEditorConfig } from '../../editor-config';
7
+ import { applyPatchToPuck } from "./apply-patch-to-puck.js";
8
+ import { describeComponent, listComponents } from "./catalog.js";
9
+ import { PAGE_META_FIELDS } from "./constants.js";
10
+ import { listMedia } from "./list-media.js";
11
+ import { insertTemplate, listTemplates } from "./templates.js";
12
+ import { uploadMedia } from "./upload-media.js";
13
+ const PAGE_META = new Set(PAGE_META_FIELDS);
14
+ const usePuck = createUsePuck();
15
+
16
+ /**
17
+ * Mounts the mechanical `window.puckAgent` handle for a local agent driving the
18
+ * editor via browser automation. Renders nothing. Only mounts inside the Puck
19
+ * editor (already behind requireAuth). Edits are ephemeral dispatches until
20
+ * save(), which persists through the same PATCH as the editor's Save button.
21
+ *
22
+ * Reads live appState/dispatch through a ref (updated every render) so the
23
+ * exposed methods never close over a stale first-render dispatch.
24
+ */
25
+ export function AgentBridge(t0) {
26
+ const $ = _c(20);
27
+ const {
28
+ config,
29
+ lang,
30
+ onSave
31
+ } = t0;
32
+ const appState = usePuck(_temp);
33
+ const dispatch = usePuck(_temp2);
34
+ const templates = usePuckContentModel().templates;
35
+ const builtinTemplates = useBuiltinTemplates();
36
+ const {
37
+ drupalBaseUrl: t1
38
+ } = usePuckEditorConfig();
39
+ const drupalBaseUrl = t1 === undefined ? "" : t1;
40
+ let t2;
41
+ if ($[0] !== appState || $[1] !== builtinTemplates || $[2] !== config || $[3] !== dispatch || $[4] !== drupalBaseUrl || $[5] !== lang || $[6] !== onSave || $[7] !== templates) {
42
+ t2 = {
43
+ appState,
44
+ dispatch,
45
+ config,
46
+ lang,
47
+ onSave,
48
+ templates,
49
+ builtinTemplates,
50
+ drupalBaseUrl
51
+ };
52
+ $[0] = appState;
53
+ $[1] = builtinTemplates;
54
+ $[2] = config;
55
+ $[3] = dispatch;
56
+ $[4] = drupalBaseUrl;
57
+ $[5] = lang;
58
+ $[6] = onSave;
59
+ $[7] = templates;
60
+ $[8] = t2;
61
+ } else {
62
+ t2 = $[8];
63
+ }
64
+ const live = useRef(t2);
65
+ let t3;
66
+ if ($[9] !== appState || $[10] !== builtinTemplates || $[11] !== config || $[12] !== dispatch || $[13] !== drupalBaseUrl || $[14] !== lang || $[15] !== onSave || $[16] !== templates) {
67
+ t3 = () => {
68
+ live.current = {
69
+ appState,
70
+ dispatch,
71
+ config,
72
+ lang,
73
+ onSave,
74
+ templates,
75
+ builtinTemplates,
76
+ drupalBaseUrl
77
+ };
78
+ };
79
+ $[9] = appState;
80
+ $[10] = builtinTemplates;
81
+ $[11] = config;
82
+ $[12] = dispatch;
83
+ $[13] = drupalBaseUrl;
84
+ $[14] = lang;
85
+ $[15] = onSave;
86
+ $[16] = templates;
87
+ $[17] = t3;
88
+ } else {
89
+ t3 = $[17];
90
+ }
91
+ useEffect(t3);
92
+ let t4;
93
+ let t5;
94
+ if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
95
+ t4 = () => {
96
+ if (typeof window === "undefined") {
97
+ return;
98
+ }
99
+ const get = () => live.current;
100
+ const data = () => get().appState?.data;
101
+ const content = {
102
+ listComponents: () => listComponents(get().config),
103
+ describeComponent: type => describeComponent(get().config, type),
104
+ getPage: () => data(),
105
+ listMedia: (type_0, query, limit, offset) => listMedia(get().lang, get().drupalBaseUrl, type_0, query, limit, offset),
106
+ uploadMedia: options => uploadMedia({
107
+ lang: get().lang,
108
+ ...options
109
+ }),
110
+ listTemplates: () => listTemplates(get().templates, get().builtinTemplates),
111
+ insertTemplate: (id, dest) => insertTemplate(get().dispatch, data(), get().config, get().templates, get().builtinTemplates, id, dest),
112
+ addComponent: (type_1, options_0) => applyPatchToPuck(get().dispatch, data(), get().config, {
113
+ action: "add",
114
+ type: type_1,
115
+ props: options_0?.props,
116
+ destinationId: options_0?.destinationId,
117
+ destinationSlot: options_0?.destinationSlot,
118
+ destinationIndex: options_0?.destinationIndex
119
+ }),
120
+ updateComponent: (id_0, newProps) => applyPatchToPuck(get().dispatch, data(), get().config, {
121
+ action: "modify",
122
+ id: id_0,
123
+ newProps
124
+ }),
125
+ removeComponent: id_1 => applyPatchToPuck(get().dispatch, data(), get().config, {
126
+ action: "remove",
127
+ id: id_1
128
+ }),
129
+ setPageMeta: fields => {
130
+ const clean = {};
131
+ const ignored = [];
132
+ for (const [key, value] of Object.entries(fields)) {
133
+ if (PAGE_META.has(key)) {
134
+ clean[key] = value;
135
+ } else {
136
+ ignored.push(key);
137
+ }
138
+ }
139
+ if (!Object.keys(clean).length) {
140
+ return {
141
+ ok: false,
142
+ error: `no known fields. Known: ${[...PAGE_META].join(", ")}`
143
+ };
144
+ }
145
+ const result = applyPatchToPuck(get().dispatch, data(), get().config, {
146
+ action: "setRoot",
147
+ fields: clean
148
+ });
149
+ return ignored.length && result.ok ? {
150
+ ...result,
151
+ ignored
152
+ } : result;
153
+ },
154
+ save: async () => {
155
+ const persist = get().onSave;
156
+ const current = data();
157
+ if (!persist || !current) {
158
+ return {
159
+ ok: false,
160
+ error: "nothing to save: editor not ready"
161
+ };
162
+ }
163
+ console.info("[puckAgent] save \u2192 publishing current page");
164
+ await persist(current);
165
+ return {
166
+ ok: true
167
+ };
168
+ }
169
+ };
170
+ window.puckAgent = Object.assign(window.puckAgent || {}, content);
171
+ return () => {
172
+ const handle = window.puckAgent;
173
+ if (!handle) {
174
+ return;
175
+ }
176
+ for (const key_0 of Object.keys(content)) {
177
+ delete handle[key_0];
178
+ }
179
+ };
180
+ };
181
+ t5 = [];
182
+ $[18] = t4;
183
+ $[19] = t5;
184
+ } else {
185
+ t4 = $[18];
186
+ t5 = $[19];
187
+ }
188
+ useEffect(t4, t5);
189
+ return null;
190
+ }
191
+ function _temp2(s_0) {
192
+ return s_0.dispatch;
193
+ }
194
+ function _temp(s) {
195
+ return s.appState;
196
+ }
197
+ //# sourceMappingURL=agent-bridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-bridge.js","names":["c","_c","useEffect","useRef","createUsePuck","useBuiltinTemplates","usePuckContentModel","usePuckEditorConfig","applyPatchToPuck","describeComponent","listComponents","PAGE_META_FIELDS","listMedia","insertTemplate","listTemplates","uploadMedia","PAGE_META","Set","usePuck","AgentBridge","t0","$","config","lang","onSave","appState","_temp","dispatch","_temp2","templates","builtinTemplates","drupalBaseUrl","t1","undefined","t2","live","t3","current","t4","t5","Symbol","for","window","get","data","content","type","getPage","type_0","query","limit","offset","options","id","dest","addComponent","type_1","options_0","action","props","destinationId","destinationSlot","destinationIndex","updateComponent","id_0","newProps","removeComponent","id_1","setPageMeta","fields","clean","ignored","key","value","Object","entries","has","push","keys","length","ok","error","join","result","save","persist","console","info","puckAgent","assign","handle","key_0","s_0","s"],"sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/agent-bridge.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef } from 'react';\nimport { Config, createUsePuck, Data, PuckAction } from '@puckeditor/core';\n\nimport {\n useBuiltinTemplates,\n usePuckContentModel,\n usePuckEditorConfig,\n} from '../../editor-config';\nimport { applyPatchToPuck } from './apply-patch-to-puck.ts';\nimport { describeComponent, listComponents } from './catalog.ts';\nimport { MediaType, PAGE_META_FIELDS } from './constants.ts';\nimport { listMedia } from './list-media.ts';\nimport {\n insertTemplate,\n listTemplates,\n TemplateDestination,\n} from './templates.ts';\nimport { uploadMedia } from './upload-media.ts';\n\ntype Dispatch = (action: PuckAction) => void;\n\ntype AddOptions = TemplateDestination & { props?: Record<string, unknown> };\n\nconst PAGE_META = new Set<string>(PAGE_META_FIELDS);\n\ndeclare global {\n interface Window {\n puckAgent?: Record<string, unknown>;\n }\n}\n\nconst usePuck = createUsePuck();\n\n/**\n * Mounts the mechanical `window.puckAgent` handle for a local agent driving the\n * editor via browser automation. Renders nothing. Only mounts inside the Puck\n * editor (already behind requireAuth). Edits are ephemeral dispatches until\n * save(), which persists through the same PATCH as the editor's Save button.\n *\n * Reads live appState/dispatch through a ref (updated every render) so the\n * exposed methods never close over a stale first-render dispatch.\n */\nexport function AgentBridge({\n config,\n lang,\n onSave,\n}: {\n config: Config;\n lang?: string;\n onSave?: (data: Partial<Data>) => Promise<void> | void;\n}) {\n const appState = usePuck((s) => s.appState);\n const dispatch = usePuck((s) => s.dispatch) as Dispatch;\n const templates = usePuckContentModel().templates;\n const builtinTemplates = useBuiltinTemplates();\n const { drupalBaseUrl = '' } = usePuckEditorConfig();\n\n const live = useRef({\n appState,\n dispatch,\n config,\n lang,\n onSave,\n templates,\n builtinTemplates,\n drupalBaseUrl,\n });\n useEffect(() => {\n live.current = {\n appState,\n dispatch,\n config,\n lang,\n onSave,\n templates,\n builtinTemplates,\n drupalBaseUrl,\n };\n });\n\n useEffect(() => {\n if (typeof window === 'undefined') return;\n\n const get = () => live.current;\n const data = () => get().appState?.data as Data | undefined;\n\n // Content methods, attached to the shared handle (lifecycle methods\n // open/close/isOpen/isReady are owned by PuckWrapper and stay mounted).\n const content = {\n // Palette (aus der Config: was kann ich einsetzen)\n listComponents: () => listComponents(get().config),\n describeComponent: (type: string) =>\n describeComponent(get().config, type),\n // Dokument (was ist gerade auf der Seite)\n getPage: () => data(),\n // Assets\n listMedia: (\n type: string,\n query?: string,\n limit?: number,\n offset?: number\n ) =>\n listMedia(get().lang, get().drupalBaseUrl, type, query, limit, offset),\n uploadMedia: (options: {\n url: string;\n type?: MediaType;\n name?: string;\n alt?: string;\n }) => uploadMedia({ lang: get().lang, ...options }),\n // Templates\n listTemplates: () =>\n listTemplates(get().templates, get().builtinTemplates),\n insertTemplate: (id: string, dest?: TemplateDestination) =>\n insertTemplate(\n get().dispatch,\n data(),\n get().config,\n get().templates,\n get().builtinTemplates,\n id,\n dest\n ),\n // Writes (benannte Methoden, je ein Job)\n addComponent: (type: string, options?: AddOptions) =>\n applyPatchToPuck(get().dispatch, data(), get().config, {\n action: 'add',\n type,\n props: options?.props,\n destinationId: options?.destinationId,\n destinationSlot: options?.destinationSlot,\n destinationIndex: options?.destinationIndex,\n }),\n updateComponent: (id: string, newProps: Record<string, unknown>) =>\n applyPatchToPuck(get().dispatch, data(), get().config, {\n action: 'modify',\n id,\n newProps,\n }),\n removeComponent: (id: string) =>\n applyPatchToPuck(get().dispatch, data(), get().config, {\n action: 'remove',\n id,\n }),\n setPageMeta: (fields: Record<string, unknown>) => {\n const clean: Record<string, unknown> = {};\n const ignored: string[] = [];\n for (const [key, value] of Object.entries(fields)) {\n if (PAGE_META.has(key)) {\n clean[key] = value;\n } else {\n ignored.push(key);\n }\n }\n if (!Object.keys(clean).length) {\n return {\n ok: false as const,\n error: `no known fields. Known: ${[...PAGE_META].join(', ')}`,\n };\n }\n const result = applyPatchToPuck(get().dispatch, data(), get().config, {\n action: 'setRoot',\n fields: clean,\n });\n return ignored.length && result.ok ? { ...result, ignored } : result;\n },\n // Persist — same human-gated PATCH as the editor's Save button.\n save: async () => {\n const persist = get().onSave;\n const current = data();\n if (!persist || !current) {\n return {\n ok: false as const,\n error: 'nothing to save: editor not ready',\n };\n }\n console.info('[puckAgent] save → publishing current page');\n await persist(current);\n return { ok: true as const };\n },\n };\n\n window.puckAgent = Object.assign(window.puckAgent || {}, content);\n\n return () => {\n const handle = window.puckAgent;\n if (!handle) return;\n for (const key of Object.keys(content)) delete handle[key];\n };\n }, []);\n\n return null;\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,SAAiBC,aAAa,QAA0B,kBAAkB;AAE1E,SACEC,mBAAmB,EACnBC,mBAAmB,EACnBC,mBAAmB,QACd,qBAAqB;AAC5B,SAASC,gBAAgB,QAAQ,0BAA0B;AAC3D,SAASC,iBAAiB,EAAEC,cAAc,QAAQ,cAAc;AAChE,SAAoBC,gBAAgB,QAAQ,gBAAgB;AAC5D,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACEC,cAAc,EACdC,aAAa,QAER,gBAAgB;AACvB,SAASC,WAAW,QAAQ,mBAAmB;AAM/C,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAASN,g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E,GAAA;EAAA,OAU2BC,GAAC,CAAAlE,QAAS;AAAA;AAVrC,SAAAD,MAAAmE,CAAA;EAAA,OAS2BA,CAAC,CAAApE,QAAS;AAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export declare function AgentInfoPanel(): import("react").JSX.Element;
2
+ //# sourceMappingURL=agent-info-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-info-panel.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/agent-info-panel.tsx"],"names":[],"mappings":"AAeA,wBAAgB,cAAc,gCA4C7B"}
@@ -0,0 +1,131 @@
1
+ 'use client';
2
+
3
+ import { c as _c } from "react/compiler-runtime";
4
+ import { useState } from 'react';
5
+ import { CheckIcon, CopyIcon } from 'lucide-react';
6
+ import { usePuckDictionary } from '../../i18n';
7
+ import { IconButton } from '../../ui/icon-button';
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ function buildPrompt(pageUrl) {
10
+ return `Use a browser tool that can run JavaScript to open this page:
11
+ ${pageUrl}
12
+
13
+ In the page, run: window.puckAgent.help() to list the options that are available to you.`;
14
+ }
15
+ export function AgentInfoPanel() {
16
+ const $ = _c(18);
17
+ const t = usePuckDictionary().agent;
18
+ const pageUrl = typeof window !== "undefined" ? window.location.origin + window.location.pathname : "the current page";
19
+ let t0;
20
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
21
+ t0 = buildPrompt(pageUrl);
22
+ $[0] = t0;
23
+ } else {
24
+ t0 = $[0];
25
+ }
26
+ const prompt = t0;
27
+ const [copied, setCopied] = useState(false);
28
+ let t1;
29
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
30
+ t1 = async () => {
31
+ try {
32
+ await navigator.clipboard.writeText(prompt);
33
+ setCopied(true);
34
+ setTimeout(() => setCopied(false), 2000);
35
+ } catch {}
36
+ };
37
+ $[1] = t1;
38
+ } else {
39
+ t1 = $[1];
40
+ }
41
+ const copyPrompt = t1;
42
+ let t2;
43
+ if ($[2] !== t.connect) {
44
+ t2 = /*#__PURE__*/_jsx("p", {
45
+ className: "nh:font-medium",
46
+ children: t.connect
47
+ });
48
+ $[2] = t.connect;
49
+ $[3] = t2;
50
+ } else {
51
+ t2 = $[3];
52
+ }
53
+ let t3;
54
+ if ($[4] !== t.description) {
55
+ t3 = /*#__PURE__*/_jsx("p", {
56
+ className: "nh:text-gray-500",
57
+ children: t.description
58
+ });
59
+ $[4] = t.description;
60
+ $[5] = t3;
61
+ } else {
62
+ t3 = $[5];
63
+ }
64
+ let t4;
65
+ if ($[6] !== t2 || $[7] !== t3) {
66
+ t4 = /*#__PURE__*/_jsxs("div", {
67
+ children: [t2, t3]
68
+ });
69
+ $[6] = t2;
70
+ $[7] = t3;
71
+ $[8] = t4;
72
+ } else {
73
+ t4 = $[8];
74
+ }
75
+ let t5;
76
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
77
+ t5 = /*#__PURE__*/_jsx("pre", {
78
+ className: "nh:max-h-80 nh:overflow-auto nh:rounded-md nh:bg-slate-900 nh:p-3 nh:pr-12 nh:text-xs nh:whitespace-pre-wrap nh:text-slate-50",
79
+ children: /*#__PURE__*/_jsx("code", {
80
+ children: prompt
81
+ })
82
+ });
83
+ $[9] = t5;
84
+ } else {
85
+ t5 = $[9];
86
+ }
87
+ const t6 = copied ? t.copied : t.copyPrompt;
88
+ let t7;
89
+ if ($[10] !== copied) {
90
+ t7 = copied ? /*#__PURE__*/_jsx(CheckIcon, {
91
+ className: "nh:size-4"
92
+ }) : /*#__PURE__*/_jsx(CopyIcon, {
93
+ className: "nh:size-4"
94
+ });
95
+ $[10] = copied;
96
+ $[11] = t7;
97
+ } else {
98
+ t7 = $[11];
99
+ }
100
+ let t8;
101
+ if ($[12] !== t6 || $[13] !== t7) {
102
+ t8 = /*#__PURE__*/_jsxs("div", {
103
+ className: "nh:relative",
104
+ children: [t5, /*#__PURE__*/_jsx(IconButton, {
105
+ onClick: copyPrompt,
106
+ "aria-label": t6,
107
+ className: "nh:absolute nh:top-2 nh:right-2 nh:rounded-full nh:bg-white/10 nh:px-2 nh:py-1 nh:text-slate-50 nh:hover:bg-white/20 nh:hover:text-slate-50",
108
+ children: t7
109
+ })]
110
+ });
111
+ $[12] = t6;
112
+ $[13] = t7;
113
+ $[14] = t8;
114
+ } else {
115
+ t8 = $[14];
116
+ }
117
+ let t9;
118
+ if ($[15] !== t4 || $[16] !== t8) {
119
+ t9 = /*#__PURE__*/_jsxs("div", {
120
+ className: "nh:flex nh:flex-col nh:gap-4 nh:p-4 nh:text-sm",
121
+ children: [t4, t8]
122
+ });
123
+ $[15] = t4;
124
+ $[16] = t8;
125
+ $[17] = t9;
126
+ } else {
127
+ t9 = $[17];
128
+ }
129
+ return t9;
130
+ }
131
+ //# sourceMappingURL=agent-info-panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-info-panel.js","names":["c","_c","useState","CheckIcon","CopyIcon","usePuckDictionary","IconButton","jsx","_jsx","jsxs","_jsxs","buildPrompt","pageUrl","AgentInfoPanel","$","t","agent","window","location","origin","pathname","t0","Symbol","for","prompt","copied","setCopied","t1","navigator","clipboard","writeText","setTimeout","copyPrompt","t2","connect","className","children","t3","description","t4","t5","t6","t7","t8","t9"],"sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/agent-info-panel.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { CheckIcon, CopyIcon } from 'lucide-react';\n\nimport { usePuckDictionary } from '../../i18n';\nimport { IconButton } from '../../ui/icon-button';\n\nfunction buildPrompt(pageUrl: string) {\n return `Use a browser tool that can run JavaScript to open this page:\n${pageUrl}\n\nIn the page, run: window.puckAgent.help() to list the options that are available to you.`;\n}\n\nexport function AgentInfoPanel() {\n const t = usePuckDictionary().agent;\n const pageUrl =\n typeof window !== 'undefined'\n ? window.location.origin + window.location.pathname\n : 'the current page';\n const prompt = buildPrompt(pageUrl);\n const [copied, setCopied] = useState(false);\n\n const copyPrompt = async () => {\n try {\n await navigator.clipboard.writeText(prompt);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n } catch {\n // ponytail: clipboard blocked (insecure context / denied); no-op\n }\n };\n\n return (\n <div className=\"nh:flex nh:flex-col nh:gap-4 nh:p-4 nh:text-sm\">\n <div>\n <p className=\"nh:font-medium\">{t.connect}</p>\n <p className=\"nh:text-gray-500\">{t.description}</p>\n </div>\n\n <div className=\"nh:relative\">\n <pre className=\"nh:max-h-80 nh:overflow-auto nh:rounded-md nh:bg-slate-900 nh:p-3 nh:pr-12 nh:text-xs nh:whitespace-pre-wrap nh:text-slate-50\">\n <code>{prompt}</code>\n </pre>\n <IconButton\n onClick={copyPrompt}\n aria-label={copied ? t.copied : t.copyPrompt}\n className=\"nh:absolute nh:top-2 nh:right-2 nh:rounded-full nh:bg-white/10 nh:px-2 nh:py-1 nh:text-slate-50 nh:hover:bg-white/20 nh:hover:text-slate-50\"\n >\n {copied ? (\n <CheckIcon className=\"nh:size-4\" />\n ) : (\n <CopyIcon className=\"nh:size-4\" />\n )}\n </IconButton>\n </div>\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,QAAQ,QAAQ,OAAO;AAChC,SAASC,SAAS,EAAEC,QAAQ,QAAQ,cAAc;AAElD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,UAAU,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElD,SAASC,WAAWA,CAACC,OAAe,EAAE;EACpC,OAAO;AACT,EAAEA,OAAO;AACT;AACA,yFAAyF;AACzF;AAEA,OAAO,SAAAC,eAAA;EAAA,MAAAC,CAAA,GAAAb,EAAA;EACL,MAAAc,CAAA,GAAUV,iBAAiB,CAAC,CAAC,CAAAW,KAAM;EACnC,MAAAJ,OAAA,GACE,OAAOK,MAAM,KAAK,WAEI,GADlBA,MA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GAC1BI,EAEM,eACNhC,IAAA,CAACF,UAAU;QACA0B,OAAU,EAAVA,UAAU;QACP,cAAAS,EAAgC;QAClCN,SAA6I,EAA7I,6IAA6I;QAAAC,QAAA,EAEtJM;MAIA,CACS,CAAC;IAAA,CACV,CAAC;IAAA5B,CAAA,OAAA2B,EAAA;IAAA3B,CAAA,OAAA4B,EAAA;IAAA5B,CAAA,OAAA6B,EAAA;EAAA;IAAAA,EAAA,GAAA7B,CAAA;EAAA;EAAA,IAAA8B,EAAA;EAAA,IAAA9B,CAAA,SAAAyB,EAAA,IAAAzB,CAAA,SAAA6B,EAAA;IArBRC,EAAA,gBAAAlC,KAAA;MAAeyB,SAAgD,EAAhD,gDAAgD;MAAAC,QAAA,GAC7DG,EAGM,EAENI,EAeM;IAAA,CACH,CAAC;IAAA7B,CAAA,OAAAyB,EAAA;IAAAzB,CAAA,OAAA6B,EAAA;IAAA7B,CAAA,OAAA8B,EAAA;EAAA;IAAAA,EAAA,GAAA9B,CAAA;EAAA;EAAA,OAtBN8B,EAsBM;AAAA","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ import { Config, Data, Plugin } from '@puckeditor/core';
2
+ /**
3
+ * Puck plugin that hosts the local-agent bridge. Always registered; the
4
+ * wrapper-level handle (open/close/help via useAgentHandle) attaches for
5
+ * logged-in editors, so `window.puckAgent` exists only during an editor session.
6
+ *
7
+ * The bridge mounts via the `puck` override (wraps the whole editor UI), so the
8
+ * content methods are active whenever the plugin is installed — independent of
9
+ * whether the Agent panel/tab is open. The `render` panel only shows the
10
+ * copy-paste agent prompt. The lifecycle methods (open/close/isOpen/isReady/
11
+ * createPage) live in useAgentHandle because open() must work before the editor
12
+ * (and thus this plugin) mounts.
13
+ */
14
+ export declare function createAgentPlugin({ config, lang, onSave, label, }: {
15
+ config: Config;
16
+ lang?: string;
17
+ onSave?: (data: Partial<Data>) => Promise<void> | void;
18
+ label?: string;
19
+ }): Plugin;
20
+ //# sourceMappingURL=agent-plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-plugin.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/plugins/agent-plugin/agent-plugin.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAMxD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,IAAI,EACJ,MAAM,EACN,KAAK,GACN,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,MAAM,CAeT"}