@redneckz/wildless-cms-uni-blocks 0.14.830 → 0.14.832

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 (521) hide show
  1. package/bundle/bundle.umd.js +60 -26
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/GalleryLayout/useSortProductBlocks.d.ts +2 -0
  4. package/bundle/external/useRouter.d.ts +2 -6
  5. package/bundle/model/Fallback.d.ts +0 -1
  6. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +0 -2
  7. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  8. package/dist/components/GalleryLayout/GalleryLayout.js +11 -5
  9. package/dist/components/GalleryLayout/GalleryLayout.js.map +1 -1
  10. package/dist/components/GalleryLayout/useSortProductBlocks.d.ts +2 -0
  11. package/dist/components/GalleryLayout/useSortProductBlocks.js +21 -0
  12. package/dist/components/GalleryLayout/useSortProductBlocks.js.map +1 -0
  13. package/dist/components/Header/HeaderSecondaryMenu.js +2 -1
  14. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  15. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +5 -5
  16. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  17. package/dist/components/TabsLayout/TabsLayout.js +13 -12
  18. package/dist/components/TabsLayout/TabsLayout.js.map +1 -1
  19. package/dist/external/useRouter.d.ts +2 -6
  20. package/dist/external/useRouter.js +0 -3
  21. package/dist/external/useRouter.js.map +1 -1
  22. package/dist/hooks/useActiveRoute.js +1 -1
  23. package/dist/hooks/useActiveRoute.js.map +1 -1
  24. package/dist/model/Fallback.d.ts +0 -1
  25. package/dist/services/search/useSearch.js +18 -1
  26. package/dist/services/search/useSearch.js.map +1 -1
  27. package/dist/setup-fixture.js +0 -3
  28. package/dist/setup-fixture.js.map +1 -1
  29. package/lib/common.css +1 -1
  30. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +0 -2
  31. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  32. package/lib/components/GalleryLayout/GalleryLayout.js +11 -5
  33. package/lib/components/GalleryLayout/GalleryLayout.js.map +1 -1
  34. package/lib/components/GalleryLayout/useSortProductBlocks.d.ts +2 -0
  35. package/lib/components/GalleryLayout/useSortProductBlocks.js +18 -0
  36. package/lib/components/GalleryLayout/useSortProductBlocks.js.map +1 -0
  37. package/lib/components/Header/HeaderSecondaryMenu.js +2 -1
  38. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  39. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +6 -6
  40. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  41. package/lib/components/TabsLayout/TabsLayout.js +13 -12
  42. package/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  43. package/lib/external/useRouter.d.ts +2 -6
  44. package/lib/external/useRouter.js +0 -3
  45. package/lib/external/useRouter.js.map +1 -1
  46. package/lib/hooks/useActiveRoute.js +1 -1
  47. package/lib/hooks/useActiveRoute.js.map +1 -1
  48. package/lib/model/Fallback.d.ts +0 -1
  49. package/lib/services/search/useSearch.js +18 -1
  50. package/lib/services/search/useSearch.js.map +1 -1
  51. package/lib/setup-fixture.js +0 -3
  52. package/lib/setup-fixture.js.map +1 -1
  53. package/mobile/bundle/bundle.umd.js +45 -28
  54. package/mobile/bundle/bundle.umd.min.js +1 -1
  55. package/mobile/bundle/components/GalleryLayout/useSortProductBlocks.d.ts +2 -0
  56. package/mobile/bundle/external/useRouter.d.ts +2 -6
  57. package/mobile/bundle/model/Fallback.d.ts +0 -1
  58. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +0 -2
  59. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  60. package/mobile/dist/components/GalleryLayout/GalleryLayout.js +11 -5
  61. package/mobile/dist/components/GalleryLayout/GalleryLayout.js.map +1 -1
  62. package/mobile/dist/components/GalleryLayout/useSortProductBlocks.d.ts +2 -0
  63. package/mobile/dist/components/GalleryLayout/useSortProductBlocks.js +21 -0
  64. package/mobile/dist/components/GalleryLayout/useSortProductBlocks.js.map +1 -0
  65. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +2 -1
  66. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  67. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +5 -5
  68. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  69. package/mobile/dist/components/TabsLayout/TabsLayout.js +13 -12
  70. package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -1
  71. package/mobile/dist/external/useRouter.d.ts +2 -6
  72. package/mobile/dist/external/useRouter.js +0 -3
  73. package/mobile/dist/external/useRouter.js.map +1 -1
  74. package/mobile/dist/hooks/useActiveRoute.js +1 -1
  75. package/mobile/dist/hooks/useActiveRoute.js.map +1 -1
  76. package/mobile/dist/model/Fallback.d.ts +0 -1
  77. package/mobile/dist/services/search/useSearch.js +18 -1
  78. package/mobile/dist/services/search/useSearch.js.map +1 -1
  79. package/mobile/dist/setup-fixture.js +0 -3
  80. package/mobile/dist/setup-fixture.js.map +1 -1
  81. package/mobile/lib/common.css +1 -1
  82. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +0 -2
  83. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  84. package/mobile/lib/components/GalleryLayout/GalleryLayout.js +11 -5
  85. package/mobile/lib/components/GalleryLayout/GalleryLayout.js.map +1 -1
  86. package/mobile/lib/components/GalleryLayout/useSortProductBlocks.d.ts +2 -0
  87. package/mobile/lib/components/GalleryLayout/useSortProductBlocks.js +18 -0
  88. package/mobile/lib/components/GalleryLayout/useSortProductBlocks.js.map +1 -0
  89. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +2 -1
  90. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  91. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +6 -6
  92. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  93. package/mobile/lib/components/TabsLayout/TabsLayout.js +13 -12
  94. package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  95. package/mobile/lib/external/useRouter.d.ts +2 -6
  96. package/mobile/lib/external/useRouter.js +0 -3
  97. package/mobile/lib/external/useRouter.js.map +1 -1
  98. package/mobile/lib/hooks/useActiveRoute.js +1 -1
  99. package/mobile/lib/hooks/useActiveRoute.js.map +1 -1
  100. package/mobile/lib/model/Fallback.d.ts +0 -1
  101. package/mobile/lib/services/search/useSearch.js +18 -1
  102. package/mobile/lib/services/search/useSearch.js.map +1 -1
  103. package/mobile/lib/setup-fixture.js +0 -3
  104. package/mobile/lib/setup-fixture.js.map +1 -1
  105. package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +0 -2
  106. package/mobile/src/components/GalleryLayout/GalleryLayout.tsx +32 -19
  107. package/mobile/src/components/GalleryLayout/useSortProductBlocks.ts +25 -0
  108. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +12 -9
  109. package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +8 -6
  110. package/mobile/src/components/TabsLayout/TabsLayout.tsx +14 -12
  111. package/mobile/src/external/useRouter.ts +2 -9
  112. package/mobile/src/hooks/useActiveRoute.ts +1 -1
  113. package/mobile/src/model/Fallback.ts +0 -1
  114. package/mobile/src/services/search/useSearch.ts +24 -3
  115. package/mobile/src/setup-fixture.ts +0 -3
  116. package/package.json +1 -21
  117. package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +0 -2
  118. package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +1 -4
  119. package/src/components/ContentPage/ContentPage.fixture.tsx +2 -7
  120. package/src/components/GalleryLayout/GalleryLayout.tsx +32 -19
  121. package/src/components/GalleryLayout/useSortProductBlocks.ts +25 -0
  122. package/src/components/Header/HeaderSecondaryMenu.tsx +12 -9
  123. package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +8 -6
  124. package/src/components/TabsLayout/TabsLayout.tsx +14 -12
  125. package/src/external/useRouter.ts +2 -9
  126. package/src/hooks/useActiveRoute.ts +1 -1
  127. package/src/model/Fallback.ts +0 -1
  128. package/src/services/search/useSearch.ts +24 -3
  129. package/src/setup-fixture.ts +0 -3
  130. package/bundle/components/ContentPage/computeAPIFallback.d.ts +0 -4
  131. package/bundle/components/ContentPage/loadModuleFallback.d.ts +0 -2
  132. package/bundle/components/ContentPage/mapSlot.d.ts +0 -2
  133. package/bundle/components/ContentPage/normalizeBlock.d.ts +0 -3
  134. package/bundle/components/ContentPage/normalizeBlock.mobile.d.ts +0 -3
  135. package/bundle/components/ContentPage/normalizePage.d.ts +0 -3
  136. package/bundle/components/ContentPage/toMobileBlock.d.ts +0 -2
  137. package/bundle/content-page-repository/ContentPageRepository.d.ts +0 -10
  138. package/bundle/content-page-repository/JSONDocContentBox.d.ts +0 -8
  139. package/bundle/content-page-repository/TransformationOptions.d.ts +0 -4
  140. package/bundle/content-page-repository/clearAttachmentHref.d.ts +0 -2
  141. package/bundle/content-page-repository/computeImgOutputPath.d.ts +0 -3
  142. package/bundle/content-page-repository/extensions.d.ts +0 -3
  143. package/bundle/content-page-repository/index.d.ts +0 -3
  144. package/bundle/content-page-repository/mapJSON.d.ts +0 -1
  145. package/bundle/content-page-repository/mergePages.d.ts +0 -2
  146. package/bundle/content-page-repository/replaceHeadingTags.d.ts +0 -1
  147. package/bundle/content-page-repository/resizeImg.d.ts +0 -3
  148. package/bundle/content-page-repository/transformAttachmentLink.d.ts +0 -3
  149. package/bundle/content-page-repository/transformContentPage.d.ts +0 -4
  150. package/bundle/content-page-repository/transformDocument.d.ts +0 -3
  151. package/bundle/content-page-repository/transformHTML.d.ts +0 -1
  152. package/bundle/content-page-repository/transformImg.d.ts +0 -12
  153. package/bundle/content-page-repository/transformMarkdown.d.ts +0 -1
  154. package/bundle/content-page-repository/transformPicture.d.ts +0 -3
  155. package/dist/components/ContentPage/computeAPIFallback.d.ts +0 -4
  156. package/dist/components/ContentPage/computeAPIFallback.js +0 -36
  157. package/dist/components/ContentPage/computeAPIFallback.js.map +0 -1
  158. package/dist/components/ContentPage/loadModuleFallback.d.ts +0 -2
  159. package/dist/components/ContentPage/loadModuleFallback.js +0 -36
  160. package/dist/components/ContentPage/loadModuleFallback.js.map +0 -1
  161. package/dist/components/ContentPage/mapSlot.d.ts +0 -2
  162. package/dist/components/ContentPage/mapSlot.js +0 -16
  163. package/dist/components/ContentPage/mapSlot.js.map +0 -1
  164. package/dist/components/ContentPage/normalizeBlock.d.ts +0 -3
  165. package/dist/components/ContentPage/normalizeBlock.js +0 -15
  166. package/dist/components/ContentPage/normalizeBlock.js.map +0 -1
  167. package/dist/components/ContentPage/normalizeBlock.mobile.d.ts +0 -3
  168. package/dist/components/ContentPage/normalizeBlock.mobile.js +0 -18
  169. package/dist/components/ContentPage/normalizeBlock.mobile.js.map +0 -1
  170. package/dist/components/ContentPage/normalizePage.d.ts +0 -3
  171. package/dist/components/ContentPage/normalizePage.js +0 -6
  172. package/dist/components/ContentPage/normalizePage.js.map +0 -1
  173. package/dist/components/ContentPage/toMobileBlock.d.ts +0 -2
  174. package/dist/components/ContentPage/toMobileBlock.js +0 -12
  175. package/dist/components/ContentPage/toMobileBlock.js.map +0 -1
  176. package/dist/content-page-repository/ContentPageRepository.d.ts +0 -10
  177. package/dist/content-page-repository/ContentPageRepository.js +0 -31
  178. package/dist/content-page-repository/ContentPageRepository.js.map +0 -1
  179. package/dist/content-page-repository/JSONDocContentBox.d.ts +0 -8
  180. package/dist/content-page-repository/JSONDocContentBox.js +0 -39
  181. package/dist/content-page-repository/JSONDocContentBox.js.map +0 -1
  182. package/dist/content-page-repository/TransformationOptions.d.ts +0 -4
  183. package/dist/content-page-repository/TransformationOptions.js +0 -2
  184. package/dist/content-page-repository/TransformationOptions.js.map +0 -1
  185. package/dist/content-page-repository/clearAttachmentHref.d.ts +0 -2
  186. package/dist/content-page-repository/clearAttachmentHref.js +0 -6
  187. package/dist/content-page-repository/clearAttachmentHref.js.map +0 -1
  188. package/dist/content-page-repository/computeImgOutputPath.d.ts +0 -3
  189. package/dist/content-page-repository/computeImgOutputPath.js +0 -18
  190. package/dist/content-page-repository/computeImgOutputPath.js.map +0 -1
  191. package/dist/content-page-repository/extensions.d.ts +0 -3
  192. package/dist/content-page-repository/extensions.js +0 -18
  193. package/dist/content-page-repository/extensions.js.map +0 -1
  194. package/dist/content-page-repository/index.d.ts +0 -3
  195. package/dist/content-page-repository/index.js +0 -9
  196. package/dist/content-page-repository/index.js.map +0 -1
  197. package/dist/content-page-repository/mapJSON.d.ts +0 -1
  198. package/dist/content-page-repository/mapJSON.js +0 -26
  199. package/dist/content-page-repository/mapJSON.js.map +0 -1
  200. package/dist/content-page-repository/mergePages.d.ts +0 -2
  201. package/dist/content-page-repository/mergePages.js +0 -7
  202. package/dist/content-page-repository/mergePages.js.map +0 -1
  203. package/dist/content-page-repository/replaceHeadingTags.d.ts +0 -1
  204. package/dist/content-page-repository/replaceHeadingTags.js +0 -5
  205. package/dist/content-page-repository/replaceHeadingTags.js.map +0 -1
  206. package/dist/content-page-repository/resizeImg.d.ts +0 -3
  207. package/dist/content-page-repository/resizeImg.js +0 -19
  208. package/dist/content-page-repository/resizeImg.js.map +0 -1
  209. package/dist/content-page-repository/transformAttachmentLink.d.ts +0 -3
  210. package/dist/content-page-repository/transformAttachmentLink.js +0 -40
  211. package/dist/content-page-repository/transformAttachmentLink.js.map +0 -1
  212. package/dist/content-page-repository/transformContentPage.d.ts +0 -4
  213. package/dist/content-page-repository/transformContentPage.js +0 -78
  214. package/dist/content-page-repository/transformContentPage.js.map +0 -1
  215. package/dist/content-page-repository/transformDocument.d.ts +0 -3
  216. package/dist/content-page-repository/transformDocument.js +0 -38
  217. package/dist/content-page-repository/transformDocument.js.map +0 -1
  218. package/dist/content-page-repository/transformHTML.d.ts +0 -1
  219. package/dist/content-page-repository/transformHTML.js +0 -54
  220. package/dist/content-page-repository/transformHTML.js.map +0 -1
  221. package/dist/content-page-repository/transformImg.d.ts +0 -12
  222. package/dist/content-page-repository/transformImg.js +0 -51
  223. package/dist/content-page-repository/transformImg.js.map +0 -1
  224. package/dist/content-page-repository/transformMarkdown.d.ts +0 -1
  225. package/dist/content-page-repository/transformMarkdown.js +0 -18
  226. package/dist/content-page-repository/transformMarkdown.js.map +0 -1
  227. package/dist/content-page-repository/transformPicture.d.ts +0 -3
  228. package/dist/content-page-repository/transformPicture.js +0 -28
  229. package/dist/content-page-repository/transformPicture.js.map +0 -1
  230. package/lib/components/ContentPage/computeAPIFallback.d.ts +0 -4
  231. package/lib/components/ContentPage/computeAPIFallback.js +0 -33
  232. package/lib/components/ContentPage/computeAPIFallback.js.map +0 -1
  233. package/lib/components/ContentPage/loadModuleFallback.d.ts +0 -2
  234. package/lib/components/ContentPage/loadModuleFallback.js +0 -10
  235. package/lib/components/ContentPage/loadModuleFallback.js.map +0 -1
  236. package/lib/components/ContentPage/mapSlot.d.ts +0 -2
  237. package/lib/components/ContentPage/mapSlot.js +0 -13
  238. package/lib/components/ContentPage/mapSlot.js.map +0 -1
  239. package/lib/components/ContentPage/normalizeBlock.d.ts +0 -3
  240. package/lib/components/ContentPage/normalizeBlock.js +0 -12
  241. package/lib/components/ContentPage/normalizeBlock.js.map +0 -1
  242. package/lib/components/ContentPage/normalizeBlock.mobile.d.ts +0 -3
  243. package/lib/components/ContentPage/normalizeBlock.mobile.js +0 -15
  244. package/lib/components/ContentPage/normalizeBlock.mobile.js.map +0 -1
  245. package/lib/components/ContentPage/normalizePage.d.ts +0 -3
  246. package/lib/components/ContentPage/normalizePage.js +0 -3
  247. package/lib/components/ContentPage/normalizePage.js.map +0 -1
  248. package/lib/components/ContentPage/toMobileBlock.d.ts +0 -2
  249. package/lib/components/ContentPage/toMobileBlock.js +0 -9
  250. package/lib/components/ContentPage/toMobileBlock.js.map +0 -1
  251. package/lib/content-page-repository/ContentPageRepository.d.ts +0 -10
  252. package/lib/content-page-repository/ContentPageRepository.js +0 -25
  253. package/lib/content-page-repository/ContentPageRepository.js.map +0 -1
  254. package/lib/content-page-repository/JSONDocContentBox.d.ts +0 -8
  255. package/lib/content-page-repository/JSONDocContentBox.js +0 -36
  256. package/lib/content-page-repository/JSONDocContentBox.js.map +0 -1
  257. package/lib/content-page-repository/TransformationOptions.d.ts +0 -4
  258. package/lib/content-page-repository/TransformationOptions.js +0 -2
  259. package/lib/content-page-repository/TransformationOptions.js.map +0 -1
  260. package/lib/content-page-repository/clearAttachmentHref.d.ts +0 -2
  261. package/lib/content-page-repository/clearAttachmentHref.js +0 -3
  262. package/lib/content-page-repository/clearAttachmentHref.js.map +0 -1
  263. package/lib/content-page-repository/computeImgOutputPath.d.ts +0 -3
  264. package/lib/content-page-repository/computeImgOutputPath.js +0 -12
  265. package/lib/content-page-repository/computeImgOutputPath.js.map +0 -1
  266. package/lib/content-page-repository/extensions.d.ts +0 -3
  267. package/lib/content-page-repository/extensions.js +0 -16
  268. package/lib/content-page-repository/extensions.js.map +0 -1
  269. package/lib/content-page-repository/index.d.ts +0 -3
  270. package/lib/content-page-repository/index.js +0 -4
  271. package/lib/content-page-repository/index.js.map +0 -1
  272. package/lib/content-page-repository/mapJSON.d.ts +0 -1
  273. package/lib/content-page-repository/mapJSON.js +0 -23
  274. package/lib/content-page-repository/mapJSON.js.map +0 -1
  275. package/lib/content-page-repository/mergePages.d.ts +0 -2
  276. package/lib/content-page-repository/mergePages.js +0 -4
  277. package/lib/content-page-repository/mergePages.js.map +0 -1
  278. package/lib/content-page-repository/replaceHeadingTags.d.ts +0 -1
  279. package/lib/content-page-repository/replaceHeadingTags.js +0 -2
  280. package/lib/content-page-repository/replaceHeadingTags.js.map +0 -1
  281. package/lib/content-page-repository/resizeImg.d.ts +0 -3
  282. package/lib/content-page-repository/resizeImg.js +0 -13
  283. package/lib/content-page-repository/resizeImg.js.map +0 -1
  284. package/lib/content-page-repository/transformAttachmentLink.d.ts +0 -3
  285. package/lib/content-page-repository/transformAttachmentLink.js +0 -34
  286. package/lib/content-page-repository/transformAttachmentLink.js.map +0 -1
  287. package/lib/content-page-repository/transformContentPage.d.ts +0 -4
  288. package/lib/content-page-repository/transformContentPage.js +0 -71
  289. package/lib/content-page-repository/transformContentPage.js.map +0 -1
  290. package/lib/content-page-repository/transformDocument.d.ts +0 -3
  291. package/lib/content-page-repository/transformDocument.js +0 -32
  292. package/lib/content-page-repository/transformDocument.js.map +0 -1
  293. package/lib/content-page-repository/transformHTML.d.ts +0 -1
  294. package/lib/content-page-repository/transformHTML.js +0 -25
  295. package/lib/content-page-repository/transformHTML.js.map +0 -1
  296. package/lib/content-page-repository/transformImg.d.ts +0 -12
  297. package/lib/content-page-repository/transformImg.js +0 -45
  298. package/lib/content-page-repository/transformImg.js.map +0 -1
  299. package/lib/content-page-repository/transformMarkdown.d.ts +0 -1
  300. package/lib/content-page-repository/transformMarkdown.js +0 -12
  301. package/lib/content-page-repository/transformMarkdown.js.map +0 -1
  302. package/lib/content-page-repository/transformPicture.d.ts +0 -3
  303. package/lib/content-page-repository/transformPicture.js +0 -22
  304. package/lib/content-page-repository/transformPicture.js.map +0 -1
  305. package/mobile/bundle/components/ContentPage/computeAPIFallback.d.ts +0 -4
  306. package/mobile/bundle/components/ContentPage/loadModuleFallback.d.ts +0 -2
  307. package/mobile/bundle/components/ContentPage/mapSlot.d.ts +0 -2
  308. package/mobile/bundle/components/ContentPage/normalizeBlock.d.ts +0 -3
  309. package/mobile/bundle/components/ContentPage/normalizePage.d.ts +0 -3
  310. package/mobile/bundle/components/ContentPage/toMobileBlock.d.ts +0 -2
  311. package/mobile/bundle/content-page-repository/ContentPageRepository.d.ts +0 -10
  312. package/mobile/bundle/content-page-repository/JSONDocContentBox.d.ts +0 -8
  313. package/mobile/bundle/content-page-repository/TransformationOptions.d.ts +0 -4
  314. package/mobile/bundle/content-page-repository/clearAttachmentHref.d.ts +0 -2
  315. package/mobile/bundle/content-page-repository/computeImgOutputPath.d.ts +0 -3
  316. package/mobile/bundle/content-page-repository/extensions.d.ts +0 -3
  317. package/mobile/bundle/content-page-repository/index.d.ts +0 -3
  318. package/mobile/bundle/content-page-repository/mapJSON.d.ts +0 -1
  319. package/mobile/bundle/content-page-repository/mergePages.d.ts +0 -2
  320. package/mobile/bundle/content-page-repository/replaceHeadingTags.d.ts +0 -1
  321. package/mobile/bundle/content-page-repository/resizeImg.d.ts +0 -3
  322. package/mobile/bundle/content-page-repository/transformAttachmentLink.d.ts +0 -3
  323. package/mobile/bundle/content-page-repository/transformContentPage.d.ts +0 -4
  324. package/mobile/bundle/content-page-repository/transformDocument.d.ts +0 -3
  325. package/mobile/bundle/content-page-repository/transformHTML.d.ts +0 -1
  326. package/mobile/bundle/content-page-repository/transformImg.d.ts +0 -12
  327. package/mobile/bundle/content-page-repository/transformMarkdown.d.ts +0 -1
  328. package/mobile/bundle/content-page-repository/transformPicture.d.ts +0 -3
  329. package/mobile/dist/components/ContentPage/computeAPIFallback.d.ts +0 -4
  330. package/mobile/dist/components/ContentPage/computeAPIFallback.js +0 -36
  331. package/mobile/dist/components/ContentPage/computeAPIFallback.js.map +0 -1
  332. package/mobile/dist/components/ContentPage/loadModuleFallback.d.ts +0 -2
  333. package/mobile/dist/components/ContentPage/loadModuleFallback.js +0 -36
  334. package/mobile/dist/components/ContentPage/loadModuleFallback.js.map +0 -1
  335. package/mobile/dist/components/ContentPage/mapSlot.d.ts +0 -2
  336. package/mobile/dist/components/ContentPage/mapSlot.js +0 -16
  337. package/mobile/dist/components/ContentPage/mapSlot.js.map +0 -1
  338. package/mobile/dist/components/ContentPage/normalizeBlock.d.ts +0 -3
  339. package/mobile/dist/components/ContentPage/normalizeBlock.js +0 -18
  340. package/mobile/dist/components/ContentPage/normalizeBlock.js.map +0 -1
  341. package/mobile/dist/components/ContentPage/normalizePage.d.ts +0 -3
  342. package/mobile/dist/components/ContentPage/normalizePage.js +0 -6
  343. package/mobile/dist/components/ContentPage/normalizePage.js.map +0 -1
  344. package/mobile/dist/components/ContentPage/toMobileBlock.d.ts +0 -2
  345. package/mobile/dist/components/ContentPage/toMobileBlock.js +0 -12
  346. package/mobile/dist/components/ContentPage/toMobileBlock.js.map +0 -1
  347. package/mobile/dist/content-page-repository/ContentPageRepository.d.ts +0 -10
  348. package/mobile/dist/content-page-repository/ContentPageRepository.js +0 -31
  349. package/mobile/dist/content-page-repository/ContentPageRepository.js.map +0 -1
  350. package/mobile/dist/content-page-repository/JSONDocContentBox.d.ts +0 -8
  351. package/mobile/dist/content-page-repository/JSONDocContentBox.js +0 -39
  352. package/mobile/dist/content-page-repository/JSONDocContentBox.js.map +0 -1
  353. package/mobile/dist/content-page-repository/TransformationOptions.d.ts +0 -4
  354. package/mobile/dist/content-page-repository/TransformationOptions.js +0 -2
  355. package/mobile/dist/content-page-repository/TransformationOptions.js.map +0 -1
  356. package/mobile/dist/content-page-repository/clearAttachmentHref.d.ts +0 -2
  357. package/mobile/dist/content-page-repository/clearAttachmentHref.js +0 -6
  358. package/mobile/dist/content-page-repository/clearAttachmentHref.js.map +0 -1
  359. package/mobile/dist/content-page-repository/computeImgOutputPath.d.ts +0 -3
  360. package/mobile/dist/content-page-repository/computeImgOutputPath.js +0 -18
  361. package/mobile/dist/content-page-repository/computeImgOutputPath.js.map +0 -1
  362. package/mobile/dist/content-page-repository/extensions.d.ts +0 -3
  363. package/mobile/dist/content-page-repository/extensions.js +0 -18
  364. package/mobile/dist/content-page-repository/extensions.js.map +0 -1
  365. package/mobile/dist/content-page-repository/index.d.ts +0 -3
  366. package/mobile/dist/content-page-repository/index.js +0 -9
  367. package/mobile/dist/content-page-repository/index.js.map +0 -1
  368. package/mobile/dist/content-page-repository/mapJSON.d.ts +0 -1
  369. package/mobile/dist/content-page-repository/mapJSON.js +0 -26
  370. package/mobile/dist/content-page-repository/mapJSON.js.map +0 -1
  371. package/mobile/dist/content-page-repository/mergePages.d.ts +0 -2
  372. package/mobile/dist/content-page-repository/mergePages.js +0 -7
  373. package/mobile/dist/content-page-repository/mergePages.js.map +0 -1
  374. package/mobile/dist/content-page-repository/replaceHeadingTags.d.ts +0 -1
  375. package/mobile/dist/content-page-repository/replaceHeadingTags.js +0 -5
  376. package/mobile/dist/content-page-repository/replaceHeadingTags.js.map +0 -1
  377. package/mobile/dist/content-page-repository/resizeImg.d.ts +0 -3
  378. package/mobile/dist/content-page-repository/resizeImg.js +0 -19
  379. package/mobile/dist/content-page-repository/resizeImg.js.map +0 -1
  380. package/mobile/dist/content-page-repository/transformAttachmentLink.d.ts +0 -3
  381. package/mobile/dist/content-page-repository/transformAttachmentLink.js +0 -40
  382. package/mobile/dist/content-page-repository/transformAttachmentLink.js.map +0 -1
  383. package/mobile/dist/content-page-repository/transformContentPage.d.ts +0 -4
  384. package/mobile/dist/content-page-repository/transformContentPage.js +0 -78
  385. package/mobile/dist/content-page-repository/transformContentPage.js.map +0 -1
  386. package/mobile/dist/content-page-repository/transformDocument.d.ts +0 -3
  387. package/mobile/dist/content-page-repository/transformDocument.js +0 -38
  388. package/mobile/dist/content-page-repository/transformDocument.js.map +0 -1
  389. package/mobile/dist/content-page-repository/transformHTML.d.ts +0 -1
  390. package/mobile/dist/content-page-repository/transformHTML.js +0 -54
  391. package/mobile/dist/content-page-repository/transformHTML.js.map +0 -1
  392. package/mobile/dist/content-page-repository/transformImg.d.ts +0 -12
  393. package/mobile/dist/content-page-repository/transformImg.js +0 -51
  394. package/mobile/dist/content-page-repository/transformImg.js.map +0 -1
  395. package/mobile/dist/content-page-repository/transformMarkdown.d.ts +0 -1
  396. package/mobile/dist/content-page-repository/transformMarkdown.js +0 -18
  397. package/mobile/dist/content-page-repository/transformMarkdown.js.map +0 -1
  398. package/mobile/dist/content-page-repository/transformPicture.d.ts +0 -3
  399. package/mobile/dist/content-page-repository/transformPicture.js +0 -28
  400. package/mobile/dist/content-page-repository/transformPicture.js.map +0 -1
  401. package/mobile/lib/components/ContentPage/computeAPIFallback.d.ts +0 -4
  402. package/mobile/lib/components/ContentPage/computeAPIFallback.js +0 -33
  403. package/mobile/lib/components/ContentPage/computeAPIFallback.js.map +0 -1
  404. package/mobile/lib/components/ContentPage/loadModuleFallback.d.ts +0 -2
  405. package/mobile/lib/components/ContentPage/loadModuleFallback.js +0 -10
  406. package/mobile/lib/components/ContentPage/loadModuleFallback.js.map +0 -1
  407. package/mobile/lib/components/ContentPage/mapSlot.d.ts +0 -2
  408. package/mobile/lib/components/ContentPage/mapSlot.js +0 -13
  409. package/mobile/lib/components/ContentPage/mapSlot.js.map +0 -1
  410. package/mobile/lib/components/ContentPage/normalizeBlock.d.ts +0 -3
  411. package/mobile/lib/components/ContentPage/normalizeBlock.js +0 -15
  412. package/mobile/lib/components/ContentPage/normalizeBlock.js.map +0 -1
  413. package/mobile/lib/components/ContentPage/normalizePage.d.ts +0 -3
  414. package/mobile/lib/components/ContentPage/normalizePage.js +0 -3
  415. package/mobile/lib/components/ContentPage/normalizePage.js.map +0 -1
  416. package/mobile/lib/components/ContentPage/toMobileBlock.d.ts +0 -2
  417. package/mobile/lib/components/ContentPage/toMobileBlock.js +0 -9
  418. package/mobile/lib/components/ContentPage/toMobileBlock.js.map +0 -1
  419. package/mobile/lib/content-page-repository/ContentPageRepository.d.ts +0 -10
  420. package/mobile/lib/content-page-repository/ContentPageRepository.js +0 -25
  421. package/mobile/lib/content-page-repository/ContentPageRepository.js.map +0 -1
  422. package/mobile/lib/content-page-repository/JSONDocContentBox.d.ts +0 -8
  423. package/mobile/lib/content-page-repository/JSONDocContentBox.js +0 -36
  424. package/mobile/lib/content-page-repository/JSONDocContentBox.js.map +0 -1
  425. package/mobile/lib/content-page-repository/TransformationOptions.d.ts +0 -4
  426. package/mobile/lib/content-page-repository/TransformationOptions.js +0 -2
  427. package/mobile/lib/content-page-repository/TransformationOptions.js.map +0 -1
  428. package/mobile/lib/content-page-repository/clearAttachmentHref.d.ts +0 -2
  429. package/mobile/lib/content-page-repository/clearAttachmentHref.js +0 -3
  430. package/mobile/lib/content-page-repository/clearAttachmentHref.js.map +0 -1
  431. package/mobile/lib/content-page-repository/computeImgOutputPath.d.ts +0 -3
  432. package/mobile/lib/content-page-repository/computeImgOutputPath.js +0 -12
  433. package/mobile/lib/content-page-repository/computeImgOutputPath.js.map +0 -1
  434. package/mobile/lib/content-page-repository/extensions.d.ts +0 -3
  435. package/mobile/lib/content-page-repository/extensions.js +0 -16
  436. package/mobile/lib/content-page-repository/extensions.js.map +0 -1
  437. package/mobile/lib/content-page-repository/index.d.ts +0 -3
  438. package/mobile/lib/content-page-repository/index.js +0 -4
  439. package/mobile/lib/content-page-repository/index.js.map +0 -1
  440. package/mobile/lib/content-page-repository/mapJSON.d.ts +0 -1
  441. package/mobile/lib/content-page-repository/mapJSON.js +0 -23
  442. package/mobile/lib/content-page-repository/mapJSON.js.map +0 -1
  443. package/mobile/lib/content-page-repository/mergePages.d.ts +0 -2
  444. package/mobile/lib/content-page-repository/mergePages.js +0 -4
  445. package/mobile/lib/content-page-repository/mergePages.js.map +0 -1
  446. package/mobile/lib/content-page-repository/replaceHeadingTags.d.ts +0 -1
  447. package/mobile/lib/content-page-repository/replaceHeadingTags.js +0 -2
  448. package/mobile/lib/content-page-repository/replaceHeadingTags.js.map +0 -1
  449. package/mobile/lib/content-page-repository/resizeImg.d.ts +0 -3
  450. package/mobile/lib/content-page-repository/resizeImg.js +0 -13
  451. package/mobile/lib/content-page-repository/resizeImg.js.map +0 -1
  452. package/mobile/lib/content-page-repository/transformAttachmentLink.d.ts +0 -3
  453. package/mobile/lib/content-page-repository/transformAttachmentLink.js +0 -34
  454. package/mobile/lib/content-page-repository/transformAttachmentLink.js.map +0 -1
  455. package/mobile/lib/content-page-repository/transformContentPage.d.ts +0 -4
  456. package/mobile/lib/content-page-repository/transformContentPage.js +0 -71
  457. package/mobile/lib/content-page-repository/transformContentPage.js.map +0 -1
  458. package/mobile/lib/content-page-repository/transformDocument.d.ts +0 -3
  459. package/mobile/lib/content-page-repository/transformDocument.js +0 -32
  460. package/mobile/lib/content-page-repository/transformDocument.js.map +0 -1
  461. package/mobile/lib/content-page-repository/transformHTML.d.ts +0 -1
  462. package/mobile/lib/content-page-repository/transformHTML.js +0 -25
  463. package/mobile/lib/content-page-repository/transformHTML.js.map +0 -1
  464. package/mobile/lib/content-page-repository/transformImg.d.ts +0 -12
  465. package/mobile/lib/content-page-repository/transformImg.js +0 -45
  466. package/mobile/lib/content-page-repository/transformImg.js.map +0 -1
  467. package/mobile/lib/content-page-repository/transformMarkdown.d.ts +0 -1
  468. package/mobile/lib/content-page-repository/transformMarkdown.js +0 -12
  469. package/mobile/lib/content-page-repository/transformMarkdown.js.map +0 -1
  470. package/mobile/lib/content-page-repository/transformPicture.d.ts +0 -3
  471. package/mobile/lib/content-page-repository/transformPicture.js +0 -22
  472. package/mobile/lib/content-page-repository/transformPicture.js.map +0 -1
  473. package/mobile/src/components/ContentPage/computeAPIFallback.ts +0 -67
  474. package/mobile/src/components/ContentPage/loadModuleFallback.ts +0 -11
  475. package/mobile/src/components/ContentPage/mapSlot.ts +0 -18
  476. package/mobile/src/components/ContentPage/normalizeBlock.ts +0 -25
  477. package/mobile/src/components/ContentPage/normalizePage.ts +0 -8
  478. package/mobile/src/components/ContentPage/toMobileBlock.ts +0 -11
  479. package/mobile/src/content-page-repository/ContentPageRepository.ts +0 -31
  480. package/mobile/src/content-page-repository/JSONDocContentBox.ts +0 -56
  481. package/mobile/src/content-page-repository/TransformationOptions.ts +0 -4
  482. package/mobile/src/content-page-repository/clearAttachmentHref.ts +0 -3
  483. package/mobile/src/content-page-repository/computeImgOutputPath.ts +0 -21
  484. package/mobile/src/content-page-repository/extensions.ts +0 -17
  485. package/mobile/src/content-page-repository/index.ts +0 -3
  486. package/mobile/src/content-page-repository/mapJSON.ts +0 -30
  487. package/mobile/src/content-page-repository/mergePages.ts +0 -8
  488. package/mobile/src/content-page-repository/replaceHeadingTags.ts +0 -2
  489. package/mobile/src/content-page-repository/resizeImg.ts +0 -17
  490. package/mobile/src/content-page-repository/transformAttachmentLink.ts +0 -46
  491. package/mobile/src/content-page-repository/transformContentPage.ts +0 -102
  492. package/mobile/src/content-page-repository/transformDocument.ts +0 -43
  493. package/mobile/src/content-page-repository/transformHTML.ts +0 -28
  494. package/mobile/src/content-page-repository/transformImg.ts +0 -81
  495. package/mobile/src/content-page-repository/transformMarkdown.ts +0 -14
  496. package/mobile/src/content-page-repository/transformPicture.ts +0 -35
  497. package/src/components/ContentPage/computeAPIFallback.ts +0 -67
  498. package/src/components/ContentPage/loadModuleFallback.ts +0 -11
  499. package/src/components/ContentPage/mapSlot.ts +0 -18
  500. package/src/components/ContentPage/normalizeBlock.mobile.ts +0 -25
  501. package/src/components/ContentPage/normalizeBlock.ts +0 -21
  502. package/src/components/ContentPage/normalizePage.ts +0 -8
  503. package/src/components/ContentPage/toMobileBlock.ts +0 -11
  504. package/src/content-page-repository/ContentPageRepository.ts +0 -31
  505. package/src/content-page-repository/JSONDocContentBox.ts +0 -56
  506. package/src/content-page-repository/TransformationOptions.ts +0 -4
  507. package/src/content-page-repository/clearAttachmentHref.ts +0 -3
  508. package/src/content-page-repository/computeImgOutputPath.ts +0 -21
  509. package/src/content-page-repository/extensions.ts +0 -17
  510. package/src/content-page-repository/index.ts +0 -3
  511. package/src/content-page-repository/mapJSON.ts +0 -30
  512. package/src/content-page-repository/mergePages.ts +0 -8
  513. package/src/content-page-repository/replaceHeadingTags.ts +0 -2
  514. package/src/content-page-repository/resizeImg.ts +0 -17
  515. package/src/content-page-repository/transformAttachmentLink.ts +0 -46
  516. package/src/content-page-repository/transformContentPage.ts +0 -102
  517. package/src/content-page-repository/transformDocument.ts +0 -43
  518. package/src/content-page-repository/transformHTML.ts +0 -28
  519. package/src/content-page-repository/transformImg.ts +0 -81
  520. package/src/content-page-repository/transformMarkdown.ts +0 -14
  521. package/src/content-page-repository/transformPicture.ts +0 -35
