@prismicio/client 7.21.6-canary.529a352 → 7.21.6

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 (580) hide show
  1. package/dist/Client.cjs +20 -19
  2. package/dist/Client.cjs.map +1 -1
  3. package/dist/Client.d.cts +12 -5
  4. package/dist/Client.d.cts.map +1 -1
  5. package/dist/Client.d.ts +12 -5
  6. package/dist/Client.d.ts.map +1 -1
  7. package/dist/Client.js +9 -8
  8. package/dist/Client.js.map +1 -1
  9. package/dist/Migration.cjs +19 -18
  10. package/dist/Migration.cjs.map +1 -1
  11. package/dist/Migration.d.cts +1 -0
  12. package/dist/Migration.d.cts.map +1 -1
  13. package/dist/Migration.d.ts +1 -0
  14. package/dist/Migration.d.ts.map +1 -1
  15. package/dist/Migration.js +12 -11
  16. package/dist/Migration.js.map +1 -1
  17. package/dist/WriteClient.cjs +21 -17
  18. package/dist/WriteClient.cjs.map +1 -1
  19. package/dist/WriteClient.d.cts +1 -0
  20. package/dist/WriteClient.d.cts.map +1 -1
  21. package/dist/WriteClient.d.ts +1 -0
  22. package/dist/WriteClient.d.ts.map +1 -1
  23. package/dist/WriteClient.js +14 -10
  24. package/dist/WriteClient.js.map +1 -1
  25. package/dist/_virtual/{_rolldown/runtime.js → rolldown_runtime.cjs} +5 -4
  26. package/dist/_virtual/rolldown_runtime.js +13 -0
  27. package/dist/buildQueryURL.cjs +5 -4
  28. package/dist/buildQueryURL.cjs.map +1 -1
  29. package/dist/buildQueryURL.d.cts.map +1 -1
  30. package/dist/buildQueryURL.d.ts.map +1 -1
  31. package/dist/buildQueryURL.js +3 -2
  32. package/dist/buildQueryURL.js.map +1 -1
  33. package/dist/cookie.cjs +9 -7
  34. package/dist/cookie.cjs.map +1 -1
  35. package/dist/cookie.d.cts.map +1 -1
  36. package/dist/cookie.d.ts.map +1 -1
  37. package/dist/cookie.js +4 -3
  38. package/dist/cookie.js.map +1 -1
  39. package/dist/createClient.cjs +3 -2
  40. package/dist/createClient.cjs.map +1 -1
  41. package/dist/createClient.d.cts +1 -0
  42. package/dist/createClient.d.cts.map +1 -1
  43. package/dist/createClient.d.ts +1 -0
  44. package/dist/createClient.d.ts.map +1 -1
  45. package/dist/createClient.js +2 -1
  46. package/dist/createClient.js.map +1 -1
  47. package/dist/createMigration.cjs +3 -2
  48. package/dist/createMigration.cjs.map +1 -1
  49. package/dist/createMigration.d.cts +1 -0
  50. package/dist/createMigration.d.cts.map +1 -1
  51. package/dist/createMigration.d.ts +1 -0
  52. package/dist/createMigration.d.ts.map +1 -1
  53. package/dist/createMigration.js +2 -1
  54. package/dist/createMigration.js.map +1 -1
  55. package/dist/createWriteClient.cjs +3 -2
  56. package/dist/createWriteClient.cjs.map +1 -1
  57. package/dist/createWriteClient.d.cts +1 -0
  58. package/dist/createWriteClient.d.cts.map +1 -1
  59. package/dist/createWriteClient.d.ts +1 -0
  60. package/dist/createWriteClient.d.ts.map +1 -1
  61. package/dist/createWriteClient.js +2 -1
  62. package/dist/createWriteClient.js.map +1 -1
  63. package/dist/errors.cjs +2 -1
  64. package/dist/errors.cjs.map +1 -1
  65. package/dist/errors.d.cts.map +1 -1
  66. package/dist/errors.d.ts.map +1 -1
  67. package/dist/errors.js +1 -1
  68. package/dist/filter.cjs +2 -1
  69. package/dist/filter.cjs.map +1 -1
  70. package/dist/filter.d.cts.map +1 -1
  71. package/dist/filter.d.ts.map +1 -1
  72. package/dist/filter.js +1 -1
  73. package/dist/getGraphQLEndpoint.cjs +4 -3
  74. package/dist/getGraphQLEndpoint.cjs.map +1 -1
  75. package/dist/getGraphQLEndpoint.d.cts.map +1 -1
  76. package/dist/getGraphQLEndpoint.d.ts.map +1 -1
  77. package/dist/getGraphQLEndpoint.js +2 -1
  78. package/dist/getGraphQLEndpoint.js.map +1 -1
  79. package/dist/getRepositoryEndpoint.cjs +4 -3
  80. package/dist/getRepositoryEndpoint.cjs.map +1 -1
  81. package/dist/getRepositoryEndpoint.d.cts.map +1 -1
  82. package/dist/getRepositoryEndpoint.d.ts.map +1 -1
  83. package/dist/getRepositoryEndpoint.js +2 -1
  84. package/dist/getRepositoryEndpoint.js.map +1 -1
  85. package/dist/getRepositoryName.cjs +3 -2
  86. package/dist/getRepositoryName.cjs.map +1 -1
  87. package/dist/getRepositoryName.d.cts.map +1 -1
  88. package/dist/getRepositoryName.d.ts.map +1 -1
  89. package/dist/getRepositoryName.js +2 -1
  90. package/dist/getRepositoryName.js.map +1 -1
  91. package/dist/getToolbarSrc.cjs +4 -3
  92. package/dist/getToolbarSrc.cjs.map +1 -1
  93. package/dist/getToolbarSrc.d.cts.map +1 -1
  94. package/dist/getToolbarSrc.d.ts.map +1 -1
  95. package/dist/getToolbarSrc.js +2 -1
  96. package/dist/getToolbarSrc.js.map +1 -1
  97. package/dist/helpers/asDate.cjs +2 -1
  98. package/dist/helpers/asDate.cjs.map +1 -1
  99. package/dist/helpers/asDate.d.cts +1 -0
  100. package/dist/helpers/asDate.d.cts.map +1 -1
  101. package/dist/helpers/asDate.d.ts +1 -0
  102. package/dist/helpers/asDate.d.ts.map +1 -1
  103. package/dist/helpers/asDate.js +1 -1
  104. package/dist/helpers/asHTML.cjs +6 -5
  105. package/dist/helpers/asHTML.cjs.map +1 -1
  106. package/dist/helpers/asHTML.d.cts +1 -0
  107. package/dist/helpers/asHTML.d.cts.map +1 -1
  108. package/dist/helpers/asHTML.d.ts +1 -0
  109. package/dist/helpers/asHTML.d.ts.map +1 -1
  110. package/dist/helpers/asHTML.js +2 -1
  111. package/dist/helpers/asHTML.js.map +1 -1
  112. package/dist/helpers/asImagePixelDensitySrcSet.cjs +4 -3
  113. package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
  114. package/dist/helpers/asImagePixelDensitySrcSet.d.cts +1 -0
  115. package/dist/helpers/asImagePixelDensitySrcSet.d.cts.map +1 -1
  116. package/dist/helpers/asImagePixelDensitySrcSet.d.ts +1 -0
  117. package/dist/helpers/asImagePixelDensitySrcSet.d.ts.map +1 -1
  118. package/dist/helpers/asImagePixelDensitySrcSet.js +3 -2
  119. package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
  120. package/dist/helpers/asImageSrc.cjs +3 -2
  121. package/dist/helpers/asImageSrc.cjs.map +1 -1
  122. package/dist/helpers/asImageSrc.d.cts +1 -0
  123. package/dist/helpers/asImageSrc.d.cts.map +1 -1
  124. package/dist/helpers/asImageSrc.d.ts +1 -0
  125. package/dist/helpers/asImageSrc.d.ts.map +1 -1
  126. package/dist/helpers/asImageSrc.js +2 -1
  127. package/dist/helpers/asImageSrc.js.map +1 -1
  128. package/dist/helpers/asImageWidthSrcSet.cjs +5 -4
  129. package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
  130. package/dist/helpers/asImageWidthSrcSet.d.cts +1 -0
  131. package/dist/helpers/asImageWidthSrcSet.d.cts.map +1 -1
  132. package/dist/helpers/asImageWidthSrcSet.d.ts +1 -0
  133. package/dist/helpers/asImageWidthSrcSet.d.ts.map +1 -1
  134. package/dist/helpers/asImageWidthSrcSet.js +4 -3
  135. package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
  136. package/dist/helpers/asLink.cjs +4 -3
  137. package/dist/helpers/asLink.cjs.map +1 -1
  138. package/dist/helpers/asLink.d.cts +1 -0
  139. package/dist/helpers/asLink.d.cts.map +1 -1
  140. package/dist/helpers/asLink.d.ts +1 -0
  141. package/dist/helpers/asLink.d.ts.map +1 -1
  142. package/dist/helpers/asLink.js +2 -1
  143. package/dist/helpers/asLink.js.map +1 -1
  144. package/dist/helpers/asLinkAttrs.cjs +5 -4
  145. package/dist/helpers/asLinkAttrs.cjs.map +1 -1
  146. package/dist/helpers/asLinkAttrs.d.cts.map +1 -1
  147. package/dist/helpers/asLinkAttrs.d.ts.map +1 -1
  148. package/dist/helpers/asLinkAttrs.js +2 -1
  149. package/dist/helpers/asLinkAttrs.js.map +1 -1
  150. package/dist/helpers/asText.cjs +5 -4
  151. package/dist/helpers/asText.cjs.map +1 -1
  152. package/dist/helpers/asText.d.cts +1 -0
  153. package/dist/helpers/asText.d.cts.map +1 -1
  154. package/dist/helpers/asText.d.ts +1 -0
  155. package/dist/helpers/asText.d.ts.map +1 -1
  156. package/dist/helpers/asText.js +6 -5
  157. package/dist/helpers/asText.js.map +1 -1
  158. package/dist/helpers/documentToLinkField.cjs +3 -2
  159. package/dist/helpers/documentToLinkField.cjs.map +1 -1
  160. package/dist/helpers/documentToLinkField.d.cts.map +1 -1
  161. package/dist/helpers/documentToLinkField.d.ts.map +1 -1
  162. package/dist/helpers/documentToLinkField.js +2 -1
  163. package/dist/helpers/documentToLinkField.js.map +1 -1
  164. package/dist/helpers/isFilled.cjs +13 -11
  165. package/dist/helpers/isFilled.cjs.map +1 -1
  166. package/dist/helpers/isFilled.d.cts.map +1 -1
  167. package/dist/helpers/isFilled.d.ts.map +1 -1
  168. package/dist/helpers/isFilled.js +8 -7
  169. package/dist/helpers/isFilled.js.map +1 -1
  170. package/dist/helpers/mapSliceZone.cjs +2 -1
  171. package/dist/helpers/mapSliceZone.cjs.map +1 -1
  172. package/dist/helpers/mapSliceZone.d.cts +1 -0
  173. package/dist/helpers/mapSliceZone.d.cts.map +1 -1
  174. package/dist/helpers/mapSliceZone.d.ts +1 -0
  175. package/dist/helpers/mapSliceZone.d.ts.map +1 -1
  176. package/dist/helpers/mapSliceZone.js +1 -1
  177. package/dist/index.cjs +49 -49
  178. package/dist/index.cjs.map +1 -1
  179. package/dist/index.d.cts.map +1 -1
  180. package/dist/index.d.ts.map +1 -1
  181. package/dist/index.js +2 -1
  182. package/dist/index.js.map +1 -1
  183. package/dist/isRepositoryEndpoint.cjs +2 -1
  184. package/dist/isRepositoryEndpoint.cjs.map +1 -1
  185. package/dist/isRepositoryEndpoint.d.cts.map +1 -1
  186. package/dist/isRepositoryEndpoint.d.ts.map +1 -1
  187. package/dist/isRepositoryEndpoint.js +1 -1
  188. package/dist/isRepositoryName.cjs +2 -1
  189. package/dist/isRepositoryName.cjs.map +1 -1
  190. package/dist/isRepositoryName.d.cts.map +1 -1
  191. package/dist/isRepositoryName.d.ts.map +1 -1
  192. package/dist/isRepositoryName.js +1 -1
  193. package/dist/lib/devMsg.cjs +3 -2
  194. package/dist/lib/devMsg.cjs.map +1 -1
  195. package/dist/lib/devMsg.js +2 -1
  196. package/dist/lib/devMsg.js.map +1 -1
  197. package/dist/lib/escapeHTML.cjs +2 -1
  198. package/dist/lib/escapeHTML.cjs.map +1 -1
  199. package/dist/lib/escapeHTML.js +1 -1
  200. package/dist/lib/getOptionalLinkProperties.cjs +2 -1
  201. package/dist/lib/getOptionalLinkProperties.cjs.map +1 -1
  202. package/dist/lib/getOptionalLinkProperties.js +1 -1
  203. package/dist/lib/getOptionalLinkProperties.js.map +1 -1
  204. package/dist/lib/getPreviewCookie.cjs +4 -3
  205. package/dist/lib/getPreviewCookie.cjs.map +1 -1
  206. package/dist/lib/getPreviewCookie.js +4 -3
  207. package/dist/lib/getPreviewCookie.js.map +1 -1
  208. package/dist/lib/isInternalURL.cjs +2 -1
  209. package/dist/lib/isInternalURL.cjs.map +1 -1
  210. package/dist/lib/isInternalURL.js +1 -1
  211. package/dist/lib/isMigrationValue.cjs +7 -6
  212. package/dist/lib/isMigrationValue.cjs.map +1 -1
  213. package/dist/lib/isMigrationValue.js +2 -1
  214. package/dist/lib/isMigrationValue.js.map +1 -1
  215. package/dist/lib/isValue.cjs +4 -3
  216. package/dist/lib/isValue.cjs.map +1 -1
  217. package/dist/lib/isValue.js +2 -1
  218. package/dist/lib/isValue.js.map +1 -1
  219. package/dist/lib/pLimit.cjs +2 -1
  220. package/dist/lib/pLimit.cjs.map +1 -1
  221. package/dist/lib/pLimit.js +1 -1
  222. package/dist/lib/pLimit.js.map +1 -1
  223. package/dist/lib/request.cjs +4 -3
  224. package/dist/lib/request.cjs.map +1 -1
  225. package/dist/lib/request.d.cts +1 -0
  226. package/dist/lib/request.d.cts.map +1 -1
  227. package/dist/lib/request.d.ts +1 -0
  228. package/dist/lib/request.d.ts.map +1 -1
  229. package/dist/lib/request.js +3 -2
  230. package/dist/lib/request.js.map +1 -1
  231. package/dist/lib/resolveMigrationDocumentData.cjs +19 -18
  232. package/dist/lib/resolveMigrationDocumentData.cjs.map +1 -1
  233. package/dist/lib/resolveMigrationDocumentData.js +12 -11
  234. package/dist/lib/resolveMigrationDocumentData.js.map +1 -1
  235. package/dist/lib/serializerHelpers.cjs +5 -4
  236. package/dist/lib/serializerHelpers.cjs.map +1 -1
  237. package/dist/lib/serializerHelpers.js +2 -1
  238. package/dist/lib/serializerHelpers.js.map +1 -1
  239. package/dist/lib/throttledWarn.cjs +2 -1
  240. package/dist/lib/throttledWarn.cjs.map +1 -1
  241. package/dist/lib/throttledWarn.js +1 -1
  242. package/dist/lib/throttledWarn.js.map +1 -1
  243. package/dist/lib/validateAssetMetadata.cjs +3 -2
  244. package/dist/lib/validateAssetMetadata.cjs.map +1 -1
  245. package/dist/lib/validateAssetMetadata.js +2 -1
  246. package/dist/lib/validateAssetMetadata.js.map +1 -1
  247. package/dist/package.cjs +13 -12
  248. package/dist/package.cjs.map +1 -1
  249. package/dist/package.js +2 -2
  250. package/dist/package.js.map +1 -1
  251. package/dist/richtext/asText.cjs +2 -1
  252. package/dist/richtext/asText.cjs.map +1 -1
  253. package/dist/richtext/asText.d.cts +1 -0
  254. package/dist/richtext/asText.d.cts.map +1 -1
  255. package/dist/richtext/asText.d.ts +1 -0
  256. package/dist/richtext/asText.d.ts.map +1 -1
  257. package/dist/richtext/asText.js +1 -1
  258. package/dist/richtext/asTree.cjs +3 -2
  259. package/dist/richtext/asTree.cjs.map +1 -1
  260. package/dist/richtext/asTree.d.cts +1 -0
  261. package/dist/richtext/asTree.d.cts.map +1 -1
  262. package/dist/richtext/asTree.d.ts +1 -0
  263. package/dist/richtext/asTree.d.ts.map +1 -1
  264. package/dist/richtext/asTree.js +2 -1
  265. package/dist/richtext/asTree.js.map +1 -1
  266. package/dist/richtext/composeSerializers.cjs +2 -1
  267. package/dist/richtext/composeSerializers.cjs.map +1 -1
  268. package/dist/richtext/composeSerializers.d.cts +1 -0
  269. package/dist/richtext/composeSerializers.d.cts.map +1 -1
  270. package/dist/richtext/composeSerializers.d.ts +1 -0
  271. package/dist/richtext/composeSerializers.d.ts.map +1 -1
  272. package/dist/richtext/composeSerializers.js +1 -1
  273. package/dist/richtext/serialize.cjs +3 -2
  274. package/dist/richtext/serialize.cjs.map +1 -1
  275. package/dist/richtext/serialize.d.cts +1 -0
  276. package/dist/richtext/serialize.d.cts.map +1 -1
  277. package/dist/richtext/serialize.d.ts +1 -0
  278. package/dist/richtext/serialize.d.ts.map +1 -1
  279. package/dist/richtext/serialize.js +2 -1
  280. package/dist/richtext/serialize.js.map +1 -1
  281. package/dist/richtext/types.cjs +3 -2
  282. package/dist/richtext/types.cjs.map +1 -1
  283. package/dist/richtext/types.d.cts +1 -0
  284. package/dist/richtext/types.d.cts.map +1 -1
  285. package/dist/richtext/types.d.ts +1 -0
  286. package/dist/richtext/types.d.ts.map +1 -1
  287. package/dist/richtext/types.js +2 -1
  288. package/dist/richtext/types.js.map +1 -1
  289. package/dist/richtext/wrapMapSerializer.cjs +3 -2
  290. package/dist/richtext/wrapMapSerializer.cjs.map +1 -1
  291. package/dist/richtext/wrapMapSerializer.d.cts +1 -0
  292. package/dist/richtext/wrapMapSerializer.d.cts.map +1 -1
  293. package/dist/richtext/wrapMapSerializer.d.ts +1 -0
  294. package/dist/richtext/wrapMapSerializer.d.ts.map +1 -1
  295. package/dist/richtext/wrapMapSerializer.js +2 -1
  296. package/dist/richtext/wrapMapSerializer.js.map +1 -1
  297. package/dist/richtext.cjs +8 -8
  298. package/dist/richtext.js +2 -1
  299. package/dist/types/api/asset/asset.d.cts +1 -0
  300. package/dist/types/api/asset/asset.d.cts.map +1 -1
  301. package/dist/types/api/asset/asset.d.ts +1 -0
  302. package/dist/types/api/asset/asset.d.ts.map +1 -1
  303. package/dist/types/api/asset/tag.d.cts.map +1 -1
  304. package/dist/types/api/asset/tag.d.ts.map +1 -1
  305. package/dist/types/api/integration.d.cts +1 -0
  306. package/dist/types/api/integration.d.cts.map +1 -1
  307. package/dist/types/api/integration.d.ts +1 -0
  308. package/dist/types/api/integration.d.ts.map +1 -1
  309. package/dist/types/api/query.d.cts +1 -0
  310. package/dist/types/api/query.d.cts.map +1 -1
  311. package/dist/types/api/query.d.ts +1 -0
  312. package/dist/types/api/query.d.ts.map +1 -1
  313. package/dist/types/api/ref.d.cts.map +1 -1
  314. package/dist/types/api/ref.d.ts.map +1 -1
  315. package/dist/types/api/release.d.cts +1 -0
  316. package/dist/types/api/release.d.cts.map +1 -1
  317. package/dist/types/api/release.d.ts +1 -0
  318. package/dist/types/api/release.d.ts.map +1 -1
  319. package/dist/types/api/repository.d.cts +1 -0
  320. package/dist/types/api/repository.d.cts.map +1 -1
  321. package/dist/types/api/repository.d.ts +1 -0
  322. package/dist/types/api/repository.d.ts.map +1 -1
  323. package/dist/types/api/tags.d.cts.map +1 -1
  324. package/dist/types/api/tags.d.ts.map +1 -1
  325. package/dist/types/migration/Asset.cjs +2 -1
  326. package/dist/types/migration/Asset.cjs.map +1 -1
  327. package/dist/types/migration/Asset.d.cts +1 -0
  328. package/dist/types/migration/Asset.d.cts.map +1 -1
  329. package/dist/types/migration/Asset.d.ts +1 -0
  330. package/dist/types/migration/Asset.d.ts.map +1 -1
  331. package/dist/types/migration/Asset.js +1 -1
  332. package/dist/types/migration/ContentRelationship.d.cts.map +1 -1
  333. package/dist/types/migration/ContentRelationship.d.ts.map +1 -1
  334. package/dist/types/migration/Document.cjs +2 -1
  335. package/dist/types/migration/Document.cjs.map +1 -1
  336. package/dist/types/migration/Document.d.cts +1 -0
  337. package/dist/types/migration/Document.d.cts.map +1 -1
  338. package/dist/types/migration/Document.d.ts +1 -0
  339. package/dist/types/migration/Document.d.ts.map +1 -1
  340. package/dist/types/migration/Document.js +1 -1
  341. package/dist/types/migration/Document.js.map +1 -1
  342. package/dist/types/model/boolean.d.cts +1 -0
  343. package/dist/types/model/boolean.d.cts.map +1 -1
  344. package/dist/types/model/boolean.d.ts +1 -0
  345. package/dist/types/model/boolean.d.ts.map +1 -1
  346. package/dist/types/model/color.d.cts +1 -0
  347. package/dist/types/model/color.d.cts.map +1 -1
  348. package/dist/types/model/color.d.ts +1 -0
  349. package/dist/types/model/color.d.ts.map +1 -1
  350. package/dist/types/model/contentRelationship.d.cts +1 -0
  351. package/dist/types/model/contentRelationship.d.cts.map +1 -1
  352. package/dist/types/model/contentRelationship.d.ts +1 -0
  353. package/dist/types/model/contentRelationship.d.ts.map +1 -1
  354. package/dist/types/model/customType.d.cts +1 -0
  355. package/dist/types/model/customType.d.cts.map +1 -1
  356. package/dist/types/model/customType.d.ts +1 -0
  357. package/dist/types/model/customType.d.ts.map +1 -1
  358. package/dist/types/model/date.d.cts +1 -0
  359. package/dist/types/model/date.d.cts.map +1 -1
  360. package/dist/types/model/date.d.ts +1 -0
  361. package/dist/types/model/date.d.ts.map +1 -1
  362. package/dist/types/model/embed.d.cts +1 -0
  363. package/dist/types/model/embed.d.cts.map +1 -1
  364. package/dist/types/model/embed.d.ts +1 -0
  365. package/dist/types/model/embed.d.ts.map +1 -1
  366. package/dist/types/model/geoPoint.d.cts +1 -0
  367. package/dist/types/model/geoPoint.d.cts.map +1 -1
  368. package/dist/types/model/geoPoint.d.ts +1 -0
  369. package/dist/types/model/geoPoint.d.ts.map +1 -1
  370. package/dist/types/model/group.d.cts +1 -0
  371. package/dist/types/model/group.d.cts.map +1 -1
  372. package/dist/types/model/group.d.ts +1 -0
  373. package/dist/types/model/group.d.ts.map +1 -1
  374. package/dist/types/model/image.d.cts +1 -0
  375. package/dist/types/model/image.d.cts.map +1 -1
  376. package/dist/types/model/image.d.ts +1 -0
  377. package/dist/types/model/image.d.ts.map +1 -1
  378. package/dist/types/model/integration.d.cts +1 -0
  379. package/dist/types/model/integration.d.cts.map +1 -1
  380. package/dist/types/model/integration.d.ts +1 -0
  381. package/dist/types/model/integration.d.ts.map +1 -1
  382. package/dist/types/model/keyText.d.cts +1 -0
  383. package/dist/types/model/keyText.d.cts.map +1 -1
  384. package/dist/types/model/keyText.d.ts +1 -0
  385. package/dist/types/model/keyText.d.ts.map +1 -1
  386. package/dist/types/model/link.cjs +2 -1
  387. package/dist/types/model/link.cjs.map +1 -1
  388. package/dist/types/model/link.d.cts +1 -0
  389. package/dist/types/model/link.d.cts.map +1 -1
  390. package/dist/types/model/link.d.ts +1 -0
  391. package/dist/types/model/link.d.ts.map +1 -1
  392. package/dist/types/model/link.js +1 -1
  393. package/dist/types/model/linkToMedia.d.cts +1 -0
  394. package/dist/types/model/linkToMedia.d.cts.map +1 -1
  395. package/dist/types/model/linkToMedia.d.ts +1 -0
  396. package/dist/types/model/linkToMedia.d.ts.map +1 -1
  397. package/dist/types/model/number.d.cts +1 -0
  398. package/dist/types/model/number.d.cts.map +1 -1
  399. package/dist/types/model/number.d.ts +1 -0
  400. package/dist/types/model/number.d.ts.map +1 -1
  401. package/dist/types/model/range.d.cts +1 -0
  402. package/dist/types/model/range.d.cts.map +1 -1
  403. package/dist/types/model/range.d.ts +1 -0
  404. package/dist/types/model/range.d.ts.map +1 -1
  405. package/dist/types/model/richText.d.cts +1 -0
  406. package/dist/types/model/richText.d.cts.map +1 -1
  407. package/dist/types/model/richText.d.ts +1 -0
  408. package/dist/types/model/richText.d.ts.map +1 -1
  409. package/dist/types/model/select.d.cts +1 -0
  410. package/dist/types/model/select.d.cts.map +1 -1
  411. package/dist/types/model/select.d.ts +1 -0
  412. package/dist/types/model/select.d.ts.map +1 -1
  413. package/dist/types/model/separator.d.cts +1 -0
  414. package/dist/types/model/separator.d.cts.map +1 -1
  415. package/dist/types/model/separator.d.ts +1 -0
  416. package/dist/types/model/separator.d.ts.map +1 -1
  417. package/dist/types/model/sharedSlice.d.cts +1 -0
  418. package/dist/types/model/sharedSlice.d.cts.map +1 -1
  419. package/dist/types/model/sharedSlice.d.ts +1 -0
  420. package/dist/types/model/sharedSlice.d.ts.map +1 -1
  421. package/dist/types/model/sharedSliceVariation.d.cts +1 -0
  422. package/dist/types/model/sharedSliceVariation.d.cts.map +1 -1
  423. package/dist/types/model/sharedSliceVariation.d.ts +1 -0
  424. package/dist/types/model/sharedSliceVariation.d.ts.map +1 -1
  425. package/dist/types/model/slice.cjs +2 -1
  426. package/dist/types/model/slice.cjs.map +1 -1
  427. package/dist/types/model/slice.d.cts +1 -0
  428. package/dist/types/model/slice.d.cts.map +1 -1
  429. package/dist/types/model/slice.d.ts +1 -0
  430. package/dist/types/model/slice.d.ts.map +1 -1
  431. package/dist/types/model/slice.js +1 -1
  432. package/dist/types/model/sliceZone.cjs +2 -1
  433. package/dist/types/model/sliceZone.cjs.map +1 -1
  434. package/dist/types/model/sliceZone.d.cts +1 -0
  435. package/dist/types/model/sliceZone.d.cts.map +1 -1
  436. package/dist/types/model/sliceZone.d.ts +1 -0
  437. package/dist/types/model/sliceZone.d.ts.map +1 -1
  438. package/dist/types/model/sliceZone.js +1 -1
  439. package/dist/types/model/table.d.cts +1 -0
  440. package/dist/types/model/table.d.cts.map +1 -1
  441. package/dist/types/model/table.d.ts +1 -0
  442. package/dist/types/model/table.d.ts.map +1 -1
  443. package/dist/types/model/timestamp.d.cts +1 -0
  444. package/dist/types/model/timestamp.d.cts.map +1 -1
  445. package/dist/types/model/timestamp.d.ts +1 -0
  446. package/dist/types/model/timestamp.d.ts.map +1 -1
  447. package/dist/types/model/title.d.cts +1 -0
  448. package/dist/types/model/title.d.cts.map +1 -1
  449. package/dist/types/model/title.d.ts +1 -0
  450. package/dist/types/model/title.d.ts.map +1 -1
  451. package/dist/types/model/types.cjs +2 -1
  452. package/dist/types/model/types.cjs.map +1 -1
  453. package/dist/types/model/types.d.cts +1 -0
  454. package/dist/types/model/types.d.cts.map +1 -1
  455. package/dist/types/model/types.d.ts +1 -0
  456. package/dist/types/model/types.d.ts.map +1 -1
  457. package/dist/types/model/types.js +1 -1
  458. package/dist/types/model/uid.d.cts +1 -0
  459. package/dist/types/model/uid.d.cts.map +1 -1
  460. package/dist/types/model/uid.d.ts +1 -0
  461. package/dist/types/model/uid.d.ts.map +1 -1
  462. package/dist/types/value/boolean.d.cts.map +1 -1
  463. package/dist/types/value/boolean.d.ts.map +1 -1
  464. package/dist/types/value/color.d.cts +1 -0
  465. package/dist/types/value/color.d.cts.map +1 -1
  466. package/dist/types/value/color.d.ts +1 -0
  467. package/dist/types/value/color.d.ts.map +1 -1
  468. package/dist/types/value/contentRelationship.d.cts +1 -0
  469. package/dist/types/value/contentRelationship.d.cts.map +1 -1
  470. package/dist/types/value/contentRelationship.d.ts +1 -0
  471. package/dist/types/value/contentRelationship.d.ts.map +1 -1
  472. package/dist/types/value/date.d.cts +1 -0
  473. package/dist/types/value/date.d.cts.map +1 -1
  474. package/dist/types/value/date.d.ts +1 -0
  475. package/dist/types/value/date.d.ts.map +1 -1
  476. package/dist/types/value/document.d.cts +1 -0
  477. package/dist/types/value/document.d.cts.map +1 -1
  478. package/dist/types/value/document.d.ts +1 -0
  479. package/dist/types/value/document.d.ts.map +1 -1
  480. package/dist/types/value/embed.cjs +2 -1
  481. package/dist/types/value/embed.cjs.map +1 -1
  482. package/dist/types/value/embed.d.cts +1 -0
  483. package/dist/types/value/embed.d.cts.map +1 -1
  484. package/dist/types/value/embed.d.ts +1 -0
  485. package/dist/types/value/embed.d.ts.map +1 -1
  486. package/dist/types/value/embed.js +1 -1
  487. package/dist/types/value/geoPoint.d.cts +1 -0
  488. package/dist/types/value/geoPoint.d.cts.map +1 -1
  489. package/dist/types/value/geoPoint.d.ts +1 -0
  490. package/dist/types/value/geoPoint.d.ts.map +1 -1
  491. package/dist/types/value/group.d.cts +1 -0
  492. package/dist/types/value/group.d.cts.map +1 -1
  493. package/dist/types/value/group.d.ts +1 -0
  494. package/dist/types/value/group.d.ts.map +1 -1
  495. package/dist/types/value/image.d.cts +1 -0
  496. package/dist/types/value/image.d.cts.map +1 -1
  497. package/dist/types/value/image.d.ts +1 -0
  498. package/dist/types/value/image.d.ts.map +1 -1
  499. package/dist/types/value/integration.d.cts +1 -0
  500. package/dist/types/value/integration.d.cts.map +1 -1
  501. package/dist/types/value/integration.d.ts +1 -0
  502. package/dist/types/value/integration.d.ts.map +1 -1
  503. package/dist/types/value/keyText.d.cts +1 -0
  504. package/dist/types/value/keyText.d.cts.map +1 -1
  505. package/dist/types/value/keyText.d.ts +1 -0
  506. package/dist/types/value/keyText.d.ts.map +1 -1
  507. package/dist/types/value/link.cjs +2 -1
  508. package/dist/types/value/link.cjs.map +1 -1
  509. package/dist/types/value/link.d.cts +1 -0
  510. package/dist/types/value/link.d.cts.map +1 -1
  511. package/dist/types/value/link.d.ts +1 -0
  512. package/dist/types/value/link.d.ts.map +1 -1
  513. package/dist/types/value/link.js +1 -1
  514. package/dist/types/value/linkToMedia.d.cts +1 -0
  515. package/dist/types/value/linkToMedia.d.cts.map +1 -1
  516. package/dist/types/value/linkToMedia.d.ts +1 -0
  517. package/dist/types/value/linkToMedia.d.ts.map +1 -1
  518. package/dist/types/value/number.d.cts +1 -0
  519. package/dist/types/value/number.d.cts.map +1 -1
  520. package/dist/types/value/number.d.ts +1 -0
  521. package/dist/types/value/number.d.ts.map +1 -1
  522. package/dist/types/value/richText.cjs +2 -1
  523. package/dist/types/value/richText.cjs.map +1 -1
  524. package/dist/types/value/richText.d.cts +1 -0
  525. package/dist/types/value/richText.d.cts.map +1 -1
  526. package/dist/types/value/richText.d.ts +1 -0
  527. package/dist/types/value/richText.d.ts.map +1 -1
  528. package/dist/types/value/richText.js +1 -1
  529. package/dist/types/value/select.d.cts +1 -0
  530. package/dist/types/value/select.d.cts.map +1 -1
  531. package/dist/types/value/select.d.ts +1 -0
  532. package/dist/types/value/select.d.ts.map +1 -1
  533. package/dist/types/value/sharedSlice.d.cts +1 -0
  534. package/dist/types/value/sharedSlice.d.cts.map +1 -1
  535. package/dist/types/value/sharedSlice.d.ts +1 -0
  536. package/dist/types/value/sharedSlice.d.ts.map +1 -1
  537. package/dist/types/value/sharedSliceVariation.d.cts +1 -0
  538. package/dist/types/value/sharedSliceVariation.d.cts.map +1 -1
  539. package/dist/types/value/sharedSliceVariation.d.ts +1 -0
  540. package/dist/types/value/sharedSliceVariation.d.ts.map +1 -1
  541. package/dist/types/value/slice.d.cts +1 -0
  542. package/dist/types/value/slice.d.cts.map +1 -1
  543. package/dist/types/value/slice.d.ts +1 -0
  544. package/dist/types/value/slice.d.ts.map +1 -1
  545. package/dist/types/value/sliceZone.d.cts +1 -0
  546. package/dist/types/value/sliceZone.d.cts.map +1 -1
  547. package/dist/types/value/sliceZone.d.ts +1 -0
  548. package/dist/types/value/sliceZone.d.ts.map +1 -1
  549. package/dist/types/value/table.d.cts +1 -0
  550. package/dist/types/value/table.d.cts.map +1 -1
  551. package/dist/types/value/table.d.ts +1 -0
  552. package/dist/types/value/table.d.ts.map +1 -1
  553. package/dist/types/value/timestamp.d.cts +1 -0
  554. package/dist/types/value/timestamp.d.cts.map +1 -1
  555. package/dist/types/value/timestamp.d.ts +1 -0
  556. package/dist/types/value/timestamp.d.ts.map +1 -1
  557. package/dist/types/value/title.d.cts +1 -0
  558. package/dist/types/value/title.d.cts.map +1 -1
  559. package/dist/types/value/title.d.ts +1 -0
  560. package/dist/types/value/title.d.ts.map +1 -1
  561. package/dist/types/value/types.d.cts +1 -0
  562. package/dist/types/value/types.d.cts.map +1 -1
  563. package/dist/types/value/types.d.ts +1 -0
  564. package/dist/types/value/types.d.ts.map +1 -1
  565. package/dist/types/webhook/apiUpdate.d.cts +1 -0
  566. package/dist/types/webhook/apiUpdate.d.cts.map +1 -1
  567. package/dist/types/webhook/apiUpdate.d.ts +1 -0
  568. package/dist/types/webhook/apiUpdate.d.ts.map +1 -1
  569. package/dist/types/webhook/testTrigger.d.cts +1 -0
  570. package/dist/types/webhook/testTrigger.d.cts.map +1 -1
  571. package/dist/types/webhook/testTrigger.d.ts +1 -0
  572. package/dist/types/webhook/testTrigger.d.ts.map +1 -1
  573. package/dist/types/webhook/types.cjs +2 -1
  574. package/dist/types/webhook/types.cjs.map +1 -1
  575. package/dist/types/webhook/types.d.cts.map +1 -1
  576. package/dist/types/webhook/types.d.ts.map +1 -1
  577. package/dist/types/webhook/types.js +1 -1
  578. package/package.json +12 -12
  579. package/src/helpers/asImageWidthSrcSet.ts +0 -1
  580. package/dist/_virtual/_rolldown/runtime.cjs +0 -13
