@alexlit/lint-kit 214.0.0 → 214.1.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 (429) hide show
  1. package/package.json +1 -1
  2. package/packages/config-eslint/package.json +4 -4
  3. package/packages/config-markdownlint/node_modules/ansi-regex/index.d.ts +33 -0
  4. package/packages/config-markdownlint/node_modules/ansi-regex/index.js +15 -0
  5. package/packages/config-markdownlint/node_modules/ansi-regex/license +9 -0
  6. package/packages/config-markdownlint/node_modules/ansi-regex/package.json +61 -0
  7. package/packages/config-markdownlint/node_modules/ansi-regex/readme.md +66 -0
  8. package/packages/config-markdownlint/node_modules/markdownlint/CHANGELOG.md +553 -0
  9. package/packages/config-markdownlint/node_modules/markdownlint/CONTRIBUTING.md +77 -0
  10. package/packages/config-markdownlint/node_modules/markdownlint/LICENSE +21 -0
  11. package/packages/config-markdownlint/node_modules/markdownlint/README.md +1112 -0
  12. package/packages/config-markdownlint/node_modules/markdownlint/doc/CustomRules.md +196 -0
  13. package/packages/config-markdownlint/node_modules/markdownlint/doc/Prettier.md +27 -0
  14. package/packages/config-markdownlint/node_modules/markdownlint/doc/ReleaseProcess.md +20 -0
  15. package/packages/config-markdownlint/node_modules/markdownlint/doc/Rules.md +2909 -0
  16. package/packages/config-markdownlint/node_modules/markdownlint/doc/md001.md +51 -0
  17. package/packages/config-markdownlint/node_modules/markdownlint/doc/md003.md +59 -0
  18. package/packages/config-markdownlint/node_modules/markdownlint/doc/md004.md +50 -0
  19. package/packages/config-markdownlint/node_modules/markdownlint/doc/md005.md +53 -0
  20. package/packages/config-markdownlint/node_modules/markdownlint/doc/md007.md +52 -0
  21. package/packages/config-markdownlint/node_modules/markdownlint/doc/md009.md +50 -0
  22. package/packages/config-markdownlint/node_modules/markdownlint/doc/md010.md +61 -0
  23. package/packages/config-markdownlint/node_modules/markdownlint/doc/md011.md +30 -0
  24. package/packages/config-markdownlint/node_modules/markdownlint/doc/md012.md +38 -0
  25. package/packages/config-markdownlint/node_modules/markdownlint/doc/md013.md +58 -0
  26. package/packages/config-markdownlint/node_modules/markdownlint/doc/md014.md +54 -0
  27. package/packages/config-markdownlint/node_modules/markdownlint/doc/md018.md +27 -0
  28. package/packages/config-markdownlint/node_modules/markdownlint/doc/md019.md +28 -0
  29. package/packages/config-markdownlint/node_modules/markdownlint/doc/md020.md +29 -0
  30. package/packages/config-markdownlint/node_modules/markdownlint/doc/md021.md +31 -0
  31. package/packages/config-markdownlint/node_modules/markdownlint/doc/md022.md +67 -0
  32. package/packages/config-markdownlint/node_modules/markdownlint/doc/md023.md +33 -0
  33. package/packages/config-markdownlint/node_modules/markdownlint/doc/md024.md +44 -0
  34. package/packages/config-markdownlint/node_modules/markdownlint/doc/md025.md +49 -0
  35. package/packages/config-markdownlint/node_modules/markdownlint/doc/md026.md +40 -0
  36. package/packages/config-markdownlint/node_modules/markdownlint/doc/md027.md +32 -0
  37. package/packages/config-markdownlint/node_modules/markdownlint/doc/md028.md +44 -0
  38. package/packages/config-markdownlint/node_modules/markdownlint/doc/md029.md +110 -0
  39. package/packages/config-markdownlint/node_modules/markdownlint/doc/md030.md +82 -0
  40. package/packages/config-markdownlint/node_modules/markdownlint/doc/md031.md +50 -0
  41. package/packages/config-markdownlint/node_modules/markdownlint/doc/md032.md +55 -0
  42. package/packages/config-markdownlint/node_modules/markdownlint/doc/md033.md +33 -0
  43. package/packages/config-markdownlint/node_modules/markdownlint/doc/md034.md +55 -0
  44. package/packages/config-markdownlint/node_modules/markdownlint/doc/md035.md +44 -0
  45. package/packages/config-markdownlint/node_modules/markdownlint/doc/md036.md +45 -0
  46. package/packages/config-markdownlint/node_modules/markdownlint/doc/md037.md +37 -0
  47. package/packages/config-markdownlint/node_modules/markdownlint/doc/md038.md +52 -0
  48. package/packages/config-markdownlint/node_modules/markdownlint/doc/md039.md +21 -0
  49. package/packages/config-markdownlint/node_modules/markdownlint/doc/md040.md +52 -0
  50. package/packages/config-markdownlint/node_modules/markdownlint/doc/md041.md +64 -0
  51. package/packages/config-markdownlint/node_modules/markdownlint/doc/md042.md +38 -0
  52. package/packages/config-markdownlint/node_modules/markdownlint/doc/md043.md +125 -0
  53. package/packages/config-markdownlint/node_modules/markdownlint/doc/md044.md +45 -0
  54. package/packages/config-markdownlint/node_modules/markdownlint/doc/md045.md +48 -0
  55. package/packages/config-markdownlint/node_modules/markdownlint/doc/md046.md +40 -0
  56. package/packages/config-markdownlint/node_modules/markdownlint/doc/md047.md +34 -0
  57. package/packages/config-markdownlint/node_modules/markdownlint/doc/md048.md +42 -0
  58. package/packages/config-markdownlint/node_modules/markdownlint/doc/md049.md +36 -0
  59. package/packages/config-markdownlint/node_modules/markdownlint/doc/md050.md +35 -0
  60. package/packages/config-markdownlint/node_modules/markdownlint/doc/md051.md +117 -0
  61. package/packages/config-markdownlint/node_modules/markdownlint/doc/md052.md +52 -0
  62. package/packages/config-markdownlint/node_modules/markdownlint/doc/md053.md +38 -0
  63. package/packages/config-markdownlint/node_modules/markdownlint/doc/md054.md +100 -0
  64. package/packages/config-markdownlint/node_modules/markdownlint/doc/md055.md +58 -0
  65. package/packages/config-markdownlint/node_modules/markdownlint/doc/md056.md +37 -0
  66. package/packages/config-markdownlint/node_modules/markdownlint/doc/md058.md +48 -0
  67. package/packages/config-markdownlint/node_modules/markdownlint/doc/md059.md +33 -0
  68. package/packages/config-markdownlint/node_modules/markdownlint/doc/md060.md +131 -0
  69. package/packages/config-markdownlint/node_modules/markdownlint/helpers/LICENSE +21 -0
  70. package/packages/config-markdownlint/node_modules/markdownlint/helpers/README.md +29 -0
  71. package/packages/config-markdownlint/node_modules/markdownlint/helpers/helpers.cjs +711 -0
  72. package/packages/config-markdownlint/node_modules/markdownlint/helpers/micromark-helpers.cjs +328 -0
  73. package/packages/config-markdownlint/node_modules/markdownlint/helpers/package.json +22 -0
  74. package/packages/config-markdownlint/node_modules/markdownlint/helpers/shared.cjs +16 -0
  75. package/packages/config-markdownlint/node_modules/markdownlint/lib/cache.mjs +81 -0
  76. package/packages/config-markdownlint/node_modules/markdownlint/lib/configuration-strict.d.ts +2429 -0
  77. package/packages/config-markdownlint/node_modules/markdownlint/lib/configuration.d.ts +8 -0
  78. package/packages/config-markdownlint/node_modules/markdownlint/lib/constants.mjs +14 -0
  79. package/packages/config-markdownlint/node_modules/markdownlint/lib/defer-require.cjs +19 -0
  80. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports-async.d.mts +1 -0
  81. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports-async.mjs +3 -0
  82. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports-promise.d.mts +1 -0
  83. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports-promise.mjs +3 -0
  84. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports-sync.d.mts +1 -0
  85. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports-sync.mjs +3 -0
  86. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports.d.mts +58 -0
  87. package/packages/config-markdownlint/node_modules/markdownlint/lib/exports.mjs +33 -0
  88. package/packages/config-markdownlint/node_modules/markdownlint/lib/markdownit.cjs +178 -0
  89. package/packages/config-markdownlint/node_modules/markdownlint/lib/markdownlint.d.mts +757 -0
  90. package/packages/config-markdownlint/node_modules/markdownlint/lib/markdownlint.mjs +1588 -0
  91. package/packages/config-markdownlint/node_modules/markdownlint/lib/md001.mjs +32 -0
  92. package/packages/config-markdownlint/node_modules/markdownlint/lib/md003.mjs +47 -0
  93. package/packages/config-markdownlint/node_modules/markdownlint/lib/md004.mjs +73 -0
  94. package/packages/config-markdownlint/node_modules/markdownlint/lib/md005.mjs +69 -0
  95. package/packages/config-markdownlint/node_modules/markdownlint/lib/md007.mjs +84 -0
  96. package/packages/config-markdownlint/node_modules/markdownlint/lib/md009.mjs +95 -0
  97. package/packages/config-markdownlint/node_modules/markdownlint/lib/md010.mjs +78 -0
  98. package/packages/config-markdownlint/node_modules/markdownlint/lib/md011.mjs +59 -0
  99. package/packages/config-markdownlint/node_modules/markdownlint/lib/md012.mjs +40 -0
  100. package/packages/config-markdownlint/node_modules/markdownlint/lib/md013.mjs +95 -0
  101. package/packages/config-markdownlint/node_modules/markdownlint/lib/md014.mjs +47 -0
  102. package/packages/config-markdownlint/node_modules/markdownlint/lib/md018.mjs +43 -0
  103. package/packages/config-markdownlint/node_modules/markdownlint/lib/md019-md021.mjs +78 -0
  104. package/packages/config-markdownlint/node_modules/markdownlint/lib/md020.mjs +68 -0
  105. package/packages/config-markdownlint/node_modules/markdownlint/lib/md022.mjs +103 -0
  106. package/packages/config-markdownlint/node_modules/markdownlint/lib/md023.mjs +37 -0
  107. package/packages/config-markdownlint/node_modules/markdownlint/lib/md024.mjs +45 -0
  108. package/packages/config-markdownlint/node_modules/markdownlint/lib/md025.mjs +45 -0
  109. package/packages/config-markdownlint/node_modules/markdownlint/lib/md026.mjs +46 -0
  110. package/packages/config-markdownlint/node_modules/markdownlint/lib/md027.mjs +50 -0
  111. package/packages/config-markdownlint/node_modules/markdownlint/lib/md028.mjs +38 -0
  112. package/packages/config-markdownlint/node_modules/markdownlint/lib/md029.mjs +95 -0
  113. package/packages/config-markdownlint/node_modules/markdownlint/lib/md030.mjs +57 -0
  114. package/packages/config-markdownlint/node_modules/markdownlint/lib/md031.mjs +61 -0
  115. package/packages/config-markdownlint/node_modules/markdownlint/lib/md032.mjs +79 -0
  116. package/packages/config-markdownlint/node_modules/markdownlint/lib/md033.mjs +46 -0
  117. package/packages/config-markdownlint/node_modules/markdownlint/lib/md034.mjs +92 -0
  118. package/packages/config-markdownlint/node_modules/markdownlint/lib/md035.mjs +23 -0
  119. package/packages/config-markdownlint/node_modules/markdownlint/lib/md036.mjs +55 -0
  120. package/packages/config-markdownlint/node_modules/markdownlint/lib/md037.mjs +93 -0
  121. package/packages/config-markdownlint/node_modules/markdownlint/lib/md038.mjs +73 -0
  122. package/packages/config-markdownlint/node_modules/markdownlint/lib/md039.mjs +63 -0
  123. package/packages/config-markdownlint/node_modules/markdownlint/lib/md040.mjs +32 -0
  124. package/packages/config-markdownlint/node_modules/markdownlint/lib/md041.mjs +71 -0
  125. package/packages/config-markdownlint/node_modules/markdownlint/lib/md042.mjs +58 -0
  126. package/packages/config-markdownlint/node_modules/markdownlint/lib/md043.mjs +126 -0
  127. package/packages/config-markdownlint/node_modules/markdownlint/lib/md044.mjs +110 -0
  128. package/packages/config-markdownlint/node_modules/markdownlint/lib/md045.mjs +61 -0
  129. package/packages/config-markdownlint/node_modules/markdownlint/lib/md046.mjs +31 -0
  130. package/packages/config-markdownlint/node_modules/markdownlint/lib/md047.mjs +28 -0
  131. package/packages/config-markdownlint/node_modules/markdownlint/lib/md048.mjs +45 -0
  132. package/packages/config-markdownlint/node_modules/markdownlint/lib/md049-md050.mjs +115 -0
  133. package/packages/config-markdownlint/node_modules/markdownlint/lib/md051.mjs +173 -0
  134. package/packages/config-markdownlint/node_modules/markdownlint/lib/md052.mjs +40 -0
  135. package/packages/config-markdownlint/node_modules/markdownlint/lib/md053.mjs +60 -0
  136. package/packages/config-markdownlint/node_modules/markdownlint/lib/md054.mjs +122 -0
  137. package/packages/config-markdownlint/node_modules/markdownlint/lib/md055.mjs +82 -0
  138. package/packages/config-markdownlint/node_modules/markdownlint/lib/md056.mjs +50 -0
  139. package/packages/config-markdownlint/node_modules/markdownlint/lib/md058.mjs +57 -0
  140. package/packages/config-markdownlint/node_modules/markdownlint/lib/md059.mjs +71 -0
  141. package/packages/config-markdownlint/node_modules/markdownlint/lib/md060.mjs +229 -0
  142. package/packages/config-markdownlint/node_modules/markdownlint/lib/micromark-parse.mjs +338 -0
  143. package/packages/config-markdownlint/node_modules/markdownlint/lib/micromark-types.d.mts +11 -0
  144. package/packages/config-markdownlint/node_modules/markdownlint/lib/node-imports-browser.mjs +22 -0
  145. package/packages/config-markdownlint/node_modules/markdownlint/lib/node-imports-node.mjs +11 -0
  146. package/packages/config-markdownlint/node_modules/markdownlint/lib/parse-configuration.mjs +47 -0
  147. package/packages/config-markdownlint/node_modules/markdownlint/lib/resolve-module.cjs +53 -0
  148. package/packages/config-markdownlint/node_modules/markdownlint/lib/resolve-module.d.cts +39 -0
  149. package/packages/config-markdownlint/node_modules/markdownlint/lib/rules.mjs +122 -0
  150. package/packages/config-markdownlint/node_modules/markdownlint/lib/types.d.mts +13 -0
  151. package/packages/config-markdownlint/node_modules/markdownlint/package.json +119 -0
  152. package/packages/config-markdownlint/node_modules/markdownlint/schema/.markdownlint.jsonc +349 -0
  153. package/packages/config-markdownlint/node_modules/markdownlint/schema/.markdownlint.yaml +310 -0
  154. package/packages/config-markdownlint/node_modules/markdownlint/schema/ValidatingConfiguration.md +26 -0
  155. package/packages/config-markdownlint/node_modules/markdownlint/schema/markdownlint-config-schema-strict.json +5146 -0
  156. package/packages/config-markdownlint/node_modules/markdownlint/schema/markdownlint-config-schema.json +5151 -0
  157. package/packages/config-markdownlint/node_modules/markdownlint/style/all.json +5 -0
  158. package/packages/config-markdownlint/node_modules/markdownlint/style/cirosantilli.json +22 -0
  159. package/packages/config-markdownlint/node_modules/markdownlint/style/prettier.json +27 -0
  160. package/packages/config-markdownlint/node_modules/markdownlint/style/relaxed.json +12 -0
  161. package/packages/config-markdownlint/node_modules/micromark/dev/index.d.ts +82 -0
  162. package/packages/config-markdownlint/node_modules/micromark/dev/index.d.ts.map +1 -0
  163. package/packages/config-markdownlint/node_modules/micromark/dev/index.js +68 -0
  164. package/packages/config-markdownlint/node_modules/micromark/dev/lib/compile.d.ts +16 -0
  165. package/packages/config-markdownlint/node_modules/micromark/dev/lib/compile.d.ts.map +1 -0
  166. package/packages/config-markdownlint/node_modules/micromark/dev/lib/compile.js +1162 -0
  167. package/packages/config-markdownlint/node_modules/micromark/dev/lib/constructs.d.ts +73 -0
  168. package/packages/config-markdownlint/node_modules/micromark/dev/lib/constructs.d.ts.map +1 -0
  169. package/packages/config-markdownlint/node_modules/micromark/dev/lib/constructs.js +101 -0
  170. package/packages/config-markdownlint/node_modules/micromark/dev/lib/create-tokenizer.d.ts +46 -0
  171. package/packages/config-markdownlint/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +1 -0
  172. package/packages/config-markdownlint/node_modules/micromark/dev/lib/create-tokenizer.js +718 -0
  173. package/packages/config-markdownlint/node_modules/micromark/dev/lib/initialize/content.d.ts +4 -0
  174. package/packages/config-markdownlint/node_modules/micromark/dev/lib/initialize/content.d.ts.map +1 -0
  175. package/packages/config-markdownlint/node_modules/micromark/dev/lib/initialize/content.js +99 -0
  176. package/packages/config-markdownlint/node_modules/micromark/dev/lib/initialize/document.d.ts +10 -0
  177. package/packages/config-markdownlint/node_modules/micromark/dev/lib/initialize/document.d.ts.map +1 -0
  178. package/packages/config-markdownlint/node_modules/micromark/dev/lib/initialize/document.js +449 -0
  179. package/packages/config-markdownlint/node_modules/micromark/dev/lib/initialize/flow.d.ts +4 -0
  180. package/packages/config-markdownlint/node_modules/micromark/dev/lib/initialize/flow.d.ts.map +1 -0
  181. package/packages/config-markdownlint/node_modules/micromark/dev/lib/initialize/flow.js +86 -0
  182. package/packages/config-markdownlint/node_modules/micromark/dev/lib/initialize/text.d.ts +8 -0
  183. package/packages/config-markdownlint/node_modules/micromark/dev/lib/initialize/text.d.ts.map +1 -0
  184. package/packages/config-markdownlint/node_modules/micromark/dev/lib/initialize/text.js +248 -0
  185. package/packages/config-markdownlint/node_modules/micromark/dev/lib/parse.d.ts +10 -0
  186. package/packages/config-markdownlint/node_modules/micromark/dev/lib/parse.d.ts.map +1 -0
  187. package/packages/config-markdownlint/node_modules/micromark/dev/lib/parse.js +58 -0
  188. package/packages/config-markdownlint/node_modules/micromark/dev/lib/postprocess.d.ts +9 -0
  189. package/packages/config-markdownlint/node_modules/micromark/dev/lib/postprocess.d.ts.map +1 -0
  190. package/packages/config-markdownlint/node_modules/micromark/dev/lib/postprocess.js +19 -0
  191. package/packages/config-markdownlint/node_modules/micromark/dev/lib/preprocess.d.ts +13 -0
  192. package/packages/config-markdownlint/node_modules/micromark/dev/lib/preprocess.d.ts.map +1 -0
  193. package/packages/config-markdownlint/node_modules/micromark/dev/lib/preprocess.js +139 -0
  194. package/packages/config-markdownlint/node_modules/micromark/dev/stream.d.ts +35 -0
  195. package/packages/config-markdownlint/node_modules/micromark/dev/stream.d.ts.map +1 -0
  196. package/packages/config-markdownlint/node_modules/micromark/dev/stream.js +270 -0
  197. package/packages/config-markdownlint/node_modules/micromark/index.d.ts +82 -0
  198. package/packages/config-markdownlint/node_modules/micromark/index.d.ts.map +1 -0
  199. package/packages/config-markdownlint/node_modules/micromark/index.js +60 -0
  200. package/packages/config-markdownlint/node_modules/micromark/lib/compile.d.ts +16 -0
  201. package/packages/config-markdownlint/node_modules/micromark/lib/compile.d.ts.map +1 -0
  202. package/packages/config-markdownlint/node_modules/micromark/lib/compile.js +1068 -0
  203. package/packages/config-markdownlint/node_modules/micromark/lib/constructs.d.ts +73 -0
  204. package/packages/config-markdownlint/node_modules/micromark/lib/constructs.d.ts.map +1 -0
  205. package/packages/config-markdownlint/node_modules/micromark/lib/constructs.js +85 -0
  206. package/packages/config-markdownlint/node_modules/micromark/lib/create-tokenizer.d.ts +46 -0
  207. package/packages/config-markdownlint/node_modules/micromark/lib/create-tokenizer.d.ts.map +1 -0
  208. package/packages/config-markdownlint/node_modules/micromark/lib/create-tokenizer.js +613 -0
  209. package/packages/config-markdownlint/node_modules/micromark/lib/initialize/content.d.ts +4 -0
  210. package/packages/config-markdownlint/node_modules/micromark/lib/initialize/content.d.ts.map +1 -0
  211. package/packages/config-markdownlint/node_modules/micromark/lib/initialize/content.js +79 -0
  212. package/packages/config-markdownlint/node_modules/micromark/lib/initialize/document.d.ts +10 -0
  213. package/packages/config-markdownlint/node_modules/micromark/lib/initialize/document.d.ts.map +1 -0
  214. package/packages/config-markdownlint/node_modules/micromark/lib/initialize/document.js +370 -0
  215. package/packages/config-markdownlint/node_modules/micromark/lib/initialize/flow.d.ts +4 -0
  216. package/packages/config-markdownlint/node_modules/micromark/lib/initialize/flow.d.ts.map +1 -0
  217. package/packages/config-markdownlint/node_modules/micromark/lib/initialize/flow.js +58 -0
  218. package/packages/config-markdownlint/node_modules/micromark/lib/initialize/text.d.ts +8 -0
  219. package/packages/config-markdownlint/node_modules/micromark/lib/initialize/text.d.ts.map +1 -0
  220. package/packages/config-markdownlint/node_modules/micromark/lib/initialize/text.js +216 -0
  221. package/packages/config-markdownlint/node_modules/micromark/lib/parse.d.ts +10 -0
  222. package/packages/config-markdownlint/node_modules/micromark/lib/parse.d.ts.map +1 -0
  223. package/packages/config-markdownlint/node_modules/micromark/lib/parse.js +56 -0
  224. package/packages/config-markdownlint/node_modules/micromark/lib/postprocess.d.ts +9 -0
  225. package/packages/config-markdownlint/node_modules/micromark/lib/postprocess.d.ts.map +1 -0
  226. package/packages/config-markdownlint/node_modules/micromark/lib/postprocess.js +18 -0
  227. package/packages/config-markdownlint/node_modules/micromark/lib/preprocess.d.ts +13 -0
  228. package/packages/config-markdownlint/node_modules/micromark/lib/preprocess.d.ts.map +1 -0
  229. package/packages/config-markdownlint/node_modules/micromark/lib/preprocess.js +112 -0
  230. package/packages/config-markdownlint/node_modules/micromark/license +22 -0
  231. package/packages/config-markdownlint/node_modules/micromark/package.json +87 -0
  232. package/packages/config-markdownlint/node_modules/micromark/readme.md +488 -0
  233. package/packages/config-markdownlint/node_modules/micromark/stream.d.ts +35 -0
  234. package/packages/config-markdownlint/node_modules/micromark/stream.d.ts.map +1 -0
  235. package/packages/config-markdownlint/node_modules/micromark/stream.js +256 -0
  236. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/index.d.ts +23 -0
  237. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/index.d.ts.map +1 -0
  238. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/index.js +22 -0
  239. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts +4 -0
  240. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts.map +1 -0
  241. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/attention.js +294 -0
  242. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts +4 -0
  243. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts.map +1 -0
  244. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/autolink.js +269 -0
  245. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts +4 -0
  246. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts.map +1 -0
  247. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/blank-line.js +62 -0
  248. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts +4 -0
  249. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts.map +1 -0
  250. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/block-quote.js +162 -0
  251. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts +4 -0
  252. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts.map +1 -0
  253. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/character-escape.js +69 -0
  254. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts +4 -0
  255. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts.map +1 -0
  256. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/character-reference.js +166 -0
  257. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts +4 -0
  258. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +1 -0
  259. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +472 -0
  260. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts +4 -0
  261. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts.map +1 -0
  262. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +178 -0
  263. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts +4 -0
  264. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts.map +1 -0
  265. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/code-text.js +257 -0
  266. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/content.d.ts +7 -0
  267. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/content.d.ts.map +1 -0
  268. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/content.js +185 -0
  269. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts +4 -0
  270. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts.map +1 -0
  271. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/definition.js +295 -0
  272. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts +4 -0
  273. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts.map +1 -0
  274. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js +65 -0
  275. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts +4 -0
  276. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts.map +1 -0
  277. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +229 -0
  278. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts +4 -0
  279. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +1 -0
  280. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +938 -0
  281. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts +4 -0
  282. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts.map +1 -0
  283. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/html-text.js +783 -0
  284. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts +4 -0
  285. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts.map +1 -0
  286. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/label-end.js +658 -0
  287. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts +4 -0
  288. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +1 -0
  289. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +119 -0
  290. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts +4 -0
  291. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +1 -0
  292. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +71 -0
  293. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts +4 -0
  294. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts.map +1 -0
  295. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/line-ending.js +34 -0
  296. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/list.d.ts +4 -0
  297. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/list.d.ts.map +1 -0
  298. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/list.js +306 -0
  299. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts +4 -0
  300. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts.map +1 -0
  301. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.js +67 -0
  302. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts +4 -0
  303. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +1 -0
  304. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +213 -0
  305. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts +4 -0
  306. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts.map +1 -0
  307. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/dev/lib/thematic-break.js +120 -0
  308. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/index.d.ts +23 -0
  309. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/index.d.ts.map +1 -0
  310. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/index.js +22 -0
  311. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/attention.d.ts +4 -0
  312. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/attention.d.ts.map +1 -0
  313. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/attention.js +231 -0
  314. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/autolink.d.ts +4 -0
  315. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/autolink.d.ts.map +1 -0
  316. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/autolink.js +233 -0
  317. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/blank-line.d.ts +4 -0
  318. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/blank-line.d.ts.map +1 -0
  319. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/blank-line.js +61 -0
  320. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/block-quote.d.ts +4 -0
  321. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/block-quote.d.ts.map +1 -0
  322. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/block-quote.js +143 -0
  323. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/character-escape.d.ts +4 -0
  324. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/character-escape.d.ts.map +1 -0
  325. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/character-escape.js +64 -0
  326. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/character-reference.d.ts +4 -0
  327. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/character-reference.d.ts.map +1 -0
  328. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/character-reference.js +149 -0
  329. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts +4 -0
  330. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +1 -0
  331. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/code-fenced.js +422 -0
  332. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/code-indented.d.ts +4 -0
  333. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/code-indented.d.ts.map +1 -0
  334. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/code-indented.js +159 -0
  335. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/code-text.d.ts +4 -0
  336. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/code-text.d.ts.map +1 -0
  337. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/code-text.js +225 -0
  338. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/content.d.ts +7 -0
  339. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/content.d.ts.map +1 -0
  340. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/content.js +163 -0
  341. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/definition.d.ts +4 -0
  342. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/definition.d.ts.map +1 -0
  343. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/definition.js +254 -0
  344. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts +4 -0
  345. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts.map +1 -0
  346. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +60 -0
  347. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts +4 -0
  348. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts.map +1 -0
  349. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/heading-atx.js +191 -0
  350. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/html-flow.d.ts +4 -0
  351. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +1 -0
  352. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/html-flow.js +827 -0
  353. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/html-text.d.ts +4 -0
  354. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/html-text.d.ts.map +1 -0
  355. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/html-text.js +678 -0
  356. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/label-end.d.ts +4 -0
  357. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/label-end.d.ts.map +1 -0
  358. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/label-end.js +561 -0
  359. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts +4 -0
  360. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +1 -0
  361. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/label-start-image.js +110 -0
  362. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts +4 -0
  363. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +1 -0
  364. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/label-start-link.js +63 -0
  365. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/line-ending.d.ts +4 -0
  366. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/line-ending.d.ts.map +1 -0
  367. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/line-ending.js +33 -0
  368. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/list.d.ts +4 -0
  369. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/list.d.ts.map +1 -0
  370. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/list.js +213 -0
  371. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts +4 -0
  372. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts.map +1 -0
  373. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js +61 -0
  374. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts +4 -0
  375. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +1 -0
  376. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/setext-underline.js +187 -0
  377. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts +4 -0
  378. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts.map +1 -0
  379. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/lib/thematic-break.js +102 -0
  380. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/license +22 -0
  381. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/package.json +62 -0
  382. package/packages/config-markdownlint/node_modules/micromark-core-commonmark/readme.md +171 -0
  383. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/index.d.ts +55 -0
  384. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/index.js +2 -0
  385. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts +51 -0
  386. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts.map +1 -0
  387. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.js +231 -0
  388. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/lib/html.d.ts +11 -0
  389. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/lib/html.d.ts.map +1 -0
  390. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/lib/html.js +153 -0
  391. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/lib/infer.d.ts +14 -0
  392. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/lib/infer.d.ts.map +1 -0
  393. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/lib/infer.js +64 -0
  394. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/lib/syntax.d.ts +18 -0
  395. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/lib/syntax.d.ts.map +1 -0
  396. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/dev/lib/syntax.js +964 -0
  397. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/index.d.ts +55 -0
  398. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/index.js +2 -0
  399. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts +51 -0
  400. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts.map +1 -0
  401. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/lib/edit-map.js +222 -0
  402. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/lib/html.d.ts +11 -0
  403. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/lib/html.d.ts.map +1 -0
  404. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/lib/html.js +135 -0
  405. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/lib/infer.d.ts +14 -0
  406. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/lib/infer.d.ts.map +1 -0
  407. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/lib/infer.js +52 -0
  408. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/lib/syntax.d.ts +18 -0
  409. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/lib/syntax.d.ts.map +1 -0
  410. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/lib/syntax.js +846 -0
  411. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/license +22 -0
  412. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/package.json +86 -0
  413. package/packages/config-markdownlint/node_modules/micromark-extension-gfm-table/readme.md +515 -0
  414. package/packages/config-markdownlint/node_modules/micromark-util-types/index.d.ts +1315 -0
  415. package/packages/config-markdownlint/node_modules/micromark-util-types/index.js +2 -0
  416. package/packages/config-markdownlint/node_modules/micromark-util-types/license +22 -0
  417. package/packages/config-markdownlint/node_modules/micromark-util-types/package.json +37 -0
  418. package/packages/config-markdownlint/node_modules/micromark-util-types/readme.md +151 -0
  419. package/packages/config-markdownlint/node_modules/string-width/index.d.ts +39 -0
  420. package/packages/config-markdownlint/node_modules/string-width/index.js +203 -0
  421. package/packages/config-markdownlint/node_modules/string-width/license +9 -0
  422. package/packages/config-markdownlint/node_modules/string-width/package.json +65 -0
  423. package/packages/config-markdownlint/node_modules/string-width/readme.md +66 -0
  424. package/packages/config-markdownlint/node_modules/strip-ansi/index.d.ts +15 -0
  425. package/packages/config-markdownlint/node_modules/strip-ansi/index.js +19 -0
  426. package/packages/config-markdownlint/node_modules/strip-ansi/license +9 -0
  427. package/packages/config-markdownlint/node_modules/strip-ansi/package.json +59 -0
  428. package/packages/config-markdownlint/node_modules/strip-ansi/readme.md +37 -0
  429. package/packages/config-markdownlint/package.json +2 -2
