@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,12 @@
1
+ import './internal/puck-augmentation';
2
+ export { default as PuckWrapper } from './internal/puck-wrapper';
3
+ export { usePuckOverlay } from './internal/use-puck-overlay';
4
+ export { stripInstanceNames } from './internal/utils';
5
+ export { getPuckDictionary, PuckI18nProvider, usePuckDictionary } from './internal/i18n';
6
+ export { MEDIA_TYPES } from './internal/plugins/agent-plugin/constants';
7
+ export { PuckEditorConfigProvider, usePuckContentModel, usePuckEditorConfig } from './internal/editor-config';
8
+ export { creatableBundles, getBundle, parsePuckData, resolveContentModel } from './internal/content-model';
9
+ export { localizeConfig, localizeTemplates } from './internal/localize';
10
+ export { RootDropZone } from './internal/plugins/templates-plugin/root-drop-zone';
11
+ export { PuckEditorProvider, usePuckEditor } from './internal/puck-editor-provider';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default","PuckWrapper","usePuckOverlay","stripInstanceNames","getPuckDictionary","PuckI18nProvider","usePuckDictionary","MEDIA_TYPES","PuckEditorConfigProvider","usePuckContentModel","usePuckEditorConfig","creatableBundles","getBundle","parsePuckData","resolveContentModel","localizeConfig","localizeTemplates","RootDropZone","PuckEditorProvider","usePuckEditor"],"sources":["../../src/puck-editor/index.ts"],"sourcesContent":["import './internal/puck-augmentation';\n\nexport { default as PuckWrapper } from './internal/puck-wrapper';\nexport { usePuckOverlay } from './internal/use-puck-overlay';\nexport { stripInstanceNames } from './internal/utils';\nexport {\n getPuckDictionary,\n PuckI18nProvider,\n usePuckDictionary,\n type PuckDictionary,\n type PuckDictionaryOverrides,\n} from './internal/i18n';\nexport {\n MEDIA_TYPES,\n type MediaType,\n} from './internal/plugins/agent-plugin/constants';\nexport {\n PuckEditorConfigProvider,\n usePuckContentModel,\n usePuckEditorConfig,\n type PuckEditorConfig,\n} from './internal/editor-config';\nexport {\n creatableBundles,\n getBundle,\n parsePuckData,\n resolveContentModel,\n type PuckBundleConfig,\n type PuckContentModel,\n type PuckContentModelInput,\n type PuckMetadataFields,\n type PuckTemplatesConfig,\n type ResolvedPuckBundle,\n} from './internal/content-model';\nexport type { PuckNode, PuckNodeMetadataImage } from './internal/puck-node';\nexport type {\n BuiltinTemplate,\n TemplateAi,\n TemplateCategory,\n TemplateEnvelope,\n} from './internal/plugins/templates-plugin/templates';\nexport {\n localizeConfig,\n localizeTemplates,\n type PuckLabelCatalog,\n} from './internal/localize';\nexport { RootDropZone } from './internal/plugins/templates-plugin/root-drop-zone';\nexport {\n PuckEditorProvider,\n usePuckEditor,\n} from './internal/puck-editor-provider';\n"],"mappings":"AAAA,OAAO,8BAA8B;AAErC,SAASA,OAAO,IAAIC,WAAW,QAAQ,yBAAyB;AAChE,SAASC,cAAc,QAAQ,6BAA6B;AAC5D,SAASC,kBAAkB,QAAQ,kBAAkB;AACrD,SACEC,iBAAiB,EACjBC,gBAAgB,EAChBC,iBAAiB,QAGZ,iBAAiB;AACxB,SACEC,WAAW,QAEN,2CAA2C;AAClD,SACEC,wBAAwB,EACxBC,mBAAmB,EACnBC,mBAAmB,QAEd,0BAA0B;AACjC,SACEC,gBAAgB,EAChBC,SAAS,EACTC,aAAa,EACbC,mBAAmB,QAOd,0BAA0B;AAQjC,SACEC,cAAc,EACdC,iBAAiB,QAEZ,qBAAqB;AAC5B,SAASC,YAAY,QAAQ,oDAAoD;AACjF,SACEC,kBAAkB,EAClBC,aAAa,QACR,iCAAiC","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ export type PuckApiResult = {
2
+ success: boolean;
3
+ message: string;
4
+ data?: unknown;
5
+ };
6
+ export declare const PUCK_API_BASE: string;
7
+ export declare function absolutizeMediaUrl(baseUrl: string, url?: string): string | undefined;
8
+ export declare function puckFetch<T = unknown>(path: string, init?: RequestInit): Promise<T>;
9
+ export declare function fetchNodeList<T = unknown>(type: string, { lang, query, searchFields, fields, }?: {
10
+ lang?: string;
11
+ query?: string;
12
+ searchFields?: string[];
13
+ fields?: string[];
14
+ }): Promise<T[]>;
15
+ export declare function fetchMediaList<T = unknown>(type: string, params?: {
16
+ lang?: string;
17
+ query?: string;
18
+ offset?: number | string;
19
+ limit?: number | string;
20
+ }): Promise<T>;
21
+ export declare function fetchMediaItem<T = unknown>(type: string, id: string, lang?: string): Promise<T>;
22
+ export declare function saveTemplate(formData: FormData): Promise<PuckApiResult>;
23
+ export type TemplateUpdate = {
24
+ title?: string;
25
+ aiDescription?: string;
26
+ aiInstructions?: string;
27
+ };
28
+ export declare function updateTemplate(fragmentType: string, id: string, fields: TemplateUpdate): Promise<PuckApiResult>;
29
+ export declare function deleteTemplate(fragmentType: string, id: string): Promise<PuckApiResult>;
30
+ export declare function uploadImageMedia(formData: FormData, lang?: string): Promise<PuckApiResult>;
31
+ export declare function uploadRemoteVideoMedia(formData: FormData, lang?: string): Promise<PuckApiResult>;
32
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 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AAC,EAAE,MAAM,GACZ,OAAO,CAAC,CAAC,CAAC,CAKZ;AAID,wBAAsB,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,CAa7E;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,wBAAsB,cAAc,CAClC,YAAY,EAAE,MAAM,EACpB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,aAAa,CAAC,CAUxB;AAED,wBAAsB,cAAc,CAClC,YAAY,EAAE,MAAM,EACpB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,aAAa,CAAC,CAMxB;AAED,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,QAAQ,EAClB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,aAAa,CAAC,CAQxB;AAED,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,QAAQ,EAClB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,aAAa,CAAC,CAQxB"}
@@ -0,0 +1,128 @@
1
+ // Browser-side counterparts of the createPuckApi handlers. They replace the
2
+ // former PuckActions server-action context: editor components import these
3
+ // directly instead of receiving injected actions. Every browser call to the
4
+ // editor backend routes through here so the base path, error handling and
5
+ // media-URL absolutization live in one place.
6
+
7
+ export const PUCK_API_BASE = process.env.NEXT_PUBLIC_NODEHIVE_PUCK_API_BASE || '/api/puck';
8
+ export function absolutizeMediaUrl(baseUrl, url) {
9
+ if (!url) return undefined;
10
+ if (/^(?:[a-z]+:)?\/\//i.test(url)) return url;
11
+ return `${baseUrl.replace(/\/+$/, '')}${url}`;
12
+ }
13
+ function toSearch(params) {
14
+ const search = new URLSearchParams();
15
+ for (const [key, value] of Object.entries(params)) {
16
+ if (value !== undefined && value !== '') search.set(key, String(value));
17
+ }
18
+ const query = search.toString();
19
+ return query ? `?${query}` : '';
20
+ }
21
+ async function jsonResult(response) {
22
+ const body = await response.json().catch(() => ({}));
23
+ if (typeof body.success === 'boolean') {
24
+ return body;
25
+ }
26
+ return {
27
+ success: response.ok && body.status !== 'error',
28
+ message: body.message ?? (response.ok ? 'OK' : `Request failed: ${response.status}`),
29
+ data: body.data
30
+ };
31
+ }
32
+
33
+ // Read/mutate endpoints that return their own JSON shape (arrays, `{ data }`,
34
+ // created entities). Throws on a non-2xx response so callers surface errors
35
+ // uniformly instead of re-checking `response.ok`.
36
+ export async function puckFetch(path, init) {
37
+ const response = await fetch(`${PUCK_API_BASE}${path}`, init);
38
+ if (!response.ok) {
39
+ const body = await response.json().catch(() => ({}));
40
+ throw new Error(body.message ?? `Request failed: ${response.status}`);
41
+ }
42
+ return response.json();
43
+ }
44
+ export async function fetchNodeList(type, {
45
+ lang,
46
+ query,
47
+ searchFields,
48
+ fields
49
+ } = {}) {
50
+ const data = await puckFetch(`/node/${type}${toSearch({
51
+ lang,
52
+ query,
53
+ searchFields: searchFields?.length ? searchFields.join(',') : undefined,
54
+ fields: fields?.length ? fields.join(',') : undefined
55
+ })}`);
56
+ if (!Array.isArray(data)) {
57
+ throw new Error(`Invalid response format for ${type} nodes`);
58
+ }
59
+ return data;
60
+ }
61
+ export async function fetchMediaList(type, params = {}) {
62
+ return puckFetch(`/media/${type}${toSearch(params)}`, {
63
+ cache: 'no-store',
64
+ credentials: 'include'
65
+ });
66
+ }
67
+ export async function fetchMediaItem(type, id, lang) {
68
+ return puckFetch(`/media/${type}/${id}${toSearch({
69
+ lang,
70
+ t: Date.now()
71
+ })}`, {
72
+ cache: 'no-store'
73
+ });
74
+ }
75
+
76
+ // Fragment type, data and category field come from the server's contentModel;
77
+ // the client only sends the user input.
78
+ export async function saveTemplate(formData) {
79
+ const response = await fetch(`${PUCK_API_BASE}/template`, {
80
+ method: 'POST',
81
+ headers: {
82
+ 'Content-Type': 'application/json'
83
+ },
84
+ body: JSON.stringify({
85
+ name: formData.get('name'),
86
+ content: formData.get('content'),
87
+ category: formData.get('category'),
88
+ aiDescription: formData.get('aiDescription'),
89
+ aiInstructions: formData.get('aiInstructions')
90
+ })
91
+ });
92
+ return jsonResult(response);
93
+ }
94
+ export async function updateTemplate(fragmentType, id, fields) {
95
+ const response = await fetch(`${PUCK_API_BASE}/template/${fragmentType}/${encodeURIComponent(id)}`, {
96
+ method: 'PATCH',
97
+ headers: {
98
+ 'Content-Type': 'application/json'
99
+ },
100
+ body: JSON.stringify(fields)
101
+ });
102
+ return jsonResult(response);
103
+ }
104
+ export async function deleteTemplate(fragmentType, id) {
105
+ const response = await fetch(`${PUCK_API_BASE}/template/${fragmentType}/${encodeURIComponent(id)}`, {
106
+ method: 'DELETE'
107
+ });
108
+ return jsonResult(response);
109
+ }
110
+ export async function uploadImageMedia(formData, lang) {
111
+ formData.set('type', 'image');
112
+ if (lang) formData.set('lang', lang);
113
+ const response = await fetch(`${PUCK_API_BASE}/upload`, {
114
+ method: 'POST',
115
+ body: formData
116
+ });
117
+ return jsonResult(response);
118
+ }
119
+ export async function uploadRemoteVideoMedia(formData, lang) {
120
+ formData.set('type', 'remote_video');
121
+ if (lang) formData.set('lang', lang);
122
+ const response = await fetch(`${PUCK_API_BASE}/upload`, {
123
+ method: 'POST',
124
+ body: formData
125
+ });
126
+ return jsonResult(response);
127
+ }
128
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","names":["PUCK_API_BASE","process","env","NEXT_PUBLIC_NODEHIVE_PUCK_API_BASE","absolutizeMediaUrl","baseUrl","url","undefined","test","replace","toSearch","params","search","URLSearchParams","key","value","Object","entries","set","String","query","toString","jsonResult","response","body","json","catch","success","ok","status","message","data","puckFetch","path","init","fetch","Error","fetchNodeList","type","lang","searchFields","fields","length","join","Array","isArray","fetchMediaList","cache","credentials","fetchMediaItem","id","t","Date","now","saveTemplate","formData","method","headers","JSON","stringify","name","get","content","category","aiDescription","aiInstructions","updateTemplate","fragmentType","encodeURIComponent","deleteTemplate","uploadImageMedia","uploadRemoteVideoMedia"],"sources":["../../../../src/puck-editor/internal/api/client.ts"],"sourcesContent":["export type PuckApiResult = {\n success: boolean;\n message: string;\n data?: unknown;\n};\n\n// Browser-side counterparts of the createPuckApi handlers. They replace the\n// former PuckActions server-action context: editor components import these\n// directly instead of receiving injected actions. Every browser call to the\n// editor backend routes through here so the base path, error handling and\n// media-URL absolutization live in one place.\n\nexport const PUCK_API_BASE =\n process.env.NEXT_PUBLIC_NODEHIVE_PUCK_API_BASE || '/api/puck';\n\nexport function absolutizeMediaUrl(\n baseUrl: string,\n url?: string\n): string | undefined {\n if (!url) return undefined;\n if (/^(?:[a-z]+:)?\\/\\//i.test(url)) return url;\n return `${baseUrl.replace(/\\/+$/, '')}${url}`;\n}\n\nfunction toSearch(params: Record<string, string | number | undefined>): string {\n const search = new URLSearchParams();\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined && value !== '') search.set(key, String(value));\n }\n const query = search.toString();\n return query ? `?${query}` : '';\n}\n\nasync function jsonResult(response: Response): Promise<PuckApiResult> {\n const body = await response.json().catch(() => ({}));\n if (typeof body.success === 'boolean') {\n return body;\n }\n return {\n success: response.ok && body.status !== 'error',\n message:\n body.message ??\n (response.ok ? 'OK' : `Request failed: ${response.status}`),\n data: body.data,\n };\n}\n\n// Read/mutate endpoints that return their own JSON shape (arrays, `{ data }`,\n// created entities). Throws on a non-2xx response so callers surface errors\n// uniformly instead of re-checking `response.ok`.\nexport async function puckFetch<T = unknown>(\n path: string,\n init?: RequestInit\n): Promise<T> {\n const response = await fetch(`${PUCK_API_BASE}${path}`, init);\n if (!response.ok) {\n const body = await response.json().catch(() => ({}));\n throw new Error(\n (body as { message?: string }).message ??\n `Request failed: ${response.status}`\n );\n }\n return response.json();\n}\n\nexport async function fetchNodeList<T = unknown>(\n type: string,\n {\n lang,\n query,\n searchFields,\n fields,\n }: {\n lang?: string;\n query?: string;\n searchFields?: string[];\n fields?: string[];\n } = {}\n): Promise<T[]> {\n const data = await puckFetch<unknown>(\n `/node/${type}${toSearch({\n lang,\n query,\n searchFields: searchFields?.length ? searchFields.join(',') : undefined,\n fields: fields?.length ? fields.join(',') : undefined,\n })}`\n );\n if (!Array.isArray(data)) {\n throw new Error(`Invalid response format for ${type} nodes`);\n }\n return data as T[];\n}\n\nexport async function fetchMediaList<T = unknown>(\n type: string,\n params: {\n lang?: string;\n query?: string;\n offset?: number | string;\n limit?: number | string;\n } = {}\n): Promise<T> {\n return puckFetch<T>(`/media/${type}${toSearch(params)}`, {\n cache: 'no-store',\n credentials: 'include',\n });\n}\n\nexport async function fetchMediaItem<T = unknown>(\n type: string,\n id: string,\n lang?: string\n): Promise<T> {\n return puckFetch<T>(\n `/media/${type}/${id}${toSearch({ lang, t: Date.now() })}`,\n { cache: 'no-store' }\n );\n}\n\n// Fragment type, data and category field come from the server's contentModel;\n// the client only sends the user input.\nexport async function saveTemplate(formData: FormData): Promise<PuckApiResult> {\n const response = await fetch(`${PUCK_API_BASE}/template`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n name: formData.get('name'),\n content: formData.get('content'),\n category: formData.get('category'),\n aiDescription: formData.get('aiDescription'),\n aiInstructions: formData.get('aiInstructions'),\n }),\n });\n return jsonResult(response);\n}\n\nexport type TemplateUpdate = {\n title?: string;\n aiDescription?: string;\n aiInstructions?: string;\n};\n\nexport async function updateTemplate(\n fragmentType: string,\n id: string,\n fields: TemplateUpdate\n): Promise<PuckApiResult> {\n const response = await fetch(\n `${PUCK_API_BASE}/template/${fragmentType}/${encodeURIComponent(id)}`,\n {\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(fields),\n }\n );\n return jsonResult(response);\n}\n\nexport async function deleteTemplate(\n fragmentType: string,\n id: string\n): Promise<PuckApiResult> {\n const response = await fetch(\n `${PUCK_API_BASE}/template/${fragmentType}/${encodeURIComponent(id)}`,\n { method: 'DELETE' }\n );\n return jsonResult(response);\n}\n\nexport async function uploadImageMedia(\n formData: FormData,\n lang?: string\n): Promise<PuckApiResult> {\n formData.set('type', 'image');\n if (lang) formData.set('lang', lang);\n const response = await fetch(`${PUCK_API_BASE}/upload`, {\n method: 'POST',\n body: formData,\n });\n return jsonResult(response);\n}\n\nexport async function uploadRemoteVideoMedia(\n formData: FormData,\n lang?: string\n): Promise<PuckApiResult> {\n formData.set('type', 'remote_video');\n if (lang) formData.set('lang', lang);\n const response = await fetch(`${PUCK_API_BASE}/upload`, {\n method: 'POST',\n body: formData,\n });\n return jsonResult(response);\n}\n"],"mappings":"AAMA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,aAAa,GACxBC,OAAO,CAACC,GAAG,CAACC,kCAAkC,IAAI,WAAW;AAE/D,OAAO,SAASC,kBAAkBA,CAChCC,OAAe,EACfC,GAAY,EACQ;EACpB,IAAI,CAACA,GAAG,EAAE,OAAOC,SAAS;EAC1B,IAAI,oBAAoB,CAACC,IAAI,CAACF,GAAG,CAAC,EAAE,OAAOA,GAAG;EAC9C,OAAO,GAAGD,OAAO,CAACI,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,GAAGH,GAAG,EAAE;AAC/C;AAEA,SAASI,QAAQA,CAACC,MAAmD,EAAU;EAC7E,MAAMC,MAAM,GAAG,IAAIC,eAAe,CAAC,CAAC;EACpC,KAAK,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACN,MAAM,CAAC,EAAE;IACjD,IAAII,KAAK,KAAKR,SAAS,IAAIQ,KAAK,KAAK,EAAE,EAAEH,MAAM,CAACM,GAAG,CAACJ,GAAG,EAAEK,MAAM,CAACJ,KAAK,CAAC,CAAC;EACzE;EACA,MAAMK,KAAK,GAAGR,MAAM,CAACS,QAAQ,CAAC,CAAC;EAC/B,OAAOD,KAAK,GAAG,IAAIA,KAAK,EAAE,GAAG,EAAE;AACjC;AAEA,e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EACF,OAAOjC,UAAU,CAACC,QAAQ,CAAC;AAC7B;AAEA,OAAO,eAAegD,sBAAsBA,CAC1ChB,QAAkB,EAClBhB,IAAa,EACW;EACxBgB,QAAQ,CAACrC,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC;EACpC,IAAIqB,IAAI,EAAEgB,QAAQ,CAACrC,GAAG,CAAC,MAAM,EAAEqB,IAAI,CAAC;EACpC,MAAMhB,QAAQ,GAAG,MAAMY,KAAK,CAAC,GAAGnC,aAAa,SAAS,EAAE;IACtDwD,MAAM,EAAE,MAAM;IACdhC,IAAI,EAAE+B;EACR,CAAC,CAAC;EACF,OAAOjC,UAAU,CAACC,QAAQ,CAAC;AAC7B","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ import type { NodeHiveClient } from 'nodehive-js';
2
+ import type { PuckContentModel, PuckContentModelInput } from '../content-model';
3
+ import type { RoutableLink } from '../fields/link-picker/types';
4
+ export type PuckApiConfig = {
5
+ /** Default client: user when a session token is present, else anon. */
6
+ createClient: () => Promise<NodeHiveClient> | NodeHiveClient;
7
+ /** Client that deliberately acts as the logged-in user. */
8
+ createUserClient: () => NodeHiveClient;
9
+ /** NodeHive space new pages and templates are assigned to. */
10
+ spaceId?: string;
11
+ /** Internally-routable pages offered by the link picker. */
12
+ getLinks?: (lang: string) => Promise<RoutableLink[]>;
13
+ /** Called after a successful publish, e.g. for project cache-tag invalidation. */
14
+ onPublished?: (info: {
15
+ nodeId: string;
16
+ path?: string;
17
+ lang?: string;
18
+ }) => void | Promise<void>;
19
+ /**
20
+ * Drupal content-model overrides (puck-enabled bundles, templates, media
21
+ * upload limit). Pass the same value to the client's PuckEditorConfig.
22
+ */
23
+ contentModel?: PuckContentModelInput;
24
+ };
25
+ /** Config plus the resolved content model, as handed to the handlers. */
26
+ export type PuckApiRuntime = PuckApiConfig & {
27
+ model: PuckContentModel;
28
+ };
29
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/puck-editor/internal/api/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG;IAC1B,uEAAuE;IACvE,YAAY,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,CAAC;IAC7D,2DAA2D;IAC3D,gBAAgB,EAAE,MAAM,cAAc,CAAC;IACvC,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IACrD,kFAAkF;IAClF,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACtC,CAAC;AAEF,yEAAyE;AACzE,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","names":[],"sources":["../../../../src/puck-editor/internal/api/config.ts"],"sourcesContent":["import type { NodeHiveClient } from 'nodehive-js';\n\nimport type { PuckContentModel, PuckContentModelInput } from '../content-model';\nimport type { RoutableLink } from '../fields/link-picker/types';\n\nexport type PuckApiConfig = {\n /** Default client: user when a session token is present, else anon. */\n createClient: () => Promise<NodeHiveClient> | NodeHiveClient;\n /** Client that deliberately acts as the logged-in user. */\n createUserClient: () => NodeHiveClient;\n /** NodeHive space new pages and templates are assigned to. */\n spaceId?: string;\n /** Internally-routable pages offered by the link picker. */\n getLinks?: (lang: string) => Promise<RoutableLink[]>;\n /** Called after a successful publish, e.g. for project cache-tag invalidation. */\n onPublished?: (info: {\n nodeId: string;\n path?: string;\n lang?: string;\n }) => void | Promise<void>;\n /**\n * Drupal content-model overrides (puck-enabled bundles, templates, media\n * upload limit). Pass the same value to the client's PuckEditorConfig.\n */\n contentModel?: PuckContentModelInput;\n};\n\n/** Config plus the resolved content model, as handed to the handlers. */\nexport type PuckApiRuntime = PuckApiConfig & { model: PuckContentModel };\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ import { NextRequest } from 'next/server';
2
+ import type { PuckApiConfig } from './config';
3
+ type PuckRouteContext = {
4
+ params: Promise<{
5
+ puck?: string[];
6
+ }>;
7
+ };
8
+ /**
9
+ * Handler factory for the Puck editor backend, mounted once as a catch-all
10
+ * route (Auth.js pattern):
11
+ *
12
+ * // src/app/api/puck/[...puck]/route.ts
13
+ * export const { GET, POST, PATCH, DELETE } = createPuckApi({ ... });
14
+ *
15
+ * Projects extend via Next.js routing precedence, not via config: a sibling
16
+ * route file next to the mount adds an endpoint, a file on the same path as a
17
+ * built-in handler shadows it.
18
+ */
19
+ export declare function createPuckApi(rawConfig: PuckApiConfig): {
20
+ GET: (request: NextRequest, context: PuckRouteContext) => Promise<Response>;
21
+ POST: (request: NextRequest, context: PuckRouteContext) => Promise<Response>;
22
+ PATCH: (request: NextRequest, context: PuckRouteContext) => Promise<Response>;
23
+ DELETE: (request: NextRequest, context: PuckRouteContext) => Promise<Response>;
24
+ };
25
+ export {};
26
+ //# sourceMappingURL=create-puck-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-puck-api.d.ts","sourceRoot":"","sources":["../../../../src/puck-editor/internal/api/create-puck-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAgB,MAAM,aAAa,CAAC;AAKxD,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,UAAU,CAAC;AAkB9D,KAAK,gBAAgB,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;AAMjE;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,aAAa;mBAKrB,WAAW,WAAW,gBAAgB;oBAAtC,WAAW,WAAW,gBAAgB;qBAAtC,WAAW,WAAW,gBAAgB;sBAAtC,WAAW,WAAW,gBAAgB;EAsFtE"}
@@ -0,0 +1,124 @@
1
+ import { NextResponse } from 'next/server';
2
+ import { isSameOriginRequest, requireAuth } from '../../../auth/server';
3
+ import { resolveContentModel } from '../content-model';
4
+ import { normalizeLang } from '../locale';
5
+ import { handleCreatePage } from './handlers/create-page';
6
+ import { handleFragmentList, handleLinks, handleMediaItem, handleMediaList, handleNodeItem, handleNodeList } from './handlers/entities';
7
+ import { handlePublish } from './handlers/publish';
8
+ import { handleDeleteTemplate, handleSaveTemplate, handleUpdateTemplate } from './handlers/template';
9
+ import { handleUpload } from './handlers/upload';
10
+ // node/media/fragment type segments land in JSON:API URLs; reject anything
11
+ // that could smuggle path segments before the handlers interpolate them.
12
+ const TYPE_SEGMENT_RE = /^[a-z_]+$/;
13
+
14
+ /**
15
+ * Handler factory for the Puck editor backend, mounted once as a catch-all
16
+ * route (Auth.js pattern):
17
+ *
18
+ * // src/app/api/puck/[...puck]/route.ts
19
+ * export const { GET, POST, PATCH, DELETE } = createPuckApi({ ... });
20
+ *
21
+ * Projects extend via Next.js routing precedence, not via config: a sibling
22
+ * route file next to the mount adds an endpoint, a file on the same path as a
23
+ * built-in handler shadows it.
24
+ */
25
+ export function createPuckApi(rawConfig) {
26
+ const config = {
27
+ ...rawConfig,
28
+ model: resolveContentModel(rawConfig.contentModel)
29
+ };
30
+ const handle = async (request, context) => {
31
+ const unauthorized = await requireAuth();
32
+ if (unauthorized) return unauthorized;
33
+ if (request.method !== 'GET' && !isSameOriginRequest(request)) {
34
+ return NextResponse.json({
35
+ status: 'error',
36
+ message: 'cross-site request rejected'
37
+ }, {
38
+ status: 403
39
+ });
40
+ }
41
+ const segments = (await context.params).puck ?? [];
42
+ const [resource, second, third] = segments;
43
+ const {
44
+ searchParams
45
+ } = request.nextUrl;
46
+ const lang = normalizeLang(searchParams.get('lang'));
47
+ const typedResources = new Set(['node', 'media', 'fragment']);
48
+ if (typedResources.has(resource) && (second === undefined || !TYPE_SEGMENT_RE.test(second))) {
49
+ return NextResponse.json({
50
+ error: 'Not found'
51
+ }, {
52
+ status: 404
53
+ });
54
+ }
55
+ try {
56
+ switch (request.method) {
57
+ case 'GET':
58
+ if (resource === 'links' && segments.length === 1) {
59
+ return await handleLinks(config, lang);
60
+ }
61
+ if (resource === 'node' && segments.length === 2) {
62
+ return await handleNodeList(config, second, searchParams);
63
+ }
64
+ if (resource === 'node' && segments.length === 3) {
65
+ return await handleNodeItem(config, second, third, lang);
66
+ }
67
+ if (resource === 'media' && segments.length === 2) {
68
+ return await handleMediaList(config, second, searchParams);
69
+ }
70
+ if (resource === 'media' && segments.length === 3) {
71
+ return await handleMediaItem(config, second, third, lang);
72
+ }
73
+ if (resource === 'fragment' && segments.length === 2) {
74
+ return await handleFragmentList(config, second, searchParams);
75
+ }
76
+ break;
77
+ case 'POST':
78
+ if (resource === 'create' && segments.length === 1) {
79
+ return await handleCreatePage(config, request);
80
+ }
81
+ if (resource === 'upload' && segments.length === 1) {
82
+ return await handleUpload(config, request);
83
+ }
84
+ if (resource === 'template' && segments.length === 1) {
85
+ return await handleSaveTemplate(config, request);
86
+ }
87
+ break;
88
+ case 'PATCH':
89
+ if (resource === 'publish' && segments.length === 1) {
90
+ return await handlePublish(config, request);
91
+ }
92
+ if (resource === 'template' && segments.length === 3) {
93
+ return await handleUpdateTemplate(config, second, third, request);
94
+ }
95
+ break;
96
+ case 'DELETE':
97
+ if (resource === 'template' && segments.length === 3) {
98
+ return await handleDeleteTemplate(config, second, third);
99
+ }
100
+ break;
101
+ }
102
+ } catch (error) {
103
+ console.error(`puck api ${request.method} /${segments.join('/')}:`, error);
104
+ return NextResponse.json({
105
+ status: 'error',
106
+ message: 'An unexpected error occurred'
107
+ }, {
108
+ status: 500
109
+ });
110
+ }
111
+ return NextResponse.json({
112
+ error: 'Not found'
113
+ }, {
114
+ status: 404
115
+ });
116
+ };
117
+ return {
118
+ GET: handle,
119
+ POST: handle,
120
+ PATCH: handle,
121
+ DELETE: handle
122
+ };
123
+ }
124
+ //# sourceMappingURL=create-puck-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-puck-api.js","names":["NextResponse","isSameOriginRequest","requireAuth","resolveContentModel","normalizeLang","handleCreatePage","handleFragmentList","handleLinks","handleMediaItem","handleMediaList","handleNodeItem","handleNodeList","handlePublish","handleDeleteTemplate","handleSaveTemplate","handleUpdateTemplate","handleUpload","TYPE_SEGMENT_RE","createPuckApi","rawConfig","config","model","contentModel","handle","request","context","unauthorized","method","json","status","message","segments","params","puck","resource","second","third","searchParams","nextUrl","lang","get","typedResources","Set","has","undefined","test","error","length","console","join","GET","POST","PATCH","DELETE"],"sources":["../../../../src/puck-editor/internal/api/create-puck-api.ts"],"sourcesContent":["import { NextRequest, NextResponse } from 'next/server';\n\nimport { isSameOriginRequest, requireAuth } from '../../../auth/server';\nimport { resolveContentModel } from '../content-model';\nimport { normalizeLang } from '../locale';\nimport type { PuckApiConfig, PuckApiRuntime } from './config';\nimport { handleCreatePage } from './handlers/create-page';\nimport {\n handleFragmentList,\n handleLinks,\n handleMediaItem,\n handleMediaList,\n handleNodeItem,\n handleNodeList,\n} from './handlers/entities';\nimport { handlePublish } from './handlers/publish';\nimport {\n handleDeleteTemplate,\n handleSaveTemplate,\n handleUpdateTemplate,\n} from './handlers/template';\nimport { handleUpload } from './handlers/upload';\n\ntype PuckRouteContext = { params: Promise<{ puck?: string[] }> };\n\n// node/media/fragment type segments land in JSON:API URLs; reject anything\n// that could smuggle path segments before the handlers interpolate them.\nconst TYPE_SEGMENT_RE = /^[a-z_]+$/;\n\n/**\n * Handler factory for the Puck editor backend, mounted once as a catch-all\n * route (Auth.js pattern):\n *\n * // src/app/api/puck/[...puck]/route.ts\n * export const { GET, POST, PATCH, DELETE } = createPuckApi({ ... });\n *\n * Projects extend via Next.js routing precedence, not via config: a sibling\n * route file next to the mount adds an endpoint, a file on the same path as a\n * built-in handler shadows it.\n */\nexport function createPuckApi(rawConfig: PuckApiConfig) {\n const config: PuckApiRuntime = {\n ...rawConfig,\n model: resolveContentModel(rawConfig.contentModel),\n };\n const handle = async (request: NextRequest, context: PuckRouteContext) => {\n const unauthorized = await requireAuth();\n if (unauthorized) return unauthorized;\n\n if (request.method !== 'GET' && !isSameOriginRequest(request)) {\n return NextResponse.json(\n { status: 'error', message: 'cross-site request rejected' },\n { status: 403 }\n );\n }\n\n const segments = (await context.params).puck ?? [];\n const [resource, second, third] = segments;\n const { searchParams } = request.nextUrl;\n const lang = normalizeLang(searchParams.get('lang'));\n\n const typedResources = new Set(['node', 'media', 'fragment']);\n if (\n typedResources.has(resource) &&\n (second === undefined || !TYPE_SEGMENT_RE.test(second))\n ) {\n return NextResponse.json({ error: 'Not found' }, { status: 404 });\n }\n\n try {\n switch (request.method) {\n case 'GET':\n if (resource === 'links' && segments.length === 1) {\n return await handleLinks(config, lang);\n }\n if (resource === 'node' && segments.length === 2) {\n return await handleNodeList(config, second, searchParams);\n }\n if (resource === 'node' && segments.length === 3) {\n return await handleNodeItem(config, second, third, lang);\n }\n if (resource === 'media' && segments.length === 2) {\n return await handleMediaList(config, second, searchParams);\n }\n if (resource === 'media' && segments.length === 3) {\n return await handleMediaItem(config, second, third, lang);\n }\n if (resource === 'fragment' && segments.length === 2) {\n return await handleFragmentList(config, second, searchParams);\n }\n break;\n case 'POST':\n if (resource === 'create' && segments.length === 1) {\n return await handleCreatePage(config, request);\n }\n if (resource === 'upload' && segments.length === 1) {\n return await handleUpload(config, request);\n }\n if (resource === 'template' && segments.length === 1) {\n return await handleSaveTemplate(config, request);\n }\n break;\n case 'PATCH':\n if (resource === 'publish' && segments.length === 1) {\n return await handlePublish(config, request);\n }\n if (resource === 'template' && segments.length === 3) {\n return await handleUpdateTemplate(config, second, third, request);\n }\n break;\n case 'DELETE':\n if (resource === 'template' && segments.length === 3) {\n return await handleDeleteTemplate(config, second, third);\n }\n break;\n }\n } catch (error) {\n console.error(\n `puck api ${request.method} /${segments.join('/')}:`,\n error\n );\n return NextResponse.json(\n { status: 'error', message: 'An unexpected error occurred' },\n { status: 500 }\n );\n }\n\n return NextResponse.json({ error: 'Not found' }, { status: 404 });\n };\n\n return { GET: handle, POST: handle, PATCH: handle, DELETE: handle };\n}\n"],"mappings":"AAAA,SAAsBA,YAAY,QAAQ,aAAa;AAEvD,SAASC,mBAAmB,EAAEC,WAAW,QAAQ,sBAAsB;AACvE,SAASC,mBAAmB,QAAQ,kBAAkB;AACtD,SAASC,aAAa,QAAQ,WAAW;AAEzC,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SACEC,kBAAkB,EAClBC,WAAW,EACXC,eAAe,EACfC,eAAe,EACfC,cAAc,EACdC,cAAc,QACT,qBAAqB;AAC5B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SACEC,oBAAoB,EACpBC,kBAAkB,EAClBC,oBAAoB,QACf,qBAAqB;AAC5B,SAASC,YAAY,QAAQ,mBAAmB;AAIhD;AACA;AACA,MAAMC,eAAe,GAAG,WAAW;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAACC,SAAwB,EAAE;EACtD,MAAMC,MAAsB,GAAG;IAC7B,GAAGD,SAAS;IACZE,KAAK,EAAElB,mBAAmB,CAACgB,SAAS,CAACG,YAAY;EACnD,CAAC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from '../config';
3
+ export declare function handleCreatePage(config: PuckApiRuntime, request: NextRequest): Promise<NextResponse<{
4
+ status: string;
5
+ message: string;
6
+ }> | NextResponse<{
7
+ status: string;
8
+ id: any;
9
+ nid: any;
10
+ alias: any;
11
+ fieldName: string;
12
+ }>>;
13
+ //# sourceMappingURL=create-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-page.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/api/handlers/create-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAiChD,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,WAAW;;;;;;;;;IAsGrB"}
@@ -0,0 +1,125 @@
1
+ import { NextResponse } from 'next/server';
2
+ import { creatableBundles, getBundle } from '../../content-model';
3
+ import { resolveSpaceUuid, SPACE_TYPE } from '../space';
4
+ const DEFAULT_TITLE = 'New page';
5
+ const EMPTY_PUCK_DATA = {
6
+ content: [],
7
+ root: {
8
+ props: {}
9
+ }
10
+ };
11
+ function normalizeAlias(input) {
12
+ if (typeof input !== 'string') return null;
13
+ const trimmed = input.trim().replace(/\/+$/, '');
14
+ if (!trimmed) return null;
15
+ const alias = trimmed.startsWith('/') ? trimmed : `/${trimmed}`;
16
+ return /^(\/[a-z0-9-]+)+$/i.test(alias) ? alias : null;
17
+ }
18
+ async function readNodeAlias(client, jsonApiType, type, id, lang) {
19
+ try {
20
+ const fetched = await client.request(`/jsonapi/node/${jsonApiType}/${id}?fields[${type}]=path`, {
21
+ lang
22
+ });
23
+ return fetched?.data?.attributes?.path?.alias ?? null;
24
+ } catch (error) {
25
+ console.error('Error reading created node alias:', error);
26
+ return null;
27
+ }
28
+ }
29
+ export async function handleCreatePage(config, request) {
30
+ const {
31
+ title,
32
+ alias,
33
+ type,
34
+ fieldName,
35
+ lang
36
+ } = await request.json();
37
+ const requestedType = type ?? creatableBundles(config.model)[0]?.type;
38
+ const bundle = getBundle(config.model, requestedType);
39
+ if (!bundle || !bundle.creatable || fieldName !== undefined && fieldName !== bundle.dataField) {
40
+ return NextResponse.json({
41
+ status: 'error',
42
+ message: 'invalid type or fieldName'
43
+ }, {
44
+ status: 400
45
+ });
46
+ }
47
+ let relationships;
48
+ if (config.spaceId) {
49
+ const spaceUuid = await resolveSpaceUuid(await config.createClient(), config.spaceId);
50
+ if (!spaceUuid) {
51
+ return NextResponse.json({
52
+ status: 'error',
53
+ message: 'Could not resolve the NodeHive space; page not created.'
54
+ }, {
55
+ status: 500
56
+ });
57
+ }
58
+ relationships = {
59
+ nodehive_space: {
60
+ data: [{
61
+ type: SPACE_TYPE,
62
+ id: spaceUuid
63
+ }]
64
+ }
65
+ };
66
+ }
67
+ const normalizedAlias = normalizeAlias(alias);
68
+ const jsonApiType = bundle.type.replace('node--', '');
69
+ const attributes = {
70
+ title: typeof title === 'string' && title.trim() ? title.trim() : bundle.createDefaults.title ?? DEFAULT_TITLE,
71
+ status: false,
72
+ [bundle.dataField]: JSON.stringify(EMPTY_PUCK_DATA),
73
+ ...(typeof lang === 'string' && lang ? {
74
+ langcode: lang
75
+ } : {}),
76
+ ...(normalizedAlias ? {
77
+ path: {
78
+ alias: normalizedAlias,
79
+ pathauto: 0
80
+ }
81
+ } : {})
82
+ };
83
+ try {
84
+ const client = config.createUserClient();
85
+ const response = await client.request(`/jsonapi/node/${jsonApiType}`, {
86
+ method: 'POST',
87
+ lang,
88
+ data: {
89
+ data: {
90
+ type: bundle.type,
91
+ attributes,
92
+ ...(relationships ? {
93
+ relationships
94
+ } : {})
95
+ }
96
+ },
97
+ headers: {
98
+ Accept: 'application/vnd.api+json'
99
+ }
100
+ });
101
+ const id = response?.data?.id ?? null;
102
+ const nid = response?.data?.attributes?.drupal_internal__nid ?? null;
103
+ const resolvedAlias = response?.data?.attributes?.path?.alias ?? (id ? await readNodeAlias(client, jsonApiType, bundle.type, id, lang) : null);
104
+ return NextResponse.json({
105
+ status: 'ok',
106
+ id,
107
+ nid,
108
+ alias: resolvedAlias,
109
+ fieldName: bundle.dataField
110
+ });
111
+ } catch (error) {
112
+ const details = error?.details;
113
+ console.error('Error creating Drupal node:', error);
114
+ if (details) {
115
+ console.error('Drupal response details:', JSON.stringify(details, null, 2));
116
+ }
117
+ return NextResponse.json({
118
+ status: 'error',
119
+ message: `Error creating Drupal node: ${error instanceof Error ? error.message : 'Unknown error'}`
120
+ }, {
121
+ status: 500
122
+ });
123
+ }
124
+ }
125
+ //# sourceMappingURL=create-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-page.js","names":["NextResponse","creatableBundles","getBundle","resolveSpaceUuid","SPACE_TYPE","DEFAULT_TITLE","EMPTY_PUCK_DATA","content","root","props","normalizeAlias","input","trimmed","trim","replace","alias","startsWith","test","readNodeAlias","client","jsonApiType","type","id","lang","fetched","request","data","attributes","path","error","console","handleCreatePage","config","title","fieldName","json","requestedType","model","bundle","creatable","undefined","dataField","status","message","relationships","spaceId","spaceUuid","createClient","nodehive_space","normalizedAlias","createDefaults","JSON","stringify","langcode","pathauto","createUserClient","response","method","headers","Accept","nid","drupal_internal__nid","resolvedAlias","details","Error"],"sources":["../../../../../src/puck-editor/internal/api/handlers/create-page.ts"],"sourcesContent":["import { NextRequest, NextResponse } from 'next/server';\nimport type { NodeHiveClient } from 'nodehive-js';\n\nimport { creatableBundles, getBundle } from '../../content-model';\nimport type { PuckApiRuntime } from '../config';\nimport { resolveSpaceUuid, SPACE_TYPE } from '../space';\n\nconst DEFAULT_TITLE = 'New page';\nconst EMPTY_PUCK_DATA = { content: [], root: { props: {} } };\n\nfunction normalizeAlias(input: unknown): string | null {\n if (typeof input !== 'string') return null;\n const trimmed = input.trim().replace(/\\/+$/, '');\n if (!trimmed) return null;\n const alias = trimmed.startsWith('/') ? trimmed : `/${trimmed}`;\n return /^(\\/[a-z0-9-]+)+$/i.test(alias) ? alias : null;\n}\n\nasync function readNodeAlias(\n client: NodeHiveClient,\n jsonApiType: string,\n type: string,\n id: string,\n lang?: string\n): Promise<string | null> {\n try {\n const fetched = await client.request(\n `/jsonapi/node/${jsonApiType}/${id}?fields[${type}]=path`,\n { lang }\n );\n return fetched?.data?.attributes?.path?.alias ?? null;\n } catch (error) {\n console.error('Error reading created node alias:', error);\n return null;\n }\n}\n\nexport async function handleCreatePage(\n config: PuckApiRuntime,\n request: NextRequest\n) {\n const { title, alias, type, fieldName, lang } = await request.json();\n\n const requestedType = type ?? creatableBundles(config.model)[0]?.type;\n const bundle = getBundle(config.model, requestedType);\n\n if (\n !bundle ||\n !bundle.creatable ||\n (fieldName !== undefined && fieldName !== bundle.dataField)\n ) {\n return NextResponse.json(\n { status: 'error', message: 'invalid type or fieldName' },\n { status: 400 }\n );\n }\n\n let relationships: Record<string, unknown> | undefined;\n if (config.spaceId) {\n const spaceUuid = await resolveSpaceUuid(\n await config.createClient(),\n config.spaceId\n );\n if (!spaceUuid) {\n return NextResponse.json(\n {\n status: 'error',\n message: 'Could not resolve the NodeHive space; page not created.',\n },\n { status: 500 }\n );\n }\n relationships = {\n nodehive_space: { data: [{ type: SPACE_TYPE, id: spaceUuid }] },\n };\n }\n\n const normalizedAlias = normalizeAlias(alias);\n const jsonApiType = bundle.type.replace('node--', '');\n const attributes: Record<string, unknown> = {\n title:\n typeof title === 'string' && title.trim()\n ? title.trim()\n : (bundle.createDefaults.title ?? DEFAULT_TITLE),\n status: false,\n [bundle.dataField]: JSON.stringify(EMPTY_PUCK_DATA),\n ...(typeof lang === 'string' && lang ? { langcode: lang } : {}),\n ...(normalizedAlias\n ? { path: { alias: normalizedAlias, pathauto: 0 } }\n : {}),\n };\n\n try {\n const client = config.createUserClient();\n const response = await client.request(`/jsonapi/node/${jsonApiType}`, {\n method: 'POST',\n lang,\n data: {\n data: {\n type: bundle.type,\n attributes,\n ...(relationships ? { relationships } : {}),\n },\n },\n headers: { Accept: 'application/vnd.api+json' },\n });\n\n const id = response?.data?.id ?? null;\n const nid = response?.data?.attributes?.drupal_internal__nid ?? null;\n const resolvedAlias =\n response?.data?.attributes?.path?.alias ??\n (id\n ? await readNodeAlias(client, jsonApiType, bundle.type, id, lang)\n : null);\n\n return NextResponse.json({\n status: 'ok',\n id,\n nid,\n alias: resolvedAlias,\n fieldName: bundle.dataField,\n });\n } catch (error) {\n const details = (error as { details?: unknown })?.details;\n console.error('Error creating Drupal node:', error);\n if (details) {\n console.error(\n 'Drupal response details:',\n JSON.stringify(details, null, 2)\n );\n }\n return NextResponse.json(\n {\n status: 'error',\n message: `Error creating Drupal node: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n },\n { status: 500 }\n );\n }\n}\n"],"mappings":"AAAA,SAAsBA,YAAY,QAAQ,aAAa;AAGvD,SAASC,gBAAgB,EAAEC,SAAS,QAAQ,qBAAqB;AAEjE,SAASC,gBAAgB,EAAEC,UAAU,QAAQ,UAAU;AAEvD,MAAMC,aAAa,GAAG,UAAU;AAChC,MAAMC,eAAe,GAAG;EAAEC,OAAO,EAAE,EAAE;EAAEC,IAAI,EAAE;IAAEC,KAAK,EAAE,CAAC;EAAE;AAAE,CAAC;AAE5D,SAASC,cAAcA,CAACC,KAAc,EAAiB;EACrD,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAO,IAAI;EAC1C,MAAMC,OAAO,GAAGD,KAAK,CAACE,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;EAChD,IAAI,CAACF,OAAO,EAAE,OAAO,IAAI;EACzB,MAAMG,KAAK,GAAGH,OAAO,CAACI,UAAU,CAAC,GAAG,CAAC,GAAGJ,OAAO,GAAG,IAAIA,OAAO,EAAE;EAC/D,OAAO,oBAAoB,CAACK,IAAI,CAACF,KAAK,CAAC,GAAGA,KAAK,GAAG,IAAI;AACxD;AAEA,eAAeG,aAAaA,CAC1BC,MAAsB,EACtBC,WAAmB,EACnBC,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ED,MAAM,EAAE;IAAI,CAChB,CAAC;EACH;AACF","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ import { NextResponse } from 'next/server';
2
+ import type { PuckApiConfig } from '../config';
3
+ export declare function handleLinks(config: PuckApiConfig, lang?: string): Promise<NextResponse<{
4
+ error: string;
5
+ }> | NextResponse<import("../../../fields").RoutableLink[]>>;
6
+ export declare function handleNodeList(config: PuckApiConfig, type: string, searchParams: URLSearchParams): Promise<NextResponse<any>>;
7
+ export declare function handleNodeItem(config: PuckApiConfig, type: string, id: string, lang?: string): Promise<NextResponse<any>>;
8
+ export declare function handleMediaList(config: PuckApiConfig, type: string, searchParams: URLSearchParams): Promise<NextResponse<import("nodehive-js").ApiResponse<any>> | NextResponse<{
9
+ error: string;
10
+ }>>;
11
+ export declare function handleMediaItem(config: PuckApiConfig, type: string, id: string, lang?: string): Promise<NextResponse<import("nodehive-js").ApiResponse<any>> | NextResponse<{
12
+ error: string;
13
+ }>>;
14
+ export declare function handleFragmentList(config: PuckApiConfig, type: string, searchParams: URLSearchParams): Promise<NextResponse<import("nodehive-js").ApiResponse<any>> | NextResponse<{
15
+ error: string;
16
+ }>>;
17
+ //# sourceMappingURL=entities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../../../../src/puck-editor/internal/api/handlers/entities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAU/C,wBAAsB,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,MAAM;;6DAkBrE;AAED,wBAAsB,cAAc,CAClC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,eAAe,8BA6C9B;AAED,wBAAsB,cAAc,CAClC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,MAAM,8BAoBd;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,eAAe;;IAwB9B;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,MAAM;;IAsBd;AAED,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,eAAe;;IAsC9B"}