@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":"anchor.js","names":["humanize","normalizeAnchorId","value","undefined","slug","trim","replace","toLowerCase","isAnchorValue","startsWith","length","hasAnchorFragment","index","indexOf","isComponentData","props","collectFromComponent","component","out","anchorId","anchor","has","set","id","label","type","Object","values","Array","isArray","entry","collectPageAnchors","data","Map","doc","visitArray","content","zones","zone","root","sort","a","b","localeCompare"],"sources":["../../../../../src/puck-editor/internal/fields/link-picker/anchor.ts"],"sourcesContent":["import { humanize } from './humanize';\n\n/**\n * Normalizes an editor-entered anchor value into a valid element id:\n * trims, strips a leading '#', lowercases, turns whitespace into dashes\n * and drops anything that is not [a-z0-9-_].\n */\nexport function normalizeAnchorId(value?: string): string | undefined {\n if (!value) return undefined;\n const slug = value\n .trim()\n .replace(/^#+/, '')\n .toLowerCase()\n .replace(/\\s+/g, '-')\n .replace(/[^a-z0-9-_]/g, '')\n .replace(/-{2,}/g, '-');\n return slug || undefined;\n}\n\n/**\n * True when a stored link href points at an in-page anchor (`#section`). The\n * bare `#` placeholder is treated as empty (no link), so it is excluded.\n */\nexport function isAnchorValue(value?: string): boolean {\n return !!value && value.startsWith('#') && value.length > 1;\n}\n\n/**\n * True when a stored link href carries an in-page fragment anywhere — a\n * same-page anchor (`#start`), a cross-page anchor (`/onboarding#start`) or an\n * external one (`https://example.com#start`). The bare `#` placeholder counts\n * as empty. Used to route fragment-bearing values back into the picker's\n * \"Anchor\" mode on reload, since those are entered through the anchor field.\n */\nexport function hasAnchorFragment(value?: string): boolean {\n if (!value) return false;\n const index = value.indexOf('#');\n return index !== -1 && index < value.length - 1;\n}\n\n/** A section anchor available on the current Puck page. */\nexport interface PageAnchor {\n /** Normalized anchor id, without the leading '#'. */\n id: string;\n /** Human-readable hint for the picker dropdown (the section type). */\n label: string;\n}\n\ninterface PuckComponentData {\n type?: string;\n props?: Record<string, unknown>;\n}\n\nfunction isComponentData(value: unknown): value is PuckComponentData {\n return (\n typeof value === 'object' &&\n value !== null &&\n typeof (value as { props?: unknown }).props === 'object'\n );\n}\n\nfunction collectFromComponent(\n component: PuckComponentData,\n out: Map<string, PageAnchor>\n): void {\n const props = component.props;\n if (!props) return;\n\n const anchorId = normalizeAnchorId(\n typeof props.anchor === 'string' ? props.anchor : undefined\n );\n if (anchorId && !out.has(anchorId)) {\n out.set(anchorId, {\n id: anchorId,\n label: humanize(component.type ?? 'section'),\n });\n }\n\n // Recurse into inline slots: props whose value is an array of components.\n for (const value of Object.values(props)) {\n if (Array.isArray(value)) {\n for (const entry of value) {\n if (isComponentData(entry)) collectFromComponent(entry, out);\n }\n }\n }\n}\n\n/**\n * Walk a Puck document (`{ root, content, zones }`, slots inline in props) and\n * collect every section Anchor ID set on it, deduped and sorted. Drives the\n * \"Anchor\" mode of the shared link picker so editors link to same-page sections.\n */\nexport function collectPageAnchors(data: unknown): PageAnchor[] {\n const out = new Map<string, PageAnchor>();\n if (!data || typeof data !== 'object') return [];\n const doc = data as {\n root?: { props?: Record<string, unknown> };\n content?: unknown;\n zones?: Record<string, unknown>;\n };\n\n const visitArray = (value: unknown) => {\n if (!Array.isArray(value)) return;\n for (const entry of value) {\n if (isComponentData(entry)) collectFromComponent(entry, out);\n }\n };\n\n visitArray(doc.content);\n if (doc.zones) for (const zone of Object.values(doc.zones)) visitArray(zone);\n if (doc.root?.props) {\n for (const value of Object.values(doc.root.props)) visitArray(value);\n }\n\n return [...out.values()].sort((a, b) => a.id.localeCompare(b.id));\n}\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"anchor.js","names":["humanize","normalizeAnchorId","value","undefined","slug","trim","replace","toLowerCase","isAnchorValue","startsWith","length","hasAnchorFragment","index","indexOf","isComponentData","props","collectFromComponent","component","out","anchorId","anchor","has","set","id","label","type","Object","values","Array","isArray","entry","collectPageAnchors","data","Map","doc","visitArray","content","zones","zone","root","sort","a","b","localeCompare"],"sources":["../../../../../src/puck-editor/internal/fields/link-picker/anchor.ts"],"sourcesContent":["import { humanize } from './humanize.ts';\n\n/**\n * Normalizes an editor-entered anchor value into a valid element id:\n * trims, strips a leading '#', lowercases, turns whitespace into dashes\n * and drops anything that is not [a-z0-9-_].\n */\nexport function normalizeAnchorId(value?: string): string | undefined {\n if (!value) return undefined;\n const slug = value\n .trim()\n .replace(/^#+/, '')\n .toLowerCase()\n .replace(/\\s+/g, '-')\n .replace(/[^a-z0-9-_]/g, '')\n .replace(/-{2,}/g, '-');\n return slug || undefined;\n}\n\n/**\n * True when a stored link href points at an in-page anchor (`#section`). The\n * bare `#` placeholder is treated as empty (no link), so it is excluded.\n */\nexport function isAnchorValue(value?: string): boolean {\n return !!value && value.startsWith('#') && value.length > 1;\n}\n\n/**\n * True when a stored link href carries an in-page fragment anywhere — a\n * same-page anchor (`#start`), a cross-page anchor (`/onboarding#start`) or an\n * external one (`https://example.com#start`). The bare `#` placeholder counts\n * as empty. Used to route fragment-bearing values back into the picker's\n * \"Anchor\" mode on reload, since those are entered through the anchor field.\n */\nexport function hasAnchorFragment(value?: string): boolean {\n if (!value) return false;\n const index = value.indexOf('#');\n return index !== -1 && index < value.length - 1;\n}\n\n/** A section anchor available on the current Puck page. */\nexport interface PageAnchor {\n /** Normalized anchor id, without the leading '#'. */\n id: string;\n /** Human-readable hint for the picker dropdown (the section type). */\n label: string;\n}\n\ninterface PuckComponentData {\n type?: string;\n props?: Record<string, unknown>;\n}\n\nfunction isComponentData(value: unknown): value is PuckComponentData {\n return (\n typeof value === 'object' &&\n value !== null &&\n typeof (value as { props?: unknown }).props === 'object'\n );\n}\n\nfunction collectFromComponent(\n component: PuckComponentData,\n out: Map<string, PageAnchor>\n): void {\n const props = component.props;\n if (!props) return;\n\n const anchorId = normalizeAnchorId(\n typeof props.anchor === 'string' ? props.anchor : undefined\n );\n if (anchorId && !out.has(anchorId)) {\n out.set(anchorId, {\n id: anchorId,\n label: humanize(component.type ?? 'section'),\n });\n }\n\n // Recurse into inline slots: props whose value is an array of components.\n for (const value of Object.values(props)) {\n if (Array.isArray(value)) {\n for (const entry of value) {\n if (isComponentData(entry)) collectFromComponent(entry, out);\n }\n }\n }\n}\n\n/**\n * Walk a Puck document (`{ root, content, zones }`, slots inline in props) and\n * collect every section Anchor ID set on it, deduped and sorted. Drives the\n * \"Anchor\" mode of the shared link picker so editors link to same-page sections.\n */\nexport function collectPageAnchors(data: unknown): PageAnchor[] {\n const out = new Map<string, PageAnchor>();\n if (!data || typeof data !== 'object') return [];\n const doc = data as {\n root?: { props?: Record<string, unknown> };\n content?: unknown;\n zones?: Record<string, unknown>;\n };\n\n const visitArray = (value: unknown) => {\n if (!Array.isArray(value)) return;\n for (const entry of value) {\n if (isComponentData(entry)) collectFromComponent(entry, out);\n }\n };\n\n visitArray(doc.content);\n if (doc.zones) for (const zone of Object.values(doc.zones)) visitArray(zone);\n if (doc.root?.props) {\n for (const value of Object.values(doc.root.props)) visitArray(value);\n }\n\n return [...out.values()].sort((a, b) => a.id.localeCompare(b.id));\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { type LinkValue } from './link-value';
1
+ import { type LinkValue } from './link-value.js';
2
2
  interface LinkFieldOptions {
3
3
  label?: string;
4
4
  }
@@ -21,4 +21,3 @@ export declare const createLinkField: ({ label }?: LinkFieldOptions) => {
21
21
  }) => import("react").JSX.Element;
22
22
  };
