@bgx4k3p/huly-mcp-server 2.2.3 → 2.2.5

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 (696) hide show
  1. package/README.md +186 -56
  2. package/node_modules/@hcengineering/account-client/lib/__tests__/utils.test.js +249 -0
  3. package/node_modules/@hcengineering/account-client/lib/__tests__/utils.test.js.map +7 -0
  4. package/node_modules/@hcengineering/account-client/lib/client.js +88 -3
  5. package/node_modules/@hcengineering/account-client/lib/client.js.map +2 -2
  6. package/node_modules/@hcengineering/account-client/lib/types.js.map +2 -2
  7. package/node_modules/@hcengineering/account-client/lib/utils.js +50 -0
  8. package/node_modules/@hcengineering/account-client/lib/utils.js.map +2 -2
  9. package/node_modules/@hcengineering/account-client/package.json +22 -19
  10. package/node_modules/@hcengineering/account-client/src/__tests__/utils.test.ts +304 -0
  11. package/node_modules/@hcengineering/account-client/src/client.ts +127 -6
  12. package/node_modules/@hcengineering/account-client/src/types.ts +7 -0
  13. package/node_modules/@hcengineering/account-client/src/utils.ts +65 -1
  14. package/node_modules/@hcengineering/analytics/lib/index.js +1 -1
  15. package/node_modules/@hcengineering/analytics/lib/index.js.map +2 -2
  16. package/node_modules/@hcengineering/analytics/package.json +19 -16
  17. package/node_modules/@hcengineering/analytics/src/index.ts +2 -1
  18. package/node_modules/@hcengineering/api-client/lib/client.js +9 -4
  19. package/node_modules/@hcengineering/api-client/lib/client.js.map +2 -2
  20. package/node_modules/@hcengineering/api-client/lib/rest/adapter.js +64 -0
  21. package/node_modules/@hcengineering/api-client/lib/rest/adapter.js.map +7 -0
  22. package/node_modules/@hcengineering/api-client/lib/rest/index.js +2 -0
  23. package/node_modules/@hcengineering/api-client/lib/rest/index.js.map +2 -2
  24. package/node_modules/@hcengineering/api-client/lib/socket/node.js +5 -1
  25. package/node_modules/@hcengineering/api-client/lib/socket/node.js.map +2 -2
  26. package/node_modules/@hcengineering/api-client/package.json +28 -25
  27. package/node_modules/@hcengineering/api-client/src/client.ts +10 -1
  28. package/node_modules/@hcengineering/api-client/src/rest/adapter.ts +96 -0
  29. package/node_modules/@hcengineering/api-client/src/rest/index.ts +1 -0
  30. package/node_modules/@hcengineering/api-client/src/socket/node.ts +6 -1
  31. package/node_modules/@hcengineering/chunter/lib/index.js.map +2 -2
  32. package/node_modules/@hcengineering/chunter/package.json +13 -10
  33. package/node_modules/@hcengineering/client/package.json +21 -18
  34. package/node_modules/@hcengineering/client-resources/package.json +24 -21
  35. package/node_modules/@hcengineering/collaborator-client/package.json +21 -18
  36. package/node_modules/@hcengineering/contact/lib/__tests__/workspaceMemberStatusUtils.test.js +38 -0
  37. package/node_modules/@hcengineering/contact/lib/__tests__/workspaceMemberStatusUtils.test.js.map +7 -0
  38. package/node_modules/@hcengineering/contact/lib/index.js +13 -4
  39. package/node_modules/@hcengineering/contact/lib/index.js.map +2 -2
  40. package/node_modules/@hcengineering/contact/lib/types.js.map +1 -1
  41. package/node_modules/@hcengineering/contact/lib/utils.js +132 -108
  42. package/node_modules/@hcengineering/contact/lib/utils.js.map +3 -3
  43. package/node_modules/@hcengineering/contact/lib/workspaceMemberStatusUtils.js +79 -0
  44. package/node_modules/@hcengineering/contact/lib/workspaceMemberStatusUtils.js.map +7 -0
  45. package/node_modules/@hcengineering/contact/package.json +12 -9
  46. package/node_modules/@hcengineering/core/CHANGELOG.md +9 -1
  47. package/node_modules/@hcengineering/core/lang/cs.json +6 -1
  48. package/node_modules/@hcengineering/core/lang/de.json +6 -1
  49. package/node_modules/@hcengineering/core/lang/en.json +6 -1
  50. package/node_modules/@hcengineering/core/lang/es.json +6 -1
  51. package/node_modules/@hcengineering/core/lang/fr.json +6 -1
  52. package/node_modules/@hcengineering/core/lang/it.json +6 -1
  53. package/node_modules/@hcengineering/core/lang/ja.json +6 -1
  54. package/node_modules/@hcengineering/core/lang/pt-br.json +70 -0
  55. package/node_modules/@hcengineering/core/lang/pt.json +6 -1
  56. package/node_modules/@hcengineering/core/lang/ru.json +6 -1
  57. package/node_modules/@hcengineering/core/lang/tr.json +6 -1
  58. package/node_modules/@hcengineering/core/lang/zh.json +6 -1
  59. package/node_modules/@hcengineering/core/lib/__tests__/autoJoinRoles.test.js +13 -0
  60. package/node_modules/@hcengineering/core/lib/__tests__/autoJoinRoles.test.js.map +7 -0
  61. package/node_modules/@hcengineering/core/lib/__tests__/memdb.test.js +133 -0
  62. package/node_modules/@hcengineering/core/lib/__tests__/memdb.test.js.map +2 -2
  63. package/node_modules/@hcengineering/core/lib/__tests__/minmodel.js +25 -0
  64. package/node_modules/@hcengineering/core/lib/__tests__/minmodel.js.map +2 -2
  65. package/node_modules/@hcengineering/core/lib/__tests__/query.test.js +43 -0
  66. package/node_modules/@hcengineering/core/lib/__tests__/query.test.js.map +7 -0
  67. package/node_modules/@hcengineering/core/lib/autoJoinRoles.js +36 -0
  68. package/node_modules/@hcengineering/core/lib/autoJoinRoles.js.map +7 -0
  69. package/node_modules/@hcengineering/core/lib/classes.js +5 -0
  70. package/node_modules/@hcengineering/core/lib/classes.js.map +3 -3
  71. package/node_modules/@hcengineering/core/lib/clone.js +13 -2
  72. package/node_modules/@hcengineering/core/lib/clone.js.map +2 -2
  73. package/node_modules/@hcengineering/core/lib/component.js +14 -3
  74. package/node_modules/@hcengineering/core/lib/component.js.map +2 -2
  75. package/node_modules/@hcengineering/core/lib/index.js +2 -0
  76. package/node_modules/@hcengineering/core/lib/index.js.map +2 -2
  77. package/node_modules/@hcengineering/core/lib/memdb.js +6 -2
  78. package/node_modules/@hcengineering/core/lib/memdb.js.map +2 -2
  79. package/node_modules/@hcengineering/core/lib/operations.js +11 -0
  80. package/node_modules/@hcengineering/core/lib/operations.js.map +2 -2
  81. package/node_modules/@hcengineering/core/lib/predicate.js +3 -0
  82. package/node_modules/@hcengineering/core/lib/predicate.js.map +2 -2
  83. package/node_modules/@hcengineering/core/lib/storage.js.map +2 -2
  84. package/node_modules/@hcengineering/core/lib/tx.js +3 -1
  85. package/node_modules/@hcengineering/core/lib/tx.js.map +2 -2
  86. package/node_modules/@hcengineering/core/lib/utils.js +1 -1
  87. package/node_modules/@hcengineering/core/lib/utils.js.map +2 -2
  88. package/node_modules/@hcengineering/core/lib/versioning.js +17 -0
  89. package/node_modules/@hcengineering/core/lib/versioning.js.map +7 -0
  90. package/node_modules/@hcengineering/core/package.json +22 -19
  91. package/node_modules/@hcengineering/core/src/__tests__/autoJoinRoles.test.ts +27 -0
  92. package/node_modules/@hcengineering/core/src/__tests__/memdb.test.ts +150 -1
  93. package/node_modules/@hcengineering/core/src/__tests__/minmodel.ts +29 -1
  94. package/node_modules/@hcengineering/core/src/__tests__/query.test.ts +66 -0
  95. package/node_modules/@hcengineering/core/src/autoJoinRoles.ts +33 -0
  96. package/node_modules/@hcengineering/core/src/classes.ts +61 -1
  97. package/node_modules/@hcengineering/core/src/clone.ts +13 -2
  98. package/node_modules/@hcengineering/core/src/component.ts +25 -9
  99. package/node_modules/@hcengineering/core/src/index.ts +2 -0
  100. package/node_modules/@hcengineering/core/src/memdb.ts +7 -3
  101. package/node_modules/@hcengineering/core/src/operations.ts +11 -0
  102. package/node_modules/@hcengineering/core/src/predicate.ts +3 -0
  103. package/node_modules/@hcengineering/core/src/storage.ts +6 -3
  104. package/node_modules/@hcengineering/core/src/tx.ts +4 -1
  105. package/node_modules/@hcengineering/core/src/utils.ts +1 -1
  106. package/node_modules/@hcengineering/core/src/versioning.ts +13 -0
  107. package/node_modules/@hcengineering/measurements/lib/__tests__/performance.test.js +3 -3
  108. package/node_modules/@hcengineering/measurements/lib/__tests__/performance.test.js.map +2 -2
  109. package/node_modules/@hcengineering/measurements/package.json +17 -14
  110. package/node_modules/@hcengineering/measurements/src/__tests__/performance.test.ts +3 -3
  111. package/node_modules/@hcengineering/platform/lang/pt-br.json +31 -0
  112. package/node_modules/@hcengineering/platform/lib/__tests__/i18n.test.js +100 -0
  113. package/node_modules/@hcengineering/platform/lib/__tests__/i18n.test.js.map +2 -2
  114. package/node_modules/@hcengineering/platform/lib/__tests__/status.test.js +78 -0
  115. package/node_modules/@hcengineering/platform/lib/__tests__/status.test.js.map +7 -0
  116. package/node_modules/@hcengineering/platform/lib/i18n.js +78 -69
  117. package/node_modules/@hcengineering/platform/lib/i18n.js.map +3 -3
  118. package/node_modules/@hcengineering/platform/lib/status.js +25 -0
  119. package/node_modules/@hcengineering/platform/lib/status.js.map +2 -2
  120. package/node_modules/@hcengineering/platform/package.json +18 -15
  121. package/node_modules/@hcengineering/platform/src/__tests__/i18n.test.ts +114 -2
  122. package/node_modules/@hcengineering/platform/src/__tests__/status.test.ts +77 -0
  123. package/node_modules/@hcengineering/platform/src/i18n.ts +99 -71
  124. package/node_modules/@hcengineering/platform/src/status.ts +30 -0
  125. package/node_modules/@hcengineering/rank/package.json +19 -16
  126. package/node_modules/@hcengineering/rpc/package.json +21 -18
  127. package/node_modules/@hcengineering/tags/package.json +12 -9
  128. package/node_modules/@hcengineering/task/package.json +14 -11
  129. package/node_modules/@hcengineering/text/lib/markup/__tests__/utils.test.js +25 -0
  130. package/node_modules/@hcengineering/text/lib/markup/__tests__/utils.test.js.map +2 -2
  131. package/node_modules/@hcengineering/text/lib/tiptapExtensions.js +6 -0
  132. package/node_modules/@hcengineering/text/lib/tiptapExtensions.js.map +2 -2
  133. package/node_modules/@hcengineering/text/package.json +23 -18
  134. package/node_modules/@hcengineering/text/src/markup/__tests__/utils.test.ts +27 -0
  135. package/node_modules/@hcengineering/text/src/tiptapExtensions.ts +3 -0
  136. package/node_modules/@hcengineering/text-core/lib/markup/model.js +1 -0
  137. package/node_modules/@hcengineering/text-core/lib/markup/model.js.map +2 -2
  138. package/node_modules/@hcengineering/text-core/package.json +20 -17
  139. package/node_modules/@hcengineering/text-core/src/markup/model.ts +2 -1
  140. package/node_modules/@hcengineering/text-html/package.json +19 -16
  141. package/node_modules/@hcengineering/text-markdown/lib/serializer.js +14 -0
  142. package/node_modules/@hcengineering/text-markdown/lib/serializer.js.map +2 -2
  143. package/node_modules/@hcengineering/text-markdown/package.json +20 -17
  144. package/node_modules/@hcengineering/text-markdown/src/serializer.ts +14 -0
  145. package/node_modules/@hcengineering/tracker/lib/index.js +1 -0
  146. package/node_modules/@hcengineering/tracker/lib/index.js.map +2 -2
  147. package/node_modules/@hcengineering/tracker/package.json +16 -13
  148. package/node_modules/@tiptap/core/dist/commands/focus.d.ts.map +1 -1
  149. package/node_modules/@tiptap/core/dist/index.cjs +19 -2
  150. package/node_modules/@tiptap/core/dist/index.cjs.map +1 -1
  151. package/node_modules/@tiptap/core/dist/index.js +19 -3
  152. package/node_modules/@tiptap/core/dist/index.js.map +1 -1
  153. package/node_modules/@tiptap/core/dist/index.umd.js +19 -2
  154. package/node_modules/@tiptap/core/dist/index.umd.js.map +1 -1
  155. package/node_modules/@tiptap/core/dist/utilities/index.d.ts +1 -0
  156. package/node_modules/@tiptap/core/dist/utilities/index.d.ts.map +1 -1
  157. package/node_modules/@tiptap/core/dist/utilities/isSafari.d.ts +10 -0
  158. package/node_modules/@tiptap/core/dist/utilities/isSafari.d.ts.map +1 -0
  159. package/node_modules/@tiptap/core/package.json +2 -2
  160. package/node_modules/@tiptap/core/src/commands/focus.ts +7 -2
  161. package/node_modules/@tiptap/core/src/utilities/index.ts +1 -0
  162. package/node_modules/@tiptap/core/src/utilities/isSafari.ts +11 -0
  163. package/node_modules/@tiptap/extension-blockquote/package.json +2 -2
  164. package/node_modules/@tiptap/extension-bold/package.json +2 -2
  165. package/node_modules/@tiptap/extension-bullet-list/package.json +2 -2
  166. package/node_modules/@tiptap/extension-code/package.json +2 -2
  167. package/node_modules/@tiptap/extension-code-block/package.json +3 -3
  168. package/node_modules/@tiptap/extension-document/package.json +2 -2
  169. package/node_modules/@tiptap/extension-dropcursor/package.json +3 -3
  170. package/node_modules/@tiptap/extension-gapcursor/package.json +3 -3
  171. package/node_modules/@tiptap/extension-hard-break/package.json +2 -2
  172. package/node_modules/@tiptap/extension-heading/package.json +2 -2
  173. package/node_modules/@tiptap/extension-highlight/package.json +2 -2
  174. package/node_modules/@tiptap/extension-history/package.json +3 -3
  175. package/node_modules/@tiptap/extension-horizontal-rule/package.json +3 -3
  176. package/node_modules/@tiptap/extension-italic/package.json +2 -2
  177. package/node_modules/@tiptap/extension-link/package.json +3 -3
  178. package/node_modules/@tiptap/extension-list-item/package.json +2 -2
  179. package/node_modules/@tiptap/extension-mention/package.json +4 -4
  180. package/node_modules/@tiptap/extension-ordered-list/package.json +2 -2
  181. package/node_modules/@tiptap/extension-paragraph/package.json +2 -2
  182. package/node_modules/@tiptap/extension-strike/package.json +2 -2
  183. package/node_modules/@tiptap/extension-subscript/README.md +14 -0
  184. package/node_modules/@tiptap/extension-subscript/dist/index.cjs +61 -0
  185. package/node_modules/@tiptap/extension-subscript/dist/index.cjs.map +1 -0
  186. package/node_modules/@tiptap/extension-subscript/dist/index.d.ts +4 -0
  187. package/node_modules/@tiptap/extension-subscript/dist/index.d.ts.map +1 -0
  188. package/node_modules/@tiptap/extension-subscript/dist/index.js +56 -0
  189. package/node_modules/@tiptap/extension-subscript/dist/index.js.map +1 -0
  190. package/node_modules/@tiptap/extension-subscript/dist/index.umd.js +65 -0
  191. package/node_modules/@tiptap/extension-subscript/dist/index.umd.js.map +1 -0
  192. package/node_modules/@tiptap/extension-subscript/dist/subscript.d.ts +36 -0
  193. package/node_modules/@tiptap/extension-subscript/dist/subscript.d.ts.map +1 -0
  194. package/node_modules/@tiptap/extension-subscript/package.json +49 -0
  195. package/node_modules/@tiptap/extension-subscript/src/index.ts +5 -0
  196. package/node_modules/@tiptap/extension-subscript/src/subscript.ts +91 -0
  197. package/node_modules/@tiptap/extension-superscript/README.md +14 -0
  198. package/node_modules/@tiptap/extension-superscript/dist/index.cjs +61 -0
  199. package/node_modules/@tiptap/extension-superscript/dist/index.cjs.map +1 -0
  200. package/node_modules/@tiptap/extension-superscript/dist/index.d.ts +4 -0
  201. package/node_modules/@tiptap/extension-superscript/dist/index.d.ts.map +1 -0
  202. package/node_modules/@tiptap/extension-superscript/dist/index.js +56 -0
  203. package/node_modules/@tiptap/extension-superscript/dist/index.js.map +1 -0
  204. package/node_modules/@tiptap/extension-superscript/dist/index.umd.js +65 -0
  205. package/node_modules/@tiptap/extension-superscript/dist/index.umd.js.map +1 -0
  206. package/node_modules/@tiptap/extension-superscript/dist/superscript.d.ts +36 -0
  207. package/node_modules/@tiptap/extension-superscript/dist/superscript.d.ts.map +1 -0
  208. package/node_modules/@tiptap/extension-superscript/package.json +49 -0
  209. package/node_modules/@tiptap/extension-superscript/src/index.ts +5 -0
  210. package/node_modules/@tiptap/extension-superscript/src/superscript.ts +91 -0
  211. package/node_modules/@tiptap/extension-table/package.json +3 -3
  212. package/node_modules/@tiptap/extension-table-cell/package.json +2 -2
  213. package/node_modules/@tiptap/extension-table-header/package.json +2 -2
  214. package/node_modules/@tiptap/extension-table-row/package.json +2 -2
  215. package/node_modules/@tiptap/extension-task-item/package.json +3 -3
  216. package/node_modules/@tiptap/extension-task-list/package.json +2 -2
  217. package/node_modules/@tiptap/extension-text/package.json +2 -2
  218. package/node_modules/@tiptap/extension-typography/package.json +2 -2
  219. package/node_modules/@tiptap/extension-underline/package.json +2 -2
  220. package/node_modules/@tiptap/html/package.json +3 -3
  221. package/node_modules/@tiptap/pm/package.json +1 -1
  222. package/node_modules/@tiptap/starter-kit/node_modules/@tiptap/extension-text-style/package.json +2 -2
  223. package/node_modules/@tiptap/starter-kit/package.json +22 -22
  224. package/node_modules/@tiptap/suggestion/package.json +3 -3
  225. package/node_modules/linkify-it/build/index.cjs.js +99 -94
  226. package/node_modules/linkify-it/index.mjs +99 -94
  227. package/node_modules/linkify-it/package.json +11 -1
  228. package/node_modules/linkifyjs/README.md +4 -2
  229. package/node_modules/linkifyjs/dist/linkify.cjs +8 -11
  230. package/node_modules/linkifyjs/dist/linkify.d.cts +14 -14
  231. package/node_modules/linkifyjs/dist/linkify.d.mts +14 -14
  232. package/node_modules/linkifyjs/dist/linkify.js +8 -11
  233. package/node_modules/linkifyjs/dist/linkify.min.js +1 -1
  234. package/node_modules/linkifyjs/dist/linkify.mjs +8 -11
  235. package/node_modules/linkifyjs/package.json +1 -1
  236. package/node_modules/markdown-it/README.md +13 -17
  237. package/node_modules/markdown-it/dist/index.cjs.js +111 -31
  238. package/node_modules/markdown-it/dist/markdown-it.js +117 -31
  239. package/node_modules/markdown-it/dist/markdown-it.min.js +2 -2
  240. package/node_modules/markdown-it/lib/common/utils.mjs +30 -1
  241. package/node_modules/markdown-it/lib/index.mjs +1 -1
  242. package/node_modules/markdown-it/lib/rules_block/heading.mjs +2 -2
  243. package/node_modules/markdown-it/lib/rules_block/html_block.mjs +12 -1
  244. package/node_modules/markdown-it/lib/rules_block/lheading.mjs +4 -1
  245. package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +3 -1
  246. package/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +37 -21
  247. package/node_modules/markdown-it/lib/rules_inline/entity.mjs +2 -2
  248. package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +37 -6
  249. package/node_modules/markdown-it/package.json +14 -3
  250. package/node_modules/msgpackr/README.md +1 -3
  251. package/node_modules/msgpackr/benchmark.md +26 -16
  252. package/node_modules/msgpackr/dist/index-no-eval.cjs +35 -16
  253. package/node_modules/msgpackr/dist/index-no-eval.cjs.map +1 -1
  254. package/node_modules/msgpackr/dist/index-no-eval.min.js +1 -1
  255. package/node_modules/msgpackr/dist/index-no-eval.min.js.map +1 -1
  256. package/node_modules/msgpackr/dist/index.js +35 -16
  257. package/node_modules/msgpackr/dist/index.js.map +1 -1
  258. package/node_modules/msgpackr/dist/index.min.js +1 -1
  259. package/node_modules/msgpackr/dist/index.min.js.map +1 -1
  260. package/node_modules/msgpackr/dist/node.cjs +50 -26
  261. package/node_modules/msgpackr/dist/node.cjs.map +1 -1
  262. package/node_modules/msgpackr/dist/test.js +44 -16
  263. package/node_modules/msgpackr/dist/test.js.map +1 -1
  264. package/node_modules/msgpackr/dist/unpack-no-eval.cjs +35 -16
  265. package/node_modules/msgpackr/dist/unpack-no-eval.cjs.map +1 -1
  266. package/node_modules/msgpackr/index.d.cts +2 -0
  267. package/node_modules/msgpackr/index.d.ts +2 -0
  268. package/node_modules/msgpackr/package.json +1 -1
  269. package/node_modules/msgpackr/stream.js +15 -10
  270. package/node_modules/msgpackr/unpack.js +35 -16
  271. package/node_modules/prosemirror-changeset/CHANGELOG.md +12 -0
  272. package/node_modules/prosemirror-changeset/README.md +31 -2
  273. package/node_modules/prosemirror-changeset/dist/index.cjs +17 -2
  274. package/node_modules/prosemirror-changeset/dist/index.d.cts +32 -2
  275. package/node_modules/prosemirror-changeset/dist/index.d.ts +32 -2
  276. package/node_modules/prosemirror-changeset/dist/index.js +18 -3
  277. package/node_modules/prosemirror-changeset/package.json +2 -2
  278. package/node_modules/prosemirror-changeset/src/README.md +4 -2
  279. package/node_modules/prosemirror-changeset/src/change.ts +18 -0
  280. package/node_modules/prosemirror-changeset/src/changeset.ts +10 -4
  281. package/node_modules/prosemirror-changeset/src/simplify.ts +1 -1
  282. package/node_modules/prosemirror-changeset/test/test-simplify.ts +3 -0
  283. package/node_modules/prosemirror-gapcursor/CHANGELOG.md +6 -0
  284. package/node_modules/prosemirror-gapcursor/dist/index.cjs +1 -1
  285. package/node_modules/prosemirror-gapcursor/dist/index.js +1 -1
  286. package/node_modules/prosemirror-gapcursor/package.json +3 -2
  287. package/node_modules/prosemirror-gapcursor/src/gapcursor.ts +1 -1
  288. package/node_modules/prosemirror-markdown/CHANGELOG.md +12 -0
  289. package/node_modules/prosemirror-markdown/dist/index.cjs +11 -1
  290. package/node_modules/prosemirror-markdown/dist/index.js +14 -2
  291. package/node_modules/prosemirror-markdown/package.json +1 -1
  292. package/node_modules/prosemirror-markdown/src/to_markdown.ts +12 -3
  293. package/node_modules/prosemirror-menu/CHANGELOG.md +18 -0
  294. package/node_modules/prosemirror-menu/CONTRIBUTING.md +22 -18
  295. package/node_modules/prosemirror-menu/README.md +69 -29
  296. package/node_modules/prosemirror-menu/dist/index.cjs +232 -48
  297. package/node_modules/prosemirror-menu/dist/index.d.cts +29 -14
  298. package/node_modules/prosemirror-menu/dist/index.d.ts +29 -14
  299. package/node_modules/prosemirror-menu/dist/index.js +229 -36
  300. package/node_modules/prosemirror-menu/package.json +2 -2
  301. package/node_modules/prosemirror-menu/src/README.md +30 -1
  302. package/node_modules/prosemirror-menu/src/icons.ts +3 -2
  303. package/node_modules/prosemirror-menu/src/menu.ts +193 -40
  304. package/node_modules/prosemirror-menu/src/menubar.ts +50 -5
  305. package/node_modules/prosemirror-menu/style/menu.css +28 -7
  306. package/node_modules/prosemirror-model/CHANGELOG.md +20 -0
  307. package/node_modules/prosemirror-model/CONTRIBUTING.md +19 -19
  308. package/node_modules/prosemirror-model/README.md +3 -3
  309. package/node_modules/prosemirror-model/dist/index.cjs +13 -10
  310. package/node_modules/prosemirror-model/dist/index.d.cts +25 -21
  311. package/node_modules/prosemirror-model/dist/index.d.ts +25 -21
  312. package/node_modules/prosemirror-model/dist/index.js +19 -23
  313. package/node_modules/prosemirror-model/package.json +2 -2
  314. package/node_modules/prosemirror-model/src/fragment.ts +1 -1
  315. package/node_modules/prosemirror-model/src/from_dom.ts +4 -1
  316. package/node_modules/prosemirror-model/src/node.ts +5 -4
  317. package/node_modules/prosemirror-model/src/replace.ts +6 -15
  318. package/node_modules/prosemirror-model/src/schema.ts +1 -1
  319. package/node_modules/prosemirror-model/src/to_dom.ts +24 -20
  320. package/node_modules/prosemirror-transform/CHANGELOG.md +16 -0
  321. package/node_modules/prosemirror-transform/dist/index.cjs +38 -4
  322. package/node_modules/prosemirror-transform/dist/index.d.cts +19 -0
  323. package/node_modules/prosemirror-transform/dist/index.d.ts +19 -0
  324. package/node_modules/prosemirror-transform/dist/index.js +52 -1
  325. package/node_modules/prosemirror-transform/package.json +1 -1
  326. package/node_modules/prosemirror-transform/src/replace.ts +16 -0
  327. package/node_modules/prosemirror-transform/src/replace_step.ts +10 -1
  328. package/node_modules/prosemirror-transform/src/transform.ts +21 -2
  329. package/node_modules/prosemirror-view/CHANGELOG.md +34 -2
  330. package/node_modules/prosemirror-view/CONTRIBUTING.md +19 -19
  331. package/node_modules/prosemirror-view/README.md +3 -3
  332. package/node_modules/prosemirror-view/dist/index.cjs +96 -40
  333. package/node_modules/prosemirror-view/dist/index.d.cts +2 -2
  334. package/node_modules/prosemirror-view/dist/index.d.ts +2 -2
  335. package/node_modules/prosemirror-view/dist/index.js +90 -39
  336. package/node_modules/prosemirror-view/package.json +2 -2
  337. package/node_modules/prosemirror-view/src/domchange.ts +1 -1
  338. package/node_modules/prosemirror-view/src/domobserver.ts +59 -16
  339. package/node_modules/prosemirror-view/src/index.ts +4 -4
  340. package/node_modules/prosemirror-view/src/input.ts +9 -6
  341. package/node_modules/prosemirror-view/src/viewdesc.ts +26 -22
  342. package/node_modules/prosemirror-view/style/prosemirror.css +1 -1
  343. package/package.json +5 -4
  344. package/src/client.mjs +2 -2
  345. package/src/config.mjs +1 -0
  346. package/src/helpers.mjs +2 -2
  347. package/src/index.mjs +31 -1
  348. package/src/initCodex.mjs +281 -0
  349. package/src/mcp.mjs +11 -1
  350. package/src/mcpShared.mjs +95 -5
  351. package/node_modules/@hcengineering/account-client/types/client.d.ts +0 -140
  352. package/node_modules/@hcengineering/account-client/types/client.d.ts.map +0 -1
  353. package/node_modules/@hcengineering/account-client/types/index.d.ts +0 -4
  354. package/node_modules/@hcengineering/account-client/types/index.d.ts.map +0 -1
  355. package/node_modules/@hcengineering/account-client/types/types.d.ts +0 -177
  356. package/node_modules/@hcengineering/account-client/types/types.d.ts.map +0 -1
  357. package/node_modules/@hcengineering/account-client/types/utils.d.ts +0 -5
  358. package/node_modules/@hcengineering/account-client/types/utils.d.ts.map +0 -1
  359. package/node_modules/@hcengineering/analytics/types/index.d.ts +0 -25
  360. package/node_modules/@hcengineering/analytics/types/index.d.ts.map +0 -1
  361. package/node_modules/@hcengineering/api-client/types/__tests__/config.test.d.ts +0 -2
  362. package/node_modules/@hcengineering/api-client/types/__tests__/config.test.d.ts.map +0 -1
  363. package/node_modules/@hcengineering/api-client/types/__tests__/markup-client.test.d.ts +0 -2
  364. package/node_modules/@hcengineering/api-client/types/__tests__/markup-client.test.d.ts.map +0 -1
  365. package/node_modules/@hcengineering/api-client/types/__tests__/markup-types.test.d.ts +0 -2
  366. package/node_modules/@hcengineering/api-client/types/__tests__/markup-types.test.d.ts.map +0 -1
  367. package/node_modules/@hcengineering/api-client/types/__tests__/rest-utils.test.d.ts +0 -2
  368. package/node_modules/@hcengineering/api-client/types/__tests__/rest-utils.test.d.ts.map +0 -1
  369. package/node_modules/@hcengineering/api-client/types/__tests__/utils.test.d.ts +0 -2
  370. package/node_modules/@hcengineering/api-client/types/__tests__/utils.test.d.ts.map +0 -1
  371. package/node_modules/@hcengineering/api-client/types/client.d.ts +0 -6
  372. package/node_modules/@hcengineering/api-client/types/client.d.ts.map +0 -1
  373. package/node_modules/@hcengineering/api-client/types/config.d.ts +0 -8
  374. package/node_modules/@hcengineering/api-client/types/config.d.ts.map +0 -1
  375. package/node_modules/@hcengineering/api-client/types/index.d.ts +0 -9
  376. package/node_modules/@hcengineering/api-client/types/index.d.ts.map +0 -1
  377. package/node_modules/@hcengineering/api-client/types/markup/client.d.ts +0 -5
  378. package/node_modules/@hcengineering/api-client/types/markup/client.d.ts.map +0 -1
  379. package/node_modules/@hcengineering/api-client/types/markup/index.d.ts +0 -3
  380. package/node_modules/@hcengineering/api-client/types/markup/index.d.ts.map +0 -1
  381. package/node_modules/@hcengineering/api-client/types/markup/types.d.ts +0 -41
  382. package/node_modules/@hcengineering/api-client/types/markup/types.d.ts.map +0 -1
  383. package/node_modules/@hcengineering/api-client/types/rest/index.d.ts +0 -4
  384. package/node_modules/@hcengineering/api-client/types/rest/index.d.ts.map +0 -1
  385. package/node_modules/@hcengineering/api-client/types/rest/rest.d.ts +0 -39
  386. package/node_modules/@hcengineering/api-client/types/rest/rest.d.ts.map +0 -1
  387. package/node_modules/@hcengineering/api-client/types/rest/tx.d.ts +0 -3
  388. package/node_modules/@hcengineering/api-client/types/rest/tx.d.ts.map +0 -1
  389. package/node_modules/@hcengineering/api-client/types/rest/types.d.ts +0 -16
  390. package/node_modules/@hcengineering/api-client/types/rest/types.d.ts.map +0 -1
  391. package/node_modules/@hcengineering/api-client/types/rest/utils.d.ts +0 -3
  392. package/node_modules/@hcengineering/api-client/types/rest/utils.d.ts.map +0 -1
  393. package/node_modules/@hcengineering/api-client/types/socket/browser.d.ts +0 -4
  394. package/node_modules/@hcengineering/api-client/types/socket/browser.d.ts.map +0 -1
  395. package/node_modules/@hcengineering/api-client/types/socket/index.d.ts +0 -3
  396. package/node_modules/@hcengineering/api-client/types/socket/index.d.ts.map +0 -1
  397. package/node_modules/@hcengineering/api-client/types/socket/node.d.ts +0 -4
  398. package/node_modules/@hcengineering/api-client/types/socket/node.d.ts.map +0 -1
  399. package/node_modules/@hcengineering/api-client/types/storage/client.d.ts +0 -21
  400. package/node_modules/@hcengineering/api-client/types/storage/client.d.ts.map +0 -1
  401. package/node_modules/@hcengineering/api-client/types/storage/error.d.ts +0 -10
  402. package/node_modules/@hcengineering/api-client/types/storage/error.d.ts.map +0 -1
  403. package/node_modules/@hcengineering/api-client/types/storage/index.d.ts +0 -4
  404. package/node_modules/@hcengineering/api-client/types/storage/index.d.ts.map +0 -1
  405. package/node_modules/@hcengineering/api-client/types/storage/types.d.ts +0 -10
  406. package/node_modules/@hcengineering/api-client/types/storage/types.d.ts.map +0 -1
  407. package/node_modules/@hcengineering/api-client/types/types.d.ts +0 -101
  408. package/node_modules/@hcengineering/api-client/types/types.d.ts.map +0 -1
  409. package/node_modules/@hcengineering/api-client/types/utils.d.ts +0 -12
  410. package/node_modules/@hcengineering/api-client/types/utils.d.ts.map +0 -1
  411. package/node_modules/@hcengineering/chunter/types/analytics.d.ts +0 -5
  412. package/node_modules/@hcengineering/chunter/types/analytics.d.ts.map +0 -1
  413. package/node_modules/@hcengineering/chunter/types/index.d.ts +0 -211
  414. package/node_modules/@hcengineering/chunter/types/index.d.ts.map +0 -1
  415. package/node_modules/@hcengineering/chunter/types/utils.d.ts +0 -7
  416. package/node_modules/@hcengineering/chunter/types/utils.d.ts.map +0 -1
  417. package/node_modules/@hcengineering/client/types/__tests__/client.test.d.ts +0 -2
  418. package/node_modules/@hcengineering/client/types/__tests__/client.test.d.ts.map +0 -1
  419. package/node_modules/@hcengineering/client/types/index.d.ts +0 -69
  420. package/node_modules/@hcengineering/client/types/index.d.ts.map +0 -1
  421. package/node_modules/@hcengineering/client-resources/types/__tests__/connection.test.d.ts +0 -2
  422. package/node_modules/@hcengineering/client-resources/types/__tests__/connection.test.d.ts.map +0 -1
  423. package/node_modules/@hcengineering/client-resources/types/__tests__/integration.test.d.ts +0 -45
  424. package/node_modules/@hcengineering/client-resources/types/__tests__/integration.test.d.ts.map +0 -1
  425. package/node_modules/@hcengineering/client-resources/types/connection.d.ts +0 -7
  426. package/node_modules/@hcengineering/client-resources/types/connection.d.ts.map +0 -1
  427. package/node_modules/@hcengineering/client-resources/types/index.d.ts +0 -11
  428. package/node_modules/@hcengineering/client-resources/types/index.d.ts.map +0 -1
  429. package/node_modules/@hcengineering/collaborator-client/types/__tests__/utils.test.d.ts +0 -2
  430. package/node_modules/@hcengineering/collaborator-client/types/__tests__/utils.test.d.ts.map +0 -1
  431. package/node_modules/@hcengineering/collaborator-client/types/client.d.ts +0 -34
  432. package/node_modules/@hcengineering/collaborator-client/types/client.d.ts.map +0 -1
  433. package/node_modules/@hcengineering/collaborator-client/types/index.d.ts +0 -3
  434. package/node_modules/@hcengineering/collaborator-client/types/index.d.ts.map +0 -1
  435. package/node_modules/@hcengineering/collaborator-client/types/utils.d.ts +0 -9
  436. package/node_modules/@hcengineering/collaborator-client/types/utils.d.ts.map +0 -1
  437. package/node_modules/@hcengineering/contact/types/__tests__/cache.test.d.ts +0 -2
  438. package/node_modules/@hcengineering/contact/types/__tests__/cache.test.d.ts.map +0 -1
  439. package/node_modules/@hcengineering/contact/types/analytics.d.ts +0 -6
  440. package/node_modules/@hcengineering/contact/types/analytics.d.ts.map +0 -1
  441. package/node_modules/@hcengineering/contact/types/avatar.d.ts +0 -12
  442. package/node_modules/@hcengineering/contact/types/avatar.d.ts.map +0 -1
  443. package/node_modules/@hcengineering/contact/types/cache.d.ts +0 -49
  444. package/node_modules/@hcengineering/contact/types/cache.d.ts.map +0 -1
  445. package/node_modules/@hcengineering/contact/types/index.d.ts +0 -367
  446. package/node_modules/@hcengineering/contact/types/index.d.ts.map +0 -1
  447. package/node_modules/@hcengineering/contact/types/types.d.ts +0 -25
  448. package/node_modules/@hcengineering/contact/types/types.d.ts.map +0 -1
  449. package/node_modules/@hcengineering/contact/types/utils.d.ts +0 -110
  450. package/node_modules/@hcengineering/contact/types/utils.d.ts.map +0 -1
  451. package/node_modules/@hcengineering/core/types/__tests__/client.test.d.ts +0 -2
  452. package/node_modules/@hcengineering/core/types/__tests__/client.test.d.ts.map +0 -1
  453. package/node_modules/@hcengineering/core/types/__tests__/clone.test.d.ts +0 -2
  454. package/node_modules/@hcengineering/core/types/__tests__/clone.test.d.ts.map +0 -1
  455. package/node_modules/@hcengineering/core/types/__tests__/collaboration.test.d.ts +0 -2
  456. package/node_modules/@hcengineering/core/types/__tests__/collaboration.test.d.ts.map +0 -1
  457. package/node_modules/@hcengineering/core/types/__tests__/collaborators.test.d.ts +0 -2
  458. package/node_modules/@hcengineering/core/types/__tests__/collaborators.test.d.ts.map +0 -1
  459. package/node_modules/@hcengineering/core/types/__tests__/common.test.d.ts +0 -2
  460. package/node_modules/@hcengineering/core/types/__tests__/common.test.d.ts.map +0 -1
  461. package/node_modules/@hcengineering/core/types/__tests__/connection.d.ts +0 -4
  462. package/node_modules/@hcengineering/core/types/__tests__/connection.d.ts.map +0 -1
  463. package/node_modules/@hcengineering/core/types/__tests__/contexts.test.d.ts +0 -2
  464. package/node_modules/@hcengineering/core/types/__tests__/contexts.test.d.ts.map +0 -1
  465. package/node_modules/@hcengineering/core/types/__tests__/hierarchy.test.d.ts +0 -2
  466. package/node_modules/@hcengineering/core/types/__tests__/hierarchy.test.d.ts.map +0 -1
  467. package/node_modules/@hcengineering/core/types/__tests__/lang.test.d.ts +0 -2
  468. package/node_modules/@hcengineering/core/types/__tests__/lang.test.d.ts.map +0 -1
  469. package/node_modules/@hcengineering/core/types/__tests__/limiter-edge-cases.test.d.ts +0 -2
  470. package/node_modules/@hcengineering/core/types/__tests__/limiter-edge-cases.test.d.ts.map +0 -1
  471. package/node_modules/@hcengineering/core/types/__tests__/limits.test.d.ts +0 -2
  472. package/node_modules/@hcengineering/core/types/__tests__/limits.test.d.ts.map +0 -1
  473. package/node_modules/@hcengineering/core/types/__tests__/memdb.test.d.ts +0 -2
  474. package/node_modules/@hcengineering/core/types/__tests__/memdb.test.d.ts.map +0 -1
  475. package/node_modules/@hcengineering/core/types/__tests__/minmodel.d.ts +0 -50
  476. package/node_modules/@hcengineering/core/types/__tests__/minmodel.d.ts.map +0 -1
  477. package/node_modules/@hcengineering/core/types/__tests__/objvalue.test.d.ts +0 -2
  478. package/node_modules/@hcengineering/core/types/__tests__/objvalue.test.d.ts.map +0 -1
  479. package/node_modules/@hcengineering/core/types/__tests__/operator-bugs.test.d.ts +0 -2
  480. package/node_modules/@hcengineering/core/types/__tests__/operator-bugs.test.d.ts.map +0 -1
  481. package/node_modules/@hcengineering/core/types/__tests__/operator.test.d.ts +0 -2
  482. package/node_modules/@hcengineering/core/types/__tests__/operator.test.d.ts.map +0 -1
  483. package/node_modules/@hcengineering/core/types/__tests__/rate-limiter.test.d.ts +0 -2
  484. package/node_modules/@hcengineering/core/types/__tests__/rate-limiter.test.d.ts.map +0 -1
  485. package/node_modules/@hcengineering/core/types/__tests__/time.test.d.ts +0 -2
  486. package/node_modules/@hcengineering/core/types/__tests__/time.test.d.ts.map +0 -1
  487. package/node_modules/@hcengineering/core/types/__tests__/utils.test.d.ts +0 -2
  488. package/node_modules/@hcengineering/core/types/__tests__/utils.test.d.ts.map +0 -1
  489. package/node_modules/@hcengineering/core/types/backup.d.ts +0 -26
  490. package/node_modules/@hcengineering/core/types/backup.d.ts.map +0 -1
  491. package/node_modules/@hcengineering/core/types/benchmark.d.ts +0 -19
  492. package/node_modules/@hcengineering/core/types/benchmark.d.ts.map +0 -1
  493. package/node_modules/@hcengineering/core/types/classes.d.ts +0 -716
  494. package/node_modules/@hcengineering/core/types/classes.d.ts.map +0 -1
  495. package/node_modules/@hcengineering/core/types/client.d.ts +0 -69
  496. package/node_modules/@hcengineering/core/types/client.d.ts.map +0 -1
  497. package/node_modules/@hcengineering/core/types/clone.d.ts +0 -3
  498. package/node_modules/@hcengineering/core/types/clone.d.ts.map +0 -1
  499. package/node_modules/@hcengineering/core/types/collaboration.d.ts +0 -16
  500. package/node_modules/@hcengineering/core/types/collaboration.d.ts.map +0 -1
  501. package/node_modules/@hcengineering/core/types/collaborators.d.ts +0 -3
  502. package/node_modules/@hcengineering/core/types/collaborators.d.ts.map +0 -1
  503. package/node_modules/@hcengineering/core/types/common.d.ts +0 -4
  504. package/node_modules/@hcengineering/core/types/common.d.ts.map +0 -1
  505. package/node_modules/@hcengineering/core/types/component.d.ts +0 -229
  506. package/node_modules/@hcengineering/core/types/component.d.ts.map +0 -1
  507. package/node_modules/@hcengineering/core/types/hierarchy.d.ts +0 -84
  508. package/node_modules/@hcengineering/core/types/hierarchy.d.ts.map +0 -1
  509. package/node_modules/@hcengineering/core/types/index.d.ts +0 -25
  510. package/node_modules/@hcengineering/core/types/index.d.ts.map +0 -1
  511. package/node_modules/@hcengineering/core/types/memdb.d.ts +0 -60
  512. package/node_modules/@hcengineering/core/types/memdb.d.ts.map +0 -1
  513. package/node_modules/@hcengineering/core/types/objvalue.d.ts +0 -10
  514. package/node_modules/@hcengineering/core/types/objvalue.d.ts.map +0 -1
  515. package/node_modules/@hcengineering/core/types/operations.d.ts +0 -87
  516. package/node_modules/@hcengineering/core/types/operations.d.ts.map +0 -1
  517. package/node_modules/@hcengineering/core/types/operator.d.ts +0 -16
  518. package/node_modules/@hcengineering/core/types/operator.d.ts.map +0 -1
  519. package/node_modules/@hcengineering/core/types/predicate.d.ts +0 -6
  520. package/node_modules/@hcengineering/core/types/predicate.d.ts.map +0 -1
  521. package/node_modules/@hcengineering/core/types/proxy.d.ts +0 -21
  522. package/node_modules/@hcengineering/core/types/proxy.d.ts.map +0 -1
  523. package/node_modules/@hcengineering/core/types/query.d.ts +0 -21
  524. package/node_modules/@hcengineering/core/types/query.d.ts.map +0 -1
  525. package/node_modules/@hcengineering/core/types/server.d.ts +0 -82
  526. package/node_modules/@hcengineering/core/types/server.d.ts.map +0 -1
  527. package/node_modules/@hcengineering/core/types/status.d.ts +0 -30
  528. package/node_modules/@hcengineering/core/types/status.d.ts.map +0 -1
  529. package/node_modules/@hcengineering/core/types/storage.d.ts +0 -233
  530. package/node_modules/@hcengineering/core/types/storage.d.ts.map +0 -1
  531. package/node_modules/@hcengineering/core/types/time.d.ts +0 -8
  532. package/node_modules/@hcengineering/core/types/time.d.ts.map +0 -1
  533. package/node_modules/@hcengineering/core/types/tx.d.ts +0 -261
  534. package/node_modules/@hcengineering/core/types/tx.d.ts.map +0 -1
  535. package/node_modules/@hcengineering/core/types/utils.d.ts +0 -207
  536. package/node_modules/@hcengineering/core/types/utils.d.ts.map +0 -1
  537. package/node_modules/@hcengineering/measurements/types/__tests__/context.test.d.ts +0 -2
  538. package/node_modules/@hcengineering/measurements/types/__tests__/context.test.d.ts.map +0 -1
  539. package/node_modules/@hcengineering/measurements/types/__tests__/index.test.d.ts +0 -2
  540. package/node_modules/@hcengineering/measurements/types/__tests__/index.test.d.ts.map +0 -1
  541. package/node_modules/@hcengineering/measurements/types/__tests__/metrics.test.d.ts +0 -2
  542. package/node_modules/@hcengineering/measurements/types/__tests__/metrics.test.d.ts.map +0 -1
  543. package/node_modules/@hcengineering/measurements/types/__tests__/performance.test.d.ts +0 -2
  544. package/node_modules/@hcengineering/measurements/types/__tests__/performance.test.d.ts.map +0 -1
  545. package/node_modules/@hcengineering/measurements/types/context.d.ts +0 -64
  546. package/node_modules/@hcengineering/measurements/types/context.d.ts.map +0 -1
  547. package/node_modules/@hcengineering/measurements/types/index.d.ts +0 -12
  548. package/node_modules/@hcengineering/measurements/types/index.d.ts.map +0 -1
  549. package/node_modules/@hcengineering/measurements/types/metrics.d.ts +0 -34
  550. package/node_modules/@hcengineering/measurements/types/metrics.d.ts.map +0 -1
  551. package/node_modules/@hcengineering/measurements/types/types.d.ts +0 -88
  552. package/node_modules/@hcengineering/measurements/types/types.d.ts.map +0 -1
  553. package/node_modules/@hcengineering/platform/types/__tests__/i18n.test.d.ts +0 -2
  554. package/node_modules/@hcengineering/platform/types/__tests__/i18n.test.d.ts.map +0 -1
  555. package/node_modules/@hcengineering/platform/types/__tests__/ident.test.d.ts +0 -2
  556. package/node_modules/@hcengineering/platform/types/__tests__/ident.test.d.ts.map +0 -1
  557. package/node_modules/@hcengineering/platform/types/__tests__/plugin.d.ts +0 -7
  558. package/node_modules/@hcengineering/platform/types/__tests__/plugin.d.ts.map +0 -1
  559. package/node_modules/@hcengineering/platform/types/__tests__/resource.test.d.ts +0 -2
  560. package/node_modules/@hcengineering/platform/types/__tests__/resource.test.d.ts.map +0 -1
  561. package/node_modules/@hcengineering/platform/types/event.d.ts +0 -39
  562. package/node_modules/@hcengineering/platform/types/event.d.ts.map +0 -1
  563. package/node_modules/@hcengineering/platform/types/i18n.d.ts +0 -28
  564. package/node_modules/@hcengineering/platform/types/i18n.d.ts.map +0 -1
  565. package/node_modules/@hcengineering/platform/types/ident.d.ts +0 -14
  566. package/node_modules/@hcengineering/platform/types/ident.d.ts.map +0 -1
  567. package/node_modules/@hcengineering/platform/types/index.d.ts +0 -19
  568. package/node_modules/@hcengineering/platform/types/index.d.ts.map +0 -1
  569. package/node_modules/@hcengineering/platform/types/metadata.d.ts +0 -38
  570. package/node_modules/@hcengineering/platform/types/metadata.d.ts.map +0 -1
  571. package/node_modules/@hcengineering/platform/types/platform.d.ts +0 -218
  572. package/node_modules/@hcengineering/platform/types/platform.d.ts.map +0 -1
  573. package/node_modules/@hcengineering/platform/types/resource.d.ts +0 -49
  574. package/node_modules/@hcengineering/platform/types/resource.d.ts.map +0 -1
  575. package/node_modules/@hcengineering/platform/types/status.d.ts +0 -60
  576. package/node_modules/@hcengineering/platform/types/status.d.ts.map +0 -1
  577. package/node_modules/@hcengineering/platform/types/testUtils.d.ts +0 -8
  578. package/node_modules/@hcengineering/platform/types/testUtils.d.ts.map +0 -1
  579. package/node_modules/@hcengineering/rank/types/__tests__/utils.test.d.ts +0 -2
  580. package/node_modules/@hcengineering/rank/types/__tests__/utils.test.d.ts.map +0 -1
  581. package/node_modules/@hcengineering/rank/types/index.d.ts +0 -3
  582. package/node_modules/@hcengineering/rank/types/index.d.ts.map +0 -1
  583. package/node_modules/@hcengineering/rank/types/types.d.ts +0 -2
  584. package/node_modules/@hcengineering/rank/types/types.d.ts.map +0 -1
  585. package/node_modules/@hcengineering/rank/types/utils.d.ts +0 -6
  586. package/node_modules/@hcengineering/rank/types/utils.d.ts.map +0 -1
  587. package/node_modules/@hcengineering/rpc/types/index.d.ts +0 -3
  588. package/node_modules/@hcengineering/rpc/types/index.d.ts.map +0 -1
  589. package/node_modules/@hcengineering/rpc/types/rpc.d.ts +0 -96
  590. package/node_modules/@hcengineering/rpc/types/rpc.d.ts.map +0 -1
  591. package/node_modules/@hcengineering/rpc/types/sliding.d.ts +0 -11
  592. package/node_modules/@hcengineering/rpc/types/sliding.d.ts.map +0 -1
  593. package/node_modules/@hcengineering/rpc/types/test/rateLimit.spec.d.ts +0 -2
  594. package/node_modules/@hcengineering/rpc/types/test/rateLimit.spec.d.ts.map +0 -1
  595. package/node_modules/@hcengineering/tags/types/analytics.d.ts +0 -5
  596. package/node_modules/@hcengineering/tags/types/analytics.d.ts.map +0 -1
  597. package/node_modules/@hcengineering/tags/types/index.d.ts +0 -105
  598. package/node_modules/@hcengineering/tags/types/index.d.ts.map +0 -1
  599. package/node_modules/@hcengineering/task/types/index.d.ts +0 -227
  600. package/node_modules/@hcengineering/task/types/index.d.ts.map +0 -1
  601. package/node_modules/@hcengineering/task/types/utils.d.ts +0 -61
  602. package/node_modules/@hcengineering/task/types/utils.d.ts.map +0 -1
  603. package/node_modules/@hcengineering/text/types/extensions.d.ts +0 -53
  604. package/node_modules/@hcengineering/text/types/extensions.d.ts.map +0 -1
  605. package/node_modules/@hcengineering/text/types/index.d.ts +0 -13
  606. package/node_modules/@hcengineering/text/types/index.d.ts.map +0 -1
  607. package/node_modules/@hcengineering/text/types/kit.d.ts +0 -12
  608. package/node_modules/@hcengineering/text/types/kit.d.ts.map +0 -1
  609. package/node_modules/@hcengineering/text/types/kits/common-kit.d.ts +0 -72
  610. package/node_modules/@hcengineering/text/types/kits/common-kit.d.ts.map +0 -1
  611. package/node_modules/@hcengineering/text/types/kits/server-kit.d.ts +0 -106
  612. package/node_modules/@hcengineering/text/types/kits/server-kit.d.ts.map +0 -1
  613. package/node_modules/@hcengineering/text/types/marks/code.d.ts +0 -8
  614. package/node_modules/@hcengineering/text/types/marks/code.d.ts.map +0 -1
  615. package/node_modules/@hcengineering/text/types/marks/colors.d.ts +0 -21
  616. package/node_modules/@hcengineering/text/types/marks/colors.d.ts.map +0 -1
  617. package/node_modules/@hcengineering/text/types/marks/inlineComment.d.ts +0 -5
  618. package/node_modules/@hcengineering/text/types/marks/inlineComment.d.ts.map +0 -1
  619. package/node_modules/@hcengineering/text/types/marks/noteBase.d.ts +0 -23
  620. package/node_modules/@hcengineering/text/types/marks/noteBase.d.ts.map +0 -1
  621. package/node_modules/@hcengineering/text/types/marks/qmsInlineCommentMark.d.ts +0 -6
  622. package/node_modules/@hcengineering/text/types/marks/qmsInlineCommentMark.d.ts.map +0 -1
  623. package/node_modules/@hcengineering/text/types/markup/__tests__/dsl.test.d.ts +0 -2
  624. package/node_modules/@hcengineering/text/types/markup/__tests__/dsl.test.d.ts.map +0 -1
  625. package/node_modules/@hcengineering/text/types/markup/__tests__/utils.test.d.ts +0 -5
  626. package/node_modules/@hcengineering/text/types/markup/__tests__/utils.test.d.ts.map +0 -1
  627. package/node_modules/@hcengineering/text/types/markup/utils.d.ts +0 -19
  628. package/node_modules/@hcengineering/text/types/markup/utils.d.ts.map +0 -1
  629. package/node_modules/@hcengineering/text/types/nodes/codeblock.d.ts +0 -12
  630. package/node_modules/@hcengineering/text/types/nodes/codeblock.d.ts.map +0 -1
  631. package/node_modules/@hcengineering/text/types/nodes/comment.d.ts +0 -6
  632. package/node_modules/@hcengineering/text/types/nodes/comment.d.ts.map +0 -1
  633. package/node_modules/@hcengineering/text/types/nodes/embed.d.ts +0 -3
  634. package/node_modules/@hcengineering/text/types/nodes/embed.d.ts.map +0 -1
  635. package/node_modules/@hcengineering/text/types/nodes/emoji.d.ts +0 -17
  636. package/node_modules/@hcengineering/text/types/nodes/emoji.d.ts.map +0 -1
  637. package/node_modules/@hcengineering/text/types/nodes/file.d.ts +0 -13
  638. package/node_modules/@hcengineering/text/types/nodes/file.d.ts.map +0 -1
  639. package/node_modules/@hcengineering/text/types/nodes/image.d.ts +0 -52
  640. package/node_modules/@hcengineering/text/types/nodes/image.d.ts.map +0 -1
  641. package/node_modules/@hcengineering/text/types/nodes/index.d.ts +0 -11
  642. package/node_modules/@hcengineering/text/types/nodes/index.d.ts.map +0 -1
  643. package/node_modules/@hcengineering/text/types/nodes/markdown.d.ts +0 -3
  644. package/node_modules/@hcengineering/text/types/nodes/markdown.d.ts.map +0 -1
  645. package/node_modules/@hcengineering/text/types/nodes/mermaid.d.ts +0 -4
  646. package/node_modules/@hcengineering/text/types/nodes/mermaid.d.ts.map +0 -1
  647. package/node_modules/@hcengineering/text/types/nodes/reference.d.ts +0 -18
  648. package/node_modules/@hcengineering/text/types/nodes/reference.d.ts.map +0 -1
  649. package/node_modules/@hcengineering/text/types/nodes/todo.d.ts +0 -3
  650. package/node_modules/@hcengineering/text/types/nodes/todo.d.ts.map +0 -1
  651. package/node_modules/@hcengineering/text/types/nodes/utils.d.ts +0 -6
  652. package/node_modules/@hcengineering/text/types/nodes/utils.d.ts.map +0 -1
  653. package/node_modules/@hcengineering/text/types/tiptapExtensions.d.ts +0 -28
  654. package/node_modules/@hcengineering/text/types/tiptapExtensions.d.ts.map +0 -1
  655. package/node_modules/@hcengineering/text-core/types/index.d.ts +0 -6
  656. package/node_modules/@hcengineering/text-core/types/index.d.ts.map +0 -1
  657. package/node_modules/@hcengineering/text-core/types/markup/__tests__/traverse.test.d.ts +0 -2
  658. package/node_modules/@hcengineering/text-core/types/markup/__tests__/traverse.test.d.ts.map +0 -1
  659. package/node_modules/@hcengineering/text-core/types/markup/__tests__/utils.test.d.ts +0 -2
  660. package/node_modules/@hcengineering/text-core/types/markup/__tests__/utils.test.d.ts.map +0 -1
  661. package/node_modules/@hcengineering/text-core/types/markup/dsl.d.ts +0 -25
  662. package/node_modules/@hcengineering/text-core/types/markup/dsl.d.ts.map +0 -1
  663. package/node_modules/@hcengineering/text-core/types/markup/model.d.ts +0 -74
  664. package/node_modules/@hcengineering/text-core/types/markup/model.d.ts.map +0 -1
  665. package/node_modules/@hcengineering/text-core/types/markup/reference.d.ts +0 -15
  666. package/node_modules/@hcengineering/text-core/types/markup/reference.d.ts.map +0 -1
  667. package/node_modules/@hcengineering/text-core/types/markup/traverse.d.ts +0 -6
  668. package/node_modules/@hcengineering/text-core/types/markup/traverse.d.ts.map +0 -1
  669. package/node_modules/@hcengineering/text-core/types/markup/utils.d.ts +0 -25
  670. package/node_modules/@hcengineering/text-core/types/markup/utils.d.ts.map +0 -1
  671. package/node_modules/@hcengineering/text-html/types/__tests__/html.test.d.ts +0 -2
  672. package/node_modules/@hcengineering/text-html/types/__tests__/html.test.d.ts.map +0 -1
  673. package/node_modules/@hcengineering/text-html/types/index.d.ts +0 -6
  674. package/node_modules/@hcengineering/text-html/types/index.d.ts.map +0 -1
  675. package/node_modules/@hcengineering/text-html/types/parser.d.ts +0 -10
  676. package/node_modules/@hcengineering/text-html/types/parser.d.ts.map +0 -1
  677. package/node_modules/@hcengineering/text-html/types/serializer.d.ts +0 -9
  678. package/node_modules/@hcengineering/text-html/types/serializer.d.ts.map +0 -1
  679. package/node_modules/@hcengineering/text-markdown/types/__tests__/markdown.test.d.ts +0 -9
  680. package/node_modules/@hcengineering/text-markdown/types/__tests__/markdown.test.d.ts.map +0 -1
  681. package/node_modules/@hcengineering/text-markdown/types/compare.d.ts +0 -10
  682. package/node_modules/@hcengineering/text-markdown/types/compare.d.ts.map +0 -1
  683. package/node_modules/@hcengineering/text-markdown/types/index.d.ts +0 -14
  684. package/node_modules/@hcengineering/text-markdown/types/index.d.ts.map +0 -1
  685. package/node_modules/@hcengineering/text-markdown/types/marks.d.ts +0 -8
  686. package/node_modules/@hcengineering/text-markdown/types/marks.d.ts.map +0 -1
  687. package/node_modules/@hcengineering/text-markdown/types/node.d.ts +0 -4
  688. package/node_modules/@hcengineering/text-markdown/types/node.d.ts.map +0 -1
  689. package/node_modules/@hcengineering/text-markdown/types/parser.d.ts +0 -50
  690. package/node_modules/@hcengineering/text-markdown/types/parser.d.ts.map +0 -1
  691. package/node_modules/@hcengineering/text-markdown/types/serializer.d.ts +0 -102
  692. package/node_modules/@hcengineering/text-markdown/types/serializer.d.ts.map +0 -1
  693. package/node_modules/@hcengineering/tracker/types/analytics.d.ts +0 -24
  694. package/node_modules/@hcengineering/tracker/types/analytics.d.ts.map +0 -1
  695. package/node_modules/@hcengineering/tracker/types/index.d.ts +0 -431
  696. package/node_modules/@hcengineering/tracker/types/index.d.ts.map +0 -1
