@nodehive/nextjs 0.1.3 → 0.2.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 (771) hide show
  1. package/README.md +1 -1
  2. package/dist/auth/index.d.ts +2 -3
  3. package/dist/auth/index.js.map +1 -1
  4. package/dist/auth/internal/config.d.ts +15 -5
  5. package/dist/auth/internal/config.js.map +1 -1
  6. package/dist/auth/internal/draft-mode.d.ts +2 -3
  7. package/dist/auth/internal/draft-mode.js +3 -20
  8. package/dist/auth/internal/draft-mode.js.map +1 -1
  9. package/dist/auth/internal/editor-locale.d.ts +0 -1
  10. package/dist/auth/internal/handoff.d.ts +0 -1
  11. package/dist/auth/internal/has-session.d.ts +0 -1
  12. package/dist/auth/internal/has-session.js +1 -1
  13. package/dist/auth/internal/has-session.js.map +1 -1
  14. package/dist/auth/internal/i18n.d.ts +10 -0
  15. package/dist/auth/internal/i18n.js +25 -0
  16. package/dist/auth/internal/i18n.js.map +1 -0
  17. package/dist/auth/internal/logout.d.ts +1 -2
  18. package/dist/auth/internal/logout.js +3 -3
  19. package/dist/auth/internal/logout.js.map +1 -1
  20. package/dist/auth/internal/next-cookie-storage.d.ts +5 -2
  21. package/dist/auth/internal/next-cookie-storage.js +8 -1
  22. package/dist/auth/internal/next-cookie-storage.js.map +1 -1
  23. package/dist/auth/internal/nodehive-client.d.ts +6 -4
  24. package/dist/auth/internal/nodehive-client.js +6 -4
  25. package/dist/auth/internal/nodehive-client.js.map +1 -1
  26. package/dist/auth/internal/oauth-config.d.ts +0 -1
  27. package/dist/auth/internal/proxy-helpers.d.ts +0 -1
  28. package/dist/auth/internal/proxy-helpers.js +4 -4
  29. package/dist/auth/internal/proxy-helpers.js.map +1 -1
  30. package/dist/auth/internal/refresh.d.ts +1 -2
  31. package/dist/auth/internal/refresh.js +4 -4
  32. package/dist/auth/internal/refresh.js.map +1 -1
  33. package/dist/auth/internal/require-auth.d.ts +0 -1
  34. package/dist/auth/internal/require-auth.js +1 -1
  35. package/dist/auth/internal/require-auth.js.map +1 -1
  36. package/dist/auth/internal/return-to.d.ts +0 -1
  37. package/dist/auth/internal/roles.d.ts +17 -0
  38. package/dist/auth/internal/roles.js +39 -0
  39. package/dist/auth/internal/roles.js.map +1 -0
  40. package/dist/auth/internal/routes/callback.d.ts +1 -2
  41. package/dist/auth/internal/routes/callback.js +6 -6
  42. package/dist/auth/internal/routes/callback.js.map +1 -1
  43. package/dist/auth/internal/routes/chips-exchange.d.ts +1 -2
  44. package/dist/auth/internal/routes/chips-exchange.js +5 -5
  45. package/dist/auth/internal/routes/chips-exchange.js.map +1 -1
  46. package/dist/auth/internal/routes/draft.d.ts +1 -2
  47. package/dist/auth/internal/routes/draft.js +3 -3
  48. package/dist/auth/internal/routes/draft.js.map +1 -1
  49. package/dist/auth/internal/routes/index.d.ts +4 -2
  50. package/dist/auth/internal/routes/index.js +7 -7
  51. package/dist/auth/internal/routes/index.js.map +1 -1
  52. package/dist/auth/internal/routes/login.d.ts +0 -1
  53. package/dist/auth/internal/routes/login.js +3 -3
  54. package/dist/auth/internal/routes/login.js.map +1 -1
  55. package/dist/auth/internal/routes/popup-done.d.ts +2 -2
  56. package/dist/auth/internal/routes/popup-done.js +9 -7
  57. package/dist/auth/internal/routes/popup-done.js.map +1 -1
  58. package/dist/auth/internal/routes/refresh.d.ts +2 -5
  59. package/dist/auth/internal/routes/refresh.js +8 -2
  60. package/dist/auth/internal/routes/refresh.js.map +1 -1
  61. package/dist/auth/internal/same-origin.d.ts +0 -1
  62. package/dist/auth/internal/session-gates.d.ts +27 -3
  63. package/dist/auth/internal/session-gates.js +35 -3
  64. package/dist/auth/internal/session-gates.js.map +1 -1
  65. package/dist/auth/internal/update-session.d.ts +1 -2
  66. package/dist/auth/internal/update-session.js +1 -1
  67. package/dist/auth/internal/update-session.js.map +1 -1
  68. package/dist/auth/internal/use-editor-login.d.ts +0 -1
  69. package/dist/auth/internal/use-editor-login.js +2 -3
  70. package/dist/auth/internal/use-editor-login.js.map +1 -1
  71. package/dist/auth/proxy.d.ts +7 -8
  72. package/dist/auth/proxy.js +6 -6
  73. package/dist/auth/proxy.js.map +1 -1
  74. package/dist/auth/react.d.ts +1 -2
  75. package/dist/auth/react.js +1 -1
  76. package/dist/auth/react.js.map +1 -1
  77. package/dist/auth/routes.d.ts +3 -3
  78. package/dist/auth/routes.js +1 -1
  79. package/dist/auth/routes.js.map +1 -1
  80. package/dist/auth/server.d.ts +14 -12
  81. package/dist/auth/server.js +14 -9
  82. package/dist/auth/server.js.map +1 -1
  83. package/dist/bridge-protocol/index.d.ts +50 -0
  84. package/dist/bridge-protocol/index.js +25 -0
  85. package/dist/bridge-protocol/index.js.map +1 -0
  86. package/dist/puck-editor/editor.d.ts +8 -0
  87. package/dist/puck-editor/editor.js +9 -0
  88. package/dist/puck-editor/editor.js.map +1 -0
  89. package/dist/puck-editor/fields.d.ts +6 -7
  90. package/dist/puck-editor/fields.js +3 -3
  91. package/dist/puck-editor/fields.js.map +1 -1
  92. package/dist/puck-editor/index.d.ts +17 -14
  93. package/dist/puck-editor/index.js +13 -11
  94. package/dist/puck-editor/index.js.map +1 -1
  95. package/dist/puck-editor/internal/api/client.d.ts +19 -4
  96. package/dist/puck-editor/internal/api/client.js +56 -19
  97. package/dist/puck-editor/internal/api/client.js.map +1 -1
  98. package/dist/puck-editor/internal/api/config.d.ts +36 -3
  99. package/dist/puck-editor/internal/api/config.js.map +1 -1
  100. package/dist/puck-editor/internal/api/create-puck-api.d.ts +1 -2
  101. package/dist/puck-editor/internal/api/create-puck-api.js +10 -13
  102. package/dist/puck-editor/internal/api/create-puck-api.js.map +1 -1
  103. package/dist/puck-editor/internal/api/handlers/create-page.d.ts +1 -2
  104. package/dist/puck-editor/internal/api/handlers/create-page.js +6 -4
  105. package/dist/puck-editor/internal/api/handlers/create-page.js.map +1 -1
  106. package/dist/puck-editor/internal/api/handlers/entities.d.ts +6 -5
  107. package/dist/puck-editor/internal/api/handlers/entities.js +60 -15
  108. package/dist/puck-editor/internal/api/handlers/entities.js.map +1 -1
  109. package/dist/puck-editor/internal/api/handlers/publish.d.ts +3 -6
  110. package/dist/puck-editor/internal/api/handlers/publish.js +57 -14
  111. package/dist/puck-editor/internal/api/handlers/publish.js.map +1 -1
  112. package/dist/puck-editor/internal/api/handlers/template.d.ts +5 -2
  113. package/dist/puck-editor/internal/api/handlers/template.js +28 -60
  114. package/dist/puck-editor/internal/api/handlers/template.js.map +1 -1
  115. package/dist/puck-editor/internal/api/handlers/upload.d.ts +10 -2
  116. package/dist/puck-editor/internal/api/handlers/upload.js +93 -28
  117. package/dist/puck-editor/internal/api/handlers/upload.js.map +1 -1
  118. package/dist/puck-editor/internal/api/localize-message.d.ts +15 -0
  119. package/dist/puck-editor/internal/api/localize-message.js +15 -0
  120. package/dist/puck-editor/internal/api/localize-message.js.map +1 -0
  121. package/dist/puck-editor/internal/api/media-params.d.ts +3 -3
  122. package/dist/puck-editor/internal/api/media-params.js +23 -19
  123. package/dist/puck-editor/internal/api/media-params.js.map +1 -1
  124. package/dist/puck-editor/internal/api/media-upload.d.ts +5 -3
  125. package/dist/puck-editor/internal/api/media-upload.js +33 -22
  126. package/dist/puck-editor/internal/api/media-upload.js.map +1 -1
  127. package/dist/puck-editor/internal/api/message-codes.d.ts +2 -0
  128. package/dist/puck-editor/internal/api/message-codes.js +2 -0
  129. package/dist/puck-editor/internal/api/message-codes.js.map +1 -0
  130. package/dist/puck-editor/internal/api/space.d.ts +0 -1
  131. package/dist/puck-editor/internal/api/type-segment.d.ts +2 -0
  132. package/dist/puck-editor/internal/api/type-segment.js +9 -0
  133. package/dist/puck-editor/internal/api/type-segment.js.map +1 -0
  134. package/dist/puck-editor/internal/content-model.d.ts +31 -3
  135. package/dist/puck-editor/internal/content-model.js +76 -6
  136. package/dist/puck-editor/internal/content-model.js.map +1 -1
  137. package/dist/puck-editor/internal/dictionaries.d.ts +225 -0
  138. package/dist/puck-editor/internal/dictionaries.js +673 -0
  139. package/dist/puck-editor/internal/dictionaries.js.map +1 -0
  140. package/dist/puck-editor/internal/editor/allowed-types.d.ts +1 -2
  141. package/dist/puck-editor/internal/editor/allowed-types.js +2 -2
  142. package/dist/puck-editor/internal/editor/allowed-types.js.map +1 -1
  143. package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts +0 -1
  144. package/dist/puck-editor/internal/editor/canvas-add-picker.js +5 -5
  145. package/dist/puck-editor/internal/editor/canvas-add-picker.js.map +1 -1
  146. package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts +0 -1
  147. package/dist/puck-editor/internal/editor/canvas-empty-state.js +4 -4
  148. package/dist/puck-editor/internal/editor/canvas-empty-state.js.map +1 -1
  149. package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts +0 -1
  150. package/dist/puck-editor/internal/editor/canvas-quick-add.js +8 -8
  151. package/dist/puck-editor/internal/editor/canvas-quick-add.js.map +1 -1
  152. package/dist/puck-editor/internal/editor/canvas-scroll.d.ts +0 -1
  153. package/dist/puck-editor/internal/editor/component-icons.d.ts +1 -2
  154. package/dist/puck-editor/internal/editor/component-icons.js.map +1 -1
  155. package/dist/puck-editor/internal/editor/component-item.d.ts +0 -1
  156. package/dist/puck-editor/internal/editor/component-item.js +2 -2
  157. package/dist/puck-editor/internal/editor/component-item.js.map +1 -1
  158. package/dist/puck-editor/internal/editor/compose-save-issues.d.ts +15 -0
  159. package/dist/puck-editor/internal/editor/compose-save-issues.js +16 -0
  160. package/dist/puck-editor/internal/editor/compose-save-issues.js.map +1 -0
  161. package/dist/puck-editor/internal/editor/dirty-state.d.ts +3 -0
  162. package/dist/puck-editor/internal/editor/dirty-state.js +7 -0
  163. package/dist/puck-editor/internal/editor/dirty-state.js.map +1 -0
  164. package/dist/puck-editor/internal/editor/draft-restore-banner.d.ts +9 -0
  165. package/dist/puck-editor/internal/editor/draft-restore-banner.js +289 -0
  166. package/dist/puck-editor/internal/editor/draft-restore-banner.js.map +1 -0
  167. package/dist/puck-editor/internal/editor/draft-storage.d.ts +41 -0
  168. package/dist/puck-editor/internal/editor/draft-storage.js +129 -0
  169. package/dist/puck-editor/internal/editor/draft-storage.js.map +1 -0
  170. package/dist/puck-editor/internal/editor/editor-action-bar.d.ts +0 -1
  171. package/dist/puck-editor/internal/editor/editor-action-bar.js +4 -4
  172. package/dist/puck-editor/internal/editor/editor-action-bar.js.map +1 -1
  173. package/dist/puck-editor/internal/editor/editor-header-actions.d.ts +6 -4
  174. package/dist/puck-editor/internal/editor/editor-header-actions.js +119 -60
  175. package/dist/puck-editor/internal/editor/editor-header-actions.js.map +1 -1
  176. package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts +0 -1
  177. package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts +1 -2
  178. package/dist/puck-editor/internal/editor/grouped-drawer-panel.js +6 -6
  179. package/dist/puck-editor/internal/editor/grouped-drawer-panel.js.map +1 -1
  180. package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts +1 -2
  181. package/dist/puck-editor/internal/editor/grouped-entry-list.js +3 -3
  182. package/dist/puck-editor/internal/editor/grouped-entry-list.js.map +1 -1
  183. package/dist/puck-editor/internal/editor/header-save-button.d.ts +4 -4
  184. package/dist/puck-editor/internal/editor/header-save-button.js +66 -27
  185. package/dist/puck-editor/internal/editor/header-save-button.js.map +1 -1
  186. package/dist/puck-editor/internal/editor/leave-confirm-dialog.d.ts +5 -0
  187. package/dist/puck-editor/internal/editor/leave-confirm-dialog.js +140 -0
  188. package/dist/puck-editor/internal/editor/leave-confirm-dialog.js.map +1 -0
  189. package/dist/puck-editor/internal/editor/page-template-picker.d.ts +0 -1
  190. package/dist/puck-editor/internal/editor/page-template-picker.js +5 -5
  191. package/dist/puck-editor/internal/editor/page-template-picker.js.map +1 -1
  192. package/dist/puck-editor/internal/editor/picker-entry-item.d.ts +1 -2
  193. package/dist/puck-editor/internal/editor/picker-entry-item.js +4 -4
  194. package/dist/puck-editor/internal/editor/picker-entry-item.js.map +1 -1
  195. package/dist/puck-editor/internal/editor/picker-model.d.ts +14 -5
  196. package/dist/puck-editor/internal/editor/picker-model.js +157 -132
  197. package/dist/puck-editor/internal/editor/picker-model.js.map +1 -1
  198. package/dist/puck-editor/internal/editor/publish-puck-data.d.ts +18 -4
  199. package/dist/puck-editor/internal/editor/publish-puck-data.js +25 -4
  200. package/dist/puck-editor/internal/editor/publish-puck-data.js.map +1 -1
  201. package/dist/puck-editor/internal/editor/puck-editor.d.ts +6 -4
  202. package/dist/puck-editor/internal/editor/puck-editor.js +270 -209
  203. package/dist/puck-editor/internal/editor/puck-editor.js.map +1 -1
  204. package/dist/puck-editor/internal/editor/save-guard.d.ts +15 -0
  205. package/dist/puck-editor/internal/editor/save-guard.js +30 -0
  206. package/dist/puck-editor/internal/editor/save-guard.js.map +1 -0
  207. package/dist/puck-editor/internal/editor/save-page-context.d.ts +8 -0
  208. package/dist/puck-editor/internal/editor/save-page-context.js +34 -0
  209. package/dist/puck-editor/internal/editor/save-page-context.js.map +1 -0
  210. package/dist/puck-editor/internal/editor/section-template-modal.d.ts +0 -1
  211. package/dist/puck-editor/internal/editor/section-template-modal.js +2 -2
  212. package/dist/puck-editor/internal/editor/section-template-modal.js.map +1 -1
  213. package/dist/puck-editor/internal/editor/unsaved-changes-guard.d.ts +3 -0
  214. package/dist/puck-editor/internal/editor/unsaved-changes-guard.js +38 -0
  215. package/dist/puck-editor/internal/editor/unsaved-changes-guard.js.map +1 -0
  216. package/dist/puck-editor/internal/editor/use-dirty-baseline.d.ts +5 -0
  217. package/dist/puck-editor/internal/editor/use-dirty-baseline.js +72 -0
  218. package/dist/puck-editor/internal/editor/use-dirty-baseline.js.map +1 -0
  219. package/dist/puck-editor/internal/editor/use-draft-recovery.d.ts +16 -0
  220. package/dist/puck-editor/internal/editor/use-draft-recovery.js +194 -0
  221. package/dist/puck-editor/internal/editor/use-draft-recovery.js.map +1 -0
  222. package/dist/puck-editor/internal/editor/use-frame-zoom.d.ts +0 -1
  223. package/dist/puck-editor/internal/editor/use-is-dirty.d.ts +1 -0
  224. package/dist/puck-editor/internal/editor/use-is-dirty.js +32 -0
  225. package/dist/puck-editor/internal/editor/use-is-dirty.js.map +1 -0
  226. package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts +0 -1
  227. package/dist/puck-editor/internal/editor-config.d.ts +16 -3
  228. package/dist/puck-editor/internal/editor-config.js +8 -1
  229. package/dist/puck-editor/internal/editor-config.js.map +1 -1
  230. package/dist/puck-editor/internal/editor-query-client.d.ts +0 -1
  231. package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts +0 -1
  232. package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js +2 -2
  233. package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.js.map +1 -1
  234. package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts +0 -1
  235. package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js +1 -1
  236. package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.js.map +1 -1
  237. package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts +0 -1
  238. package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js +1 -1
  239. package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.js.map +1 -1
  240. package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts +0 -1
  241. package/dist/puck-editor/internal/fields/date-picker/date-picker.js +90 -73
  242. package/dist/puck-editor/internal/fields/date-picker/date-picker.js.map +1 -1
  243. package/dist/puck-editor/internal/fields/index.d.ts +10 -10
  244. package/dist/puck-editor/internal/fields/index.js +10 -9
  245. package/dist/puck-editor/internal/fields/index.js.map +1 -1
  246. package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts +0 -1
  247. package/dist/puck-editor/internal/fields/link-picker/anchor.js +1 -1
  248. package/dist/puck-editor/internal/fields/link-picker/anchor.js.map +1 -1
  249. package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts +1 -2
  250. package/dist/puck-editor/internal/fields/link-picker/create-link-field.js +1 -1
  251. package/dist/puck-editor/internal/fields/link-picker/create-link-field.js.map +1 -1
  252. package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts +0 -1
  253. package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts +0 -1
  254. package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js +208 -140
  255. package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js.map +1 -1
  256. package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts +1 -2
  257. package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js +6 -6
  258. package/dist/puck-editor/internal/fields/link-picker/link-picker-field.js.map +1 -1
  259. package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts +25 -5
  260. package/dist/puck-editor/internal/fields/link-picker/link-value.js +56 -6
  261. package/dist/puck-editor/internal/fields/link-picker/link-value.js.map +1 -1
  262. package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts +0 -1
  263. package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js +4 -4
  264. package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.js.map +1 -1
  265. package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts +0 -1
  266. package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts +0 -1
  267. package/dist/puck-editor/internal/fields/link-picker/segmented-control.js +3 -3
  268. package/dist/puck-editor/internal/fields/link-picker/segmented-control.js.map +1 -1
  269. package/dist/puck-editor/internal/fields/link-picker/types.d.ts +0 -1
  270. package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts +2 -3
  271. package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js +1 -1
  272. package/dist/puck-editor/internal/fields/media-array/create-media-array-field.js.map +1 -1
  273. package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts +2 -3
  274. package/dist/puck-editor/internal/fields/media-array/media-array-field.js +100 -88
  275. package/dist/puck-editor/internal/fields/media-array/media-array-field.js.map +1 -1
  276. package/dist/puck-editor/internal/fields/media-array/reorder.d.ts +0 -1
  277. package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts +2 -3
  278. package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js +1 -1
  279. package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.js.map +1 -1
  280. package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts +1 -2
  281. package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js +4 -4
  282. package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.js.map +1 -1
  283. package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts +0 -1
  284. package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts +0 -1
  285. package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts +0 -1
  286. package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js +19 -10
  287. package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js.map +1 -1
  288. package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts +7 -3
  289. package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js +29 -22
  290. package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js.map +1 -1
  291. package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts +1 -2
  292. package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js +281 -255
  293. package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.js.map +1 -1
  294. package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts +0 -1
  295. package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts +15 -2
  296. package/dist/puck-editor/internal/fields/media-selector/use-media-library.js +23 -18
  297. package/dist/puck-editor/internal/fields/media-selector/use-media-library.js.map +1 -1
  298. package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts +0 -1
  299. package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js +12 -6
  300. package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js.map +1 -1
  301. package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts +0 -1
  302. package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js +2 -2
  303. package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js.map +1 -1
  304. package/dist/puck-editor/internal/fields/required-field-label.d.ts +0 -1
  305. package/dist/puck-editor/internal/fields/required-field-label.js +1 -1
  306. package/dist/puck-editor/internal/fields/required-field-label.js.map +1 -1
  307. package/dist/puck-editor/internal/fields/required.d.ts +0 -1
  308. package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts +13 -3
  309. package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js +32 -22
  310. package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.js.map +1 -1
  311. package/dist/puck-editor/internal/i18n.d.ts +2 -181
  312. package/dist/puck-editor/internal/i18n.js +2 -358
  313. package/dist/puck-editor/internal/i18n.js.map +1 -1
  314. package/dist/puck-editor/internal/locale.d.ts +0 -1
  315. package/dist/puck-editor/internal/localize.d.ts +1 -2
  316. package/dist/puck-editor/internal/localize.js.map +1 -1
  317. package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts +3 -3
  318. package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js +41 -32
  319. package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js.map +1 -1
  320. package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts +0 -1
  321. package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js +2 -2
  322. package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.js.map +1 -1
  323. package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts +3 -3
  324. package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.js.map +1 -1
  325. package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts +0 -1
  326. package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js +1 -1
  327. package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.js.map +1 -1
  328. package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts +0 -1
  329. package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts +0 -1
  330. package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts +0 -1
  331. package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts +0 -1
  332. package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts +0 -1
  333. package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts +1 -2
  334. package/dist/puck-editor/internal/plugins/agent-plugin/index.js +1 -1
  335. package/dist/puck-editor/internal/plugins/agent-plugin/index.js.map +1 -1
  336. package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts +2 -2
  337. package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js +4 -3
  338. package/dist/puck-editor/internal/plugins/agent-plugin/list-media.js.map +1 -1
  339. package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts +5 -6
  340. package/dist/puck-editor/internal/plugins/agent-plugin/templates.js +2 -2
  341. package/dist/puck-editor/internal/plugins/agent-plugin/templates.js.map +1 -1
  342. package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts +1 -2
  343. package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts +0 -1
  344. package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js +2 -2
  345. package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.js.map +1 -1
  346. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts +0 -1
  347. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js +3 -3
  348. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.js.map +1 -1
  349. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts +0 -1
  350. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js +1 -1
  351. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.js.map +1 -1
  352. package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts +1 -2
  353. package/dist/puck-editor/internal/plugins/blocks-plugin/index.js +1 -1
  354. package/dist/puck-editor/internal/plugins/blocks-plugin/index.js.map +1 -1
  355. package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts +1 -2
  356. package/dist/puck-editor/internal/plugins/outline-plugin/index.js +1 -1
  357. package/dist/puck-editor/internal/plugins/outline-plugin/index.js.map +1 -1
  358. package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts +0 -1
  359. package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js +8 -8
  360. package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.js.map +1 -1
  361. package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts +0 -1
  362. package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js +1 -1
  363. package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.js.map +1 -1
  364. package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts +0 -1
  365. package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts +1 -2
  366. package/dist/puck-editor/internal/plugins/sections-plugin/index.js +1 -1
  367. package/dist/puck-editor/internal/plugins/sections-plugin/index.js.map +1 -1
  368. package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts +0 -1
  369. package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js +5 -5
  370. package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.js.map +1 -1
  371. package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts +0 -1
  372. package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js +1 -1
  373. package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.js.map +1 -1
  374. package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts +0 -1
  375. package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js +2 -2
  376. package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.js.map +1 -1
  377. package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts +0 -1
  378. package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js +1 -1
  379. package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.js.map +1 -1
  380. package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts +1 -2
  381. package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js +3 -3
  382. package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.js.map +1 -1
  383. package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts +1 -2
  384. package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js +224 -219
  385. package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.js.map +1 -1
  386. package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts +5 -6
  387. package/dist/puck-editor/internal/plugins/templates-plugin/index.js +5 -5
  388. package/dist/puck-editor/internal/plugins/templates-plugin/index.js.map +1 -1
  389. package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts +0 -1
  390. package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js +3 -3
  391. package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.js.map +1 -1
  392. package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts +1 -2
  393. package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js +17 -16
  394. package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js.map +1 -1
  395. package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts +1 -2
  396. package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js +1 -1
  397. package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.js.map +1 -1
  398. package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts +0 -1
  399. package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js +171 -161
  400. package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.js.map +1 -1
  401. package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts +0 -1
  402. package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js +1 -1
  403. package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.js.map +1 -1
  404. package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts +2 -3
  405. package/dist/puck-editor/internal/plugins/templates-plugin/templates.js +9 -2
  406. package/dist/puck-editor/internal/plugins/templates-plugin/templates.js.map +1 -1
  407. package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts +0 -1
  408. package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js +22 -20
  409. package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js.map +1 -1
  410. package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts +14 -5
  411. package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js +23 -15
  412. package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js.map +1 -1
  413. package/dist/puck-editor/internal/puck-augmentation.d.ts +0 -1
  414. package/dist/puck-editor/internal/puck-editor-provider.d.ts +0 -1
  415. package/dist/puck-editor/internal/puck-node.d.ts +0 -1
  416. package/dist/puck-editor/internal/puck-props.d.ts +13 -0
  417. package/dist/puck-editor/internal/puck-props.js +2 -0
  418. package/dist/puck-editor/internal/puck-props.js.map +1 -0
  419. package/dist/puck-editor/internal/puck-wrapper.d.ts +25 -6
  420. package/dist/puck-editor/internal/puck-wrapper.js +124 -115
  421. package/dist/puck-editor/internal/puck-wrapper.js.map +1 -1
  422. package/dist/puck-editor/internal/render/cropped-image.d.ts +1 -2
  423. package/dist/puck-editor/internal/render/cropped-image.js.map +1 -1
  424. package/dist/puck-editor/internal/smart-actions/action-selection.d.ts +8 -0
  425. package/dist/puck-editor/internal/smart-actions/action-selection.js +10 -0
  426. package/dist/puck-editor/internal/smart-actions/action-selection.js.map +1 -0
  427. package/dist/puck-editor/internal/smart-actions/index.d.ts +10 -4
  428. package/dist/puck-editor/internal/smart-actions/index.js +27 -12
  429. package/dist/puck-editor/internal/smart-actions/index.js.map +1 -1
  430. package/dist/puck-editor/internal/smart-actions/new-page.d.ts +3 -2
  431. package/dist/puck-editor/internal/smart-actions/new-page.js +6 -6
  432. package/dist/puck-editor/internal/smart-actions/new-page.js.map +1 -1
  433. package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts +3 -2
  434. package/dist/puck-editor/internal/smart-actions/open-puck-editor.js +49 -37
  435. package/dist/puck-editor/internal/smart-actions/open-puck-editor.js.map +1 -1
  436. package/dist/puck-editor/internal/ui/calendar.d.ts +0 -1
  437. package/dist/puck-editor/internal/ui/calendar.js +1 -1
  438. package/dist/puck-editor/internal/ui/calendar.js.map +1 -1
  439. package/dist/puck-editor/internal/ui/component-list-accordion.d.ts +0 -1
  440. package/dist/puck-editor/internal/ui/dialog.d.ts +0 -1
  441. package/dist/puck-editor/internal/ui/dialog.js +33 -20
  442. package/dist/puck-editor/internal/ui/dialog.js.map +1 -1
  443. package/dist/puck-editor/internal/ui/drawer-item-content.d.ts +0 -1
  444. package/dist/puck-editor/internal/ui/icon-button.d.ts +0 -1
  445. package/dist/puck-editor/internal/ui/icon-button.js +1 -1
  446. package/dist/puck-editor/internal/ui/icon-button.js.map +1 -1
  447. package/dist/puck-editor/internal/ui/load-error-notice.d.ts +6 -0
  448. package/dist/puck-editor/internal/ui/load-error-notice.js +81 -0
  449. package/dist/puck-editor/internal/ui/load-error-notice.js.map +1 -0
  450. package/dist/puck-editor/internal/ui/popover.d.ts +0 -1
  451. package/dist/puck-editor/internal/ui/popover.js +1 -1
  452. package/dist/puck-editor/internal/ui/popover.js.map +1 -1
  453. package/dist/puck-editor/internal/ui/required-mark.d.ts +0 -1
  454. package/dist/puck-editor/internal/ui/search-control.d.ts +0 -1
  455. package/dist/puck-editor/internal/ui/search-control.js +3 -3
  456. package/dist/puck-editor/internal/ui/search-control.js.map +1 -1
  457. package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts +0 -1
  458. package/dist/puck-editor/internal/use-puck-overlay.d.ts +1 -2
  459. package/dist/puck-editor/internal/use-puck-overlay.js +6 -5
  460. package/dist/puck-editor/internal/use-puck-overlay.js.map +1 -1
  461. package/dist/puck-editor/internal/utils.d.ts +0 -1
  462. package/dist/puck-editor/render.d.ts +2 -3
  463. package/dist/puck-editor/render.js +1 -1
  464. package/dist/puck-editor/render.js.map +1 -1
  465. package/dist/puck-editor/server.d.ts +3 -4
  466. package/dist/puck-editor/server.js +1 -1
  467. package/dist/puck-editor/server.js.map +1 -1
  468. package/dist/puck-editor/smart-actions.d.ts +1 -2
  469. package/dist/puck-editor/smart-actions.js +1 -1
  470. package/dist/puck-editor/smart-actions.js.map +1 -1
  471. package/dist/shared/cn.d.ts +0 -1
  472. package/dist/shared/i18n.d.ts +0 -1
  473. package/dist/shared/revalidate-path.d.ts +1 -0
  474. package/dist/shared/revalidate-path.js +2 -0
  475. package/dist/shared/revalidate-path.js.map +1 -0
  476. package/dist/shared/toolbar-action.d.ts +0 -1
  477. package/dist/shared/use-is-hydrated.d.ts +0 -1
  478. package/dist/shared/use-is-in-iframe.d.ts +0 -1
  479. package/dist/shared/use-is-in-iframe.js +1 -1
  480. package/dist/shared/use-is-in-iframe.js.map +1 -1
  481. package/dist/smart-actions/internal/assemble-smart-actions.d.ts +14 -0
  482. package/dist/smart-actions/internal/assemble-smart-actions.js +11 -0
  483. package/dist/smart-actions/internal/assemble-smart-actions.js.map +1 -0
  484. package/dist/smart-actions/internal/backend-edit-link.d.ts +6 -0
  485. package/dist/smart-actions/internal/backend-edit-link.js +60 -0
  486. package/dist/smart-actions/internal/backend-edit-link.js.map +1 -0
  487. package/dist/smart-actions/internal/get-smart-actions-context.d.ts +1 -2
  488. package/dist/smart-actions/internal/get-smart-actions-context.js +2 -2
  489. package/dist/smart-actions/internal/get-smart-actions-context.js.map +1 -1
  490. package/dist/smart-actions/internal/i18n.d.ts +1 -2
  491. package/dist/smart-actions/internal/i18n.js +16 -2
  492. package/dist/smart-actions/internal/i18n.js.map +1 -1
  493. package/dist/smart-actions/internal/logout-form.d.ts +2 -2
  494. package/dist/smart-actions/internal/logout-form.js +47 -40
  495. package/dist/smart-actions/internal/logout-form.js.map +1 -1
  496. package/dist/smart-actions/internal/refresh-page.d.ts +3 -2
  497. package/dist/smart-actions/internal/refresh-page.js +60 -53
  498. package/dist/smart-actions/internal/refresh-page.js.map +1 -1
  499. package/dist/smart-actions/internal/smart-actions-button.d.ts +22 -4
  500. package/dist/smart-actions/internal/smart-actions-button.js +36 -13
  501. package/dist/smart-actions/internal/smart-actions-button.js.map +1 -1
  502. package/dist/smart-actions/internal/smart-actions-config.d.ts +12 -4
  503. package/dist/smart-actions/internal/smart-actions-config.js +36 -80
  504. package/dist/smart-actions/internal/smart-actions-config.js.map +1 -1
  505. package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts +5 -11
  506. package/dist/smart-actions/internal/smart-actions-toolbar-client.js +13 -53
  507. package/dist/smart-actions/internal/smart-actions-toolbar-client.js.map +1 -1
  508. package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts +1 -2
  509. package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js +4 -4
  510. package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.js.map +1 -1
  511. package/dist/smart-actions/internal/toolbar/storage.d.ts +1 -2
  512. package/dist/smart-actions/internal/toolbar/storage.js.map +1 -1
  513. package/dist/smart-actions/internal/toolbar/types.d.ts +1 -2
  514. package/dist/smart-actions/internal/toolbar/types.js.map +1 -1
  515. package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts +1 -2
  516. package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js +1 -1
  517. package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.js.map +1 -1
  518. package/dist/smart-actions/internal/ui/tooltip.d.ts +0 -1
  519. package/dist/smart-actions/internal/ui/tooltip.js +1 -1
  520. package/dist/smart-actions/internal/ui/tooltip.js.map +1 -1
  521. package/dist/smart-actions/internal/user-profile.d.ts +0 -1
  522. package/dist/smart-actions/internal/user-profile.js +71 -24
  523. package/dist/smart-actions/internal/user-profile.js.map +1 -1
  524. package/dist/smart-actions/server.d.ts +5 -4
  525. package/dist/smart-actions/server.js +2 -2
  526. package/dist/smart-actions/server.js.map +1 -1
  527. package/dist/theme.css +1 -1
  528. package/dist/visual-editor/index.d.ts +3 -4
  529. package/dist/visual-editor/index.js +3 -3
  530. package/dist/visual-editor/index.js.map +1 -1
  531. package/dist/visual-editor/internal/bridge/connector.d.ts +4 -3
  532. package/dist/visual-editor/internal/bridge/connector.js +22 -21
  533. package/dist/visual-editor/internal/bridge/connector.js.map +1 -1
  534. package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts +0 -1
  535. package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts +5 -3
  536. package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js +7 -8
  537. package/dist/visual-editor/internal/bridge/editor-auth-gate-server.js.map +1 -1
  538. package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts +3 -3
  539. package/dist/visual-editor/internal/bridge/editor-auth-gate.js +4 -2
  540. package/dist/visual-editor/internal/bridge/editor-auth-gate.js.map +1 -1
  541. package/dist/visual-editor/internal/i18n.d.ts +3 -2
  542. package/dist/visual-editor/internal/i18n.js +32 -4
  543. package/dist/visual-editor/internal/i18n.js.map +1 -1
  544. package/dist/visual-editor/internal/overlays/drupal-origin.d.ts +1 -7
  545. package/dist/visual-editor/internal/overlays/drupal-origin.js +16 -3
  546. package/dist/visual-editor/internal/overlays/drupal-origin.js.map +1 -1
  547. package/dist/visual-editor/internal/overlays/edit-button.d.ts +5 -4
  548. package/dist/visual-editor/internal/overlays/edit-button.js +46 -44
  549. package/dist/visual-editor/internal/overlays/edit-button.js.map +1 -1
  550. package/dist/visual-editor/internal/overlays/edit-icon.d.ts +0 -1
  551. package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts +11 -2
  552. package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js +18 -7
  553. package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.js.map +1 -1
  554. package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts +0 -1
  555. package/dist/visual-editor/internal/overlays/iframe-wrapper.js +1 -1
  556. package/dist/visual-editor/internal/overlays/iframe-wrapper.js.map +1 -1
  557. package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts +12 -3
  558. package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js +14 -5
  559. package/dist/visual-editor/internal/overlays/menu/menu-wrapper.js.map +1 -1
  560. package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts +4 -2
  561. package/dist/visual-editor/internal/overlays/node/node-metadata.js +10 -4
  562. package/dist/visual-editor/internal/overlays/node/node-metadata.js.map +1 -1
  563. package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts +5 -3
  564. package/dist/visual-editor/internal/overlays/node/node-wrapper.js +4 -2
  565. package/dist/visual-editor/internal/overlays/node/node-wrapper.js.map +1 -1
  566. package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts +11 -2
  567. package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js +18 -7
  568. package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.js.map +1 -1
  569. package/dist/visual-editor/internal/revalidate-route.d.ts +0 -1
  570. package/dist/visual-editor/internal/revalidate-route.js +1 -1
  571. package/dist/visual-editor/internal/revalidate-route.js.map +1 -1
  572. package/dist/visual-editor/server.d.ts +6 -7
  573. package/dist/visual-editor/server.js +6 -6
  574. package/dist/visual-editor/server.js.map +1 -1
  575. package/package.json +19 -3
  576. package/dist/auth/index.d.ts.map +0 -1
  577. package/dist/auth/internal/config.d.ts.map +0 -1
  578. package/dist/auth/internal/draft-mode.d.ts.map +0 -1
  579. package/dist/auth/internal/editor-locale.d.ts.map +0 -1
  580. package/dist/auth/internal/handoff.d.ts.map +0 -1
  581. package/dist/auth/internal/has-session.d.ts.map +0 -1
  582. package/dist/auth/internal/logout.d.ts.map +0 -1
  583. package/dist/auth/internal/next-cookie-storage.d.ts.map +0 -1
  584. package/dist/auth/internal/nodehive-client.d.ts.map +0 -1
  585. package/dist/auth/internal/oauth-config.d.ts.map +0 -1
  586. package/dist/auth/internal/proxy-helpers.d.ts.map +0 -1
  587. package/dist/auth/internal/refresh.d.ts.map +0 -1
  588. package/dist/auth/internal/require-auth.d.ts.map +0 -1
  589. package/dist/auth/internal/return-to.d.ts.map +0 -1
  590. package/dist/auth/internal/routes/callback.d.ts.map +0 -1
  591. package/dist/auth/internal/routes/chips-exchange.d.ts.map +0 -1
  592. package/dist/auth/internal/routes/draft.d.ts.map +0 -1
  593. package/dist/auth/internal/routes/index.d.ts.map +0 -1
  594. package/dist/auth/internal/routes/login.d.ts.map +0 -1
  595. package/dist/auth/internal/routes/popup-done.d.ts.map +0 -1
  596. package/dist/auth/internal/routes/refresh.d.ts.map +0 -1
  597. package/dist/auth/internal/same-origin.d.ts.map +0 -1
  598. package/dist/auth/internal/session-gates.d.ts.map +0 -1
  599. package/dist/auth/internal/update-session.d.ts.map +0 -1
  600. package/dist/auth/internal/use-editor-login.d.ts.map +0 -1
  601. package/dist/auth/proxy.d.ts.map +0 -1
  602. package/dist/auth/react.d.ts.map +0 -1
  603. package/dist/auth/routes.d.ts.map +0 -1
  604. package/dist/auth/server.d.ts.map +0 -1
  605. package/dist/puck-editor/fields.d.ts.map +0 -1
  606. package/dist/puck-editor/index.d.ts.map +0 -1
  607. package/dist/puck-editor/internal/api/client.d.ts.map +0 -1
  608. package/dist/puck-editor/internal/api/config.d.ts.map +0 -1
  609. package/dist/puck-editor/internal/api/create-puck-api.d.ts.map +0 -1
  610. package/dist/puck-editor/internal/api/handlers/create-page.d.ts.map +0 -1
  611. package/dist/puck-editor/internal/api/handlers/entities.d.ts.map +0 -1
  612. package/dist/puck-editor/internal/api/handlers/publish.d.ts.map +0 -1
  613. package/dist/puck-editor/internal/api/handlers/template.d.ts.map +0 -1
  614. package/dist/puck-editor/internal/api/handlers/upload.d.ts.map +0 -1
  615. package/dist/puck-editor/internal/api/media-params.d.ts.map +0 -1
  616. package/dist/puck-editor/internal/api/media-upload.d.ts.map +0 -1
  617. package/dist/puck-editor/internal/api/space.d.ts.map +0 -1
  618. package/dist/puck-editor/internal/content-model.d.ts.map +0 -1
  619. package/dist/puck-editor/internal/editor/allowed-types.d.ts.map +0 -1
  620. package/dist/puck-editor/internal/editor/canvas-add-picker.d.ts.map +0 -1
  621. package/dist/puck-editor/internal/editor/canvas-empty-state.d.ts.map +0 -1
  622. package/dist/puck-editor/internal/editor/canvas-quick-add.d.ts.map +0 -1
  623. package/dist/puck-editor/internal/editor/canvas-scroll.d.ts.map +0 -1
  624. package/dist/puck-editor/internal/editor/component-icons.d.ts.map +0 -1
  625. package/dist/puck-editor/internal/editor/component-item.d.ts.map +0 -1
  626. package/dist/puck-editor/internal/editor/editor-action-bar.d.ts.map +0 -1
  627. package/dist/puck-editor/internal/editor/editor-header-actions.d.ts.map +0 -1
  628. package/dist/puck-editor/internal/editor/find-missing-required-fields.d.ts.map +0 -1
  629. package/dist/puck-editor/internal/editor/grouped-drawer-panel.d.ts.map +0 -1
  630. package/dist/puck-editor/internal/editor/grouped-entry-list.d.ts.map +0 -1
  631. package/dist/puck-editor/internal/editor/header-save-button.d.ts.map +0 -1
  632. package/dist/puck-editor/internal/editor/page-template-picker.d.ts.map +0 -1
  633. package/dist/puck-editor/internal/editor/picker-entry-item.d.ts.map +0 -1
  634. package/dist/puck-editor/internal/editor/picker-model.d.ts.map +0 -1
  635. package/dist/puck-editor/internal/editor/publish-puck-data.d.ts.map +0 -1
  636. package/dist/puck-editor/internal/editor/puck-editor.d.ts.map +0 -1
  637. package/dist/puck-editor/internal/editor/section-template-modal.d.ts.map +0 -1
  638. package/dist/puck-editor/internal/editor/use-frame-zoom.d.ts.map +0 -1
  639. package/dist/puck-editor/internal/editor/use-scroll-lock-outside.d.ts.map +0 -1
  640. package/dist/puck-editor/internal/editor-config.d.ts.map +0 -1
  641. package/dist/puck-editor/internal/editor-query-client.d.ts.map +0 -1
  642. package/dist/puck-editor/internal/fields/checkbox-group/checkbox-group-field.d.ts.map +0 -1
  643. package/dist/puck-editor/internal/fields/checkbox-group/create-checkbox-group-field.d.ts.map +0 -1
  644. package/dist/puck-editor/internal/fields/date-picker/create-date-picker-field.d.ts.map +0 -1
  645. package/dist/puck-editor/internal/fields/date-picker/date-picker.d.ts.map +0 -1
  646. package/dist/puck-editor/internal/fields/index.d.ts.map +0 -1
  647. package/dist/puck-editor/internal/fields/link-picker/anchor.d.ts.map +0 -1
  648. package/dist/puck-editor/internal/fields/link-picker/create-link-field.d.ts.map +0 -1
  649. package/dist/puck-editor/internal/fields/link-picker/humanize.d.ts.map +0 -1
  650. package/dist/puck-editor/internal/fields/link-picker/link-picker-control.d.ts.map +0 -1
  651. package/dist/puck-editor/internal/fields/link-picker/link-picker-field.d.ts.map +0 -1
  652. package/dist/puck-editor/internal/fields/link-picker/link-value.d.ts.map +0 -1
  653. package/dist/puck-editor/internal/fields/link-picker/rich-text-link-button.d.ts.map +0 -1
  654. package/dist/puck-editor/internal/fields/link-picker/richtext-extensions.d.ts.map +0 -1
  655. package/dist/puck-editor/internal/fields/link-picker/segmented-control.d.ts.map +0 -1
  656. package/dist/puck-editor/internal/fields/link-picker/types.d.ts.map +0 -1
  657. package/dist/puck-editor/internal/fields/media-array/create-media-array-field.d.ts.map +0 -1
  658. package/dist/puck-editor/internal/fields/media-array/media-array-field.d.ts.map +0 -1
  659. package/dist/puck-editor/internal/fields/media-array/reorder.d.ts.map +0 -1
  660. package/dist/puck-editor/internal/fields/media-selector/create-media-selector-field.d.ts.map +0 -1
  661. package/dist/puck-editor/internal/fields/media-selector/crop-editor-dialog.d.ts.map +0 -1
  662. package/dist/puck-editor/internal/fields/media-selector/crop-types.d.ts.map +0 -1
  663. package/dist/puck-editor/internal/fields/media-selector/extract-fields.d.ts.map +0 -1
  664. package/dist/puck-editor/internal/fields/media-selector/image-upload-form.d.ts.map +0 -1
  665. package/dist/puck-editor/internal/fields/media-selector/media-selector-field.d.ts.map +0 -1
  666. package/dist/puck-editor/internal/fields/media-selector/media-selector-modal.d.ts.map +0 -1
  667. package/dist/puck-editor/internal/fields/media-selector/use-debounced-value.d.ts.map +0 -1
  668. package/dist/puck-editor/internal/fields/media-selector/use-media-library.d.ts.map +0 -1
  669. package/dist/puck-editor/internal/fields/media-selector/video-upload-form.d.ts.map +0 -1
  670. package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts.map +0 -1
  671. package/dist/puck-editor/internal/fields/required-field-label.d.ts.map +0 -1
  672. package/dist/puck-editor/internal/fields/required.d.ts.map +0 -1
  673. package/dist/puck-editor/internal/fields/rich-text/create-rich-text-field.d.ts.map +0 -1
  674. package/dist/puck-editor/internal/i18n.d.ts.map +0 -1
  675. package/dist/puck-editor/internal/locale.d.ts.map +0 -1
  676. package/dist/puck-editor/internal/localize.d.ts.map +0 -1
  677. package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts.map +0 -1
  678. package/dist/puck-editor/internal/plugins/agent-plugin/agent-info-panel.d.ts.map +0 -1
  679. package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts.map +0 -1
  680. package/dist/puck-editor/internal/plugins/agent-plugin/apply-patch-to-puck.d.ts.map +0 -1
  681. package/dist/puck-editor/internal/plugins/agent-plugin/catalog.d.ts.map +0 -1
  682. package/dist/puck-editor/internal/plugins/agent-plugin/constants.d.ts.map +0 -1
  683. package/dist/puck-editor/internal/plugins/agent-plugin/create-page.d.ts.map +0 -1
  684. package/dist/puck-editor/internal/plugins/agent-plugin/find-component-location.d.ts.map +0 -1
  685. package/dist/puck-editor/internal/plugins/agent-plugin/help.d.ts.map +0 -1
  686. package/dist/puck-editor/internal/plugins/agent-plugin/index.d.ts.map +0 -1
  687. package/dist/puck-editor/internal/plugins/agent-plugin/list-media.d.ts.map +0 -1
  688. package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts.map +0 -1
  689. package/dist/puck-editor/internal/plugins/agent-plugin/upload-media.d.ts.map +0 -1
  690. package/dist/puck-editor/internal/plugins/agent-plugin/use-agent-handle.d.ts.map +0 -1
  691. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-panel.d.ts.map +0 -1
  692. package/dist/puck-editor/internal/plugins/blocks-plugin/blocks-plugin.d.ts.map +0 -1
  693. package/dist/puck-editor/internal/plugins/blocks-plugin/index.d.ts.map +0 -1
  694. package/dist/puck-editor/internal/plugins/outline-plugin/index.d.ts.map +0 -1
  695. package/dist/puck-editor/internal/plugins/outline-plugin/outline-panel.d.ts.map +0 -1
  696. package/dist/puck-editor/internal/plugins/outline-plugin/outline-plugin.d.ts.map +0 -1
  697. package/dist/puck-editor/internal/plugins/outline-plugin/outline-tree.d.ts.map +0 -1
  698. package/dist/puck-editor/internal/plugins/sections-plugin/index.d.ts.map +0 -1
  699. package/dist/puck-editor/internal/plugins/sections-plugin/sections-panel.d.ts.map +0 -1
  700. package/dist/puck-editor/internal/plugins/sections-plugin/sections-plugin.d.ts.map +0 -1
  701. package/dist/puck-editor/internal/plugins/templates-plugin/ai-options-fields.d.ts.map +0 -1
  702. package/dist/puck-editor/internal/plugins/templates-plugin/apply-vehicle-slot-constraints.d.ts.map +0 -1
  703. package/dist/puck-editor/internal/plugins/templates-plugin/component-template-modal.d.ts.map +0 -1
  704. package/dist/puck-editor/internal/plugins/templates-plugin/custom-template-list.d.ts.map +0 -1
  705. package/dist/puck-editor/internal/plugins/templates-plugin/index.d.ts.map +0 -1
  706. package/dist/puck-editor/internal/plugins/templates-plugin/root-drop-zone.d.ts.map +0 -1
  707. package/dist/puck-editor/internal/plugins/templates-plugin/template-form.d.ts.map +0 -1
  708. package/dist/puck-editor/internal/plugins/templates-plugin/template-vehicles.d.ts.map +0 -1
  709. package/dist/puck-editor/internal/plugins/templates-plugin/templates-panel.d.ts.map +0 -1
  710. package/dist/puck-editor/internal/plugins/templates-plugin/templates-plugin.d.ts.map +0 -1
  711. package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts.map +0 -1
  712. package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.d.ts.map +0 -1
  713. package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.d.ts.map +0 -1
  714. package/dist/puck-editor/internal/puck-augmentation.d.ts.map +0 -1
  715. package/dist/puck-editor/internal/puck-editor-provider.d.ts.map +0 -1
  716. package/dist/puck-editor/internal/puck-node.d.ts.map +0 -1
  717. package/dist/puck-editor/internal/puck-wrapper.d.ts.map +0 -1
  718. package/dist/puck-editor/internal/render/cropped-image.d.ts.map +0 -1
  719. package/dist/puck-editor/internal/smart-actions/index.d.ts.map +0 -1
  720. package/dist/puck-editor/internal/smart-actions/new-page.d.ts.map +0 -1
  721. package/dist/puck-editor/internal/smart-actions/open-puck-editor.d.ts.map +0 -1
  722. package/dist/puck-editor/internal/ui/calendar.d.ts.map +0 -1
  723. package/dist/puck-editor/internal/ui/component-list-accordion.d.ts.map +0 -1
  724. package/dist/puck-editor/internal/ui/dialog.d.ts.map +0 -1
  725. package/dist/puck-editor/internal/ui/drawer-item-content.d.ts.map +0 -1
  726. package/dist/puck-editor/internal/ui/icon-button.d.ts.map +0 -1
  727. package/dist/puck-editor/internal/ui/popover.d.ts.map +0 -1
  728. package/dist/puck-editor/internal/ui/required-mark.d.ts.map +0 -1
  729. package/dist/puck-editor/internal/ui/search-control.d.ts.map +0 -1
  730. package/dist/puck-editor/internal/ui/use-panel-search-focus.d.ts.map +0 -1
  731. package/dist/puck-editor/internal/use-puck-overlay.d.ts.map +0 -1
  732. package/dist/puck-editor/internal/utils.d.ts.map +0 -1
  733. package/dist/puck-editor/render.d.ts.map +0 -1
  734. package/dist/puck-editor/server.d.ts.map +0 -1
  735. package/dist/puck-editor/smart-actions.d.ts.map +0 -1
  736. package/dist/shared/cn.d.ts.map +0 -1
  737. package/dist/shared/i18n.d.ts.map +0 -1
  738. package/dist/shared/toolbar-action.d.ts.map +0 -1
  739. package/dist/shared/use-is-hydrated.d.ts.map +0 -1
  740. package/dist/shared/use-is-in-iframe.d.ts.map +0 -1
  741. package/dist/smart-actions/internal/get-smart-actions-context.d.ts.map +0 -1
  742. package/dist/smart-actions/internal/i18n.d.ts.map +0 -1
  743. package/dist/smart-actions/internal/logout-form.d.ts.map +0 -1
  744. package/dist/smart-actions/internal/refresh-page.d.ts.map +0 -1
  745. package/dist/smart-actions/internal/smart-actions-button.d.ts.map +0 -1
  746. package/dist/smart-actions/internal/smart-actions-config.d.ts.map +0 -1
  747. package/dist/smart-actions/internal/smart-actions-toolbar-client.d.ts.map +0 -1
  748. package/dist/smart-actions/internal/toolbar/smart-actions-toolbar.d.ts.map +0 -1
  749. package/dist/smart-actions/internal/toolbar/storage.d.ts.map +0 -1
  750. package/dist/smart-actions/internal/toolbar/types.d.ts.map +0 -1
  751. package/dist/smart-actions/internal/toolbar/use-smart-actions-toolbar-mode.d.ts.map +0 -1
  752. package/dist/smart-actions/internal/ui/tooltip.d.ts.map +0 -1
  753. package/dist/smart-actions/internal/user-profile.d.ts.map +0 -1
  754. package/dist/smart-actions/server.d.ts.map +0 -1
  755. package/dist/visual-editor/index.d.ts.map +0 -1
  756. package/dist/visual-editor/internal/bridge/connector.d.ts.map +0 -1
  757. package/dist/visual-editor/internal/bridge/draft-mode-self-heal.d.ts.map +0 -1
  758. package/dist/visual-editor/internal/bridge/editor-auth-gate-server.d.ts.map +0 -1
  759. package/dist/visual-editor/internal/bridge/editor-auth-gate.d.ts.map +0 -1
  760. package/dist/visual-editor/internal/i18n.d.ts.map +0 -1
  761. package/dist/visual-editor/internal/overlays/drupal-origin.d.ts.map +0 -1
  762. package/dist/visual-editor/internal/overlays/edit-button.d.ts.map +0 -1
  763. package/dist/visual-editor/internal/overlays/edit-icon.d.ts.map +0 -1
  764. package/dist/visual-editor/internal/overlays/fragment/fragment-wrapper.d.ts.map +0 -1
  765. package/dist/visual-editor/internal/overlays/iframe-wrapper.d.ts.map +0 -1
  766. package/dist/visual-editor/internal/overlays/menu/menu-wrapper.d.ts.map +0 -1
  767. package/dist/visual-editor/internal/overlays/node/node-metadata.d.ts.map +0 -1
  768. package/dist/visual-editor/internal/overlays/node/node-wrapper.d.ts.map +0 -1
  769. package/dist/visual-editor/internal/overlays/paragraph/paragraph-wrapper.d.ts.map +0 -1
  770. package/dist/visual-editor/internal/revalidate-route.d.ts.map +0 -1
  771. package/dist/visual-editor/server.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"editor-auth-gate.js","names":["c","_c","useEffect","Eye","toast","consumeJustLoggedIn","useEditorLogin","cn","jsx","_jsx","jsxs","_jsxs","EditorAuthGate","t0","$","authenticated","labels","t","inIframe","phase","error","signIn","activate","t1","t2","loggedIn","success","isLogin","buttonLabel","loginButton","working","activateButton","t3","Symbol","for","className","t4","loginTitle","activateTitle","t5","id","children","t6","t7","t8","loginBody","activateBody","t9","t10","t11","t12","t13","type","onClick","disabled","t14","role"],"sources":["../../../../src/visual-editor/internal/bridge/editor-auth-gate.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect } from 'react';\nimport { Eye } from 'lucide-react';\nimport { toast } from 'sonner';\n\nimport { consumeJustLoggedIn, useEditorLogin } from '../../../auth/react';\nimport { EditorGateLabels } from '../i18n';\n\nimport '../../../theme.css';\n\nimport { cn } from '../../../shared/cn';\n\ninterface EditorAuthGateProps {\n /** Did the auth cookie reach this SSR request (i.e. is the editor logged in)? */\n authenticated: boolean;\n labels: EditorGateLabels;\n}\n\n/**\n * Login banner for the cross-site editor iframe — UI only; the CHIPS /\n * storage-access flow lives in useEditorLogin. Rendered when embedded and not\n * yet authenticated here.\n */\nexport default function EditorAuthGate({\n authenticated,\n labels,\n}: EditorAuthGateProps) {\n const t = labels;\n const { inIframe, phase, error, signIn, activate } =\n useEditorLogin(authenticated);\n\n useEffect(() => {\n if (consumeJustLoggedIn() && authenticated) toast.success(t.loggedIn);\n }, [authenticated, t.loggedIn]);\n\n if (inIframe !== true || authenticated) return null;\n\n const isLogin = phase === 'login';\n const buttonLabel = isLogin\n ? t.loginButton\n : phase === 'working'\n ? t.working\n : t.activateButton;\n\n return (\n <div\n role=\"region\"\n aria-labelledby=\"nh-gate-title\"\n className=\"nh-root nh:flex nh:items-center nh:justify-between nh:gap-4 nh:bg-(--nh-primary) nh:px-4 nh:py-3 nh:text-(--nh-primary-fg) nh:shadow-md\"\n >\n <div className=\"nh:flex nh:min-w-0 nh:items-center nh:gap-3\">\n <Eye className=\"nh:h-6 nh:w-6 nh:shrink-0\" />\n <div className=\"nh:min-w-0\">\n <p id=\"nh-gate-title\" className=\"nh:leading-tight nh:font-semibold\">\n {isLogin ? t.loginTitle : t.activateTitle}\n </p>\n <p\n className={cn(\n 'nh:truncate nh:text-sm nh:leading-tight',\n error ? 'nh:text-amber-200' : 'nh:text-(--nh-toolbar-fg)/85'\n )}\n >\n {error ? t.error : isLogin ? t.loginBody : t.activateBody}\n </p>\n </div>\n </div>\n\n <button\n type=\"button\"\n onClick={isLogin ? signIn : activate}\n disabled={phase === 'working'}\n className=\"nh:shrink-0 nh:cursor-pointer nh:rounded-lg nh:bg-(--nh-bg) nh:px-5 nh:py-2 nh:text-sm nh:font-semibold nh:text-(--nh-primary) nh:shadow-sm nh:transition nh:hover:bg-(--nh-bg)/90 nh:disabled:cursor-default nh:disabled:opacity-60\"\n >\n {buttonLabel}\n </button>\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,GAAG,QAAQ,cAAc;AAClC,SAASC,KAAK,QAAQ,QAAQ;AAE9B,SAASC,mBAAmB,EAAE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I,yIAAyI;MAAAM,QAAA,GAEnJO,GAeM,EAENG,GAOS;IAAA,CACN,CAAC;IAAArC,CAAA,OAAAkC,GAAA;IAAAlC,CAAA,OAAAqC,GAAA;IAAArC,CAAA,OAAAyC,GAAA;EAAA;IAAAA,GAAA,GAAAzC,CAAA;EAAA;EAAA,OA9BNyC,GA8BM;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"editor-auth-gate.js","names":["c","_c","useEffect","Eye","toast","consumeJustLoggedIn","useEditorLogin","cn","jsx","_jsx","jsxs","_jsxs","EditorAuthGate","t0","$","authenticated","labels","t","inIframe","phase","error","signIn","activate","t1","t2","loggedIn","success","isLogin","buttonLabel","loginButton","working","activateButton","t3","Symbol","for","className","t4","loginTitle","activateTitle","t5","id","children","t6","t7","t8","loginBody","activateBody","t9","t10","t11","t12","t13","type","onClick","disabled","t14","role"],"sources":["../../../../src/visual-editor/internal/bridge/editor-auth-gate.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect } from 'react';\nimport { Eye } from 'lucide-react';\nimport { toast } from 'sonner';\n\nimport { consumeJustLoggedIn, useEditorLogin } from '../../../auth/react.ts';\nimport { EditorGateLabels } from '../i18n.ts';\n\nimport '../../../theme.css';\n\nimport { cn } from '../../../shared/cn.ts';\n\ninterface EditorAuthGateProps {\n /** Did the auth cookie reach this SSR request (i.e. is the editor logged in)? */\n authenticated: boolean;\n labels: EditorGateLabels;\n}\n\n/**\n * Login banner for the cross-site editor iframe — UI only; the CHIPS /\n * storage-access flow lives in useEditorLogin. Rendered when embedded and not\n * yet authenticated here.\n *\n * Requires the `sonner` peer (the just-logged-in toast); see the module README.\n */\nexport default function EditorAuthGate({\n authenticated,\n labels,\n}: EditorAuthGateProps) {\n const t = labels;\n const { inIframe, phase, error, signIn, activate } =\n useEditorLogin(authenticated);\n\n useEffect(() => {\n if (consumeJustLoggedIn() && authenticated) toast.success(t.loggedIn);\n }, [authenticated, t.loggedIn]);\n\n if (inIframe !== true || authenticated) return null;\n\n const isLogin = phase === 'login';\n const buttonLabel = isLogin\n ? t.loginButton\n : phase === 'working'\n ? t.working\n : t.activateButton;\n\n return (\n <div\n role=\"region\"\n aria-labelledby=\"nh-gate-title\"\n className=\"nh-root nh:flex nh:items-center nh:justify-between nh:gap-4 nh:bg-(--nh-primary) nh:px-4 nh:py-3 nh:text-(--nh-primary-fg) nh:shadow-md\"\n >\n <div className=\"nh:flex nh:min-w-0 nh:items-center nh:gap-3\">\n <Eye className=\"nh:h-6 nh:w-6 nh:shrink-0\" />\n <div className=\"nh:min-w-0\">\n <p id=\"nh-gate-title\" className=\"nh:leading-tight nh:font-semibold\">\n {isLogin ? t.loginTitle : t.activateTitle}\n </p>\n <p\n className={cn(\n 'nh:truncate nh:text-sm nh:leading-tight',\n error ? 'nh:text-amber-200' : 'nh:text-(--nh-toolbar-fg)/85'\n )}\n >\n {error ? t.error : isLogin ? t.loginBody : t.activateBody}\n </p>\n </div>\n </div>\n\n <button\n type=\"button\"\n onClick={isLogin ? signIn : activate}\n disabled={phase === 'working'}\n className=\"nh:shrink-0 nh:cursor-pointer nh:rounded-lg nh:bg-(--nh-bg) nh:px-5 nh:py-2 nh:text-sm nh:font-semibold nh:text-(--nh-primary) nh:shadow-sm nh:transition nh:hover:bg-(--nh-bg)/90 nh:disabled:cursor-default nh:disabled:opacity-60\"\n >\n {buttonLabel}\n </button>\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,GAAG,QAAQ,cAAc;AAClC,SAASC,KAAK,QAAQ,QAAQ;AAE9B,SAASC,mBAAmB,EAAEC,cAAc,QAAQ,wBAAwB;AAG5E,OAAO,oBAAoB;AAE3B,SAASC,EAAE,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQ3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAAC,eAA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AA;EAAA,OA9BNyC,GA8BM;AAAA","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { type DictionaryOverrides } from '../../shared/i18n';
1
+ import { type DictionaryOverrides } from '../../shared/i18n.js';
2
2
  declare const en: {
3
3
  editorGate: {
4
4
  loginTitle: string;
@@ -18,6 +18,8 @@ declare const en: {
18
18
  editParagraph: string;
19
19
  editFragment: string;
20
20
  editMenu: string;
21
+ noVisualEditor: string;
22
+ unpublished: string;
21
23
  };
22
24
  };
23
25
  export type VisualEditorDictionary = typeof en;
@@ -26,4 +28,3 @@ export type EditorGateLabels = VisualEditorDictionary['editorGate'];
26
28
  export type VisualEditorDictionaryOverrides = DictionaryOverrides<VisualEditorDictionary>;
27
29
  export declare function getVisualEditorDictionary(locale: string, overrides?: VisualEditorDictionaryOverrides): VisualEditorDictionary;
28
30
  export {};
29
- //# sourceMappingURL=i18n.d.ts.map
@@ -1,4 +1,4 @@
1
- import { resolveDictionary } from '../../shared/i18n';
1
+ import { resolveDictionary } from "../../shared/i18n.js";
2
2
  const en = {
3
3
  editorGate: {
4
4
  loginTitle: 'Preview & edit',
@@ -17,7 +17,9 @@ const en = {
17
17
  overlays: {
18
18
  editParagraph: 'Edit Paragraph',
19
19
  editFragment: 'Edit Fragment',
20
- editMenu: 'Edit menu'
20
+ editMenu: 'Edit menu',
21
+ noVisualEditor: 'no visual editor',
22
+ unpublished: '"{title}" is unpublished content.'
21
23
  }
22
24
  };
23
25
  const de = {
@@ -38,12 +40,38 @@ const de = {
38
40
  overlays: {
39
41
  editParagraph: 'Absatz bearbeiten',
40
42
  editFragment: 'Fragment bearbeiten',
41
- editMenu: 'Menü bearbeiten'
43
+ editMenu: 'Menü bearbeiten',
44
+ noVisualEditor: 'kein visueller Editor',
45
+ unpublished: '"{title}" ist unveröffentlichter Inhalt.'
46
+ }
47
+ };
48
+ const fr = {
49
+ editorGate: {
50
+ loginTitle: 'Aperçu et édition',
51
+ loginBody: 'Connecte-toi à ce site pour voir les brouillons (contenus non publiés) et modifier cette page.',
52
+ loginButton: 'Se connecter',
53
+ activateTitle: 'Presque terminé',
54
+ activateBody: 'Ton navigateur va demander l’autorisation d’utiliser ta connexion sur ce site – clique sur « Autoriser ».',
55
+ activateButton: 'Autoriser l’accès',
56
+ working: 'Un instant …',
57
+ error: 'Accès non accordé. Merci de réessayer.',
58
+ loggedIn: 'Connexion réussie'
59
+ },
60
+ bridge: {
61
+ saving: 'Enregistrement …'
62
+ },
63
+ overlays: {
64
+ editParagraph: 'Modifier le paragraphe',
65
+ editFragment: 'Modifier le fragment',
66
+ editMenu: 'Modifier le menu',
67
+ noVisualEditor: 'pas d’éditeur visuel',
68
+ unpublished: '« {title} » est un contenu non publié.'
42
69
  }
43
70
  };
44
71
  const dictionaries = {
45
72
  en,
46
- de
73
+ de,
74
+ fr
47
75
  };
48
76
  export function getVisualEditorDictionary(locale, overrides) {
49
77
  return resolveDictionary(dictionaries, en, locale, overrides);
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.js","names":["resolveDictionary","en","editorGate","loginTitle","loginBody","loginButton","activateTitle","activateBody","activateButton","working","error","loggedIn","bridge","saving","overlays","editParagraph","editFragment","editMenu","de","dictionaries","getVisualEditorDictionary","locale","overrides"],"sources":["../../../src/visual-editor/internal/i18n.ts"],"sourcesContent":["import { resolveDictionary, type DictionaryOverrides } from '../../shared/i18n';\n\nconst en = {\n editorGate: {\n loginTitle: 'Preview & edit',\n loginBody:\n 'Sign in to this site to see drafts (unpublished content) and edit this page.',\n loginButton: 'Sign in',\n activateTitle: 'Almost there',\n activateBody:\n 'Your browser will ask to use your sign-in on this site — click \"Allow\".',\n activateButton: 'Allow access',\n working: 'One moment …',\n error: 'Access not granted. Please try again.',\n loggedIn: 'Signed in successfully',\n },\n bridge: {\n saving: 'Saving …',\n },\n overlays: {\n editParagraph: 'Edit Paragraph',\n editFragment: 'Edit Fragment',\n editMenu: 'Edit menu',\n },\n};\n\nconst de: VisualEditorDictionary = {\n editorGate: {\n loginTitle: 'Vorschau & Bearbeitung',\n loginBody:\n 'Melde dich auf dieser Website an, um Entwürfe (unveröffentlichte Inhalte) zu sehen und diese Seite zu bearbeiten.',\n loginButton: 'Anmelden',\n activateTitle: 'Fast geschafft',\n activateBody:\n 'Dein Browser fragt nach der Erlaubnis, deine Anmeldung hier zu verwenden – klicke auf „Erlauben“.',\n activateButton: 'Zugriff erlauben',\n working: 'Einen Moment …',\n error: 'Zugriff nicht erlaubt. Bitte erneut versuchen.',\n loggedIn: 'Anmeldung erfolgreich',\n },\n bridge: {\n saving: 'Wird gespeichert …',\n },\n overlays: {\n editParagraph: 'Absatz bearbeiten',\n editFragment: 'Fragment bearbeiten',\n editMenu: 'Menü bearbeiten',\n },\n};\n\nexport type VisualEditorDictionary = typeof en;\nexport type BridgeLabels = VisualEditorDictionary['bridge'];\nexport type EditorGateLabels = VisualEditorDictionary['editorGate'];\n\nexport type VisualEditorDictionaryOverrides =\n DictionaryOverrides<VisualEditorDictionary>;\n\nconst dictionaries: Record<string, VisualEditorDictionary> = { en, de };\n\nexport function getVisualEditorDictionary(\n locale: string,\n overrides?: VisualEditorDictionaryOverrides\n): VisualEditorDictionary {\n return resolveDictionary(dictionaries, en, locale, overrides);\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAkC,mBAAmB;AAE/E,MAAMC,EAAE,GAAG;EACTC,UAAU,EAAE;IACVC,UAAU,EAAE,gBAAgB;IAC5BC,SAAS,EACP,8EAA8E;IAChFC,WAAW,EAAE,SAAS;IACtBC,aAAa,EAAE,cAAc;IAC7BC,YAAY,EACV,yEAAyE;IAC3EC,cAAc,EAAE,cAAc;IAC9BC,OAAO,EAAE,cAAc;IACvBC,KAAK,EAAE,uCAAuC;IAC9CC,QAAQ,EAAE;EACZ,CAAC;EACDC,MAAM,EAAE;IACNC,MAAM,EAAE;EACV,CAAC;EACDC,QAAQ,EAAE;IACRC,aAAa,EAAE,gBAAgB;IAC/BC,YAAY,EAAE,eAAe;IAC7BC,QAAQ,EAAE;EACZ;AACF,CAAC;AAED,MAAMC,EAA0B,GAAG;EACjChB,UAAU,EAAE;IACVC,UAAU,EAAE,wBAAwB;IACpCC,SAAS,EACP,mHAAmH;IACrHC,WAAW,EAAE,UAAU;IACvBC,aAAa,EAAE,gBAAgB;IAC/BC,YAAY,EACV,mGAAmG;IACrGC,cAAc,EAAE,kBAAkB;IAClCC,OAAO,EAAE,gBAAgB;IACzBC,KAAK,EAAE,gDAAgD;IACvDC,QAAQ,EAAE;EACZ,CAAC;EACDC,MAAM,EAAE;IACNC,MAAM,EAAE;EACV,CAAC;EACDC,QAAQ,EAAE;IACRC,aAAa,EAAE,mBAAmB;IAClCC,YAAY,EAAE,qBAAqB;IACnCC,QAAQ,EAAE;EACZ;AACF,CAAC;AASD,MAAME,YAAoD,GAAG;EAAElB,EAAE;EAAEiB;AAAG,CAAC;AAEvE,OAAO,SAASE,yBAAyBA,CACvCC,MAAc,EACdC,SAA2C,EACnB;EACxB,OAAOtB,iBAAiB,CAACmB,YAAY,EAAElB,EAAE,EAAEoB,MAAM,EAAEC,SAAS,CAAC;AAC/D","ignoreList":[]}
1
+ {"version":3,"file":"i18n.js","names":["resolveDictionary","en","editorGate","loginTitle","loginBody","loginButton","activateTitle","activateBody","activateButton","working","error","loggedIn","bridge","saving","overlays","editParagraph","editFragment","editMenu","noVisualEditor","unpublished","de","fr","dictionaries","getVisualEditorDictionary","locale","overrides"],"sources":["../../../src/visual-editor/internal/i18n.ts"],"sourcesContent":["import {\n resolveDictionary,\n type DictionaryOverrides,\n} from '../../shared/i18n.ts';\n\nconst en = {\n editorGate: {\n loginTitle: 'Preview & edit',\n loginBody:\n 'Sign in to this site to see drafts (unpublished content) and edit this page.',\n loginButton: 'Sign in',\n activateTitle: 'Almost there',\n activateBody:\n 'Your browser will ask to use your sign-in on this site — click \"Allow\".',\n activateButton: 'Allow access',\n working: 'One moment …',\n error: 'Access not granted. Please try again.',\n loggedIn: 'Signed in successfully',\n },\n bridge: {\n saving: 'Saving …',\n },\n overlays: {\n editParagraph: 'Edit Paragraph',\n editFragment: 'Edit Fragment',\n editMenu: 'Edit menu',\n noVisualEditor: 'no visual editor',\n unpublished: '\"{title}\" is unpublished content.',\n },\n};\n\nconst de: VisualEditorDictionary = {\n editorGate: {\n loginTitle: 'Vorschau & Bearbeitung',\n loginBody:\n 'Melde dich auf dieser Website an, um Entwürfe (unveröffentlichte Inhalte) zu sehen und diese Seite zu bearbeiten.',\n loginButton: 'Anmelden',\n activateTitle: 'Fast geschafft',\n activateBody:\n 'Dein Browser fragt nach der Erlaubnis, deine Anmeldung hier zu verwenden – klicke auf „Erlauben“.',\n activateButton: 'Zugriff erlauben',\n working: 'Einen Moment …',\n error: 'Zugriff nicht erlaubt. Bitte erneut versuchen.',\n loggedIn: 'Anmeldung erfolgreich',\n },\n bridge: {\n saving: 'Wird gespeichert …',\n },\n overlays: {\n editParagraph: 'Absatz bearbeiten',\n editFragment: 'Fragment bearbeiten',\n editMenu: 'Menü bearbeiten',\n noVisualEditor: 'kein visueller Editor',\n unpublished: '\"{title}\" ist unveröffentlichter Inhalt.',\n },\n};\n\nconst fr: VisualEditorDictionary = {\n editorGate: {\n loginTitle: 'Aperçu et édition',\n loginBody:\n 'Connecte-toi à ce site pour voir les brouillons (contenus non publiés) et modifier cette page.',\n loginButton: 'Se connecter',\n activateTitle: 'Presque terminé',\n activateBody:\n 'Ton navigateur va demander l’autorisation d’utiliser ta connexion sur ce site – clique sur « Autoriser ».',\n activateButton: 'Autoriser l’accès',\n working: 'Un instant …',\n error: 'Accès non accordé. Merci de réessayer.',\n loggedIn: 'Connexion réussie',\n },\n bridge: {\n saving: 'Enregistrement …',\n },\n overlays: {\n editParagraph: 'Modifier le paragraphe',\n editFragment: 'Modifier le fragment',\n editMenu: 'Modifier le menu',\n noVisualEditor: 'pas d’éditeur visuel',\n unpublished: '« {title} » est un contenu non publié.',\n },\n};\n\nexport type VisualEditorDictionary = typeof en;\nexport type BridgeLabels = VisualEditorDictionary['bridge'];\nexport type EditorGateLabels = VisualEditorDictionary['editorGate'];\n\nexport type VisualEditorDictionaryOverrides =\n DictionaryOverrides<VisualEditorDictionary>;\n\nconst dictionaries: Record<string, VisualEditorDictionary> = { en, de, fr };\n\nexport function getVisualEditorDictionary(\n locale: string,\n overrides?: VisualEditorDictionaryOverrides\n): VisualEditorDictionary {\n return resolveDictionary(dictionaries, en, locale, overrides);\n}\n"],"mappings":"AAAA,SACEA,iBAAiB,QAEZ,sBAAsB;AAE7B,MAAMC,EAAE,GAAG;EACTC,UAAU,EAAE;IACVC,UAAU,EAAE,gBAAgB;IAC5BC,SAAS,EACP,8EAA8E;IAChFC,WAAW,EAAE,SAAS;IACtBC,aAAa,EAAE,cAAc;IAC7BC,YAAY,EACV,yEAAyE;IAC3EC,cAAc,EAAE,cAAc;IAC9BC,OAAO,EAAE,cAAc;IACvBC,KAAK,EAAE,uCAAuC;IAC9CC,QAAQ,EAAE;EACZ,CAAC;EACDC,MAAM,EAAE;IACNC,MAAM,EAAE;EACV,CAAC;EACDC,QAAQ,EAAE;IACRC,aAAa,EAAE,gBAAgB;IAC/BC,YAAY,EAAE,eAAe;IAC7BC,QAAQ,EAAE,WAAW;IACrBC,cAAc,EAAE,kBAAkB;IAClCC,WAAW,EAAE;EACf;AACF,CAAC;AAED,MAAMC,EAA0B,GAAG;EACjClB,UAAU,EAAE;IACVC,UAAU,EAAE,wBAAwB;IACpCC,SAAS,EACP,mHAAmH;IACrHC,WAAW,EAAE,UAAU;IACvBC,aAAa,EAAE,gBAAgB;IAC/BC,YAAY,EACV,mGAAmG;IACrGC,cAAc,EAAE,kBAAkB;IAClCC,OAAO,EAAE,gBAAgB;IACzBC,KAAK,EAAE,gDAAgD;IACvDC,QAAQ,EAAE;EACZ,CAAC;EACDC,MAAM,EAAE;IACNC,MAAM,EAAE;EACV,CAAC;EACDC,QAAQ,EAAE;IACRC,aAAa,EAAE,mBAAmB;IAClCC,YAAY,EAAE,qBAAqB;IACnCC,QAAQ,EAAE,iBAAiB;IAC3BC,cAAc,EAAE,uBAAuB;IACvCC,WAAW,EAAE;EACf;AACF,CAAC;AAED,MAAME,EAA0B,GAAG;EACjCnB,UAAU,EAAE;IACVC,UAAU,EAAE,mBAAmB;IAC/BC,SAAS,EACP,gGAAgG;IAClGC,WAAW,EAAE,cAAc;IAC3BC,aAAa,EAAE,iBAAiB;IAChCC,YAAY,EACV,2GAA2G;IAC7GC,cAAc,EAAE,mBAAmB;IACnCC,OAAO,EAAE,cAAc;IACvBC,KAAK,EAAE,wCAAwC;IAC/CC,QAAQ,EAAE;EACZ,CAAC;EACDC,MAAM,EAAE;IACNC,MAAM,EAAE;EACV,CAAC;EACDC,QAAQ,EAAE;IACRC,aAAa,EAAE,wBAAwB;IACvCC,YAAY,EAAE,sBAAsB;IACpCC,QAAQ,EAAE,kBAAkB;IAC5BC,cAAc,EAAE,sBAAsB;IACtCC,WAAW,EAAE;EACf;AACF,CAAC;AASD,MAAMG,YAAoD,GAAG;EAAErB,EAAE;EAAEmB,EAAE;EAAEC;AAAG,CAAC;AAE3E,OAAO,SAASE,yBAAyBA,CACvCC,MAAc,EACdC,SAA2C,EACnB;EACxB,OAAOzB,iBAAiB,CAACsB,YAAY,EAAErB,EAAE,EAAEuB,MAAM,EAAEC,SAAS,CAAC;AAC/D","ignoreList":[]}
@@ -1,7 +1 @@
1
- /**
2
- * Origin of the trusted Drupal embedder, used as the postMessage targetOrigin so
3
- * UUIDs/paths never leak to an arbitrary framer. Null when unconfigured, in which
4
- * case callers must not post.
5
- */
6
- export declare function getDrupalOrigin(): string | null;
7
- //# sourceMappingURL=drupal-origin.d.ts.map
1
+ export declare function resolveDrupalOrigin(base?: string | null): string | null;
@@ -2,14 +2,27 @@
2
2
  * Origin of the trusted Drupal embedder, used as the postMessage targetOrigin so
3
3
  * UUIDs/paths never leak to an arbitrary framer. Null when unconfigured, in which
4
4
  * case callers must not post.
5
+ *
6
+ * Prefers an injected Drupal base URL (prop), falling back to the env value when
7
+ * omitted. The env fallback path emits a once-only diagnostic when unset.
5
8
  */
6
- export function getDrupalOrigin() {
7
- const base = process.env.NEXT_PUBLIC_DRUPAL_BASE_URL;
8
- if (!base) return null;
9
+ let warnedMissing = false;
10
+ function toOrigin(base) {
9
11
  try {
10
12
  return new URL(base).origin;
11
13
  } catch {
12
14
  return null;
13
15
  }
14
16
  }
17
+ export function resolveDrupalOrigin(base) {
18
+ const resolved = base || process.env.NEXT_PUBLIC_DRUPAL_BASE_URL;
19
+ if (!resolved) {
20
+ if (!warnedMissing) {
21
+ warnedMissing = true;
22
+ console.warn('visual-editor: NEXT_PUBLIC_DRUPAL_BASE_URL is empty; edit overlays cannot post to the Drupal parent and stay inert. If it is set at build time, the env value was not inlined into the published bundle.');
23
+ }
24
+ return null;
25
+ }
26
+ return toOrigin(resolved);
27
+ }
15
28
  //# sourceMappingURL=drupal-origin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drupal-origin.js","names":["getDrupalOrigin","base","process","env","NEXT_PUBLIC_DRUPAL_BASE_URL","URL","origin"],"sources":["../../../../src/visual-editor/internal/overlays/drupal-origin.ts"],"sourcesContent":["/**\n * Origin of the trusted Drupal embedder, used as the postMessage targetOrigin so\n * UUIDs/paths never leak to an arbitrary framer. Null when unconfigured, in which\n * case callers must not post.\n */\nexport function getDrupalOrigin(): string | null {\n const base = process.env.NEXT_PUBLIC_DRUPAL_BASE_URL;\n if (!base) return null;\n try {\n return new URL(base).origin;\n } catch {\n return null;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,eAAeA,CAAA,EAAkB;EAC/C,MAAMC,IAAI,GAAGC,OAAO,CAACC,GAAG,CAACC,2BAA2B;EACpD,IAAI,CAACH,IAAI,EAAE,OAAO,IAAI;EACtB,IAAI;IACF,OAAO,IAAII,GAAG,CAACJ,IAAI,CAAC,CAACK,MAAM;EAC7B,CAAC,CAAC,MAAM;IACN,OAAO,IAAI;EACb;AACF","ignoreList":[]}
1
+ {"version":3,"file":"drupal-origin.js","names":["warnedMissing","toOrigin","base","URL","origin","resolveDrupalOrigin","resolved","process","env","NEXT_PUBLIC_DRUPAL_BASE_URL","console","warn"],"sources":["../../../../src/visual-editor/internal/overlays/drupal-origin.ts"],"sourcesContent":["/**\n * Origin of the trusted Drupal embedder, used as the postMessage targetOrigin so\n * UUIDs/paths never leak to an arbitrary framer. Null when unconfigured, in which\n * case callers must not post.\n *\n * Prefers an injected Drupal base URL (prop), falling back to the env value when\n * omitted. The env fallback path emits a once-only diagnostic when unset.\n */\nlet warnedMissing = false;\n\nfunction toOrigin(base: string): string | null {\n try {\n return new URL(base).origin;\n } catch {\n return null;\n }\n}\n\nexport function resolveDrupalOrigin(base?: string | null): string | null {\n const resolved = base || process.env.NEXT_PUBLIC_DRUPAL_BASE_URL;\n if (!resolved) {\n if (!warnedMissing) {\n warnedMissing = true;\n console.warn(\n 'visual-editor: NEXT_PUBLIC_DRUPAL_BASE_URL is empty; edit overlays cannot post to the Drupal parent and stay inert. If it is set at build time, the env value was not inlined into the published bundle.'\n );\n }\n return null;\n }\n return toOrigin(resolved);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,aAAa,GAAG,KAAK;AAEzB,SAASC,QAAQA,CAACC,IAAY,EAAiB;EAC7C,IAAI;IACF,OAAO,IAAIC,GAAG,CAACD,IAAI,CAAC,CAACE,MAAM;EAC7B,CAAC,CAAC,MAAM;IACN,OAAO,IAAI;EACb;AACF;AAEA,OAAO,SAASC,mBAAmBA,CAACH,IAAoB,EAAiB;EACvE,MAAMI,QAAQ,GAAGJ,IAAI,IAAIK,OAAO,CAACC,GAAG,CAACC,2BAA2B;EAChE,IAAI,CAACH,QAAQ,EAAE;IACb,IAAI,CAACN,aAAa,EAAE;MAClBA,aAAa,GAAG,IAAI;MACpBU,OAAO,CAACC,IAAI,CACV,0MACF,CAAC;IACH;IACA,OAAO,IAAI;EACb;EACA,OAAOV,QAAQ,CAACK,QAAQ,CAAC;AAC3B","ignoreList":[]}
@@ -1,10 +1,11 @@
1
- import '../../../theme.css';
1
+ import type { BridgeEditPayload } from '../../../bridge-protocol/index.js';
2
2
  type EditButtonProps = {
3
3
  label: string;
4
- message: Record<string, unknown>;
4
+ message: BridgeEditPayload;
5
5
  position: string;
6
6
  showLabel?: boolean;
7
+ /** Trusted Drupal base URL; falls back to NEXT_PUBLIC_DRUPAL_BASE_URL when omitted. */
8
+ drupalBaseUrl?: string;
7
9
  };
8
- export default function EditButton({ label, message, position, showLabel, }: EditButtonProps): import("react").JSX.Element | null;
10
+ export default function EditButton({ label, message, position, showLabel, drupalBaseUrl, }: EditButtonProps): import("react").JSX.Element | null;
9
11
  export {};
10
- //# sourceMappingURL=edit-button.d.ts.map
@@ -2,28 +2,29 @@
2
2
 
3
3
  import { c as _c } from "react/compiler-runtime";
4
4
  import { usePathname } from 'next/navigation';
5
- import { cn } from '../../../shared/cn';
6
- import { useIsInIframe } from '../../../shared/use-is-in-iframe';
7
- import { getDrupalOrigin } from './drupal-origin';
8
- import { EditIcon } from './edit-icon';
5
+ import { cn } from "../../../shared/cn.js";
6
+ import { useIsInIframe } from "../../../shared/use-is-in-iframe.js";
7
+ import { resolveDrupalOrigin } from "./drupal-origin.js";
8
+ import { EditIcon } from "./edit-icon.js";
9
9
  import '../../../theme.css';
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  export default function EditButton(t0) {
12
- const $ = _c(21);
12
+ const $ = _c(22);
13
13
  const {
14
14
  label,
15
15
  message,
16
16
  position,
17
- showLabel: t1
17
+ showLabel: t1,
18
+ drupalBaseUrl
18
19
  } = t0;
19
20
  const showLabel = t1 === undefined ? false : t1;
20
21
  const pathname = usePathname();
21
22
  const isInIframe = useIsInIframe();
22
23
  let t2;
23
- if ($[0] !== message || $[1] !== pathname) {
24
+ if ($[0] !== drupalBaseUrl || $[1] !== message || $[2] !== pathname) {
24
25
  t2 = e => {
25
26
  e.preventDefault();
26
- const targetOrigin = getDrupalOrigin();
27
+ const targetOrigin = resolveDrupalOrigin(drupalBaseUrl);
27
28
  if (!targetOrigin) {
28
29
  return;
29
30
  }
@@ -32,92 +33,93 @@ export default function EditButton(t0) {
32
33
  pathname
33
34
  }, targetOrigin);
34
35
  };
35
- $[0] = message;
36
- $[1] = pathname;
37
- $[2] = t2;
36
+ $[0] = drupalBaseUrl;
37
+ $[1] = message;
38
+ $[2] = pathname;
39
+ $[3] = t2;
38
40
  } else {
39
- t2 = $[2];
41
+ t2 = $[3];
40
42
  }
41
43
  const editComponent = t2;
42
44
  if (!isInIframe) {
43
45
  return null;
44
46
  }
45
47
  let t3;
46
- if ($[3] !== position) {
48
+ if ($[4] !== position) {
47
49
  t3 = cn("nh-root nh:absolute nh:flex nh:transform-gpu nh:gap-2 nh:antialiased nh:opacity-75 nh:transition-all nh:duration-75 nh:ease-in-out nh:hover:scale-105 nh:hover:opacity-100", position);
48
- $[3] = position;
49
- $[4] = t3;
50
+ $[4] = position;
51
+ $[5] = t3;
50
52
  } else {
51
- t3 = $[4];
53
+ t3 = $[5];
52
54
  }
53
55
  const t4 = !showLabel;
54
56
  let t5;
55
- if ($[5] !== showLabel || $[6] !== t4) {
57
+ if ($[6] !== showLabel || $[7] !== t4) {
56
58
  t5 = cn("nh:flex nh:gap-2 nh:rounded-(--nh-radius) nh:bg-(--nh-primary) nh:py-2 nh:text-xs nh:font-(--nh-font) nh:font-bold nh:text-(--nh-primary-fg) nh:shadow-lg nh:transition-colors nh:hover:bg-[color-mix(in_oklab,var(--nh-primary),black_20%)]", {
57
59
  "nh:px-3": showLabel,
58
60
  "nh:px-2": t4
59
61
  });
60
- $[5] = showLabel;
61
- $[6] = t4;
62
- $[7] = t5;
62
+ $[6] = showLabel;
63
+ $[7] = t4;
64
+ $[8] = t5;
63
65
  } else {
64
- t5 = $[7];
66
+ t5 = $[8];
65
67
  }
66
68
  const t6 = !showLabel;
67
69
  let t7;
68
- if ($[8] !== t6) {
70
+ if ($[9] !== t6) {
69
71
  t7 = cn({
70
72
  "nh:sr-only": t6
71
73
  });
72
- $[8] = t6;
73
- $[9] = t7;
74
+ $[9] = t6;
75
+ $[10] = t7;
74
76
  } else {
75
- t7 = $[9];
77
+ t7 = $[10];
76
78
  }
77
79
  let t8;
78
- if ($[10] !== label || $[11] !== t7) {
80
+ if ($[11] !== label || $[12] !== t7) {
79
81
  t8 = /*#__PURE__*/_jsx("span", {
80
82
  className: t7,
81
83
  children: label
82
84
  });
83
- $[10] = label;
84
- $[11] = t7;
85
- $[12] = t8;
85
+ $[11] = label;
86
+ $[12] = t7;
87
+ $[13] = t8;
86
88
  } else {
87
- t8 = $[12];
89
+ t8 = $[13];
88
90
  }
89
91
  let t9;
90
- if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
92
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
91
93
  t9 = /*#__PURE__*/_jsx(EditIcon, {});
92
- $[13] = t9;
94
+ $[14] = t9;
93
95
  } else {
94
- t9 = $[13];
96
+ t9 = $[14];
95
97
  }
96
98
  let t10;
97
- if ($[14] !== editComponent || $[15] !== t5 || $[16] !== t8) {
99
+ if ($[15] !== editComponent || $[16] !== t5 || $[17] !== t8) {
98
100
  t10 = /*#__PURE__*/_jsxs("button", {
99
101
  onClick: editComponent,
100
102
  className: t5,
101
103
  children: [t8, t9]
102
104
  });
103
- $[14] = editComponent;
104
- $[15] = t5;
105
- $[16] = t8;
106
- $[17] = t10;
105
+ $[15] = editComponent;
106
+ $[16] = t5;
107
+ $[17] = t8;
108
+ $[18] = t10;
107
109
  } else {
108
- t10 = $[17];
110
+ t10 = $[18];
109
111
  }
110
112
  let t11;
111
- if ($[18] !== t10 || $[19] !== t3) {
113
+ if ($[19] !== t10 || $[20] !== t3) {
112
114
  t11 = /*#__PURE__*/_jsx("div", {
113
115
  className: t3,
114
116
  children: t10
115
117
  });
116
- $[18] = t10;
117
- $[19] = t3;
118
- $[20] = t11;
118
+ $[19] = t10;
119
+ $[20] = t3;
120
+ $[21] = t11;
119
121
  } else {
120
- t11 = $[20];
122
+ t11 = $[21];
121
123
  }
122
124
  return t11;
123
125
  }
@@ -1 +1 @@
1
- {"version":3,"file":"edit-button.js","names":["c","_c","usePathname","cn","useIsInIframe","getDrupalOrigin","EditIcon","jsx","_jsx","jsxs","_jsxs","EditButton","t0","$","label","message","position","showLabel","t1","undefined","pathname","isInIframe","t2","e","preventDefault","targetOrigin","window","parent","postMessage","editComponent","t3","t4","t5","t6","t7","t8","className","children","t9","Symbol","for","t10","t11"],"sources":["../../../../src/visual-editor/internal/overlays/edit-button.tsx"],"sourcesContent":["'use client';\n\nimport { usePathname } from 'next/navigation';\n\nimport { cn } from '../../../shared/cn';\nimport { useIsInIframe } from '../../../shared/use-is-in-iframe';\nimport { getDrupalOrigin } from './drupal-origin';\nimport { EditIcon } from './edit-icon';\n\nimport '../../../theme.css';\n\ntype EditButtonProps = {\n label: string;\n message: Record<string, unknown>;\n position: string;\n showLabel?: boolean;\n};\n\nexport default function EditButton({\n label,\n message,\n position,\n showLabel = false,\n}: EditButtonProps) {\n const pathname = usePathname();\n const isInIframe = useIsInIframe();\n\n const editComponent = (e: React.MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n\n const targetOrigin = getDrupalOrigin();\n if (!targetOrigin) return;\n\n window.parent.postMessage({ ...message, pathname }, targetOrigin);\n };\n\n if (!isInIframe) {\n return null;\n }\n\n return (\n <div\n className={cn(\n 'nh-root nh:absolute nh:flex nh:transform-gpu nh:gap-2 nh:antialiased nh:opacity-75 nh:transition-all nh:duration-75 nh:ease-in-out nh:hover:scale-105 nh:hover:opacity-100',\n position\n )}\n >\n <button\n onClick={editComponent}\n className={cn(\n 'nh:flex nh:gap-2 nh:rounded-(--nh-radius) nh:bg-(--nh-primary) nh:py-2 nh:text-xs nh:font-(--nh-font) nh:font-bold nh:text-(--nh-primary-fg) nh:shadow-lg nh:transition-colors nh:hover:bg-[color-mix(in_oklab,var(--nh-primary),black_20%)]',\n { 'n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GAAA;IAEjEF,EAAA,gBAAA9B,IAAA,CAACF,QAAQ,IAAE,CAAC;IAAAO,CAAA,OAAAyB,EAAA;EAAA;IAAAA,EAAA,GAAAzB,CAAA;EAAA;EAAA,IAAA4B,GAAA;EAAA,IAAA5B,CAAA,SAAAgB,aAAA,IAAAhB,CAAA,SAAAmB,EAAA,IAAAnB,CAAA,SAAAsB,EAAA;IATdM,GAAA,gBAAA/B,KAAA;MACWmB,OAAa,EAAbA,aAAa;MACXO,SAGV,EAHUJ,EAGV;MAAAK,QAAA,GAEDF,EAAiE,EAEjEG,EAAY;IAAA,CACN,CAAC;IAAAzB,CAAA,OAAAgB,aAAA;IAAAhB,CAAA,OAAAmB,EAAA;IAAAnB,CAAA,OAAAsB,EAAA;IAAAtB,CAAA,OAAA4B,GAAA;EAAA;IAAAA,GAAA,GAAA5B,CAAA;EAAA;EAAA,IAAA6B,GAAA;EAAA,IAAA7B,CAAA,SAAA4B,GAAA,IAAA5B,CAAA,SAAAiB,EAAA;IAhBXY,GAAA,gBAAAlC,IAAA;MACa4B,SAGV,EAHUN,EAGV;MAAAO,QAAA,EAEDI;IAUS,CACN,CAAC;IAAA5B,CAAA,OAAA4B,GAAA;IAAA5B,CAAA,OAAAiB,EAAA;IAAAjB,CAAA,OAAA6B,GAAA;EAAA;IAAAA,GAAA,GAAA7B,CAAA;EAAA;EAAA,OAjBN6B,GAiBM;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"edit-button.js","names":["c","_c","usePathname","cn","useIsInIframe","resolveDrupalOrigin","EditIcon","jsx","_jsx","jsxs","_jsxs","EditButton","t0","$","label","message","position","showLabel","t1","drupalBaseUrl","undefined","pathname","isInIframe","t2","e","preventDefault","targetOrigin","window","parent","postMessage","editComponent","t3","t4","t5","t6","t7","t8","className","children","t9","Symbol","for","t10","t11"],"sources":["../../../../src/visual-editor/internal/overlays/edit-button.tsx"],"sourcesContent":["'use client';\n\nimport { usePathname } from 'next/navigation';\n\nimport type { BridgeEditPayload } from '../../../bridge-protocol/index.ts';\nimport { cn } from '../../../shared/cn.ts';\nimport { useIsInIframe } from '../../../shared/use-is-in-iframe.ts';\nimport { resolveDrupalOrigin } from './drupal-origin.ts';\nimport { EditIcon } from './edit-icon.tsx';\n\nimport '../../../theme.css';\n\ntype EditButtonProps = {\n label: string;\n message: BridgeEditPayload;\n position: string;\n showLabel?: boolean;\n /** Trusted Drupal base URL; falls back to NEXT_PUBLIC_DRUPAL_BASE_URL when omitted. */\n drupalBaseUrl?: string;\n};\n\nexport default function EditButton({\n label,\n message,\n position,\n showLabel = false,\n drupalBaseUrl,\n}: EditButtonProps) {\n const pathname = usePathname();\n const isInIframe = useIsInIframe();\n\n const editComponent = (e: React.MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n\n const targetOrigin = resolveDrupalOrigin(drupalBaseUrl);\n if (!targetOrigin) return;\n\n window.parent.postMessage({ ...message, pathname }, targetOrigin);\n };\n\n if (!isInIframe) {\n return null;\n }\n\n return (\n <div\n className={cn(\n 'nh-root nh:absolute nh:flex nh:transform-gpu nh:gap-2 nh:antialiased nh:opacity-75 nh:transition-all nh:duration-75 nh:ease-in-out nh:hover:scale-105 nh:hover:opacity-100',\n position\n )}\n >\n <button\n onClick={editComponent}\n className={cn(\n 'nh:flex nh:gap-2 nh:rounded-(--nh-radius) nh:bg-(--nh-primary) nh:py-2 nh:text-xs nh:font-(--nh-font) nh:font-bold nh:text-(--nh-primary-fg) nh:shadow-lg nh:transition-colors nh:hover:bg-[color-mix(in_oklab,var(--nh-primary),black_20%)]',\n { 'nh:px-3': showLabel, 'nh:px-2': !showLabel }\n )}\n >\n <span className={cn({ 'nh:sr-only': !showLabel })}>{label}</span>\n\n <EditIcon />\n </button>\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,WAAW,QAAQ,iBAAiB;AAG7C,SAASC,EAAE,QAAQ,uBAAuB;AAC1C,SAASC,aAAa,QAAQ,qC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AAAjB,CAAA,SAAAoB,EAAA,IAAApB,CAAA,SAAAuB,EAAA;IATdM,GAAA,gBAAAhC,KAAA;MACWoB,OAAa,EAAbA,aAAa;MACXO,SAGV,EAHUJ,EAGV;MAAAK,QAAA,GAEDF,EAAiE,EAEjEG,EAAY;IAAA,CACN,CAAC;IAAA1B,CAAA,OAAAiB,aAAA;IAAAjB,CAAA,OAAAoB,EAAA;IAAApB,CAAA,OAAAuB,EAAA;IAAAvB,CAAA,OAAA6B,GAAA;EAAA;IAAAA,GAAA,GAAA7B,CAAA;EAAA;EAAA,IAAA8B,GAAA;EAAA,IAAA9B,CAAA,SAAA6B,GAAA,IAAA7B,CAAA,SAAAkB,EAAA;IAhBXY,GAAA,gBAAAnC,IAAA;MACa6B,SAGV,EAHUN,EAGV;MAAAO,QAAA,EAEDI;IAUS,CACN,CAAC;IAAA7B,CAAA,OAAA6B,GAAA;IAAA7B,CAAA,OAAAkB,EAAA;IAAAlB,CAAA,OAAA8B,GAAA;EAAA;IAAAA,GAAA,GAAA9B,CAAA;EAAA;EAAA,OAjBN8B,GAiBM;AAAA","ignoreList":[]}
@@ -1,3 +1,2 @@
1
1
  import type { SVGProps } from 'react';
2
2
  export declare function EditIcon(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
3
- //# sourceMappingURL=edit-icon.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { type VisualEditorDictionaryOverrides } from '../../i18n.js';
1
2
  type FragmentEntity = {
2
3
  id: string;
3
4
  type?: string;
@@ -8,8 +9,16 @@ type FragmentWrapperProps = {
8
9
  entity: FragmentEntity;
9
10
  enable?: boolean;
10
11
  editmode?: 'edit-form' | 'sidebar' | 'modal' | 'inline';
12
+ /** Trusted Drupal base URL; falls back to NEXT_PUBLIC_DRUPAL_BASE_URL when omitted. */
13
+ drupalBaseUrl?: string;
14
+ /** Per-section label overrides merged over the resolved dictionary. */
15
+ dictionaryOverrides?: VisualEditorDictionaryOverrides;
11
16
  children: React.ReactNode;
12
17
  };
13
- export default function FragmentWrapper({ entity, enable, editmode, children, }: FragmentWrapperProps): import("react").JSX.Element;
18
+ /**
19
+ * Renders the edit overlay for a fragment (visible only to signed-in editors).
20
+ *
21
+ * Dynamic RSC (reads `cookies()` via the `<SignedIn>`/`<SignedOut>` gates); under `cacheComponents`, mount inside a `<Suspense>` boundary. See the visual-editor README.
22
+ */
23
+ export default function FragmentWrapper({ entity, enable, editmode, drupalBaseUrl, dictionaryOverrides, children, }: FragmentWrapperProps): import("react").JSX.Element;
14
24
  export {};
15
- //# sourceMappingURL=fragment-wrapper.d.ts.map
@@ -1,12 +1,19 @@
1
- import { SignedIn, SignedOut } from '../../../../auth/server';
2
- import { getVisualEditorDictionary } from '../../i18n';
3
- import EditButton from '../edit-button';
4
- import IframeWrapper from '../iframe-wrapper';
1
+ import { SignedIn, SignedOut } from "../../../../auth/server.js";
2
+ import { getVisualEditorDictionary } from "../../i18n.js";
3
+ import EditButton from "../edit-button.js";
4
+ import IframeWrapper from "../iframe-wrapper.js";
5
5
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
6
+ /**
7
+ * Renders the edit overlay for a fragment (visible only to signed-in editors).
8
+ *
9
+ * Dynamic RSC (reads `cookies()` via the `<SignedIn>`/`<SignedOut>` gates); under `cacheComponents`, mount inside a `<Suspense>` boundary. See the visual-editor README.
10
+ */
6
11
  export default function FragmentWrapper({
7
12
  entity,
8
13
  enable = true,
9
14
  editmode = 'sidebar',
15
+ drupalBaseUrl,
16
+ dictionaryOverrides,
10
17
  children
11
18
  }) {
12
19
  const {
@@ -14,13 +21,16 @@ export default function FragmentWrapper({
14
21
  id,
15
22
  drupal_internal__fid
16
23
  } = entity;
24
+ const lang = entity.langcode ?? 'en';
25
+ const {
26
+ overlays
27
+ } = getVisualEditorDictionary(lang, dictionaryOverrides);
17
28
  if (!type) {
18
29
  return /*#__PURE__*/_jsxs("div", {
19
- children: ["no visual editor ", children]
30
+ children: [overlays.noVisualEditor, " ", children]
20
31
  });
21
32
  }
22
- const lang = entity.langcode ?? 'en';
23
- const label = getVisualEditorDictionary(lang).overlays.editFragment;
33
+ const label = overlays.editFragment;
24
34
  return /*#__PURE__*/_jsxs("div", {
25
35
  id: id,
26
36
  "fragment-type": type,
@@ -36,6 +46,7 @@ export default function FragmentWrapper({
36
46
  children: [/*#__PURE__*/_jsx(EditButton, {
37
47
  label: label,
38
48
  position: "nh:-top-2 nh:-right-2",
49
+ drupalBaseUrl: drupalBaseUrl,
39
50
  message: {
40
51
  type: 'fragment',
41
52
  uuid: id,
@@ -1 +1 @@
1
- {"version":3,"file":"fragment-wrapper.js","names":["SignedIn","SignedOut","getVisualEditorDictionary","EditButton","IframeWrapper","jsxs","_jsxs","jsx","_jsx","FragmentWrapper","entity","enable","editmode","children","type","id","drupal_internal__fid","lang","langcode","label","overlays","editFragment","toString","className","position","message","uuid"],"sources":["../../../../../src/visual-editor/internal/overlays/fragment/fragment-wrapper.tsx"],"sourcesContent":["import { SignedIn, SignedOut } from '../../../../auth/server';\nimport { getVisualEditorDictionary } from '../../i18n';\nimport EditButton from '../edit-button';\nimport IframeWrapper from '../iframe-wrapper';\n\ntype FragmentEntity = {\n id: string;\n type?: string;\n langcode?: string;\n drupal_internal__fid?: string;\n};\n\ntype FragmentWrapperProps = {\n entity: FragmentEntity;\n enable?: boolean;\n editmode?: 'edit-form' | 'sidebar' | 'modal' | 'inline';\n children: React.ReactNode;\n};\n\nexport default function FragmentWrapper({\n entity,\n enable = true,\n editmode = 'sidebar',\n children,\n}: FragmentWrapperProps) {\n const { type, id, drupal_internal__fid } = entity;\n\n if (!type) {\n return <div>no visual editor {children}</div>;\n }\n\n const lang = entity.langcode ?? 'en';\n const label = getVisualEditorDictionary(lang).overlays.editFragment;\n\n return (\n <div\n id={id}\n fragment-type={type}\n data-nodehive-enable={enable.toString()}\n data-nodehive-editmode={editmode}\n data-nodehive-type=\"fragment\"\n data-nodehive-id={drupal_internal__fid ?? ''}\n data-nodehive-uuid={id}\n data-nodehive-langcode={lang}\n className=\"nh:relative\"\n >\n <SignedIn>\n <IframeWrapper>\n <EditButton\n label={label}\n position=\"nh:-top-2 nh:-right-2\"\n message={{\n type: 'fragment',\n uuid: id,\n id: drupal_internal__fid ?? '',\n langcode: lang,\n }}\n />\n\n {children}\n </IframeWrapper>\n </SignedIn>\n\n <SignedOut>{children}</SignedOut>\n </div>\n );\n}\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,SAAS,QAAQ,yBAAyB;AAC7D,SAASC,yBAAyB,QAAQ,YAAY;AACtD,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,aAAa,MAAM,mBAAmB;AAAC,SAAAC,IAAA,IAAAC,KAAA,EAAAC,GAAA,IAAAC,IAAA;AAgB9C,eAAe,SAASC,eAAeA,CAAC;EACtCC,MAAM;EACNC,MAAM,GAAG,IAAI;EACbC,QAAQ,GAAG,SAAS;EACpBC;AACoB,CAAC,EAAE;EACvB,MAAM;IAAEC,IAAI;IAAEC,EAAE;IAAEC;EAAqB,CAAC,GAAGN,MAAM;EAEjD,IAAI,CAACI,IAAI,EAAE;IACT,oBAAOR,KAAA;MAAAO,QAAA,GAAK,mBAAiB,EAACA,QAAQ;IAAA,CAAM,CAAC;EAC/C;EAEA,MAAMI,IAAI,GAAGP,MAAM,CAACQ,QAAQ,IAAI,IAAI;EACpC,MAAMC,KAAK,GAAGjB,yBAAyB,CAACe,IAAI,CAAC,CAACG,QAAQ,CAACC,YAAY;EAEnE,oBACEf,KAAA;IACES,EAAE,EAAEA,EAAG;IACP,iBAAeD,IAAK;IACpB,wBAAsBH,MAAM,CAACW,QAAQ,CAAC,CAAE;IACxC,0BAAwBV,QAAS;IACjC,sBAAmB,UAAU;IAC7B,oBAAkBI,oBAAoB,IAAI,EAAG;IAC7C,sBAAoBD,EAAG;IACvB,0BAAwBE,IAAK;IAC7BM,SAAS,EAAC,aAAa;IAAAV,QAAA,gBAEvBL,IAAA,CAACR,QAAQ;MAAAa,QAAA,eACPP,KAAA,CAACF,aAAa;QAAAS,QAAA,gBACZL,IAAA,CAACL,UAAU;UACTgB,KAAK,EAAEA,KAAM;UACbK,QAAQ,EAAC,uBAAuB;UAChCC,OAAO,EAAE;YACPX,IAAI,EAAE,UAAU;YAChBY,IAAI,EAAEX,EAAE;YACRA,EAAE,EAAEC,oBAAoB,IAAI,EAAE;YAC9BE,QAAQ,EAAED;UACZ;QAAE,CACH,CAAC,EAEDJ,QAAQ;MAAA,CACI;IAAC,CACR,CAAC,eAEXL,IAAA,CAACP,SAAS;MAAAY,QAAA,EAAEA;IAAQ,CAAY,CAAC;EAAA,CAC9B,CAAC;AAEV","ignoreList":[]}
1
+ {"version":3,"file":"fragment-wrapper.js","names":["SignedIn","SignedOut","getVisualEditorDictionary","EditButton","IframeWrapper","jsxs","_jsxs","jsx","_jsx","FragmentWrapper","entity","enable","editmode","drupalBaseUrl","dictionaryOverrides","children","type","id","drupal_internal__fid","lang","langcode","overlays","noVisualEditor","label","editFragment","toString","className","position","message","uuid"],"sources":["../../../../../src/visual-editor/internal/overlays/fragment/fragment-wrapper.tsx"],"sourcesContent":["import { SignedIn, SignedOut } from '../../../../auth/server.ts';\nimport {\n getVisualEditorDictionary,\n type VisualEditorDictionaryOverrides,\n} from '../../i18n.ts';\nimport EditButton from '../edit-button.tsx';\nimport IframeWrapper from '../iframe-wrapper.tsx';\n\ntype FragmentEntity = {\n id: string;\n type?: string;\n langcode?: string;\n drupal_internal__fid?: string;\n};\n\ntype FragmentWrapperProps = {\n entity: FragmentEntity;\n enable?: boolean;\n editmode?: 'edit-form' | 'sidebar' | 'modal' | 'inline';\n /** Trusted Drupal base URL; falls back to NEXT_PUBLIC_DRUPAL_BASE_URL when omitted. */\n drupalBaseUrl?: string;\n /** Per-section label overrides merged over the resolved dictionary. */\n dictionaryOverrides?: VisualEditorDictionaryOverrides;\n children: React.ReactNode;\n};\n\n/**\n * Renders the edit overlay for a fragment (visible only to signed-in editors).\n *\n * Dynamic RSC (reads `cookies()` via the `<SignedIn>`/`<SignedOut>` gates); under `cacheComponents`, mount inside a `<Suspense>` boundary. See the visual-editor README.\n */\nexport default function FragmentWrapper({\n entity,\n enable = true,\n editmode = 'sidebar',\n drupalBaseUrl,\n dictionaryOverrides,\n children,\n}: FragmentWrapperProps) {\n const { type, id, drupal_internal__fid } = entity;\n\n const lang = entity.langcode ?? 'en';\n const { overlays } = getVisualEditorDictionary(lang, dictionaryOverrides);\n\n if (!type) {\n return (\n <div>\n {overlays.noVisualEditor} {children}\n </div>\n );\n }\n\n const label = overlays.editFragment;\n\n return (\n <div\n id={id}\n fragment-type={type}\n data-nodehive-enable={enable.toString()}\n data-nodehive-editmode={editmode}\n data-nodehive-type=\"fragment\"\n data-nodehive-id={drupal_internal__fid ?? ''}\n data-nodehive-uuid={id}\n data-nodehive-langcode={lang}\n className=\"nh:relative\"\n >\n <SignedIn>\n <IframeWrapper>\n <EditButton\n label={label}\n position=\"nh:-top-2 nh:-right-2\"\n drupalBaseUrl={drupalBaseUrl}\n message={{\n type: 'fragment',\n uuid: id,\n id: drupal_internal__fid ?? '',\n langcode: lang,\n }}\n />\n\n {children}\n </IframeWrapper>\n </SignedIn>\n\n <SignedOut>{children}</SignedOut>\n </div>\n );\n}\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,SAAS,QAAQ,4BAA4B;AAChE,SACEC,yBAAyB,QAEpB,eAAe;AACtB,OAAOC,UAAU,MAAM,mBAAoB;AAC3C,OAAOC,aAAa,MAAM,sBAAuB;AAAC,SAAAC,IAAA,IAAAC,KAAA,EAAAC,GAAA,IAAAC,IAAA;AAoBlD;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,eAAeA,CAAC;EACtCC,MAAM;EACNC,MAAM,GAAG,IAAI;EACbC,QAAQ,GAAG,SAAS;EACpBC,aAAa;EACbC,mBAAmB;EACnBC;AACoB,CAAC,EAAE;EACvB,MAAM;IAAEC,IAAI;IAAEC,EAAE;IAAEC;EAAqB,CAAC,GAAGR,MAAM;EAEjD,MAAMS,IAAI,GAAGT,MAAM,CAACU,QAAQ,IAAI,IAAI;EACpC,MAAM;IAAEC;EAAS,CAAC,GAAGnB,yBAAyB,CAACiB,IAAI,EAAEL,mBAAmB,CAAC;EAEzE,IAAI,CAACE,IAAI,EAAE;IACT,oBACEV,KAAA;MAAAS,QAAA,GACGM,QAAQ,CAACC,cAAc,EAAC,GAAC,EAACP,QAAQ;IAAA,CAChC,CAAC;EAEV;EAEA,MAAMQ,KAAK,GAAGF,QAAQ,CAACG,YAAY;EAEnC,oBACElB,KAAA;IACEW,EAAE,EAAEA,EAAG;IACP,iBAAeD,IAAK;IACpB,wBAAsBL,MAAM,CAACc,QAAQ,CAAC,CAAE;IACxC,0BAAwBb,QAAS;IACjC,sBAAmB,UAAU;IAC7B,oBAAkBM,oBAAoB,IAAI,EAAG;IAC7C,sBAAoBD,EAAG;IACvB,0BAAwBE,IAAK;IAC7BO,SAAS,EAAC,aAAa;IAAAX,QAAA,gBAEvBP,IAAA,CAACR,QAAQ;MAAAe,QAAA,eACPT,KAAA,CAACF,aAAa;QAAAW,QAAA,gBACZP,IAAA,CAACL,UAAU;UACToB,KAAK,EAAEA,KAAM;UACbI,QAAQ,EAAC,uBAAuB;UAChCd,aAAa,EAAEA,aAAc;UAC7Be,OAAO,EAAE;YACPZ,IAAI,EAAE,UAAU;YAChBa,IAAI,EAAEZ,EAAE;YACRA,EAAE,EAAEC,oBAAoB,IAAI,EAAE;YAC9BE,QAAQ,EAAED;UACZ;QAAE,CACH,CAAC,EAEDJ,QAAQ;MAAA,CACI;IAAC,CACR,CAAC,eAEXP,IAAA,CAACP,SAAS;MAAAc,QAAA,EAAEA;IAAQ,CAAY,CAAC;EAAA,CAC9B,CAAC;AAEV","ignoreList":[]}
@@ -3,4 +3,3 @@ type IframeWrapperProps = {
3
3
  };
4
4
  export default function IframeWrapper({ children }: IframeWrapperProps): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
5
5
  export {};
6
- //# sourceMappingURL=iframe-wrapper.d.ts.map
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { c as _c } from "react/compiler-runtime";
4
- import { useIsInIframe } from '../../../shared/use-is-in-iframe';
4
+ import { useIsInIframe } from "../../../shared/use-is-in-iframe.js";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  export default function IframeWrapper(t0) {
7
7
  const $ = _c(2);
@@ -1 +1 @@
1
- {"version":3,"file":"iframe-wrapper.js","names":["c","_c","useIsInIframe","jsx","_jsx","IframeWrapper","t0","$","children","isInIframe","t1","className"],"sources":["../../../../src/visual-editor/internal/overlays/iframe-wrapper.tsx"],"sourcesContent":["'use client';\n\nimport { useIsInIframe } from '../../../shared/use-is-in-iframe';\n\ntype IframeWrapperProps = {\n children: React.ReactNode;\n};\n\nexport default function IframeWrapper({ children }: IframeWrapperProps) {\n const isInIframe = useIsInIframe();\n\n if (!isInIframe) {\n return children;\n }\n\n return (\n <div className=\"nh:rounded-lg nh:p-2 nh:outline-(--nh-primary) nh:hover:outline-2 nh:hover:-outline-offset-2 nh:hover:outline-dashed\">\n {children}\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,aAAa,QAAQ,kCAAkC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMjE,eAAe,SAAAC,cAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAN,EAAA;EAAuB;IAAAO;EAAA,IAAAF,EAAgC;EACpE,MAAAG,UAAA,GAAmBP,aAAa,CAAC,CAAC;EAElC,IAAI,CAACO,UAAU;IAAA,OACND,QAAQ;EAAA;EAChB,IAAAE,EAAA;EAAA,IAAAH,CAAA,QAAAC,QAAA;IAGCE,EAAA,gBAAAN,IAAA;MAAeO,SAAsH,EAAtH,sHAAsH;MAAAH,QAAA,EAClIA;IAAQ,CACN,CAAC;IAAAD,CAAA,MAAAC,QAAA;IAAAD,CAAA,MAAAG,EAAA;EAAA;IAAAA,EAAA,GAAAH,CAAA;EAAA;EAAA,OAFNG,EAEM;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"iframe-wrapper.js","names":["c","_c","useIsInIframe","jsx","_jsx","IframeWrapper","t0","$","children","isInIframe","t1","className"],"sources":["../../../../src/visual-editor/internal/overlays/iframe-wrapper.tsx"],"sourcesContent":["'use client';\n\nimport { useIsInIframe } from '../../../shared/use-is-in-iframe.ts';\n\ntype IframeWrapperProps = {\n children: React.ReactNode;\n};\n\nexport default function IframeWrapper({ children }: IframeWrapperProps) {\n const isInIframe = useIsInIframe();\n\n if (!isInIframe) {\n return children;\n }\n\n return (\n <div className=\"nh:rounded-lg nh:p-2 nh:outline-(--nh-primary) nh:hover:outline-2 nh:hover:-outline-offset-2 nh:hover:outline-dashed\">\n {children}\n </div>\n );\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,aAAa,QAAQ,qCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMpE,eAAe,SAAAC,cAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAN,EAAA;EAAuB;IAAAO;EAAA,IAAAF,EAAgC;EACpE,MAAAG,UAAA,GAAmBP,aAAa,CAAC,CAAC;EAElC,IAAI,CAACO,UAAU;IAAA,OACND,QAAQ;EAAA;EAChB,IAAAE,EAAA;EAAA,IAAAH,CAAA,QAAAC,QAAA;IAGCE,EAAA,gBAAAN,IAAA;MAAeO,SAAsH,EAAtH,sHAAsH;MAAAH,QAAA,EAClIA;IAAQ,CACN,CAAC;IAAAD,CAAA,MAAAC,QAAA;IAAAD,CAAA,MAAAG,EAAA;EAAA;IAAAA,EAAA,GAAAH,CAAA;EAAA;EAAA,OAFNG,EAEM;AAAA","ignoreList":[]}
@@ -1,9 +1,18 @@
1
+ import { type VisualEditorDictionaryOverrides } from '../../i18n.js';
1
2
  type MenuWrapperProps = {
2
- type?: string;
3
+ type?: 'menu';
3
4
  menuId: string;
4
5
  lang?: string;
6
+ /** Trusted Drupal base URL; falls back to NEXT_PUBLIC_DRUPAL_BASE_URL when omitted. */
7
+ drupalBaseUrl?: string;
8
+ /** Per-section label overrides merged over the resolved dictionary. */
9
+ dictionaryOverrides?: VisualEditorDictionaryOverrides;
5
10
  children: React.ReactNode;
6
11
  };
7
- export default function MenuWrapper({ type, menuId, lang, children, }: MenuWrapperProps): import("react").JSX.Element;
12
+ /**
13
+ * Renders the edit overlay for a menu (visible only to signed-in editors).
14
+ *
15
+ * Dynamic RSC (reads `cookies()` via the `<SignedIn>`/`<SignedOut>` gates); under `cacheComponents`, mount inside a `<Suspense>` boundary. See the visual-editor README.
16
+ */
17
+ export default function MenuWrapper({ type, menuId, lang, drupalBaseUrl, dictionaryOverrides, children, }: MenuWrapperProps): import("react").JSX.Element;
8
18
  export {};
9
- //# sourceMappingURL=menu-wrapper.d.ts.map
@@ -1,15 +1,22 @@
1
- import { SignedIn, SignedOut } from '../../../../auth/server';
2
- import { getVisualEditorDictionary } from '../../i18n';
3
- import EditButton from '../edit-button';
4
- import IframeWrapper from '../iframe-wrapper';
1
+ import { SignedIn, SignedOut } from "../../../../auth/server.js";
2
+ import { getVisualEditorDictionary } from "../../i18n.js";
3
+ import EditButton from "../edit-button.js";
4
+ import IframeWrapper from "../iframe-wrapper.js";
5
5
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ /**
7
+ * Renders the edit overlay for a menu (visible only to signed-in editors).
8
+ *
9
+ * Dynamic RSC (reads `cookies()` via the `<SignedIn>`/`<SignedOut>` gates); under `cacheComponents`, mount inside a `<Suspense>` boundary. See the visual-editor README.
10
+ */
6
11
  export default function MenuWrapper({
7
12
  type = 'menu',
8
13
  menuId,
9
14
  lang = 'en',
15
+ drupalBaseUrl,
16
+ dictionaryOverrides,
10
17
  children
11
18
  }) {
12
- const label = getVisualEditorDictionary(lang).overlays.editMenu;
19
+ const label = getVisualEditorDictionary(lang, dictionaryOverrides).overlays.editMenu;
13
20
  return /*#__PURE__*/_jsxs("div", {
14
21
  "data-nodehive-type": "menu",
15
22
  className: "nh:relative",
@@ -18,9 +25,11 @@ export default function MenuWrapper({
18
25
  children: [/*#__PURE__*/_jsx(EditButton, {
19
26
  label: label,
20
27
  position: "nh:-top-2 nh:-right-10",
28
+ drupalBaseUrl: drupalBaseUrl,
21
29
  message: {
22
30
  type: type,
23
31
  menu_id: menuId,
32
+ langcode: lang,
24
33
  lang: lang
25
34
  }
26
35
  }), children]