@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
@@ -12,7 +12,7 @@ Community discussion, questions, and informal bug reporting is done on the
12
12
  ## Submitting bug reports
13
13
 
14
14
  Report bugs on the
15
- [GitHub issue tracker](http://github.com/prosemirror/prosemirror/issues).
15
+ [issue tracker](https://code.haverbeke.berlin/prosemirror/prosemirror/issues).
16
16
  Before reporting a bug, please read these pointers.
17
17
 
18
18
  - The issue tracker is for *bugs*, not requests for help. Questions
@@ -34,25 +34,28 @@ Before reporting a bug, please read these pointers.
34
34
 
35
35
  ## Contributing code
36
36
 
37
+ Code generated by a language model is not welcome in this project.
38
+ Please don't waste my time with it.
39
+
37
40
  If you want to make a change that involves a significant overhaul of
38
41
  the code or introduces a user-visible new feature, create an
39
- [RFC](https://github.com/ProseMirror/rfcs/) first with your proposal.
42
+ [issue](https://code.haverbeke.berlin/prosemirror/prosemirror/issues/)
43
+ first with your proposal.
40
44
 
41
- - Make sure you have a [GitHub Account](https://github.com/signup/free)
45
+ - Make sure you have a [Codeberg](https://codeberg.org/user/sign_up)
46
+ or [GitHub](https://github.com/signup/free) account.
47
+
48
+ - Use that to create a [code.haverbeke.berlin
49
+ account](https://code.haverbeke.berlin/user/login).
42
50
 
43
- - Fork the relevant repository
44
- ([how to fork a repo](https://help.github.com/articles/fork-a-repo))
51
+ - Fork the relevant repository.
45
52
 
46
53
  - Create a local checkout of the code. You can use the
47
- [main repository](https://github.com/prosemirror/prosemirror) to
54
+ [main repository](https://code.haverbeke.berlin/prosemirror/prosemirror) to
48
55
  easily check out all core modules.
49
56
 
50
57
  - Make your changes, and commit them
51
58
 
52
- - Follow the code style of the rest of the project (see below). Run
53
- `npm run lint` (in the main repository checkout) to make sure that
54
- the linter is happy.
55
-
56
59
  - If your changes are easy to test or likely to regress, add tests in
57
60
  the relevant `test/` directory. Either put them in an existing
58
61
  `test-*.js` file, if they fit there, or add a new file.
@@ -60,13 +63,13 @@ the code or introduces a user-visible new feature, create an
60
63
  - Make sure all tests pass. Run `npm run test` to verify tests pass
61
64
  (you will need Node.js v6+).
62
65
 
63
- - Submit a pull request ([how to create a pull request](https://help.github.com/articles/fork-a-repo)).
64
- Don't put more than one feature/fix in a single pull request.
66
+ - Submit a pull request. Don't put more than one feature/fix in a
67
+ single pull request.
65
68
 
66
69
  By contributing code to ProseMirror you
67
70
 
68
71
  - Agree to license the contributed code under the project's [MIT
69
- license](https://github.com/ProseMirror/prosemirror/blob/master/LICENSE).
72
+ license](https://code.haverbeke.berlin/prosemirror/prosemirror/blob/main/LICENSE).
70
73
 
71
74
  - Confirm that you have the right to contribute and license the code
72
75
  in question. (Either you hold all rights on the code, or the rights
@@ -86,19 +89,16 @@ By contributing code to ProseMirror you
86
89
  - Follow the surrounding code when it comes to spacing, brace
87
90
  placement, etc.
88
91
 
89
- - Brace-less single-statement bodies are encouraged (whenever they
90
- don't impact readability).
92
+ - Brace-less single-statement bodies are encouraged whenever they
93
+ don't impact readability.
91
94
 
92
- - [getdocs](https://github.com/marijnh/getdocs)-style doc comments
95
+ - [getdocs-ts](https://code.haverbeke.berlin/marijn/getdocs-ts)-style doc comments
93
96
  above items that are part of the public API.
94
97
 
95
98
  - When documenting non-public items, you can put the type after a
96
99
  single colon, so that getdocs doesn't pick it up and add it to the
97
100
  API reference.
98
101
 
99
- - The linter (`npm run lint`) complains about unused variables and
100
- functions. Prefix their names with an underscore to muffle it.
101
-
102
102
  - ProseMirror does *not* follow JSHint or JSLint prescribed style.
103
103
  Patches that try to 'fix' code to pass one of these linters will not
104
104
  be accepted.
@@ -1,6 +1,6 @@
1
1
  # prosemirror-model
2
2
 
3
- [ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-model/blob/master/CHANGELOG.md) ]
3
+ [ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://code.haverbeke.berlin/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**CHANGELOG**](https://code.haverbeke.berlin/prosemirror/prosemirror-model/src/branch/main/CHANGELOG.md) ]
4
4
 
5
5
  This is a [core module](https://prosemirror.net/docs/ref/#model) of [ProseMirror](https://prosemirror.net).
6
6
  ProseMirror is a well-behaved rich semantic content editor based on
@@ -17,10 +17,10 @@ number of [examples](https://prosemirror.net/examples/) and the
17
17
  [documentation](https://prosemirror.net/docs/).
18
18
 
19
19
  This code is released under an
20
- [MIT license](https://github.com/prosemirror/prosemirror/tree/master/LICENSE).
20
+ [MIT license](https://code.haverbeke.berlin/prosemirror/prosemirror/src/branch/main/LICENSE).
21
21
  There's a [forum](http://discuss.prosemirror.net) for general
22
22
  discussion and support requests, and the
23
- [Github bug tracker](https://github.com/prosemirror/prosemirror/issues)
23
+ [bug tracker](https://code.haverbeke.berlin/prosemirror/prosemirror/issues)
24
24
  is the place to report issues.
25
25
 
26
26
  We aim to be an inclusive, welcoming community. To make that explicit,
@@ -281,7 +281,7 @@ var Fragment = function () {
281
281
  value: function fromJSON(schema, value) {
282
282
  if (!value) return Fragment.empty;
283
283
  if (!Array.isArray(value)) throw new RangeError("Invalid input for Fragment.fromJSON");
284
- return new Fragment(value.map(schema.nodeFromJSON));
284
+ return Fragment.fromArray(value.map(schema.nodeFromJSON));
285
285
  }
286
286
  }, {
287
287
  key: "fromArray",
@@ -454,7 +454,7 @@ var Slice = function () {
454
454
  }, {
455
455
  key: "insertAt",
456
456
  value: function insertAt(pos, fragment) {
457
- var content = insertInto(this.content, pos + this.openStart, fragment);
457
+ var content = insertInto(this.content, pos + this.openStart, fragment, this.openStart + 1, this.openEnd + 1);
458
458
  return content && new Slice(content, this.openStart, this.openEnd);
459
459
  }
460
460
  }, {
@@ -521,16 +521,16 @@ function removeRange(content, from, to) {
521
521
  if (index != indexTo) throw new RangeError("Removing non-flat range");
522
522
  return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1)));
523
523
  }
524
- function insertInto(content, dist, insert, parent) {
524
+ function insertInto(content, dist, insert, openStart, openEnd, parent) {
525
525
  var _content$findIndex3 = content.findIndex(dist),
526
526
  index = _content$findIndex3.index,
527
527
  offset = _content$findIndex3.offset,
528
528
  child = content.maybeChild(index);
529
529
  if (offset == dist || child.isText) {
530
- if (parent && !parent.canReplace(index, index, insert)) return null;
530
+ if (parent && openStart <= 0 && openEnd <= 0 && !parent.canReplace(index, index, insert)) return null;
531
531
  return content.cut(0, dist).append(insert).append(content.cut(dist));
532
532
  }
533
- var inner = insertInto(child.content, dist - offset - 1, insert, child);
533
+ var inner = insertInto(child.content, dist - offset - 1, insert, index == 0 ? openStart - 1 : 0, index == content.childCount - 1 ? openEnd - 1 : 0, child);
534
534
  return inner && content.replaceChild(index, child.copy(inner));
535
535
  }
536
536
  function _replace($from, $to, slice) {
@@ -2736,6 +2736,7 @@ var DOMSerializer = function () {
2736
2736
  }, {
2737
2737
  key: "serializeNodeInner",
2738
2738
  value: function serializeNodeInner(node, options) {
2739
+ if (node.isText) return doc(options).createTextNode(node.text);
2739
2740
  var _renderSpec2 = _renderSpec(doc(options), this.nodes[node.type.name](node), null, node.attrs),
2740
2741
  dom = _renderSpec2.dom,
2741
2742
  contentDOM = _renderSpec2.contentDOM;
@@ -2771,6 +2772,9 @@ var DOMSerializer = function () {
2771
2772
  value: function renderSpec(doc, structure) {
2772
2773
  var xmlNS = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
2773
2774
  var blockArraysIn = arguments.length > 3 ? arguments[3] : undefined;
2775
+ if (typeof structure == "string") return {
2776
+ dom: doc.createTextNode(structure)
2777
+ };
2774
2778
  return _renderSpec(doc, structure, xmlNS, blockArraysIn);
2775
2779
  }
2776
2780
  }, {
@@ -2832,13 +2836,10 @@ function suspiciousAttributesInner(attrs) {
2832
2836
  return result;
2833
2837
  }
2834
2838
  function _renderSpec(doc, structure, xmlNS, blockArraysIn) {
2835
- if (typeof structure == "string") return {
2836
- dom: doc.createTextNode(structure)
2837
- };
2838
- if (structure.nodeType != null) return {
2839
+ if (structure.nodeType == 1) return {
2839
2840
  dom: structure
2840
2841
  };
2841
- if (structure.dom && structure.dom.nodeType != null) return structure;
2842
+ if (structure.dom && structure.dom.nodeType == 1) return structure;
2842
2843
  var tagName = structure[0],
2843
2844
  suspicious;
2844
2845
  if (typeof tagName != "string") throw new RangeError("Invalid array passed to renderSpec");
@@ -2867,6 +2868,8 @@ function _renderSpec(doc, structure, xmlNS, blockArraysIn) {
2867
2868
  dom: dom,
2868
2869
  contentDOM: dom
2869
2870
  };
2871
+ } else if (typeof child == "string") {
2872
+ dom.appendChild(doc.createTextNode(child));
2870
2873
  } else {
2871
2874
  var _renderSpec3 = _renderSpec(doc, child, xmlNS, blockArraysIn),
2872
2875
  inner = _renderSpec3.dom,
@@ -62,28 +62,26 @@ declare class Mark {
62
62
  static none: readonly Mark[];
63
63
  }
64
64
 
65
- type DOMNode = InstanceType<typeof window.Node>;
66
-
67
65
  /**
68
- A description of a DOM structure. Can be either a string, which is
69
- interpreted as a text node, a DOM node, which is interpreted as
70
- itself, a `{dom, contentDOM}` object, or an array.
66
+ A description of a DOM structure. Can be either a DOM element, a
67
+ `{dom, contentDOM}` object, or an array.
71
68
 
72
69
  An array describes a DOM element. The first value in the array
73
- should be a string—the name of the DOM element, optionally prefixed
74
- by a namespace URL and a space. If the second element is plain
75
- object, it is interpreted as a set of attributes for the element.
76
- Any elements after that (including the 2nd if it's not an attribute
77
- object) are interpreted as children of the DOM elements, and must
78
- either be valid `DOMOutputSpec` values, or the number zero.
70
+ should be a string—the name of the DOM element, optionally
71
+ prefixed by a namespace URL and a space. If the second element is
72
+ plain object, it is interpreted as a set of attributes for the
73
+ element. Any elements after that (including the 2nd if it's not an
74
+ attribute object) are interpreted as children of the DOM elements,
75
+ and must either be valid `DOMOutputSpec` values, strings (for text
76
+ nodes), or the number zero.
79
77
 
80
78
  The number zero (pronounced “hole”) is used to indicate the place
81
79
  where a node's child nodes should be inserted. If it occurs in an
82
80
  output spec, it should be the only child element in its parent
83
81
  node.
84
82
  */
85
- type DOMOutputSpec = string | DOMNode | {
86
- dom: DOMNode;
83
+ type DOMOutputSpec = HTMLElement | {
84
+ dom: HTMLElement;
87
85
  contentDOM?: HTMLElement;
88
86
  } | readonly [string, ...any[]];
89
87
  /**
@@ -133,7 +131,7 @@ declare class DOMSerializer {
133
131
  */
134
132
  serializeFragment(fragment: Fragment, options?: {
135
133
  document?: Document;
136
- }, target?: HTMLElement | DocumentFragment): HTMLElement | DocumentFragment;
134
+ }, target?: HTMLElement | DocumentFragment): DocumentFragment | HTMLElement;
137
135
  /**
138
136
  Serialize this node to a DOM node. This can be useful when you
139
137
  need to serialize a part of a document, as opposed to the whole
@@ -143,14 +141,14 @@ declare class DOMSerializer {
143
141
  */
144
142
  serializeNode(node: Node, options?: {
145
143
  document?: Document;
146
- }): globalThis.Node;
144
+ }): HTMLElement | Text;
147
145
  /**
148
146
  Render an [output spec](https://prosemirror.net/docs/ref/#model.DOMOutputSpec) to a DOM node. If
149
147
  the spec has a hole (zero) in it, `contentDOM` will point at the
150
148
  node with the hole.
151
149
  */
152
150
  static renderSpec(doc: Document, structure: DOMOutputSpec, xmlNS?: string | null): {
153
- dom: DOMNode;
151
+ dom: HTMLElement;
154
152
  contentDOM?: HTMLElement;
155
153
  };
156
154
  /**
@@ -453,6 +451,8 @@ declare class Slice {
453
451
  static empty: Slice;
454
452
  }
455
453
 
454
+ type DOMNode = InstanceType<typeof window.Node>;
455
+
456
456
  /**
457
457
  These are the options recognized by the
458
458
  [`parse`](https://prosemirror.net/docs/ref/#model.DOMParser.parse) and
@@ -544,7 +544,10 @@ interface GenericParseRule {
544
544
  */
545
545
  mark?: string;
546
546
  /**
547
- When true, ignore content that matches this rule.
547
+ When true, ignore content that matches this rule. Any `<head>`,
548
+ `<noscript>`, `<script>`, `<object>`, `<style>`, or `<title>`
549
+ tags encountered are automatically ignored when no rules match
550
+ them..
548
551
  */
549
552
  ignore?: boolean;
550
553
  /**
@@ -1145,7 +1148,7 @@ declare class Schema<Nodes extends string = any, Marks extends string = any> {
1145
1148
  The [spec](https://prosemirror.net/docs/ref/#model.SchemaSpec) on which the schema is based,
1146
1149
  with the added guarantee that its `nodes` and `marks`
1147
1150
  properties are
1148
- [`OrderedMap`](https://github.com/marijnh/orderedmap) instances
1151
+ [`OrderedMap`](https://code.haverbeke.berlin/marijn/orderedmap) instances
1149
1152
  (not raw objects).
1150
1153
  */
1151
1154
  spec: {
@@ -1482,10 +1485,11 @@ declare class Node {
1482
1485
  */
1483
1486
  forEach(f: (node: Node, offset: number, index: number) => void): void;
1484
1487
  /**
1485
- Invoke a callback for all descendant nodes recursively between
1488
+ Invoke a callback for all descendant nodes recursively overlapping
1486
1489
  the given two positions that are relative to start of this
1487
- node's content. The callback is invoked with the node, its
1488
- position relative to the original node (method receiver),
1490
+ node's content. This includes all ancestors of the nodes
1491
+ containing the two positions. The callback is invoked with the
1492
+ node, its position relative to the original node (method receiver),
1489
1493
  its parent node, and its child index. When the callback returns
1490
1494
  false for a given node, that node's children will not be
1491
1495
  recursed over. The last parameter can be used to specify a
@@ -62,28 +62,26 @@ declare class Mark {
62
62
  static none: readonly Mark[];
63
63
  }
64
64
 
65
- type DOMNode = InstanceType<typeof window.Node>;
66
-
67
65
  /**
68
- A description of a DOM structure. Can be either a string, which is
69
- interpreted as a text node, a DOM node, which is interpreted as
70
- itself, a `{dom, contentDOM}` object, or an array.
66
+ A description of a DOM structure. Can be either a DOM element, a
67
+ `{dom, contentDOM}` object, or an array.
71
68
 
72
69
  An array describes a DOM element. The first value in the array
73
- should be a string—the name of the DOM element, optionally prefixed
74
- by a namespace URL and a space. If the second element is plain
75
- object, it is interpreted as a set of attributes for the element.
76
- Any elements after that (including the 2nd if it's not an attribute
77
- object) are interpreted as children of the DOM elements, and must
78
- either be valid `DOMOutputSpec` values, or the number zero.
70
+ should be a string—the name of the DOM element, optionally
71
+ prefixed by a namespace URL and a space. If the second element is
72
+ plain object, it is interpreted as a set of attributes for the
73
+ element. Any elements after that (including the 2nd if it's not an
74
+ attribute object) are interpreted as children of the DOM elements,
75
+ and must either be valid `DOMOutputSpec` values, strings (for text
76
+ nodes), or the number zero.
79
77
 
80
78
  The number zero (pronounced “hole”) is used to indicate the place
81
79
  where a node's child nodes should be inserted. If it occurs in an
82
80
  output spec, it should be the only child element in its parent
83
81
  node.
84
82
  */
85
- type DOMOutputSpec = string | DOMNode | {
86
- dom: DOMNode;
83
+ type DOMOutputSpec = HTMLElement | {
84
+ dom: HTMLElement;
87
85
  contentDOM?: HTMLElement;
88
86
  } | readonly [string, ...any[]];
89
87
  /**
@@ -133,7 +131,7 @@ declare class DOMSerializer {
133
131
  */
134
132
  serializeFragment(fragment: Fragment, options?: {
135
133
  document?: Document;
136
- }, target?: HTMLElement | DocumentFragment): HTMLElement | DocumentFragment;
134
+ }, target?: HTMLElement | DocumentFragment): DocumentFragment | HTMLElement;
137
135
  /**
138
136
  Serialize this node to a DOM node. This can be useful when you
139
137
  need to serialize a part of a document, as opposed to the whole
@@ -143,14 +141,14 @@ declare class DOMSerializer {
143
141
  */
144
142
  serializeNode(node: Node, options?: {
145
143
  document?: Document;
146
- }): globalThis.Node;
144
+ }): HTMLElement | Text;
147
145
  /**
148
146
  Render an [output spec](https://prosemirror.net/docs/ref/#model.DOMOutputSpec) to a DOM node. If
149
147
  the spec has a hole (zero) in it, `contentDOM` will point at the
150
148
  node with the hole.
151
149
  */
152
150
  static renderSpec(doc: Document, structure: DOMOutputSpec, xmlNS?: string | null): {
153
- dom: DOMNode;
151
+ dom: HTMLElement;
154
152
  contentDOM?: HTMLElement;
155
153
  };
156
154
  /**
@@ -453,6 +451,8 @@ declare class Slice {
453
451
  static empty: Slice;
454
452
  }
455
453
 
454
+ type DOMNode = InstanceType<typeof window.Node>;
455
+
456
456
  /**
457
457
  These are the options recognized by the
458
458
  [`parse`](https://prosemirror.net/docs/ref/#model.DOMParser.parse) and
@@ -544,7 +544,10 @@ interface GenericParseRule {
544
544
  */
545
545
  mark?: string;
546
546
  /**
547
- When true, ignore content that matches this rule.
547
+ When true, ignore content that matches this rule. Any `<head>`,
548
+ `<noscript>`, `<script>`, `<object>`, `<style>`, or `<title>`
549
+ tags encountered are automatically ignored when no rules match
550
+ them..
548
551
  */
549
552
  ignore?: boolean;
550
553
  /**
@@ -1145,7 +1148,7 @@ declare class Schema<Nodes extends string = any, Marks extends string = any> {
1145
1148
  The [spec](https://prosemirror.net/docs/ref/#model.SchemaSpec) on which the schema is based,
1146
1149
  with the added guarantee that its `nodes` and `marks`
1147
1150
  properties are
1148
- [`OrderedMap`](https://github.com/marijnh/orderedmap) instances
1151
+ [`OrderedMap`](https://code.haverbeke.berlin/marijn/orderedmap) instances
1149
1152
  (not raw objects).
1150
1153
  */
1151
1154
  spec: {
@@ -1482,10 +1485,11 @@ declare class Node {
1482
1485
  */
1483
1486
  forEach(f: (node: Node, offset: number, index: number) => void): void;
1484
1487
  /**
1485
- Invoke a callback for all descendant nodes recursively between
1488
+ Invoke a callback for all descendant nodes recursively overlapping
1486
1489
  the given two positions that are relative to start of this
1487
- node's content. The callback is invoked with the node, its
1488
- position relative to the original node (method receiver),
1490
+ node's content. This includes all ancestors of the nodes
1491
+ containing the two positions. The callback is invoked with the
1492
+ node, its position relative to the original node (method receiver),
1489
1493
  its parent node, and its child index. When the callback returns
1490
1494
  false for a given node, that node's children will not be
1491
1495
  recursed over. The last parameter can be used to specify a
@@ -311,7 +311,7 @@ class Fragment {
311
311
  return Fragment.empty;
312
312
  if (!Array.isArray(value))
313
313
  throw new RangeError("Invalid input for Fragment.fromJSON");
314
- return new Fragment(value.map(schema.nodeFromJSON));
314
+ return Fragment.fromArray(value.map(schema.nodeFromJSON));
315
315
  }
316
316
  /**
317
317
  Build a fragment from an array of nodes. Ensures that adjacent
@@ -545,17 +545,6 @@ given an invalid replacement.
545
545
  */
546
546
  class ReplaceError extends Error {
547
547
  }
548
- /*
549
- ReplaceError = function(this: any, message: string) {
550
- let err = Error.call(this, message)
551
- ;(err as any).__proto__ = ReplaceError.prototype
552
- return err
553
- } as any
554
-
555
- ReplaceError.prototype = Object.create(Error.prototype)
556
- ReplaceError.prototype.constructor = ReplaceError
557
- ReplaceError.prototype.name = "ReplaceError"
558
- */
559
548
  /**
560
549
  A slice represents a piece cut out of a larger document. It
561
550
  stores not only a fragment, but also the depth up to which nodes on
@@ -601,7 +590,7 @@ class Slice {
601
590
  @internal
602
591
  */
603
592
  insertAt(pos, fragment) {
604
- let content = insertInto(this.content, pos + this.openStart, fragment);
593
+ let content = insertInto(this.content, pos + this.openStart, fragment, this.openStart + 1, this.openEnd + 1);
605
594
  return content && new Slice(content, this.openStart, this.openEnd);
606
595
  }
607
596
  /**
@@ -675,14 +664,14 @@ function removeRange(content, from, to) {
675
664
  throw new RangeError("Removing non-flat range");
676
665
  return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1)));
677
666
  }
678
- function insertInto(content, dist, insert, parent) {
667
+ function insertInto(content, dist, insert, openStart, openEnd, parent) {
679
668
  let { index, offset } = content.findIndex(dist), child = content.maybeChild(index);
680
669
  if (offset == dist || child.isText) {
681
- if (parent && !parent.canReplace(index, index, insert))
670
+ if (parent && openStart <= 0 && openEnd <= 0 && !parent.canReplace(index, index, insert))
682
671
  return null;
683
672
  return content.cut(0, dist).append(insert).append(content.cut(dist));
684
673
  }
685
- let inner = insertInto(child.content, dist - offset - 1, insert, child);
674
+ let inner = insertInto(child.content, dist - offset - 1, insert, index == 0 ? openStart - 1 : 0, index == content.childCount - 1 ? openEnd - 1 : 0, child);
686
675
  return inner && content.replaceChild(index, child.copy(inner));
687
676
  }
688
677
  function replace($from, $to, slice) {
@@ -1212,10 +1201,11 @@ class Node {
1212
1201
  */
1213
1202
  forEach(f) { this.content.forEach(f); }
1214
1203
  /**
1215
- Invoke a callback for all descendant nodes recursively between
1204
+ Invoke a callback for all descendant nodes recursively overlapping
1216
1205
  the given two positions that are relative to start of this
1217
- node's content. The callback is invoked with the node, its
1218
- position relative to the original node (method receiver),
1206
+ node's content. This includes all ancestors of the nodes
1207
+ containing the two positions. The callback is invoked with the
1208
+ node, its position relative to the original node (method receiver),
1219
1209
  its parent node, and its child index. When the callback returns
1220
1210
  false for a given node, that node's children will not be
1221
1211
  recursed over. The last parameter can be used to specify a
@@ -3303,6 +3293,8 @@ class DOMSerializer {
3303
3293
  @internal
3304
3294
  */
3305
3295
  serializeNodeInner(node, options) {
3296
+ if (node.isText)
3297
+ return doc(options).createTextNode(node.text);
3306
3298
  let { dom, contentDOM } = renderSpec(doc(options), this.nodes[node.type.name](node), null, node.attrs);
3307
3299
  if (contentDOM) {
3308
3300
  if (node.isLeaf)
@@ -3337,6 +3329,9 @@ class DOMSerializer {
3337
3329
  return toDOM && renderSpec(doc(options), toDOM(mark, inline), null, mark.attrs);
3338
3330
  }
3339
3331
  static renderSpec(doc, structure, xmlNS = null, blockArraysIn) {
3332
+ // Kludge for backwards-compatibility with accidental original behavious
3333
+ if (typeof structure == "string")
3334
+ return { dom: doc.createTextNode(structure) };
3340
3335
  return renderSpec(doc, structure, xmlNS, blockArraysIn);
3341
3336
  }
3342
3337
  /**
@@ -3408,11 +3403,9 @@ function suspiciousAttributesInner(attrs) {
3408
3403
  return result;
3409
3404
  }
3410
3405
  function renderSpec(doc, structure, xmlNS, blockArraysIn) {
3411
- if (typeof structure == "string")
3412
- return { dom: doc.createTextNode(structure) };
3413
- if (structure.nodeType != null)
3406
+ if (structure.nodeType == 1)
3414
3407
  return { dom: structure };
3415
- if (structure.dom && structure.dom.nodeType != null)
3408
+ if (structure.dom && structure.dom.nodeType == 1)
3416
3409
  return structure;
3417
3410
  let tagName = structure[0], suspicious;
3418
3411
  if (typeof tagName != "string")
@@ -3448,6 +3441,9 @@ function renderSpec(doc, structure, xmlNS, blockArraysIn) {
3448
3441
  throw new RangeError("Content hole must be the only child of its parent node");
3449
3442
  return { dom, contentDOM: dom };
3450
3443
  }
3444
+ else if (typeof child == "string") {
3445
+ dom.appendChild(doc.createTextNode(child));
3446
+ }
3451
3447
  else {
3452
3448
  let { dom: inner, contentDOM: innerContent } = renderSpec(doc, child, xmlNS, blockArraysIn);
3453
3449
  dom.appendChild(inner);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prosemirror-model",
3
- "version": "1.25.4",
3
+ "version": "1.25.7",
4
4
  "description": "ProseMirror's document model",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "repository": {
23
23
  "type": "git",
24
- "url": "git://github.com/prosemirror/prosemirror-model.git"
24
+ "url": "git+https://code.haverbeke.berlin/prosemirror/prosemirror-model.git"
25
25
  },
26
26
  "dependencies": {
27
27
  "orderedmap": "^2.0.0"
@@ -219,7 +219,7 @@ export class Fragment {
219
219
  static fromJSON(schema: Schema, value: any) {
220
220
  if (!value) return Fragment.empty
221
221
  if (!Array.isArray(value)) throw new RangeError("Invalid input for Fragment.fromJSON")
222
- return new Fragment(value.map(schema.nodeFromJSON))
222
+ return Fragment.fromArray(value.map(schema.nodeFromJSON))
223
223
  }
224
224
 
225
225
  /// Build a fragment from an array of nodes. Ensures that adjacent
@@ -83,7 +83,10 @@ export interface GenericParseRule {
83
83
  /// The name of the mark type to wrap the matched content in.
84
84
  mark?: string
85
85
 
86
- /// When true, ignore content that matches this rule.
86
+ /// When true, ignore content that matches this rule. Any `<head>`,
87
+ /// `<noscript>`, `<script>`, `<object>`, `<style>`, or `<title>`
88
+ /// tags encountered are automatically ignored when no rules match
89
+ /// them..
87
90
  ignore?: boolean
88
91
 
89
92
  /// When true, finding an element that matches this rule will close
@@ -67,13 +67,14 @@ export class Node {
67
67
  /// into this parent node, and its index.
68
68
  forEach(f: (node: Node, offset: number, index: number) => void) { this.content.forEach(f) }
69
69
 
70
- /// Invoke a callback for all descendant nodes recursively between
70
+ /// Invoke a callback for all descendant nodes recursively overlapping
71
71
  /// the given two positions that are relative to start of this
72
- /// node's content. The callback is invoked with the node, its
73
- /// position relative to the original node (method receiver),
72
+ /// node's content. This includes all ancestors of the nodes
73
+ /// containing the two positions. The callback is invoked with the
74
+ /// node, its position relative to the original node (method receiver),
74
75
  /// its parent node, and its child index. When the callback returns
75
76
  /// false for a given node, that node's children will not be
76
- /// recursed over. The last parameter can be used to specify a
77
+ /// recursed over. The last parameter can be used to specify a
77
78
  /// starting position to count from.
78
79
  nodesBetween(from: number, to: number,
79
80
  f: (node: Node, pos: number, parent: Node | null, index: number) => void | boolean,
@@ -6,17 +6,6 @@ import {ResolvedPos} from "./resolvedpos"
6
6
  /// Error type raised by [`Node.replace`](#model.Node.replace) when
7
7
  /// given an invalid replacement.
8
8
  export class ReplaceError extends Error {}
9
- /*
10
- ReplaceError = function(this: any, message: string) {
11
- let err = Error.call(this, message)
12
- ;(err as any).__proto__ = ReplaceError.prototype
13
- return err
14
- } as any
15
-
16
- ReplaceError.prototype = Object.create(Error.prototype)
17
- ReplaceError.prototype.constructor = ReplaceError
18
- ReplaceError.prototype.name = "ReplaceError"
19
- */
20
9
 
21
10
  /// A slice represents a piece cut out of a larger document. It
22
11
  /// stores not only a fragment, but also the depth up to which nodes on
@@ -48,7 +37,7 @@ export class Slice {
48
37
 
49
38
  /// @internal
50
39
  insertAt(pos: number, fragment: Fragment) {
51
- let content = insertInto(this.content, pos + this.openStart, fragment)
40
+ let content = insertInto(this.content, pos + this.openStart, fragment, this.openStart + 1, this.openEnd + 1)
52
41
  return content && new Slice(content, this.openStart, this.openEnd)
53
42
  }
54
43
 
@@ -109,13 +98,15 @@ function removeRange(content: Fragment, from: number, to: number): Fragment {
109
98
  return content.replaceChild(index, child!.copy(removeRange(child!.content, from - offset - 1, to - offset - 1)))
110
99
  }
111
100
 
112
- function insertInto(content: Fragment, dist: number, insert: Fragment, parent?: Node | null): Fragment | null {
101
+ function insertInto(content: Fragment, dist: number, insert: Fragment, openStart: number, openEnd: number,
102
+ parent?: Node | null): Fragment | null {
113
103
  let {index, offset} = content.findIndex(dist), child = content.maybeChild(index)
114
104
  if (offset == dist || child!.isText) {
115
- if (parent && !parent.canReplace(index, index, insert)) return null
105
+ if (parent && openStart <= 0 && openEnd <= 0 && !parent.canReplace(index, index, insert)) return null
116
106
  return content.cut(0, dist).append(insert).append(content.cut(dist))
117
107
  }
118
- let inner = insertInto(child!.content, dist - offset - 1, insert, child)
108
+ let inner = insertInto(child!.content, dist - offset - 1, insert, index == 0 ? openStart - 1 : 0,
109
+ index == content.childCount - 1 ? openEnd - 1 : 0, child)
119
110
  return inner && content.replaceChild(index, child!.copy(inner))
120
111
  }
121
112
 
@@ -573,7 +573,7 @@ export class Schema<Nodes extends string = any, Marks extends string = any> {
573
573
  /// The [spec](#model.SchemaSpec) on which the schema is based,
574
574
  /// with the added guarantee that its `nodes` and `marks`
575
575
  /// properties are
576
- /// [`OrderedMap`](https://github.com/marijnh/orderedmap) instances
576
+ /// [`OrderedMap`](https://code.haverbeke.berlin/marijn/orderedmap) instances
577
577
  /// (not raw objects).
578
578
  spec: {
579
579
  nodes: OrderedMap<NodeSpec>,