@focus-reactive/payload-plugin-translator 0.6.1 → 0.7.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 (487) hide show
  1. package/README.md +55 -0
  2. package/dist/client/app/cache/CacheProvider.d.ts +1 -1
  3. package/dist/client/app/cache/CacheProvider.export.d.ts +1 -1
  4. package/dist/client/app/cache/CacheProvider.export.js +2 -2
  5. package/dist/client/app/cache/CacheProvider.js +5 -5
  6. package/dist/client/app/config/TranslateKitConfigContext.d.ts +1 -1
  7. package/dist/client/app/config/TranslateKitConfigContext.js +3 -3
  8. package/dist/client/app/config/index.d.ts +2 -2
  9. package/dist/client/app/config/index.js +1 -1
  10. package/dist/client/entities/translation/api/mutations/useCancelCollectionTranslations.js +7 -7
  11. package/dist/client/entities/translation/api/mutations/useCancelDocumentTranslation.js +7 -7
  12. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.d.ts +1 -1
  13. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslation.js +8 -8
  14. package/dist/client/entities/translation/api/mutations/useQueueDocumentTranslations.js +6 -6
  15. package/dist/client/entities/translation/api/mutations/useRunDocumentTranslation.js +7 -7
  16. package/dist/client/entities/translation/api/mutations/useTranslateField.d.ts +1 -1
  17. package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.d.ts +2 -2
  18. package/dist/client/entities/translation/api/queries/useCollectionTranslationStatus.js +9 -10
  19. package/dist/client/entities/translation/api/queries/useDocumentTranslation.d.ts +2 -2
  20. package/dist/client/entities/translation/api/queries/useDocumentTranslation.js +9 -10
  21. package/dist/client/entities/translation/index.d.ts +12 -12
  22. package/dist/client/entities/translation/index.js +11 -11
  23. package/dist/client/entities/translation/model/types.d.ts +1 -1
  24. package/dist/client/entities/translation/ui/CompletedTranslationStatus/CompletedTranslationStatus.js +12 -12
  25. package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.d.ts +1 -1
  26. package/dist/client/entities/translation/ui/CompletedTranslationStatus/index.js +1 -1
  27. package/dist/client/entities/translation/ui/CompletedTranslationStatus/styles.module.scss +1 -1
  28. package/dist/client/entities/translation/ui/FailedTranslationStatus/FailedTranslationStatus.js +8 -8
  29. package/dist/client/entities/translation/ui/FailedTranslationStatus/index.d.ts +1 -1
  30. package/dist/client/entities/translation/ui/FailedTranslationStatus/index.js +1 -1
  31. package/dist/client/entities/translation/ui/FailedTranslationStatus/styles.module.scss +1 -1
  32. package/dist/client/entities/translation/ui/PendingTranslationStatus/PendingTranslationStatus.js +14 -14
  33. package/dist/client/entities/translation/ui/PendingTranslationStatus/index.d.ts +1 -1
  34. package/dist/client/entities/translation/ui/PendingTranslationStatus/index.js +1 -1
  35. package/dist/client/entities/translation/ui/RunningTranslationStatus/RunningTranslationStatus.js +13 -13
  36. package/dist/client/entities/translation/ui/RunningTranslationStatus/index.d.ts +1 -1
  37. package/dist/client/entities/translation/ui/RunningTranslationStatus/index.js +1 -1
  38. package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.d.ts +1 -1
  39. package/dist/client/entities/translation/ui/TranslationDirection/TranslationDirection.js +2 -2
  40. package/dist/client/entities/translation/ui/TranslationDirection/index.d.ts +1 -1
  41. package/dist/client/entities/translation/ui/TranslationDirection/index.js +1 -1
  42. package/dist/client/entities/translation/ui/TranslationDirection/styles.module.scss +1 -1
  43. package/dist/client/features/collection-translation-form/index.client.d.ts +1 -1
  44. package/dist/client/features/collection-translation-form/index.client.js +1 -1
  45. package/dist/client/features/collection-translation-form/index.d.ts +3 -3
  46. package/dist/client/features/collection-translation-form/index.js +2 -2
  47. package/dist/client/features/collection-translation-form/model/constants.d.ts +1 -1
  48. package/dist/client/features/collection-translation-form/model/constants.js +9 -9
  49. package/dist/client/features/collection-translation-form/model/form-model.d.ts +1 -1
  50. package/dist/client/features/collection-translation-form/model/index.d.ts +1 -1
  51. package/dist/client/features/collection-translation-form/model/index.js +1 -1
  52. package/dist/client/features/collection-translation-form/model/schema.d.ts +1 -1
  53. package/dist/client/features/collection-translation-form/model/schema.js +6 -6
  54. package/dist/client/features/collection-translation-form/ui/CollectionTranslationForm.d.ts +1 -1
  55. package/dist/client/features/collection-translation-form/ui/index.d.ts +1 -1
  56. package/dist/client/features/collection-translation-form/ui/index.js +1 -1
  57. package/dist/client/features/collection-translation-form/ui/styles.module.scss +1 -1
  58. package/dist/client/features/collection-translation-popup/index.d.ts +1 -1
  59. package/dist/client/features/collection-translation-popup/index.js +1 -1
  60. package/dist/client/features/collection-translation-popup/ui/CollectionTranslationPopup.d.ts +1 -1
  61. package/dist/client/features/collection-translation-popup/ui/styles.module.scss +1 -1
  62. package/dist/client/features/collection-translation-progress/index.d.ts +1 -1
  63. package/dist/client/features/collection-translation-progress/index.js +1 -1
  64. package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.d.ts +2 -2
  65. package/dist/client/features/collection-translation-progress/ui/CollectionTranslationProgress.js +13 -13
  66. package/dist/client/features/collection-translation-progress/ui/styles.module.scss +1 -1
  67. package/dist/client/features/document-translation-progress-failed/index.d.ts +1 -1
  68. package/dist/client/features/document-translation-progress-failed/index.js +1 -1
  69. package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.d.ts +2 -2
  70. package/dist/client/features/document-translation-progress-failed/ui/DocumentTranslationProgressFailed.js +3 -3
  71. package/dist/client/features/document-translation-progress-pending/index.d.ts +1 -1
  72. package/dist/client/features/document-translation-progress-pending/index.js +1 -1
  73. package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.d.ts +2 -2
  74. package/dist/client/features/document-translation-progress-pending/ui/DocumentTranslationProgressPending.js +5 -5
  75. package/dist/client/features/document-translation-progress-running/index.d.ts +1 -1
  76. package/dist/client/features/document-translation-progress-running/index.js +1 -1
  77. package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.d.ts +2 -2
  78. package/dist/client/features/document-translation-progress-running/ui/DocumentTranslationProgressRunning.js +3 -3
  79. package/dist/client/features/open-document-translation-popup/index.d.ts +1 -1
  80. package/dist/client/features/open-document-translation-popup/index.js +1 -1
  81. package/dist/client/features/open-document-translation-popup/ui/styles.module.scss +1 -1
  82. package/dist/client/features/translate-document-form/index.client.d.ts +1 -1
  83. package/dist/client/features/translate-document-form/index.client.js +1 -1
  84. package/dist/client/features/translate-document-form/index.d.ts +3 -3
  85. package/dist/client/features/translate-document-form/index.js +2 -2
  86. package/dist/client/features/translate-document-form/model/constants.d.ts +1 -1
  87. package/dist/client/features/translate-document-form/model/constants.js +11 -11
  88. package/dist/client/features/translate-document-form/model/form-model.d.ts +1 -1
  89. package/dist/client/features/translate-document-form/model/index.d.ts +1 -1
  90. package/dist/client/features/translate-document-form/model/index.js +1 -1
  91. package/dist/client/features/translate-document-form/model/schema.d.ts +1 -1
  92. package/dist/client/features/translate-document-form/model/schema.js +5 -5
  93. package/dist/client/features/translate-document-form/ui/DocumentTranslationForm.d.ts +1 -1
  94. package/dist/client/features/translate-document-form/ui/index.d.ts +1 -1
  95. package/dist/client/features/translate-document-form/ui/index.js +1 -1
  96. package/dist/client/features/translate-document-form/ui/styles.module.scss +1 -1
  97. package/dist/client/shared/lib/errors/handleApiError.d.ts +1 -1
  98. package/dist/client/shared/lib/errors/handleApiError.js +2 -2
  99. package/dist/client/shared/lib/forms/handle-form-error.d.ts +1 -1
  100. package/dist/client/shared/lib/forms/handle-form-error.js +6 -6
  101. package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.d.ts +1 -1
  102. package/dist/client/shared/lib/payload/hooks/useCollectionDashboardUrlParams.js +1 -1
  103. package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.d.ts +1 -1
  104. package/dist/client/shared/lib/payload/hooks/useCollectionDocumentUrlParams.js +2 -2
  105. package/dist/client/shared/lib/payload/hooks/useLocaleOptions.js +2 -2
  106. package/dist/client/shared/lib/utils/errors/handleApiError.d.ts +1 -1
  107. package/dist/client/shared/lib/utils/errors/handleApiError.js +2 -2
  108. package/dist/client/shared/lib/utils/react/useToggle.js +1 -1
  109. package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.d.ts +2 -2
  110. package/dist/client/shared/providers/CacheClientProvider/CacheClientProvider.factory.js +3 -3
  111. package/dist/client/shared/providers/CacheClientProvider/index.d.ts +1 -1
  112. package/dist/client/shared/providers/CacheClientProvider/index.js +1 -1
  113. package/dist/client/shared/types/AccessGuard.d.ts +1 -1
  114. package/dist/client/shared/ui/Alert/Alert.d.ts +2 -2
  115. package/dist/client/shared/ui/Alert/Alert.js +18 -18
  116. package/dist/client/shared/ui/Alert/index.d.ts +1 -1
  117. package/dist/client/shared/ui/Alert/index.js +1 -1
  118. package/dist/client/shared/ui/Alert/styles.module.scss +1 -1
  119. package/dist/client/shared/ui/Button/index.d.ts +1 -1
  120. package/dist/client/shared/ui/Button/index.js +1 -1
  121. package/dist/client/shared/ui/Button/styles.module.scss +6 -3
  122. package/dist/client/shared/ui/Checkbox/Checkbox.d.ts +2 -2
  123. package/dist/client/shared/ui/Checkbox/Checkbox.js +4 -4
  124. package/dist/client/shared/ui/Checkbox/index.d.ts +1 -1
  125. package/dist/client/shared/ui/Checkbox/index.js +1 -1
  126. package/dist/client/shared/ui/Checkbox/styles.module.scss +1 -1
  127. package/dist/client/shared/ui/ColorIndicator/ColorIndicator.d.ts +2 -2
  128. package/dist/client/shared/ui/ColorIndicator/ColorIndicator.js +2 -2
  129. package/dist/client/shared/ui/ColorIndicator/index.d.ts +1 -1
  130. package/dist/client/shared/ui/ColorIndicator/index.js +1 -1
  131. package/dist/client/shared/ui/ColorIndicator/styles.module.scss +1 -1
  132. package/dist/client/shared/ui/Description/Description.d.ts +3 -3
  133. package/dist/client/shared/ui/Description/Description.js +4 -4
  134. package/dist/client/shared/ui/Description/index.d.ts +1 -1
  135. package/dist/client/shared/ui/Description/index.js +1 -1
  136. package/dist/client/shared/ui/Description/styles.module.scss +1 -1
  137. package/dist/client/shared/ui/Divider/Divider.d.ts +4 -4
  138. package/dist/client/shared/ui/Divider/Divider.js +4 -4
  139. package/dist/client/shared/ui/Divider/index.d.ts +1 -1
  140. package/dist/client/shared/ui/Divider/index.js +1 -1
  141. package/dist/client/shared/ui/Divider/styles.module.scss +1 -1
  142. package/dist/client/shared/ui/Label/Label.d.ts +2 -2
  143. package/dist/client/shared/ui/Label/Label.js +3 -3
  144. package/dist/client/shared/ui/Label/index.d.ts +1 -1
  145. package/dist/client/shared/ui/Label/index.js +1 -1
  146. package/dist/client/shared/ui/Label/styles.module.scss +1 -1
  147. package/dist/client/shared/ui/Loading/Loading.d.ts +1 -1
  148. package/dist/client/shared/ui/Loading/Loading.js +9 -9
  149. package/dist/client/shared/ui/Loading/index.d.ts +1 -1
  150. package/dist/client/shared/ui/Loading/index.js +1 -1
  151. package/dist/client/shared/ui/Loading/styles.module.scss +2 -2
  152. package/dist/client/shared/ui/Popup/Popup.d.ts +1 -1
  153. package/dist/client/shared/ui/Popup/index.d.ts +1 -1
  154. package/dist/client/shared/ui/Popup/index.js +1 -1
  155. package/dist/client/shared/ui/Popup/styles.module.scss +1 -1
  156. package/dist/client/shared/ui/ProgressBar/ProgressBar.d.ts +2 -2
  157. package/dist/client/shared/ui/ProgressBar/ProgressBar.js +3 -3
  158. package/dist/client/shared/ui/ProgressBar/index.d.ts +1 -1
  159. package/dist/client/shared/ui/ProgressBar/index.js +1 -1
  160. package/dist/client/shared/ui/ProgressBar/styles.module.scss +1 -1
  161. package/dist/client/shared/ui/Select/index.d.ts +1 -1
  162. package/dist/client/shared/ui/Select/index.js +1 -1
  163. package/dist/client/shared/ui/Select/styles.module.scss +1 -1
  164. package/dist/client/shared/ui/StatusCounter/StatusCounter.d.ts +2 -2
  165. package/dist/client/shared/ui/StatusCounter/StatusCounter.js +13 -13
  166. package/dist/client/shared/ui/StatusCounter/index.d.ts +1 -1
  167. package/dist/client/shared/ui/StatusCounter/index.js +1 -1
  168. package/dist/client/shared/ui/StatusCounter/styles.module.scss +1 -1
  169. package/dist/client/shared/ui/StatusIndicator/StatusIndicator.d.ts +3 -3
  170. package/dist/client/shared/ui/StatusIndicator/StatusIndicator.js +4 -4
  171. package/dist/client/shared/ui/StatusIndicator/index.d.ts +1 -1
  172. package/dist/client/shared/ui/StatusIndicator/index.js +1 -1
  173. package/dist/client/shared/ui/StatusIndicator/styles.module.scss +1 -1
  174. package/dist/client/shared/ui/Tooltip/Tooltip.d.ts +2 -2
  175. package/dist/client/shared/ui/Tooltip/Tooltip.js +4 -4
  176. package/dist/client/shared/ui/Tooltip/index.d.ts +1 -1
  177. package/dist/client/shared/ui/Tooltip/index.js +1 -1
  178. package/dist/client/shared/ui/Tooltip/styles.module.scss +5 -5
  179. package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.d.ts +1 -1
  180. package/dist/client/shared/ui/form/FormCheckbox/FormCheckbox.js +6 -6
  181. package/dist/client/shared/ui/form/FormCheckbox/index.d.ts +1 -1
  182. package/dist/client/shared/ui/form/FormCheckbox/index.js +1 -1
  183. package/dist/client/shared/ui/form/FormCheckbox/styles.module.scss +1 -1
  184. package/dist/client/shared/ui/form/FormCheckboxPublish/FormCheckboxPublish.js +5 -5
  185. package/dist/client/shared/ui/form/FormCheckboxPublish/index.d.ts +1 -1
  186. package/dist/client/shared/ui/form/FormCheckboxPublish/index.js +1 -1
  187. package/dist/client/shared/ui/form/FormCheckboxPublish/styles.module.scss +1 -1
  188. package/dist/client/shared/ui/form/FormSelect/FormSelect.d.ts +5 -5
  189. package/dist/client/shared/ui/form/FormSelect/FormSelect.js +9 -9
  190. package/dist/client/shared/ui/form/FormSelect/index.d.ts +1 -1
  191. package/dist/client/shared/ui/form/FormSelect/index.js +1 -1
  192. package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.d.ts +1 -1
  193. package/dist/client/shared/ui/form/FormSelectLocale/FormSelectLocale.js +2 -2
  194. package/dist/client/shared/ui/form/FormSelectLocale/index.d.ts +1 -1
  195. package/dist/client/shared/ui/form/FormSelectLocale/index.js +1 -1
  196. package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.d.ts +2 -2
  197. package/dist/client/shared/ui/form/FormSelectStrategy/FormSelectStrategy.js +9 -9
  198. package/dist/client/shared/ui/form/FormSelectStrategy/index.d.ts +2 -2
  199. package/dist/client/shared/ui/form/FormSelectStrategy/index.js +1 -1
  200. package/dist/client/shared/ui/form/FormSelectStrategy/styles.module.scss +1 -1
  201. package/dist/client/shared/utils/componentPath.js +1 -1
  202. package/dist/client/widgets/bulk-translation-dashboard/index.d.ts +1 -1
  203. package/dist/client/widgets/bulk-translation-dashboard/index.js +1 -1
  204. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.d.ts +2 -2
  205. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js +3 -3
  206. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.js +11 -11
  207. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.d.ts +2 -2
  208. package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server.js +3 -3
  209. package/dist/client/widgets/bulk-translation-dashboard/ui/index.d.ts +1 -1
  210. package/dist/client/widgets/bulk-translation-dashboard/ui/index.js +1 -1
  211. package/dist/client/widgets/translate-document/index.d.ts +1 -1
  212. package/dist/client/widgets/translate-document/index.js +1 -1
  213. package/dist/client/widgets/translate-document/ui/TranslateDocument.export.d.ts +3 -3
  214. package/dist/client/widgets/translate-document/ui/TranslateDocument.export.js +3 -3
  215. package/dist/client/widgets/translate-document/ui/TranslateDocument.js +16 -16
  216. package/dist/client/widgets/translate-document/ui/TranslateDocument.server.d.ts +2 -2
  217. package/dist/client/widgets/translate-document/ui/TranslateDocument.server.js +3 -3
  218. package/dist/client/widgets/translate-document/ui/index.d.ts +1 -1
  219. package/dist/client/widgets/translate-document/ui/index.js +1 -1
  220. package/dist/client/widgets/translate-field-control/ui/TranslateFieldControl.export.d.ts +1 -1
  221. package/dist/client/widgets/translate-field-control/ui/styles.module.scss +1 -1
  222. package/dist/{server/modules/translation-levels → composition/levels}/collectionLevel.d.ts +1 -1
  223. package/dist/{server/modules/translation-levels → composition/levels}/collectionLevel.js +1 -1
  224. package/dist/{server/modules/translation-levels → composition/levels}/documentLevel.d.ts +1 -1
  225. package/dist/{server/modules/translation-levels → composition/levels}/documentLevel.js +1 -1
  226. package/dist/{server/modules/translation-levels → composition/levels}/fieldLevel.d.ts +1 -1
  227. package/dist/{server/modules/translation-levels → composition/levels}/fieldLevel.js +1 -1
  228. package/dist/composition/levels/index.d.ts +3 -0
  229. package/dist/composition/levels/index.js +5 -0
  230. package/dist/{server/modules/translation-levels → composition/levels}/useDocTranslationApi.d.ts +1 -1
  231. package/dist/{server/modules/translation-levels → composition/levels}/useDocTranslationApi.js +1 -1
  232. package/dist/core/content-projection/computeSourceFingerprint.d.ts +15 -0
  233. package/dist/core/content-projection/computeSourceFingerprint.js +19 -0
  234. package/dist/core/content-projection/contentProjector.d.ts +28 -0
  235. package/dist/core/content-projection/contentProjector.js +97 -0
  236. package/dist/core/content-projection/fingerprinter.d.ts +28 -0
  237. package/dist/core/content-projection/fingerprinter.js +29 -0
  238. package/dist/core/content-projection/idPath.d.ts +48 -0
  239. package/dist/core/content-projection/idPath.js +64 -0
  240. package/dist/core/content-projection/translatableLeaf.d.ts +27 -0
  241. package/dist/core/content-projection/translatableLeaf.js +37 -0
  242. package/dist/core/field-config/getFieldConfig.d.ts +23 -0
  243. package/dist/{server/shared → core}/field-config/getFieldConfig.js +5 -5
  244. package/dist/{server/shared → core}/field-config/index.d.ts +3 -3
  245. package/dist/core/field-config/index.js +4 -0
  246. package/dist/{server/shared → core}/field-traversal/findFieldByPath.d.ts +2 -3
  247. package/dist/core/field-traversal/guards.d.ts +19 -0
  248. package/dist/core/field-traversal/guards.js +20 -0
  249. package/dist/core/field-traversal/index.d.ts +7 -0
  250. package/dist/core/field-traversal/index.js +7 -0
  251. package/dist/{server/shared → core}/field-traversal/kernel.d.ts +7 -8
  252. package/dist/{server/shared → core}/field-traversal/kernel.js +6 -6
  253. package/dist/core/field-traversal/predicates.d.ts +24 -0
  254. package/dist/core/field-traversal/predicates.js +17 -0
  255. package/dist/{server/shared → core}/field-traversal/types.d.ts +129 -27
  256. package/dist/{server/shared → core}/field-traversal/types.js +6 -0
  257. package/dist/{server/shared → core}/field-traversal/walkFields.d.ts +2 -3
  258. package/dist/core/index.d.ts +12 -0
  259. package/dist/core/index.js +15 -0
  260. package/dist/{server/shared → core}/lexical/collectTextNodes.d.ts +1 -1
  261. package/dist/{server/shared → core}/lexical/collectTextNodes.js +1 -1
  262. package/dist/{server/shared → core}/lexical/guards.d.ts +1 -1
  263. package/dist/{server/shared → core}/lexical/guards.js +4 -4
  264. package/dist/core/lexical/index.d.ts +6 -0
  265. package/dist/core/lexical/index.js +6 -0
  266. package/dist/{server/shared → core}/lexical/isEmptyRichText.d.ts +1 -1
  267. package/dist/{server/shared → core}/lexical/isEmptyRichText.js +3 -3
  268. package/dist/{server/shared → core}/lexical/traverseLexicalTree.d.ts +1 -1
  269. package/dist/{server/shared → core}/lexical/traverseLexicalTree.js +1 -1
  270. package/dist/core/lexical/types.d.ts +33 -0
  271. package/dist/core/lexical/types.js +11 -0
  272. package/dist/core/provenance/ProvenanceStore.interface.d.ts +99 -0
  273. package/dist/core/provenance/ProvenanceStore.interface.js +37 -0
  274. package/dist/core/provenance/index.d.ts +1 -0
  275. package/dist/core/provenance/index.js +5 -0
  276. package/dist/{server/modules → core}/translation-pipeline/TranslationPipeline.d.ts +4 -4
  277. package/dist/{server/modules → core}/translation-pipeline/TranslationPipeline.js +1 -1
  278. package/dist/{server/modules → core}/translation-pipeline/stages/data-reconciler/DataReconciler.d.ts +2 -2
  279. package/dist/{server/modules → core}/translation-pipeline/stages/data-reconciler/DataReconciler.js +3 -2
  280. package/dist/core/translation-pipeline/stages/data-reconciler/index.d.ts +2 -0
  281. package/dist/core/translation-pipeline/stages/data-reconciler/index.js +4 -0
  282. package/dist/{server/modules → core}/translation-pipeline/stages/field-collector/FieldChunkCollector.d.ts +2 -2
  283. package/dist/{server/modules → core}/translation-pipeline/stages/field-collector/FieldChunkCollector.js +18 -4
  284. package/dist/{server/modules → core}/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.d.ts +2 -2
  285. package/dist/{server/modules → core}/translation-pipeline/stages/field-collector/FieldChunkCollector.stage.js +2 -2
  286. package/dist/core/translation-pipeline/stages/field-collector/index.d.ts +2 -0
  287. package/dist/core/translation-pipeline/stages/field-collector/index.js +4 -0
  288. package/dist/core/translation-pipeline/stages/index.d.ts +6 -0
  289. package/dist/core/translation-pipeline/stages/index.js +7 -0
  290. package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/PlainTextExpander.d.ts +2 -2
  291. package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/PlainTextExpander.js +2 -2
  292. package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/RichTextExpander.d.ts +2 -2
  293. package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/RichTextExpander.js +3 -3
  294. package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/TextChunkExpander.d.ts +2 -2
  295. package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/TextChunkExpander.stage.d.ts +2 -2
  296. package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/TextChunkExpander.stage.js +4 -4
  297. package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/TextExpander.interface.d.ts +1 -1
  298. package/dist/core/translation-pipeline/stages/text-expander/index.d.ts +6 -0
  299. package/dist/core/translation-pipeline/stages/text-expander/index.js +6 -0
  300. package/dist/{server/modules → core}/translation-pipeline/stages/translation/Translation.stage.d.ts +2 -2
  301. package/dist/{server/modules → core}/translation-pipeline/stages/translation/Translation.stage.js +1 -1
  302. package/dist/core/translation-pipeline/stages/translation/index.d.ts +1 -0
  303. package/dist/core/translation-pipeline/stages/translation/index.js +3 -0
  304. package/dist/{server/modules → core}/translation-pipeline/stages/translation-applicator/TranslationMutator.d.ts +1 -1
  305. package/dist/{server/modules → core}/translation-pipeline/stages/translation-applicator/TranslationMutator.js +1 -1
  306. package/dist/{server/modules → core}/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.d.ts +1 -1
  307. package/dist/{server/modules → core}/translation-pipeline/stages/translation-applicator/TranslationMutator.stage.js +2 -2
  308. package/dist/core/translation-pipeline/stages/translation-applicator/index.d.ts +2 -0
  309. package/dist/core/translation-pipeline/stages/translation-applicator/index.js +4 -0
  310. package/dist/{server/modules → core}/translation-pipeline/strategies/Overwrite.strategy.d.ts +1 -1
  311. package/dist/{server/modules → core}/translation-pipeline/strategies/Overwrite.strategy.js +1 -1
  312. package/dist/{server/modules → core}/translation-pipeline/strategies/SkipExisting.strategy.d.ts +1 -1
  313. package/dist/{server/modules → core}/translation-pipeline/strategies/SkipExisting.strategy.js +3 -1
  314. package/dist/core/translation-pipeline/strategies/index.d.ts +13 -0
  315. package/dist/{server/modules → core}/translation-pipeline/strategies/index.js +4 -4
  316. package/dist/{server/modules → core}/translation-pipeline/translateContent.d.ts +2 -2
  317. package/dist/{server/modules → core}/translation-pipeline/types/FieldChunk.d.ts +3 -3
  318. package/dist/{server/modules → core}/translation-pipeline/types/Pipeline.d.ts +2 -2
  319. package/dist/{server/modules → core}/translation-pipeline/types/PipelineContext.d.ts +4 -4
  320. package/dist/{server/modules → core}/translation-pipeline/types/TextChunk.d.ts +3 -3
  321. package/dist/{server/modules → core}/translation-pipeline/types/TextChunk.js +2 -2
  322. package/dist/core/translation-pipeline/types/index.d.ts +5 -0
  323. package/dist/core/translation-pipeline/types/index.js +3 -0
  324. package/dist/core/translation-providers/index.d.ts +1 -0
  325. package/dist/core/translation-providers/index.js +5 -0
  326. package/dist/core/utils/index.d.ts +2 -0
  327. package/dist/core/utils/index.js +4 -0
  328. package/dist/{server/shared → core}/utils/isEmpty.js +2 -2
  329. package/dist/{server/shared → core}/utils/isObject.js +1 -1
  330. package/dist/field-actions.d.ts +1 -1
  331. package/dist/field-config.d.ts +1 -1
  332. package/dist/field-config.js +1 -1
  333. package/dist/index.d.ts +7 -4
  334. package/dist/index.js +4 -4
  335. package/dist/plugin.d.ts +27 -1
  336. package/dist/plugin.js +56 -16
  337. package/dist/server/features/_lib/collection-utils.d.ts +1 -1
  338. package/dist/server/features/_lib/index.d.ts +1 -1
  339. package/dist/server/features/_lib/index.js +1 -1
  340. package/dist/server/features/cancel/index.d.ts +1 -1
  341. package/dist/server/features/cancel/index.js +1 -1
  342. package/dist/server/features/cancel-by-collection/index.d.ts +1 -1
  343. package/dist/server/features/cancel-by-collection/index.js +1 -1
  344. package/dist/server/features/cancel-by-collection/model.d.ts +2 -2
  345. package/dist/server/features/cancel-by-collection/model.js +1 -1
  346. package/dist/server/features/createTranslationRoutes.d.ts +1 -1
  347. package/dist/server/features/enqueue-translation/index.d.ts +1 -1
  348. package/dist/server/features/enqueue-translation/index.js +1 -1
  349. package/dist/server/features/enqueue-translation/model.d.ts +2 -2
  350. package/dist/server/features/enqueue-translation/model.js +4 -4
  351. package/dist/server/features/get-collection-status/index.d.ts +1 -1
  352. package/dist/server/features/get-collection-status/index.js +1 -1
  353. package/dist/server/features/get-collection-status/model.d.ts +3 -3
  354. package/dist/server/features/get-collection-status/model.js +1 -1
  355. package/dist/server/features/get-document-status/index.d.ts +2 -2
  356. package/dist/server/features/get-document-status/index.js +2 -2
  357. package/dist/server/features/run-translation/index.d.ts +1 -1
  358. package/dist/server/features/run-translation/index.js +1 -1
  359. package/dist/server/features/translate-document/handler.d.ts +6 -3
  360. package/dist/server/features/translate-document/handler.js +28 -2
  361. package/dist/server/features/translate-document/index.d.ts +1 -1
  362. package/dist/server/features/translate-document/model.d.ts +2 -7
  363. package/dist/server/features/translate-document/model.js +1 -2
  364. package/dist/server/features/translate-field/handler.js +1 -1
  365. package/dist/server/features/translate-field/index.d.ts +2 -1
  366. package/dist/server/features/translate-field/model.d.ts +2 -19
  367. package/dist/server/features/translate-field/resolveFieldSubtree.js +1 -1
  368. package/dist/server/features/translate-field/route.d.ts +1 -1
  369. package/dist/server/index.d.ts +3 -3
  370. package/dist/server/index.js +3 -3
  371. package/dist/server/modules/index.d.ts +2 -2
  372. package/dist/server/modules/index.js +2 -2
  373. package/dist/server/modules/lifecycle/LifecycleNotifier.d.ts +21 -0
  374. package/dist/server/modules/lifecycle/LifecycleNotifier.js +38 -0
  375. package/dist/server/modules/lifecycle/index.d.ts +4 -0
  376. package/dist/server/modules/lifecycle/index.js +7 -0
  377. package/dist/server/modules/lifecycle/taskMapping.d.ts +7 -0
  378. package/dist/server/modules/lifecycle/taskMapping.js +16 -0
  379. package/dist/server/modules/lifecycle/types.d.ts +45 -0
  380. package/dist/server/modules/lifecycle/types.js +21 -0
  381. package/dist/server/modules/lifecycle/withQueuedNotification.d.ts +9 -0
  382. package/dist/server/modules/lifecycle/withQueuedNotification.js +19 -0
  383. package/dist/server/modules/provenance/PayloadProvenanceStore.d.ts +21 -0
  384. package/dist/server/modules/provenance/PayloadProvenanceStore.js +109 -0
  385. package/dist/server/modules/provenance/index.d.ts +5 -0
  386. package/dist/server/modules/provenance/index.js +8 -0
  387. package/dist/server/modules/provenance/provenanceCleanupHook.d.ts +18 -0
  388. package/dist/server/modules/provenance/provenanceCleanupHook.js +41 -0
  389. package/dist/server/modules/provenance/provenanceCollection.d.ts +23 -0
  390. package/dist/server/modules/provenance/provenanceCollection.js +82 -0
  391. package/dist/server/modules/provenance/slugGuard.d.ts +16 -0
  392. package/dist/server/modules/provenance/slugGuard.js +19 -0
  393. package/dist/server/modules/task-runner/TaskRunner.interface.d.ts +2 -2
  394. package/dist/server/modules/task-runner/TaskRunnerProvider.interface.d.ts +1 -1
  395. package/dist/server/modules/task-runner/index.d.ts +1 -1
  396. package/dist/server/modules/task-runner/payload-jobs-runner/index.d.ts +2 -2
  397. package/dist/server/modules/task-runner/payload-jobs-runner/index.js +1 -1
  398. package/dist/server/modules/task-runner/sync-runner/index.d.ts +1 -1
  399. package/dist/server/modules/task-runner/sync-runner/index.js +1 -1
  400. package/dist/server/modules/translation-levels/PluginConfigBuilder.d.ts +3 -3
  401. package/dist/server/modules/translation-levels/index.d.ts +1 -4
  402. package/dist/server/modules/translation-levels/index.js +1 -3
  403. package/dist/server/modules/translation-levels/types.d.ts +3 -3
  404. package/dist/server/shared/access/AnyAccessGuard.d.ts +1 -1
  405. package/dist/server/shared/access/handler.d.ts +1 -1
  406. package/dist/server/shared/access/index.d.ts +3 -3
  407. package/dist/server/shared/access/index.js +1 -1
  408. package/dist/server/shared/access/types.d.ts +1 -1
  409. package/dist/server/shared/guards/collection-guards.d.ts +1 -1
  410. package/dist/server/shared/guards/collection-guards.js +2 -2
  411. package/dist/server/shared/guards/field-guards.d.ts +9 -20
  412. package/dist/server/shared/guards/field-guards.js +5 -20
  413. package/dist/server/shared/guards/index.d.ts +3 -3
  414. package/dist/server/shared/guards/index.js +2 -2
  415. package/dist/server/shared/http/ServerResponse.js +15 -15
  416. package/dist/server/shared/http/index.d.ts +3 -3
  417. package/dist/server/shared/http/index.js +3 -3
  418. package/dist/server/shared/http/withAccessCheck.d.ts +2 -2
  419. package/dist/server/shared/http/withAccessCheck.js +1 -1
  420. package/dist/server/shared/http/withErrorHandler.js +3 -3
  421. package/dist/server/shared/index.d.ts +6 -5
  422. package/dist/server/shared/index.js +4 -3
  423. package/dist/server/shared/utils/filterLocalizedFields.js +2 -2
  424. package/dist/server/shared/utils/getByPath.js +2 -2
  425. package/dist/server/shared/utils/index.d.ts +9 -9
  426. package/dist/server/shared/utils/index.js +8 -8
  427. package/dist/server/shared/utils/normalizePath.js +3 -3
  428. package/dist/server/shared/utils/setByPath.js +2 -2
  429. package/dist/translation-providers/index.d.ts +2 -0
  430. package/dist/translation-providers/index.js +10 -0
  431. package/dist/{server/modules/translation-providers → translation-providers/openai}/OpenAITranslation.provider.d.ts +1 -1
  432. package/dist/{server/modules/translation-providers → translation-providers/openai}/OpenAITranslation.provider.js +1 -1
  433. package/dist/translation-providers/openai/index.d.ts +1 -0
  434. package/dist/translation-providers/openai/index.js +5 -0
  435. package/dist/types/CollectionSchemaMap.d.ts +6 -0
  436. package/dist/types/CollectionSchemaMap.js +6 -0
  437. package/dist/{client/shared/types → types}/PayloadComponentExport.d.ts +1 -1
  438. package/dist/types/index.d.ts +4 -1
  439. package/dist/types/wire/field-translation.d.ts +17 -0
  440. package/dist/types/wire/field-translation.js +7 -0
  441. package/package.json +3 -1
  442. package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.d.ts +0 -2
  443. package/dist/server/modules/translation-pipeline/stages/data-reconciler/index.js +0 -4
  444. package/dist/server/modules/translation-pipeline/stages/field-collector/index.d.ts +0 -2
  445. package/dist/server/modules/translation-pipeline/stages/field-collector/index.js +0 -4
  446. package/dist/server/modules/translation-pipeline/stages/index.d.ts +0 -6
  447. package/dist/server/modules/translation-pipeline/stages/index.js +0 -7
  448. package/dist/server/modules/translation-pipeline/stages/text-expander/index.d.ts +0 -6
  449. package/dist/server/modules/translation-pipeline/stages/text-expander/index.js +0 -6
  450. package/dist/server/modules/translation-pipeline/stages/translation/index.d.ts +0 -1
  451. package/dist/server/modules/translation-pipeline/stages/translation/index.js +0 -3
  452. package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.d.ts +0 -2
  453. package/dist/server/modules/translation-pipeline/stages/translation-applicator/index.js +0 -4
  454. package/dist/server/modules/translation-pipeline/strategies/index.d.ts +0 -13
  455. package/dist/server/modules/translation-pipeline/types/index.d.ts +0 -5
  456. package/dist/server/modules/translation-pipeline/types/index.js +0 -3
  457. package/dist/server/modules/translation-providers/index.d.ts +0 -2
  458. package/dist/server/modules/translation-providers/index.js +0 -3
  459. package/dist/server/shared/field-config/getFieldConfig.d.ts +0 -20
  460. package/dist/server/shared/field-config/index.js +0 -4
  461. package/dist/server/shared/field-traversal/index.d.ts +0 -5
  462. package/dist/server/shared/field-traversal/index.js +0 -5
  463. package/dist/server/shared/lexical/index.d.ts +0 -6
  464. package/dist/server/shared/lexical/index.js +0 -6
  465. package/dist/server/shared/lexical/types.d.ts +0 -19
  466. package/dist/server/shared/lexical/types.js +0 -8
  467. /package/dist/{server/shared → core}/field-config/types.d.ts +0 -0
  468. /package/dist/{server/shared → core}/field-config/types.js +0 -0
  469. /package/dist/{server/shared → core}/field-traversal/findFieldByPath.js +0 -0
  470. /package/dist/{server/shared → core}/field-traversal/walkFields.js +0 -0
  471. /package/dist/{server/modules → core}/translation-pipeline/index.d.ts +0 -0
  472. /package/dist/{server/modules → core}/translation-pipeline/index.js +0 -0
  473. /package/dist/{server/modules → core}/translation-pipeline/stages/data-reconciler/DataReconciler.stage.d.ts +0 -0
  474. /package/dist/{server/modules → core}/translation-pipeline/stages/data-reconciler/DataReconciler.stage.js +0 -0
  475. /package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/TextChunkExpander.js +0 -0
  476. /package/dist/{server/modules → core}/translation-pipeline/stages/text-expander/TextExpander.interface.js +0 -0
  477. /package/dist/{server/modules → core}/translation-pipeline/strategies/TranslationStrategy.interface.d.ts +0 -0
  478. /package/dist/{server/modules → core}/translation-pipeline/strategies/TranslationStrategy.interface.js +0 -0
  479. /package/dist/{server/modules → core}/translation-pipeline/translateContent.js +0 -0
  480. /package/dist/{server/modules → core}/translation-pipeline/types/FieldChunk.js +0 -0
  481. /package/dist/{server/modules → core}/translation-pipeline/types/Pipeline.js +0 -0
  482. /package/dist/{server/modules → core}/translation-pipeline/types/PipelineContext.js +0 -0
  483. /package/dist/{server/modules → core}/translation-providers/TranslationProvider.interface.d.ts +0 -0
  484. /package/dist/{server/modules → core}/translation-providers/TranslationProvider.interface.js +0 -0
  485. /package/dist/{server/shared → core}/utils/isEmpty.d.ts +0 -0
  486. /package/dist/{server/shared → core}/utils/isObject.d.ts +0 -0
  487. /package/dist/{client/shared/types → types}/PayloadComponentExport.js +0 -0
