honkit 4.0.7 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (566) hide show
  1. package/lib/BuildGenerator.d.ts +13 -0
  2. package/lib/BuildGenerator.d.ts.map +1 -0
  3. package/lib/__tests__/__fixtures__/honkit/book.d.ts +7 -0
  4. package/lib/__tests__/__fixtures__/honkit/book.d.ts.map +1 -0
  5. package/lib/__tests__/e2e.test.d.ts +2 -0
  6. package/lib/__tests__/e2e.test.d.ts.map +1 -0
  7. package/lib/__tests__/init.d.ts +2 -0
  8. package/lib/__tests__/init.d.ts.map +1 -0
  9. package/lib/__tests__/satisfies.d.ts +2 -0
  10. package/lib/__tests__/satisfies.d.ts.map +1 -0
  11. package/lib/__tests__/snapshot-asciidoc.d.ts +2 -0
  12. package/lib/__tests__/snapshot-asciidoc.d.ts.map +1 -0
  13. package/lib/__tests__/snapshot-asciidoc.js +48 -0
  14. package/lib/__tests__/snapshot-honkit.d.ts +2 -0
  15. package/lib/__tests__/snapshot-honkit.d.ts.map +1 -0
  16. package/lib/api/decodeConfig.d.ts +10 -0
  17. package/lib/api/decodeConfig.d.ts.map +1 -0
  18. package/lib/api/decodeGlobal.d.ts +11 -0
  19. package/lib/api/decodeGlobal.d.ts.map +1 -0
  20. package/lib/api/decodePage.d.ts +12 -0
  21. package/lib/api/decodePage.d.ts.map +1 -0
  22. package/lib/api/deprecate.d.ts +52 -0
  23. package/lib/api/deprecate.d.ts.map +1 -0
  24. package/lib/api/encodeConfig.d.ts +12 -0
  25. package/lib/api/encodeConfig.d.ts.map +1 -0
  26. package/lib/api/encodeGlobal.d.ts +165 -0
  27. package/lib/api/encodeGlobal.d.ts.map +1 -0
  28. package/lib/api/encodeGlobal.js +11 -9
  29. package/lib/api/encodeNavigation.d.ts +19 -0
  30. package/lib/api/encodeNavigation.d.ts.map +1 -0
  31. package/lib/api/encodePage.d.ts +16 -0
  32. package/lib/api/encodePage.d.ts.map +1 -0
  33. package/lib/api/encodeProgress.d.ts +25 -0
  34. package/lib/api/encodeProgress.d.ts.map +1 -0
  35. package/lib/api/encodeSummary.d.ts +49 -0
  36. package/lib/api/encodeSummary.d.ts.map +1 -0
  37. package/lib/api/index.d.ts +12 -0
  38. package/lib/api/index.d.ts.map +1 -0
  39. package/lib/bin.d.ts +2 -0
  40. package/lib/bin.d.ts.map +1 -0
  41. package/lib/browser.d.ts +60 -0
  42. package/lib/browser.d.ts.map +1 -0
  43. package/lib/cli/build.d.ts +17 -0
  44. package/lib/cli/build.d.ts.map +1 -0
  45. package/lib/cli/buildEbook.d.ts +12 -0
  46. package/lib/cli/buildEbook.d.ts.map +1 -0
  47. package/lib/cli/getBook.d.ts +12 -0
  48. package/lib/cli/getBook.d.ts.map +1 -0
  49. package/lib/cli/getOutputFolder.d.ts +9 -0
  50. package/lib/cli/getOutputFolder.d.ts.map +1 -0
  51. package/lib/cli/index.d.ts +25 -0
  52. package/lib/cli/index.d.ts.map +1 -0
  53. package/lib/cli/init.d.ts +13 -0
  54. package/lib/cli/init.d.ts.map +1 -0
  55. package/lib/cli/options.d.ts +26 -0
  56. package/lib/cli/options.d.ts.map +1 -0
  57. package/lib/cli/parse.d.ts +13 -0
  58. package/lib/cli/parse.d.ts.map +1 -0
  59. package/lib/cli/serve.d.ts +25 -0
  60. package/lib/cli/serve.d.ts.map +1 -0
  61. package/lib/cli/server.d.ts +29 -0
  62. package/lib/cli/server.d.ts.map +1 -0
  63. package/lib/cli/watch.d.ts +10 -0
  64. package/lib/cli/watch.d.ts.map +1 -0
  65. package/lib/constants/__tests__/configSchema.d.ts +2 -0
  66. package/lib/constants/__tests__/configSchema.d.ts.map +1 -0
  67. package/lib/constants/configDefault.d.ts +3 -0
  68. package/lib/constants/configDefault.d.ts.map +1 -0
  69. package/lib/constants/configFiles.d.ts +3 -0
  70. package/lib/constants/configFiles.d.ts.map +1 -0
  71. package/lib/constants/configSchema.d.ts +221 -0
  72. package/lib/constants/configSchema.d.ts.map +1 -0
  73. package/lib/constants/defaultBlocks.d.ts +5 -0
  74. package/lib/constants/defaultBlocks.d.ts.map +1 -0
  75. package/lib/constants/defaultBlocks.js +8 -7
  76. package/lib/constants/defaultFilters.d.ts +4 -0
  77. package/lib/constants/defaultFilters.d.ts.map +1 -0
  78. package/lib/constants/defaultPlugins.d.ts +5 -0
  79. package/lib/constants/defaultPlugins.d.ts.map +1 -0
  80. package/lib/constants/extsAsciidoc.d.ts +3 -0
  81. package/lib/constants/extsAsciidoc.d.ts.map +1 -0
  82. package/lib/constants/extsMarkdown.d.ts +3 -0
  83. package/lib/constants/extsMarkdown.d.ts.map +1 -0
  84. package/lib/constants/ignoreFiles.d.ts +3 -0
  85. package/lib/constants/ignoreFiles.d.ts.map +1 -0
  86. package/lib/constants/pluginAssetsFolder.d.ts +3 -0
  87. package/lib/constants/pluginAssetsFolder.d.ts.map +1 -0
  88. package/lib/constants/pluginHooks.d.ts +3 -0
  89. package/lib/constants/pluginHooks.d.ts.map +1 -0
  90. package/lib/constants/pluginPrefix.d.ts +3 -0
  91. package/lib/constants/pluginPrefix.d.ts.map +1 -0
  92. package/lib/constants/pluginResources.d.ts +4 -0
  93. package/lib/constants/pluginResources.d.ts.map +1 -0
  94. package/lib/constants/templatesFolder.d.ts +3 -0
  95. package/lib/constants/templatesFolder.d.ts.map +1 -0
  96. package/lib/constants/themePrefix.d.ts +3 -0
  97. package/lib/constants/themePrefix.d.ts.map +1 -0
  98. package/lib/fs/__tests__/mock.d.ts +2 -0
  99. package/lib/fs/__tests__/mock.d.ts.map +1 -0
  100. package/lib/fs/mock.d.ts +9 -0
  101. package/lib/fs/mock.d.ts.map +1 -0
  102. package/lib/fs/node.d.ts +3 -0
  103. package/lib/fs/node.d.ts.map +1 -0
  104. package/lib/honkit.d.ts +15 -0
  105. package/lib/honkit.d.ts.map +1 -0
  106. package/lib/index.d.ts +3 -0
  107. package/lib/index.d.ts.map +1 -0
  108. package/lib/init.d.ts +11 -0
  109. package/lib/init.d.ts.map +1 -0
  110. package/lib/json/encodeBook.d.ts +51 -0
  111. package/lib/json/encodeBook.d.ts.map +1 -0
  112. package/lib/json/encodeBookWithPage.d.ts +52 -0
  113. package/lib/json/encodeBookWithPage.d.ts.map +1 -0
  114. package/lib/json/encodeFile.d.ts +13 -0
  115. package/lib/json/encodeFile.d.ts.map +1 -0
  116. package/lib/json/encodeGlossary.d.ts +16 -0
  117. package/lib/json/encodeGlossary.d.ts.map +1 -0
  118. package/lib/json/encodeGlossaryEntry.d.ts +13 -0
  119. package/lib/json/encodeGlossaryEntry.d.ts.map +1 -0
  120. package/lib/json/encodeLanguages.d.ts +16 -0
  121. package/lib/json/encodeLanguages.d.ts.map +1 -0
  122. package/lib/json/encodeOutput.d.ts +51 -0
  123. package/lib/json/encodeOutput.d.ts.map +1 -0
  124. package/lib/json/encodeOutputWithPage.d.ts +52 -0
  125. package/lib/json/encodeOutputWithPage.d.ts.map +1 -0
  126. package/lib/json/encodePage.d.ts +19 -0
  127. package/lib/json/encodePage.d.ts.map +1 -0
  128. package/lib/json/encodeReadme.d.ts +15 -0
  129. package/lib/json/encodeReadme.d.ts.map +1 -0
  130. package/lib/json/encodeSummary.d.ts +16 -0
  131. package/lib/json/encodeSummary.d.ts.map +1 -0
  132. package/lib/json/encodeSummaryArticle.d.ts +19 -0
  133. package/lib/json/encodeSummaryArticle.d.ts.map +1 -0
  134. package/lib/json/encodeSummaryArticleWithCache.d.ts +20 -0
  135. package/lib/json/encodeSummaryArticleWithCache.d.ts.map +1 -0
  136. package/lib/json/encodeSummaryPart.d.ts +12 -0
  137. package/lib/json/encodeSummaryPart.d.ts.map +1 -0
  138. package/lib/json/index.d.ts +24 -0
  139. package/lib/json/index.d.ts.map +1 -0
  140. package/lib/models/__tests__/config.d.ts +2 -0
  141. package/lib/models/__tests__/config.d.ts.map +1 -0
  142. package/lib/models/__tests__/glossary.d.ts +2 -0
  143. package/lib/models/__tests__/glossary.d.ts.map +1 -0
  144. package/lib/models/__tests__/glossaryEntry.d.ts +2 -0
  145. package/lib/models/__tests__/glossaryEntry.d.ts.map +1 -0
  146. package/lib/models/__tests__/page.d.ts +2 -0
  147. package/lib/models/__tests__/page.d.ts.map +1 -0
  148. package/lib/models/__tests__/plugin.d.ts +2 -0
  149. package/lib/models/__tests__/plugin.d.ts.map +1 -0
  150. package/lib/models/__tests__/pluginDependency.d.ts +2 -0
  151. package/lib/models/__tests__/pluginDependency.d.ts.map +1 -0
  152. package/lib/models/__tests__/summary.d.ts +2 -0
  153. package/lib/models/__tests__/summary.d.ts.map +1 -0
  154. package/lib/models/__tests__/summaryArticle.d.ts +2 -0
  155. package/lib/models/__tests__/summaryArticle.d.ts.map +1 -0
  156. package/lib/models/__tests__/summaryPart.d.ts +2 -0
  157. package/lib/models/__tests__/summaryPart.d.ts.map +1 -0
  158. package/lib/models/__tests__/templateBlock.d.ts +2 -0
  159. package/lib/models/__tests__/templateBlock.d.ts.map +1 -0
  160. package/lib/models/__tests__/templateEngine.d.ts +2 -0
  161. package/lib/models/__tests__/templateEngine.d.ts.map +1 -0
  162. package/lib/models/book.d.ts +158 -0
  163. package/lib/models/book.d.ts.map +1 -0
  164. package/lib/models/config.d.ts +82 -0
  165. package/lib/models/config.d.ts.map +1 -0
  166. package/lib/models/file.d.ts +54 -0
  167. package/lib/models/file.d.ts.map +1 -0
  168. package/lib/models/file.js +11 -4
  169. package/lib/models/fs.d.ts +116 -0
  170. package/lib/models/fs.d.ts.map +1 -0
  171. package/lib/models/glossary.d.ts +42 -0
  172. package/lib/models/glossary.d.ts.map +1 -0
  173. package/lib/models/glossary.js +4 -4
  174. package/lib/models/glossaryEntry.d.ts +16 -0
  175. package/lib/models/glossaryEntry.d.ts.map +1 -0
  176. package/lib/models/hash.d.ts +4 -0
  177. package/lib/models/hash.d.ts.map +1 -0
  178. package/lib/models/ignore.d.ts +20 -0
  179. package/lib/models/ignore.d.ts.map +1 -0
  180. package/lib/models/language.d.ts +9 -0
  181. package/lib/models/language.d.ts.map +1 -0
  182. package/lib/models/languages.d.ts +35 -0
  183. package/lib/models/languages.d.ts.map +1 -0
  184. package/lib/models/output.d.ts +53 -0
  185. package/lib/models/output.d.ts.map +1 -0
  186. package/lib/models/page.d.ts +44 -0
  187. package/lib/models/page.d.ts.map +1 -0
  188. package/lib/models/parser.d.ts +44 -0
  189. package/lib/models/parser.d.ts.map +1 -0
  190. package/lib/models/parser.js +14 -14
  191. package/lib/models/plugin.d.ts +69 -0
  192. package/lib/models/plugin.d.ts.map +1 -0
  193. package/lib/models/pluginDependency.d.ts +47 -0
  194. package/lib/models/pluginDependency.d.ts.map +1 -0
  195. package/lib/models/readme.d.ts +21 -0
  196. package/lib/models/readme.d.ts.map +1 -0
  197. package/lib/models/summary.d.ts +83 -0
  198. package/lib/models/summary.d.ts.map +1 -0
  199. package/lib/models/summaryArticle.d.ts +93 -0
  200. package/lib/models/summaryArticle.d.ts.map +1 -0
  201. package/lib/models/summaryPart.d.ts +23 -0
  202. package/lib/models/summaryPart.d.ts.map +1 -0
  203. package/lib/models/templateBlock.d.ts +54 -0
  204. package/lib/models/templateBlock.d.ts.map +1 -0
  205. package/lib/models/templateEngine.d.ts +35 -0
  206. package/lib/models/templateEngine.d.ts.map +1 -0
  207. package/lib/models/templateOutput.d.ts +18 -0
  208. package/lib/models/templateOutput.d.ts.map +1 -0
  209. package/lib/models/templateShortcut.d.ts +28 -0
  210. package/lib/models/templateShortcut.d.ts.map +1 -0
  211. package/lib/models/templateShortcut.js +3 -3
  212. package/lib/modifiers/config/__tests__/addPlugin.d.ts +2 -0
  213. package/lib/modifiers/config/__tests__/addPlugin.d.ts.map +1 -0
  214. package/lib/modifiers/config/__tests__/removePlugin.d.ts +2 -0
  215. package/lib/modifiers/config/__tests__/removePlugin.d.ts.map +1 -0
  216. package/lib/modifiers/config/__tests__/togglePlugin.d.ts +2 -0
  217. package/lib/modifiers/config/__tests__/togglePlugin.d.ts.map +1 -0
  218. package/lib/modifiers/config/addPlugin.d.ts +10 -0
  219. package/lib/modifiers/config/addPlugin.d.ts.map +1 -0
  220. package/lib/modifiers/config/editPlugin.d.ts +10 -0
  221. package/lib/modifiers/config/editPlugin.d.ts.map +1 -0
  222. package/lib/modifiers/config/getPluginConfig.d.ts +9 -0
  223. package/lib/modifiers/config/getPluginConfig.d.ts.map +1 -0
  224. package/lib/modifiers/config/hasPlugin.d.ts +10 -0
  225. package/lib/modifiers/config/hasPlugin.d.ts.map +1 -0
  226. package/lib/modifiers/config/index.d.ts +18 -0
  227. package/lib/modifiers/config/index.d.ts.map +1 -0
  228. package/lib/modifiers/config/isDefaultPlugin.d.ts +9 -0
  229. package/lib/modifiers/config/isDefaultPlugin.d.ts.map +1 -0
  230. package/lib/modifiers/config/removePlugin.d.ts +9 -0
  231. package/lib/modifiers/config/removePlugin.d.ts.map +1 -0
  232. package/lib/modifiers/config/togglePlugin.d.ts +10 -0
  233. package/lib/modifiers/config/togglePlugin.d.ts.map +1 -0
  234. package/lib/modifiers/index.d.ts +25 -0
  235. package/lib/modifiers/index.d.ts.map +1 -0
  236. package/lib/modifiers/summary/__tests__/editPartTitle.d.ts +2 -0
  237. package/lib/modifiers/summary/__tests__/editPartTitle.d.ts.map +1 -0
  238. package/lib/modifiers/summary/__tests__/insertArticle.d.ts +2 -0
  239. package/lib/modifiers/summary/__tests__/insertArticle.d.ts.map +1 -0
  240. package/lib/modifiers/summary/__tests__/insertPart.d.ts +2 -0
  241. package/lib/modifiers/summary/__tests__/insertPart.d.ts.map +1 -0
  242. package/lib/modifiers/summary/__tests__/mergeAtLevel.d.ts +2 -0
  243. package/lib/modifiers/summary/__tests__/mergeAtLevel.d.ts.map +1 -0
  244. package/lib/modifiers/summary/__tests__/moveArticle.d.ts +2 -0
  245. package/lib/modifiers/summary/__tests__/moveArticle.d.ts.map +1 -0
  246. package/lib/modifiers/summary/__tests__/moveArticleAfter.d.ts +2 -0
  247. package/lib/modifiers/summary/__tests__/moveArticleAfter.d.ts.map +1 -0
  248. package/lib/modifiers/summary/__tests__/removeArticle.d.ts +2 -0
  249. package/lib/modifiers/summary/__tests__/removeArticle.d.ts.map +1 -0
  250. package/lib/modifiers/summary/editArticleRef.d.ts +11 -0
  251. package/lib/modifiers/summary/editArticleRef.d.ts.map +1 -0
  252. package/lib/modifiers/summary/editArticleTitle.d.ts +11 -0
  253. package/lib/modifiers/summary/editArticleTitle.d.ts.map +1 -0
  254. package/lib/modifiers/summary/editPartTitle.d.ts +11 -0
  255. package/lib/modifiers/summary/editPartTitle.d.ts.map +1 -0
  256. package/lib/modifiers/summary/index.d.ts +24 -0
  257. package/lib/modifiers/summary/index.d.ts.map +1 -0
  258. package/lib/modifiers/summary/indexArticleLevels.d.ts +10 -0
  259. package/lib/modifiers/summary/indexArticleLevels.d.ts.map +1 -0
  260. package/lib/modifiers/summary/indexLevels.d.ts +9 -0
  261. package/lib/modifiers/summary/indexLevels.d.ts.map +1 -0
  262. package/lib/modifiers/summary/indexPartLevels.d.ts +10 -0
  263. package/lib/modifiers/summary/indexPartLevels.d.ts.map +1 -0
  264. package/lib/modifiers/summary/insertArticle.d.ts +12 -0
  265. package/lib/modifiers/summary/insertArticle.d.ts.map +1 -0
  266. package/lib/modifiers/summary/insertPart.d.ts +13 -0
  267. package/lib/modifiers/summary/insertPart.d.ts.map +1 -0
  268. package/lib/modifiers/summary/mergeAtLevel.d.ts +11 -0
  269. package/lib/modifiers/summary/mergeAtLevel.d.ts.map +1 -0
  270. package/lib/modifiers/summary/moveArticle.d.ts +12 -0
  271. package/lib/modifiers/summary/moveArticle.d.ts.map +1 -0
  272. package/lib/modifiers/summary/moveArticleAfter.d.ts +13 -0
  273. package/lib/modifiers/summary/moveArticleAfter.d.ts.map +1 -0
  274. package/lib/modifiers/summary/removeArticle.d.ts +10 -0
  275. package/lib/modifiers/summary/removeArticle.d.ts.map +1 -0
  276. package/lib/modifiers/summary/removePart.d.ts +10 -0
  277. package/lib/modifiers/summary/removePart.d.ts.map +1 -0
  278. package/lib/modifiers/summary/unshiftArticle.d.ts +10 -0
  279. package/lib/modifiers/summary/unshiftArticle.d.ts.map +1 -0
  280. package/lib/output/Generator.d.ts +14 -0
  281. package/lib/output/Generator.d.ts.map +1 -0
  282. package/lib/output/__tests__/ebook.d.ts +2 -0
  283. package/lib/output/__tests__/ebook.d.ts.map +1 -0
  284. package/lib/output/__tests__/json.d.ts +2 -0
  285. package/lib/output/__tests__/json.d.ts.map +1 -0
  286. package/lib/output/__tests__/plugin-hooks.d.ts +2 -0
  287. package/lib/output/__tests__/plugin-hooks.d.ts.map +1 -0
  288. package/lib/output/__tests__/website.d.ts +2 -0
  289. package/lib/output/__tests__/website.d.ts.map +1 -0
  290. package/lib/output/callHook.d.ts +12 -0
  291. package/lib/output/callHook.d.ts.map +1 -0
  292. package/lib/output/callPageHook.d.ts +11 -0
  293. package/lib/output/callPageHook.d.ts.map +1 -0
  294. package/lib/output/createTemplateEngine.d.ts +11 -0
  295. package/lib/output/createTemplateEngine.d.ts.map +1 -0
  296. package/lib/output/ebook/getConvertOptions.d.ts +9 -0
  297. package/lib/output/ebook/getConvertOptions.d.ts.map +1 -0
  298. package/lib/output/ebook/getCoverPath.d.ts +9 -0
  299. package/lib/output/ebook/getCoverPath.d.ts.map +1 -0
  300. package/lib/output/ebook/getPDFTemplate.d.ts +10 -0
  301. package/lib/output/ebook/getPDFTemplate.d.ts.map +1 -0
  302. package/lib/output/ebook/index.d.ts +3 -0
  303. package/lib/output/ebook/index.d.ts.map +1 -0
  304. package/lib/output/ebook/onFinish.d.ts +9 -0
  305. package/lib/output/ebook/onFinish.d.ts.map +1 -0
  306. package/lib/output/ebook/onPage.d.ts +9 -0
  307. package/lib/output/ebook/onPage.d.ts.map +1 -0
  308. package/lib/output/ebook/options.d.ts +4 -0
  309. package/lib/output/ebook/options.d.ts.map +1 -0
  310. package/lib/output/generateAssets.d.ts +10 -0
  311. package/lib/output/generateAssets.d.ts.map +1 -0
  312. package/lib/output/generateBook.d.ts +32 -0
  313. package/lib/output/generateBook.d.ts.map +1 -0
  314. package/lib/output/generatePage.d.ts +10 -0
  315. package/lib/output/generatePage.d.ts.map +1 -0
  316. package/lib/output/generatePage.js +12 -5
  317. package/lib/output/generatePages.d.ts +10 -0
  318. package/lib/output/generatePages.d.ts.map +1 -0
  319. package/lib/output/getModifiers.d.ts +9 -0
  320. package/lib/output/getModifiers.d.ts.map +1 -0
  321. package/lib/output/helper/fileToOutput.d.ts +10 -0
  322. package/lib/output/helper/fileToOutput.d.ts.map +1 -0
  323. package/lib/output/helper/fileToURL.d.ts +15 -0
  324. package/lib/output/helper/fileToURL.d.ts.map +1 -0
  325. package/lib/output/helper/index.d.ts +3 -0
  326. package/lib/output/helper/index.d.ts.map +1 -0
  327. package/lib/output/helper/resolveFileToURL.d.ts +10 -0
  328. package/lib/output/helper/resolveFileToURL.d.ts.map +1 -0
  329. package/lib/output/helper/writeFile.d.ts +11 -0
  330. package/lib/output/helper/writeFile.d.ts.map +1 -0
  331. package/lib/output/index.d.ts +13 -0
  332. package/lib/output/index.d.ts.map +1 -0
  333. package/lib/output/json/index.d.ts +10 -0
  334. package/lib/output/json/index.d.ts.map +1 -0
  335. package/lib/output/json/onFinish.d.ts +8 -0
  336. package/lib/output/json/onFinish.d.ts.map +1 -0
  337. package/lib/output/json/onPage.d.ts +9 -0
  338. package/lib/output/json/onPage.d.ts.map +1 -0
  339. package/lib/output/json/options.d.ts +4 -0
  340. package/lib/output/json/options.d.ts.map +1 -0
  341. package/lib/output/modifiers/__tests__/addHeadingId.d.ts +2 -0
  342. package/lib/output/modifiers/__tests__/addHeadingId.d.ts.map +1 -0
  343. package/lib/output/modifiers/__tests__/annotateText.d.ts +2 -0
  344. package/lib/output/modifiers/__tests__/annotateText.d.ts.map +1 -0
  345. package/lib/output/modifiers/__tests__/fetchRemoteImages.d.ts +2 -0
  346. package/lib/output/modifiers/__tests__/fetchRemoteImages.d.ts.map +1 -0
  347. package/lib/output/modifiers/__tests__/fetchRemoteImages.js +4 -2
  348. package/lib/output/modifiers/__tests__/highlightCode.d.ts +2 -0
  349. package/lib/output/modifiers/__tests__/highlightCode.d.ts.map +1 -0
  350. package/lib/output/modifiers/__tests__/inlinePng.d.ts +2 -0
  351. package/lib/output/modifiers/__tests__/inlinePng.d.ts.map +1 -0
  352. package/lib/output/modifiers/__tests__/inlineSvg.d.ts +2 -0
  353. package/lib/output/modifiers/__tests__/inlineSvg.d.ts.map +1 -0
  354. package/lib/output/modifiers/__tests__/resolveImages.d.ts +2 -0
  355. package/lib/output/modifiers/__tests__/resolveImages.d.ts.map +1 -0
  356. package/lib/output/modifiers/__tests__/resolveLinks.d.ts +2 -0
  357. package/lib/output/modifiers/__tests__/resolveLinks.d.ts.map +1 -0
  358. package/lib/output/modifiers/__tests__/svgToImg.d.ts +2 -0
  359. package/lib/output/modifiers/__tests__/svgToImg.d.ts.map +1 -0
  360. package/lib/output/modifiers/addHeadingId.d.ts +8 -0
  361. package/lib/output/modifiers/addHeadingId.d.ts.map +1 -0
  362. package/lib/output/modifiers/annotateText.d.ts +10 -0
  363. package/lib/output/modifiers/annotateText.d.ts.map +1 -0
  364. package/lib/output/modifiers/editHTMLElement.d.ts +6 -0
  365. package/lib/output/modifiers/editHTMLElement.d.ts.map +1 -0
  366. package/lib/output/modifiers/fetchRemoteImages.d.ts +7 -0
  367. package/lib/output/modifiers/fetchRemoteImages.d.ts.map +1 -0
  368. package/lib/output/modifiers/highlightCode.d.ts +10 -0
  369. package/lib/output/modifiers/highlightCode.d.ts.map +1 -0
  370. package/lib/output/modifiers/index.d.ts +22 -0
  371. package/lib/output/modifiers/index.d.ts.map +1 -0
  372. package/lib/output/modifiers/inlineAssets.d.ts +8 -0
  373. package/lib/output/modifiers/inlineAssets.d.ts.map +1 -0
  374. package/lib/output/modifiers/inlinePng.d.ts +10 -0
  375. package/lib/output/modifiers/inlinePng.d.ts.map +1 -0
  376. package/lib/output/modifiers/inlineSvg.d.ts +10 -0
  377. package/lib/output/modifiers/inlineSvg.d.ts.map +1 -0
  378. package/lib/output/modifiers/modifyHTML.d.ts +11 -0
  379. package/lib/output/modifiers/modifyHTML.d.ts.map +1 -0
  380. package/lib/output/modifiers/resolveImages.d.ts +10 -0
  381. package/lib/output/modifiers/resolveImages.d.ts.map +1 -0
  382. package/lib/output/modifiers/resolveLinks.d.ts +11 -0
  383. package/lib/output/modifiers/resolveLinks.d.ts.map +1 -0
  384. package/lib/output/modifiers/svgToImg.d.ts +9 -0
  385. package/lib/output/modifiers/svgToImg.d.ts.map +1 -0
  386. package/lib/output/page-cache.d.ts +3 -0
  387. package/lib/output/page-cache.d.ts.map +1 -0
  388. package/lib/output/prepareAssets.d.ts +9 -0
  389. package/lib/output/prepareAssets.d.ts.map +1 -0
  390. package/lib/output/preparePages.d.ts +9 -0
  391. package/lib/output/preparePages.d.ts.map +1 -0
  392. package/lib/output/preparePlugins.d.ts +9 -0
  393. package/lib/output/preparePlugins.d.ts.map +1 -0
  394. package/lib/output/testing/createMock.d.ts +13 -0
  395. package/lib/output/testing/createMock.d.ts.map +1 -0
  396. package/lib/output/testing/generateMock.d.ts +24 -0
  397. package/lib/output/testing/generateMock.d.ts.map +1 -0
  398. package/lib/output/website/__tests__/i18n.d.ts +2 -0
  399. package/lib/output/website/__tests__/i18n.d.ts.map +1 -0
  400. package/lib/output/website/copyPluginAssets.d.ts +11 -0
  401. package/lib/output/website/copyPluginAssets.d.ts.map +1 -0
  402. package/lib/output/website/createTemplateEngine.d.ts +12 -0
  403. package/lib/output/website/createTemplateEngine.d.ts.map +1 -0
  404. package/lib/output/website/index.d.ts +18 -0
  405. package/lib/output/website/index.d.ts.map +1 -0
  406. package/lib/output/website/listSearchPaths.d.ts +9 -0
  407. package/lib/output/website/listSearchPaths.d.ts.map +1 -0
  408. package/lib/output/website/onAsset.d.ts +9 -0
  409. package/lib/output/website/onAsset.d.ts.map +1 -0
  410. package/lib/output/website/onFinish.d.ts +9 -0
  411. package/lib/output/website/onFinish.d.ts.map +1 -0
  412. package/lib/output/website/onInit.d.ts +9 -0
  413. package/lib/output/website/onInit.d.ts.map +1 -0
  414. package/lib/output/website/onPage.d.ts +9 -0
  415. package/lib/output/website/onPage.d.ts.map +1 -0
  416. package/lib/output/website/options.d.ts +4 -0
  417. package/lib/output/website/options.d.ts.map +1 -0
  418. package/lib/output/website/prepareI18n.d.ts +9 -0
  419. package/lib/output/website/prepareI18n.d.ts.map +1 -0
  420. package/lib/output/website/prepareResources.d.ts +9 -0
  421. package/lib/output/website/prepareResources.d.ts.map +1 -0
  422. package/lib/output/website/state.d.ts +10 -0
  423. package/lib/output/website/state.d.ts.map +1 -0
  424. package/lib/parse/__tests__/listAssets.d.ts +2 -0
  425. package/lib/parse/__tests__/listAssets.d.ts.map +1 -0
  426. package/lib/parse/__tests__/parseBook.d.ts +2 -0
  427. package/lib/parse/__tests__/parseBook.d.ts.map +1 -0
  428. package/lib/parse/__tests__/parseGlossary.d.ts +2 -0
  429. package/lib/parse/__tests__/parseGlossary.d.ts.map +1 -0
  430. package/lib/parse/__tests__/parseIgnore.d.ts +2 -0
  431. package/lib/parse/__tests__/parseIgnore.d.ts.map +1 -0
  432. package/lib/parse/__tests__/parsePageFromString.d.ts +2 -0
  433. package/lib/parse/__tests__/parsePageFromString.d.ts.map +1 -0
  434. package/lib/parse/__tests__/parseReadme.d.ts +2 -0
  435. package/lib/parse/__tests__/parseReadme.d.ts.map +1 -0
  436. package/lib/parse/__tests__/parseSummary.d.ts +2 -0
  437. package/lib/parse/__tests__/parseSummary.d.ts.map +1 -0
  438. package/lib/parse/findParsableFile.d.ts +10 -0
  439. package/lib/parse/findParsableFile.d.ts.map +1 -0
  440. package/lib/parse/index.d.ts +28 -0
  441. package/lib/parse/index.d.ts.map +1 -0
  442. package/lib/parse/listAssets.d.ts +11 -0
  443. package/lib/parse/listAssets.d.ts.map +1 -0
  444. package/lib/parse/lookupStructureFile.d.ts +12 -0
  445. package/lib/parse/lookupStructureFile.d.ts.map +1 -0
  446. package/lib/parse/parseBook.d.ts +9 -0
  447. package/lib/parse/parseBook.d.ts.map +1 -0
  448. package/lib/parse/parseConfig.d.ts +9 -0
  449. package/lib/parse/parseConfig.d.ts.map +1 -0
  450. package/lib/parse/parseConfig.js +1 -1
  451. package/lib/parse/parseGlossary.d.ts +9 -0
  452. package/lib/parse/parseGlossary.d.ts.map +1 -0
  453. package/lib/parse/parseIgnore.d.ts +9 -0
  454. package/lib/parse/parseIgnore.d.ts.map +1 -0
  455. package/lib/parse/parseLanguages.d.ts +9 -0
  456. package/lib/parse/parseLanguages.d.ts.map +1 -0
  457. package/lib/parse/parsePage.d.ts +10 -0
  458. package/lib/parse/parsePage.d.ts.map +1 -0
  459. package/lib/parse/parsePageFromString.d.ts +10 -0
  460. package/lib/parse/parsePageFromString.d.ts.map +1 -0
  461. package/lib/parse/parsePagesList.d.ts +9 -0
  462. package/lib/parse/parsePagesList.d.ts.map +1 -0
  463. package/lib/parse/parseReadme.d.ts +9 -0
  464. package/lib/parse/parseReadme.d.ts.map +1 -0
  465. package/lib/parse/parseStructureFile.d.ts +11 -0
  466. package/lib/parse/parseStructureFile.d.ts.map +1 -0
  467. package/lib/parse/parseStructureFile.js +7 -5
  468. package/lib/parse/parseSummary.d.ts +10 -0
  469. package/lib/parse/parseSummary.d.ts.map +1 -0
  470. package/lib/parse/validateConfig.d.ts +10 -0
  471. package/lib/parse/validateConfig.d.ts.map +1 -0
  472. package/lib/parse/walkSummary.d.ts +10 -0
  473. package/lib/parse/walkSummary.d.ts.map +1 -0
  474. package/lib/parsers.d.ts +31 -0
  475. package/lib/parsers.d.ts.map +1 -0
  476. package/lib/parsers.js +5 -5
  477. package/lib/plugins/PluginResolver.d.ts +26 -0
  478. package/lib/plugins/PluginResolver.d.ts.map +1 -0
  479. package/lib/plugins/__tests__/listDependencies.d.ts +2 -0
  480. package/lib/plugins/__tests__/listDependencies.d.ts.map +1 -0
  481. package/lib/plugins/__tests__/sortDependencies.d.ts +2 -0
  482. package/lib/plugins/__tests__/sortDependencies.d.ts.map +1 -0
  483. package/lib/plugins/__tests__/validatePlugin.d.ts +2 -0
  484. package/lib/plugins/__tests__/validatePlugin.d.ts.map +1 -0
  485. package/lib/plugins/index.d.ts +14 -0
  486. package/lib/plugins/index.d.ts.map +1 -0
  487. package/lib/plugins/listBlocks.d.ts +9 -0
  488. package/lib/plugins/listBlocks.d.ts.map +1 -0
  489. package/lib/plugins/listDependencies.d.ts +10 -0
  490. package/lib/plugins/listDependencies.d.ts.map +1 -0
  491. package/lib/plugins/listDepsForBook.d.ts +11 -0
  492. package/lib/plugins/listDepsForBook.d.ts.map +1 -0
  493. package/lib/plugins/listFilters.d.ts +9 -0
  494. package/lib/plugins/listFilters.d.ts.map +1 -0
  495. package/lib/plugins/listResources.d.ts +9 -0
  496. package/lib/plugins/listResources.d.ts.map +1 -0
  497. package/lib/plugins/loadForBook.d.ts +9 -0
  498. package/lib/plugins/loadForBook.d.ts.map +1 -0
  499. package/lib/plugins/loadPlugin.d.ts +11 -0
  500. package/lib/plugins/loadPlugin.d.ts.map +1 -0
  501. package/lib/plugins/package-name-util.d.ts +13 -0
  502. package/lib/plugins/package-name-util.d.ts.map +1 -0
  503. package/lib/plugins/sortDependencies.d.ts +10 -0
  504. package/lib/plugins/sortDependencies.d.ts.map +1 -0
  505. package/lib/plugins/toNames.d.ts +9 -0
  506. package/lib/plugins/toNames.d.ts.map +1 -0
  507. package/lib/plugins/validateConfig.d.ts +11 -0
  508. package/lib/plugins/validateConfig.d.ts.map +1 -0
  509. package/lib/plugins/validatePlugin.d.ts +9 -0
  510. package/lib/plugins/validatePlugin.d.ts.map +1 -0
  511. package/lib/templating/__tests__/conrefsLoader.d.ts +2 -0
  512. package/lib/templating/__tests__/conrefsLoader.d.ts.map +1 -0
  513. package/lib/templating/__tests__/postRender.d.ts +2 -0
  514. package/lib/templating/__tests__/postRender.d.ts.map +1 -0
  515. package/lib/templating/__tests__/replaceShortcuts.d.ts +2 -0
  516. package/lib/templating/__tests__/replaceShortcuts.d.ts.map +1 -0
  517. package/lib/templating/conrefsLoader.d.ts +14 -0
  518. package/lib/templating/conrefsLoader.d.ts.map +1 -0
  519. package/lib/templating/conrefsLoader.js +3 -3
  520. package/lib/templating/index.d.ts +14 -0
  521. package/lib/templating/index.d.ts.map +1 -0
  522. package/lib/templating/listShortcuts.d.ts +11 -0
  523. package/lib/templating/listShortcuts.d.ts.map +1 -0
  524. package/lib/templating/postRender.d.ts +12 -0
  525. package/lib/templating/postRender.d.ts.map +1 -0
  526. package/lib/templating/render.d.ts +12 -0
  527. package/lib/templating/render.d.ts.map +1 -0
  528. package/lib/templating/renderFile.d.ts +11 -0
  529. package/lib/templating/renderFile.d.ts.map +1 -0
  530. package/lib/templating/replaceShortcuts.d.ts +11 -0
  531. package/lib/templating/replaceShortcuts.d.ts.map +1 -0
  532. package/lib/templating/themesLoader.d.ts +4 -0
  533. package/lib/templating/themesLoader.d.ts.map +1 -0
  534. package/lib/utils/__tests__/git.d.ts +2 -0
  535. package/lib/utils/__tests__/git.d.ts.map +1 -0
  536. package/lib/utils/__tests__/location.d.ts +2 -0
  537. package/lib/utils/__tests__/location.d.ts.map +1 -0
  538. package/lib/utils/__tests__/path.d.ts +2 -0
  539. package/lib/utils/__tests__/path.d.ts.map +1 -0
  540. package/lib/utils/command.d.ts +25 -0
  541. package/lib/utils/command.d.ts.map +1 -0
  542. package/lib/utils/error.d.ts +16 -0
  543. package/lib/utils/error.d.ts.map +1 -0
  544. package/lib/utils/fs.d.ts +58 -0
  545. package/lib/utils/fs.d.ts.map +1 -0
  546. package/lib/utils/genKey.d.ts +3 -0
  547. package/lib/utils/genKey.d.ts.map +1 -0
  548. package/lib/utils/git.d.ts +11 -0
  549. package/lib/utils/git.d.ts.map +1 -0
  550. package/lib/utils/images.d.ts +6 -0
  551. package/lib/utils/images.d.ts.map +1 -0
  552. package/lib/utils/location.d.ts +62 -0
  553. package/lib/utils/location.d.ts.map +1 -0
  554. package/lib/utils/logger.d.ts +7 -0
  555. package/lib/utils/logger.d.ts.map +1 -0
  556. package/lib/utils/mergeDefaults.d.ts +9 -0
  557. package/lib/utils/mergeDefaults.d.ts.map +1 -0
  558. package/lib/utils/path.d.ts +14 -0
  559. package/lib/utils/path.d.ts.map +1 -0
  560. package/lib/utils/promise.d.ts +52 -0
  561. package/lib/utils/promise.d.ts.map +1 -0
  562. package/lib/utils/reducedObject.d.ts +9 -0
  563. package/lib/utils/reducedObject.d.ts.map +1 -0
  564. package/lib/utils/timing.d.ts +20 -0
  565. package/lib/utils/timing.d.ts.map +1 -0
  566. package/package.json +10 -9