@@ -1 +1 @@
1
- {"version":3,"file":"documentToLinkField.cjs","names":["LinkType"],"sources":["../../src/helpers/documentToLinkField.ts"],"sourcesContent":["import type { FilledContentRelationshipField } from \"../types/value/contentRelationship\"\nimport type { PrismicDocument } from \"../types/value/document\"\nimport { LinkType } from \"../types/value/link\"\n\ntype SetOptional<T, Keys extends keyof T> = Omit<T, Keys> &\n\tPartial<Pick<T, Keys>>\n\n/**\n * Converts a document into a link field, this is useful when crawling the API\n * for document links\n *\n * @typeParam TDocument - Specific interface of the provided document\n *\n * @param prismicDocument - A document coming from Prismic\n *\n * @returns The equivalent link field to use with `asLink()`\n *\n * @internal\n */\nexport const documentToLinkField = <\n\tTDocument extends SetOptional<PrismicDocument, \"slugs\">,\n>(\n\tprismicDocument: TDocument,\n): FilledContentRelationshipField<\n\tTDocument[\"type\"],\n\tTDocument[\"lang\"],\n\tTDocument[\"data\"]\n> => {\n\treturn {\n\t\tlink_type: LinkType.Document,\n\t\tid: prismicDocument.id,\n\t\tuid: prismicDocument.uid || undefined,\n\t\ttype: prismicDocument.type,\n\t\ttags: prismicDocument.tags,\n\t\tlang: prismicDocument.lang,\n\t\turl: prismicDocument.url == null ? undefined : prismicDocument.url,\n\t\tslug: prismicDocument.slugs?.[0], // Slug field is not available with GraphQL\n\t\t// The REST API does not include a `data` property if the data\n\t\t// object is empty.\n\t\t//\n\t\t// A presence check for `prismicDocument.data` is done to\n\t\t// support partial documents. While `documentToLinkField` is\n\t\t// not typed to accept partial documents, passing a partial\n\t\t// document can happen in untyped projects.\n\t\t...(prismicDocument.data && Object.keys(prismicDocument.data).length > 0\n\t\t\t? { data: prismicDocument.data }\n\t\t\t: {}),\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAa,uBAGZ,oBAKI;;AACJ,QAAO;EACN,WAAWA,aAAAA,SAAS;EACpB,IAAI,gBAAgB;EACpB,KAAK,gBAAgB,OAAO,KAAA;EAC5B,MAAM,gBAAgB;EACtB,MAAM,gBAAgB;EACtB,MAAM,gBAAgB;EACtB,KAAK,gBAAgB,OAAO,OAAO,KAAA,IAAY,gBAAgB;EAC/D,OAAA,wBAAM,gBAAgB,WAAA,QAAA,0BAAA,KAAA,IAAA,KAAA,IAAA,sBAAQ;EAQ9B,GAAI,gBAAgB,QAAQ,OAAO,KAAK,gBAAgB,KAAK,CAAC,SAAS,IACpE,EAAE,MAAM,gBAAgB,MAAM,GAC9B,EAAE;EACL"}
1
+ {"version":3,"file":"documentToLinkField.cjs","names":["LinkType"],"sources":["../../src/helpers/documentToLinkField.ts"],"sourcesContent":["import type { FilledContentRelationshipField } from \"../types/value/contentRelationship\"\nimport type { PrismicDocument } from \"../types/value/document\"\nimport { LinkType } from \"../types/value/link\"\n\ntype SetOptional<T, Keys extends keyof T> = Omit<T, Keys> &\n\tPartial<Pick<T, Keys>>\n\n/**\n * Converts a document into a link field, this is useful when crawling the API\n * for document links\n *\n * @typeParam TDocument - Specific interface of the provided document\n *\n * @param prismicDocument - A document coming from Prismic\n *\n * @returns The equivalent link field to use with `asLink()`\n *\n * @internal\n */\nexport const documentToLinkField = <\n\tTDocument extends SetOptional<PrismicDocument, \"slugs\">,\n>(\n\tprismicDocument: TDocument,\n): FilledContentRelationshipField<\n\tTDocument[\"type\"],\n\tTDocument[\"lang\"],\n\tTDocument[\"data\"]\n> => {\n\treturn {\n\t\tlink_type: LinkType.Document,\n\t\tid: prismicDocument.id,\n\t\tuid: prismicDocument.uid || undefined,\n\t\ttype: prismicDocument.type,\n\t\ttags: prismicDocument.tags,\n\t\tlang: prismicDocument.lang,\n\t\turl: prismicDocument.url == null ? undefined : prismicDocument.url,\n\t\tslug: prismicDocument.slugs?.[0], // Slug field is not available with GraphQL\n\t\t// The REST API does not include a `data` property if the data\n\t\t// object is empty.\n\t\t//\n\t\t// A presence check for `prismicDocument.data` is done to\n\t\t// support partial documents. While `documentToLinkField` is\n\t\t// not typed to accept partial documents, passing a partial\n\t\t// document can happen in untyped projects.\n\t\t...(prismicDocument.data && Object.keys(prismicDocument.data).length > 0\n\t\t\t? { data: prismicDocument.data }\n\t\t\t: {}),\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAa,uBAGZ,oBAKI;;AACJ,QAAO;EACN,WAAWA,sBAAS;EACpB,IAAI,gBAAgB;EACpB,KAAK,gBAAgB,OAAO;EAC5B,MAAM,gBAAgB;EACtB,MAAM,gBAAgB;EACtB,MAAM,gBAAgB;EACtB,KAAK,gBAAgB,OAAO,OAAO,SAAY,gBAAgB;EAC/D,+BAAM,gBAAgB,qFAAQ;EAQ9B,GAAI,gBAAgB,QAAQ,OAAO,KAAK,gBAAgB,KAAK,CAAC,SAAS,IACpE,EAAE,MAAM,gBAAgB,MAAM,GAC9B,EAAE;EACL"}
@@ -1 +1 @@
1
- {"version":3,"file":"documentToLinkField.d.cts","names":[],"sources":["../../src/helpers/documentToLinkField.ts"],"mappings":";;;;KAIK,WAAA,uBAAkC,CAAA,IAAK,IAAA,CAAK,CAAA,EAAG,IAAA,IACnD,OAAA,CAAQ,IAAA,CAAK,CAAA,EAAG,IAAA;;AAJ6C;;;;;;;;;;;cAkBjD,mBAAA,qBACM,WAAA,CAAY,eAAA,YAE9B,eAAA,EAAiB,SAAA,KACf,8BAAA,CACF,SAAA,UACA,SAAA,UACA,SAAA"}
1
+ {"version":3,"file":"documentToLinkField.d.cts","names":[],"sources":["../../src/helpers/documentToLinkField.ts"],"sourcesContent":[],"mappings":";;;;KAIK,kCAAkC,KAAK,KAAK,GAAG,QACnD,QAAQ,KAAK,GAAG;;AAJ6C;;;;;;;;;;AAkB9D;AAC+B,cADlB,mBACkB,EAAA,CAAA,kBAAZ,WAAY,CAAA,eAAA,EAAA,OAAA,CAAA,CAAA,CAAA,eAAA,EAEb,SAFa,EAAA,GAG5B,8BAH4B,CAI9B,SAJ8B,CAAA,MAAA,CAAA,EAK9B,SAL8B,CAAA,MAAA,CAAA,EAM9B,SAN8B,CAAA,MAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"documentToLinkField.d.ts","names":[],"sources":["../../src/helpers/documentToLinkField.ts"],"mappings":";;;;KAIK,WAAA,uBAAkC,CAAA,IAAK,IAAA,CAAK,CAAA,EAAG,IAAA,IACnD,OAAA,CAAQ,IAAA,CAAK,CAAA,EAAG,IAAA;;AAJ6C;;;;;;;;;;;cAkBjD,mBAAA,qBACM,WAAA,CAAY,eAAA,YAE9B,eAAA,EAAiB,SAAA,KACf,8BAAA,CACF,SAAA,UACA,SAAA,UACA,SAAA"}
1
+ {"version":3,"file":"documentToLinkField.d.ts","names":[],"sources":["../../src/helpers/documentToLinkField.ts"],"sourcesContent":[],"mappings":";;;;KAIK,kCAAkC,KAAK,KAAK,GAAG,QACnD,QAAQ,KAAK,GAAG;;AAJ6C;;;;;;;;;;AAkB9D;AAC+B,cADlB,mBACkB,EAAA,CAAA,kBAAZ,WAAY,CAAA,eAAA,EAAA,OAAA,CAAA,CAAA,CAAA,eAAA,EAEb,SAFa,EAAA,GAG5B,8BAH4B,CAI9B,SAJ8B,CAAA,MAAA,CAAA,EAK9B,SAL8B,CAAA,MAAA,CAAA,EAM9B,SAN8B,CAAA,MAAA,CAAA,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { LinkType } from "../types/value/link.js";
2
+
2
3
  //#region src/helpers/documentToLinkField.ts
3
4
  /**
4
5
  * Converts a document into a link field, this is useful when crawling the API
@@ -26,7 +27,7 @@ const documentToLinkField = (prismicDocument) => {
26
27
  ...prismicDocument.data && Object.keys(prismicDocument.data).length > 0 ? { data: prismicDocument.data } : {}
27
28
  };
28
29
  };
30
+
29
31
  //#endregion
30
32
  export { documentToLinkField };
31
-
32
33
  //# sourceMappingURL=documentToLinkField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"documentToLinkField.js","names":[],"sources":["../../src/helpers/documentToLinkField.ts"],"sourcesContent":["import type { FilledContentRelationshipField } from \"../types/value/contentRelationship\"\nimport type { PrismicDocument } from \"../types/value/document\"\nimport { LinkType } from \"../types/value/link\"\n\ntype SetOptional<T, Keys extends keyof T> = Omit<T, Keys> &\n\tPartial<Pick<T, Keys>>\n\n/**\n * Converts a document into a link field, this is useful when crawling the API\n * for document links\n *\n * @typeParam TDocument - Specific interface of the provided document\n *\n * @param prismicDocument - A document coming from Prismic\n *\n * @returns The equivalent link field to use with `asLink()`\n *\n * @internal\n */\nexport const documentToLinkField = <\n\tTDocument extends SetOptional<PrismicDocument, \"slugs\">,\n>(\n\tprismicDocument: TDocument,\n): FilledContentRelationshipField<\n\tTDocument[\"type\"],\n\tTDocument[\"lang\"],\n\tTDocument[\"data\"]\n> => {\n\treturn {\n\t\tlink_type: LinkType.Document,\n\t\tid: prismicDocument.id,\n\t\tuid: prismicDocument.uid || undefined,\n\t\ttype: prismicDocument.type,\n\t\ttags: prismicDocument.tags,\n\t\tlang: prismicDocument.lang,\n\t\turl: prismicDocument.url == null ? undefined : prismicDocument.url,\n\t\tslug: prismicDocument.slugs?.[0], // Slug field is not available with GraphQL\n\t\t// The REST API does not include a `data` property if the data\n\t\t// object is empty.\n\t\t//\n\t\t// A presence check for `prismicDocument.data` is done to\n\t\t// support partial documents. While `documentToLinkField` is\n\t\t// not typed to accept partial documents, passing a partial\n\t\t// document can happen in untyped projects.\n\t\t...(prismicDocument.data && Object.keys(prismicDocument.data).length > 0\n\t\t\t? { data: prismicDocument.data }\n\t\t\t: {}),\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAa,uBAGZ,oBAKI;;AACJ,QAAO;EACN,WAAW,SAAS;EACpB,IAAI,gBAAgB;EACpB,KAAK,gBAAgB,OAAO,KAAA;EAC5B,MAAM,gBAAgB;EACtB,MAAM,gBAAgB;EACtB,MAAM,gBAAgB;EACtB,KAAK,gBAAgB,OAAO,OAAO,KAAA,IAAY,gBAAgB;EAC/D,OAAA,wBAAM,gBAAgB,WAAA,QAAA,0BAAA,KAAA,IAAA,KAAA,IAAA,sBAAQ;EAQ9B,GAAI,gBAAgB,QAAQ,OAAO,KAAK,gBAAgB,KAAK,CAAC,SAAS,IACpE,EAAE,MAAM,gBAAgB,MAAM,GAC9B,EAAE;EACL"}
1
+ {"version":3,"file":"documentToLinkField.js","names":[],"sources":["../../src/helpers/documentToLinkField.ts"],"sourcesContent":["import type { FilledContentRelationshipField } from \"../types/value/contentRelationship\"\nimport type { PrismicDocument } from \"../types/value/document\"\nimport { LinkType } from \"../types/value/link\"\n\ntype SetOptional<T, Keys extends keyof T> = Omit<T, Keys> &\n\tPartial<Pick<T, Keys>>\n\n/**\n * Converts a document into a link field, this is useful when crawling the API\n * for document links\n *\n * @typeParam TDocument - Specific interface of the provided document\n *\n * @param prismicDocument - A document coming from Prismic\n *\n * @returns The equivalent link field to use with `asLink()`\n *\n * @internal\n */\nexport const documentToLinkField = <\n\tTDocument extends SetOptional<PrismicDocument, \"slugs\">,\n>(\n\tprismicDocument: TDocument,\n): FilledContentRelationshipField<\n\tTDocument[\"type\"],\n\tTDocument[\"lang\"],\n\tTDocument[\"data\"]\n> => {\n\treturn {\n\t\tlink_type: LinkType.Document,\n\t\tid: prismicDocument.id,\n\t\tuid: prismicDocument.uid || undefined,\n\t\ttype: prismicDocument.type,\n\t\ttags: prismicDocument.tags,\n\t\tlang: prismicDocument.lang,\n\t\turl: prismicDocument.url == null ? undefined : prismicDocument.url,\n\t\tslug: prismicDocument.slugs?.[0], // Slug field is not available with GraphQL\n\t\t// The REST API does not include a `data` property if the data\n\t\t// object is empty.\n\t\t//\n\t\t// A presence check for `prismicDocument.data` is done to\n\t\t// support partial documents. While `documentToLinkField` is\n\t\t// not typed to accept partial documents, passing a partial\n\t\t// document can happen in untyped projects.\n\t\t...(prismicDocument.data && Object.keys(prismicDocument.data).length > 0\n\t\t\t? { data: prismicDocument.data }\n\t\t\t: {}),\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAa,uBAGZ,oBAKI;;AACJ,QAAO;EACN,WAAW,SAAS;EACpB,IAAI,gBAAgB;EACpB,KAAK,gBAAgB,OAAO;EAC5B,MAAM,gBAAgB;EACtB,MAAM,gBAAgB;EACtB,MAAM,gBAAgB;EACtB,KAAK,gBAAgB,OAAO,OAAO,SAAY,gBAAgB;EAC/D,+BAAM,gBAAgB,qFAAQ;EAQ9B,GAAI,gBAAgB,QAAQ,OAAO,KAAK,gBAAgB,KAAK,CAAC,SAAS,IACpE,EAAE,MAAM,gBAAgB,MAAM,GAC9B,EAAE;EACL"}
@@ -1,5 +1,7 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+
1
3
  //#region src/helpers/isFilled.ts
2
- var isFilled_exports = /* @__PURE__ */ require("../_virtual/_rolldown/runtime.cjs").__exportAll({
4
+ var isFilled_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
3
5
  color: () => color,
4
6
  contentRelationship: () => contentRelationship,
5
7
  date: () => date,
@@ -211,8 +213,8 @@ const integrationFields = integration;
211
213
  * @returns `true` if `repeatable` contains at least one item, `false`
212
214
  * otherwise.
213
215
  */
214
- const repeatable = (repeatable) => {
215
- return isNonNullish(repeatable) && isNonEmptyArray(repeatable);
216
+ const repeatable = (repeatable$1) => {
217
+ return isNonNullish(repeatable$1) && isNonEmptyArray(repeatable$1);
216
218
  };
217
219
  /**
218
220
  * Determines if a group has at least one item.
@@ -221,8 +223,8 @@ const repeatable = (repeatable) => {
221
223
  *
222
224
  * @returns `true` if the group contains at least one item, `false` otherwise.
223
225
  */
224
- const group = (group) => {
225
- return isNonNullish(group) && isNonEmptyArray(group);
226
+ const group = (group$1) => {
227
+ return isNonNullish(group$1) && isNonEmptyArray(group$1);
226
228
  };
227
229
  /**
228
230
  * Determines if a slice zone has at least one slice.
@@ -235,14 +237,14 @@ const group = (group) => {
235
237
  const sliceZone = (slices) => {
236
238
  return isNonNullish(slices) && isNonEmptyArray(slices);
237
239
  };
240
+
238
241
  //#endregion
239
242
  exports.imageThumbnail = imageThumbnail;
240
- Object.defineProperty(exports, "isFilled_exports", {
241
- enumerable: true,
242
- get: function() {
243
- return isFilled_exports;
244
- }
243
+ Object.defineProperty(exports, 'isFilled_exports', {
244
+ enumerable: true,
245
+ get: function () {
246
+ return isFilled_exports;
247
+ }
245
248
  });
246
249
  exports.link = link;
247
-
248
250
  //# sourceMappingURL=isFilled.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"isFilled.cjs","names":[],"sources":["../../src/helpers/isFilled.ts"],"sourcesContent":["import type { ColorField } from \"../types/value/color\"\nimport type {\n\tContentRelationshipField,\n\tEmptyContentRelationshipField,\n} from \"../types/value/contentRelationship\"\nimport type { DateField } from \"../types/value/date\"\nimport type { AnyOEmbed, EmbedField } from \"../types/value/embed\"\nimport type { GeoPointField } from \"../types/value/geoPoint\"\nimport type { GroupField, NestedGroupField } from \"../types/value/group\"\nimport type { ImageField, ImageFieldImage } from \"../types/value/image\"\nimport type {\n\tIntegrationField,\n\tIntegrationFieldData,\n} from \"../types/value/integration\"\nimport type { KeyTextField } from \"../types/value/keyText\"\nimport type { LinkField } from \"../types/value/link\"\nimport type { LinkToMediaField } from \"../types/value/linkToMedia\"\nimport type { NumberField } from \"../types/value/number\"\nimport type { RichTextField } from \"../types/value/richText\"\nimport type { SelectField } from \"../types/value/select\"\nimport type { SharedSlice } from \"../types/value/sharedSlice\"\nimport type { Slice } from \"../types/value/slice\"\nimport type { SliceZone } from \"../types/value/sliceZone\"\nimport type { TableField } from \"../types/value/table\"\nimport type { TimestampField } from \"../types/value/timestamp\"\nimport type { TitleField } from \"../types/value/title\"\nimport type { AnyRegularField, Repeatable } from \"../types/value/types\"\n\n/**\n * Determines if a value is not nullish (i.e. not `null` or `undefined`). This\n * is used to check if nullable field values are filled.\n *\n * @param input - The value to check.\n *\n * @returns `true` if `input` is not nullish, `false` otherwise.\n */\nconst isNonNullish = <T>(input: T): input is NonNullable<T> => {\n\treturn input != null\n}\n\n/**\n * Determines if an array is not empty. This is used to check if array-based\n * fields are filled.\n *\n * @param input - The array to check.\n *\n * @returns `true` if `input` has at least one element, `false` otherwise.\n */\nconst isNonEmptyArray = <T>(input: T[]): input is [T, ...T[]] => {\n\treturn !!input.length\n}\n\n/**\n * Determines if a rich text field is filled.\n *\n * @param field - rich text field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const richText = (\n\tfield: RichTextField | null | undefined,\n): field is RichTextField<\"filled\"> => {\n\tif (!isNonNullish(field)) {\n\t\treturn false\n\t} else if (field.length === 1 && \"text\" in field[0]) {\n\t\treturn !!field[0].text\n\t} else {\n\t\treturn !!field.length\n\t}\n}\n\n/**\n * Determines if a title field is filled.\n *\n * @param field - Title field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const title = richText as (\n\tfield: TitleField | null | undefined,\n) => field is TitleField<\"filled\">\n\n/**\n * Determines if an image thumbnail is filled.\n *\n * @param thumbnail - Image thumbnail to check.\n *\n * @returns `true` if the thumbnail is filled, `false` otherwise.\n */\nexport const imageThumbnail = (\n\tthumbnail: ImageFieldImage | null | undefined,\n): thumbnail is ImageFieldImage<\"filled\"> => {\n\treturn isNonNullish(thumbnail) && !!thumbnail.url\n}\n\n/**\n * Determines if an image field is filled.\n *\n * @param field - Image field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const image = imageThumbnail as <\n\tThumbnailNames extends string | null = never,\n>(\n\tfield: ImageField<ThumbnailNames> | null | undefined,\n) => field is ImageField<ThumbnailNames, \"filled\">\n\n/**\n * Determines if a link field is filled.\n *\n * @param field - Link field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const link = <\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends\n\t\t| Record<string, AnyRegularField | GroupField | SliceZone>\n\t\t| unknown = unknown,\n>(\n\tfield: LinkField<TypeEnum, LangEnum, DataInterface> | null | undefined,\n): field is LinkField<TypeEnum, LangEnum, DataInterface, \"filled\"> => {\n\treturn isNonNullish(field) && (\"id\" in field || \"url\" in field)\n}\n\n/**\n * Determines if a link to media field is filled.\n *\n * @param field - Link to media field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const linkToMedia = link as (\n\tfield: LinkToMediaField | null | undefined,\n) => field is LinkToMediaField<\"filled\">\n\n/**\n * Determines if a content relationship field is filled.\n *\n * @param field - Content relationship field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const contentRelationship = link as <\n\tField extends ContentRelationshipField,\n>(\n\tfield: Field | null | undefined,\n) => field is Exclude<Field, EmptyContentRelationshipField>\n\n/**\n * Determines if a date field is filled.\n *\n * @param field - Date field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const date = isNonNullish as (\n\tfield: DateField | null | undefined,\n) => field is DateField<\"filled\">\n\n/**\n * Determines if a timestamp field is filled.\n *\n * @param field - Timestamp field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const timestamp = isNonNullish as (\n\tfield: TimestampField | null | undefined,\n) => field is TimestampField<\"filled\">\n\n/**\n * Determines if a color field is filled.\n *\n * @param field - Color field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const color = isNonNullish as (\n\tfield: ColorField | null | undefined,\n) => field is ColorField<\"filled\">\n\n/**\n * Determines if a number field is filled.\n *\n * @param field - Number field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const number = isNonNullish as (\n\tfield: NumberField | null | undefined,\n) => field is NumberField<\"filled\">\n\n/**\n * Determines if a key text field is filled.\n *\n * @param field - Key text field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const keyText = (\n\tfield: KeyTextField | null | undefined,\n): field is KeyTextField<\"filled\"> => {\n\treturn !!field\n}\n\n/**\n * Determines if a select field is filled.\n *\n * @param field - Select field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const select = isNonNullish as <Enum extends string>(\n\tfield: SelectField<Enum> | null | undefined,\n) => field is SelectField<Enum, \"filled\">\n\n/**\n * Determines if an embed field is filled.\n *\n * @param field - Embed field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const embed = <Field extends EmbedField<AnyOEmbed>>(\n\tfield: Field | null | undefined,\n): field is Extract<Field, EmbedField<AnyOEmbed, \"filled\">> => {\n\treturn isNonNullish(field) && !!field.embed_url\n}\n\n/**\n * Determines if a geopoint field is filled.\n *\n * @param field - Geopoint field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const geoPoint = (\n\tfield: GeoPointField | null | undefined,\n): field is GeoPointField<\"filled\"> => {\n\treturn isNonNullish(field) && \"longitude\" in field\n}\n\n/**\n * Determines if a table field is filled.\n *\n * @param field - Table field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const table = isNonNullish as (\n\tfield: TableField | null | undefined,\n) => field is TableField<\"filled\">\n\n/**\n * Determines if an integration field is filled.\n *\n * @param field - Integration field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const integration = isNonNullish as <Data extends IntegrationFieldData>(\n\tfield: IntegrationField<Data> | null | undefined,\n) => field is IntegrationField<Data, \"filled\">\n/**\n * @deprecated Renamed to `integration`.\n */\n// TODO: Remove when we remove support for deprecated `integrationField` export.\nexport const integrationField = integration\n/**\n * @deprecated Renamed to `integrationField`.\n */\n// TODO: Remove when we remove support for deprecated `integrationFields` export.\nexport const integrationFields = integration\n\n/**\n * Determines if a repeatable field has at least one item.\n *\n * @param repeatable - Repeatable to check.\n *\n * @returns `true` if `repeatable` contains at least one item, `false`\n * otherwise.\n */\nexport const repeatable = <T extends LinkField>(\n\trepeatable: Repeatable<T> | null | undefined,\n): repeatable is Repeatable<T, \"filled\"> => {\n\treturn isNonNullish(repeatable) && isNonEmptyArray(repeatable)\n}\n\n/**\n * Determines if a group has at least one item.\n *\n * @param group - Group to check.\n *\n * @returns `true` if the group contains at least one item, `false` otherwise.\n */\nexport const group = <\n\tFields extends Record<string, AnyRegularField | NestedGroupField>,\n>(\n\tgroup: GroupField<Fields> | null | undefined,\n): group is GroupField<Fields, \"filled\"> => {\n\treturn isNonNullish(group) && isNonEmptyArray(group)\n}\n\n/**\n * Determines if a slice zone has at least one slice.\n *\n * @param slices - Slice zone to check.\n *\n * @returns `true` if the slice zone contains at least one slice, `false`\n * otherwise.\n */\nexport const sliceZone = <Slices extends Slice | SharedSlice>(\n\tslices: SliceZone<Slices> | null | undefined,\n): slices is SliceZone<Slices, \"filled\"> => {\n\treturn isNonNullish(slices) && isNonEmptyArray(slices)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,gBAAmB,UAAsC;AAC9D,QAAO,SAAS;;;;;;;;;;AAWjB,MAAM,mBAAsB,UAAqC;AAChE,QAAO,CAAC,CAAC,MAAM;;;;;;;;;AAUhB,MAAa,YACZ,UACsC;AACtC,KAAI,CAAC,aAAa,MAAM,CACvB,QAAO;UACG,MAAM,WAAW,KAAK,UAAU,MAAM,GAChD,QAAO,CAAC,CAAC,MAAM,GAAG;KAElB,QAAO,CAAC,CAAC,MAAM;;;;;;;;;AAWjB,MAAa,QAAQ;;;;;;;;AAWrB,MAAa,kBACZ,cAC4C;AAC5C,QAAO,aAAa,UAAU,IAAI,CAAC,CAAC,UAAU;;;;;;;;;AAU/C,MAAa,QAAQ;;;;;;;;AAarB,MAAa,QAOZ,UACqE;AACrE,QAAO,aAAa,MAAM,KAAK,QAAQ,SAAS,SAAS;;;;;;;;;AAU1D,MAAa,cAAc;;;;;;;;AAW3B,MAAa,sBAAsB;;;;;;;;AAanC,MAAa,OAAO;;;;;;;;AAWpB,MAAa,YAAY;;;;;;;;AAWzB,MAAa,QAAQ;;;;;;;;AAWrB,MAAa,SAAS;;;;;;;;AAWtB,MAAa,WACZ,UACqC;AACrC,QAAO,CAAC,CAAC;;;;;;;;;AAUV,MAAa,SAAS;;;;;;;;AAWtB,MAAa,SACZ,UAC8D;AAC9D,QAAO,aAAa,MAAM,IAAI,CAAC,CAAC,MAAM;;;;;;;;;AAUvC,MAAa,YACZ,UACsC;AACtC,QAAO,aAAa,MAAM,IAAI,eAAe;;;;;;;;;AAU9C,MAAa,QAAQ;;;;;;;;AAWrB,MAAa,cAAc;;;;AAO3B,MAAa,mBAAmB;;;;AAKhC,MAAa,oBAAoB;;;;;;;;;AAUjC,MAAa,cACZ,eAC2C;AAC3C,QAAO,aAAa,WAAW,IAAI,gBAAgB,WAAW;;;;;;;;;AAU/D,MAAa,SAGZ,UAC2C;AAC3C,QAAO,aAAa,MAAM,IAAI,gBAAgB,MAAM;;;;;;;;;;AAWrD,MAAa,aACZ,WAC2C;AAC3C,QAAO,aAAa,OAAO,IAAI,gBAAgB,OAAO"}
1
+ {"version":3,"file":"isFilled.cjs","names":["repeatable","group"],"sources":["../../src/helpers/isFilled.ts"],"sourcesContent":["import type { ColorField } from \"../types/value/color\"\nimport type {\n\tContentRelationshipField,\n\tEmptyContentRelationshipField,\n} from \"../types/value/contentRelationship\"\nimport type { DateField } from \"../types/value/date\"\nimport type { AnyOEmbed, EmbedField } from \"../types/value/embed\"\nimport type { GeoPointField } from \"../types/value/geoPoint\"\nimport type { GroupField, NestedGroupField } from \"../types/value/group\"\nimport type { ImageField, ImageFieldImage } from \"../types/value/image\"\nimport type {\n\tIntegrationField,\n\tIntegrationFieldData,\n} from \"../types/value/integration\"\nimport type { KeyTextField } from \"../types/value/keyText\"\nimport type { LinkField } from \"../types/value/link\"\nimport type { LinkToMediaField } from \"../types/value/linkToMedia\"\nimport type { NumberField } from \"../types/value/number\"\nimport type { RichTextField } from \"../types/value/richText\"\nimport type { SelectField } from \"../types/value/select\"\nimport type { SharedSlice } from \"../types/value/sharedSlice\"\nimport type { Slice } from \"../types/value/slice\"\nimport type { SliceZone } from \"../types/value/sliceZone\"\nimport type { TableField } from \"../types/value/table\"\nimport type { TimestampField } from \"../types/value/timestamp\"\nimport type { TitleField } from \"../types/value/title\"\nimport type { AnyRegularField, Repeatable } from \"../types/value/types\"\n\n/**\n * Determines if a value is not nullish (i.e. not `null` or `undefined`). This\n * is used to check if nullable field values are filled.\n *\n * @param input - The value to check.\n *\n * @returns `true` if `input` is not nullish, `false` otherwise.\n */\nconst isNonNullish = <T>(input: T): input is NonNullable<T> => {\n\treturn input != null\n}\n\n/**\n * Determines if an array is not empty. This is used to check if array-based\n * fields are filled.\n *\n * @param input - The array to check.\n *\n * @returns `true` if `input` has at least one element, `false` otherwise.\n */\nconst isNonEmptyArray = <T>(input: T[]): input is [T, ...T[]] => {\n\treturn !!input.length\n}\n\n/**\n * Determines if a rich text field is filled.\n *\n * @param field - rich text field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const richText = (\n\tfield: RichTextField | null | undefined,\n): field is RichTextField<\"filled\"> => {\n\tif (!isNonNullish(field)) {\n\t\treturn false\n\t} else if (field.length === 1 && \"text\" in field[0]) {\n\t\treturn !!field[0].text\n\t} else {\n\t\treturn !!field.length\n\t}\n}\n\n/**\n * Determines if a title field is filled.\n *\n * @param field - Title field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const title = richText as (\n\tfield: TitleField | null | undefined,\n) => field is TitleField<\"filled\">\n\n/**\n * Determines if an image thumbnail is filled.\n *\n * @param thumbnail - Image thumbnail to check.\n *\n * @returns `true` if the thumbnail is filled, `false` otherwise.\n */\nexport const imageThumbnail = (\n\tthumbnail: ImageFieldImage | null | undefined,\n): thumbnail is ImageFieldImage<\"filled\"> => {\n\treturn isNonNullish(thumbnail) && !!thumbnail.url\n}\n\n/**\n * Determines if an image field is filled.\n *\n * @param field - Image field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const image = imageThumbnail as <\n\tThumbnailNames extends string | null = never,\n>(\n\tfield: ImageField<ThumbnailNames> | null | undefined,\n) => field is ImageField<ThumbnailNames, \"filled\">\n\n/**\n * Determines if a link field is filled.\n *\n * @param field - Link field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const link = <\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends\n\t\t| Record<string, AnyRegularField | GroupField | SliceZone>\n\t\t| unknown = unknown,\n>(\n\tfield: LinkField<TypeEnum, LangEnum, DataInterface> | null | undefined,\n): field is LinkField<TypeEnum, LangEnum, DataInterface, \"filled\"> => {\n\treturn isNonNullish(field) && (\"id\" in field || \"url\" in field)\n}\n\n/**\n * Determines if a link to media field is filled.\n *\n * @param field - Link to media field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const linkToMedia = link as (\n\tfield: LinkToMediaField | null | undefined,\n) => field is LinkToMediaField<\"filled\">\n\n/**\n * Determines if a content relationship field is filled.\n *\n * @param field - Content relationship field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const contentRelationship = link as <\n\tField extends ContentRelationshipField,\n>(\n\tfield: Field | null | undefined,\n) => field is Exclude<Field, EmptyContentRelationshipField>\n\n/**\n * Determines if a date field is filled.\n *\n * @param field - Date field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const date = isNonNullish as (\n\tfield: DateField | null | undefined,\n) => field is DateField<\"filled\">\n\n/**\n * Determines if a timestamp field is filled.\n *\n * @param field - Timestamp field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const timestamp = isNonNullish as (\n\tfield: TimestampField | null | undefined,\n) => field is TimestampField<\"filled\">\n\n/**\n * Determines if a color field is filled.\n *\n * @param field - Color field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const color = isNonNullish as (\n\tfield: ColorField | null | undefined,\n) => field is ColorField<\"filled\">\n\n/**\n * Determines if a number field is filled.\n *\n * @param field - Number field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const number = isNonNullish as (\n\tfield: NumberField | null | undefined,\n) => field is NumberField<\"filled\">\n\n/**\n * Determines if a key text field is filled.\n *\n * @param field - Key text field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const keyText = (\n\tfield: KeyTextField | null | undefined,\n): field is KeyTextField<\"filled\"> => {\n\treturn !!field\n}\n\n/**\n * Determines if a select field is filled.\n *\n * @param field - Select field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const select = isNonNullish as <Enum extends string>(\n\tfield: SelectField<Enum> | null | undefined,\n) => field is SelectField<Enum, \"filled\">\n\n/**\n * Determines if an embed field is filled.\n *\n * @param field - Embed field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const embed = <Field extends EmbedField<AnyOEmbed>>(\n\tfield: Field | null | undefined,\n): field is Extract<Field, EmbedField<AnyOEmbed, \"filled\">> => {\n\treturn isNonNullish(field) && !!field.embed_url\n}\n\n/**\n * Determines if a geopoint field is filled.\n *\n * @param field - Geopoint field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const geoPoint = (\n\tfield: GeoPointField | null | undefined,\n): field is GeoPointField<\"filled\"> => {\n\treturn isNonNullish(field) && \"longitude\" in field\n}\n\n/**\n * Determines if a table field is filled.\n *\n * @param field - Table field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const table = isNonNullish as (\n\tfield: TableField | null | undefined,\n) => field is TableField<\"filled\">\n\n/**\n * Determines if an integration field is filled.\n *\n * @param field - Integration field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const integration = isNonNullish as <Data extends IntegrationFieldData>(\n\tfield: IntegrationField<Data> | null | undefined,\n) => field is IntegrationField<Data, \"filled\">\n/**\n * @deprecated Renamed to `integration`.\n */\n// TODO: Remove when we remove support for deprecated `integrationField` export.\nexport const integrationField = integration\n/**\n * @deprecated Renamed to `integrationField`.\n */\n// TODO: Remove when we remove support for deprecated `integrationFields` export.\nexport const integrationFields = integration\n\n/**\n * Determines if a repeatable field has at least one item.\n *\n * @param repeatable - Repeatable to check.\n *\n * @returns `true` if `repeatable` contains at least one item, `false`\n * otherwise.\n */\nexport const repeatable = <T extends LinkField>(\n\trepeatable: Repeatable<T> | null | undefined,\n): repeatable is Repeatable<T, \"filled\"> => {\n\treturn isNonNullish(repeatable) && isNonEmptyArray(repeatable)\n}\n\n/**\n * Determines if a group has at least one item.\n *\n * @param group - Group to check.\n *\n * @returns `true` if the group contains at least one item, `false` otherwise.\n */\nexport const group = <\n\tFields extends Record<string, AnyRegularField | NestedGroupField>,\n>(\n\tgroup: GroupField<Fields> | null | undefined,\n): group is GroupField<Fields, \"filled\"> => {\n\treturn isNonNullish(group) && isNonEmptyArray(group)\n}\n\n/**\n * Determines if a slice zone has at least one slice.\n *\n * @param slices - Slice zone to check.\n *\n * @returns `true` if the slice zone contains at least one slice, `false`\n * otherwise.\n */\nexport const sliceZone = <Slices extends Slice | SharedSlice>(\n\tslices: SliceZone<Slices> | null | undefined,\n): slices is SliceZone<Slices, \"filled\"> => {\n\treturn isNonNullish(slices) && isNonEmptyArray(slices)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,gBAAmB,UAAsC;AAC9D,QAAO,SAAS;;;;;;;;;;AAWjB,MAAM,mBAAsB,UAAqC;AAChE,QAAO,CAAC,CAAC,MAAM;;;;;;;;;AAUhB,MAAa,YACZ,UACsC;AACtC,KAAI,CAAC,aAAa,MAAM,CACvB,QAAO;UACG,MAAM,WAAW,KAAK,UAAU,MAAM,GAChD,QAAO,CAAC,CAAC,MAAM,GAAG;KAElB,QAAO,CAAC,CAAC,MAAM;;;;;;;;;AAWjB,MAAa,QAAQ;;;;;;;;AAWrB,MAAa,kBACZ,cAC4C;AAC5C,QAAO,aAAa,UAAU,IAAI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}
@@ -1,6 +1,7 @@
1
- import { __exportAll } from "../_virtual/_rolldown/runtime.js";
1
+ import { __export } from "../_virtual/rolldown_runtime.js";
2
+
2
3
  //#region src/helpers/isFilled.ts
3
- var isFilled_exports = /* @__PURE__ */ __exportAll({
4
+ var isFilled_exports = /* @__PURE__ */ __export({
4
5
  color: () => color,
5
6
  contentRelationship: () => contentRelationship,
6
7
  date: () => date,
@@ -212,8 +213,8 @@ const integrationFields = integration;
212
213
  * @returns `true` if `repeatable` contains at least one item, `false`
213
214
  * otherwise.
214
215
  */
215
- const repeatable = (repeatable) => {
216
- return isNonNullish(repeatable) && isNonEmptyArray(repeatable);
216
+ const repeatable = (repeatable$1) => {
217
+ return isNonNullish(repeatable$1) && isNonEmptyArray(repeatable$1);
217
218
  };
218
219
  /**
219
220
  * Determines if a group has at least one item.
@@ -222,8 +223,8 @@ const repeatable = (repeatable) => {
222
223
  *
223
224
  * @returns `true` if the group contains at least one item, `false` otherwise.
224
225
  */
225
- const group = (group) => {
226
- return isNonNullish(group) && isNonEmptyArray(group);
226
+ const group = (group$1) => {
227
+ return isNonNullish(group$1) && isNonEmptyArray(group$1);
227
228
  };
228
229
  /**
229
230
  * Determines if a slice zone has at least one slice.
@@ -236,7 +237,7 @@ const group = (group) => {
236
237
  const sliceZone = (slices) => {
237
238
  return isNonNullish(slices) && isNonEmptyArray(slices);
238
239
  };
240
+
239
241
  //#endregion
240
242
  export { imageThumbnail, isFilled_exports, link };
241
-
242
243
  //# sourceMappingURL=isFilled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isFilled.js","names":[],"sources":["../../src/helpers/isFilled.ts"],"sourcesContent":["import type { ColorField } from \"../types/value/color\"\nimport type {\n\tContentRelationshipField,\n\tEmptyContentRelationshipField,\n} from \"../types/value/contentRelationship\"\nimport type { DateField } from \"../types/value/date\"\nimport type { AnyOEmbed, EmbedField } from \"../types/value/embed\"\nimport type { GeoPointField } from \"../types/value/geoPoint\"\nimport type { GroupField, NestedGroupField } from \"../types/value/group\"\nimport type { ImageField, ImageFieldImage } from \"../types/value/image\"\nimport type {\n\tIntegrationField,\n\tIntegrationFieldData,\n} from \"../types/value/integration\"\nimport type { KeyTextField } from \"../types/value/keyText\"\nimport type { LinkField } from \"../types/value/link\"\nimport type { LinkToMediaField } from \"../types/value/linkToMedia\"\nimport type { NumberField } from \"../types/value/number\"\nimport type { RichTextField } from \"../types/value/richText\"\nimport type { SelectField } from \"../types/value/select\"\nimport type { SharedSlice } from \"../types/value/sharedSlice\"\nimport type { Slice } from \"../types/value/slice\"\nimport type { SliceZone } from \"../types/value/sliceZone\"\nimport type { TableField } from \"../types/value/table\"\nimport type { TimestampField } from \"../types/value/timestamp\"\nimport type { TitleField } from \"../types/value/title\"\nimport type { AnyRegularField, Repeatable } from \"../types/value/types\"\n\n/**\n * Determines if a value is not nullish (i.e. not `null` or `undefined`). This\n * is used to check if nullable field values are filled.\n *\n * @param input - The value to check.\n *\n * @returns `true` if `input` is not nullish, `false` otherwise.\n */\nconst isNonNullish = <T>(input: T): input is NonNullable<T> => {\n\treturn input != null\n}\n\n/**\n * Determines if an array is not empty. This is used to check if array-based\n * fields are filled.\n *\n * @param input - The array to check.\n *\n * @returns `true` if `input` has at least one element, `false` otherwise.\n */\nconst isNonEmptyArray = <T>(input: T[]): input is [T, ...T[]] => {\n\treturn !!input.length\n}\n\n/**\n * Determines if a rich text field is filled.\n *\n * @param field - rich text field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const richText = (\n\tfield: RichTextField | null | undefined,\n): field is RichTextField<\"filled\"> => {\n\tif (!isNonNullish(field)) {\n\t\treturn false\n\t} else if (field.length === 1 && \"text\" in field[0]) {\n\t\treturn !!field[0].text\n\t} else {\n\t\treturn !!field.length\n\t}\n}\n\n/**\n * Determines if a title field is filled.\n *\n * @param field - Title field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const title = richText as (\n\tfield: TitleField | null | undefined,\n) => field is TitleField<\"filled\">\n\n/**\n * Determines if an image thumbnail is filled.\n *\n * @param thumbnail - Image thumbnail to check.\n *\n * @returns `true` if the thumbnail is filled, `false` otherwise.\n */\nexport const imageThumbnail = (\n\tthumbnail: ImageFieldImage | null | undefined,\n): thumbnail is ImageFieldImage<\"filled\"> => {\n\treturn isNonNullish(thumbnail) && !!thumbnail.url\n}\n\n/**\n * Determines if an image field is filled.\n *\n * @param field - Image field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const image = imageThumbnail as <\n\tThumbnailNames extends string | null = never,\n>(\n\tfield: ImageField<ThumbnailNames> | null | undefined,\n) => field is ImageField<ThumbnailNames, \"filled\">\n\n/**\n * Determines if a link field is filled.\n *\n * @param field - Link field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const link = <\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends\n\t\t| Record<string, AnyRegularField | GroupField | SliceZone>\n\t\t| unknown = unknown,\n>(\n\tfield: LinkField<TypeEnum, LangEnum, DataInterface> | null | undefined,\n): field is LinkField<TypeEnum, LangEnum, DataInterface, \"filled\"> => {\n\treturn isNonNullish(field) && (\"id\" in field || \"url\" in field)\n}\n\n/**\n * Determines if a link to media field is filled.\n *\n * @param field - Link to media field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const linkToMedia = link as (\n\tfield: LinkToMediaField | null | undefined,\n) => field is LinkToMediaField<\"filled\">\n\n/**\n * Determines if a content relationship field is filled.\n *\n * @param field - Content relationship field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const contentRelationship = link as <\n\tField extends ContentRelationshipField,\n>(\n\tfield: Field | null | undefined,\n) => field is Exclude<Field, EmptyContentRelationshipField>\n\n/**\n * Determines if a date field is filled.\n *\n * @param field - Date field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const date = isNonNullish as (\n\tfield: DateField | null | undefined,\n) => field is DateField<\"filled\">\n\n/**\n * Determines if a timestamp field is filled.\n *\n * @param field - Timestamp field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const timestamp = isNonNullish as (\n\tfield: TimestampField | null | undefined,\n) => field is TimestampField<\"filled\">\n\n/**\n * Determines if a color field is filled.\n *\n * @param field - Color field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const color = isNonNullish as (\n\tfield: ColorField | null | undefined,\n) => field is ColorField<\"filled\">\n\n/**\n * Determines if a number field is filled.\n *\n * @param field - Number field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const number = isNonNullish as (\n\tfield: NumberField | null | undefined,\n) => field is NumberField<\"filled\">\n\n/**\n * Determines if a key text field is filled.\n *\n * @param field - Key text field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const keyText = (\n\tfield: KeyTextField | null | undefined,\n): field is KeyTextField<\"filled\"> => {\n\treturn !!field\n}\n\n/**\n * Determines if a select field is filled.\n *\n * @param field - Select field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const select = isNonNullish as <Enum extends string>(\n\tfield: SelectField<Enum> | null | undefined,\n) => field is SelectField<Enum, \"filled\">\n\n/**\n * Determines if an embed field is filled.\n *\n * @param field - Embed field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const embed = <Field extends EmbedField<AnyOEmbed>>(\n\tfield: Field | null | undefined,\n): field is Extract<Field, EmbedField<AnyOEmbed, \"filled\">> => {\n\treturn isNonNullish(field) && !!field.embed_url\n}\n\n/**\n * Determines if a geopoint field is filled.\n *\n * @param field - Geopoint field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const geoPoint = (\n\tfield: GeoPointField | null | undefined,\n): field is GeoPointField<\"filled\"> => {\n\treturn isNonNullish(field) && \"longitude\" in field\n}\n\n/**\n * Determines if a table field is filled.\n *\n * @param field - Table field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const table = isNonNullish as (\n\tfield: TableField | null | undefined,\n) => field is TableField<\"filled\">\n\n/**\n * Determines if an integration field is filled.\n *\n * @param field - Integration field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const integration = isNonNullish as <Data extends IntegrationFieldData>(\n\tfield: IntegrationField<Data> | null | undefined,\n) => field is IntegrationField<Data, \"filled\">\n/**\n * @deprecated Renamed to `integration`.\n */\n// TODO: Remove when we remove support for deprecated `integrationField` export.\nexport const integrationField = integration\n/**\n * @deprecated Renamed to `integrationField`.\n */\n// TODO: Remove when we remove support for deprecated `integrationFields` export.\nexport const integrationFields = integration\n\n/**\n * Determines if a repeatable field has at least one item.\n *\n * @param repeatable - Repeatable to check.\n *\n * @returns `true` if `repeatable` contains at least one item, `false`\n * otherwise.\n */\nexport const repeatable = <T extends LinkField>(\n\trepeatable: Repeatable<T> | null | undefined,\n): repeatable is Repeatable<T, \"filled\"> => {\n\treturn isNonNullish(repeatable) && isNonEmptyArray(repeatable)\n}\n\n/**\n * Determines if a group has at least one item.\n *\n * @param group - Group to check.\n *\n * @returns `true` if the group contains at least one item, `false` otherwise.\n */\nexport const group = <\n\tFields extends Record<string, AnyRegularField | NestedGroupField>,\n>(\n\tgroup: GroupField<Fields> | null | undefined,\n): group is GroupField<Fields, \"filled\"> => {\n\treturn isNonNullish(group) && isNonEmptyArray(group)\n}\n\n/**\n * Determines if a slice zone has at least one slice.\n *\n * @param slices - Slice zone to check.\n *\n * @returns `true` if the slice zone contains at least one slice, `false`\n * otherwise.\n */\nexport const sliceZone = <Slices extends Slice | SharedSlice>(\n\tslices: SliceZone<Slices> | null | undefined,\n): slices is SliceZone<Slices, \"filled\"> => {\n\treturn isNonNullish(slices) && isNonEmptyArray(slices)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,gBAAmB,UAAsC;AAC9D,QAAO,SAAS;;;;;;;;;;AAWjB,MAAM,mBAAsB,UAAqC;AAChE,QAAO,CAAC,CAAC,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pers/isFilled.ts"],"sourcesContent":["import type { ColorField } from \"../types/value/color\"\nimport type {\n\tContentRelationshipField,\n\tEmptyContentRelationshipField,\n} from \"../types/value/contentRelationship\"\nimport type { DateField } from \"../types/value/date\"\nimport type { AnyOEmbed, EmbedField } from \"../types/value/embed\"\nimport type { GeoPointField } from \"../types/value/geoPoint\"\nimport type { GroupField, NestedGroupField } from \"../types/value/group\"\nimport type { ImageField, ImageFieldImage } from \"../types/value/image\"\nimport type {\n\tIntegrationField,\n\tIntegrationFieldData,\n} from \"../types/value/integration\"\nimport type { KeyTextField } from \"../types/value/keyText\"\nimport type { LinkField } from \"../types/value/link\"\nimport type { LinkToMediaField } from \"../types/value/linkToMedia\"\nimport type { NumberField } from \"../types/value/number\"\nimport type { RichTextField } from \"../types/value/richText\"\nimport type { SelectField } from \"../types/value/select\"\nimport type { SharedSlice } from \"../types/value/sharedSlice\"\nimport type { Slice } from \"../types/value/slice\"\nimport type { SliceZone } from \"../types/value/sliceZone\"\nimport type { TableField } from \"../types/value/table\"\nimport type { TimestampField } from \"../types/value/timestamp\"\nimport type { TitleField } from \"../types/value/title\"\nimport type { AnyRegularField, Repeatable } from \"../types/value/types\"\n\n/**\n * Determines if a value is not nullish (i.e. not `null` or `undefined`). This\n * is used to check if nullable field values are filled.\n *\n * @param input - The value to check.\n *\n * @returns `true` if `input` is not nullish, `false` otherwise.\n */\nconst isNonNullish = <T>(input: T): input is NonNullable<T> => {\n\treturn input != null\n}\n\n/**\n * Determines if an array is not empty. This is used to check if array-based\n * fields are filled.\n *\n * @param input - The array to check.\n *\n * @returns `true` if `input` has at least one element, `false` otherwise.\n */\nconst isNonEmptyArray = <T>(input: T[]): input is [T, ...T[]] => {\n\treturn !!input.length\n}\n\n/**\n * Determines if a rich text field is filled.\n *\n * @param field - rich text field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const richText = (\n\tfield: RichTextField | null | undefined,\n): field is RichTextField<\"filled\"> => {\n\tif (!isNonNullish(field)) {\n\t\treturn false\n\t} else if (field.length === 1 && \"text\" in field[0]) {\n\t\treturn !!field[0].text\n\t} else {\n\t\treturn !!field.length\n\t}\n}\n\n/**\n * Determines if a title field is filled.\n *\n * @param field - Title field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const title = richText as (\n\tfield: TitleField | null | undefined,\n) => field is TitleField<\"filled\">\n\n/**\n * Determines if an image thumbnail is filled.\n *\n * @param thumbnail - Image thumbnail to check.\n *\n * @returns `true` if the thumbnail is filled, `false` otherwise.\n */\nexport const imageThumbnail = (\n\tthumbnail: ImageFieldImage | null | undefined,\n): thumbnail is ImageFieldImage<\"filled\"> => {\n\treturn isNonNullish(thumbnail) && !!thumbnail.url\n}\n\n/**\n * Determines if an image field is filled.\n *\n * @param field - Image field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const image = imageThumbnail as <\n\tThumbnailNames extends string | null = never,\n>(\n\tfield: ImageField<ThumbnailNames> | null | undefined,\n) => field is ImageField<ThumbnailNames, \"filled\">\n\n/**\n * Determines if a link field is filled.\n *\n * @param field - Link field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const link = <\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends\n\t\t| Record<string, AnyRegularField | GroupField | SliceZone>\n\t\t| unknown = unknown,\n>(\n\tfield: LinkField<TypeEnum, LangEnum, DataInterface> | null | undefined,\n): field is LinkField<TypeEnum, LangEnum, DataInterface, \"filled\"> => {\n\treturn isNonNullish(field) && (\"id\" in field || \"url\" in field)\n}\n\n/**\n * Determines if a link to media field is filled.\n *\n * @param field - Link to media field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const linkToMedia = link as (\n\tfield: LinkToMediaField | null | undefined,\n) => field is LinkToMediaField<\"filled\">\n\n/**\n * Determines if a content relationship field is filled.\n *\n * @param field - Content relationship field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const contentRelationship = link as <\n\tField extends ContentRelationshipField,\n>(\n\tfield: Field | null | undefined,\n) => field is Exclude<Field, EmptyContentRelationshipField>\n\n/**\n * Determines if a date field is filled.\n *\n * @param field - Date field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const date = isNonNullish as (\n\tfield: DateField | null | undefined,\n) => field is DateField<\"filled\">\n\n/**\n * Determines if a timestamp field is filled.\n *\n * @param field - Timestamp field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const timestamp = isNonNullish as (\n\tfield: TimestampField | null | undefined,\n) => field is TimestampField<\"filled\">\n\n/**\n * Determines if a color field is filled.\n *\n * @param field - Color field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const color = isNonNullish as (\n\tfield: ColorField | null | undefined,\n) => field is ColorField<\"filled\">\n\n/**\n * Determines if a number field is filled.\n *\n * @param field - Number field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const number = isNonNullish as (\n\tfield: NumberField | null | undefined,\n) => field is NumberField<\"filled\">\n\n/**\n * Determines if a key text field is filled.\n *\n * @param field - Key text field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const keyText = (\n\tfield: KeyTextField | null | undefined,\n): field is KeyTextField<\"filled\"> => {\n\treturn !!field\n}\n\n/**\n * Determines if a select field is filled.\n *\n * @param field - Select field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const select = isNonNullish as <Enum extends string>(\n\tfield: SelectField<Enum> | null | undefined,\n) => field is SelectField<Enum, \"filled\">\n\n/**\n * Determines if an embed field is filled.\n *\n * @param field - Embed field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const embed = <Field extends EmbedField<AnyOEmbed>>(\n\tfield: Field | null | undefined,\n): field is Extract<Field, EmbedField<AnyOEmbed, \"filled\">> => {\n\treturn isNonNullish(field) && !!field.embed_url\n}\n\n/**\n * Determines if a geopoint field is filled.\n *\n * @param field - Geopoint field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const geoPoint = (\n\tfield: GeoPointField | null | undefined,\n): field is GeoPointField<\"filled\"> => {\n\treturn isNonNullish(field) && \"longitude\" in field\n}\n\n/**\n * Determines if a table field is filled.\n *\n * @param field - Table field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const table = isNonNullish as (\n\tfield: TableField | null | undefined,\n) => field is TableField<\"filled\">\n\n/**\n * Determines if an integration field is filled.\n *\n * @param field - Integration field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const integration = isNonNullish as <Data extends IntegrationFieldData>(\n\tfield: IntegrationField<Data> | null | undefined,\n) => field is IntegrationField<Data, \"filled\">\n/**\n * @deprecated Renamed to `integration`.\n */\n// TODO: Remove when we remove support for deprecated `integrationField` export.\nexport const integrationField = integration\n/**\n * @deprecated Renamed to `integrationField`.\n */\n// TODO: Remove when we remove support for deprecated `integrationFields` export.\nexport const integrationFields = integration\n\n/**\n * Determines if a repeatable field has at least one item.\n *\n * @param repeatable - Repeatable to check.\n *\n * @returns `true` if `repeatable` contains at least one item, `false`\n * otherwise.\n */\nexport const repeatable = <T extends LinkField>(\n\trepeatable: Repeatable<T> | null | undefined,\n): repeatable is Repeatable<T, \"filled\"> => {\n\treturn isNonNullish(repeatable) && isNonEmptyArray(repeatable)\n}\n\n/**\n * Determines if a group has at least one item.\n *\n * @param group - Group to check.\n *\n * @returns `true` if the group contains at least one item, `false` otherwise.\n */\nexport const group = <\n\tFields extends Record<string, AnyRegularField | NestedGroupField>,\n>(\n\tgroup: GroupField<Fields> | null | undefined,\n): group is GroupField<Fields, \"filled\"> => {\n\treturn isNonNullish(group) && isNonEmptyArray(group)\n}\n\n/**\n * Determines if a slice zone has at least one slice.\n *\n * @param slices - Slice zone to check.\n *\n * @returns `true` if the slice zone contains at least one slice, `false`\n * otherwise.\n */\nexport const sliceZone = <Slices extends Slice | SharedSlice>(\n\tslices: SliceZone<Slices> | null | und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,IAAI,gBAAgBA,aAAW;;;;;;;;;AAU/D,MAAa,SAGZ,YAC2C;AAC3C,QAAO,aAAaC,QAAM,IAAI,gBAAgBA,QAAM;;;;;;;;;;AAWrD,MAAa,aACZ,WAC2C;AAC3C,QAAO,aAAa,OAAO,IAAI,gBAAgB,OAAO"}
@@ -1,3 +1,4 @@
1
+
1
2
  //#region src/helpers/mapSliceZone.ts
2
3
  /**
3
4
  * Transforms a Slice Zone using a set of mapping functions, one for each type
@@ -46,7 +47,7 @@ function mapSliceZone(sliceZone, mappers, context) {
46
47
  };
47
48
  }));
48
49
  }
50
+
49
51
  //#endregion
50
52
  exports.mapSliceZone = mapSliceZone;
51
-
52
53
  //# sourceMappingURL=mapSliceZone.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mapSliceZone.cjs","names":[],"sources":["../../src/helpers/mapSliceZone.ts"],"sourcesContent":["import type { Slice } from \"../types/value/slice\"\n\n/**\n * Convert a value to a lazyily loaded module. This is useful when using\n * functions like `() => import(\"...\")`.\n */\ntype LazyModule<T> = () => Promise<T | { default: T }>\n\n/**\n * Mark a type as potentially lazy-loaded via a module.\n */\ntype MaybeLazyModule<T> = T | LazyModule<T>\n\n// oxlint-disable-next-line no-explicit-any\ntype AnyFunction = (...args: any[]) => any\n\n/**\n * Returns the type of a `SliceLike` type.\n *\n * @typeParam Slice - The Slice from which the type will be extracted.\n */\ntype ExtractSliceType<TSlice extends SliceLike> = TSlice extends SliceLikeRestV2\n\t? TSlice[\"slice_type\"]\n\t: TSlice extends SliceLikeGraphQL\n\t\t? TSlice[\"type\"]\n\t\t: never\n\n/**\n * The minimum required properties to represent a Prismic slice from the Prismic\n * Content API for the `mapSliceZone()` helper.\n *\n * @typeParam SliceType - Type name of the slice.\n */\ntype SliceLikeRestV2<TSliceType extends string = string> = Pick<\n\tSlice<TSliceType>,\n\t\"id\" | \"slice_type\"\n>\n\n/**\n * The minimum required properties to represent a Prismic slice from the Prismic\n * GraphQL API for the `mapSliceZone()` helper.\n *\n * @typeParam SliceType - Type name of the slice.\n */\ntype SliceLikeGraphQL<TSliceType extends string = string> = {\n\ttype: Slice<TSliceType>[\"slice_type\"]\n}\n\n/**\n * The minimum required properties to represent a Prismic slice for the\n * `mapSliceZone()` helper.\n *\n * If using Prismic's Content API, use the `Slice` export from\n * `@prismicio/client` for a full interface.\n *\n * @typeParam SliceType - Type name of the slice.\n */\ntype SliceLike<TSliceType extends string = string> =\n\t| SliceLikeRestV2<TSliceType>\n\t| SliceLikeGraphQL<TSliceType>\n\n/**\n * A looser version of the `SliceZone` type from `@prismicio/client` using\n * `SliceLike`.\n *\n * If using Prismic's Content API, use the `SliceZone` export from\n * `@prismicio/client` for the full type.\n *\n * @typeParam TSlice - The type(s) of a slice in the slice zone.\n */\ntype SliceZoneLike<TSlice extends SliceLike = SliceLike> = readonly TSlice[]\n\n/**\n * A set of properties that identify a Slice as having been mapped. Consumers of\n * the mapped Slice Zone can use these properties to detect and specially handle\n * mapped Slices.\n */\ntype MappedSliceLike = {\n\t/**\n\t * If `true`, this Slice has been modified from its original value using a\n\t * mapper.\n\t *\n\t * @internal\n\t */\n\t__mapped: true\n}\n\n/**\n * Arguments for a function mapping content from a Prismic Slice using the\n * `mapSliceZone()` helper.\n *\n * @typeParam TSlice - The Slice passed as a prop.\n * @typeParam TContext - Arbitrary data passed to `mapSliceZone()` and made\n * available to all Slice mappers.\n */\ntype SliceMapperArgs<\n\tTSlice extends SliceLike = SliceLike,\n\tTContext = unknown,\n> = {\n\t/**\n\t * Slice data.\n\t */\n\tslice: TSlice\n\n\t/**\n\t * The index of the Slice in the Slice Zone.\n\t */\n\tindex: number\n\n\t/**\n\t * All Slices from the Slice Zone to which the Slice belongs.\n\t */\n\t// TODO: We have to keep this list of Slices general due to circular\n\t// reference limtiations. If we had another generic to determine the full\n\t// union of Slice types, it would include TSlice. This causes TypeScript to\n\t// throw a compilation error.\n\tslices: SliceZoneLike<\n\t\tTSlice extends SliceLikeGraphQL ? SliceLikeGraphQL : SliceLikeRestV2\n\t>\n\n\t/**\n\t * Arbitrary data passed to `mapSliceZone()` and made available to all Slice\n\t * mappers.\n\t */\n\tcontext: TContext\n}\n\n/**\n * A record of mappers.\n */\ntype SliceMappers<TSlice extends SliceLike = SliceLike, TContext = unknown> = {\n\t[P in ExtractSliceType<TSlice>]?: MaybeLazyModule<\n\t\tSliceMapper<\n\t\t\tExtract<TSlice, SliceLike<P>>,\n\t\t\t// oxlint-disable-next-line no-explicit-any\n\t\t\tany,\n\t\t\tTContext\n\t\t>\n\t>\n}\n\n/**\n * A function that maps a Slice and its metadata to a modified version. The\n * return value will replace the Slice in the Slice Zone.\n */\nexport type SliceMapper<\n\tTSlice extends SliceLike = SliceLike,\n\tTMappedSlice extends Record<string, unknown> | undefined | void =\n\t\t| Record<string, unknown>\n\t\t| undefined\n\t\t| void,\n\tTContext = unknown,\n> = (\n\targs: SliceMapperArgs<TSlice, TContext>,\n) => TMappedSlice | Promise<TMappedSlice>\n\n/**\n * Unwraps a lazily loaded mapper module.\n */\ntype ResolveLazySliceMapperModule<\n\t// oxlint-disable-next-line no-explicit-any\n\tTSliceMapper extends SliceMapper<any, any> | LazyModule<SliceMapper>,\n> =\n\tTSliceMapper extends LazyModule<SliceMapper>\n\t\t? Awaited<ReturnType<TSliceMapper>> extends {\n\t\t\t\tdefault: unknown\n\t\t\t}\n\t\t\t? Awaited<ReturnType<TSliceMapper>>[\"default\"]\n\t\t\t: Awaited<ReturnType<TSliceMapper>>\n\t\t: TSliceMapper\n\n/**\n * Transforms a Slice into its mapped version.\n */\ntype MapSliceLike<\n\t// oxlint-disable-next-line no-explicit-any\n\tTSliceLike extends SliceLike<any>,\n\tTSliceMappers extends SliceMappers<\n\t\tTSliceLike,\n\t\t// oxlint-disable-next-line no-explicit-any\n\t\tany\n\t>,\n> = TSliceLike extends Slice\n\t? TSliceLike[\"slice_type\"] extends keyof TSliceMappers\n\t\t? TSliceMappers[TSliceLike[\"slice_type\"]] extends AnyFunction\n\t\t\t? SliceLikeRestV2<TSliceLike[\"slice_type\"]> &\n\t\t\t\t\tMappedSliceLike &\n\t\t\t\t\tAwaited<\n\t\t\t\t\t\tReturnType<\n\t\t\t\t\t\t\tResolveLazySliceMapperModule<\n\t\t\t\t\t\t\t\tTSliceMappers[TSliceLike[\"slice_type\"]]\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t>\n\t\t\t\t\t>\n\t\t\t: TSliceLike\n\t\t: TSliceLike\n\t: TSliceLike extends SliceLikeGraphQL\n\t\t? TSliceLike[\"type\"] extends keyof TSliceMappers\n\t\t\t? TSliceMappers[TSliceLike[\"type\"]] extends AnyFunction\n\t\t\t\t? SliceLikeGraphQL<TSliceLike[\"type\"]> &\n\t\t\t\t\t\tMappedSliceLike &\n\t\t\t\t\t\tAwaited<\n\t\t\t\t\t\t\tReturnType<\n\t\t\t\t\t\t\t\tResolveLazySliceMapperModule<TSliceMappers[TSliceLike[\"type\"]]>\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t>\n\t\t\t\t: TSliceLike\n\t\t\t: TSliceLike\n\t\t: never\n\n/**\n * Transforms a Slice Zone using a set of mapping functions, one for each type\n * of Slice. Mapping functions can be async.\n *\n * Whenever possible, use this function on the server to minimize client-side\n * processing.\n *\n * @example\n *\n * ```typescript\n * const mappedSliceZone = await mapSliceZone(page.data.slices, {\n * \tcode_block: ({ slice }) => ({\n * \t\tcodeHTML: await highlight(slice.primary.code),\n * \t}),\n * });\n * ```\n */\nexport function mapSliceZone<\n\tTSliceLike extends SliceLike,\n\tTSliceMappers extends SliceMappers<TSliceLike, TContext>,\n\tTContext = unknown,\n>(\n\tsliceZone: SliceZoneLike<TSliceLike>,\n\tmappers: TSliceMappers,\n\tcontext?: TContext,\n): Promise<MapSliceLike<TSliceLike, TSliceMappers>[]> {\n\treturn Promise.all(\n\t\tsliceZone.map(async (slice, index, slices) => {\n\t\t\tconst isRestSliceType = \"slice_type\" in slice\n\t\t\tconst sliceType = isRestSliceType ? slice.slice_type : slice.type\n\n\t\t\tconst mapper = mappers[sliceType as keyof typeof mappers]\n\n\t\t\tif (!mapper) {\n\t\t\t\treturn slice\n\t\t\t}\n\n\t\t\tconst mapperArgs = { slice, slices, index, context }\n\n\t\t\t// `result` may be a mapper function OR a module\n\t\t\t// containing a mapper function.\n\t\t\tlet result = await mapper(\n\t\t\t\t// @ts-expect-error - I don't know how to fix this type\n\t\t\t\tmapperArgs,\n\t\t\t)\n\n\t\t\t// `result` is a module containing a mapper function,\n\t\t\t// we need to dig out the mapper function. `result`\n\t\t\t// will be reassigned with the mapper function's value.\n\t\t\tif (\n\t\t\t\t// `mapper.length < 1` ensures the given\n\t\t\t\t// function is something of the form:\n\t\t\t\t// `() => import(...)`\n\t\t\t\tmapper.length < 1 &&\n\t\t\t\t(typeof result === \"function\" ||\n\t\t\t\t\t(typeof result === \"object\" && \"default\" in result))\n\t\t\t) {\n\t\t\t\tresult = \"default\" in result ? result.default : result\n\t\t\t\tresult = await result(mapperArgs)\n\t\t\t}\n\n\t\t\tif (isRestSliceType) {\n\t\t\t\treturn {\n\t\t\t\t\t__mapped: true,\n\t\t\t\t\tid: slice.id,\n\t\t\t\t\tslice_type: sliceType,\n\t\t\t\t\t...result,\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn {\n\t\t\t\t\t__mapped: true,\n\t\t\t\t\ttype: sliceType,\n\t\t\t\t\t...result,\n\t\t\t\t}\n\t\t\t}\n\t\t}),\n\t)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmOA,SAAgB,aAKf,WACA,SACA,SACqD;AACrD,QAAO,QAAQ,IACd,UAAU,IAAI,OAAO,OAAO,OAAO,WAAW;EAC7C,MAAM,kBAAkB,gBAAgB;EACxC,MAAM,YAAY,kBAAkB,MAAM,aAAa,MAAM;EAE7D,MAAM,SAAS,QAAQ;AAEvB,MAAI,CAAC,OACJ,QAAO;EAGR,MAAM,aAAa;GAAE;GAAO;GAAQ;GAAO;GAAS;EAIpD,IAAI,SAAS,MAAM,OAElB,WACA;AAKD,MAIC,OAAO,SAAS,MACf,OAAO,WAAW,cACjB,OAAO,WAAW,YAAY,aAAa,SAC5C;AACD,YAAS,aAAa,SAAS,OAAO,UAAU;AAChD,YAAS,MAAM,OAAO,WAAW;;AAGlC,MAAI,gBACH,QAAO;GACN,UAAU;GACV,IAAI,MAAM;GACV,YAAY;GACZ,GAAG;GACH;MAED,QAAO;GACN,UAAU;GACV,MAAM;GACN,GAAG;GACH;GAED,CACF"}
1
+ {"version":3,"file":"mapSliceZone.cjs","names":[],"sources":["../../src/helpers/mapSliceZone.ts"],"sourcesContent":["import type { Slice } from \"../types/value/slice\"\n\n/**\n * Convert a value to a lazyily loaded module. This is useful when using\n * functions like `() => import(\"...\")`.\n */\ntype LazyModule<T> = () => Promise<T | { default: T }>\n\n/**\n * Mark a type as potentially lazy-loaded via a module.\n */\ntype MaybeLazyModule<T> = T | LazyModule<T>\n\n// oxlint-disable-next-line no-explicit-any\ntype AnyFunction = (...args: any[]) => any\n\n/**\n * Returns the type of a `SliceLike` type.\n *\n * @typeParam Slice - The Slice from which the type will be extracted.\n */\ntype ExtractSliceType<TSlice extends SliceLike> = TSlice extends SliceLikeRestV2\n\t? TSlice[\"slice_type\"]\n\t: TSlice extends SliceLikeGraphQL\n\t\t? TSlice[\"type\"]\n\t\t: never\n\n/**\n * The minimum required properties to represent a Prismic slice from the Prismic\n * Content API for the `mapSliceZone()` helper.\n *\n * @typeParam SliceType - Type name of the slice.\n */\ntype SliceLikeRestV2<TSliceType extends string = string> = Pick<\n\tSlice<TSliceType>,\n\t\"id\" | \"slice_type\"\n>\n\n/**\n * The minimum required properties to represent a Prismic slice from the Prismic\n * GraphQL API for the `mapSliceZone()` helper.\n *\n * @typeParam SliceType - Type name of the slice.\n */\ntype SliceLikeGraphQL<TSliceType extends string = string> = {\n\ttype: Slice<TSliceType>[\"slice_type\"]\n}\n\n/**\n * The minimum required properties to represent a Prismic slice for the\n * `mapSliceZone()` helper.\n *\n * If using Prismic's Content API, use the `Slice` export from\n * `@prismicio/client` for a full interface.\n *\n * @typeParam SliceType - Type name of the slice.\n */\ntype SliceLike<TSliceType extends string = string> =\n\t| SliceLikeRestV2<TSliceType>\n\t| SliceLikeGraphQL<TSliceType>\n\n/**\n * A looser version of the `SliceZone` type from `@prismicio/client` using\n * `SliceLike`.\n *\n * If using Prismic's Content API, use the `SliceZone` export from\n * `@prismicio/client` for the full type.\n *\n * @typeParam TSlice - The type(s) of a slice in the slice zone.\n */\ntype SliceZoneLike<TSlice extends SliceLike = SliceLike> = readonly TSlice[]\n\n/**\n * A set of properties that identify a Slice as having been mapped. Consumers of\n * the mapped Slice Zone can use these properties to detect and specially handle\n * mapped Slices.\n */\ntype MappedSliceLike = {\n\t/**\n\t * If `true`, this Slice has been modified from its original value using a\n\t * mapper.\n\t *\n\t * @internal\n\t */\n\t__mapped: true\n}\n\n/**\n * Arguments for a function mapping content from a Prismic Slice using the\n * `mapSliceZone()` helper.\n *\n * @typeParam TSlice - The Slice passed as a prop.\n * @typeParam TContext - Arbitrary data passed to `mapSliceZone()` and made\n * available to all Slice mappers.\n */\ntype SliceMapperArgs<\n\tTSlice extends SliceLike = SliceLike,\n\tTContext = unknown,\n> = {\n\t/**\n\t * Slice data.\n\t */\n\tslice: TSlice\n\n\t/**\n\t * The index of the Slice in the Slice Zone.\n\t */\n\tindex: number\n\n\t/**\n\t * All Slices from the Slice Zone to which the Slice belongs.\n\t */\n\t// TODO: We have to keep this list of Slices general due to circular\n\t// reference limtiations. If we had another generic to determine the full\n\t// union of Slice types, it would include TSlice. This causes TypeScript to\n\t// throw a compilation error.\n\tslices: SliceZoneLike<\n\t\tTSlice extends SliceLikeGraphQL ? SliceLikeGraphQL : SliceLikeRestV2\n\t>\n\n\t/**\n\t * Arbitrary data passed to `mapSliceZone()` and made available to all Slice\n\t * mappers.\n\t */\n\tcontext: TContext\n}\n\n/**\n * A record of mappers.\n */\ntype SliceMappers<TSlice extends SliceLike = SliceLike, TContext = unknown> = {\n\t[P in ExtractSliceType<TSlice>]?: MaybeLazyModule<\n\t\tSliceMapper<\n\t\t\tExtract<TSlice, SliceLike<P>>,\n\t\t\t// oxlint-disable-next-line no-explicit-any\n\t\t\tany,\n\t\t\tTContext\n\t\t>\n\t>\n}\n\n/**\n * A function that maps a Slice and its metadata to a modified version. The\n * return value will replace the Slice in the Slice Zone.\n */\nexport type SliceMapper<\n\tTSlice extends SliceLike = SliceLike,\n\tTMappedSlice extends Record<string, unknown> | undefined | void =\n\t\t| Record<string, unknown>\n\t\t| undefined\n\t\t| void,\n\tTContext = unknown,\n> = (\n\targs: SliceMapperArgs<TSlice, TContext>,\n) => TMappedSlice | Promise<TMappedSlice>\n\n/**\n * Unwraps a lazily loaded mapper module.\n */\ntype ResolveLazySliceMapperModule<\n\t// oxlint-disable-next-line no-explicit-any\n\tTSliceMapper extends SliceMapper<any, any> | LazyModule<SliceMapper>,\n> =\n\tTSliceMapper extends LazyModule<SliceMapper>\n\t\t? Awaited<ReturnType<TSliceMapper>> extends {\n\t\t\t\tdefault: unknown\n\t\t\t}\n\t\t\t? Awaited<ReturnType<TSliceMapper>>[\"default\"]\n\t\t\t: Awaited<ReturnType<TSliceMapper>>\n\t\t: TSliceMapper\n\n/**\n * Transforms a Slice into its mapped version.\n */\ntype MapSliceLike<\n\t// oxlint-disable-next-line no-explicit-any\n\tTSliceLike extends SliceLike<any>,\n\tTSliceMappers extends SliceMappers<\n\t\tTSliceLike,\n\t\t// oxlint-disable-next-line no-explicit-any\n\t\tany\n\t>,\n> = TSliceLike extends Slice\n\t? TSliceLike[\"slice_type\"] extends keyof TSliceMappers\n\t\t? TSliceMappers[TSliceLike[\"slice_type\"]] extends AnyFunction\n\t\t\t? SliceLikeRestV2<TSliceLike[\"slice_type\"]> &\n\t\t\t\t\tMappedSliceLike &\n\t\t\t\t\tAwaited<\n\t\t\t\t\t\tReturnType<\n\t\t\t\t\t\t\tResolveLazySliceMapperModule<\n\t\t\t\t\t\t\t\tTSliceMappers[TSliceLike[\"slice_type\"]]\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t>\n\t\t\t\t\t>\n\t\t\t: TSliceLike\n\t\t: TSliceLike\n\t: TSliceLike extends SliceLikeGraphQL\n\t\t? TSliceLike[\"type\"] extends keyof TSliceMappers\n\t\t\t? TSliceMappers[TSliceLike[\"type\"]] extends AnyFunction\n\t\t\t\t? SliceLikeGraphQL<TSliceLike[\"type\"]> &\n\t\t\t\t\t\tMappedSliceLike &\n\t\t\t\t\t\tAwaited<\n\t\t\t\t\t\t\tReturnType<\n\t\t\t\t\t\t\t\tResolveLazySliceMapperModule<TSliceMappers[TSliceLike[\"type\"]]>\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t>\n\t\t\t\t: TSliceLike\n\t\t\t: TSliceLike\n\t\t: never\n\n/**\n * Transforms a Slice Zone using a set of mapping functions, one for each type\n * of Slice. Mapping functions can be async.\n *\n * Whenever possible, use this function on the server to minimize client-side\n * processing.\n *\n * @example\n *\n * ```typescript\n * const mappedSliceZone = await mapSliceZone(page.data.slices, {\n * \tcode_block: ({ slice }) => ({\n * \t\tcodeHTML: await highlight(slice.primary.code),\n * \t}),\n * });\n * ```\n */\nexport function mapSliceZone<\n\tTSliceLike extends SliceLike,\n\tTSliceMappers extends SliceMappers<TSliceLike, TContext>,\n\tTContext = unknown,\n>(\n\tsliceZone: SliceZoneLike<TSliceLike>,\n\tmappers: TSliceMappers,\n\tcontext?: TContext,\n): Promise<MapSliceLike<TSliceLike, TSliceMappers>[]> {\n\treturn Promise.all(\n\t\tsliceZone.map(async (slice, index, slices) => {\n\t\t\tconst isRestSliceType = \"slice_type\" in slice\n\t\t\tconst sliceType = isRestSliceType ? slice.slice_type : slice.type\n\n\t\t\tconst mapper = mappers[sliceType as keyof typeof mappers]\n\n\t\t\tif (!mapper) {\n\t\t\t\treturn slice\n\t\t\t}\n\n\t\t\tconst mapperArgs = { slice, slices, index, context }\n\n\t\t\t// `result` may be a mapper function OR a module\n\t\t\t// containing a mapper function.\n\t\t\tlet result = await mapper(\n\t\t\t\t// @ts-expect-error - I don't know how to fix this type\n\t\t\t\tmapperArgs,\n\t\t\t)\n\n\t\t\t// `result` is a module containing a mapper function,\n\t\t\t// we need to dig out the mapper function. `result`\n\t\t\t// will be reassigned with the mapper function's value.\n\t\t\tif (\n\t\t\t\t// `mapper.length < 1` ensures the given\n\t\t\t\t// function is something of the form:\n\t\t\t\t// `() => import(...)`\n\t\t\t\tmapper.length < 1 &&\n\t\t\t\t(typeof result === \"function\" ||\n\t\t\t\t\t(typeof result === \"object\" && \"default\" in result))\n\t\t\t) {\n\t\t\t\tresult = \"default\" in result ? result.default : result\n\t\t\t\tresult = await result(mapperArgs)\n\t\t\t}\n\n\t\t\tif (isRestSliceType) {\n\t\t\t\treturn {\n\t\t\t\t\t__mapped: true,\n\t\t\t\t\tid: slice.id,\n\t\t\t\t\tslice_type: sliceType,\n\t\t\t\t\t...result,\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn {\n\t\t\t\t\t__mapped: true,\n\t\t\t\t\ttype: sliceType,\n\t\t\t\t\t...result,\n\t\t\t\t}\n\t\t\t}\n\t\t}),\n\t)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmOA,SAAgB,aAKf,WACA,SACA,SACqD;AACrD,QAAO,QAAQ,IACd,UAAU,IAAI,OAAO,OAAO,OAAO,WAAW;EAC7C,MAAM,kBAAkB,gBAAgB;EACxC,MAAM,YAAY,kBAAkB,MAAM,aAAa,MAAM;EAE7D,MAAM,SAAS,QAAQ;AAEvB,MAAI,CAAC,OACJ,QAAO;EAGR,MAAM,aAAa;GAAE;GAAO;GAAQ;GAAO;GAAS;EAIpD,IAAI,SAAS,MAAM,OAElB,WACA;AAKD,MAIC,OAAO,SAAS,MACf,OAAO,WAAW,cACjB,OAAO,WAAW,YAAY,aAAa,SAC5C;AACD,YAAS,aAAa,SAAS,OAAO,UAAU;AAChD,YAAS,MAAM,OAAO,WAAW;;AAGlC,MAAI,gBACH,QAAO;GACN,UAAU;GACV,IAAI,MAAM;GACV,YAAY;GACZ,GAAG;GACH;MAED,QAAO;GACN,UAAU;GACV,MAAM;GACN,GAAG;GACH;GAED,CACF"}
@@ -1,6 +1,7 @@
1
1
  import { Slice } from "../types/value/slice.cjs";
2
2
 
3
3
  //#region src/helpers/mapSliceZone.d.ts
4
+
4
5
  /**
5
6
  * Convert a value to a lazyily loaded module. This is useful when using
6
7
  * functions like `() => import("...")`.
@@ -1 +1 @@
1
- {"version":3,"file":"mapSliceZone.d.cts","names":[],"sources":["../../src/helpers/mapSliceZone.ts"],"mappings":";;;;;AAAiD;;KAM5C,UAAA,YAAsB,OAAA,CAAQ,CAAA;EAAM,OAAA,EAAS,CAAA;AAAA;;;;KAK7C,eAAA,MAAqB,CAAA,GAAI,UAAA,CAAW,CAAA;AAAA,KAGpC,WAAA,OAAkB,IAAA;;;;;;KAOlB,gBAAA,gBAAgC,SAAA,IAAa,MAAA,SAAe,eAAA,GAC9D,MAAA,iBACA,MAAA,SAAe,gBAAA,GACd,MAAA;;;;;;;KASC,eAAA,uCAAsD,IAAA,CAC1D,KAAA,CAAM,UAAA;;;;;;;KAUF,gBAAA;EACJ,IAAA,EAAM,KAAA,CAAM,UAAA;AAAA;;;AA/Bc;;;;;;;KA2CtB,SAAA,uCACF,eAAA,CAAgB,UAAA,IAChB,gBAAA,CAAiB,UAAA;;;;;;;;;;KAWf,aAAA,gBAA6B,SAAA,GAAY,SAAA,aAAsB,MAAA;;;;;AA9C1D;KAqDL,eAAA;EA5Ce;;;;;;EAmDnB,QAAA;AAAA;;;;;AAlDgB;;;;KA6DZ,eAAA,gBACW,SAAA,GAAY,SAAA;EAnD3B;;;EAyDA,KAAA,EAAO,MAAA;EAzDe;AAAA;;EA8DtB,KAAA;EAjDkB;;;EA0DlB,MAAA,EAAQ,aAAA,CACP,MAAA,SAAe,gBAAA,GAAmB,gBAAA,GAAmB,eAAA;EA1DpC;;;;EAiElB,OAAA,EAAS,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slice } from "../types/value/slice.js";
2
2
 
3
3
  //#region src/helpers/mapSliceZone.d.ts
4
+
4
5
  /**
5
6
  * Convert a value to a lazyily loaded module. This is useful when using
6
7
  * functions like `() => import("...")`.
@@ -1 +1 @@
1
- {"version":3,"file":"mapSliceZone.d.ts","names":[],"sources":["../../src/helpers/mapSliceZone.ts"],"mappings":";;;;;AAAiD;;KAM5C,UAAA,YAAsB,OAAA,CAAQ,CAAA;EAAM,OAAA,EAAS,CAAA;AAAA;;;;KAK7C,eAAA,MAAqB,CAAA,GAAI,UAAA,CAAW,CAAA;AAAA,KAGpC,WAAA,OAAkB,IAAA;;;;;;KAOlB,gBAAA,gBAAgC,SAAA,IAAa,MAAA,SAAe,eAAA,GAC9D,MAAA,iBACA,MAAA,SAAe,gBAAA,GACd,MAAA;;;;;;;KASC,eAAA,uCAAsD,IAAA,CAC1D,KAAA,CAAM,UAAA;;;;;;;KAUF,gBAAA;EACJ,IAAA,EAAM,KAAA,CAAM,UAAA;AAAA;;;AA/Bc;;;;;;;KA2CtB,SAAA,uCACF,eAAA,CAAgB,UAAA,IAChB,gBAAA,CAAiB,UAAA;;;;;;;;;;KAWf,aAAA,gBAA6B,SAAA,GAAY,SAAA,aAAsB,MAAA;;;;;AA9C1D;KAqDL,eAAA;EA5Ce;;;;;;EAmDnB,QAAA;AAAA;;;;;AAlDgB;;;;KA6DZ,eAAA,gBACW,SAAA,GAAY,SAAA;EAnD3B;;;EAyDA,KAAA,EAAO,MAAA;EAzDe;AAAA;;EA8DtB,KAAA;EAjDkB;;;EA0DlB,MAAA,EAAQ,aAAA,CACP,MAAA,SAAe,gBAAA,GAAmB,gBAAA,GAAmB,eAAA;EA1DpC;;;;EAiElB,OAAA,EAAS,QAAA;AAAA;;;;KAML,YAAA,gBAA4B,SAAA,GAAY,SAAA,gCACtC,gBAAA,CAAiB,MAAA,KAAW,eAAA,CACjC,WAAA,CACC,OAAA,CAAQ,MAAA,EAAQ,SAAA,CAAU,CAAA,SAG1B,QAA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sBAnBoB,YAmBpB,CAlBD,UAkBC,EAAA,GAAA,CAAA,CAAA,GAdC,UAcD,SAdoB,KAcpB,GAbA,UAaA,CAAA,YAAA,CAAA,SAAA,MAbuC,aAavC,GAZC,aAYD,CAZe,UAYf,CAAA,YAAA,CAAA,CAAA,SAZiD,WAYjD,GAXE,eAWF,CAXkB,UAWlB,CAAA,YAAA,CAAA,CAAA,GAVE,eAUF,GATE,OASF,CARG,UAQH,CAPI,4BAOJ,CANK,aAML,CANmB,UAMnB,CAAA,YAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAFE,UAEF,GADC,UACD,GAAA,UAAA,SAAmB,gBAAnB,GACC,UADD,CAAA,MAAA,CAAA,SAAA,MACkC,aADlC,GAEE,aAFF,CAEgB,UAFhB,CAAA,MAAA,CAAA,CAAA,SAE4C,WAF5C,GAGG,gBAHH,CAGoB,UAHpB,CAAA,MAAA,CAAA,CAAA,GAIG,eAJH,GAKG,OALH,CAMI,UANJ,CAOK,4BAPL,CAOkC,aAPlC,CAOgD,UAPhD,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAUG,UAVH,GAWE,UAXF,GAAA,KAAA;;;;;;;;;;;;;;;;;;AA+Ba,iBAAA,YAAY,CAAA,mBACR,SADQ,EAAA,sBAEL,YAFK,CAEQ,UAFR,EAEoB,QAFpB,CAAA,EAAA,WAAA,OAAA,CAAA,CAAA,SAAA,EAKhB,aALgB,CAKF,UALE,CAAA,EAAA,OAAA,EAMlB,aANkB,EAAA,OAAA,CAAA,EAOjB,QAPiB,CAAA,EAQzB,OARyB,CAQjB,YARiB,CAQJ,UARI,EAQQ,aARR,CAAA,EAAA,CAAA"}
@@ -46,7 +46,7 @@ function mapSliceZone(sliceZone, mappers, context) {
46
46
  };
47
47
  }));
48
48
  }
49
+
49
50
  //#endregion
50
51
  export { mapSliceZone };
51
-
52
52
  //# sourceMappingURL=mapSliceZone.js.map