@redneckz/wildless-cms-uni-blocks 0.14.860 → 0.14.862

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 (464) hide show
  1. package/README.md +13 -5
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +16 -20
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/icons/IconName.d.ts +2 -2
  6. package/bundle/model/Fallback.d.ts +0 -1
  7. package/bundle/model/FormTypeFieldDef.d.ts +1 -1
  8. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +2 -0
  9. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  10. package/dist/components/TabsLayout/TabsLayout.js +13 -15
  11. package/dist/components/TabsLayout/TabsLayout.js.map +1 -1
  12. package/dist/icons/IconName.d.ts +2 -2
  13. package/dist/icons/IconName.js +1 -1
  14. package/dist/icons/IconName.js.map +1 -1
  15. package/dist/model/Fallback.d.ts +0 -1
  16. package/dist/model/FormTypeFieldDef.d.ts +1 -1
  17. package/lib/common.css +1 -1
  18. package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
  19. package/lib/components/ApplicationForm/ApplicationForm.fixture.mobile.d.ts +1 -0
  20. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +2 -0
  21. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  22. package/lib/components/TabsLayout/TabsLayout.js +14 -16
  23. package/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  24. package/lib/icons/IconName.d.ts +2 -2
  25. package/lib/icons/IconName.js +1 -1
  26. package/lib/icons/IconName.js.map +1 -1
  27. package/lib/model/Fallback.d.ts +0 -1
  28. package/lib/model/FormTypeFieldDef.d.ts +1 -1
  29. package/lib/retail/components/DraftDialog/utils.d.ts +3 -3
  30. package/mobile/bundle/bundle.umd.js +16 -20
  31. package/mobile/bundle/bundle.umd.min.js +1 -1
  32. package/mobile/bundle/icons/IconName.d.ts +2 -2
  33. package/mobile/bundle/model/Fallback.d.ts +0 -1
  34. package/mobile/bundle/model/FormTypeFieldDef.d.ts +1 -1
  35. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +2 -0
  36. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  37. package/mobile/dist/components/TabsLayout/TabsLayout.js +13 -15
  38. package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -1
  39. package/mobile/dist/icons/IconName.d.ts +2 -2
  40. package/mobile/dist/icons/IconName.js +1 -1
  41. package/mobile/dist/icons/IconName.js.map +1 -1
  42. package/mobile/dist/model/Fallback.d.ts +0 -1
  43. package/mobile/dist/model/FormTypeFieldDef.d.ts +1 -1
  44. package/mobile/lib/common.css +1 -1
  45. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +2 -0
  46. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  47. package/mobile/lib/components/TabsLayout/TabsLayout.js +14 -16
  48. package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  49. package/mobile/lib/icons/IconName.d.ts +2 -2
  50. package/mobile/lib/icons/IconName.js +1 -1
  51. package/mobile/lib/icons/IconName.js.map +1 -1
  52. package/mobile/lib/model/Fallback.d.ts +0 -1
  53. package/mobile/lib/model/FormTypeFieldDef.d.ts +1 -1
  54. package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +30 -0
  55. package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +2 -0
  56. package/mobile/src/components/TabsLayout/TabsLayout.tsx +19 -23
  57. package/mobile/src/icons/IconName.ts +2 -2
  58. package/mobile/src/icons/PercentIcon.svg +1 -1
  59. package/mobile/src/model/Fallback.ts +0 -1
  60. package/mobile/src/model/FormTypeFieldDef.ts +1 -0
  61. package/package.json +1 -21
  62. package/src/components/ApplicationForm/ApplicationForm.example.json +30 -0
  63. package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +23 -0
  64. package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +23 -0
  65. package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +2 -0
  66. package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +1 -4
  67. package/src/components/ContentPage/ContentPage.fixture.tsx +2 -7
  68. package/src/components/TabsLayout/TabsLayout.tsx +19 -23
  69. package/src/icons/IconName.ts +2 -2
  70. package/src/icons/PercentIcon.svg +1 -1
  71. package/src/model/Fallback.ts +0 -1
  72. package/src/model/FormTypeFieldDef.ts +1 -0
  73. package/bundle/components/ContentPage/computeAPIFallback.d.ts +0 -4
  74. package/bundle/components/ContentPage/loadModuleFallback.d.ts +0 -2
  75. package/bundle/components/ContentPage/mapSlot.d.ts +0 -2
  76. package/bundle/components/ContentPage/normalizeBlock.d.ts +0 -3
  77. package/bundle/components/ContentPage/normalizeBlock.mobile.d.ts +0 -3
  78. package/bundle/components/ContentPage/normalizePage.d.ts +0 -3
  79. package/bundle/components/ContentPage/toMobileBlock.d.ts +0 -2
  80. package/bundle/content-page-repository/ContentPageRepository.d.ts +0 -10
  81. package/bundle/content-page-repository/JSONDocContentBox.d.ts +0 -8
  82. package/bundle/content-page-repository/TransformationOptions.d.ts +0 -4
  83. package/bundle/content-page-repository/clearAttachmentHref.d.ts +0 -2
  84. package/bundle/content-page-repository/computeImgOutputPath.d.ts +0 -3
  85. package/bundle/content-page-repository/extensions.d.ts +0 -3
  86. package/bundle/content-page-repository/index.d.ts +0 -3
  87. package/bundle/content-page-repository/mapJSON.d.ts +0 -1
  88. package/bundle/content-page-repository/mergePages.d.ts +0 -2
  89. package/bundle/content-page-repository/replaceHeadingTags.d.ts +0 -1
  90. package/bundle/content-page-repository/resizeImg.d.ts +0 -3
  91. package/bundle/content-page-repository/transformAttachmentLink.d.ts +0 -3
  92. package/bundle/content-page-repository/transformContentPage.d.ts +0 -4
  93. package/bundle/content-page-repository/transformDocument.d.ts +0 -3
  94. package/bundle/content-page-repository/transformHTML.d.ts +0 -1
  95. package/bundle/content-page-repository/transformImg.d.ts +0 -12
  96. package/bundle/content-page-repository/transformMarkdown.d.ts +0 -1
  97. package/bundle/content-page-repository/transformPicture.d.ts +0 -3
  98. package/dist/components/ContentPage/computeAPIFallback.d.ts +0 -4
  99. package/dist/components/ContentPage/computeAPIFallback.js +0 -36
  100. package/dist/components/ContentPage/computeAPIFallback.js.map +0 -1
  101. package/dist/components/ContentPage/loadModuleFallback.d.ts +0 -2
  102. package/dist/components/ContentPage/loadModuleFallback.js +0 -36
  103. package/dist/components/ContentPage/loadModuleFallback.js.map +0 -1
  104. package/dist/components/ContentPage/mapSlot.d.ts +0 -2
  105. package/dist/components/ContentPage/mapSlot.js +0 -16
  106. package/dist/components/ContentPage/mapSlot.js.map +0 -1
  107. package/dist/components/ContentPage/normalizeBlock.d.ts +0 -3
  108. package/dist/components/ContentPage/normalizeBlock.js +0 -15
  109. package/dist/components/ContentPage/normalizeBlock.js.map +0 -1
  110. package/dist/components/ContentPage/normalizeBlock.mobile.d.ts +0 -3
  111. package/dist/components/ContentPage/normalizeBlock.mobile.js +0 -18
  112. package/dist/components/ContentPage/normalizeBlock.mobile.js.map +0 -1
  113. package/dist/components/ContentPage/normalizePage.d.ts +0 -3
  114. package/dist/components/ContentPage/normalizePage.js +0 -6
  115. package/dist/components/ContentPage/normalizePage.js.map +0 -1
  116. package/dist/components/ContentPage/toMobileBlock.d.ts +0 -2
  117. package/dist/components/ContentPage/toMobileBlock.js +0 -12
  118. package/dist/components/ContentPage/toMobileBlock.js.map +0 -1
  119. package/dist/content-page-repository/ContentPageRepository.d.ts +0 -10
  120. package/dist/content-page-repository/ContentPageRepository.js +0 -31
  121. package/dist/content-page-repository/ContentPageRepository.js.map +0 -1
  122. package/dist/content-page-repository/JSONDocContentBox.d.ts +0 -8
  123. package/dist/content-page-repository/JSONDocContentBox.js +0 -39
  124. package/dist/content-page-repository/JSONDocContentBox.js.map +0 -1
  125. package/dist/content-page-repository/TransformationOptions.d.ts +0 -4
  126. package/dist/content-page-repository/TransformationOptions.js +0 -2
  127. package/dist/content-page-repository/TransformationOptions.js.map +0 -1
  128. package/dist/content-page-repository/clearAttachmentHref.d.ts +0 -2
  129. package/dist/content-page-repository/clearAttachmentHref.js +0 -6
  130. package/dist/content-page-repository/clearAttachmentHref.js.map +0 -1
  131. package/dist/content-page-repository/computeImgOutputPath.d.ts +0 -3
  132. package/dist/content-page-repository/computeImgOutputPath.js +0 -18
  133. package/dist/content-page-repository/computeImgOutputPath.js.map +0 -1
  134. package/dist/content-page-repository/extensions.d.ts +0 -3
  135. package/dist/content-page-repository/extensions.js +0 -18
  136. package/dist/content-page-repository/extensions.js.map +0 -1
  137. package/dist/content-page-repository/index.d.ts +0 -3
  138. package/dist/content-page-repository/index.js +0 -9
  139. package/dist/content-page-repository/index.js.map +0 -1
  140. package/dist/content-page-repository/mapJSON.d.ts +0 -1
  141. package/dist/content-page-repository/mapJSON.js +0 -26
  142. package/dist/content-page-repository/mapJSON.js.map +0 -1
  143. package/dist/content-page-repository/mergePages.d.ts +0 -2
  144. package/dist/content-page-repository/mergePages.js +0 -7
  145. package/dist/content-page-repository/mergePages.js.map +0 -1
  146. package/dist/content-page-repository/replaceHeadingTags.d.ts +0 -1
  147. package/dist/content-page-repository/replaceHeadingTags.js +0 -5
  148. package/dist/content-page-repository/replaceHeadingTags.js.map +0 -1
  149. package/dist/content-page-repository/resizeImg.d.ts +0 -3
  150. package/dist/content-page-repository/resizeImg.js +0 -19
  151. package/dist/content-page-repository/resizeImg.js.map +0 -1
  152. package/dist/content-page-repository/transformAttachmentLink.d.ts +0 -3
  153. package/dist/content-page-repository/transformAttachmentLink.js +0 -40
  154. package/dist/content-page-repository/transformAttachmentLink.js.map +0 -1
  155. package/dist/content-page-repository/transformContentPage.d.ts +0 -4
  156. package/dist/content-page-repository/transformContentPage.js +0 -78
  157. package/dist/content-page-repository/transformContentPage.js.map +0 -1
  158. package/dist/content-page-repository/transformDocument.d.ts +0 -3
  159. package/dist/content-page-repository/transformDocument.js +0 -38
  160. package/dist/content-page-repository/transformDocument.js.map +0 -1
  161. package/dist/content-page-repository/transformHTML.d.ts +0 -1
  162. package/dist/content-page-repository/transformHTML.js +0 -54
  163. package/dist/content-page-repository/transformHTML.js.map +0 -1
  164. package/dist/content-page-repository/transformImg.d.ts +0 -12
  165. package/dist/content-page-repository/transformImg.js +0 -51
  166. package/dist/content-page-repository/transformImg.js.map +0 -1
  167. package/dist/content-page-repository/transformMarkdown.d.ts +0 -1
  168. package/dist/content-page-repository/transformMarkdown.js +0 -18
  169. package/dist/content-page-repository/transformMarkdown.js.map +0 -1
  170. package/dist/content-page-repository/transformPicture.d.ts +0 -3
  171. package/dist/content-page-repository/transformPicture.js +0 -28
  172. package/dist/content-page-repository/transformPicture.js.map +0 -1
  173. package/lib/components/ContentPage/computeAPIFallback.d.ts +0 -4
  174. package/lib/components/ContentPage/computeAPIFallback.js +0 -33
  175. package/lib/components/ContentPage/computeAPIFallback.js.map +0 -1
  176. package/lib/components/ContentPage/loadModuleFallback.d.ts +0 -2
  177. package/lib/components/ContentPage/loadModuleFallback.js +0 -10
  178. package/lib/components/ContentPage/loadModuleFallback.js.map +0 -1
  179. package/lib/components/ContentPage/mapSlot.d.ts +0 -2
  180. package/lib/components/ContentPage/mapSlot.js +0 -13
  181. package/lib/components/ContentPage/mapSlot.js.map +0 -1
  182. package/lib/components/ContentPage/normalizeBlock.d.ts +0 -3
  183. package/lib/components/ContentPage/normalizeBlock.js +0 -12
  184. package/lib/components/ContentPage/normalizeBlock.js.map +0 -1
  185. package/lib/components/ContentPage/normalizeBlock.mobile.d.ts +0 -3
  186. package/lib/components/ContentPage/normalizeBlock.mobile.js +0 -15
  187. package/lib/components/ContentPage/normalizeBlock.mobile.js.map +0 -1
  188. package/lib/components/ContentPage/normalizePage.d.ts +0 -3
  189. package/lib/components/ContentPage/normalizePage.js +0 -3
  190. package/lib/components/ContentPage/normalizePage.js.map +0 -1
  191. package/lib/components/ContentPage/toMobileBlock.d.ts +0 -2
  192. package/lib/components/ContentPage/toMobileBlock.js +0 -9
  193. package/lib/components/ContentPage/toMobileBlock.js.map +0 -1
  194. package/lib/content-page-repository/ContentPageRepository.d.ts +0 -10
  195. package/lib/content-page-repository/ContentPageRepository.js +0 -25
  196. package/lib/content-page-repository/ContentPageRepository.js.map +0 -1
  197. package/lib/content-page-repository/JSONDocContentBox.d.ts +0 -8
  198. package/lib/content-page-repository/JSONDocContentBox.js +0 -36
  199. package/lib/content-page-repository/JSONDocContentBox.js.map +0 -1
  200. package/lib/content-page-repository/TransformationOptions.d.ts +0 -4
  201. package/lib/content-page-repository/TransformationOptions.js +0 -2
  202. package/lib/content-page-repository/TransformationOptions.js.map +0 -1
  203. package/lib/content-page-repository/clearAttachmentHref.d.ts +0 -2
  204. package/lib/content-page-repository/clearAttachmentHref.js +0 -3
  205. package/lib/content-page-repository/clearAttachmentHref.js.map +0 -1
  206. package/lib/content-page-repository/computeImgOutputPath.d.ts +0 -3
  207. package/lib/content-page-repository/computeImgOutputPath.js +0 -12
  208. package/lib/content-page-repository/computeImgOutputPath.js.map +0 -1
  209. package/lib/content-page-repository/extensions.d.ts +0 -3
  210. package/lib/content-page-repository/extensions.js +0 -16
  211. package/lib/content-page-repository/extensions.js.map +0 -1
  212. package/lib/content-page-repository/index.d.ts +0 -3
  213. package/lib/content-page-repository/index.js +0 -4
  214. package/lib/content-page-repository/index.js.map +0 -1
  215. package/lib/content-page-repository/mapJSON.d.ts +0 -1
  216. package/lib/content-page-repository/mapJSON.js +0 -23
  217. package/lib/content-page-repository/mapJSON.js.map +0 -1
  218. package/lib/content-page-repository/mergePages.d.ts +0 -2
  219. package/lib/content-page-repository/mergePages.js +0 -4
  220. package/lib/content-page-repository/mergePages.js.map +0 -1
  221. package/lib/content-page-repository/replaceHeadingTags.d.ts +0 -1
  222. package/lib/content-page-repository/replaceHeadingTags.js +0 -2
  223. package/lib/content-page-repository/replaceHeadingTags.js.map +0 -1
  224. package/lib/content-page-repository/resizeImg.d.ts +0 -3
  225. package/lib/content-page-repository/resizeImg.js +0 -13
  226. package/lib/content-page-repository/resizeImg.js.map +0 -1
  227. package/lib/content-page-repository/transformAttachmentLink.d.ts +0 -3
  228. package/lib/content-page-repository/transformAttachmentLink.js +0 -34
  229. package/lib/content-page-repository/transformAttachmentLink.js.map +0 -1
  230. package/lib/content-page-repository/transformContentPage.d.ts +0 -4
  231. package/lib/content-page-repository/transformContentPage.js +0 -71
  232. package/lib/content-page-repository/transformContentPage.js.map +0 -1
  233. package/lib/content-page-repository/transformDocument.d.ts +0 -3
  234. package/lib/content-page-repository/transformDocument.js +0 -32
  235. package/lib/content-page-repository/transformDocument.js.map +0 -1
  236. package/lib/content-page-repository/transformHTML.d.ts +0 -1
  237. package/lib/content-page-repository/transformHTML.js +0 -25
  238. package/lib/content-page-repository/transformHTML.js.map +0 -1
  239. package/lib/content-page-repository/transformImg.d.ts +0 -12
  240. package/lib/content-page-repository/transformImg.js +0 -45
  241. package/lib/content-page-repository/transformImg.js.map +0 -1
  242. package/lib/content-page-repository/transformMarkdown.d.ts +0 -1
  243. package/lib/content-page-repository/transformMarkdown.js +0 -12
  244. package/lib/content-page-repository/transformMarkdown.js.map +0 -1
  245. package/lib/content-page-repository/transformPicture.d.ts +0 -3
  246. package/lib/content-page-repository/transformPicture.js +0 -22
  247. package/lib/content-page-repository/transformPicture.js.map +0 -1
  248. package/mobile/bundle/components/ContentPage/computeAPIFallback.d.ts +0 -4
  249. package/mobile/bundle/components/ContentPage/loadModuleFallback.d.ts +0 -2
  250. package/mobile/bundle/components/ContentPage/mapSlot.d.ts +0 -2
  251. package/mobile/bundle/components/ContentPage/normalizeBlock.d.ts +0 -3
  252. package/mobile/bundle/components/ContentPage/normalizePage.d.ts +0 -3
  253. package/mobile/bundle/components/ContentPage/toMobileBlock.d.ts +0 -2
  254. package/mobile/bundle/content-page-repository/ContentPageRepository.d.ts +0 -10
  255. package/mobile/bundle/content-page-repository/JSONDocContentBox.d.ts +0 -8
  256. package/mobile/bundle/content-page-repository/TransformationOptions.d.ts +0 -4
  257. package/mobile/bundle/content-page-repository/clearAttachmentHref.d.ts +0 -2
  258. package/mobile/bundle/content-page-repository/computeImgOutputPath.d.ts +0 -3
  259. package/mobile/bundle/content-page-repository/extensions.d.ts +0 -3
  260. package/mobile/bundle/content-page-repository/index.d.ts +0 -3
  261. package/mobile/bundle/content-page-repository/mapJSON.d.ts +0 -1
  262. package/mobile/bundle/content-page-repository/mergePages.d.ts +0 -2
  263. package/mobile/bundle/content-page-repository/replaceHeadingTags.d.ts +0 -1
  264. package/mobile/bundle/content-page-repository/resizeImg.d.ts +0 -3
  265. package/mobile/bundle/content-page-repository/transformAttachmentLink.d.ts +0 -3
  266. package/mobile/bundle/content-page-repository/transformContentPage.d.ts +0 -4
  267. package/mobile/bundle/content-page-repository/transformDocument.d.ts +0 -3
  268. package/mobile/bundle/content-page-repository/transformHTML.d.ts +0 -1
  269. package/mobile/bundle/content-page-repository/transformImg.d.ts +0 -12
  270. package/mobile/bundle/content-page-repository/transformMarkdown.d.ts +0 -1
  271. package/mobile/bundle/content-page-repository/transformPicture.d.ts +0 -3
  272. package/mobile/dist/components/ContentPage/computeAPIFallback.d.ts +0 -4
  273. package/mobile/dist/components/ContentPage/computeAPIFallback.js +0 -36
  274. package/mobile/dist/components/ContentPage/computeAPIFallback.js.map +0 -1
  275. package/mobile/dist/components/ContentPage/loadModuleFallback.d.ts +0 -2
  276. package/mobile/dist/components/ContentPage/loadModuleFallback.js +0 -36
  277. package/mobile/dist/components/ContentPage/loadModuleFallback.js.map +0 -1
  278. package/mobile/dist/components/ContentPage/mapSlot.d.ts +0 -2
  279. package/mobile/dist/components/ContentPage/mapSlot.js +0 -16
  280. package/mobile/dist/components/ContentPage/mapSlot.js.map +0 -1
  281. package/mobile/dist/components/ContentPage/normalizeBlock.d.ts +0 -3
  282. package/mobile/dist/components/ContentPage/normalizeBlock.js +0 -18
  283. package/mobile/dist/components/ContentPage/normalizeBlock.js.map +0 -1
  284. package/mobile/dist/components/ContentPage/normalizePage.d.ts +0 -3
  285. package/mobile/dist/components/ContentPage/normalizePage.js +0 -6
  286. package/mobile/dist/components/ContentPage/normalizePage.js.map +0 -1
  287. package/mobile/dist/components/ContentPage/toMobileBlock.d.ts +0 -2
  288. package/mobile/dist/components/ContentPage/toMobileBlock.js +0 -12
  289. package/mobile/dist/components/ContentPage/toMobileBlock.js.map +0 -1
  290. package/mobile/dist/content-page-repository/ContentPageRepository.d.ts +0 -10
  291. package/mobile/dist/content-page-repository/ContentPageRepository.js +0 -31
  292. package/mobile/dist/content-page-repository/ContentPageRepository.js.map +0 -1
  293. package/mobile/dist/content-page-repository/JSONDocContentBox.d.ts +0 -8
  294. package/mobile/dist/content-page-repository/JSONDocContentBox.js +0 -39
  295. package/mobile/dist/content-page-repository/JSONDocContentBox.js.map +0 -1
  296. package/mobile/dist/content-page-repository/TransformationOptions.d.ts +0 -4
  297. package/mobile/dist/content-page-repository/TransformationOptions.js +0 -2
  298. package/mobile/dist/content-page-repository/TransformationOptions.js.map +0 -1
  299. package/mobile/dist/content-page-repository/clearAttachmentHref.d.ts +0 -2
  300. package/mobile/dist/content-page-repository/clearAttachmentHref.js +0 -6
  301. package/mobile/dist/content-page-repository/clearAttachmentHref.js.map +0 -1
  302. package/mobile/dist/content-page-repository/computeImgOutputPath.d.ts +0 -3
  303. package/mobile/dist/content-page-repository/computeImgOutputPath.js +0 -18
  304. package/mobile/dist/content-page-repository/computeImgOutputPath.js.map +0 -1
  305. package/mobile/dist/content-page-repository/extensions.d.ts +0 -3
  306. package/mobile/dist/content-page-repository/extensions.js +0 -18
  307. package/mobile/dist/content-page-repository/extensions.js.map +0 -1
  308. package/mobile/dist/content-page-repository/index.d.ts +0 -3
  309. package/mobile/dist/content-page-repository/index.js +0 -9
  310. package/mobile/dist/content-page-repository/index.js.map +0 -1
  311. package/mobile/dist/content-page-repository/mapJSON.d.ts +0 -1
  312. package/mobile/dist/content-page-repository/mapJSON.js +0 -26
  313. package/mobile/dist/content-page-repository/mapJSON.js.map +0 -1
  314. package/mobile/dist/content-page-repository/mergePages.d.ts +0 -2
  315. package/mobile/dist/content-page-repository/mergePages.js +0 -7
  316. package/mobile/dist/content-page-repository/mergePages.js.map +0 -1
  317. package/mobile/dist/content-page-repository/replaceHeadingTags.d.ts +0 -1
  318. package/mobile/dist/content-page-repository/replaceHeadingTags.js +0 -5
  319. package/mobile/dist/content-page-repository/replaceHeadingTags.js.map +0 -1
  320. package/mobile/dist/content-page-repository/resizeImg.d.ts +0 -3
  321. package/mobile/dist/content-page-repository/resizeImg.js +0 -19
  322. package/mobile/dist/content-page-repository/resizeImg.js.map +0 -1
  323. package/mobile/dist/content-page-repository/transformAttachmentLink.d.ts +0 -3
  324. package/mobile/dist/content-page-repository/transformAttachmentLink.js +0 -40
  325. package/mobile/dist/content-page-repository/transformAttachmentLink.js.map +0 -1
  326. package/mobile/dist/content-page-repository/transformContentPage.d.ts +0 -4
  327. package/mobile/dist/content-page-repository/transformContentPage.js +0 -78
  328. package/mobile/dist/content-page-repository/transformContentPage.js.map +0 -1
  329. package/mobile/dist/content-page-repository/transformDocument.d.ts +0 -3
  330. package/mobile/dist/content-page-repository/transformDocument.js +0 -38
  331. package/mobile/dist/content-page-repository/transformDocument.js.map +0 -1
  332. package/mobile/dist/content-page-repository/transformHTML.d.ts +0 -1
  333. package/mobile/dist/content-page-repository/transformHTML.js +0 -54
  334. package/mobile/dist/content-page-repository/transformHTML.js.map +0 -1
  335. package/mobile/dist/content-page-repository/transformImg.d.ts +0 -12
  336. package/mobile/dist/content-page-repository/transformImg.js +0 -51
  337. package/mobile/dist/content-page-repository/transformImg.js.map +0 -1
  338. package/mobile/dist/content-page-repository/transformMarkdown.d.ts +0 -1
  339. package/mobile/dist/content-page-repository/transformMarkdown.js +0 -18
  340. package/mobile/dist/content-page-repository/transformMarkdown.js.map +0 -1
  341. package/mobile/dist/content-page-repository/transformPicture.d.ts +0 -3
  342. package/mobile/dist/content-page-repository/transformPicture.js +0 -28
  343. package/mobile/dist/content-page-repository/transformPicture.js.map +0 -1
  344. package/mobile/lib/components/ContentPage/computeAPIFallback.d.ts +0 -4
  345. package/mobile/lib/components/ContentPage/computeAPIFallback.js +0 -33
  346. package/mobile/lib/components/ContentPage/computeAPIFallback.js.map +0 -1
  347. package/mobile/lib/components/ContentPage/loadModuleFallback.d.ts +0 -2
  348. package/mobile/lib/components/ContentPage/loadModuleFallback.js +0 -10
  349. package/mobile/lib/components/ContentPage/loadModuleFallback.js.map +0 -1
  350. package/mobile/lib/components/ContentPage/mapSlot.d.ts +0 -2
  351. package/mobile/lib/components/ContentPage/mapSlot.js +0 -13
  352. package/mobile/lib/components/ContentPage/mapSlot.js.map +0 -1
  353. package/mobile/lib/components/ContentPage/normalizeBlock.d.ts +0 -3
  354. package/mobile/lib/components/ContentPage/normalizeBlock.js +0 -15
  355. package/mobile/lib/components/ContentPage/normalizeBlock.js.map +0 -1
  356. package/mobile/lib/components/ContentPage/normalizePage.d.ts +0 -3
  357. package/mobile/lib/components/ContentPage/normalizePage.js +0 -3
  358. package/mobile/lib/components/ContentPage/normalizePage.js.map +0 -1
  359. package/mobile/lib/components/ContentPage/toMobileBlock.d.ts +0 -2
  360. package/mobile/lib/components/ContentPage/toMobileBlock.js +0 -9
  361. package/mobile/lib/components/ContentPage/toMobileBlock.js.map +0 -1
  362. package/mobile/lib/content-page-repository/ContentPageRepository.d.ts +0 -10
  363. package/mobile/lib/content-page-repository/ContentPageRepository.js +0 -25
  364. package/mobile/lib/content-page-repository/ContentPageRepository.js.map +0 -1
  365. package/mobile/lib/content-page-repository/JSONDocContentBox.d.ts +0 -8
  366. package/mobile/lib/content-page-repository/JSONDocContentBox.js +0 -36
  367. package/mobile/lib/content-page-repository/JSONDocContentBox.js.map +0 -1
  368. package/mobile/lib/content-page-repository/TransformationOptions.d.ts +0 -4
  369. package/mobile/lib/content-page-repository/TransformationOptions.js +0 -2
  370. package/mobile/lib/content-page-repository/TransformationOptions.js.map +0 -1
  371. package/mobile/lib/content-page-repository/clearAttachmentHref.d.ts +0 -2
  372. package/mobile/lib/content-page-repository/clearAttachmentHref.js +0 -3
  373. package/mobile/lib/content-page-repository/clearAttachmentHref.js.map +0 -1
  374. package/mobile/lib/content-page-repository/computeImgOutputPath.d.ts +0 -3
  375. package/mobile/lib/content-page-repository/computeImgOutputPath.js +0 -12
  376. package/mobile/lib/content-page-repository/computeImgOutputPath.js.map +0 -1
  377. package/mobile/lib/content-page-repository/extensions.d.ts +0 -3
  378. package/mobile/lib/content-page-repository/extensions.js +0 -16
  379. package/mobile/lib/content-page-repository/extensions.js.map +0 -1
  380. package/mobile/lib/content-page-repository/index.d.ts +0 -3
  381. package/mobile/lib/content-page-repository/index.js +0 -4
  382. package/mobile/lib/content-page-repository/index.js.map +0 -1
  383. package/mobile/lib/content-page-repository/mapJSON.d.ts +0 -1
  384. package/mobile/lib/content-page-repository/mapJSON.js +0 -23
  385. package/mobile/lib/content-page-repository/mapJSON.js.map +0 -1
  386. package/mobile/lib/content-page-repository/mergePages.d.ts +0 -2
  387. package/mobile/lib/content-page-repository/mergePages.js +0 -4
  388. package/mobile/lib/content-page-repository/mergePages.js.map +0 -1
  389. package/mobile/lib/content-page-repository/replaceHeadingTags.d.ts +0 -1
  390. package/mobile/lib/content-page-repository/replaceHeadingTags.js +0 -2
  391. package/mobile/lib/content-page-repository/replaceHeadingTags.js.map +0 -1
  392. package/mobile/lib/content-page-repository/resizeImg.d.ts +0 -3
  393. package/mobile/lib/content-page-repository/resizeImg.js +0 -13
  394. package/mobile/lib/content-page-repository/resizeImg.js.map +0 -1
  395. package/mobile/lib/content-page-repository/transformAttachmentLink.d.ts +0 -3
  396. package/mobile/lib/content-page-repository/transformAttachmentLink.js +0 -34
  397. package/mobile/lib/content-page-repository/transformAttachmentLink.js.map +0 -1
  398. package/mobile/lib/content-page-repository/transformContentPage.d.ts +0 -4
  399. package/mobile/lib/content-page-repository/transformContentPage.js +0 -71
  400. package/mobile/lib/content-page-repository/transformContentPage.js.map +0 -1
  401. package/mobile/lib/content-page-repository/transformDocument.d.ts +0 -3
  402. package/mobile/lib/content-page-repository/transformDocument.js +0 -32
  403. package/mobile/lib/content-page-repository/transformDocument.js.map +0 -1
  404. package/mobile/lib/content-page-repository/transformHTML.d.ts +0 -1
  405. package/mobile/lib/content-page-repository/transformHTML.js +0 -25
  406. package/mobile/lib/content-page-repository/transformHTML.js.map +0 -1
  407. package/mobile/lib/content-page-repository/transformImg.d.ts +0 -12
  408. package/mobile/lib/content-page-repository/transformImg.js +0 -45
  409. package/mobile/lib/content-page-repository/transformImg.js.map +0 -1
  410. package/mobile/lib/content-page-repository/transformMarkdown.d.ts +0 -1
  411. package/mobile/lib/content-page-repository/transformMarkdown.js +0 -12
  412. package/mobile/lib/content-page-repository/transformMarkdown.js.map +0 -1
  413. package/mobile/lib/content-page-repository/transformPicture.d.ts +0 -3
  414. package/mobile/lib/content-page-repository/transformPicture.js +0 -22
  415. package/mobile/lib/content-page-repository/transformPicture.js.map +0 -1
  416. package/mobile/src/components/ContentPage/computeAPIFallback.ts +0 -67
  417. package/mobile/src/components/ContentPage/loadModuleFallback.ts +0 -11
  418. package/mobile/src/components/ContentPage/mapSlot.ts +0 -18
  419. package/mobile/src/components/ContentPage/normalizeBlock.ts +0 -25
  420. package/mobile/src/components/ContentPage/normalizePage.ts +0 -8
  421. package/mobile/src/components/ContentPage/toMobileBlock.ts +0 -11
  422. package/mobile/src/content-page-repository/ContentPageRepository.ts +0 -31
  423. package/mobile/src/content-page-repository/JSONDocContentBox.ts +0 -56
  424. package/mobile/src/content-page-repository/TransformationOptions.ts +0 -4
  425. package/mobile/src/content-page-repository/clearAttachmentHref.ts +0 -3
  426. package/mobile/src/content-page-repository/computeImgOutputPath.ts +0 -21
  427. package/mobile/src/content-page-repository/extensions.ts +0 -17
  428. package/mobile/src/content-page-repository/index.ts +0 -3
  429. package/mobile/src/content-page-repository/mapJSON.ts +0 -30
  430. package/mobile/src/content-page-repository/mergePages.ts +0 -8
  431. package/mobile/src/content-page-repository/replaceHeadingTags.ts +0 -2
  432. package/mobile/src/content-page-repository/resizeImg.ts +0 -17
  433. package/mobile/src/content-page-repository/transformAttachmentLink.ts +0 -46
  434. package/mobile/src/content-page-repository/transformContentPage.ts +0 -102
  435. package/mobile/src/content-page-repository/transformDocument.ts +0 -43
  436. package/mobile/src/content-page-repository/transformHTML.ts +0 -28
  437. package/mobile/src/content-page-repository/transformImg.ts +0 -81
  438. package/mobile/src/content-page-repository/transformMarkdown.ts +0 -14
  439. package/mobile/src/content-page-repository/transformPicture.ts +0 -35
  440. package/src/components/ContentPage/computeAPIFallback.ts +0 -67
  441. package/src/components/ContentPage/loadModuleFallback.ts +0 -11
  442. package/src/components/ContentPage/mapSlot.ts +0 -18
  443. package/src/components/ContentPage/normalizeBlock.mobile.ts +0 -25
  444. package/src/components/ContentPage/normalizeBlock.ts +0 -21
  445. package/src/components/ContentPage/normalizePage.ts +0 -8
  446. package/src/components/ContentPage/toMobileBlock.ts +0 -11
  447. package/src/content-page-repository/ContentPageRepository.ts +0 -31
  448. package/src/content-page-repository/JSONDocContentBox.ts +0 -56
  449. package/src/content-page-repository/TransformationOptions.ts +0 -4
  450. package/src/content-page-repository/clearAttachmentHref.ts +0 -3
  451. package/src/content-page-repository/computeImgOutputPath.ts +0 -21
  452. package/src/content-page-repository/extensions.ts +0 -17
  453. package/src/content-page-repository/index.ts +0 -3
  454. package/src/content-page-repository/mapJSON.ts +0 -30
  455. package/src/content-page-repository/mergePages.ts +0 -8
  456. package/src/content-page-repository/replaceHeadingTags.ts +0 -2
  457. package/src/content-page-repository/resizeImg.ts +0 -17
  458. package/src/content-page-repository/transformAttachmentLink.ts +0 -46
  459. package/src/content-page-repository/transformContentPage.ts +0 -102
  460. package/src/content-page-repository/transformDocument.ts +0 -43
  461. package/src/content-page-repository/transformHTML.ts +0 -28
  462. package/src/content-page-repository/transformImg.ts +0 -81
  463. package/src/content-page-repository/transformMarkdown.ts +0 -14
  464. package/src/content-page-repository/transformPicture.ts +0 -35
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformHTML.js","sourceRoot":"","sources":["../../src/content-page-repository/transformHTML.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,cAAc,EAAE,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,eAAe,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAA+B;IACjE,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,EAAE,CAAC;KACX;IAED,MAAM,cAAc,GAAG;QACrB,GAAG,aAAa;QAChB,SAAS,EAAE;YACT,GAAG,aAAa,CAAC,SAAS;YAC1B,IAAI,EAAE,CAAC,GAAG,CAAC,aAAa,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC;YACxD,GAAG,EAAE,CAAC,GAAG,CAAC,aAAa,CAAC,SAAS,EAAE,GAAG,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC;SACvD;KACF,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,OAAO,EAAE;SAC3B,GAAG,CAAC,WAAW,CAAC;SAChB,GAAG,CAAC,cAAc,EAAE,cAAc,CAAC;SACnC,GAAG,CAAC,eAAe,CAAC;SACpB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB,OAAO,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AACtD,CAAC"}
@@ -1,12 +0,0 @@
1
- import { type ImageSize } from '../model/ImageSize';
2
- import { type ImgSource } from '../model/Picture';
3
- import { type TransformationOptions } from './TransformationOptions';
4
- declare type ImgOutputPath = string;
5
- declare type TransformationTaskKey = ImgOutputPath;
6
- declare type TransformationTasksCache = Map<TransformationTaskKey, Promise<ImgOutputPath>>;
7
- declare type TransformImgOptions = TransformationOptions & ImgSource & {
8
- containerSize?: ImageSize;
9
- cache?: TransformationTasksCache;
10
- };
11
- export declare function transformImg(src: string, pagePath: string, options: TransformImgOptions): ImgOutputPath | Promise<ImgOutputPath>;
12
- export {};
@@ -1,45 +0,0 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
- import sharp from 'sharp';
4
- import util from 'util';
5
- import { isPictureSizeEmpty } from '../utils/isPictureSizeEmpty.js';
6
- import { computeImgOutputPath } from './computeImgOutputPath.js';
7
- import { resizeImg } from './resizeImg.js';
8
- const mkdir = util.promisify(fs.mkdir);
9
- const copyFile = util.promisify(fs.copyFile);
10
- const defaultTransformationCache = new Map();
11
- const isNilTransform = ({ size, containerSize, format }) => isPictureSizeEmpty(size) && isPictureSizeEmpty(containerSize) && !format;
12
- const isVectorInput = (input) => ['.svg', '.eps', '.epsf', '.epsi', '.pdf'].some((ext) => input.toLowerCase().endsWith(ext));
13
- export function transformImg(src, pagePath, options) {
14
- if (!src) {
15
- return src;
16
- }
17
- const withoutTransform = isNilTransform(options) || isVectorInput(src);
18
- const output = computeImgOutputPath(src, options, withoutTransform);
19
- const { cache = defaultTransformationCache } = options;
20
- const cachedResult = cache.get(output);
21
- if (cachedResult) {
22
- return cachedResult;
23
- }
24
- const result = (async () => {
25
- try {
26
- await mkdir(path.dirname(output), { recursive: true });
27
- if (withoutTransform) {
28
- await copyFile(src, output);
29
- }
30
- else {
31
- const chain = await computeTransformationChain(options)(sharp(src));
32
- await chain.toFile(output);
33
- }
34
- }
35
- catch (e) {
36
- console.info(`No "${src}" attachment found on page: "${pagePath}"`);
37
- }
38
- return output;
39
- })();
40
- cache.set(output, result);
41
- return result;
42
- }
43
- const computeTransformationChain = ({ size, containerSize, format, options, }) => pipe(resizeImg(isPictureSizeEmpty(size) ? containerSize : size), (_) => format ? _.toFormat(format, { ...options, lossless: true }) : _);
44
- const pipe = (...operations) => operations.reduce((a, b) => async (chain) => b(await a(chain)));
45
- //# sourceMappingURL=transformImg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformImg.js","sourceRoot":"","sources":["../../src/content-page-repository/transformImg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;AAS7C,MAAM,0BAA0B,GAA6B,IAAI,GAAG,EAAE,CAAC;AAEvE,MAAM,cAAc,GAAG,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAuB,EAAE,EAAE,CAC9E,kBAAkB,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC;AAE3E,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,EAAE,CACtC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAE9F,MAAM,UAAU,YAAY,CAC1B,GAAW,EACX,QAAgB,EAChB,OAA4B;IAE5B,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,GAAG,CAAC;KACZ;IAED,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC;IAEvE,MAAM,MAAM,GAAG,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAEpE,MAAM,EAAE,KAAK,GAAG,0BAA0B,EAAE,GAAG,OAAO,CAAC;IAEvD,MAAM,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,YAAY,EAAE;QAChB,OAAO,YAAY,CAAC;KACrB;IAED,MAAM,MAAM,GAAG,CAAC,KAAK,IAAI,EAAE;QACzB,IAAI;YACF,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACvD,IAAI,gBAAgB,EAAE;gBACpB,MAAM,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC7B;iBAAM;gBACL,MAAM,KAAK,GAAG,MAAM,0BAA0B,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;gBACpE,MAAM,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;aAC5B;SACF;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,gCAAgC,QAAQ,GAAG,CAAC,CAAC;SACrE;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,EAAE,CAAC;IACL,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE1B,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,0BAA0B,GAAG,CAAC,EAClC,IAAI,EACJ,aAAa,EACb,MAAM,EACN,OAAO,GACa,EAAE,EAAE,CACxB,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CACrE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAChE,CAAC;AAEJ,MAAM,IAAI,GAAG,CAAC,GAAG,UAA2D,EAAE,EAAE,CAC9E,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,KAAY,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export declare function transformMarkdown(markdown: string | null | undefined): Promise<string>;
@@ -1,12 +0,0 @@
1
- import remarkHtml from 'remark-html';
2
- import remarkParse from 'remark-parse';
3
- import { unified } from 'unified';
4
- import { replaceHeadingTags } from './replaceHeadingTags.js';
5
- export async function transformMarkdown(markdown) {
6
- if (!markdown) {
7
- return '';
8
- }
9
- const result = await unified().use(remarkParse).use(remarkHtml).process(markdown);
10
- return replaceHeadingTags(result.toString('utf-8'));
11
- }
12
- //# sourceMappingURL=transformMarkdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformMarkdown.js","sourceRoot":"","sources":["../../src/content-page-repository/transformMarkdown.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,QAAmC;IACzE,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,EAAE,CAAC;KACX;IAED,MAAM,MAAM,GAAG,MAAM,OAAO,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAElF,OAAO,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AACtD,CAAC"}
@@ -1,3 +0,0 @@
1
- import { type Picture } from '../model/Picture';
2
- import { type TransformationOptions } from './TransformationOptions';
3
- export declare function transformPicture(picture: Picture, pagePath: string, options: TransformationOptions): Promise<Picture>;
@@ -1,22 +0,0 @@
1
- import path from 'path';
2
- import sharp from 'sharp';
3
- import { transformImg } from './transformImg.js';
4
- export async function transformPicture(picture, pagePath, options) {
5
- const src = picture?.src || '';
6
- const transformedImgPath = await transformImg(src, pagePath, { ...options, ...picture });
7
- const { width, height } = await sharp(transformedImgPath).metadata();
8
- const containerSize = width && height ? { width, height } : undefined;
9
- const sources = picture.sources || [];
10
- const transformedSources = await Promise.all(sources.map((_) => transformImg(src, pagePath, { ...options, ..._, containerSize })));
11
- const imgPathToSrc = (_) => path.join('/', path.relative(options.publicDir, _));
12
- return {
13
- ...picture,
14
- src: imgPathToSrc(transformedImgPath),
15
- sources: transformedSources.map((_, i) => ({
16
- ...sources[i],
17
- src: imgPathToSrc(_),
18
- size: { width, height },
19
- })),
20
- };
21
- }
22
- //# sourceMappingURL=transformPicture.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformPicture.js","sourceRoot":"","sources":["../../src/content-page-repository/transformPicture.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,OAAgB,EAChB,QAAgB,EAChB,OAA8B;IAE9B,MAAM,GAAG,GAAG,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IAE/B,MAAM,kBAAkB,GAAG,MAAM,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAEzF,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,KAAK,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE,CAAC;IACrE,MAAM,aAAa,GAAG,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAEtE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;IACtC,MAAM,kBAAkB,GAAG,MAAM,OAAO,CAAC,GAAG,CAC1C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CACrF,CAAC;IAEF,MAAM,YAAY,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IAExF,OAAO;QACL,GAAG,OAAO;QACV,GAAG,EAAE,YAAY,CAAC,kBAAkB,CAAC;QACrC,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YACzC,GAAG,OAAO,CAAC,CAAC,CAAC;YACb,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC;YACpB,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;SACxB,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC"}
@@ -1,4 +0,0 @@
1
- import { type BlocksRegistry } from '../../model/BlocksRegistry';
2
- import { type ContentPageDef } from '../../model/ContentPageDef';
3
- import { type Fallback } from '../../model/Fallback';
4
- export declare const computeAPIFallback: (blocksRegistry: BlocksRegistry, contentPageData: ContentPageDef) => Promise<Fallback>;
@@ -1,2 +0,0 @@
1
- import { type FallbackMap } from '../../model/Fallback';
2
- export declare const loadModuleFallback: (blockName: string) => Promise<FallbackMap | undefined>;
@@ -1,2 +0,0 @@
1
- import { type BlockDef, type Slot } from '../../model/ContentPageDef';
2
- export declare const mapSlot: (mapper: (blocks?: BlockDef[]) => BlockDef[]) => <S extends Slot>(slot: S) => S;
@@ -1,3 +0,0 @@
1
- import { type BlocksRegistry } from '../../model/BlocksRegistry';
2
- import { type Slot } from '../../model/ContentPageDef';
3
- export declare function normalizeBlock<S extends Slot>(block?: S, blocksRegistry?: BlocksRegistry): S;
@@ -1,3 +0,0 @@
1
- import { type BlocksRegistry } from '../../model/BlocksRegistry';
2
- import { type ContentPageDef } from '../../model/ContentPageDef';
3
- export declare const normalizePage: (blocksRegistry: BlocksRegistry) => (contentPage: ContentPageDef | undefined | null) => ContentPageDef;
@@ -1,2 +0,0 @@
1
- import { type BlockDef } from '../../model/ContentPageDef';
2
- export declare function toMobileBlock(block?: BlockDef): BlockDef;
@@ -1,10 +0,0 @@
1
- import { type ContentPageDef } from '../model/ContentPageDef';
2
- import { type TransformationOptions } from './TransformationOptions';
3
- export declare class ContentPageRepository {
4
- private readonly options;
5
- static readonly inst: ContentPageRepository;
6
- constructor(options?: TransformationOptions);
7
- listAllContentPages(): Promise<string[]>;
8
- readPage(filePath: string): Promise<ContentPageDef>;
9
- generatePage(filePath: string): Promise<ContentPageDef>;
10
- }
@@ -1,8 +0,0 @@
1
- import { JSONBoxDefault, type JSONBox, type JSONNode } from '@redneckz/json-op';
2
- import { type JSONPathElement } from '@redneckz/json-op/lib/JSONPath';
3
- export declare class JSONDocContentBox extends JSONBoxDefault {
4
- size(): number;
5
- entries(): Array<[p: JSONPathElement, child: JSONBox]>;
6
- get(p?: JSONPathElement): JSONBox;
7
- set(p: JSONPathElement | undefined, child: JSONNode): JSONBox;
8
- }
@@ -1,4 +0,0 @@
1
- export interface TransformationOptions {
2
- contentDir: string;
3
- publicDir: string;
4
- }
@@ -1,2 +0,0 @@
1
- export declare const ATTACHMENT_PREFIX = "file://";
2
- export declare const clearAttachmentHref: (href: string) => string;
@@ -1,3 +0,0 @@
1
- import { type ImgSource } from '../model/Picture';
2
- import { type TransformationOptions } from './TransformationOptions';
3
- export declare function computeImgOutputPath(imgInputPath: string, { contentDir, publicDir, format, size }: TransformationOptions & ImgSource, withoutTransform?: boolean): string;
@@ -1,3 +0,0 @@
1
- export declare const OUTPUT_SUFFIX = ".static";
2
- export declare const DOCUMENT_EXT_LIST: string[];
3
- export declare const IMAGE_EXT_LIST: string[];
@@ -1,3 +0,0 @@
1
- export { clearAttachmentHref } from './clearAttachmentHref';
2
- export { ContentPageRepository } from './ContentPageRepository';
3
- export { transformContentPage } from './transformContentPage';
@@ -1 +0,0 @@
1
- export declare function mapJSON<T>(data: T, mapper: <In, Out = In>(value: In, key: string[]) => Promise<Out>, keyParts?: string[]): Promise<T>;
@@ -1,2 +0,0 @@
1
- import { type JSONRecord } from '@redneckz/json-op';
2
- export declare const mergePages: (page: JSONRecord, diffs: JSONRecord) => JSONRecord;
@@ -1 +0,0 @@
1
- export declare const replaceHeadingTags: (html: string) => string;
@@ -1,3 +0,0 @@
1
- import { type ResizeOptions, type Sharp } from 'sharp';
2
- import { type ImageSize } from '../model/ImageSize';
3
- export declare const resizeImg: (size?: Partial<ImageSize>, options?: ResizeOptions) => (chain: Sharp) => Sharp;
@@ -1,3 +0,0 @@
1
- import { type LinkProps } from '../model/LinkProps';
2
- import { type TransformationOptions } from './TransformationOptions';
3
- export declare function transformAttachmentLink(link: LinkProps, pagePath: string, options: TransformationOptions): Promise<LinkProps>;
@@ -1,4 +0,0 @@
1
- import { type ContentPageDef } from '../model/ContentPageDef';
2
- import { type TransformationOptions } from './TransformationOptions';
3
- export declare function transformContentPage(pagePath: string, options: TransformationOptions): Promise<ContentPageDef>;
4
- export declare const generatedPagePath: (pagePath: string) => string;
@@ -1,3 +0,0 @@
1
- import { type Attachment } from '../model/Attachment';
2
- import { type TransformationOptions } from './TransformationOptions';
3
- export declare function transformDocument(attachment: Attachment, pagePath: string, options: TransformationOptions): Promise<Attachment>;
@@ -1 +0,0 @@
1
- export declare function transformHTML(html: string | null | undefined): Promise<string>;
@@ -1,12 +0,0 @@
1
- import { type ImageSize } from '../model/ImageSize';
2
- import { type ImgSource } from '../model/Picture';
3
- import { type TransformationOptions } from './TransformationOptions';
4
- declare type ImgOutputPath = string;
5
- declare type TransformationTaskKey = ImgOutputPath;
6
- declare type TransformationTasksCache = Map<TransformationTaskKey, Promise<ImgOutputPath>>;
7
- declare type TransformImgOptions = TransformationOptions & ImgSource & {
8
- containerSize?: ImageSize;
9
- cache?: TransformationTasksCache;
10
- };
11
- export declare function transformImg(src: string, pagePath: string, options: TransformImgOptions): ImgOutputPath | Promise<ImgOutputPath>;
12
- export {};
@@ -1 +0,0 @@
1
- export declare function transformMarkdown(markdown: string | null | undefined): Promise<string>;
@@ -1,3 +0,0 @@
1
- import { type Picture } from '../model/Picture';
2
- import { type TransformationOptions } from './TransformationOptions';
3
- export declare function transformPicture(picture: Picture, pagePath: string, options: TransformationOptions): Promise<Picture>;
@@ -1,4 +0,0 @@
1
- import { type BlocksRegistry } from '../../model/BlocksRegistry';
2
- import { type ContentPageDef } from '../../model/ContentPageDef';
3
- import { type Fallback } from '../../model/Fallback';
4
- export declare const computeAPIFallback: (blocksRegistry: BlocksRegistry, contentPageData: ContentPageDef) => Promise<Fallback>;
@@ -1,36 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.computeAPIFallback = void 0;
3
- const json_ref_1 = require("@redneckz/json-ref");
4
- const ContentPageRepository_1 = require("../../content-page-repository/ContentPageRepository");
5
- const unique_1 = require("../../utils/unique");
6
- const url_1 = require("../../utils/url");
7
- const loadModuleFallback_1 = require("./loadModuleFallback");
8
- const BASE_DIR = 'content';
9
- const computeAPIFallback = async (blocksRegistry, contentPageData) => {
10
- return Object.fromEntries((await Promise.all([
11
- computeFallbackFromModules(blocksRegistry),
12
- computeFallbackFromContentRefs(contentPageData),
13
- ]))
14
- .flatMap((_) => _)
15
- .filter(([key, data]) => key && data));
16
- };
17
- exports.computeAPIFallback = computeAPIFallback;
18
- const computeFallbackFromModules = async (blocksRegistry) => {
19
- const fallbackMap = (await Promise.all(Object.keys(blocksRegistry).map(loadModuleFallback_1.loadModuleFallback)))
20
- .filter((_) => Boolean(_))
21
- .reduce((acc, _) => ({ ...acc, ..._ }), {});
22
- return (await Promise.allSettled(Object.entries(fallbackMap).map(async ([key, fetcher]) => [key, await fetcher()])))
23
- .filter((_) => _.status === 'fulfilled')
24
- .map(({ value }) => value);
25
- };
26
- const computeFallbackFromContentRefs = async (contentPageData) => {
27
- const refs = (0, unique_1.unique)((0, json_ref_1.collectRef)(contentPageData));
28
- return (await Promise.allSettled(refs.map(async (_) => [
29
- _,
30
- (await ContentPageRepository_1.ContentPageRepository.inst.generatePage((0, url_1.joinPath)(BASE_DIR, _))),
31
- ])))
32
- .filter((_) => _.status === 'fulfilled')
33
- .map(({ value }) => value)
34
- .map(([ref, data]) => [ref, (0, json_ref_1.resolveJPointer)(data, ref)]);
35
- };
36
- //# sourceMappingURL=computeAPIFallback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"computeAPIFallback.js","sourceRoot":"","sources":["../../../src/components/ContentPage/computeAPIFallback.ts"],"names":[],"mappings":";;AACA,iDAAiE;AACjE,+FAA4F;AAI5F,+CAA4C;AAC5C,yCAA2C;AAC3C,6DAA0D;AAI1D,MAAM,QAAQ,GAAG,SAAS,CAAC;AAEpB,MAAM,kBAAkB,GAAG,KAAK,EACrC,cAA8B,EAC9B,eAA+B,EACZ,EAAE;IACrB,OAAO,MAAM,CAAC,WAAW,CACvB,CACE,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,0BAA0B,CAAC,cAAc,CAAC;QAC1C,8BAA8B,CAAC,eAAe,CAAC;KAChD,CAAC,CACH;SACE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;SACjB,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC,CACxC,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,kBAAkB,sBAc7B;AAEF,MAAM,0BAA0B,GAAG,KAAK,EACtC,cAA8B,EACJ,EAAE;IAC5B,MAAM,WAAW,GAAgB,CAC/B,MAAM,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,uCAAkB,CAAC,CAAC,CACvE;SACE,MAAM,CAAC,CAAC,CAAC,EAAoB,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;SAC3C,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAE9C,OAAO,CACL,MAAM,OAAO,CAAC,UAAU,CACtB,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,GAAG,CAC7B,KAAK,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,EAA0B,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,OAAO,EAAE,CAAC,CACzE,CACF,CACF;SACE,MAAM,CAAC,CAAC,CAAC,EAA8C,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC;SACnF,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,8BAA8B,GAAG,KAAK,EAC1C,eAA+B,EACL,EAAE;IAC5B,MAAM,IAAI,GAAG,IAAA,eAAM,EAAC,IAAA,qBAAU,EAAC,eAA2B,CAAC,CAAC,CAAC;IAE7D,OAAO,CACL,MAAM,OAAO,CAAC,UAAU,CACtB,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QACpB,CAAC;QACD,CAAC,MAAM,6CAAqB,CAAC,IAAI,CAAC,YAAY,CAAC,IAAA,cAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAa;KACnF,CAAC,CACH,CACF;SACE,MAAM,CAAC,CAAC,CAAC,EAA8C,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC;SACnF,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC;SACzB,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,IAAA,0BAAe,EAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAC7D,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- import { type FallbackMap } from '../../model/Fallback';
2
- export declare const loadModuleFallback: (blockName: string) => Promise<FallbackMap | undefined>;
@@ -1,36 +0,0 @@
1
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2
- if (k2 === undefined) k2 = k;
3
- var desc = Object.getOwnPropertyDescriptor(m, k);
4
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
5
- desc = { enumerable: true, get: function() { return m[k]; } };
6
- }
7
- Object.defineProperty(o, k2, desc);
8
- }) : (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- o[k2] = m[k];
11
- }));
12
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
13
- Object.defineProperty(o, "default", { enumerable: true, value: v });
14
- }) : function(o, v) {
15
- o["default"] = v;
16
- });
17
- var __importStar = (this && this.__importStar) || function (mod) {
18
- if (mod && mod.__esModule) return mod;
19
- var result = {};
20
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
21
- __setModuleDefault(result, mod);
22
- return result;
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.loadModuleFallback = void 0;
26
- const loadModuleFallback = async (blockName) => {
27
- try {
28
- const blockFallback = await Promise.resolve().then(() => __importStar(require(`../${blockName}/${blockName}.fallback`)));
29
- return blockFallback?.fallback ? await blockFallback.fallback() : undefined;
30
- }
31
- catch (error) {
32
- return undefined;
33
- }
34
- };
35
- exports.loadModuleFallback = loadModuleFallback;
36
- //# sourceMappingURL=loadModuleFallback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loadModuleFallback.js","sourceRoot":"","sources":["../../../src/components/ContentPage/loadModuleFallback.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,kBAAkB,GAAG,KAAK,EAAE,SAAiB,EAAoC,EAAE;IAC9F,IAAI;QACF,MAAM,aAAa,GAAG,wDAAa,MAAM,SAAS,IAAI,SAAS,WAAW,GAAC,CAAC;QAE5E,OAAO,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KAC7E;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,SAAS,CAAC;KAClB;AACH,CAAC,CAAC;AARW,QAAA,kBAAkB,sBAQ7B"}
@@ -1,2 +0,0 @@
1
- import { type BlockDef, type Slot } from '../../model/ContentPageDef';
2
- export declare const mapSlot: (mapper: (blocks?: BlockDef[]) => BlockDef[]) => <S extends Slot>(slot: S) => S;
@@ -1,16 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.mapSlot = void 0;
3
- const mapSlot = (mapper) => (slot) => ({
4
- ...slot,
5
- ...(slot.blocks ? { blocks: mapper(slot.blocks) } : {}),
6
- ...(slot.slots
7
- ? {
8
- slots: Object.fromEntries(Object.entries(slot.slots).map(([slotKey, slotBlocks]) => [
9
- slotKey,
10
- mapper(slotBlocks),
11
- ])),
12
- }
13
- : {}),
14
- });
15
- exports.mapSlot = mapSlot;
16
- //# sourceMappingURL=mapSlot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapSlot.js","sourceRoot":"","sources":["../../../src/components/ContentPage/mapSlot.ts"],"names":[],"mappings":";;AAEO,MAAM,OAAO,GAClB,CAAC,MAA2C,EAAE,EAAE,CAChD,CAAiB,IAAO,EAAK,EAAE,CAAC,CAAC;IAC/B,GAAG,IAAI;IACP,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACvD,GAAG,CAAC,IAAI,CAAC,KAAK;QACZ,CAAC,CAAC;YACE,KAAK,EAAE,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC;gBACxD,OAAO;gBACP,MAAM,CAAC,UAAU,CAAC;aACnB,CAAC,CACH;SACF;QACH,CAAC,CAAC,EAAE,CAAC;CACR,CAAC,CAAC;AAfQ,QAAA,OAAO,WAef"}
@@ -1,3 +0,0 @@
1
- import { type BlocksRegistry } from '../../model/BlocksRegistry';
2
- import { type Slot } from '../../model/ContentPageDef';
3
- export declare function normalizeBlock<S extends Slot>(block?: S, blocksRegistry?: BlocksRegistry): S;
@@ -1,18 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.normalizeBlock = void 0;
3
- const mapSlot_1 = require("./mapSlot");
4
- const toMobileBlock_1 = require("./toMobileBlock");
5
- function normalizeBlock(block, blocksRegistry) {
6
- const { mobile } = (block || {});
7
- return (0, mapSlot_1.mapSlot)(filterBlocks(blocksRegistry))((mobile ? (0, toMobileBlock_1.toMobileBlock)(block) : block) || {});
8
- }
9
- exports.normalizeBlock = normalizeBlock;
10
- const filterBlocks = (blocksRegistry) => (blocks) => blocks
11
- ? blocks
12
- ?.filter((block) => blocksRegistry &&
13
- (block?.type || block?.mobile?.type || '') in blocksRegistry &&
14
- !block.mobile?.hidden &&
15
- !block?.hidden)
16
- .map((block) => normalizeBlock(block, blocksRegistry))
17
- : [];
18
- //# sourceMappingURL=normalizeBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizeBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizeBlock.ts"],"names":[],"mappings":";;AAEA,uCAAoC;AACpC,mDAAgD;AAEhD,SAAgB,cAAc,CAAiB,KAAS,EAAE,cAA+B;IACvF,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAAa,CAAC;IAE7C,OAAO,IAAA,iBAAO,EAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,6BAAa,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAM,CAAC;AACnG,CAAC;AAJD,wCAIC;AAED,MAAM,YAAY,GAChB,CAAC,cAA+B,EAAE,EAAE,CACpC,CAAC,MAAmB,EAAc,EAAE,CAClC,MAAM;IACJ,CAAC,CAAC,MAAM;QACJ,EAAE,MAAM,CACN,CAAC,KAAK,EAAE,EAAE,CACR,cAAc;QACd,CAAC,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,cAAc;QAC5D,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM;QACrB,CAAC,KAAK,EAAE,MAAM,CACjB;SACA,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IAC1D,CAAC,CAAC,EAAE,CAAC"}
@@ -1,3 +0,0 @@
1
- import { type BlocksRegistry } from '../../model/BlocksRegistry';
2
- import { type ContentPageDef } from '../../model/ContentPageDef';
3
- export declare const normalizePage: (blocksRegistry: BlocksRegistry) => (contentPage: ContentPageDef | undefined | null) => ContentPageDef;
@@ -1,6 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.normalizePage = void 0;
3
- const normalizeBlock_1 = require("./normalizeBlock");
4
- const normalizePage = (blocksRegistry) => (contentPage) => contentPage ? (0, normalizeBlock_1.normalizeBlock)(contentPage, blocksRegistry) : {};
5
- exports.normalizePage = normalizePage;
6
- //# sourceMappingURL=normalizePage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizePage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizePage.ts"],"names":[],"mappings":";;AAEA,qDAAkD;AAE3C,MAAM,aAAa,GACxB,CAAC,cAA8B,EAAE,EAAE,CACnC,CAAC,WAA8C,EAAkB,EAAE,CACjE,WAAW,CAAC,CAAC,CAAC,IAAA,+BAAc,EAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAHtD,QAAA,aAAa,iBAGyC"}
@@ -1,2 +0,0 @@
1
- import { type BlockDef } from '../../model/ContentPageDef';
2
- export declare function toMobileBlock(block?: BlockDef): BlockDef;
@@ -1,12 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.toMobileBlock = void 0;
3
- function toMobileBlock(block = {}) {
4
- const { mobile, ...desktop } = block;
5
- return {
6
- ...desktop,
7
- ...(mobile?.style ? { style: mobile.style } : {}),
8
- ...(mobile?.content ? { content: mobile.content } : {}),
9
- };
10
- }
11
- exports.toMobileBlock = toMobileBlock;
12
- //# sourceMappingURL=toMobileBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toMobileBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/toMobileBlock.ts"],"names":[],"mappings":";;AAEA,SAAgB,aAAa,CAAC,QAAkB,EAAE;IAChD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,GAAG,KAAK,CAAC;IAErC,OAAO;QACL,GAAG,OAAO;QACV,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxD,CAAC;AACJ,CAAC;AARD,sCAQC"}
@@ -1,10 +0,0 @@
1
- import { type ContentPageDef } from '../model/ContentPageDef';
2
- import { type TransformationOptions } from './TransformationOptions';
3
- export declare class ContentPageRepository {
4
- private readonly options;
5
- static readonly inst: ContentPageRepository;
6
- constructor(options?: TransformationOptions);
7
- listAllContentPages(): Promise<string[]>;
8
- readPage(filePath: string): Promise<ContentPageDef>;
9
- generatePage(filePath: string): Promise<ContentPageDef>;
10
- }
@@ -1,31 +0,0 @@
1
- var __importDefault = (this && this.__importDefault) || function (mod) {
2
- return (mod && mod.__esModule) ? mod : { "default": mod };
3
- };
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.ContentPageRepository = void 0;
6
- const fs_1 = __importDefault(require("fs"));
7
- const glob_1 = require("glob");
8
- const util_1 = __importDefault(require("util"));
9
- const transformContentPage_1 = require("./transformContentPage");
10
- const readFile = util_1.default.promisify(fs_1.default.readFile);
11
- class ContentPageRepository {
12
- options;
13
- static inst = new ContentPageRepository();
14
- constructor(options = {
15
- contentDir: 'content',
16
- publicDir: 'public',
17
- }) {
18
- this.options = options;
19
- }
20
- listAllContentPages() {
21
- return (0, glob_1.glob)(`${this.options.contentDir}/**/*.page.json`, { posix: true });
22
- }
23
- async readPage(filePath) {
24
- return JSON.parse(await readFile((0, transformContentPage_1.generatedPagePath)(filePath), 'utf-8'));
25
- }
26
- generatePage(filePath) {
27
- return (0, transformContentPage_1.transformContentPage)(filePath, this.options);
28
- }
29
- }
30
- exports.ContentPageRepository = ContentPageRepository;
31
- //# sourceMappingURL=ContentPageRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentPageRepository.js","sourceRoot":"","sources":["../../src/content-page-repository/ContentPageRepository.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,+BAA4B;AAC5B,gDAAwB;AAGxB,iEAAiF;AAEjF,MAAM,QAAQ,GAAG,cAAI,CAAC,SAAS,CAAC,YAAE,CAAC,QAAQ,CAAC,CAAC;AAE7C,MAAa,qBAAqB;IAIb;IAHZ,MAAM,CAAU,IAAI,GAAG,IAAI,qBAAqB,EAAE,CAAC;IAE1D,YACmB,UAAiC;QAChD,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,QAAQ;KACpB;QAHgB,YAAO,GAAP,OAAO,CAGvB;IACA,CAAC;IAEJ,mBAAmB;QACjB,OAAO,IAAA,WAAI,EAAC,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,iBAAiB,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,QAAgB;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,IAAA,wCAAiB,EAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED,YAAY,CAAC,QAAgB;QAC3B,OAAO,IAAA,2CAAoB,EAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;;AApBH,sDAqBC"}
@@ -1,8 +0,0 @@
1
- import { JSONBoxDefault, type JSONBox, type JSONNode } from '@redneckz/json-op';
2
- import { type JSONPathElement } from '@redneckz/json-op/lib/JSONPath';
3
- export declare class JSONDocContentBox extends JSONBoxDefault {
4
- size(): number;
5
- entries(): Array<[p: JSONPathElement, child: JSONBox]>;
6
- get(p?: JSONPathElement): JSONBox;
7
- set(p: JSONPathElement | undefined, child: JSONNode): JSONBox;
8
- }
@@ -1,39 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.JSONDocContentBox = void 0;
3
- const json_op_1 = require("@redneckz/json-op");
4
- const isAtomicArray = (node) => (0, json_op_1.isJSONArray)(node) && !node.some(nodeId);
5
- const ID_PREFIX = 'id:';
6
- const nodeId = (node) => (0, json_op_1.isJSONRecord)(node) && '__id' in node ? node.__id : undefined;
7
- const keyToId = (p) => typeof p === 'string' && p.startsWith(ID_PREFIX) ? p.substring(ID_PREFIX.length) : undefined;
8
- const findIndexById = (_, id) => id && (0, json_op_1.isJSONArray)(_) ? _.findIndex((node) => id === nodeId(node)) : -1;
9
- class JSONDocContentBox extends json_op_1.JSONBoxDefault {
10
- size() {
11
- return isAtomicArray(this._) ? 0 : super.size();
12
- }
13
- entries() {
14
- if (isAtomicArray(this._)) {
15
- return [];
16
- }
17
- else if ((0, json_op_1.isJSONArray)(this._)) {
18
- return this._.map((node, i) => [
19
- nodeId(node) ? `${ID_PREFIX}${nodeId(node)}` : i,
20
- new JSONDocContentBox(node),
21
- ]);
22
- }
23
- else {
24
- return super.entries();
25
- }
26
- }
27
- get(p) {
28
- const id = keyToId(p);
29
- return super.get(id ? findIndexById(this._, id) : p);
30
- }
31
- set(p, child) {
32
- const id = keyToId(p);
33
- const index = findIndexById(this._, id);
34
- const adjustedIndex = index >= 0 ? index : this.size();
35
- return super.set(id ? adjustedIndex : p, id ? { ...child, __id: id } : child);
36
- }
37
- }
38
- exports.JSONDocContentBox = JSONDocContentBox;
39
- //# sourceMappingURL=JSONDocContentBox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JSONDocContentBox.js","sourceRoot":"","sources":["../../src/content-page-repository/JSONDocContentBox.ts"],"names":[],"mappings":";;AAAA,+CAO2B;AAG3B,MAAM,aAAa,GAAG,CAAC,IAA0B,EAAW,EAAE,CAC5D,IAAA,qBAAW,EAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAE1C,MAAM,SAAS,GAAG,KAAK,CAAC;AAExB,MAAM,MAAM,GAAG,CAAC,IAA0B,EAAsB,EAAE,CAChE,IAAA,sBAAY,EAAC,IAAI,CAAC,IAAI,MAAM,IAAI,IAAI,CAAC,CAAC,CAAE,IAAI,CAAC,IAAe,CAAC,CAAC,CAAC,SAAS,CAAC;AAE3E,MAAM,OAAO,GAAG,CAAC,CAA8B,EAAsB,EAAE,CACrE,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAE/F,MAAM,aAAa,GAAG,CAAC,CAAuB,EAAE,EAAsB,EAAe,EAAE,CACrF,EAAE,IAAI,IAAA,qBAAW,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzE,MAAa,iBAAkB,SAAQ,wBAAc;IACnD,IAAI;QACF,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAClD,CAAC;IAED,OAAO;QACL,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;YACzB,OAAO,EAAE,CAAC;SACX;aAAM,IAAI,IAAA,qBAAW,EAAC,IAAI,CAAC,CAAC,CAAC,EAAE;YAC9B,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC7B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;gBAChD,IAAI,iBAAiB,CAAC,IAAI,CAAC;aAC5B,CAAC,CAAC;SACJ;aAAM;YACL,OAAO,KAAK,CAAC,OAAO,EAAE,CAAC;SACxB;IACH,CAAC;IAED,GAAG,CAAC,CAAmB;QACrB,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QAEtB,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,CAAC;IAED,GAAG,CAAC,CAA8B,EAAE,KAAe;QACjD,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACtB,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACxC,MAAM,aAAa,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAEvD,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAI,KAAoB,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAChG,CAAC;CACF;AA/BD,8CA+BC"}
@@ -1,4 +0,0 @@
1
- export interface TransformationOptions {
2
- contentDir: string;
3
- publicDir: string;
4
- }
@@ -1,2 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- //# sourceMappingURL=TransformationOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TransformationOptions.js","sourceRoot":"","sources":["../../src/content-page-repository/TransformationOptions.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export declare const ATTACHMENT_PREFIX = "file://";
2
- export declare const clearAttachmentHref: (href: string) => string;
@@ -1,6 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.clearAttachmentHref = exports.ATTACHMENT_PREFIX = void 0;
3
- exports.ATTACHMENT_PREFIX = 'file://';
4
- const clearAttachmentHref = (href) => href.replace(exports.ATTACHMENT_PREFIX, '');
5
- exports.clearAttachmentHref = clearAttachmentHref;
6
- //# sourceMappingURL=clearAttachmentHref.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clearAttachmentHref.js","sourceRoot":"","sources":["../../src/content-page-repository/clearAttachmentHref.ts"],"names":[],"mappings":";;AAAa,QAAA,iBAAiB,GAAG,SAAS,CAAC;AAEpC,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,yBAAiB,EAAE,EAAE,CAAC,CAAC;AAApF,QAAA,mBAAmB,uBAAiE"}
@@ -1,3 +0,0 @@
1
- import { type ImgSource } from '../model/Picture';
2
- import { type TransformationOptions } from './TransformationOptions';
3
- export declare function computeImgOutputPath(imgInputPath: string, { contentDir, publicDir, format, size }: TransformationOptions & ImgSource, withoutTransform?: boolean): string;