23
23
  export {};
24
- //# sourceMappingURL=create-link-field.d.ts.map
@@ -1,4 +1,4 @@
1
- import LinkPickerField from './link-picker-field';
1
+ import LinkPickerField from "./link-picker-field.js";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  /**
4
4
  * Reusable LinkPicker field. Stores a bundled {@link LinkValue}
@@ -1 +1 @@
1
- {"version":3,"file":"create-link-field.js","names":["LinkPickerField","jsx","_jsx","createLinkField","label","type","render","field","value","onChange","id"],"sources":["../../../../../src/puck-editor/internal/fields/link-picker/create-link-field.tsx"],"sourcesContent":["import type { CustomFieldRender } from '@puckeditor/core';\n\nimport LinkPickerField from './link-picker-field';\nimport { type LinkValue } from './link-value';\n\ninterface LinkFieldOptions {\n label?: string;\n}\n\n/**\n * Reusable LinkPicker field. Stores a bundled {@link LinkValue}\n * (`{ href, target }`) and supports internal pages, external URLs, in-page\n * anchors and a target override. Consume the stored value with `resolveLink()`\n * from `@nodehive/nextjs/puck-editor/fields` in the component's `render`.\n */\nexport const createLinkField = ({ label }: LinkFieldOptions = {}) => {\n return {\n type: 'custom' as const,\n label,\n // Key by the field id so switching between components (or array items)\n // remounts the picker — its mode/anchor state is derived from the initial\n // href, so reusing the same instance would show a stale mode for the new\n // value.\n render: (({ field, value, onChange, id }) => (\n <LinkPickerField\n key={id}\n label={field.label ?? label}\n value={value}\n onChange={onChange}\n />\n )) satisfies CustomFieldRender<LinkValue | string>,\n };\n};\n"],"mappings":"AAEA,OAAOA,eAAe,MAAM,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOlD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAAEC;AAAwB,CAAC,GAAG,CAAC,CAAC,KAAK;EACnE,OAAO;IACLC,IAAI,EAAE,QAAiB;IACvBD,KAAK;IACL;IACA;IACA;IACA;IACAE,MAAM,EAAGA,CAAC;MAAEC,KAAK;MAAEC,KAAK;MAAEC,QAAQ;MAAEC;IAAG,CAAC,kBACtCR,IAAA,CAACF,eAAe;MAEdI,KAAK,EAAEG,KAAK,CAACH,KAAK,IAAIA,KAAM;MAC5BI,KAAK,EAAEA,KAAM;MACbC,QAAQ,EAAEA;IAAS,GAHdC,EAIN;EAEL,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"create-link-field.js","names":["LinkPickerField","jsx","_jsx","createLinkField","label","type","render","field","value","onChange","id"],"sources":["../../../../../src/puck-editor/internal/fields/link-picker/create-link-field.tsx"],"sourcesContent":["import type { CustomFieldRender } from '@puckeditor/core';\n\nimport LinkPickerField from './link-picker-field.tsx';\nimport { type LinkValue } from './link-value.ts';\n\ninterface LinkFieldOptions {\n label?: string;\n}\n\n/**\n * Reusable LinkPicker field. Stores a bundled {@link LinkValue}\n * (`{ href, target }`) and supports internal pages, external URLs, in-page\n * anchors and a target override. Consume the stored value with `resolveLink()`\n * from `@nodehive/nextjs/puck-editor/fields` in the component's `render`.\n */\nexport const createLinkField = ({ label }: LinkFieldOptions = {}) => {\n return {\n type: 'custom' as const,\n label,\n // Key by the field id so switching between components (or array items)\n // remounts the picker — its mode/anchor state is derived from the initial\n // href, so reusing the same instance would show a stale mode for the new\n // value.\n render: (({ field, value, onChange, id }) => (\n <LinkPickerField\n key={id}\n label={field.label ?? label}\n value={value}\n onChange={onChange}\n />\n )) satisfies CustomFieldRender<LinkValue | string>,\n };\n};\n"],"mappings":"AAEA,OAAOA,eAAe,MAAM,wBAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOtD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAAEC;AAAwB,CAAC,GAAG,CAAC,CAAC,KAAK;EACnE,OAAO;IACLC,IAAI,EAAE,QAAiB;IACvBD,KAAK;IACL;IACA;IACA;IACA;IACAE,MAAM,EAAGA,CAAC;MAAEC,KAAK;MAAEC,KAAK;MAAEC,QAAQ;MAAEC;IAAG,CAAC,kBACtCR,IAAA,CAACF,eAAe;MAEdI,KAAK,EAAEG,KAAK,CAACH,KAAK,IAAIA,KAAM;MAC5BI,KAAK,EAAEA,KAAM;MACbC,QAAQ,EAAEA;IAAS,GAHdC,EAIN;EAEL,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,2 +1 @@
1
1
  export declare function humanize(value: string): string;
2
- //# sourceMappingURL=humanize.d.ts.map
@@ -24,4 +24,3 @@ type LinkPickerControlProps = {
24
24
  */
25
25
  export default function LinkPickerControl({ href, onHrefChange, onSubmit, }: LinkPickerControlProps): import("react").JSX.Element;
26
26
  export {};
27
- //# sourceMappingURL=link-picker-control.d.ts.map
@@ -6,14 +6,14 @@ import { createUsePuck } from '@puckeditor/core';
6
6
  import * as Popover from '@radix-ui/react-popover';
7
7
  import { keepPreviousData, useQuery } from '@tanstack/react-query';
8
8
  import { ChevronDown, Search, X } from 'lucide-react';
9
- import { puckFetch } from '../../api/client';
10
- import { usePuckDictionary } from '../../i18n';
11
- import { getPathLocale } from '../../locale';
12
- import { collectPageAnchors, hasAnchorFragment } from './anchor';
13
- import { humanize } from './humanize';
14
- import { isExternalHref } from './link-value';
15
- import SegmentedControl from './segmented-control';
16
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ import { puckFetch } from "../../api/client.js";
10
+ import { usePuckDictionary, usePuckLocale } from "../../i18n.js";
11
+ import { getPathLocale } from "../../locale.js";
12
+ import { collectPageAnchors, hasAnchorFragment } from "./anchor.js";
13
+ import { humanize } from "./humanize.js";
14
+ import { isExternalHref, isSafeHref } from "./link-value.js";
15
+ import SegmentedControl from "./segmented-control.js";
16
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
17
17
  const MODE_VALUES = ['internal', 'external', 'anchor'];
18
18
  const usePuck = createUsePuck();
19
19
 
@@ -53,7 +53,7 @@ function displayPath(path, locale) {
53
53
  * richtext link popover so both surfaces share identical selection UI.
54
54
  */
55
55
  export default function LinkPickerControl(t0) {
56
- const $ = _c(21);
56
+ const $ = _c(24);
57
57
  const {
58
58
  href,
59
59
  onHrefChange,
@@ -87,9 +87,11 @@ export default function LinkPickerControl(t0) {
87
87
  }
88
88
  const anchors = t3;
89
89
  const t = usePuckDictionary().linkPicker;
90
+ const editorLocale = usePuckLocale();
90
91
  const [open, setOpen] = useState(false);
91
92
  const [query, setQuery] = useState("");
92
93
  const [activeGroup, setActiveGroup] = useState(null);
94
+ const [unsafeHint, setUnsafeHint] = useState(false);
93
95
  const locale = typeof window !== "undefined" ? getPathLocale(window.location.pathname) : "en";
94
96
  const {
95
97
  data: links,
@@ -162,7 +164,7 @@ export default function LinkPickerControl(t0) {
162
164
  key: key_4,
163
165
  label: groupLabelOf(key_4),
164
166
  order: groupOrderOf(key_4),
165
- items: items.sort((a_0, b_0) => linkLabel(a_0, locale).localeCompare(linkLabel(b_0, locale)))
167
+ items: items.sort((a_0, b_0) => linkLabel(a_0, locale).localeCompare(linkLabel(b_0, locale), editorLocale))
166
168
  };
167
169
  }).sort(_temp3);
168
170
  }
@@ -182,8 +184,25 @@ export default function LinkPickerControl(t0) {
182
184
  }
183
185
  const submitOnEnter = t6;
184
186
  let t7;
185
- if ($[8] !== mode || $[9] !== onHrefChange) {
186
- t7 = next => {
187
+ if ($[8] !== href || $[9] !== onHrefChange) {
188
+ t7 = () => {
189
+ if (isSafeHref(href)) {
190
+ return false;
191
+ }
192
+ onHrefChange("");
193
+ setUnsafeHint(true);
194
+ return true;
195
+ };
196
+ $[8] = href;
197
+ $[9] = onHrefChange;
198
+ $[10] = t7;
199
+ } else {
200
+ t7 = $[10];
201
+ }
202
+ const neutralizeUnsafe = t7;
203
+ let t8;
204
+ if ($[11] !== mode || $[12] !== onHrefChange) {
205
+ t8 = next => {
187
206
  if (next === mode) {
188
207
  return;
189
208
  }
@@ -193,49 +212,64 @@ export default function LinkPickerControl(t0) {
193
212
  setActiveGroup(null);
194
213
  setOpen(false);
195
214
  };
196
- $[8] = mode;
197
- $[9] = onHrefChange;
198
- $[10] = t7;
215
+ $[11] = mode;
216
+ $[12] = onHrefChange;
217
+ $[13] = t8;
199
218
  } else {
200
- t7 = $[10];
219
+ t8 = $[13];
201
220
  }
202
- const switchMode = t7;
203
- const t8 = "nh:flex nh:flex-col nh:gap-2";
204
- let t9;
205
- if ($[11] !== t) {
206
- t9 = MODE_VALUES.map(value => ({
221
+ const switchMode = t8;
222
+ const t9 = "nh:flex nh:flex-col nh:gap-2";
223
+ let t10;
224
+ if ($[14] !== t) {
225
+ t10 = MODE_VALUES.map(value => ({
207
226
  value,
208
227
  label: t[value]
209
228
  }));
210
- $[11] = t;
211
- $[12] = t9;
229
+ $[14] = t;
230
+ $[15] = t10;
212
231
  } else {
213
- t9 = $[12];
232
+ t10 = $[15];
214
233
  }
215
- let t10;
216
- if ($[13] !== mode || $[14] !== switchMode || $[15] !== t.linkMode || $[16] !== t9) {
217
- t10 = /*#__PURE__*/_jsx(SegmentedControl, {
218
- options: t9,
234
+ let t11;
235
+ if ($[16] !== mode || $[17] !== switchMode || $[18] !== t.linkMode || $[19] !== t10) {
236
+ t11 = /*#__PURE__*/_jsx(SegmentedControl, {
237
+ options: t10,
219
238
  value: mode,
220
239
  onChange: switchMode,
221
240
  variant: "puck",
222
241
  ariaLabel: t.linkMode
223
242
  });
224
- $[13] = mode;
225
- $[14] = switchMode;
226
- $[15] = t.linkMode;
227
- $[16] = t9;
228
- $[17] = t10;
243
+ $[16] = mode;
244
+ $[17] = switchMode;
245
+ $[18] = t.linkMode;
246
+ $[19] = t10;
247
+ $[20] = t11;
229
248
  } else {
230
- t10 = $[17];
249
+ t11 = $[20];
231
250
  }
232
- const t11 = mode === "external" ? /*#__PURE__*/_jsx("input", {
233
- type: "text",
234
- value: href,
235
- placeholder: t.externalPlaceholder,
236
- onChange: e_0 => onHrefChange(e_0.target.value),
237
- onKeyDown: submitOnEnter,
238
- className: "nh:w-full nh:rounded-sm nh:border nh:border-(--nh-border) nh:p-3 nh:text-sm"
251
+ const t12 = mode === "external" ? /*#__PURE__*/_jsxs(_Fragment, {
252
+ children: [/*#__PURE__*/_jsx("input", {
253
+ type: "text",
254
+ value: href,
255
+ placeholder: t.externalPlaceholder,
256
+ onChange: e_0 => {
257
+ setUnsafeHint(false);
258
+ onHrefChange(e_0.target.value);
259
+ },
260
+ onKeyDown: e_1 => {
261
+ if (e_1.key === "Enter" && neutralizeUnsafe()) {
262
+ e_1.preventDefault();
263
+ return;
264
+ }
265
+ submitOnEnter(e_1);
266
+ },
267
+ onBlur: () => neutralizeUnsafe(),
268
+ className: "nh:w-full nh:rounded-sm nh:border nh:border-(--nh-border) nh:p-3 nh:text-sm"
269
+ }), unsafeHint && /*#__PURE__*/_jsx("p", {
270
+ className: "nh:text-xs nh:text-red-600",
271
+ children: t.unsafeLink
272
+ })]
239
273
  }) : mode === "anchor" ? /*#__PURE__*/_jsx(AnchorInput, {
240
274
  href: href,
241
275
  anchors: anchors,
@@ -255,17 +289,17 @@ export default function LinkPickerControl(t0) {
255
289
  className: "nh:flex nh:min-w-0 nh:items-center nh:gap-2",
256
290
  children: [/*#__PURE__*/_jsx("span", {
257
291
  className: isEmptyValue(href) ? "nh:truncate nh:text-gray-500" : "nh:truncate",
258
- children: isEmptyValue(href) ? "Select page \u2026" : selectedLink ? linkLabel(selectedLink, locale) : href
292
+ children: isEmptyValue(href) ? t.selectPage : selectedLink ? linkLabel(selectedLink, locale) : href
259
293
  }), selectedLink?.published === false && /*#__PURE__*/_jsx("span", {
260
294
  className: "nh:shrink-0 nh:rounded-full nh:bg-amber-50 nh:px-1.5 nh:py-0.5 nh:text-[9px] nh:font-semibold nh:uppercase nh:tracking-wide nh:text-amber-600 nh:ring-1 nh:ring-inset nh:ring-amber-200",
261
- children: "Draft"
295
+ children: t.draft
262
296
  })]
263
297
  }), /*#__PURE__*/_jsxs("span", {
264
298
  className: "nh:flex nh:shrink-0 nh:items-center nh:gap-1",
265
299
  children: [!isEmptyValue(href) && /*#__PURE__*/_jsx(X, {
266
300
  className: "nh:size-4 nh:text-gray-500 nh:hover:text-(--nh-fg)",
267
- onClick: e_1 => {
268
- e_1.stopPropagation();
301
+ onClick: e_2 => {
302
+ e_2.stopPropagation();
269
303
  onHrefChange("");
270
304
  }
271
305
  }), /*#__PURE__*/_jsx(ChevronDown, {
@@ -291,7 +325,7 @@ export default function LinkPickerControl(t0) {
291
325
  autoFocus: true,
292
326
  value: query,
293
327
  placeholder: t.searchPlaceholder,
294
- onChange: e_2 => setQuery(e_2.target.value),
328
+ onChange: e_3 => setQuery(e_3.target.value),
295
329
  className: "nh:w-full nh:text-sm outline-none"
296
330
  })]
297
331
  }), availableGroups.length > 1 && /*#__PURE__*/_jsx("div", {
@@ -339,7 +373,7 @@ export default function LinkPickerControl(t0) {
339
373
  children: linkLabel(link_0, locale)
340
374
  }), link_0.published === false && /*#__PURE__*/_jsx("span", {
341
375
  className: "nh:shrink-0 nh:rounded-full nh:bg-amber-50 nh:px-1.5 nh:py-0.5 nh:text-[9px] nh:font-semibold nh:uppercase nh:tracking-wide nh:text-amber-600 nh:ring-1 nh:ring-inset nh:ring-amber-200",
342
- children: "Draft"
376
+ children: t.draft
343
377
  })]
344
378
  }), /*#__PURE__*/_jsx("span", {
345
379
  className: "nh:w-full nh:truncate nh:font-mono nh:text-xs nh:text-gray-500",
@@ -353,19 +387,19 @@ export default function LinkPickerControl(t0) {
353
387
  })]
354
388
  })
355
389
  });
356
- let t12;
357
- if ($[18] !== t10 || $[19] !== t11) {
358
- t12 = /*#__PURE__*/_jsxs("div", {
359
- className: t8,
360
- children: [t10, t11]
390
+ let t13;
391
+ if ($[21] !== t11 || $[22] !== t12) {
392
+ t13 = /*#__PURE__*/_jsxs("div", {
393
+ className: t9,
394
+ children: [t11, t12]
361
395
  });
362
- $[18] = t10;
363
- $[19] = t11;
364
- $[20] = t12;
396
+ $[21] = t11;
397
+ $[22] = t12;
398
+ $[23] = t13;
365
399
  } else {
366
- t12 = $[20];
400
+ t13 = $[23];
367
401
  }
368
- return t12;
402
+ return t13;
369
403
  }
370
404
  function _temp3(a_1, b_1) {
371
405
  return a_1.order - b_1.order;
@@ -391,7 +425,7 @@ const OTHER_ANCHOR = '__other__';
391
425
  * preselects «Other …» and shows it in the text field, so links round-trip.
392
426
  */
393
427
  function AnchorInput(t0) {
394
- const $ = _c(34);
428
+ const $ = _c(42);
395
429
  const {
396
430
  href,
397
431
  anchors,
@@ -427,10 +461,28 @@ function AnchorInput(t0) {
427
461
  t2 = $[7];
428
462
  }
429
463
  const [isOther, setIsOther] = useState(t2);
430
- const selectValue = isOther ? OTHER_ANCHOR : matchesSection ? href : "";
464
+ const [unsafeHint, setUnsafeHint] = useState(false);
431
465
  let t3;
432
- if ($[8] !== matchesSection || $[9] !== onHrefChange) {
433
- t3 = e => {
466
+ if ($[8] !== href || $[9] !== onHrefChange) {
467
+ t3 = () => {
468
+ if (isSafeHref(href)) {
469
+ return false;
470
+ }
471
+ onHrefChange("");
472
+ setUnsafeHint(true);
473
+ return true;
474
+ };
475
+ $[8] = href;
476
+ $[9] = onHrefChange;
477
+ $[10] = t3;
478
+ } else {
479
+ t3 = $[10];
480
+ }
481
+ const neutralizeUnsafe = t3;
482
+ const selectValue = isOther ? OTHER_ANCHOR : matchesSection ? href : "";
483
+ let t4;
484
+ if ($[11] !== matchesSection || $[12] !== onHrefChange) {
485
+ t4 = e => {
434
486
  const next = e.target.value;
435
487
  if (next === OTHER_ANCHOR) {
436
488
  setIsOther(true);
@@ -442,118 +494,134 @@ function AnchorInput(t0) {
442
494
  setIsOther(false);
443
495
  onHrefChange(next);
444
496
  };
445
- $[8] = matchesSection;
446
- $[9] = onHrefChange;
447
- $[10] = t3;
497
+ $[11] = matchesSection;
498
+ $[12] = onHrefChange;
499
+ $[13] = t4;
448
500
  } else {
449
- t3 = $[10];
501
+ t4 = $[13];
450
502
  }
451
- let t4;
452
- if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
453
- t4 = /*#__PURE__*/_jsx("option", {
503
+ let t5;
504
+ if ($[14] !== t.selectSection) {
505
+ t5 = /*#__PURE__*/_jsx("option", {
454
506
  value: "",
455
- children: "Select section \u2026"
507
+ children: t.selectSection
456
508
  });
457
- $[11] = t4;
509
+ $[14] = t.selectSection;
510
+ $[15] = t5;
458
511
  } else {
459
- t4 = $[11];
512
+ t5 = $[15];
460
513
  }
461
- let t5;
462
- if ($[12] !== anchors) {
463
- t5 = anchors.map(_temp4);
464
- $[12] = anchors;
465
- $[13] = t5;
514
+ let t6;
515
+ if ($[16] !== anchors) {
516
+ t6 = anchors.map(_temp4);
517
+ $[16] = anchors;
518
+ $[17] = t6;
466
519
  } else {
467
- t5 = $[13];
520
+ t6 = $[17];
468
521
  }
469
- let t6;
470
- if ($[14] !== t.otherAnchor) {
471
- t6 = /*#__PURE__*/_jsx("option", {
522
+ let t7;
523
+ if ($[18] !== t.otherAnchor) {
524
+ t7 = /*#__PURE__*/_jsx("option", {
472
525
  value: OTHER_ANCHOR,
473
526
  children: t.otherAnchor
474
527
  });
475
- $[14] = t.otherAnchor;
476
- $[15] = t6;
528
+ $[18] = t.otherAnchor;
529
+ $[19] = t7;
477
530
  } else {
478
- t6 = $[15];
531
+ t7 = $[19];
479
532
  }
480
- let t7;
481
- if ($[16] !== selectValue || $[17] !== t3 || $[18] !== t5 || $[19] !== t6) {
482
- t7 = /*#__PURE__*/_jsxs("select", {
533
+ let t8;
534
+ if ($[20] !== selectValue || $[21] !== t4 || $[22] !== t5 || $[23] !== t6 || $[24] !== t7) {
535
+ t8 = /*#__PURE__*/_jsxs("select", {
483
536
  value: selectValue,
484
- onChange: t3,
537
+ onChange: t4,
485
538
  className: "nh:w-full nh:rounded-sm nh:border nh:border-(--nh-border) nh:p-3 nh:text-sm",
486
- children: [t4, t5, t6]
539
+ children: [t5, t6, t7]
487
540
  });
488
- $[16] = selectValue;
489
- $[17] = t3;
490
- $[18] = t5;
491
- $[19] = t6;
492
- $[20] = t7;
541
+ $[20] = selectValue;
542
+ $[21] = t4;
543
+ $[22] = t5;
544
+ $[23] = t6;
545
+ $[24] = t7;
546
+ $[25] = t8;
493
547
  } else {
494
- t7 = $[20];
548
+ t8 = $[25];
495
549
  }
496
- let t8;
497
- if ($[21] !== href || $[22] !== isOther || $[23] !== onHrefChange || $[24] !== onSubmit || $[25] !== t.anchorPlaceholder) {
498
- t8 = isOther && /*#__PURE__*/_jsx("input", {
499
- type: "text",
500
- value: href,
501
- placeholder: t.anchorPlaceholder,
502
- onChange: e_0 => onHrefChange(e_0.target.value),
503
- onKeyDown: e_1 => {
504
- if (e_1.key === "Enter") {
505
- e_1.preventDefault();
506
- onSubmit?.();
507
- }
508
- },
509
- className: "nh:w-full nh:rounded-sm nh:border nh:border-(--nh-border) nh:p-3 nh:text-sm"
550
+ let t9;
551
+ if ($[26] !== href || $[27] !== isOther || $[28] !== neutralizeUnsafe || $[29] !== onHrefChange || $[30] !== onSubmit || $[31] !== t.anchorPlaceholder || $[32] !== t.unsafeLink || $[33] !== unsafeHint) {
552
+ t9 = isOther && /*#__PURE__*/_jsxs(_Fragment, {
553
+ children: [/*#__PURE__*/_jsx("input", {
554
+ type: "text",
555
+ value: href,
556
+ placeholder: t.anchorPlaceholder,
557
+ onChange: e_0 => {
558
+ setUnsafeHint(false);
559
+ onHrefChange(e_0.target.value);
560
+ },
561
+ onKeyDown: e_1 => {
562
+ if (e_1.key === "Enter") {
563
+ e_1.preventDefault();
564
+ if (!neutralizeUnsafe()) {
565
+ onSubmit?.();
566
+ }
567
+ }
568
+ },
569
+ onBlur: () => neutralizeUnsafe(),
570
+ className: "nh:w-full nh:rounded-sm nh:border nh:border-(--nh-border) nh:p-3 nh:text-sm"
571
+ }), unsafeHint && /*#__PURE__*/_jsx("p", {
572
+ className: "nh:text-xs nh:text-red-600",
573
+ children: t.unsafeLink
574
+ })]
510
575
  });
511
- $[21] = href;
512
- $[22] = isOther;
513
- $[23] = onHrefChange;
514
- $[24] = onSubmit;
515
- $[25] = t.anchorPlaceholder;
516
- $[26] = t8;
576
+ $[26] = href;
577
+ $[27] = isOther;
578
+ $[28] = neutralizeUnsafe;
579
+ $[29] = onHrefChange;
580
+ $[30] = onSubmit;
581
+ $[31] = t.anchorPlaceholder;
582
+ $[32] = t.unsafeLink;
583
+ $[33] = unsafeHint;
584
+ $[34] = t9;
517
585
  } else {
518
- t8 = $[26];
586
+ t9 = $[34];
519
587
  }
520
- let t9;
521
- if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
522
- t9 = {
588
+ let t10;
589
+ if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
590
+ t10 = {
523
591
  fontSize: "var(--puck-font-size-xxxs)",
524
- color: "var(--puck-color-grey-05)",
592
+ color: "var(--puck-color-text-muted)",
525
593
  lineHeight: 1.4
526
594
  };
527
- $[27] = t9;
595
+ $[35] = t10;
528
596
  } else {
529
- t9 = $[27];
597
+ t10 = $[35];
530
598
  }
531
- const t10 = anchors.length === 0 ? "No sections on this page yet. Choose \xABOther \u2026\xBB to link to an anchor on another page or an external page." : "Pick a section on this page, or \xABOther \u2026\xBB for an anchor on another page (/onboarding#anchor) or external page (https://\u2026#anchor).";
532
- let t11;
533
- if ($[28] !== t10) {
534
- t11 = /*#__PURE__*/_jsx("p", {
535
- style: t9,
536
- children: t10
599
+ const t11 = anchors.length === 0 ? t.anchorHelpEmpty : t.anchorHelp;
600
+ let t12;
601
+ if ($[36] !== t11) {
602
+ t12 = /*#__PURE__*/_jsx("p", {
603
+ style: t10,
604
+ children: t11
537
605
  });
538
- $[28] = t10;
539
- $[29] = t11;
606
+ $[36] = t11;
607
+ $[37] = t12;
540
608
  } else {
541
- t11 = $[29];
609
+ t12 = $[37];
542
610
  }
543
- let t12;
544
- if ($[30] !== t11 || $[31] !== t7 || $[32] !== t8) {
545
- t12 = /*#__PURE__*/_jsxs("div", {
611
+ let t13;
612
+ if ($[38] !== t12 || $[39] !== t8 || $[40] !== t9) {
613
+ t13 = /*#__PURE__*/_jsxs("div", {
546
614
  className: "nh:flex nh:flex-col nh:gap-2",
547
- children: [t7, t8, t11]
615
+ children: [t8, t9, t12]
548
616
  });
549
- $[30] = t11;
550
- $[31] = t7;
551
- $[32] = t8;
552
- $[33] = t12;
617
+ $[38] = t12;
618
+ $[39] = t8;
619
+ $[40] = t9;
620
+ $[41] = t13;
553
621
  } else {
554
- t12 = $[33];
622
+ t13 = $[41];
555
623
  }
556
- return t12;
624
+ return t13;
557
625
  }
558
626
  function _temp4(anchor) {
559
627
  return /*#__PURE__*/_jsxs("option", {