@@ -205,6 +205,9 @@ function isWhiteSpace(code) {
205
205
  function isPunctChar(ch) {
206
206
  return ucmicro__namespace.P.test(ch) || ucmicro__namespace.S.test(ch);
207
207
  }
208
+ function isPunctCharCode(code) {
209
+ return isPunctChar(fromCodePoint(code));
210
+ }
208
211
 
209
212
  // Markdown ASCII punctuation characters.
210
213
  //
@@ -267,6 +270,7 @@ function normalizeReference(str) {
267
270
  // (remove this when node v10 is no longer supported).
268
271
  //
269
272
  if ('ẞ'.toLowerCase() === 'Ṿ') {
273
+ /* c8 ignore next 2 */
270
274
  str = str.replace(/ẞ/g, 'ß');
271
275
  }
272
276
 
@@ -304,6 +308,27 @@ function normalizeReference(str) {
304
308
  //
305
309
  return str.toLowerCase().toUpperCase();
306
310
  }
311
+ function isAsciiTrimmable(c) {
312
+ return c === 0x20 || c === 0x09 || c === 0x0a || c === 0x0d;
313
+ }
314
+
315
+ // "Light" .trim() for blocks (headers, paragraphs), where unicode spaces
316
+ // should be preserved.
317
+ function asciiTrim(str) {
318
+ let start = 0;
319
+ for (; start < str.length; start++) {
320
+ if (!isAsciiTrimmable(str.charCodeAt(start))) {
321
+ break;
322
+ }
323
+ }
324
+ let end = str.length - 1;
325
+ for (; end >= start; end--) {
326
+ if (!isAsciiTrimmable(str.charCodeAt(end))) {
327
+ break;
328
+ }
329
+ }
330
+ return str.slice(start, end + 1);
331
+ }
307
332
 
308
333
  // Re-export libraries commonly used in both markdown-it and its plugins,
309
334
  // so plugins won't have to depend on them explicitly, which reduces their
@@ -317,6 +342,7 @@ const lib = {
317
342
  var utils = /*#__PURE__*/Object.freeze({
318
343
  __proto__: null,
319
344
  arrayReplaceAt: arrayReplaceAt,
345
+ asciiTrim: asciiTrim,
320
346
  assign: assign,
321
347
  escapeHtml: escapeHtml,
322
348
  escapeRE: escapeRE,
@@ -324,6 +350,7 @@ var utils = /*#__PURE__*/Object.freeze({
324
350
  has: has,
325
351
  isMdAsciiPunct: isMdAsciiPunct,
326
352
  isPunctChar: isPunctChar,
353
+ isPunctCharCode: isPunctCharCode,
327
354
  isSpace: isSpace,
328
355
  isString: isString,
329
356
  isValidEntityCode: isValidEntityCode,
@@ -1617,12 +1644,31 @@ const QUOTE_TEST_RE = /['"]/;
1617
1644
  const QUOTE_RE = /['"]/g;
1618
1645
  const APOSTROPHE = '\u2019'; /* ’ */
1619
1646
 
1620
- function replaceAt(str, index, ch) {
1621
- return str.slice(0, index) + ch + str.slice(index + 1);
1647
+ function addReplacement(replacements, tokenIdx, pos, ch) {
1648
+ if (!replacements[tokenIdx]) {
1649
+ replacements[tokenIdx] = [];
1650
+ }
1651
+ replacements[tokenIdx].push({
1652
+ pos,
1653
+ ch
1654
+ });
1655
+ }
1656
+ function applyReplacements(str, replacements) {
1657
+ let result = '';
1658
+ let lastPos = 0;
1659
+ replacements.sort((a, b) => a.pos - b.pos);
1660
+ for (let i = 0; i < replacements.length; i++) {
1661
+ const replacement = replacements[i];
1662
+ result += str.slice(lastPos, replacement.pos) + replacement.ch;
1663
+ lastPos = replacement.pos + 1;
1664
+ }
1665
+ return result + str.slice(lastPos);
1622
1666
  }
1623
1667
  function process_inlines(tokens, state) {
1624
1668
  let j;
1625
1669
  const stack = [];
1670
+ // token index -> list of replacements in the original token content
1671
+ const replacements = {};
1626
1672
  for (let i = 0; i < tokens.length; i++) {
1627
1673
  const token = tokens[i];
1628
1674
  const thisLevel = tokens[i].level;
@@ -1635,9 +1681,9 @@ function process_inlines(tokens, state) {
1635
1681
  if (token.type !== 'text') {
1636
1682
  continue;
1637
1683
  }
1638
- let text = token.content;
1684
+ const text = token.content;
1639
1685
  let pos = 0;
1640
- let max = text.length;
1686
+ const max = text.length;
1641
1687
 
1642
1688
  /* eslint no-labels:0,block-scoped-var:0 */
1643
1689
  OUTER: while (pos < max) {
@@ -1682,8 +1728,8 @@ function process_inlines(tokens, state) {
1682
1728
  break;
1683
1729
  }
1684
1730
  }
1685
- const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
1686
- const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
1731
+ const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctCharCode(lastChar);
1732
+ const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctCharCode(nextChar);
1687
1733
  const isLastWhiteSpace = isWhiteSpace(lastChar);
1688
1734
  const isNextWhiteSpace = isWhiteSpace(nextChar);
1689
1735
  if (isNextWhiteSpace) {
@@ -1720,7 +1766,7 @@ function process_inlines(tokens, state) {
1720
1766
  if (!canOpen && !canClose) {
1721
1767
  // middle of word
1722
1768
  if (isSingle) {
1723
- token.content = replaceAt(token.content, t.index, APOSTROPHE);
1769
+ addReplacement(replacements, i, t.index, APOSTROPHE);
1724
1770
  }
1725
1771
  continue;
1726
1772
  }
@@ -1742,18 +1788,8 @@ function process_inlines(tokens, state) {
1742
1788
  openQuote = state.md.options.quotes[0];
1743
1789
  closeQuote = state.md.options.quotes[1];
1744
1790
  }
1745
-
1746
- // replace token.content *before* tokens[item.token].content,
1747
- // because, if they are pointing at the same token, replaceAt
1748
- // could mess up indices when quote length != 1
1749
- token.content = replaceAt(token.content, t.index, closeQuote);
1750
- tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, openQuote);
1751
- pos += closeQuote.length - 1;
1752
- if (item.token === i) {
1753
- pos += openQuote.length - 1;
1754
- }
1755
- text = token.content;
1756
- max = text.length;
1791
+ addReplacement(replacements, i, t.index, closeQuote);
1792
+ addReplacement(replacements, item.token, item.pos, openQuote);
1757
1793
  stack.length = j;
1758
1794
  continue OUTER;
1759
1795
  }
@@ -1767,10 +1803,13 @@ function process_inlines(tokens, state) {
1767
1803
  level: thisLevel
1768
1804
  });
1769
1805
  } else if (canClose && isSingle) {
1770
- token.content = replaceAt(token.content, t.index, APOSTROPHE);
1806
+ addReplacement(replacements, i, t.index, APOSTROPHE);
1771
1807
  }
1772
1808
  }
1773
1809
  }
1810
+ Object.keys(replacements).forEach(function (tokenIdx) {
1811
+ tokens[tokenIdx].content = applyReplacements(tokens[tokenIdx].content, replacements[tokenIdx]);
1812
+ });
1774
1813
  }
1775
1814
  function smartquotes(state) {
1776
1815
  /* eslint max-depth:0 */
@@ -3230,12 +3269,23 @@ function html_block(state, startLine, endLine, silent) {
3230
3269
  }
3231
3270
  let nextLine = startLine + 1;
3232
3271
 
3272
+ // Block types 6 and 7 (the only ones whose end condition is a blank line)
3273
+ // have `/^$/` as their closing regexp. For all other types (1-5, e.g.
3274
+ // `<!--` comments), a blank line is regular content and must not terminate
3275
+ // the block - it ends only when its closing sequence is found.
3276
+ const endsOnBlankLine = HTML_SEQUENCES[i][1].test('');
3277
+
3233
3278
  // If we are here - we detected HTML block.
3234
3279
  // Let's roll down till block end.
3235
3280
  if (!HTML_SEQUENCES[i][1].test(lineText)) {
3236
3281
  for (; nextLine < endLine; nextLine++) {
3237
3282
  if (state.sCount[nextLine] < state.blkIndent) {
3238
- break;
3283
+ // An outdented blank line shouldn't end a block that doesn't end on a
3284
+ // blank line (e.g. a `<!--` comment inside a list item). Such blocks
3285
+ // must continue until their closing sequence regardless of indent.
3286
+ if (endsOnBlankLine || !state.isEmpty(nextLine)) {
3287
+ break;
3288
+ }
3239
3289
  }
3240
3290
  pos = state.bMarks[nextLine] + state.tShift[nextLine];
3241
3291
  max = state.eMarks[nextLine];
@@ -3296,7 +3346,7 @@ function heading(state, startLine, endLine, silent) {
3296
3346
  token_o.markup = '########'.slice(0, level);
3297
3347
  token_o.map = [startLine, state.line];
3298
3348
  const token_i = state.push('inline', '', 0);
3299
- token_i.content = state.src.slice(pos, max).trim();
3349
+ token_i.content = asciiTrim(state.src.slice(pos, max));
3300
3350
  token_i.map = [startLine, state.line];
3301
3351
  token_i.children = [];
3302
3352
  const token_c = state.push('heading_close', 'h' + String(level), -1);
@@ -3365,9 +3415,10 @@ function lheading(state, startLine, endLine /*, silent */) {
3365
3415
  }
3366
3416
  if (!level) {
3367
3417
  // Didn't find valid underline
3418
+ state.parentType = oldParentType;
3368
3419
  return false;
3369
3420
  }
3370
- const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
3421
+ const content = asciiTrim(state.getLines(startLine, nextLine, state.blkIndent, false));
3371
3422
  state.line = nextLine + 1;
3372
3423
  const token_o = state.push('heading_open', 'h' + String(level), 1);
3373
3424
  token_o.markup = String.fromCharCode(marker);
@@ -3415,7 +3466,7 @@ function paragraph(state, startLine, endLine) {
3415
3466
  break;
3416
3467
  }
3417
3468
  }
3418
- const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
3469
+ const content = asciiTrim(state.getLines(startLine, nextLine, state.blkIndent, false));
3419
3470
  state.line = nextLine;
3420
3471
  const token_o = state.push('paragraph_open', 'p', 1);
3421
3472
  token_o.map = [startLine, state.line];
@@ -3619,8 +3670,30 @@ StateInline.prototype.scanDelims = function (start, canSplitWord) {
3619
3670
  const max = this.posMax;
3620
3671
  const marker = this.src.charCodeAt(start);
3621
3672
 
3622
- // treat beginning of the line as a whitespace
3623
- const lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20;
3673
+ // Astral characters below are combined manually, because .codePointAt()
3674
+ // does not guarantee numeric type output. And we don't wish JIT cache issues.
3675
+ // The broken surrogate pairs are evaluated as U+FFFD to prevent possible
3676
+ // crashes.
3677
+
3678
+ let lastChar;
3679
+ if (start === 0) {
3680
+ // treat beginning of the line as a whitespace
3681
+ lastChar = 0x20;
3682
+ } else if (start === 1) {
3683
+ lastChar = this.src.charCodeAt(0);
3684
+ if ((lastChar & 0xF800) === 0xD800) {
3685
+ lastChar = 0xFFFD;
3686
+ }
3687
+ } else {
3688
+ lastChar = this.src.charCodeAt(start - 1);
3689
+ if ((lastChar & 0xFC00) === 0xDC00) {
3690
+ // low surrogate => add high one, replace broken pair with U+FFFD
3691
+ const highSurr = this.src.charCodeAt(start - 2);
3692
+ lastChar = (highSurr & 0xFC00) === 0xD800 ? 0x10000 + (highSurr - 0xD800 << 10) + (lastChar - 0xDC00) : 0xFFFD;
3693
+ } else if ((lastChar & 0xFC00) === 0xD800) {
3694
+ lastChar = 0xFFFD;
3695
+ }
3696
+ }
3624
3697
  let pos = start;
3625
3698
  while (pos < max && this.src.charCodeAt(pos) === marker) {
3626
3699
  pos++;
@@ -3628,9 +3701,16 @@ StateInline.prototype.scanDelims = function (start, canSplitWord) {
3628
3701
  const count = pos - start;
3629
3702
 
3630
3703
  // treat end of the line as a whitespace
3631
- const nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;
3632
- const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
3633
- const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
3704
+ let nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;
3705
+ if ((nextChar & 0xFC00) === 0xD800) {
3706
+ // high surrogate => add low one, replace broken pair with U+FFFD
3707
+ const lowSurr = this.src.charCodeAt(pos + 1);
3708
+ nextChar = (lowSurr & 0xFC00) === 0xDC00 ? 0x10000 + (nextChar - 0xD800 << 10) + (lowSurr - 0xDC00) : 0xFFFD;
3709
+ } else if ((nextChar & 0xFC00) === 0xDC00) {
3710
+ nextChar = 0xFFFD;
3711
+ }
3712
+ const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctCharCode(lastChar);
3713
+ const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctCharCode(nextChar);
3634
3714
  const isLastWhiteSpace = isWhiteSpace(lastChar);
3635
3715
  const isNextWhiteSpace = isWhiteSpace(nextChar);
3636
3716
  const left_flanking = !isNextWhiteSpace && (!isNextPunctChar || isLastWhiteSpace || isLastPunctChar);
@@ -4563,7 +4643,7 @@ function entity(state, silent) {
4563
4643
  } else {
4564
4644
  const match = state.src.slice(pos).match(NAMED_RE);
4565
4645
  if (match) {
4566
- const decoded = entities.decodeHTML(match[0]);
4646
+ const decoded = entities.decodeHTMLStrict(match[0]);
4567
4647
  if (decoded !== match[0]) {
4568
4648
  if (!silent) {
4569
4649
  const token = state.push('text_special', '', 0);
@@ -5342,7 +5422,7 @@ function MarkdownIt(presetName, options) {
5342
5422
  * ```javascript
5343
5423
  * var md = require('markdown-it')()
5344
5424
  * .set({ html: true, breaks: true })
5345
- * .set({ typographer, true });
5425
+ * .set({ typographer: true });
5346
5426
  * ```
5347
5427
  *
5348
5428
  * __Note:__ To achieve the best possible performance, don't modify a
@@ -1,4 +1,4 @@
1
- /*! markdown-it 14.1.1 https://github.com/markdown-it/markdown-it @license MIT */
1
+ /*! markdown-it 14.2.0 https://github.com/markdown-it/markdown-it @license MIT */
2
2
  (function(global, factory) {
3
3
  typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self,
4
4
  global.markdownit = factory());
@@ -949,6 +949,14 @@
949
949
  */ function decodeHTML(str, mode = DecodingMode.Legacy) {
950
950
  return htmlDecoder(str, mode);
951
951
  }
952
+ /**
953
+ * Decodes an HTML string, requiring all entities to be terminated by a semicolon.
954
+ *
955
+ * @param str The string to decode.
956
+ * @returns The decoded string.
957
+ */ function decodeHTMLStrict(str) {
958
+ return htmlDecoder(str, DecodingMode.Strict);
959
+ }
952
960
  // Utilities
953
961
 
954
962
  function _class$1(obj) {
@@ -1124,6 +1132,9 @@
1124
1132
  function isPunctChar(ch) {
1125
1133
  return P.test(ch) || regex.test(ch);
1126
1134
  }
1135
+ function isPunctCharCode(code) {
1136
+ return isPunctChar(fromCodePoint(code));
1137
+ }
1127
1138
  // Markdown ASCII punctuation characters.
1128
1139
 
1129
1140
  // !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
@@ -1183,6 +1194,7 @@
1183
1194
  // (remove this when node v10 is no longer supported).
1184
1195
 
1185
1196
  if ("\u1e9e".toLowerCase() === "\u1e7e") {
1197
+ /* c8 ignore next 2 */
1186
1198
  str = str.replace(/\u1e9e/g, "\xdf");
1187
1199
  }
1188
1200
  // .toLowerCase().toUpperCase() should get rid of all differences
@@ -1219,6 +1231,26 @@
1219
1231
 
1220
1232
  return str.toLowerCase().toUpperCase();
1221
1233
  }
1234
+ function isAsciiTrimmable(c) {
1235
+ return c === 32 || c === 9 || c === 10 || c === 13;
1236
+ }
1237
+ // "Light" .trim() for blocks (headers, paragraphs), where unicode spaces
1238
+ // should be preserved.
1239
+ function asciiTrim(str) {
1240
+ let start = 0;
1241
+ for (;start < str.length; start++) {
1242
+ if (!isAsciiTrimmable(str.charCodeAt(start))) {
1243
+ break;
1244
+ }
1245
+ }
1246
+ let end = str.length - 1;
1247
+ for (;end >= start; end--) {
1248
+ if (!isAsciiTrimmable(str.charCodeAt(end))) {
1249
+ break;
1250
+ }
1251
+ }
1252
+ return str.slice(start, end + 1);
1253
+ }
1222
1254
  // Re-export libraries commonly used in both markdown-it and its plugins,
1223
1255
  // so plugins won't have to depend on them explicitly, which reduces their
1224
1256
  // bundled size (e.g. a browser build).
@@ -1230,6 +1262,7 @@
1230
1262
  var utils = Object.freeze({
1231
1263
  __proto__: null,
1232
1264
  arrayReplaceAt: arrayReplaceAt,
1265
+ asciiTrim: asciiTrim,
1233
1266
  assign: assign$1,
1234
1267
  escapeHtml: escapeHtml,
1235
1268
  escapeRE: escapeRE$1,
@@ -1237,6 +1270,7 @@
1237
1270
  has: has,
1238
1271
  isMdAsciiPunct: isMdAsciiPunct,
1239
1272
  isPunctChar: isPunctChar,
1273
+ isPunctCharCode: isPunctCharCode,
1240
1274
  isSpace: isSpace,
1241
1275
  isString: isString$1,
1242
1276
  isValidEntityCode: isValidEntityCode,
@@ -2391,12 +2425,31 @@
2391
2425
  const QUOTE_TEST_RE = /['"]/;
2392
2426
  const QUOTE_RE = /['"]/g;
2393
2427
  const APOSTROPHE = "\u2019";
2394
- /* ’ */ function replaceAt(str, index, ch) {
2395
- return str.slice(0, index) + ch + str.slice(index + 1);
2428
+ /* ’ */ function addReplacement(replacements, tokenIdx, pos, ch) {
2429
+ if (!replacements[tokenIdx]) {
2430
+ replacements[tokenIdx] = [];
2431
+ }
2432
+ replacements[tokenIdx].push({
2433
+ pos: pos,
2434
+ ch: ch
2435
+ });
2436
+ }
2437
+ function applyReplacements(str, replacements) {
2438
+ let result = "";
2439
+ let lastPos = 0;
2440
+ replacements.sort((a, b) => a.pos - b.pos);
2441
+ for (let i = 0; i < replacements.length; i++) {
2442
+ const replacement = replacements[i];
2443
+ result += str.slice(lastPos, replacement.pos) + replacement.ch;
2444
+ lastPos = replacement.pos + 1;
2445
+ }
2446
+ return result + str.slice(lastPos);
2396
2447
  }
2397
2448
  function process_inlines(tokens, state) {
2398
2449
  let j;
2399
2450
  const stack = [];
2451
+ // token index -> list of replacements in the original token content
2452
+ const replacements = {};
2400
2453
  for (let i = 0; i < tokens.length; i++) {
2401
2454
  const token = tokens[i];
2402
2455
  const thisLevel = tokens[i].level;
@@ -2409,9 +2462,9 @@
2409
2462
  if (token.type !== "text") {
2410
2463
  continue;
2411
2464
  }
2412
- let text = token.content;
2465
+ const text = token.content;
2413
2466
  let pos = 0;
2414
- let max = text.length;
2467
+ const max = text.length;
2415
2468
  /* eslint no-labels:0,block-scoped-var:0 */ OUTER: while (pos < max) {
2416
2469
  QUOTE_RE.lastIndex = pos;
2417
2470
  const t = QUOTE_RE.exec(text);
@@ -2454,8 +2507,8 @@
2454
2507
  break;
2455
2508
  }
2456
2509
  }
2457
- const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
2458
- const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
2510
+ const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctCharCode(lastChar);
2511
+ const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctCharCode(nextChar);
2459
2512
  const isLastWhiteSpace = isWhiteSpace(lastChar);
2460
2513
  const isNextWhiteSpace = isWhiteSpace(nextChar);
2461
2514
  if (isNextWhiteSpace) {
@@ -2490,7 +2543,7 @@
2490
2543
  if (!canOpen && !canClose) {
2491
2544
  // middle of word
2492
2545
  if (isSingle) {
2493
- token.content = replaceAt(token.content, t.index, APOSTROPHE);
2546
+ addReplacement(replacements, i, t.index, APOSTROPHE);
2494
2547
  }
2495
2548
  continue;
2496
2549
  }
@@ -2512,17 +2565,8 @@
2512
2565
  openQuote = state.md.options.quotes[0];
2513
2566
  closeQuote = state.md.options.quotes[1];
2514
2567
  }
2515
- // replace token.content *before* tokens[item.token].content,
2516
- // because, if they are pointing at the same token, replaceAt
2517
- // could mess up indices when quote length != 1
2518
- token.content = replaceAt(token.content, t.index, closeQuote);
2519
- tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, openQuote);
2520
- pos += closeQuote.length - 1;
2521
- if (item.token === i) {
2522
- pos += openQuote.length - 1;
2523
- }
2524
- text = token.content;
2525
- max = text.length;
2568
+ addReplacement(replacements, i, t.index, closeQuote);
2569
+ addReplacement(replacements, item.token, item.pos, openQuote);
2526
2570
  stack.length = j;
2527
2571
  continue OUTER;
2528
2572
  }
@@ -2536,10 +2580,13 @@
2536
2580
  level: thisLevel
2537
2581
  });
2538
2582
  } else if (canClose && isSingle) {
2539
- token.content = replaceAt(token.content, t.index, APOSTROPHE);
2583
+ addReplacement(replacements, i, t.index, APOSTROPHE);
2540
2584
  }
2541
2585
  }
2542
2586
  }
2587
+ Object.keys(replacements).forEach(function(tokenIdx) {
2588
+ tokens[tokenIdx].content = applyReplacements(tokens[tokenIdx].content, replacements[tokenIdx]);
2589
+ });
2543
2590
  }
2544
2591
  function smartquotes(state) {
2545
2592
  /* eslint max-depth:0 */
@@ -3889,12 +3936,22 @@
3889
3936
  return HTML_SEQUENCES[i][2];
3890
3937
  }
3891
3938
  let nextLine = startLine + 1;
3939
+ // Block types 6 and 7 (the only ones whose end condition is a blank line)
3940
+ // have `/^$/` as their closing regexp. For all other types (1-5, e.g.
3941
+ // `<!--` comments), a blank line is regular content and must not terminate
3942
+ // the block - it ends only when its closing sequence is found.
3943
+ const endsOnBlankLine = HTML_SEQUENCES[i][1].test("");
3892
3944
  // If we are here - we detected HTML block.
3893
3945
  // Let's roll down till block end.
3894
3946
  if (!HTML_SEQUENCES[i][1].test(lineText)) {
3895
3947
  for (;nextLine < endLine; nextLine++) {
3896
3948
  if (state.sCount[nextLine] < state.blkIndent) {
3897
- break;
3949
+ // An outdented blank line shouldn't end a block that doesn't end on a
3950
+ // blank line (e.g. a `<!--` comment inside a list item). Such blocks
3951
+ // must continue until their closing sequence regardless of indent.
3952
+ if (endsOnBlankLine || !state.isEmpty(nextLine)) {
3953
+ break;
3954
+ }
3898
3955
  }
3899
3956
  pos = state.bMarks[nextLine] + state.tShift[nextLine];
3900
3957
  max = state.eMarks[nextLine];
@@ -3950,7 +4007,7 @@
3950
4007
  token_o.markup = "########".slice(0, level);
3951
4008
  token_o.map = [ startLine, state.line ];
3952
4009
  const token_i = state.push("inline", "", 0);
3953
- token_i.content = state.src.slice(pos, max).trim();
4010
+ token_i.content = asciiTrim(state.src.slice(pos, max));
3954
4011
  token_i.map = [ startLine, state.line ];
3955
4012
  token_i.children = [];
3956
4013
  const token_c = state.push("heading_close", "h" + String(level), -1);
@@ -4013,9 +4070,10 @@
4013
4070
  }
4014
4071
  if (!level) {
4015
4072
  // Didn't find valid underline
4073
+ state.parentType = oldParentType;
4016
4074
  return false;
4017
4075
  }
4018
- const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
4076
+ const content = asciiTrim(state.getLines(startLine, nextLine, state.blkIndent, false));
4019
4077
  state.line = nextLine + 1;
4020
4078
  const token_o = state.push("heading_open", "h" + String(level), 1);
4021
4079
  token_o.markup = String.fromCharCode(marker);
@@ -4058,7 +4116,7 @@
4058
4116
  break;
4059
4117
  }
4060
4118
  }
4061
- const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
4119
+ const content = asciiTrim(state.getLines(startLine, nextLine, state.blkIndent, false));
4062
4120
  state.line = nextLine;
4063
4121
  const token_o = state.push("paragraph_open", "p", 1);
4064
4122
  token_o.map = [ startLine, state.line ];
@@ -4237,17 +4295,45 @@
4237
4295
  StateInline.prototype.scanDelims = function(start, canSplitWord) {
4238
4296
  const max = this.posMax;
4239
4297
  const marker = this.src.charCodeAt(start);
4240
- // treat beginning of the line as a whitespace
4241
- const lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 32;
4298
+ // Astral characters below are combined manually, because .codePointAt()
4299
+ // does not guarantee numeric type output. And we don't wish JIT cache issues.
4300
+ // The broken surrogate pairs are evaluated as U+FFFD to prevent possible
4301
+ // crashes.
4302
+ let lastChar;
4303
+ if (start === 0) {
4304
+ // treat beginning of the line as a whitespace
4305
+ lastChar = 32;
4306
+ } else if (start === 1) {
4307
+ lastChar = this.src.charCodeAt(0);
4308
+ if ((lastChar & 63488) === 55296) {
4309
+ lastChar = 65533;
4310
+ }
4311
+ } else {
4312
+ lastChar = this.src.charCodeAt(start - 1);
4313
+ if ((lastChar & 64512) === 56320) {
4314
+ // low surrogate => add high one, replace broken pair with U+FFFD
4315
+ const highSurr = this.src.charCodeAt(start - 2);
4316
+ lastChar = (highSurr & 64512) === 55296 ? 65536 + (highSurr - 55296 << 10) + (lastChar - 56320) : 65533;
4317
+ } else if ((lastChar & 64512) === 55296) {
4318
+ lastChar = 65533;
4319
+ }
4320
+ }
4242
4321
  let pos = start;
4243
4322
  while (pos < max && this.src.charCodeAt(pos) === marker) {
4244
4323
  pos++;
4245
4324
  }
4246
4325
  const count = pos - start;
4247
4326
  // treat end of the line as a whitespace
4248
- const nextChar = pos < max ? this.src.charCodeAt(pos) : 32;
4249
- const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
4250
- const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
4327
+ let nextChar = pos < max ? this.src.charCodeAt(pos) : 32;
4328
+ if ((nextChar & 64512) === 55296) {
4329
+ // high surrogate => add low one, replace broken pair with U+FFFD
4330
+ const lowSurr = this.src.charCodeAt(pos + 1);
4331
+ nextChar = (lowSurr & 64512) === 56320 ? 65536 + (nextChar - 55296 << 10) + (lowSurr - 56320) : 65533;
4332
+ } else if ((nextChar & 64512) === 56320) {
4333
+ nextChar = 65533;
4334
+ }
4335
+ const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctCharCode(lastChar);
4336
+ const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctCharCode(nextChar);
4251
4337
  const isLastWhiteSpace = isWhiteSpace(lastChar);
4252
4338
  const isNextWhiteSpace = isWhiteSpace(nextChar);
4253
4339
  const left_flanking = !isNextWhiteSpace && (!isNextPunctChar || isLastWhiteSpace || isLastPunctChar);
@@ -5104,7 +5190,7 @@
5104
5190
  } else {
5105
5191
  const match = state.src.slice(pos).match(NAMED_RE);
5106
5192
  if (match) {
5107
- const decoded = decodeHTML(match[0]);
5193
+ const decoded = decodeHTMLStrict(match[0]);
5108
5194
  if (decoded !== match[0]) {
5109
5195
  if (!silent) {
5110
5196
  const token = state.push("text_special", "", 0);
@@ -6781,7 +6867,7 @@
6781
6867
  * ```javascript
6782
6868
  * var md = require('markdown-it')()
6783
6869
  * .set({ html: true, breaks: true })
6784
- * .set({ typographer, true });
6870
+ * .set({ typographer: true });
6785
6871
  * ```
6786
6872
  *
6787
6873
  * __Note:__ To achieve the best possible performance, don't modify a