@@ -0,0 +1,613 @@
1
+ /**
2
+ * @import {
3
+ * Chunk,
4
+ * Code,
5
+ * ConstructRecord,
6
+ * Construct,
7
+ * Effects,
8
+ * InitialConstruct,
9
+ * ParseContext,
10
+ * Point,
11
+ * State,
12
+ * TokenizeContext,
13
+ * Token
14
+ * } from 'micromark-util-types'
15
+ */
16
+
17
+ /**
18
+ * @callback Restore
19
+ * Restore the state.
20
+ * @returns {undefined}
21
+ * Nothing.
22
+ *
23
+ * @typedef Info
24
+ * Info.
25
+ * @property {Restore} restore
26
+ * Restore.
27
+ * @property {number} from
28
+ * From.
29
+ *
30
+ * @callback ReturnHandle
31
+ * Handle a successful run.
32
+ * @param {Construct} construct
33
+ * Construct.
34
+ * @param {Info} info
35
+ * Info.
36
+ * @returns {undefined}
37
+ * Nothing.
38
+ */
39
+
40
+ import { markdownLineEnding } from 'micromark-util-character';
41
+ import { push, splice } from 'micromark-util-chunked';
42
+ import { resolveAll } from 'micromark-util-resolve-all';
43
+ /**
44
+ * Create a tokenizer.
45
+ * Tokenizers deal with one type of data (e.g., containers, flow, text).
46
+ * The parser is the object dealing with it all.
47
+ * `initialize` works like other constructs, except that only its `tokenize`
48
+ * function is used, in which case it doesn’t receive an `ok` or `nok`.
49
+ * `from` can be given to set the point before the first character, although
50
+ * when further lines are indented, they must be set with `defineSkip`.
51
+ *
52
+ * @param {ParseContext} parser
53
+ * Parser.
54
+ * @param {InitialConstruct} initialize
55
+ * Construct.
56
+ * @param {Omit<Point, '_bufferIndex' | '_index'> | undefined} [from]
57
+ * Point (optional).
58
+ * @returns {TokenizeContext}
59
+ * Context.
60
+ */
61
+ export function createTokenizer(parser, initialize, from) {
62
+ /** @type {Point} */
63
+ let point = {
64
+ _bufferIndex: -1,
65
+ _index: 0,
66
+ line: from && from.line || 1,
67
+ column: from && from.column || 1,
68
+ offset: from && from.offset || 0
69
+ };
70
+ /** @type {Record<string, number>} */
71
+ const columnStart = {};
72
+ /** @type {Array<Construct>} */
73
+ const resolveAllConstructs = [];
74
+ /** @type {Array<Chunk>} */
75
+ let chunks = [];
76
+ /** @type {Array<Token>} */
77
+ let stack = [];
78
+ /** @type {boolean | undefined} */
79
+ let consumed = true;
80
+
81
+ /**
82
+ * Tools used for tokenizing.
83
+ *
84
+ * @type {Effects}
85
+ */
86
+ const effects = {
87
+ attempt: constructFactory(onsuccessfulconstruct),
88
+ check: constructFactory(onsuccessfulcheck),
89
+ consume,
90
+ enter,
91
+ exit,
92
+ interrupt: constructFactory(onsuccessfulcheck, {
93
+ interrupt: true
94
+ })
95
+ };
96
+
97
+ /**
98
+ * State and tools for resolving and serializing.
99
+ *
100
+ * @type {TokenizeContext}
101
+ */
102
+ const context = {
103
+ code: null,
104
+ containerState: {},
105
+ defineSkip,
106
+ events: [],
107
+ now,
108
+ parser,
109
+ previous: null,
110
+ sliceSerialize,
111
+ sliceStream,
112
+ write
113
+ };
114
+
115
+ /**
116
+ * The state function.
117
+ *
118
+ * @type {State | undefined}
119
+ */
120
+ let state = initialize.tokenize.call(context, effects);
121
+
122
+ /**
123
+ * Track which character we expect to be consumed, to catch bugs.
124
+ *
125
+ * @type {Code}
126
+ */
127
+ let expectedCode;
128
+ if (initialize.resolveAll) {
129
+ resolveAllConstructs.push(initialize);
130
+ }
131
+ return context;
132
+
133
+ /** @type {TokenizeContext['write']} */
134
+ function write(slice) {
135
+ chunks = push(chunks, slice);
136
+ main();
137
+
138
+ // Exit if we’re not done, resolve might change stuff.
139
+ if (chunks[chunks.length - 1] !== null) {
140
+ return [];
141
+ }
142
+ addResult(initialize, 0);
143
+
144
+ // Otherwise, resolve, and exit.
145
+ context.events = resolveAll(resolveAllConstructs, context.events, context);
146
+ return context.events;
147
+ }
148
+
149
+ //
150
+ // Tools.
151
+ //
152
+
153
+ /** @type {TokenizeContext['sliceSerialize']} */
154
+ function sliceSerialize(token, expandTabs) {
155
+ return serializeChunks(sliceStream(token), expandTabs);
156
+ }
157
+
158
+ /** @type {TokenizeContext['sliceStream']} */
159
+ function sliceStream(token) {
160
+ return sliceChunks(chunks, token);
161
+ }
162
+
163
+ /** @type {TokenizeContext['now']} */
164
+ function now() {
165
+ // This is a hot path, so we clone manually instead of `Object.assign({}, point)`
166
+ const {
167
+ _bufferIndex,
168
+ _index,
169
+ line,
170
+ column,
171
+ offset
172
+ } = point;
173
+ return {
174
+ _bufferIndex,
175
+ _index,
176
+ line,
177
+ column,
178
+ offset
179
+ };
180
+ }
181
+
182
+ /** @type {TokenizeContext['defineSkip']} */
183
+ function defineSkip(value) {
184
+ columnStart[value.line] = value.column;
185
+ accountForPotentialSkip();
186
+ }
187
+
188
+ //
189
+ // State management.
190
+ //
191
+
192
+ /**
193
+ * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by
194
+ * `consume`).
195
+ * Here is where we walk through the chunks, which either include strings of
196
+ * several characters, or numerical character codes.
197
+ * The reason to do this in a loop instead of a call is so the stack can
198
+ * drain.
199
+ *
200
+ * @returns {undefined}
201
+ * Nothing.
202
+ */
203
+ function main() {
204
+ while (point._index < chunks.length) {
205
+ const chunk = chunks[point._index];
206
+
207
+ // If we’re in a buffer chunk, loop through it.
208
+ if (typeof chunk === 'string') {
209
+ const chunkIndex = point._index;
210
+ if (point._bufferIndex < 0) {
211
+ point._bufferIndex = 0;
212
+ }
213
+ while (point._index === chunkIndex && point._bufferIndex < chunk.length) {
214
+ go(chunk.charCodeAt(point._bufferIndex));
215
+ }
216
+ } else {
217
+ go(chunk);
218
+ }
219
+ }
220
+ }
221
+
222
+ /**
223
+ * Deal with one code.
224
+ *
225
+ * @param {Code} code
226
+ * Code.
227
+ * @returns {undefined}
228
+ * Nothing.
229
+ */
230
+ function go(code) {
231
+ consumed = undefined;
232
+ expectedCode = code;
233
+ state = state(code);
234
+ }
235
+
236
+ /** @type {Effects['consume']} */
237
+ function consume(code) {
238
+ if (markdownLineEnding(code)) {
239
+ point.line++;
240
+ point.column = 1;
241
+ point.offset += code === -3 ? 2 : 1;
242
+ accountForPotentialSkip();
243
+ } else if (code !== -1) {
244
+ point.column++;
245
+ point.offset++;
246
+ }
247
+
248
+ // Not in a string chunk.
249
+ if (point._bufferIndex < 0) {
250
+ point._index++;
251
+ } else {
252
+ point._bufferIndex++;
253
+
254
+ // At end of string chunk.
255
+ if (point._bufferIndex ===
256
+ // Points w/ non-negative `_bufferIndex` reference
257
+ // strings.
258
+ /** @type {string} */
259
+ chunks[point._index].length) {
260
+ point._bufferIndex = -1;
261
+ point._index++;
262
+ }
263
+ }
264
+
265
+ // Expose the previous character.
266
+ context.previous = code;
267
+
268
+ // Mark as consumed.
269
+ consumed = true;
270
+ }
271
+
272
+ /** @type {Effects['enter']} */
273
+ function enter(type, fields) {
274
+ /** @type {Token} */
275
+ // @ts-expect-error Patch instead of assign required fields to help GC.
276
+ const token = fields || {};
277
+ token.type = type;
278
+ token.start = now();
279
+ context.events.push(['enter', token, context]);
280
+ stack.push(token);
281
+ return token;
282
+ }
283
+
284
+ /** @type {Effects['exit']} */
285
+ function exit(type) {
286
+ const token = stack.pop();
287
+ token.end = now();
288
+ context.events.push(['exit', token, context]);
289
+ return token;
290
+ }
291
+
292
+ /**
293
+ * Use results.
294
+ *
295
+ * @type {ReturnHandle}
296
+ */
297
+ function onsuccessfulconstruct(construct, info) {
298
+ addResult(construct, info.from);
299
+ }
300
+
301
+ /**
302
+ * Discard results.
303
+ *
304
+ * @type {ReturnHandle}
305
+ */
306
+ function onsuccessfulcheck(_, info) {
307
+ info.restore();
308
+ }
309
+
310
+ /**
311
+ * Factory to attempt/check/interrupt.
312
+ *
313
+ * @param {ReturnHandle} onreturn
314
+ * Callback.
315
+ * @param {{interrupt?: boolean | undefined} | undefined} [fields]
316
+ * Fields.
317
+ */
318
+ function constructFactory(onreturn, fields) {
319
+ return hook;
320
+
321
+ /**
322
+ * Handle either an object mapping codes to constructs, a list of
323
+ * constructs, or a single construct.
324
+ *
325
+ * @param {Array<Construct> | ConstructRecord | Construct} constructs
326
+ * Constructs.
327
+ * @param {State} returnState
328
+ * State.
329
+ * @param {State | undefined} [bogusState]
330
+ * State.
331
+ * @returns {State}
332
+ * State.
333
+ */
334
+ function hook(constructs, returnState, bogusState) {
335
+ /** @type {ReadonlyArray<Construct>} */
336
+ let listOfConstructs;
337
+ /** @type {number} */
338
+ let constructIndex;
339
+ /** @type {Construct} */
340
+ let currentConstruct;
341
+ /** @type {Info} */
342
+ let info;
343
+ return Array.isArray(constructs) ? /* c8 ignore next 1 */
344
+ handleListOfConstructs(constructs) : 'tokenize' in constructs ?
345
+ // Looks like a construct.
346
+ handleListOfConstructs([(/** @type {Construct} */constructs)]) : handleMapOfConstructs(constructs);
347
+
348
+ /**
349
+ * Handle a list of construct.
350
+ *
351
+ * @param {ConstructRecord} map
352
+ * Constructs.
353
+ * @returns {State}
354
+ * State.
355
+ */
356
+ function handleMapOfConstructs(map) {
357
+ return start;
358
+
359
+ /** @type {State} */
360
+ function start(code) {
361
+ const left = code !== null && map[code];
362
+ const all = code !== null && map.null;
363
+ const list = [
364
+ // To do: add more extension tests.
365
+ /* c8 ignore next 2 */
366
+ ...(Array.isArray(left) ? left : left ? [left] : []), ...(Array.isArray(all) ? all : all ? [all] : [])];
367
+ return handleListOfConstructs(list)(code);
368
+ }
369
+ }
370
+
371
+ /**
372
+ * Handle a list of construct.
373
+ *
374
+ * @param {ReadonlyArray<Construct>} list
375
+ * Constructs.
376
+ * @returns {State}
377
+ * State.
378
+ */
379
+ function handleListOfConstructs(list) {
380
+ listOfConstructs = list;
381
+ constructIndex = 0;
382
+ if (list.length === 0) {
383
+ return bogusState;
384
+ }
385
+ return handleConstruct(list[constructIndex]);
386
+ }
387
+
388
+ /**
389
+ * Handle a single construct.
390
+ *
391
+ * @param {Construct} construct
392
+ * Construct.
393
+ * @returns {State}
394
+ * State.
395
+ */
396
+ function handleConstruct(construct) {
397
+ return start;
398
+
399
+ /** @type {State} */
400
+ function start(code) {
401
+ // To do: not needed to store if there is no bogus state, probably?
402
+ // Currently doesn’t work because `inspect` in document does a check
403
+ // w/o a bogus, which doesn’t make sense. But it does seem to help perf
404
+ // by not storing.
405
+ info = store();
406
+ currentConstruct = construct;
407
+ if (!construct.partial) {
408
+ context.currentConstruct = construct;
409
+ }
410
+
411
+ // Always populated by defaults.
412
+
413
+ if (construct.name && context.parser.constructs.disable.null.includes(construct.name)) {
414
+ return nok(code);
415
+ }
416
+ return construct.tokenize.call(
417
+ // If we do have fields, create an object w/ `context` as its
418
+ // prototype.
419
+ // This allows a “live binding”, which is needed for `interrupt`.
420
+ fields ? Object.assign(Object.create(context), fields) : context, effects, ok, nok)(code);
421
+ }
422
+ }
423
+
424
+ /** @type {State} */
425
+ function ok(code) {
426
+ consumed = true;
427
+ onreturn(currentConstruct, info);
428
+ return returnState;
429
+ }
430
+
431
+ /** @type {State} */
432
+ function nok(code) {
433
+ consumed = true;
434
+ info.restore();
435
+ if (++constructIndex < listOfConstructs.length) {
436
+ return handleConstruct(listOfConstructs[constructIndex]);
437
+ }
438
+ return bogusState;
439
+ }
440
+ }
441
+ }
442
+
443
+ /**
444
+ * @param {Construct} construct
445
+ * Construct.
446
+ * @param {number} from
447
+ * From.
448
+ * @returns {undefined}
449
+ * Nothing.
450
+ */
451
+ function addResult(construct, from) {
452
+ if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {
453
+ resolveAllConstructs.push(construct);
454
+ }
455
+ if (construct.resolve) {
456
+ splice(context.events, from, context.events.length - from, construct.resolve(context.events.slice(from), context));
457
+ }
458
+ if (construct.resolveTo) {
459
+ context.events = construct.resolveTo(context.events, context);
460
+ }
461
+ }
462
+
463
+ /**
464
+ * Store state.
465
+ *
466
+ * @returns {Info}
467
+ * Info.
468
+ */
469
+ function store() {
470
+ const startPoint = now();
471
+ const startPrevious = context.previous;
472
+ const startCurrentConstruct = context.currentConstruct;
473
+ const startEventsIndex = context.events.length;
474
+ const startStack = Array.from(stack);
475
+ return {
476
+ from: startEventsIndex,
477
+ restore
478
+ };
479
+
480
+ /**
481
+ * Restore state.
482
+ *
483
+ * @returns {undefined}
484
+ * Nothing.
485
+ */
486
+ function restore() {
487
+ point = startPoint;
488
+ context.previous = startPrevious;
489
+ context.currentConstruct = startCurrentConstruct;
490
+ context.events.length = startEventsIndex;
491
+ stack = startStack;
492
+ accountForPotentialSkip();
493
+ }
494
+ }
495
+
496
+ /**
497
+ * Move the current point a bit forward in the line when it’s on a column
498
+ * skip.
499
+ *
500
+ * @returns {undefined}
501
+ * Nothing.
502
+ */
503
+ function accountForPotentialSkip() {
504
+ if (point.line in columnStart && point.column < 2) {
505
+ point.column = columnStart[point.line];
506
+ point.offset += columnStart[point.line] - 1;
507
+ }
508
+ }
509
+ }
510
+
511
+ /**
512
+ * Get the chunks from a slice of chunks in the range of a token.
513
+ *
514
+ * @param {ReadonlyArray<Chunk>} chunks
515
+ * Chunks.
516
+ * @param {Pick<Token, 'end' | 'start'>} token
517
+ * Token.
518
+ * @returns {Array<Chunk>}
519
+ * Chunks.
520
+ */
521
+ function sliceChunks(chunks, token) {
522
+ const startIndex = token.start._index;
523
+ const startBufferIndex = token.start._bufferIndex;
524
+ const endIndex = token.end._index;
525
+ const endBufferIndex = token.end._bufferIndex;
526
+ /** @type {Array<Chunk>} */
527
+ let view;
528
+ if (startIndex === endIndex) {
529
+ // @ts-expect-error `_bufferIndex` is used on string chunks.
530
+ view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)];
531
+ } else {
532
+ view = chunks.slice(startIndex, endIndex);
533
+ if (startBufferIndex > -1) {
534
+ const head = view[0];
535
+ if (typeof head === 'string') {
536
+ view[0] = head.slice(startBufferIndex);
537
+ /* c8 ignore next 4 -- used to be used, no longer */
538
+ } else {
539
+ view.shift();
540
+ }
541
+ }
542
+ if (endBufferIndex > 0) {
543
+ // @ts-expect-error `_bufferIndex` is used on string chunks.
544
+ view.push(chunks[endIndex].slice(0, endBufferIndex));
545
+ }
546
+ }
547
+ return view;
548
+ }
549
+
550
+ /**
551
+ * Get the string value of a slice of chunks.
552
+ *
553
+ * @param {ReadonlyArray<Chunk>} chunks
554
+ * Chunks.
555
+ * @param {boolean | undefined} [expandTabs=false]
556
+ * Whether to expand tabs (default: `false`).
557
+ * @returns {string}
558
+ * Result.
559
+ */
560
+ function serializeChunks(chunks, expandTabs) {
561
+ let index = -1;
562
+ /** @type {Array<string>} */
563
+ const result = [];
564
+ /** @type {boolean | undefined} */
565
+ let atTab;
566
+ while (++index < chunks.length) {
567
+ const chunk = chunks[index];
568
+ /** @type {string} */
569
+ let value;
570
+ if (typeof chunk === 'string') {
571
+ value = chunk;
572
+ } else {
573
+ switch (chunk) {
574
+ case -5:
575
+ {
576
+ value = "\r";
577
+ break;
578
+ }
579
+ case -4:
580
+ {
581
+ value = "\n";
582
+ break;
583
+ }
584
+ case -3:
585
+ {
586
+ value = "\r" + "\n";
587
+ break;
588
+ }
589
+ case -2:
590
+ {
591
+ value = expandTabs ? " " : "\t";
592
+ break;
593
+ }
594
+ case -1:
595
+ {
596
+ if (!expandTabs && atTab) {
597
+ continue;
598
+ }
599
+ value = " ";
600
+ break;
601
+ }
602
+ default:
603
+ {
604
+ // Currently only replacement character.
605
+ value = String.fromCharCode(chunk);
606
+ }
607
+ }
608
+ }
609
+ atTab = chunk === -2;
610
+ result.push(value);
611
+ }
612
+ return result.join('');
613
+ }
@@ -0,0 +1,4 @@
1
+ /** @type {InitialConstruct} */
2
+ export const content: InitialConstruct;
3
+ import type { InitialConstruct } from 'micromark-util-types';
4
+ //# sourceMappingURL=content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["content.js"],"names":[],"mappings":"AAeA,+BAA+B;AAC/B,sBADW,gBAAgB,CACyB;sCAT1C,sBAAsB"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * @import {
3
+ * InitialConstruct,
4
+ * Initializer,
5
+ * State,
6
+ * TokenizeContext,
7
+ * Token
8
+ * } from 'micromark-util-types'
9
+ */
10
+
11
+ import { factorySpace } from 'micromark-factory-space';
12
+ import { markdownLineEnding } from 'micromark-util-character';
13
+ /** @type {InitialConstruct} */
14
+ export const content = {
15
+ tokenize: initializeContent
16
+ };
17
+
18
+ /**
19
+ * @this {TokenizeContext}
20
+ * Context.
21
+ * @type {Initializer}
22
+ * Content.
23
+ */
24
+ function initializeContent(effects) {
25
+ const contentStart = effects.attempt(this.parser.constructs.contentInitial, afterContentStartConstruct, paragraphInitial);
26
+ /** @type {Token} */
27
+ let previous;
28
+ return contentStart;
29
+
30
+ /** @type {State} */
31
+ function afterContentStartConstruct(code) {
32
+ if (code === null) {
33
+ effects.consume(code);
34
+ return;
35
+ }
36
+ effects.enter("lineEnding");
37
+ effects.consume(code);
38
+ effects.exit("lineEnding");
39
+ return factorySpace(effects, contentStart, "linePrefix");
40
+ }
41
+
42
+ /** @type {State} */
43
+ function paragraphInitial(code) {
44
+ effects.enter("paragraph");
45
+ return lineStart(code);
46
+ }
47
+
48
+ /** @type {State} */
49
+ function lineStart(code) {
50
+ const token = effects.enter("chunkText", {
51
+ contentType: "text",
52
+ previous
53
+ });
54
+ if (previous) {
55
+ previous.next = token;
56
+ }
57
+ previous = token;
58
+ return data(code);
59
+ }
60
+
61
+ /** @type {State} */
62
+ function data(code) {
63
+ if (code === null) {
64
+ effects.exit("chunkText");
65
+ effects.exit("paragraph");
66
+ effects.consume(code);
67
+ return;
68
+ }
69
+ if (markdownLineEnding(code)) {
70
+ effects.consume(code);
71
+ effects.exit("chunkText");
72
+ return lineStart;
73
+ }
74
+
75
+ // Data.
76
+ effects.consume(code);
77
+ return data;
78
+ }
79
+ }
@@ -0,0 +1,10 @@
1
+ /** @type {InitialConstruct} */
2
+ export const document: InitialConstruct;
3
+ /**
4
+ * Construct and its state.
5
+ */
6
+ export type StackItem = [Construct, ContainerState];
7
+ import type { InitialConstruct } from 'micromark-util-types';
8
+ import type { Construct } from 'micromark-util-types';
9
+ import type { ContainerState } from 'micromark-util-types';
10
+ //# sourceMappingURL=document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["document.js"],"names":[],"mappings":"AAyBA,+BAA+B;AAC/B,uBADW,gBAAgB,CAC2B;;;;wBAXzC,CAAC,SAAS,EAAE,cAAc,CAAC;sCAJ9B,sBAAsB;+BAAtB,sBAAsB;oCAAtB,sBAAsB"}