@@ -1,51 +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.transformImg = void 0;
6
- const fs_1 = __importDefault(require("fs"));
7
- const path_1 = __importDefault(require("path"));
8
- const sharp_1 = __importDefault(require("sharp"));
9
- const util_1 = __importDefault(require("util"));
10
- const isPictureSizeEmpty_1 = require("../utils/isPictureSizeEmpty");
11
- const computeImgOutputPath_1 = require("./computeImgOutputPath");
12
- const resizeImg_1 = require("./resizeImg");
13
- const mkdir = util_1.default.promisify(fs_1.default.mkdir);
14
- const copyFile = util_1.default.promisify(fs_1.default.copyFile);
15
- const defaultTransformationCache = new Map();
16
- const isNilTransform = ({ size, containerSize, format }) => (0, isPictureSizeEmpty_1.isPictureSizeEmpty)(size) && (0, isPictureSizeEmpty_1.isPictureSizeEmpty)(containerSize) && !format;
17
- const isVectorInput = (input) => ['.svg', '.eps', '.epsf', '.epsi', '.pdf'].some((ext) => input.toLowerCase().endsWith(ext));
18
- function transformImg(src, pagePath, options) {
19
- if (!src) {
20
- return src;
21
- }
22
- const withoutTransform = isNilTransform(options) || isVectorInput(src);
23
- const output = (0, computeImgOutputPath_1.computeImgOutputPath)(src, options, withoutTransform);
24
- const { cache = defaultTransformationCache } = options;
25
- const cachedResult = cache.get(output);
26
- if (cachedResult) {
27
- return cachedResult;
28
- }
29
- const result = (async () => {
30
- try {
31
- await mkdir(path_1.default.dirname(output), { recursive: true });
32
- if (withoutTransform) {
33
- await copyFile(src, output);
34
- }
35
- else {
36
- const chain = await computeTransformationChain(options)((0, sharp_1.default)(src));
37
- await chain.toFile(output);
38
- }
39
- }
40
- catch (e) {
41
- console.info(`No "${src}" attachment found on page: "${pagePath}"`);
42
- }
43
- return output;
44
- })();
45
- cache.set(output, result);
46
- return result;
47
- }
48
- exports.transformImg = transformImg;
49
- const computeTransformationChain = ({ size, containerSize, format, options, }) => pipe((0, resizeImg_1.resizeImg)((0, isPictureSizeEmpty_1.isPictureSizeEmpty)(size) ? containerSize : size), (_) => format ? _.toFormat(format, { ...options, lossless: true }) : _);
50
- const pipe = (...operations) => operations.reduce((a, b) => async (chain) => b(await a(chain)));
51
- //# sourceMappingURL=transformImg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformImg.js","sourceRoot":"","sources":["../../src/content-page-repository/transformImg.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,kDAA0C;AAC1C,gDAAwB;AAGxB,oEAAiE;AACjE,iEAA8D;AAC9D,2CAAwC;AAGxC,MAAM,KAAK,GAAG,cAAI,CAAC,SAAS,CAAC,YAAE,CAAC,KAAK,CAAC,CAAC;AACvC,MAAM,QAAQ,GAAG,cAAI,CAAC,SAAS,CAAC,YAAE,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,IAAA,uCAAkB,EAAC,IAAI,CAAC,IAAI,IAAA,uCAAkB,EAAC,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,SAAgB,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,IAAA,2CAAoB,EAAC,GAAG,EAAE,OAAO,EAAE,gBAAgB,CAAC,CA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,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,18 +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.transformMarkdown = void 0;
6
- const remark_html_1 = __importDefault(require("remark-html"));
7
- const remark_parse_1 = __importDefault(require("remark-parse"));
8
- const unified_1 = require("unified");
9
- const replaceHeadingTags_1 = require("./replaceHeadingTags");
10
- async function transformMarkdown(markdown) {
11
- if (!markdown) {
12
- return '';
13
- }
14
- const result = await (0, unified_1.unified)().use(remark_parse_1.default).use(remark_html_1.default).process(markdown);
15
- return (0, replaceHeadingTags_1.replaceHeadingTags)(result.toString('utf-8'));
16
- }
17
- exports.transformMarkdown = transformMarkdown;
18
- //# sourceMappingURL=transformMarkdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformMarkdown.js","sourceRoot":"","sources":["../../src/content-page-repository/transformMarkdown.ts"],"names":[],"mappings":";;;;;AAAA,8DAAqC;AACrC,gEAAuC;AACvC,qCAAkC;AAClC,6DAA0D;AAEnD,KAAK,UAAU,iBAAiB,CAAC,QAAmC;IACzE,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,EAAE,CAAC;KACX;IAED,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAO,GAAE,CAAC,GAAG,CAAC,sBAAW,CAAC,CAAC,GAAG,CAAC,qBAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAElF,OAAO,IAAA,uCAAkB,EAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AACtD,CAAC;AARD,8CAQC"}
@@ -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,28 +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.transformPicture = void 0;
6
- const path_1 = __importDefault(require("path"));
7
- const sharp_1 = __importDefault(require("sharp"));
8
- const transformImg_1 = require("./transformImg");
9
- async function transformPicture(picture, pagePath, options) {
10
- const src = picture?.src || '';
11
- const transformedImgPath = await (0, transformImg_1.transformImg)(src, pagePath, { ...options, ...picture });
12
- const { width, height } = await (0, sharp_1.default)(transformedImgPath).metadata();
13
- const containerSize = width && height ? { width, height } : undefined;
14
- const sources = picture.sources || [];
15
- const transformedSources = await Promise.all(sources.map((_) => (0, transformImg_1.transformImg)(src, pagePath, { ...options, ..._, containerSize })));
16
- const imgPathToSrc = (_) => path_1.default.join('/', path_1.default.relative(options.publicDir, _));
17
- return {
18
- ...picture,
19
- src: imgPathToSrc(transformedImgPath),
20
- sources: transformedSources.map((_, i) => ({
21
- ...sources[i],
22
- src: imgPathToSrc(_),
23
- size: { width, height },
24
- })),
25
- };
26
- }
27
- exports.transformPicture = transformPicture;
28
- //# sourceMappingURL=transformPicture.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformPicture.js","sourceRoot":"","sources":["../../src/content-page-repository/transformPicture.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,kDAA0B;AAG1B,iDAA8C;AAEvC,KAAK,UAAU,gBAAgB,CACpC,OAAgB,EAChB,QAAgB,EAChB,OAA8B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BC"}
@@ -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,33 +0,0 @@
1
- import { collectRef, resolveJPointer } from '@redneckz/json-ref';
2
- import { ContentPageRepository } from '../../content-page-repository/ContentPageRepository.js';
3
- import { unique } from '../../utils/unique.js';
4
- import { joinPath } from '../../utils/url.js';
5
- import { loadModuleFallback } from './loadModuleFallback.js';
6
- const BASE_DIR = 'content';
7
- export const computeAPIFallback = async (blocksRegistry, contentPageData) => {
8
- return Object.fromEntries((await Promise.all([
9
- computeFallbackFromModules(blocksRegistry),
10
- computeFallbackFromContentRefs(contentPageData),
11
- ]))
12
- .flatMap((_) => _)
13
- .filter(([key, data]) => key && data));
14
- };
15
- const computeFallbackFromModules = async (blocksRegistry) => {
16
- const fallbackMap = (await Promise.all(Object.keys(blocksRegistry).map(loadModuleFallback)))
17
- .filter((_) => Boolean(_))
18
- .reduce((acc, _) => ({ ...acc, ..._ }), {});
19
- return (await Promise.allSettled(Object.entries(fallbackMap).map(async ([key, fetcher]) => [key, await fetcher()])))
20
- .filter((_) => _.status === 'fulfilled')
21
- .map(({ value }) => value);
22
- };
23
- const computeFallbackFromContentRefs = async (contentPageData) => {
24
- const refs = unique(collectRef(contentPageData));
25
- return (await Promise.allSettled(refs.map(async (_) => [
26
- _,
27
- (await ContentPageRepository.inst.generatePage(joinPath(BASE_DIR, _))),
28
- ])))
29
- .filter((_) => _.status === 'fulfilled')
30
- .map(({ value }) => value)
31
- .map(([ref, data]) => [ref, resolveJPointer(data, ref)]);
32
- };
33
- //# sourceMappingURL=computeAPIFallback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"computeAPIFallback.js","sourceRoot":"","sources":["../../../src/components/ContentPage/computeAPIFallback.ts"],"names":[],"mappings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AAW,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,MAAM,CAAC,UAAU,CAAC,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,qBAAqB,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,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,eAAe,CAAC,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,10 +0,0 @@
1
- export const loadModuleFallback = async (blockName) => {
2
- try {
3
- const blockFallback = await import(`../${blockName}/${blockName}.fallback.js`);
4
- return blockFallback?.fallback ? await blockFallback.fallback() : undefined;
5
- }
6
- catch (error) {
7
- return undefined;
8
- }
9
- };
10
- //# sourceMappingURL=loadModuleFallback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loadModuleFallback.js","sourceRoot":"","sources":["../../../src/components/ContentPage/loadModuleFallback.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EAAE,SAAiB,EAAoC,EAAE;IAC9F,IAAI;QACF,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,MAAM,SAAS,IAAI,SAAS,WAAW,CAAC,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"}
@@ -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,13 +0,0 @@
1
- export const mapSlot = (mapper) => (slot) => ({
2
- ...slot,
3
- ...(slot.blocks ? { blocks: mapper(slot.blocks) } : {}),
4
- ...(slot.slots
5
- ? {
6
- slots: Object.fromEntries(Object.entries(slot.slots).map(([slotKey, slotBlocks]) => [
7
- slotKey,
8
- mapper(slotBlocks),
9
- ])),
10
- }
11
- : {}),
12
- });
13
- //# sourceMappingURL=mapSlot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapSlot.js","sourceRoot":"","sources":["../../../src/components/ContentPage/mapSlot.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,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"}
@@ -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,12 +0,0 @@
1
- import { mapSlot } from './mapSlot.js';
2
- export function normalizeBlock(block, blocksRegistry) {
3
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4
- const { mobile, ...result } = (block || {});
5
- return mapSlot(filterBlocks(blocksRegistry))({ ...result });
6
- }
7
- const filterBlocks = (blocksRegistry) => (blocks) => blocks
8
- ? blocks
9
- ?.filter((block) => blocksRegistry && (block?.type || '') in blocksRegistry && !block?.hidden)
10
- .map((block) => normalizeBlock(block, blocksRegistry))
11
- : [];
12
- //# sourceMappingURL=normalizeBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizeBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizeBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,UAAU,cAAc,CAAiB,KAAS,EAAE,cAA+B;IACvF,6DAA6D;IAC7D,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAAa,CAAC;IAExD,OAAO,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAM,CAAC;AACnE,CAAC;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,CAAC,cAAc,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,cAAc,IAAI,CAAC,KAAK,EAAE,MAAM,CACrF;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 Slot } from '../../model/ContentPageDef';
3
- export declare function normalizeBlock<S extends Slot>(block?: S, blocksRegistry?: BlocksRegistry): S;
@@ -1,15 +0,0 @@
1
- import { mapSlot } from './mapSlot.js';
2
- import { toMobileBlock } from './toMobileBlock.js';
3
- export function normalizeBlock(block, blocksRegistry) {
4
- const { mobile } = (block || {});
5
- return mapSlot(filterBlocks(blocksRegistry))((mobile ? toMobileBlock(block) : block) || {});
6
- }
7
- const filterBlocks = (blocksRegistry) => (blocks) => blocks
8
- ? blocks
9
- ?.filter((block) => blocksRegistry &&
10
- (block?.type || block?.mobile?.type || '') in blocksRegistry &&
11
- !block.mobile?.hidden &&
12
- !block?.hidden)
13
- .map((block) => normalizeBlock(block, blocksRegistry))
14
- : [];
15
- //# sourceMappingURL=normalizeBlock.mobile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizeBlock.mobile.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizeBlock.mobile.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,UAAU,cAAc,CAAiB,KAAS,EAAE,cAA+B;IACvF,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAAa,CAAC;IAE7C,OAAO,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAM,CAAC;AACnG,CAAC;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,3 +0,0 @@
1
- import { normalizeBlock } from './normalizeBlock.js';
2
- export const normalizePage = (blocksRegistry) => (contentPage) => contentPage ? normalizeBlock(contentPage, blocksRegistry) : {};
3
- //# sourceMappingURL=normalizePage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizePage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizePage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GACxB,CAAC,cAA8B,EAAE,EAAE,CACnC,CAAC,WAA8C,EAAkB,EAAE,CACjE,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- import { type BlockDef } from '../../model/ContentPageDef';
2
- export declare function toMobileBlock(block?: BlockDef): BlockDef;
@@ -1,9 +0,0 @@
1
- export function toMobileBlock(block = {}) {
2
- const { mobile, ...desktop } = block;
3
- return {
4
- ...desktop,
5
- ...(mobile?.style ? { style: mobile.style } : {}),
6
- ...(mobile?.content ? { content: mobile.content } : {}),
7
- };
8
- }
9
- //# sourceMappingURL=toMobileBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toMobileBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/toMobileBlock.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,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"}
@@ -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,25 +0,0 @@
1
- import fs from 'fs';
2
- import { glob } from 'glob';
3
- import util from 'util';
4
- import { generatedPagePath, transformContentPage } from './transformContentPage.js';
5
- const readFile = util.promisify(fs.readFile);
6
- export class ContentPageRepository {
7
- options;
8
- static inst = new ContentPageRepository();
9
- constructor(options = {
10
- contentDir: 'content',
11
- publicDir: 'public',
12
- }) {
13
- this.options = options;
14
- }
15
- listAllContentPages() {
16
- return glob(`${this.options.contentDir}/**/*.page.json`, { posix: true });
17
- }
18
- async readPage(filePath) {
19
- return JSON.parse(await readFile(generatedPagePath(filePath), 'utf-8'));
20
- }
21
- generatePage(filePath) {
22
- return transformContentPage(filePath, this.options);
23
- }
24
- }
25
- //# sourceMappingURL=ContentPageRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentPageRepository.js","sourceRoot":"","sources":["../../src/content-page-repository/ContentPageRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEjF,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;AAE7C,MAAM,OAAO,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,IAAI,CAAC,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,iBAAiB,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED,YAAY,CAAC,QAAgB;QAC3B,OAAO,oBAAoB,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC"}
@@ -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,36 +0,0 @@
1
- import { isJSONArray, isJSONRecord, JSONBoxDefault, } from '@redneckz/json-op';
2
- const isAtomicArray = (node) => isJSONArray(node) && !node.some(nodeId);
3
- const ID_PREFIX = 'id:';
4
- const nodeId = (node) => isJSONRecord(node) && '__id' in node ? node.__id : undefined;
5
- const keyToId = (p) => typeof p === 'string' && p.startsWith(ID_PREFIX) ? p.substring(ID_PREFIX.length) : undefined;
6
- const findIndexById = (_, id) => id && isJSONArray(_) ? _.findIndex((node) => id === nodeId(node)) : -1;
7
- export class JSONDocContentBox extends JSONBoxDefault {
8
- size() {
9
- return isAtomicArray(this._) ? 0 : super.size();
10
- }
11
- entries() {
12
- if (isAtomicArray(this._)) {
13
- return [];
14
- }
15
- else if (isJSONArray(this._)) {
16
- return this._.map((node, i) => [
17
- nodeId(node) ? `${ID_PREFIX}${nodeId(node)}` : i,
18
- new JSONDocContentBox(node),
19
- ]);
20
- }
21
- else {
22
- return super.entries();
23
- }
24
- }
25
- get(p) {
26
- const id = keyToId(p);
27
- return super.get(id ? findIndexById(this._, id) : p);
28
- }
29
- set(p, child) {
30
- const id = keyToId(p);
31
- const index = findIndexById(this._, id);
32
- const adjustedIndex = index >= 0 ? index : this.size();
33
- return super.set(id ? adjustedIndex : p, id ? { ...child, __id: id } : child);
34
- }
35
- }
36
- //# sourceMappingURL=JSONDocContentBox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JSONDocContentBox.js","sourceRoot":"","sources":["../../src/content-page-repository/JSONDocContentBox.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,YAAY,EACZ,cAAc,GAIf,MAAM,mBAAmB,CAAC;AAG3B,MAAM,aAAa,GAAG,CAAC,IAA0B,EAAW,EAAE,CAC5D,WAAW,CAAC,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,YAAY,CAAC,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,WAAW,CAAC,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,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C,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"}
@@ -1,4 +0,0 @@
1
- export interface TransformationOptions {
2
- contentDir: string;
3
- publicDir: string;
4
- }
@@ -1,2 +0,0 @@
1
- export {};
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,3 +0,0 @@
1
- export const ATTACHMENT_PREFIX = 'file://';
2
- export const clearAttachmentHref = (href) => href.replace(ATTACHMENT_PREFIX, '');
3
- //# sourceMappingURL=clearAttachmentHref.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clearAttachmentHref.js","sourceRoot":"","sources":["../../src/content-page-repository/clearAttachmentHref.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,SAAS,CAAC;AAE3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC"}
@@ -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,12 +0,0 @@
1
- import path from 'path';
2
- export function computeImgOutputPath(imgInputPath, { contentDir, publicDir, format, size }, withoutTransform = false) {
3
- const imgRelativePath = path.relative(contentDir, imgInputPath);
4
- const imgDir = path.dirname(imgRelativePath);
5
- const inputExt = path.extname(imgRelativePath);
6
- const fileName = path.basename(imgRelativePath, inputExt);
7
- const suffixParts = [size?.width, size?.height].filter(Boolean);
8
- const suffix = suffixParts.length && !withoutTransform ? `-${suffixParts.join('-')}` : '';
9
- const ext = format && !withoutTransform ? `.${format}` : inputExt;
10
- return path.join(publicDir, imgDir, `${fileName}${suffix}${ext}`);
11
- }
12
- //# sourceMappingURL=computeImgOutputPath.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"computeImgOutputPath.js","sourceRoot":"","sources":["../../src/content-page-repository/computeImgOutputPath.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,MAAM,UAAU,oBAAoB,CAClC,YAAoB,EACpB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAqC,EAC1E,gBAAgB,GAAG,KAAK;IAExB,MAAM,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAEhE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAE7C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;IAC1D,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChE,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1F,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;IAElE,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,QAAQ,GAAG,MAAM,GAAG,GAAG,EAAE,CAAC,CAAC;AACpE,CAAC"}
@@ -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,16 +0,0 @@
1
- export const OUTPUT_SUFFIX = '.static';
2
- export const DOCUMENT_EXT_LIST = [
3
- '.txt',
4
- '.doc',
5
- '.docx',
6
- '.xls',
7
- '.xlsx',
8
- '.xlsb',
9
- '.ppt',
10
- '.pptx',
11
- '.pdf',
12
- '.zip',
13
- '.7z',
14
- ];
15
- export const IMAGE_EXT_LIST = ['.jpeg', '.jpg', '.png', '.gif', '.webp', '.heif', '.avif', '.svg'];
16
- //# sourceMappingURL=extensions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extensions.js","sourceRoot":"","sources":["../../src/content-page-repository/extensions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC;AAEvC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,KAAK;CACN,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- export { clearAttachmentHref } from './clearAttachmentHref';
2
- export { ContentPageRepository } from './ContentPageRepository';
3
- export { transformContentPage } from './transformContentPage';
@@ -1,4 +0,0 @@
1
- export { clearAttachmentHref } from './clearAttachmentHref.js';
2
- export { ContentPageRepository } from './ContentPageRepository.js';
3
- export { transformContentPage } from './transformContentPage.js';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/content-page-repository/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -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,23 +0,0 @@
1
- export async function mapJSON(data, mapper, keyParts = []) {
2
- if (data === null || data === undefined) {
3
- return data;
4
- }
5
- const mappedData = await mapper(data, keyParts);
6
- if (mappedData !== data) {
7
- return mappedData;
8
- }
9
- if (Array.isArray(data)) {
10
- const values = data.map((_, i) => mapJSON(_, mapper, [String(i)].concat(keyParts)));
11
- return Promise.all(values);
12
- }
13
- else if (typeof data === 'object' && data.toString() === '[object Object]') {
14
- const subKeys = Object.keys(data);
15
- const values = subKeys.map((k) => mapJSON(data[k], mapper, [k].concat(keyParts)));
16
- const pairs = (await Promise.all(values)).map((_, i) => ({
17
- [subKeys[i]]: _,
18
- }));
19
- return Object.assign({}, ...pairs);
20
- }
21
- return mapper(data, keyParts);
22
- }
23
- //# sourceMappingURL=mapJSON.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapJSON.js","sourceRoot":"","sources":["../../src/content-page-repository/mapJSON.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,IAAO,EACP,MAAgE,EAChE,WAAqB,EAAE;IAEvB,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;QACvC,OAAO,IAAI,CAAC;KACb;IAED,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAChD,I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1
- import { leafs, merge } from '@redneckz/json-op';
2
- import { JSONDocContentBox } from './JSONDocContentBox.js';
3
- export const mergePages = (page, diffs) => merge(new JSONDocContentBox(page), leafs(new JSONDocContentBox(diffs)));
4
- //# sourceMappingURL=mergePages.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mergePages.js","sourceRoot":"","sources":["../../src/content-page-repository/mergePages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAmB,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAgB,EAAE,KAAiB,EAAc,EAAE,CAC5E,KAAK,CACH,IAAI,iBAAiB,CAAC,IAAkB,CAAC,EACzC,KAAK,CAAC,IAAI,iBAAiB,CAAC,KAAmB,CAAC,CAAC,CACpC,CAAC"}
@@ -1 +0,0 @@
1
- export declare const replaceHeadingTags: (html: string) => string;
@@ -1,2 +0,0 @@
1
- export const replaceHeadingTags = (html) => html.replaceAll(/<h(\d)>(.*?)<\/h\d>/g, '<p class="h$1">$2</p>');
2
- //# sourceMappingURL=replaceHeadingTags.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"replaceHeadingTags.js","sourceRoot":"","sources":["../../src/content-page-repository/replaceHeadingTags.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAE,EAAE,CACjD,IAAI,CAAC,UAAU,CAAC,sBAAsB,EAAE,uBAAuB,CAAC,CAAC"}
@@ -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,13 +0,0 @@
1
- import sharp from 'sharp';
2
- export const resizeImg = (size, options) => (chain) => size
3
- ? chain.resize(size.width || null, size.height || null, {
4
- /*
5
- * Editor behaviour with one dimension present: resize by given dimension maintaining aspect ratio. (fit: contain)
6
- * With two dimensions present: resize trying to fill given dimensions (fit: fill)
7
- */
8
- fit: size.width && size.height ? sharp.fit.fill : sharp.fit.contain,
9
- background: { r: 0, g: 0, b: 0, alpha: 0 },
10
- ...options,
11
- })
12
- : chain;
13
- //# sourceMappingURL=resizeImg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resizeImg.js","sourceRoot":"","sources":["../../src/content-page-repository/resizeImg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAG9D,MAAM,CAAC,MAAM,SAAS,GACpB,CAAC,IAAyB,EAAE,OAAuB,EAAE,EAAE,CACvD,CAAC,KAAY,EAAS,EAAE,CACtB,IAAI;IACF,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,IAAI,CAAC,MAAM,IAAI,IAAI,EAAE;QACpD;;;WAGG;QACH,GAAG,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO;QACnE,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;QAC1C,GAAG,OAAO;KACX,CAAC;IACJ,CAAC,CAAC,KAAK,CAAC"}
@@ -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>;