@@ -0,0 +1,13 @@
1
+ import GeneratorState from "./output/website/state";
2
+ import createTemplateEngine from "./output/website/createTemplateEngine";
3
+ export interface BuildGenerator {
4
+ name: string;
5
+ State: GeneratorState;
6
+ Options: any;
7
+ onInit: Function;
8
+ onFinish: Function;
9
+ onPage: Function;
10
+ onAsset: Function;
11
+ createTemplateEngine: typeof createTemplateEngine;
12
+ }
13
+ //# sourceMappingURL=BuildGenerator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BuildGenerator.d.ts","sourceRoot":"","sources":["../src/BuildGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAC;AACpD,OAAO,oBAAoB,MAAM,uCAAuC,CAAC;AAEzE,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,QAAQ,CAAC;IACjB,OAAO,EAAE,QAAQ,CAAC;IAClB,oBAAoB,EAAE,OAAO,oBAAoB,CAAC;CACrD"}
@@ -0,0 +1,7 @@
1
+ export const root: string;
2
+ export const title: string;
3
+ export const gitbook: string;
4
+ export namespace variables {
5
+ const version: string;
6
+ }
7
+ //# sourceMappingURL=book.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"book.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/__fixtures__/honkit/book.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=e2e.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e2e.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/e2e.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/__tests__/init.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=satisfies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"satisfies.d.ts","sourceRoot":"","sources":["../../src/__tests__/satisfies.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=snapshot-asciidoc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot-asciidoc.d.ts","sourceRoot":"","sources":["../../src/__tests__/snapshot-asciidoc.ts"],"names":[],"mappings":""}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const path_1 = __importDefault(require("path"));
30
+ const internal_test_utils_1 = require("@honkit/internal-test-utils");
31
+ const bin = __importStar(require("../bin"));
32
+ it("asciidoc snapshot", async () => {
33
+ const bookDir = path_1.default.join(__dirname, "__fixtures__/asciidoc");
34
+ const outputDir = path_1.default.join(__dirname, "__fixtures__/asciidoc/_book");
35
+ await bin.run([process.argv[0], ".", "build", bookDir, "--reload"]);
36
+ const maskContent = (content) => {
37
+ return content
38
+ .replace(/gitbook\.page\.hasChanged\(.*\);/g, ``)
39
+ .replace(/<meta name="generator" content="HonKit .*">/g, "");
40
+ };
41
+ for await (const item of (0, internal_test_utils_1.iterateDirectoryContents)({
42
+ baseDir: outputDir,
43
+ allowExtensions: [".html"],
44
+ maskContent
45
+ })) {
46
+ expect(item).toMatchSnapshot(item.filePath);
47
+ }
48
+ }, 60 * 1000);
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=snapshot-honkit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot-honkit.d.ts","sourceRoot":"","sources":["../../src/__tests__/snapshot-honkit.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ /**
2
+ Decode changes from a JS API to a config object
3
+
4
+ @param {Config} config
5
+ @param {Object} result: result from API
6
+ @return {Config}
7
+ */
8
+ declare function decodeConfig(config: any, result: any): any;
9
+ export { decodeConfig };
10
+ //# sourceMappingURL=decodeConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decodeConfig.d.ts","sourceRoot":"","sources":["../../src/api/decodeConfig.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,iBAAS,YAAY,CAAC,MAAM,KAAA,EAAE,MAAM,KAAA,OAOnC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ Decode changes from a JS API to a output object.
3
+ Only the configuration can be edited by plugin's hooks
4
+
5
+ @param {Output} output
6
+ @param {Object} result: result from API
7
+ @return {Output}
8
+ */
9
+ declare function decodeGlobal(output: any, result: any): any;
10
+ export { decodeGlobal };
11
+ //# sourceMappingURL=decodeGlobal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decodeGlobal.d.ts","sourceRoot":"","sources":["../../src/api/decodeGlobal.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,iBAAS,YAAY,CAAC,MAAM,KAAA,EAAE,MAAM,KAAA,OASnC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ Decode changes from a JS API to a page object.
3
+ Only the content can be edited by plugin's hooks.
4
+
5
+ @param {Output} output
6
+ @param {Page} page: page instance to edit
7
+ @param {Object} result: result from API
8
+ @return {Page}
9
+ */
10
+ declare function decodePage(output: any, page: any, result: any): any;
11
+ export default decodePage;
12
+ //# sourceMappingURL=decodePage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decodePage.d.ts","sourceRoot":"","sources":["../../src/api/decodePage.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,iBAAS,UAAU,CAAC,MAAM,KAAA,EAAE,IAAI,KAAA,EAAE,MAAM,KAAA,OAiCvC;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ Deprecate a function
3
+
4
+ @param {Book|Output} book
5
+ @param {string} key: unique identitifer for the deprecated
6
+ @param {Function} fn
7
+ @param {string} msg: message to print when called
8
+ @return {Function}
9
+ */
10
+ declare function deprecateMethod(book: any, key: any, fn: any, msg: any): () => any;
11
+ /**
12
+ Deprecate a property of an object
13
+
14
+ @param {Book|Output} book
15
+ @param {string} key: unique identitifer for the deprecated
16
+ @param {Object} instance
17
+ @param {String|Function} property
18
+ @param {string} msg: message to print when called
19
+ @return {Function}
20
+ */
21
+ declare function deprecateField(book: any, key: any, instance: any, property: any, value: any, msg: any): void;
22
+ /**
23
+ Enable a deprecation
24
+
25
+ @param {string} key: unique identitifer
26
+ */
27
+ declare function enableDeprecation(key: any): void;
28
+ /**
29
+ Disable a deprecation
30
+
31
+ @param {string} key: unique identitifer
32
+ */
33
+ declare function disableDeprecation(key: any): void;
34
+ /**
35
+ Deprecate a method in favor of another one
36
+
37
+ @param {Book} book
38
+ @param {string} key
39
+ @param {Object} instance
40
+ @param {string} oldName
41
+ @param {string} newName
42
+ */
43
+ declare function deprecateRenamedMethod(book: any, key: any, instance: any, oldName: any, newName: any, msg: any): void;
44
+ declare const _default: {
45
+ method: typeof deprecateMethod;
46
+ renamedMethod: typeof deprecateRenamedMethod;
47
+ field: typeof deprecateField;
48
+ enable: typeof enableDeprecation;
49
+ disable: typeof disableDeprecation;
50
+ };
51
+ export default _default;
52
+ //# sourceMappingURL=deprecate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecate.d.ts","sourceRoot":"","sources":["../../src/api/deprecate.ts"],"names":[],"mappings":"AAsBA;;;;;;;;GAQG;AACH,iBAAS,eAAe,CAAC,IAAI,KAAA,EAAE,GAAG,KAAA,EAAE,EAAE,KAAA,EAAE,GAAG,KAAA,aAM1C;AAED;;;;;;;;;GASG;AACH,iBAAS,cAAc,CAAC,IAAI,KAAA,EAAE,GAAG,KAAA,EAAE,QAAQ,KAAA,EAAE,QAAQ,KAAA,EAAE,KAAK,KAAA,EAAE,GAAG,KAAA,QA8BhE;AAED;;;;GAIG;AACH,iBAAS,iBAAiB,CAAC,GAAG,KAAA,QAE7B;AAED;;;;GAIG;AACH,iBAAS,kBAAkB,CAAC,GAAG,KAAA,QAE9B;AAED;;;;;;;;GAQG;AACH,iBAAS,sBAAsB,CAAC,IAAI,KAAA,EAAE,GAAG,KAAA,EAAE,QAAQ,KAAA,EAAE,OAAO,KAAA,EAAE,OAAO,KAAA,EAAE,GAAG,KAAA,QAKzE;;;;;;;;AAED,wBAME"}
@@ -0,0 +1,12 @@
1
+ import Output from "../models/output";
2
+ import Config from "../models/config";
3
+ /**
4
+ Encode a config object into a JS config api
5
+ */
6
+ declare function encodeConfig(output: Output, config: Config): {
7
+ values: any;
8
+ get: (key: any, defaultValue: any) => any;
9
+ set: (key: any, value: any) => any;
10
+ };
11
+ export default encodeConfig;
12
+ //# sourceMappingURL=encodeConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encodeConfig.d.ts","sourceRoot":"","sources":["../../src/api/encodeConfig.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC;;GAEG;AAEH,iBAAS,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;EAyCnD;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,165 @@
1
+ import { ParserOptions } from "../models/parser";
2
+ /**
3
+ Encode a global context into a JS object
4
+ It's the context for page's hook, etc
5
+
6
+ @param {Output} output
7
+ @return {Object}
8
+ */
9
+ declare function encodeGlobal(output: any): {
10
+ log: any;
11
+ config: {
12
+ values: any;
13
+ get: (key: any, defaultValue: any) => any;
14
+ set: (key: any, value: any) => any;
15
+ };
16
+ summary: {
17
+ walk: (iter: any) => void;
18
+ getArticleByLevel: (level: any) => {
19
+ title: string;
20
+ level: string;
21
+ depth: number;
22
+ anchor: string;
23
+ url: string;
24
+ path: string;
25
+ ref: string;
26
+ articles: any;
27
+ };
28
+ getArticleByPath: (level: any) => {
29
+ title: string;
30
+ level: string;
31
+ depth: number;
32
+ anchor: string;
33
+ url: string;
34
+ path: string;
35
+ ref: string;
36
+ articles: any;
37
+ };
38
+ };
39
+ /**
40
+ Check if the book is a multilingual book
41
+
42
+ @return {boolean}
43
+ */
44
+ isMultilingual: () => any;
45
+ /**
46
+ Check if the book is a language book for a multilingual book
47
+
48
+ @return {boolean}
49
+ */
50
+ isLanguageBook: () => any;
51
+ /**
52
+ Read a file from the book
53
+
54
+ @param {string} fileName
55
+ @return {Promise<Buffer>}
56
+ */
57
+ readFile: (fileName: any) => any;
58
+ /**
59
+ Read a file from the book as a string
60
+
61
+ @param {string} fileName
62
+ @return {Promise<String>}
63
+ */
64
+ readFileAsString: (fileName: any) => any;
65
+ /**
66
+ Resolve a file from the book root
67
+
68
+ @param {string} fileName
69
+ @return {string}
70
+ */
71
+ resolve: (fileName: any) => string;
72
+ /**
73
+ Resolve a page by it path
74
+
75
+ @param {string} filePath
76
+ @return {string}
77
+ */
78
+ getPageByPath: (filePath: any) => import("./encodePage").EncodedPageWithAttributes;
79
+ /**
80
+ Render a block of text (markdown/asciidoc)
81
+
82
+ @param {string} type
83
+ @param {string} text
84
+ @param options
85
+ @return {Promise<String>}
86
+ */
87
+ renderBlock: (type: string, text: string, options: ParserOptions) => any;
88
+ /**
89
+ Render an inline text (markdown/asciidoc)
90
+
91
+ @param {string} type
92
+ @param {string} text
93
+ @param options
94
+ @return {Promise<String>}
95
+ */
96
+ renderInline: (type: string, text: string, options: ParserOptions) => any;
97
+ template: {
98
+ /**
99
+ Apply a templating block and returns its result
100
+
101
+ @param {string} name
102
+ @param {Object} blockData
103
+ @return {Promise|Object}
104
+ */
105
+ applyBlock: (name: any, blockData: any) => any;
106
+ };
107
+ output: {
108
+ /**
109
+ Name of the generator being used
110
+ {string}
111
+ */
112
+ name: any;
113
+ /**
114
+ Return absolute path to the root folder of output
115
+ @return {string}
116
+ */
117
+ root: () => any;
118
+ /**
119
+ Resolve a file from the output root
120
+
121
+ @param {string} fileName
122
+ @return {string}
123
+ */
124
+ resolve: (fileName: any) => string;
125
+ /**
126
+ Convert a filepath into an url
127
+ @return {string}
128
+ */
129
+ toURL: (filePath: any) => string;
130
+ /**
131
+ Check that a file exists.
132
+
133
+ @param {string} fileName
134
+ @return {Promise}
135
+ */
136
+ hasFile: (fileName: any, content: any) => any;
137
+ /**
138
+ Write a file to the output folder,
139
+ It creates the required folder
140
+
141
+ @param {string} fileName
142
+ @param {Buffer} content
143
+ @return {Promise}
144
+ */
145
+ writeFile: (fileName: any, content: any) => any;
146
+ /**
147
+ Copy a file to the output folder
148
+ It creates the required folder.
149
+
150
+ @param {string} inputFile
151
+ @param {string} outputFile
152
+ @param {Buffer} content
153
+ @return {Promise}
154
+ */
155
+ copyFile: (inputFile: any, outputFile: any, content: any) => any;
156
+ };
157
+ gitbook: {
158
+ version: any;
159
+ };
160
+ honkit: {
161
+ version: any;
162
+ };
163
+ };
164
+ export default encodeGlobal;
165
+ //# sourceMappingURL=encodeGlobal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encodeGlobal.d.ts","sourceRoot":"","sources":["../../src/api/encodeGlobal.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;;;;GAMG;AACH,iBAAS,YAAY,CAAC,MAAM,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAapB;;;;OAIG;;IAKH;;;;OAIG;;IAKH;;;;;OAKG;;IAKH;;;;;OAKG;;IAKH;;;;;OAKG;;IAKH;;;;;OAKG;;IAQH;;;;;;;OAOG;wBAC0B,MAAM,QAAQ,MAAM,WAAW,aAAa;IAMzE;;;;;;;OAOG;yBAC2B,MAAM,QAAQ,MAAM,WAAW,aAAa;;QAOtE;;;;;;WAMG;;;;QASH;;;WAGG;;QAGH;;;WAGG;;QAKH;;;;;WAKG;;QAKH;;;WAGG;;QAKH;;;;;WAKG;;QAUH;;;;;;;WAOG;;QAYH;;;;;;;;WAQG;;;;;;;;;EAoEd;AAED,eAAe,YAAY,CAAC"}
@@ -95,22 +95,24 @@ function encodeGlobal(output) {
95
95
 
96
96
  @param {string} type
97
97
  @param {string} text
98
+ @param options
98
99
  @return {Promise<String>}
99
100
  */
100
- renderBlock: function (type, text) {
101
+ renderBlock: function (type, text, options) {
101
102
  const parser = parsers_1.default.get(type);
102
- return parser.parsePage(text).get("content");
103
+ return parser.parsePage(text, options).get("content");
103
104
  },
104
105
  /**
105
106
  Render an inline text (markdown/asciidoc)
106
107
 
107
108
  @param {string} type
108
109
  @param {string} text
110
+ @param options
109
111
  @return {Promise<String>}
110
112
  */
111
- renderInline: function (type, text) {
113
+ renderInline: function (type, text, options) {
112
114
  const parser = parsers_1.default.get(type);
113
- return parser.parseInline(text).get("content");
115
+ return parser.parseInline(text, options).get("content");
114
116
  },
115
117
  template: {
116
118
  /**
@@ -123,7 +125,7 @@ function encodeGlobal(output) {
123
125
  applyBlock: function (name, blockData) {
124
126
  const block = blocks.get(name) || defaultBlocks_1.default.get(name);
125
127
  return (0, promise_1.default)(block.applyBlock(blockData, result));
126
- },
128
+ }
127
129
  },
128
130
  output: {
129
131
  /**
@@ -201,14 +203,14 @@ function encodeGlobal(output) {
201
203
  return fs_1.default.copy(inputFile, outputFilePath);
202
204
  });
203
205
  });
204
- },
206
+ }
205
207
  },
206
208
  gitbook: {
207
- version: honkit_1.default.version,
209
+ version: honkit_1.default.version
208
210
  },
209
211
  honkit: {
210
- version: honkit_1.default.version,
211
- },
212
+ version: honkit_1.default.version
213
+ }
212
214
  };
213
215
  // Deprecated properties
214
216
  // @ts-expect-error ts-migrate(2554) FIXME: Expected 6 arguments, but got 5.
@@ -0,0 +1,19 @@
1
+ import type Output from "../models/output";
2
+ export type EncodedNavigation = {
3
+ [index: string]: {
4
+ index: number;
5
+ title: string;
6
+ introduction: boolean;
7
+ prev?: unknown;
8
+ next?: unknown;
9
+ level: number;
10
+ };
11
+ };
12
+ /**
13
+ this.navigation is a deprecated property from GitBook v2
14
+
15
+ @return {Object}
16
+ */
17
+ declare function encodeNavigation(output: Output): EncodedNavigation;
18
+ export default encodeNavigation;
19
+ //# sourceMappingURL=encodeNavigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encodeNavigation.d.ts","sourceRoot":"","sources":["../../src/api/encodeNavigation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAoB3C,MAAM,MAAM,iBAAiB,GAAG;IAC5B,CAAC,KAAK,EAAE,MAAM,GAAG;QACb,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,EAAE,OAAO,CAAC;QACtB,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;CACL,CAAC;AAEF;;;;GAIG;AAEH,iBAAS,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAiC3D;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import Output from "../models/output";
2
+ import Page from "../models/page";
3
+ import { EncodedPage } from "../json/encodePage";
4
+ type PageAttributes = {
5
+ type: string;
6
+ path: string;
7
+ rawPath: string;
8
+ };
9
+ export type EncodedPageWithAttributes = EncodedPage & PageAttributes;
10
+ export type PartialEncodedPageWithAttributes = EncodedPage & Partial<PageAttributes>;
11
+ /**
12
+ Encode a page in a context to a JS API
13
+ */
14
+ declare function encodePage(output: Output, page: Page): EncodedPageWithAttributes;
15
+ export default encodePage;
16
+ //# sourceMappingURL=encodePage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encodePage.d.ts","sourceRoot":"","sources":["../../src/api/encodePage.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAGlC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,KAAK,cAAc,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,WAAW,GAAG,cAAc,CAAC;AACrE,MAAM,MAAM,gCAAgC,GAAG,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAErF;;GAEG;AAEH,iBAAS,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,yBAAyB,CAuCzE;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { EncodedNavigation } from "./encodeNavigation";
2
+ import Output from "../models/output";
3
+ import Page from "../models/page";
4
+ export type EncodedChapters = Array<EncodedNavigation[string] & {
5
+ path: string;
6
+ done: boolean;
7
+ percent: number;
8
+ }>;
9
+ export type PartialEncodedChapterValue = EncodedNavigation[string] & Partial<{
10
+ path: string;
11
+ done: boolean;
12
+ percent: number;
13
+ }>;
14
+ export type EncodeProgress = {
15
+ prevPercent: number;
16
+ percent: number;
17
+ current: number;
18
+ chapters: EncodedChapters;
19
+ };
20
+ /**
21
+ page.progress is a deprecated property from GitBook v2
22
+ */
23
+ declare function encodeProgress(output: Output, page: Page): EncodeProgress;
24
+ export default encodeProgress;
25
+ //# sourceMappingURL=encodeProgress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encodeProgress.d.ts","sourceRoot":"","sources":["../../src/api/encodeProgress.ts"],"names":[],"mappings":"AACA,OAAyB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,MAAM,MAAM,eAAe,GAAG,KAAK,CAC/B,iBAAiB,CAAC,MAAM,CAAC,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACnB,CACJ,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC,MAAM,CAAC,GAC9D,OAAO,CAAC;IACJ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC,CAAC;AACP,MAAM,MAAM,cAAc,GAAG;IAEzB,WAAW,EAAE,MAAM,CAAC;IAEpB,OAAO,EAAE,MAAM,CAAC;IAEhB,OAAO,EAAE,MAAM,CAAC;IAEhB,QAAQ,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF;;GAEG;AAEH,iBAAS,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,cAAc,CAkDlE;AAED,eAAe,cAAc,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ Encode summary to provide an API to plugin
3
+
4
+ @param {Output} output
5
+ @param {Config} config
6
+ @return {Object}
7
+ */
8
+ declare function encodeSummary(output: any, summary: any): {
9
+ /**
10
+ Iterate over the summary, it stops when the "iter" returns false
11
+
12
+ @param {Function} iter
13
+ */
14
+ walk: (iter: any) => void;
15
+ /**
16
+ Get an article by its level
17
+
18
+ @param {string} level
19
+ @return {Object}
20
+ */
21
+ getArticleByLevel: (level: any) => {
22
+ title: string;
23
+ level: string;
24
+ depth: number;
25
+ anchor: string;
26
+ url: string;
27
+ path: string;
28
+ ref: string;
29
+ articles: any;
30
+ };
31
+ /**
32
+ Get an article by its path
33
+
34
+ @param {string} level
35
+ @return {Object}
36
+ */
37
+ getArticleByPath: (level: any) => {
38
+ title: string;
39
+ level: string;
40
+ depth: number;
41
+ anchor: string;
42
+ url: string;
43
+ path: string;
44
+ ref: string;
45
+ articles: any;
46
+ };
47
+ };
48
+ export default encodeSummary;
49
+ //# sourceMappingURL=encodeSummary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encodeSummary.d.ts","sourceRoot":"","sources":["../../src/api/encodeSummary.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,iBAAS,aAAa,CAAC,MAAM,KAAA,EAAE,OAAO,KAAA;IAE9B;;;;OAIG;;IASH;;;;;OAKG;;;;;;;;;;;IAOH;;;;;OAKG;;;;;;;;;;;EASV;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { decodeGlobal } from "./decodeGlobal";
2
+ import encodePage0 from "./encodePage";
3
+ import decodePage0 from "./decodePage";
4
+ import encodeGlobal0 from "./encodeGlobal";
5
+ declare const _default: {
6
+ encodePage: typeof encodePage0;
7
+ decodePage: typeof decodePage0;
8
+ encodeGlobal: typeof encodeGlobal0;
9
+ decodeGlobal: typeof decodeGlobal;
10
+ };
11
+ export default _default;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,aAAa,MAAM,gBAAgB,CAAC;;;;;;;AAE3C,wBAKE"}
package/lib/bin.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare const run: (argv?: string[]) => Promise<void>;
2
+ //# sourceMappingURL=bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,GAAG,uBAA0B,QAAQ,IAAI,CA2CrD,CAAC"}