@@ -0,0 +1,64 @@
1
+ /**
2
+ * `IdPath` — the stable, location-based identity of a translatable leaf (slice 6 design,
3
+ * `docs/plans/2026-06-30-slice6-contentprojector-idpath-design.md`).
4
+ *
5
+ * It is the field path from the document root, with one crucial change over a positional path:
6
+ * **array/blocks element indices are replaced by the element's `id`** (`+ blockType` for blocks),
7
+ * so the path survives reordering and means the same thing across time. Group/tab/leaf name
8
+ * segments are unchanged; an element with no `id` falls back to a marked positional segment.
9
+ *
10
+ * `idPath` is *where* a piece lives (identity), never *what* it contains — so it can be compared
11
+ * across time to detect content drift. The whole grammar (escaping, blockType folding, fallback)
12
+ * lives in {@link makeIdPath}, the sole constructor, so it can never drift.
13
+ */ const SEP = ".";
14
+ /**
15
+ * Escape the segment separator, the blockType delimiter, and the positional-fallback marker so
16
+ * names/ids can't split the path or collide with the "#index" no-id fallback rendered in
17
+ * {@link renderSegment}.
18
+ */ const enc = (value)=>value.replace(/[\\#.:]/gu, (c)=>`\\${c}`);
19
+ const renderSegment = (segment)=>{
20
+ switch(segment.kind){
21
+ case "key":
22
+ return enc(segment.name);
23
+ case "element":
24
+ return segment.blockType === undefined ? enc(segment.id) : `${enc(segment.id)}:${enc(segment.blockType)}`;
25
+ case "index":
26
+ return `#${segment.index}`;
27
+ default:
28
+ {
29
+ const exhaustive = segment;
30
+ throw new Error(`unhandled path segment: ${String(exhaustive)}`);
31
+ }
32
+ }
33
+ };
34
+ /**
35
+ * The sole constructor of an {@link IdPath}. Renders structural segments to the branded string.
36
+ */ export function makeIdPath(segments) {
37
+ return segments.map(renderSegment).join(SEP);
38
+ }
39
+ /**
40
+ * Build the {@link PathSegment} for one array/blocks element from its data item: keyed by the
41
+ * element's `id` (with `blockType` folded in for blocks), or a positional fallback when the element
42
+ * carries no usable `id`.
43
+ *
44
+ * @param item - The element's data object.
45
+ * @param isBlocks - Whether the parent field is a `blocks` field (then `blockType` is folded in).
46
+ * @param index - Position, used only for the no-id fallback.
47
+ */ export function elementSegment(item, isBlocks, index) {
48
+ const { id } = item;
49
+ if (id === undefined || id === null) return {
50
+ kind: "index",
51
+ index
52
+ };
53
+ const idStr = String(id);
54
+ return isBlocks && typeof item.blockType === "string" ? {
55
+ kind: "element",
56
+ id: idStr,
57
+ blockType: item.blockType
58
+ } : {
59
+ kind: "element",
60
+ id: idStr
61
+ };
62
+ }
63
+
64
+ //# sourceMappingURL=idPath.js.map
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The single definition of "which leaf is translatable, and what its source text is" — shared by
3
+ * the read-only {@link projectTranslatableContent} (for the provenance fingerprint) and the
4
+ * translation pipeline's `FieldChunkCollector`, so the two can never disagree on the translatable
5
+ * set (slice 6 design, option B, `docs/plans/2026-06-30-slice6-contentprojector-idpath-design.md`).
6
+ *
7
+ * Payload-free (structural {@link FieldLike} + owned `Serialized*` views only) so it can move to
8
+ * `@repo/translator-core` unchanged.
9
+ */
10
+ import type { FieldLike, LeafFieldLike } from "../field-traversal/types";
11
+ /**
12
+ * The leaf-SELECTION decision shared by projection and translation: a leaf is a translation target
13
+ * iff it is a translatable text type, localized, and not excluded via `custom.translateKit`.
14
+ * Independent of the value present — the value governs whether there is text to emit, not selection.
15
+ */
16
+ export declare const isTranslatableLeaf: (field: FieldLike | LeafFieldLike) => boolean;
17
+ /**
18
+ * The shared notion of a leaf's translatable source text, at PROJECTION (field-level) granularity:
19
+ * - `richText` → the normalized join of its non-empty Lexical text nodes (the same nodes the
20
+ * pipeline expands per-node for write-back), trimmed; `null` when it holds no text.
21
+ * - plain `text`/`textarea` → the trimmed string; `null` when empty or not a string.
22
+ *
23
+ * Returns `null` (rather than `""`) for "no translatable text", so callers uniformly skip it.
24
+ */
25
+ export declare const leafSourceText: (field: {
26
+ type: string;
27
+ }, value: unknown) => string | null;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * The single definition of "which leaf is translatable, and what its source text is" — shared by
3
+ * the read-only {@link projectTranslatableContent} (for the provenance fingerprint) and the
4
+ * translation pipeline's `FieldChunkCollector`, so the two can never disagree on the translatable
5
+ * set (slice 6 design, option B, `docs/plans/2026-06-30-slice6-contentprojector-idpath-design.md`).
6
+ *
7
+ * Payload-free (structural {@link FieldLike} + owned `Serialized*` views only) so it can move to
8
+ * `@repo/translator-core` unchanged.
9
+ */ import { isFieldExcludedFromTranslation } from "../field-config";
10
+ import { collectSerializedLexicalTextNodes } from "../lexical/collectTextNodes";
11
+ import { isSerializedLexicalRoot } from "../lexical/guards";
12
+ /** The field types this package translates (mirrors `isTranslatableField`, payload-free). */ const isTranslatableFieldType = (field)=>field.type === "text" || field.type === "textarea" || field.type === "richText";
13
+ /** Mirrors `isLocalizedField` structurally. */ const isLocalizedFieldLike = (field)=>field.localized === true;
14
+ /**
15
+ * The leaf-SELECTION decision shared by projection and translation: a leaf is a translation target
16
+ * iff it is a translatable text type, localized, and not excluded via `custom.translateKit`.
17
+ * Independent of the value present — the value governs whether there is text to emit, not selection.
18
+ */ export const isTranslatableLeaf = (field)=>isTranslatableFieldType(field) && isLocalizedFieldLike(field) && !isFieldExcludedFromTranslation(field);
19
+ /**
20
+ * The shared notion of a leaf's translatable source text, at PROJECTION (field-level) granularity:
21
+ * - `richText` → the normalized join of its non-empty Lexical text nodes (the same nodes the
22
+ * pipeline expands per-node for write-back), trimmed; `null` when it holds no text.
23
+ * - plain `text`/`textarea` → the trimmed string; `null` when empty or not a string.
24
+ *
25
+ * Returns `null` (rather than `""`) for "no translatable text", so callers uniformly skip it.
26
+ */ export const leafSourceText = (field, value)=>{
27
+ if (field.type === "richText") {
28
+ if (!isSerializedLexicalRoot(value)) return null;
29
+ const text = collectSerializedLexicalTextNodes(value.root).map((ref)=>ref.node.text).join("").trim();
30
+ return text.length > 0 ? text : null;
31
+ }
32
+ if (typeof value !== "string") return null;
33
+ const trimmed = value.trim();
34
+ return trimmed.length > 0 ? trimmed : null;
35
+ };
36
+
37
+ //# sourceMappingURL=translatableLeaf.js.map
@@ -0,0 +1,23 @@
1
+ import type { FieldTranslationConfig } from "./types";
2
+ /**
3
+ * Extract translation configuration from a Payload field.
4
+ *
5
+ * @param field - The field to extract config from (only its `custom` extension point is read)
6
+ * @returns The translation configuration, or empty object if not defined
7
+ */
8
+ export declare function getFieldTranslationConfig(field: {
9
+ custom?: Record<string, unknown>;
10
+ }): FieldTranslationConfig;
11
+ /**
12
+ * @deprecated Use `getFieldTranslationConfig` instead
13
+ */
14
+ export declare const getTranslateKitFieldConfig: typeof getFieldTranslationConfig;
15
+ /**
16
+ * Check if a field should be excluded from translation.
17
+ *
18
+ * @param field - The field to check (only its `custom` extension point is read)
19
+ * @returns true if the field has `translateKit.exclude: true`
20
+ */
21
+ export declare function isFieldExcludedFromTranslation(field: {
22
+ custom?: Record<string, unknown>;
23
+ }): boolean;
@@ -1,15 +1,15 @@
1
- import { TRANSLATE_KIT_CUSTOM_KEY } from './types';
1
+ import { TRANSLATE_KIT_CUSTOM_KEY } from "./types";
2
2
  /**
3
3
  * Extract translation configuration from a Payload field.
4
4
  *
5
- * @param field - The Payload field to extract config from
5
+ * @param field - The field to extract config from (only its `custom` extension point is read)
6
6
  * @returns The translation configuration, or empty object if not defined
7
7
  */ export function getFieldTranslationConfig(field) {
8
- if (!field.custom || typeof field.custom !== 'object') {
8
+ if (!field.custom || typeof field.custom !== "object") {
9
9
  return {};
10
10
  }
11
11
  const config = field.custom[TRANSLATE_KIT_CUSTOM_KEY];
12
- if (!config || typeof config !== 'object') {
12
+ if (!config || typeof config !== "object") {
13
13
  return {};
14
14
  }
15
15
  return config;
@@ -20,7 +20,7 @@ import { TRANSLATE_KIT_CUSTOM_KEY } from './types';
20
20
  /**
21
21
  * Check if a field should be excluded from translation.
22
22
  *
23
- * @param field - The Payload field to check
23
+ * @param field - The field to check (only its `custom` extension point is read)
24
24
  * @returns true if the field has `translateKit.exclude: true`
25
25
  */ export function isFieldExcludedFromTranslation(field) {
26
26
  return getFieldTranslationConfig(field).exclude === true;
@@ -1,3 +1,3 @@
1
- export { getFieldTranslationConfig, getTranslateKitFieldConfig, isFieldExcludedFromTranslation } from './getFieldConfig';
2
- export { TRANSLATE_KIT_CUSTOM_KEY } from './types';
3
- export type { FieldTranslationConfig, TranslateKitFieldConfig } from './types';
1
+ export { getFieldTranslationConfig, getTranslateKitFieldConfig, isFieldExcludedFromTranslation, } from "./getFieldConfig";
2
+ export { TRANSLATE_KIT_CUSTOM_KEY } from "./types";
3
+ export type { FieldTranslationConfig, TranslateKitFieldConfig } from "./types";
@@ -0,0 +1,4 @@
1
+ export { getFieldTranslationConfig, getTranslateKitFieldConfig, isFieldExcludedFromTranslation } from "./getFieldConfig";
2
+ export { TRANSLATE_KIT_CUSTOM_KEY } from "./types";
3
+
4
+ //# sourceMappingURL=index.js.map
@@ -1,5 +1,4 @@
1
- import type { Field } from "payload";
2
- import type { LeafField } from "./types";
1
+ import type { FieldLike, LeafField } from "./types";
3
2
  /**
4
3
  * Outcome of navigating a field schema by a path of segment names (see {@link findFieldByPath}).
5
4
  *
@@ -52,4 +51,4 @@ export type FieldPathResult = {
52
51
  * @returns A {@link FieldPathResult}.
53
52
  * @public
54
53
  */
55
- export declare function findFieldByPath(fields: Field[], segments: string[], data?: unknown): FieldPathResult;
54
+ export declare function findFieldByPath(fields: FieldLike[], segments: string[], data?: unknown): FieldPathResult;
@@ -0,0 +1,19 @@
1
+ import type { FieldLike, TabsFieldLike } from "./types";
2
+ /**
3
+ * Type guard: Checks if a field is a tabs field.
4
+ */
5
+ export declare function isTabsField(field: FieldLike): field is TabsFieldLike;
6
+ /**
7
+ * Type guard: Checks if value is a block item (has blockType property).
8
+ */
9
+ export declare function isBlockItem(value: unknown): value is Record<string, unknown> & {
10
+ blockType: string;
11
+ };
12
+ /**
13
+ * Type guard: Checks if value has a fields array property.
14
+ * Works with any field/tab-like object; narrows to the framework-agnostic {@link FieldLike}
15
+ * so the field-traversal kernel that consumes it stays free of Payload types.
16
+ */
17
+ export declare function hasFields(value: unknown): value is {
18
+ fields: FieldLike[];
19
+ };
@@ -0,0 +1,20 @@
1
+ import { isObject } from "../utils/isObject";
2
+ /**
3
+ * Type guard: Checks if a field is a tabs field.
4
+ */ export function isTabsField(field) {
5
+ return field.type === "tabs";
6
+ }
7
+ /**
8
+ * Type guard: Checks if value is a block item (has blockType property).
9
+ */ export function isBlockItem(value) {
10
+ return isObject(value) && "blockType" in value && typeof value.blockType === "string";
11
+ }
12
+ /**
13
+ * Type guard: Checks if value has a fields array property.
14
+ * Works with any field/tab-like object; narrows to the framework-agnostic {@link FieldLike}
15
+ * so the field-traversal kernel that consumes it stays free of Payload types.
16
+ */ export function hasFields(value) {
17
+ return isObject(value) && "fields" in value && Array.isArray(value.fields);
18
+ }
19
+
20
+ //# sourceMappingURL=guards.js.map
@@ -0,0 +1,7 @@
1
+ export { findFieldByPath } from "./findFieldByPath";
2
+ export type { FieldPathResult } from "./findFieldByPath";
3
+ export { hasFields, isBlockItem, isTabsField } from "./guards";
4
+ export { classifyField, matchElementById, resolveBlockFields, tabScopes } from "./kernel";
5
+ export { fieldAffectsData, fieldIsArrayType, fieldIsBlockType, fieldIsGroupType, tabHasName, } from "./predicates";
6
+ export type { ArrayFieldLike, BlockLike, BlocksFieldLike, ChildCursor, ChildOutput, ContainerInfo, FieldLike, FieldStructure, FieldWalker, GroupFieldLike, LeafField, LeafFieldLike, TabLike, TabScope, TabsFieldLike, WalkSignal, } from "./types";
7
+ export { walkFields } from "./walkFields";
@@ -0,0 +1,7 @@
1
+ export { findFieldByPath } from "./findFieldByPath";
2
+ export { hasFields, isBlockItem, isTabsField } from "./guards";
3
+ export { classifyField, matchElementById, resolveBlockFields, tabScopes } from "./kernel";
4
+ export { fieldAffectsData, fieldIsArrayType, fieldIsBlockType, fieldIsGroupType, tabHasName } from "./predicates";
5
+ export { walkFields } from "./walkFields";
6
+
7
+ //# sourceMappingURL=index.js.map
@@ -1,7 +1,6 @@
1
- import type { BlocksField, Field, TabsField } from "payload";
2
- import type { FieldStructure, TabScope } from "./types";
1
+ import type { BlocksFieldLike, FieldLike, FieldStructure, TabScope, TabsFieldLike } from "./types";
3
2
  /**
4
- * Classify a single Payload {@link Field} into a discriminated {@link FieldStructure} — the
3
+ * Classify a single {@link FieldLike} into a discriminated {@link FieldStructure} — the
5
4
  * one place that encodes how Payload field types map onto data boundaries.
6
5
  *
7
6
  * Traversals switch on the result instead of re-deriving the predicate chain
@@ -39,12 +38,12 @@ import type { FieldStructure, TabScope } from "./types";
39
38
  * @see {@link walkFields} — the recursive engine built on this classification.
40
39
  * @public
41
40
  */
42
- export declare function classifyField(field: Field): FieldStructure;
41
+ export declare function classifyField(field: FieldLike): FieldStructure;
43
42
  /**
44
43
  * Flatten a `tabs` field's tabs into {@link TabScope}s, absorbing the named/unnamed +
45
44
  * `hasFields` handling that field traversals would otherwise each repeat.
46
45
  *
47
- * @param field - A Payload `tabs` field.
46
+ * @param field - A {@link TabsFieldLike}.
48
47
  * @returns One {@link TabScope} per tab that has fields, in declaration order:
49
48
  * - a **named** tab → `{ named: true, tab }` — it opens a data boundary at `tab.name`, and
50
49
  * the `NamedTab` is surfaced so callers can read its `name`/`fields`/config;
@@ -60,12 +59,12 @@ export declare function classifyField(field: Field): FieldStructure;
60
59
  * ```
61
60
  * @public
62
61
  */
63
- export declare function tabScopes(field: TabsField): TabScope[];
62
+ export declare function tabScopes(field: TabsFieldLike): TabScope[];
64
63
  /**
65
64
  * Resolve the child `fields` for a single `blocks` element by matching its `blockType`
66
65
  * against the field's block definitions.
67
66
  *
68
- * @param field - A Payload `blocks` field carrying inline block definitions.
67
+ * @param field - A {@link BlocksFieldLike} carrying inline block definitions.
69
68
  * @param item - The data for one block element (expected to carry a `blockType` string).
70
69
  * @returns The matched block's `fields`, or `null` when `item` is not a block object or its
71
70
  * `blockType` matches no defined block.
@@ -82,7 +81,7 @@ export declare function tabScopes(field: TabsField): TabScope[];
82
81
  * ```
83
82
  * @public
84
83
  */
85
- export declare function resolveBlockFields(field: BlocksField, item: unknown): Field[] | null;
84
+ export declare function resolveBlockFields(field: BlocksFieldLike, item: unknown): FieldLike[] | null;
86
85
  /**
87
86
  * Find the element of a parallel data array that corresponds to `refItem` by `id` — not by
88
87
  * position.
@@ -1,8 +1,8 @@
1
- import { fieldAffectsData, fieldIsArrayType, fieldIsBlockType, fieldIsGroupType, tabHasName } from "payload/shared";
2
- import { hasFields, isBlockItem, isTabsField } from "../guards";
3
- import { isObject } from "../utils";
1
+ import { isObject } from "../utils/isObject";
2
+ import { hasFields, isBlockItem, isTabsField } from "./guards";
3
+ import { fieldAffectsData, fieldIsArrayType, fieldIsBlockType, fieldIsGroupType, tabHasName } from "./predicates";
4
4
  /**
5
- * Classify a single Payload {@link Field} into a discriminated {@link FieldStructure} — the
5
+ * Classify a single {@link FieldLike} into a discriminated {@link FieldStructure} — the
6
6
  * one place that encodes how Payload field types map onto data boundaries.
7
7
  *
8
8
  * Traversals switch on the result instead of re-deriving the predicate chain
@@ -88,7 +88,7 @@ import { isObject } from "../utils";
88
88
  * Flatten a `tabs` field's tabs into {@link TabScope}s, absorbing the named/unnamed +
89
89
  * `hasFields` handling that field traversals would otherwise each repeat.
90
90
  *
91
- * @param field - A Payload `tabs` field.
91
+ * @param field - A {@link TabsFieldLike}.
92
92
  * @returns One {@link TabScope} per tab that has fields, in declaration order:
93
93
  * - a **named** tab → `{ named: true, tab }` — it opens a data boundary at `tab.name`, and
94
94
  * the `NamedTab` is surfaced so callers can read its `name`/`fields`/config;
@@ -121,7 +121,7 @@ import { isObject } from "../utils";
121
121
  * Resolve the child `fields` for a single `blocks` element by matching its `blockType`
122
122
  * against the field's block definitions.
123
123
  *
124
- * @param field - A Payload `blocks` field carrying inline block definitions.
124
+ * @param field - A {@link BlocksFieldLike} carrying inline block definitions.
125
125
  * @param item - The data for one block element (expected to carry a `blockType` string).
126
126
  * @returns The matched block's `fields`, or `null` when `item` is not a block object or its
127
127
  * `blockType` matches no defined block.
@@ -0,0 +1,24 @@
1
+ import type { ArrayFieldLike, BlocksFieldLike, FieldLike, GroupFieldLike, TabLike } from "./types";
2
+ /**
3
+ * Framework-agnostic re-implementations of Payload's field predicates, defined over the
4
+ * structural {@link FieldLike} family so this traversal layer carries no `payload` import.
5
+ * Each matches `payload/shared` exactly on every field type (pinned by `predicates.test.ts`);
6
+ * the parity guard must stay green before the classifier can rely on these.
7
+ *
8
+ * @public
9
+ */
10
+ /** True for an `array` field. Mirrors `payload/shared`'s `fieldIsArrayType`. */
11
+ export declare const fieldIsArrayType: (field: FieldLike) => field is ArrayFieldLike;
12
+ /** True for a `blocks` field. Mirrors `payload/shared`'s `fieldIsBlockType`. */
13
+ export declare const fieldIsBlockType: (field: FieldLike) => field is BlocksFieldLike;
14
+ /** True for a `group` field. Mirrors `payload/shared`'s `fieldIsGroupType`. */
15
+ export declare const fieldIsGroupType: (field: FieldLike) => field is GroupFieldLike;
16
+ /**
17
+ * True when a field carries data (has a `name`) and is not a presentational `ui` field.
18
+ * Mirrors `payload/shared`'s `fieldAffectsData`.
19
+ */
20
+ export declare const fieldAffectsData: (field: FieldLike) => boolean;
21
+ /** True when a tab has a `name` (so it opens a data boundary). Mirrors `payload/shared`'s `tabHasName`. */
22
+ export declare const tabHasName: (tab: TabLike) => tab is TabLike & {
23
+ name: string;
24
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Framework-agnostic re-implementations of Payload's field predicates, defined over the
3
+ * structural {@link FieldLike} family so this traversal layer carries no `payload` import.
4
+ * Each matches `payload/shared` exactly on every field type (pinned by `predicates.test.ts`);
5
+ * the parity guard must stay green before the classifier can rely on these.
6
+ *
7
+ * @public
8
+ */ /** True for an `array` field. Mirrors `payload/shared`'s `fieldIsArrayType`. */ export const fieldIsArrayType = (field)=>field.type === "array";
9
+ /** True for a `blocks` field. Mirrors `payload/shared`'s `fieldIsBlockType`. */ export const fieldIsBlockType = (field)=>field.type === "blocks";
10
+ /** True for a `group` field. Mirrors `payload/shared`'s `fieldIsGroupType`. */ export const fieldIsGroupType = (field)=>field.type === "group";
11
+ /**
12
+ * True when a field carries data (has a `name`) and is not a presentational `ui` field.
13
+ * Mirrors `payload/shared`'s `fieldAffectsData`.
14
+ */ export const fieldAffectsData = (field)=>"name" in field && field.type !== "ui";
15
+ /** True when a tab has a `name` (so it opens a data boundary). Mirrors `payload/shared`'s `tabHasName`. */ export const tabHasName = (tab)=>"name" in tab;
16
+
17
+ //# sourceMappingURL=predicates.js.map
@@ -1,16 +1,112 @@
1
- import type { ArrayField, BlocksField, Field, FieldAffectingData, NamedGroupField, NamedTab, TabAsField, TabsField } from "payload";
1
+ /**
2
+ * A block definition as this layer needs to read it: a `slug` to match a data element's
3
+ * `blockType` against, and the child `fields` to descend into. Structurally a superset-compatible
4
+ * shape of Payload's `Block` (Payload's concrete `Block` is assignable to this).
5
+ *
6
+ * @public
7
+ */
8
+ export interface BlockLike {
9
+ slug: string;
10
+ fields: FieldLike[];
11
+ }
12
+ /**
13
+ * A tab as this layer needs to read it: an optional `name` (present → it opens a data boundary;
14
+ * absent → it flattens into the parent scope) and its child `fields`. Payload's `Tab`
15
+ * (`NamedTab | UnnamedTab`) is assignable to this.
16
+ *
17
+ * @public
18
+ */
19
+ export interface TabLike {
20
+ name?: string;
21
+ fields: FieldLike[];
22
+ }
23
+ /**
24
+ * The structural shape of a single field this traversal layer reads — a framework-agnostic
25
+ * superset that Payload's concrete `Field` union is assignable to. The layer only ever reads
26
+ * `type` (to classify), `name`/`localized`/`custom` (leaf data + translation config), and the
27
+ * container members `fields`/`blocks`/`tabs` (to descend). Nothing Payload-specific leaks in.
28
+ *
29
+ * @public
30
+ */
31
+ export interface FieldLike {
32
+ type: string;
33
+ name?: string;
34
+ localized?: boolean;
35
+ custom?: Record<string, unknown>;
36
+ fields?: FieldLike[];
37
+ blocks?: BlockLike[];
38
+ tabs?: TabLike[];
39
+ }
40
+ /**
41
+ * A `group` field: a named data boundary whose child `fields` live one level down at `name`.
42
+ *
43
+ * @public
44
+ */
45
+ export interface GroupFieldLike extends FieldLike {
46
+ type: "group";
47
+ name: string;
48
+ fields: FieldLike[];
49
+ }
50
+ /**
51
+ * An `array` field: a named, repeating data boundary. Its `fields` describe one element; the
52
+ * data carries N elements keyed by index.
53
+ *
54
+ * @public
55
+ */
56
+ export interface ArrayFieldLike extends FieldLike {
57
+ type: "array";
58
+ name: string;
59
+ fields: FieldLike[];
60
+ }
61
+ /**
62
+ * A `blocks` field: a named, polymorphic repeating boundary. Each element's child fields are
63
+ * resolved per element by matching its `blockType` against `blocks[].slug`.
64
+ *
65
+ * @public
66
+ */
67
+ export interface BlocksFieldLike extends FieldLike {
68
+ type: "blocks";
69
+ name: string;
70
+ blocks: BlockLike[];
71
+ }
72
+ /**
73
+ * A `tabs` field: carries `tabs` (not `fields`) and is non-data-affecting. Expand with
74
+ * `tabScopes` into named/unnamed {@link TabScope}s.
75
+ *
76
+ * @public
77
+ */
78
+ export interface TabsFieldLike extends FieldLike {
79
+ type: "tabs";
80
+ tabs: TabLike[];
81
+ }
2
82
  /**
3
83
  * A data-affecting field the engine routes to `leaf`: a scalar/relational leaf, never a
4
- * container (`group`/`array`/`blocks`) and never a `TabAsField`. Narrowing `FieldAffectingData`
5
- * down to these members is what guarantees `name: string` the raw union does NOT, because
6
- * an unnamed `TabAsField` carries `name?: string`.
84
+ * container (`group`/`array`/`blocks`/`tabs`). The `never` guards on the container members are
85
+ * what exclude containers a `FieldLike` carrying `fields`/`blocks`/`tabs` is NOT assignable
86
+ * here, so leaf dispatch can never silently widen onto a container, and `name` is always present.
87
+ *
88
+ * @public
89
+ */
90
+ export interface LeafFieldLike {
91
+ name: string;
92
+ type: string;
93
+ localized?: boolean;
94
+ custom?: Record<string, unknown>;
95
+ fields?: never;
96
+ blocks?: never;
97
+ tabs?: never;
98
+ }
99
+ /**
100
+ * Back-compat alias for {@link LeafFieldLike}. Existing consumers (and `index.ts`) re-export
101
+ * `LeafField`; the leaf is now defined structurally rather than as a narrowing of Payload's
102
+ * `FieldAffectingData`.
7
103
  *
8
104
  * @public
9
105
  */
10
- export type LeafField = Exclude<FieldAffectingData, ArrayField | BlocksField | NamedGroupField | TabAsField>;
106
+ export type LeafField = LeafFieldLike;
11
107
  /**
12
- * Structural classification of a single Payload field — the one place that encodes
13
- * how Payload field types map onto data boundaries (the dispatch order
108
+ * Structural classification of a single field — the one place that encodes
109
+ * how field types map onto data boundaries (the dispatch order
14
110
  * `tabs → transparent → group → array → blocks → leaf`).
15
111
  *
16
112
  * Consumed by {@link FieldWalker}/`walkFields` (the exhaustive, data-parallel walks)
@@ -29,33 +125,33 @@ export type LeafField = Exclude<FieldAffectingData, ArrayField | BlocksField | N
29
125
  */
30
126
  export type FieldStructure = {
31
127
  kind: "tabs";
32
- field: TabsField;
128
+ field: TabsFieldLike;
33
129
  } | {
34
130
  kind: "transparent";
35
- fields: Field[];
131
+ fields: FieldLike[];
36
132
  } | {
37
133
  kind: "presentational";
38
134
  } | {
39
135
  kind: "group";
40
136
  name: string;
41
- fields: Field[];
42
- field: NamedGroupField;
137
+ fields: FieldLike[];
138
+ field: GroupFieldLike;
43
139
  } | {
44
140
  kind: "array";
45
141
  name: string;
46
- fields: Field[];
47
- field: ArrayField;
142
+ fields: FieldLike[];
143
+ field: ArrayFieldLike;
48
144
  } | {
49
145
  kind: "blocks";
50
146
  name: string;
51
- field: BlocksField;
147
+ field: BlocksFieldLike;
52
148
  } | {
53
149
  kind: "leaf";
54
150
  name: string;
55
- field: LeafField;
151
+ field: LeafFieldLike;
56
152
  };
57
153
  /**
58
- * A tab flattened by `tabScopes`. A named tab opens a data boundary, so its `NamedTab`
154
+ * A tab flattened by `tabScopes`. A named tab opens a data boundary, so its {@link TabLike}
59
155
  * is surfaced (the walker passes it to `enterObject`, and `tab.name` is the data key).
60
156
  * An unnamed tab flattens into the parent data scope, so only its `fields` are needed.
61
157
  *
@@ -64,10 +160,12 @@ export type FieldStructure = {
64
160
  */
65
161
  export type TabScope = {
66
162
  named: true;
67
- tab: NamedTab;
163
+ tab: TabLike & {
164
+ name: string;
165
+ };
68
166
  } | {
69
167
  named: false;
70
- fields: Field[];
168
+ fields: FieldLike[];
71
169
  };
72
170
  /**
73
171
  * Control signal a walker callback can return instead of descending.
@@ -88,7 +186,7 @@ export type WalkSignal = "skip" | "stop";
88
186
  export interface ChildCursor<Cursor extends object> {
89
187
  cursor: Cursor;
90
188
  /** Child fields to walk under this item. For `blocks`, the resolved `block.fields`. */
91
- fields: Field[];
189
+ fields: FieldLike[];
92
190
  /** Index/key this child sits at; surfaced back to `combine`. */
93
191
  key: string | number;
94
192
  }
@@ -109,15 +207,17 @@ export type ContainerInfo = {
109
207
  field: null;
110
208
  } | {
111
209
  kind: "object";
112
- field: NamedGroupField | NamedTab;
210
+ field: GroupFieldLike | (TabLike & {
211
+ name: string;
212
+ });
113
213
  key: string;
114
214
  } | {
115
215
  kind: "list";
116
- field: ArrayField | BlocksField;
216
+ field: ArrayFieldLike | BlocksFieldLike;
117
217
  key: string;
118
218
  } | {
119
219
  kind: "element";
120
- field: ArrayField | BlocksField;
220
+ field: ArrayFieldLike | BlocksFieldLike;
121
221
  key: string | number;
122
222
  };
123
223
  /**
@@ -172,16 +272,18 @@ export interface ChildOutput<Out> {
172
272
  */
173
273
  export interface FieldWalker<Cursor extends object, Out> {
174
274
  /** Enter a single-object boundary (named `group` or named tab). Return the child cursor, or a signal. */
175
- enterObject(field: NamedGroupField | NamedTab, cursor: Cursor): Cursor | WalkSignal;
275
+ enterObject(field: GroupFieldLike | (TabLike & {
276
+ name: string;
277
+ }), cursor: Cursor): Cursor | WalkSignal;
176
278
  /** Enter an `array`/`blocks` boundary. Return one {@link ChildCursor} per element, or a signal. */
177
- enterList(field: ArrayField | BlocksField, cursor: Cursor): ChildCursor<Cursor>[] | WalkSignal;
279
+ enterList(field: ArrayFieldLike | BlocksFieldLike, cursor: Cursor): ChildCursor<Cursor>[] | WalkSignal;
178
280
  /**
179
- * Visit a data-affecting leaf. `field` is a {@link LeafField} — the engine has already
281
+ * Visit a data-affecting leaf. `field` is a {@link LeafFieldLike} — the engine has already
180
282
  * resolved it via the `fieldAffectsData` guard and excluded containers/tabs, so `field.name`
181
- * is always present and callers never touch the raw `Field` union. Return its output, or
283
+ * is always present and callers never touch the raw field union. Return its output, or
182
284
  * `undefined` to drop it.
183
285
  */
184
- leaf(field: LeafField, cursor: Cursor): Out | undefined;
286
+ leaf(field: LeafFieldLike, cursor: Cursor): Out | undefined;
185
287
  /**
186
288
  * Assemble a container from its children's outputs (called bottom-up). Build-tree
187
289
  * callers reconstruct here; collectors return `undefined`. Return `undefined` to drop
@@ -1,4 +1,10 @@
1
1
  /**
2
+ * A block definition as this layer needs to read it: a `slug` to match a data element's
3
+ * `blockType` against, and the child `fields` to descend into. Structurally a superset-compatible
4
+ * shape of Payload's `Block` (Payload's concrete `Block` is assignable to this).
5
+ *
6
+ * @public
7
+ */ /**
2
8
  * Behaviour a caller plugs into {@link walkFields}. The engine owns structural dispatch and
3
9
  * recursion over the **schema**; the caller owns the **data** via the opaque `Cursor`
4
10
  * (1..n parallel data trees plus any path live there) and decides what to produce.
@@ -1,5 +1,4 @@
1
- import type { Field } from "payload";
2
- import type { FieldWalker } from "./types";
1
+ import type { FieldLike, FieldWalker } from "./types";
3
2
  /**
4
3
  * Depth-first walk of a Payload field **schema**, driving a caller-supplied
5
4
  * {@link FieldWalker}. The single traversal engine this package's data operations build on
@@ -48,4 +47,4 @@ import type { FieldWalker } from "./types";
48
47
  * @see {@link FieldWalker} for the full visitor contract and the caller shapes it subsumes.
49
48
  * @public
50
49
  */
51
- export declare function walkFields<Cursor extends object, Out>(fields: Field[], root: Cursor, walker: FieldWalker<Cursor, Out>): Out | undefined;
50
+ export declare function walkFields<Cursor extends object, Out>(fields: FieldLike[], root: Cursor, walker: FieldWalker<Cursor, Out>): Out | undefined;