@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.
- package/README.md +186 -56
- package/node_modules/@hcengineering/account-client/lib/__tests__/utils.test.js +249 -0
- package/node_modules/@hcengineering/account-client/lib/__tests__/utils.test.js.map +7 -0
- package/node_modules/@hcengineering/account-client/lib/client.js +88 -3
- package/node_modules/@hcengineering/account-client/lib/client.js.map +2 -2
- package/node_modules/@hcengineering/account-client/lib/types.js.map +2 -2
- package/node_modules/@hcengineering/account-client/lib/utils.js +50 -0
- package/node_modules/@hcengineering/account-client/lib/utils.js.map +2 -2
- package/node_modules/@hcengineering/account-client/package.json +22 -19
- package/node_modules/@hcengineering/account-client/src/__tests__/utils.test.ts +304 -0
- package/node_modules/@hcengineering/account-client/src/client.ts +127 -6
- package/node_modules/@hcengineering/account-client/src/types.ts +7 -0
- package/node_modules/@hcengineering/account-client/src/utils.ts +65 -1
- package/node_modules/@hcengineering/analytics/lib/index.js +1 -1
- package/node_modules/@hcengineering/analytics/lib/index.js.map +2 -2
- package/node_modules/@hcengineering/analytics/package.json +19 -16
- package/node_modules/@hcengineering/analytics/src/index.ts +2 -1
- package/node_modules/@hcengineering/api-client/lib/client.js +9 -4
- package/node_modules/@hcengineering/api-client/lib/client.js.map +2 -2
- package/node_modules/@hcengineering/api-client/lib/rest/adapter.js +64 -0
- package/node_modules/@hcengineering/api-client/lib/rest/adapter.js.map +7 -0
- package/node_modules/@hcengineering/api-client/lib/rest/index.js +2 -0
- package/node_modules/@hcengineering/api-client/lib/rest/index.js.map +2 -2
- package/node_modules/@hcengineering/api-client/lib/socket/node.js +5 -1
- package/node_modules/@hcengineering/api-client/lib/socket/node.js.map +2 -2
- package/node_modules/@hcengineering/api-client/package.json +28 -25
- package/node_modules/@hcengineering/api-client/src/client.ts +10 -1
- package/node_modules/@hcengineering/api-client/src/rest/adapter.ts +96 -0
- package/node_modules/@hcengineering/api-client/src/rest/index.ts +1 -0
- package/node_modules/@hcengineering/api-client/src/socket/node.ts +6 -1
- package/node_modules/@hcengineering/chunter/lib/index.js.map +2 -2
- package/node_modules/@hcengineering/chunter/package.json +13 -10
- package/node_modules/@hcengineering/client/package.json +21 -18
- package/node_modules/@hcengineering/client-resources/package.json +24 -21
- package/node_modules/@hcengineering/collaborator-client/package.json +21 -18
- package/node_modules/@hcengineering/contact/lib/__tests__/workspaceMemberStatusUtils.test.js +38 -0
- package/node_modules/@hcengineering/contact/lib/__tests__/workspaceMemberStatusUtils.test.js.map +7 -0
- package/node_modules/@hcengineering/contact/lib/index.js +13 -4
- package/node_modules/@hcengineering/contact/lib/index.js.map +2 -2
- package/node_modules/@hcengineering/contact/lib/types.js.map +1 -1
- package/node_modules/@hcengineering/contact/lib/utils.js +132 -108
- package/node_modules/@hcengineering/contact/lib/utils.js.map +3 -3
- package/node_modules/@hcengineering/contact/lib/workspaceMemberStatusUtils.js +79 -0
- package/node_modules/@hcengineering/contact/lib/workspaceMemberStatusUtils.js.map +7 -0
- package/node_modules/@hcengineering/contact/package.json +12 -9
- package/node_modules/@hcengineering/core/CHANGELOG.md +9 -1
- package/node_modules/@hcengineering/core/lang/cs.json +6 -1
- package/node_modules/@hcengineering/core/lang/de.json +6 -1
- package/node_modules/@hcengineering/core/lang/en.json +6 -1
- package/node_modules/@hcengineering/core/lang/es.json +6 -1
- package/node_modules/@hcengineering/core/lang/fr.json +6 -1
- package/node_modules/@hcengineering/core/lang/it.json +6 -1
- package/node_modules/@hcengineering/core/lang/ja.json +6 -1
- package/node_modules/@hcengineering/core/lang/pt-br.json +70 -0
- package/node_modules/@hcengineering/core/lang/pt.json +6 -1
- package/node_modules/@hcengineering/core/lang/ru.json +6 -1
- package/node_modules/@hcengineering/core/lang/tr.json +6 -1
- package/node_modules/@hcengineering/core/lang/zh.json +6 -1
- package/node_modules/@hcengineering/core/lib/__tests__/autoJoinRoles.test.js +13 -0
- package/node_modules/@hcengineering/core/lib/__tests__/autoJoinRoles.test.js.map +7 -0
- package/node_modules/@hcengineering/core/lib/__tests__/memdb.test.js +133 -0
- package/node_modules/@hcengineering/core/lib/__tests__/memdb.test.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/__tests__/minmodel.js +25 -0
- package/node_modules/@hcengineering/core/lib/__tests__/minmodel.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/__tests__/query.test.js +43 -0
- package/node_modules/@hcengineering/core/lib/__tests__/query.test.js.map +7 -0
- package/node_modules/@hcengineering/core/lib/autoJoinRoles.js +36 -0
- package/node_modules/@hcengineering/core/lib/autoJoinRoles.js.map +7 -0
- package/node_modules/@hcengineering/core/lib/classes.js +5 -0
- package/node_modules/@hcengineering/core/lib/classes.js.map +3 -3
- package/node_modules/@hcengineering/core/lib/clone.js +13 -2
- package/node_modules/@hcengineering/core/lib/clone.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/component.js +14 -3
- package/node_modules/@hcengineering/core/lib/component.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/index.js +2 -0
- package/node_modules/@hcengineering/core/lib/index.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/memdb.js +6 -2
- package/node_modules/@hcengineering/core/lib/memdb.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/operations.js +11 -0
- package/node_modules/@hcengineering/core/lib/operations.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/predicate.js +3 -0
- package/node_modules/@hcengineering/core/lib/predicate.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/storage.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/tx.js +3 -1
- package/node_modules/@hcengineering/core/lib/tx.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/utils.js +1 -1
- package/node_modules/@hcengineering/core/lib/utils.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/versioning.js +17 -0
- package/node_modules/@hcengineering/core/lib/versioning.js.map +7 -0
- package/node_modules/@hcengineering/core/package.json +22 -19
- package/node_modules/@hcengineering/core/src/__tests__/autoJoinRoles.test.ts +27 -0
- package/node_modules/@hcengineering/core/src/__tests__/memdb.test.ts +150 -1
- package/node_modules/@hcengineering/core/src/__tests__/minmodel.ts +29 -1
- package/node_modules/@hcengineering/core/src/__tests__/query.test.ts +66 -0
- package/node_modules/@hcengineering/core/src/autoJoinRoles.ts +33 -0
- package/node_modules/@hcengineering/core/src/classes.ts +61 -1
- package/node_modules/@hcengineering/core/src/clone.ts +13 -2
- package/node_modules/@hcengineering/core/src/component.ts +25 -9
- package/node_modules/@hcengineering/core/src/index.ts +2 -0
- package/node_modules/@hcengineering/core/src/memdb.ts +7 -3
- package/node_modules/@hcengineering/core/src/operations.ts +11 -0
- package/node_modules/@hcengineering/core/src/predicate.ts +3 -0
- package/node_modules/@hcengineering/core/src/storage.ts +6 -3
- package/node_modules/@hcengineering/core/src/tx.ts +4 -1
- package/node_modules/@hcengineering/core/src/utils.ts +1 -1
- package/node_modules/@hcengineering/core/src/versioning.ts +13 -0
- package/node_modules/@hcengineering/measurements/lib/__tests__/performance.test.js +3 -3
- package/node_modules/@hcengineering/measurements/lib/__tests__/performance.test.js.map +2 -2
- package/node_modules/@hcengineering/measurements/package.json +17 -14
- package/node_modules/@hcengineering/measurements/src/__tests__/performance.test.ts +3 -3
- package/node_modules/@hcengineering/platform/lang/pt-br.json +31 -0
- package/node_modules/@hcengineering/platform/lib/__tests__/i18n.test.js +100 -0
- package/node_modules/@hcengineering/platform/lib/__tests__/i18n.test.js.map +2 -2
- package/node_modules/@hcengineering/platform/lib/__tests__/status.test.js +78 -0
- package/node_modules/@hcengineering/platform/lib/__tests__/status.test.js.map +7 -0
- package/node_modules/@hcengineering/platform/lib/i18n.js +78 -69
- package/node_modules/@hcengineering/platform/lib/i18n.js.map +3 -3
- package/node_modules/@hcengineering/platform/lib/status.js +25 -0
- package/node_modules/@hcengineering/platform/lib/status.js.map +2 -2
- package/node_modules/@hcengineering/platform/package.json +18 -15
- package/node_modules/@hcengineering/platform/src/__tests__/i18n.test.ts +114 -2
- package/node_modules/@hcengineering/platform/src/__tests__/status.test.ts +77 -0
- package/node_modules/@hcengineering/platform/src/i18n.ts +99 -71
- package/node_modules/@hcengineering/platform/src/status.ts +30 -0
- package/node_modules/@hcengineering/rank/package.json +19 -16
- package/node_modules/@hcengineering/rpc/package.json +21 -18
- package/node_modules/@hcengineering/tags/package.json +12 -9
- package/node_modules/@hcengineering/task/package.json +14 -11
- package/node_modules/@hcengineering/text/lib/markup/__tests__/utils.test.js +25 -0
- package/node_modules/@hcengineering/text/lib/markup/__tests__/utils.test.js.map +2 -2
- package/node_modules/@hcengineering/text/lib/tiptapExtensions.js +6 -0
- package/node_modules/@hcengineering/text/lib/tiptapExtensions.js.map +2 -2
- package/node_modules/@hcengineering/text/package.json +23 -18
- package/node_modules/@hcengineering/text/src/markup/__tests__/utils.test.ts +27 -0
- package/node_modules/@hcengineering/text/src/tiptapExtensions.ts +3 -0
- package/node_modules/@hcengineering/text-core/lib/markup/model.js +1 -0
- package/node_modules/@hcengineering/text-core/lib/markup/model.js.map +2 -2
- package/node_modules/@hcengineering/text-core/package.json +20 -17
- package/node_modules/@hcengineering/text-core/src/markup/model.ts +2 -1
- package/node_modules/@hcengineering/text-html/package.json +19 -16
- package/node_modules/@hcengineering/text-markdown/lib/serializer.js +14 -0
- package/node_modules/@hcengineering/text-markdown/lib/serializer.js.map +2 -2
- package/node_modules/@hcengineering/text-markdown/package.json +20 -17
- package/node_modules/@hcengineering/text-markdown/src/serializer.ts +14 -0
- package/node_modules/@hcengineering/tracker/lib/index.js +1 -0
- package/node_modules/@hcengineering/tracker/lib/index.js.map +2 -2
- package/node_modules/@hcengineering/tracker/package.json +16 -13
- package/node_modules/@tiptap/core/dist/commands/focus.d.ts.map +1 -1
- package/node_modules/@tiptap/core/dist/index.cjs +19 -2
- package/node_modules/@tiptap/core/dist/index.cjs.map +1 -1
- package/node_modules/@tiptap/core/dist/index.js +19 -3
- package/node_modules/@tiptap/core/dist/index.js.map +1 -1
- package/node_modules/@tiptap/core/dist/index.umd.js +19 -2
- package/node_modules/@tiptap/core/dist/index.umd.js.map +1 -1
- package/node_modules/@tiptap/core/dist/utilities/index.d.ts +1 -0
- package/node_modules/@tiptap/core/dist/utilities/index.d.ts.map +1 -1
- package/node_modules/@tiptap/core/dist/utilities/isSafari.d.ts +10 -0
- package/node_modules/@tiptap/core/dist/utilities/isSafari.d.ts.map +1 -0
- package/node_modules/@tiptap/core/package.json +2 -2
- package/node_modules/@tiptap/core/src/commands/focus.ts +7 -2
- package/node_modules/@tiptap/core/src/utilities/index.ts +1 -0
- package/node_modules/@tiptap/core/src/utilities/isSafari.ts +11 -0
- package/node_modules/@tiptap/extension-blockquote/package.json +2 -2
- package/node_modules/@tiptap/extension-bold/package.json +2 -2
- package/node_modules/@tiptap/extension-bullet-list/package.json +2 -2
- package/node_modules/@tiptap/extension-code/package.json +2 -2
- package/node_modules/@tiptap/extension-code-block/package.json +3 -3
- package/node_modules/@tiptap/extension-document/package.json +2 -2
- package/node_modules/@tiptap/extension-dropcursor/package.json +3 -3
- package/node_modules/@tiptap/extension-gapcursor/package.json +3 -3
- package/node_modules/@tiptap/extension-hard-break/package.json +2 -2
- package/node_modules/@tiptap/extension-heading/package.json +2 -2
- package/node_modules/@tiptap/extension-highlight/package.json +2 -2
- package/node_modules/@tiptap/extension-history/package.json +3 -3
- package/node_modules/@tiptap/extension-horizontal-rule/package.json +3 -3
- package/node_modules/@tiptap/extension-italic/package.json +2 -2
- package/node_modules/@tiptap/extension-link/package.json +3 -3
- package/node_modules/@tiptap/extension-list-item/package.json +2 -2
- package/node_modules/@tiptap/extension-mention/package.json +4 -4
- package/node_modules/@tiptap/extension-ordered-list/package.json +2 -2
- package/node_modules/@tiptap/extension-paragraph/package.json +2 -2
- package/node_modules/@tiptap/extension-strike/package.json +2 -2
- package/node_modules/@tiptap/extension-subscript/README.md +14 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.cjs +61 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.d.ts +4 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.d.ts.map +1 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.js +56 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.js.map +1 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.umd.js +65 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.umd.js.map +1 -0
- package/node_modules/@tiptap/extension-subscript/dist/subscript.d.ts +36 -0
- package/node_modules/@tiptap/extension-subscript/dist/subscript.d.ts.map +1 -0
- package/node_modules/@tiptap/extension-subscript/package.json +49 -0
- package/node_modules/@tiptap/extension-subscript/src/index.ts +5 -0
- package/node_modules/@tiptap/extension-subscript/src/subscript.ts +91 -0
- package/node_modules/@tiptap/extension-superscript/README.md +14 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.cjs +61 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.d.ts +4 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.d.ts.map +1 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.js +56 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.js.map +1 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.umd.js +65 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.umd.js.map +1 -0
- package/node_modules/@tiptap/extension-superscript/dist/superscript.d.ts +36 -0
- package/node_modules/@tiptap/extension-superscript/dist/superscript.d.ts.map +1 -0
- package/node_modules/@tiptap/extension-superscript/package.json +49 -0
- package/node_modules/@tiptap/extension-superscript/src/index.ts +5 -0
- package/node_modules/@tiptap/extension-superscript/src/superscript.ts +91 -0
- package/node_modules/@tiptap/extension-table/package.json +3 -3
- package/node_modules/@tiptap/extension-table-cell/package.json +2 -2
- package/node_modules/@tiptap/extension-table-header/package.json +2 -2
- package/node_modules/@tiptap/extension-table-row/package.json +2 -2
- package/node_modules/@tiptap/extension-task-item/package.json +3 -3
- package/node_modules/@tiptap/extension-task-list/package.json +2 -2
- package/node_modules/@tiptap/extension-text/package.json +2 -2
- package/node_modules/@tiptap/extension-typography/package.json +2 -2
- package/node_modules/@tiptap/extension-underline/package.json +2 -2
- package/node_modules/@tiptap/html/package.json +3 -3
- package/node_modules/@tiptap/pm/package.json +1 -1
- package/node_modules/@tiptap/starter-kit/node_modules/@tiptap/extension-text-style/package.json +2 -2
- package/node_modules/@tiptap/starter-kit/package.json +22 -22
- package/node_modules/@tiptap/suggestion/package.json +3 -3
- package/node_modules/linkify-it/build/index.cjs.js +99 -94
- package/node_modules/linkify-it/index.mjs +99 -94
- package/node_modules/linkify-it/package.json +11 -1
- package/node_modules/linkifyjs/README.md +4 -2
- package/node_modules/linkifyjs/dist/linkify.cjs +8 -11
- package/node_modules/linkifyjs/dist/linkify.d.cts +14 -14
- package/node_modules/linkifyjs/dist/linkify.d.mts +14 -14
- package/node_modules/linkifyjs/dist/linkify.js +8 -11
- package/node_modules/linkifyjs/dist/linkify.min.js +1 -1
- package/node_modules/linkifyjs/dist/linkify.mjs +8 -11
- package/node_modules/linkifyjs/package.json +1 -1
- package/node_modules/markdown-it/README.md +13 -17
- package/node_modules/markdown-it/dist/index.cjs.js +111 -31
- package/node_modules/markdown-it/dist/markdown-it.js +117 -31
- package/node_modules/markdown-it/dist/markdown-it.min.js +2 -2
- package/node_modules/markdown-it/lib/common/utils.mjs +30 -1
- package/node_modules/markdown-it/lib/index.mjs +1 -1
- package/node_modules/markdown-it/lib/rules_block/heading.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_block/html_block.mjs +12 -1
- package/node_modules/markdown-it/lib/rules_block/lheading.mjs +4 -1
- package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +3 -1
- package/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +37 -21
- package/node_modules/markdown-it/lib/rules_inline/entity.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +37 -6
- package/node_modules/markdown-it/package.json +14 -3
- package/node_modules/msgpackr/README.md +1 -3
- package/node_modules/msgpackr/benchmark.md +26 -16
- package/node_modules/msgpackr/dist/index-no-eval.cjs +35 -16
- package/node_modules/msgpackr/dist/index-no-eval.cjs.map +1 -1
- package/node_modules/msgpackr/dist/index-no-eval.min.js +1 -1
- package/node_modules/msgpackr/dist/index-no-eval.min.js.map +1 -1
- package/node_modules/msgpackr/dist/index.js +35 -16
- package/node_modules/msgpackr/dist/index.js.map +1 -1
- package/node_modules/msgpackr/dist/index.min.js +1 -1
- package/node_modules/msgpackr/dist/index.min.js.map +1 -1
- package/node_modules/msgpackr/dist/node.cjs +50 -26
- package/node_modules/msgpackr/dist/node.cjs.map +1 -1
- package/node_modules/msgpackr/dist/test.js +44 -16
- package/node_modules/msgpackr/dist/test.js.map +1 -1
- package/node_modules/msgpackr/dist/unpack-no-eval.cjs +35 -16
- package/node_modules/msgpackr/dist/unpack-no-eval.cjs.map +1 -1
- package/node_modules/msgpackr/index.d.cts +2 -0
- package/node_modules/msgpackr/index.d.ts +2 -0
- package/node_modules/msgpackr/package.json +1 -1
- package/node_modules/msgpackr/stream.js +15 -10
- package/node_modules/msgpackr/unpack.js +35 -16
- package/node_modules/prosemirror-changeset/CHANGELOG.md +12 -0
- package/node_modules/prosemirror-changeset/README.md +31 -2
- package/node_modules/prosemirror-changeset/dist/index.cjs +17 -2
- package/node_modules/prosemirror-changeset/dist/index.d.cts +32 -2
- package/node_modules/prosemirror-changeset/dist/index.d.ts +32 -2
- package/node_modules/prosemirror-changeset/dist/index.js +18 -3
- package/node_modules/prosemirror-changeset/package.json +2 -2
- package/node_modules/prosemirror-changeset/src/README.md +4 -2
- package/node_modules/prosemirror-changeset/src/change.ts +18 -0
- package/node_modules/prosemirror-changeset/src/changeset.ts +10 -4
- package/node_modules/prosemirror-changeset/src/simplify.ts +1 -1
- package/node_modules/prosemirror-changeset/test/test-simplify.ts +3 -0
- package/node_modules/prosemirror-gapcursor/CHANGELOG.md +6 -0
- package/node_modules/prosemirror-gapcursor/dist/index.cjs +1 -1
- package/node_modules/prosemirror-gapcursor/dist/index.js +1 -1
- package/node_modules/prosemirror-gapcursor/package.json +3 -2
- package/node_modules/prosemirror-gapcursor/src/gapcursor.ts +1 -1
- package/node_modules/prosemirror-markdown/CHANGELOG.md +12 -0
- package/node_modules/prosemirror-markdown/dist/index.cjs +11 -1
- package/node_modules/prosemirror-markdown/dist/index.js +14 -2
- package/node_modules/prosemirror-markdown/package.json +1 -1
- package/node_modules/prosemirror-markdown/src/to_markdown.ts +12 -3
- package/node_modules/prosemirror-menu/CHANGELOG.md +18 -0
- package/node_modules/prosemirror-menu/CONTRIBUTING.md +22 -18
- package/node_modules/prosemirror-menu/README.md +69 -29
- package/node_modules/prosemirror-menu/dist/index.cjs +232 -48
- package/node_modules/prosemirror-menu/dist/index.d.cts +29 -14
- package/node_modules/prosemirror-menu/dist/index.d.ts +29 -14
- package/node_modules/prosemirror-menu/dist/index.js +229 -36
- package/node_modules/prosemirror-menu/package.json +2 -2
- package/node_modules/prosemirror-menu/src/README.md +30 -1
- package/node_modules/prosemirror-menu/src/icons.ts +3 -2
- package/node_modules/prosemirror-menu/src/menu.ts +193 -40
- package/node_modules/prosemirror-menu/src/menubar.ts +50 -5
- package/node_modules/prosemirror-menu/style/menu.css +28 -7
- package/node_modules/prosemirror-model/CHANGELOG.md +20 -0
- package/node_modules/prosemirror-model/CONTRIBUTING.md +19 -19
- package/node_modules/prosemirror-model/README.md +3 -3
- package/node_modules/prosemirror-model/dist/index.cjs +13 -10
- package/node_modules/prosemirror-model/dist/index.d.cts +25 -21
- package/node_modules/prosemirror-model/dist/index.d.ts +25 -21
- package/node_modules/prosemirror-model/dist/index.js +19 -23
- package/node_modules/prosemirror-model/package.json +2 -2
- package/node_modules/prosemirror-model/src/fragment.ts +1 -1
- package/node_modules/prosemirror-model/src/from_dom.ts +4 -1
- package/node_modules/prosemirror-model/src/node.ts +5 -4
- package/node_modules/prosemirror-model/src/replace.ts +6 -15
- package/node_modules/prosemirror-model/src/schema.ts +1 -1
- package/node_modules/prosemirror-model/src/to_dom.ts +24 -20
- package/node_modules/prosemirror-transform/CHANGELOG.md +16 -0
- package/node_modules/prosemirror-transform/dist/index.cjs +38 -4
- package/node_modules/prosemirror-transform/dist/index.d.cts +19 -0
- package/node_modules/prosemirror-transform/dist/index.d.ts +19 -0
- package/node_modules/prosemirror-transform/dist/index.js +52 -1
- package/node_modules/prosemirror-transform/package.json +1 -1
- package/node_modules/prosemirror-transform/src/replace.ts +16 -0
- package/node_modules/prosemirror-transform/src/replace_step.ts +10 -1
- package/node_modules/prosemirror-transform/src/transform.ts +21 -2
- package/node_modules/prosemirror-view/CHANGELOG.md +34 -2
- package/node_modules/prosemirror-view/CONTRIBUTING.md +19 -19
- package/node_modules/prosemirror-view/README.md +3 -3
- package/node_modules/prosemirror-view/dist/index.cjs +96 -40
- package/node_modules/prosemirror-view/dist/index.d.cts +2 -2
- package/node_modules/prosemirror-view/dist/index.d.ts +2 -2
- package/node_modules/prosemirror-view/dist/index.js +90 -39
- package/node_modules/prosemirror-view/package.json +2 -2
- package/node_modules/prosemirror-view/src/domchange.ts +1 -1
- package/node_modules/prosemirror-view/src/domobserver.ts +59 -16
- package/node_modules/prosemirror-view/src/index.ts +4 -4
- package/node_modules/prosemirror-view/src/input.ts +9 -6
- package/node_modules/prosemirror-view/src/viewdesc.ts +26 -22
- package/node_modules/prosemirror-view/style/prosemirror.css +1 -1
- package/package.json +5 -4
- package/src/client.mjs +2 -2
- package/src/config.mjs +1 -0
- package/src/helpers.mjs +2 -2
- package/src/index.mjs +31 -1
- package/src/initCodex.mjs +281 -0
- package/src/mcp.mjs +11 -1
- package/src/mcpShared.mjs +95 -5
- package/node_modules/@hcengineering/account-client/types/client.d.ts +0 -140
- package/node_modules/@hcengineering/account-client/types/client.d.ts.map +0 -1
- package/node_modules/@hcengineering/account-client/types/index.d.ts +0 -4
- package/node_modules/@hcengineering/account-client/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/account-client/types/types.d.ts +0 -177
- package/node_modules/@hcengineering/account-client/types/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/account-client/types/utils.d.ts +0 -5
- package/node_modules/@hcengineering/account-client/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/analytics/types/index.d.ts +0 -25
- package/node_modules/@hcengineering/analytics/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/__tests__/config.test.d.ts +0 -2
- package/node_modules/@hcengineering/api-client/types/__tests__/config.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/__tests__/markup-client.test.d.ts +0 -2
- package/node_modules/@hcengineering/api-client/types/__tests__/markup-client.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/__tests__/markup-types.test.d.ts +0 -2
- package/node_modules/@hcengineering/api-client/types/__tests__/markup-types.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/__tests__/rest-utils.test.d.ts +0 -2
- package/node_modules/@hcengineering/api-client/types/__tests__/rest-utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/__tests__/utils.test.d.ts +0 -2
- package/node_modules/@hcengineering/api-client/types/__tests__/utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/client.d.ts +0 -6
- package/node_modules/@hcengineering/api-client/types/client.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/config.d.ts +0 -8
- package/node_modules/@hcengineering/api-client/types/config.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/index.d.ts +0 -9
- package/node_modules/@hcengineering/api-client/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/markup/client.d.ts +0 -5
- package/node_modules/@hcengineering/api-client/types/markup/client.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/markup/index.d.ts +0 -3
- package/node_modules/@hcengineering/api-client/types/markup/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/markup/types.d.ts +0 -41
- package/node_modules/@hcengineering/api-client/types/markup/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/rest/index.d.ts +0 -4
- package/node_modules/@hcengineering/api-client/types/rest/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/rest/rest.d.ts +0 -39
- package/node_modules/@hcengineering/api-client/types/rest/rest.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/rest/tx.d.ts +0 -3
- package/node_modules/@hcengineering/api-client/types/rest/tx.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/rest/types.d.ts +0 -16
- package/node_modules/@hcengineering/api-client/types/rest/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/rest/utils.d.ts +0 -3
- package/node_modules/@hcengineering/api-client/types/rest/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/socket/browser.d.ts +0 -4
- package/node_modules/@hcengineering/api-client/types/socket/browser.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/socket/index.d.ts +0 -3
- package/node_modules/@hcengineering/api-client/types/socket/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/socket/node.d.ts +0 -4
- package/node_modules/@hcengineering/api-client/types/socket/node.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/storage/client.d.ts +0 -21
- package/node_modules/@hcengineering/api-client/types/storage/client.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/storage/error.d.ts +0 -10
- package/node_modules/@hcengineering/api-client/types/storage/error.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/storage/index.d.ts +0 -4
- package/node_modules/@hcengineering/api-client/types/storage/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/storage/types.d.ts +0 -10
- package/node_modules/@hcengineering/api-client/types/storage/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/types.d.ts +0 -101
- package/node_modules/@hcengineering/api-client/types/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/utils.d.ts +0 -12
- package/node_modules/@hcengineering/api-client/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/chunter/types/analytics.d.ts +0 -5
- package/node_modules/@hcengineering/chunter/types/analytics.d.ts.map +0 -1
- package/node_modules/@hcengineering/chunter/types/index.d.ts +0 -211
- package/node_modules/@hcengineering/chunter/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/chunter/types/utils.d.ts +0 -7
- package/node_modules/@hcengineering/chunter/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/client/types/__tests__/client.test.d.ts +0 -2
- package/node_modules/@hcengineering/client/types/__tests__/client.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/client/types/index.d.ts +0 -69
- package/node_modules/@hcengineering/client/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/client-resources/types/__tests__/connection.test.d.ts +0 -2
- package/node_modules/@hcengineering/client-resources/types/__tests__/connection.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/client-resources/types/__tests__/integration.test.d.ts +0 -45
- package/node_modules/@hcengineering/client-resources/types/__tests__/integration.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/client-resources/types/connection.d.ts +0 -7
- package/node_modules/@hcengineering/client-resources/types/connection.d.ts.map +0 -1
- package/node_modules/@hcengineering/client-resources/types/index.d.ts +0 -11
- package/node_modules/@hcengineering/client-resources/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/collaborator-client/types/__tests__/utils.test.d.ts +0 -2
- package/node_modules/@hcengineering/collaborator-client/types/__tests__/utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/collaborator-client/types/client.d.ts +0 -34
- package/node_modules/@hcengineering/collaborator-client/types/client.d.ts.map +0 -1
- package/node_modules/@hcengineering/collaborator-client/types/index.d.ts +0 -3
- package/node_modules/@hcengineering/collaborator-client/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/collaborator-client/types/utils.d.ts +0 -9
- package/node_modules/@hcengineering/collaborator-client/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/__tests__/cache.test.d.ts +0 -2
- package/node_modules/@hcengineering/contact/types/__tests__/cache.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/analytics.d.ts +0 -6
- package/node_modules/@hcengineering/contact/types/analytics.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/avatar.d.ts +0 -12
- package/node_modules/@hcengineering/contact/types/avatar.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/cache.d.ts +0 -49
- package/node_modules/@hcengineering/contact/types/cache.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/index.d.ts +0 -367
- package/node_modules/@hcengineering/contact/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/types.d.ts +0 -25
- package/node_modules/@hcengineering/contact/types/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/utils.d.ts +0 -110
- package/node_modules/@hcengineering/contact/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/client.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/client.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/clone.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/clone.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/collaboration.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/collaboration.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/collaborators.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/collaborators.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/common.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/common.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/connection.d.ts +0 -4
- package/node_modules/@hcengineering/core/types/__tests__/connection.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/contexts.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/contexts.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/hierarchy.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/hierarchy.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/lang.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/lang.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/limiter-edge-cases.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/limiter-edge-cases.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/limits.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/limits.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/memdb.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/memdb.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/minmodel.d.ts +0 -50
- package/node_modules/@hcengineering/core/types/__tests__/minmodel.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/objvalue.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/objvalue.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/operator-bugs.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/operator-bugs.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/operator.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/operator.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/rate-limiter.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/rate-limiter.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/time.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/time.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/utils.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/backup.d.ts +0 -26
- package/node_modules/@hcengineering/core/types/backup.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/benchmark.d.ts +0 -19
- package/node_modules/@hcengineering/core/types/benchmark.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/classes.d.ts +0 -716
- package/node_modules/@hcengineering/core/types/classes.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/client.d.ts +0 -69
- package/node_modules/@hcengineering/core/types/client.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/clone.d.ts +0 -3
- package/node_modules/@hcengineering/core/types/clone.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/collaboration.d.ts +0 -16
- package/node_modules/@hcengineering/core/types/collaboration.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/collaborators.d.ts +0 -3
- package/node_modules/@hcengineering/core/types/collaborators.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/common.d.ts +0 -4
- package/node_modules/@hcengineering/core/types/common.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/component.d.ts +0 -229
- package/node_modules/@hcengineering/core/types/component.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/hierarchy.d.ts +0 -84
- package/node_modules/@hcengineering/core/types/hierarchy.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/index.d.ts +0 -25
- package/node_modules/@hcengineering/core/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/memdb.d.ts +0 -60
- package/node_modules/@hcengineering/core/types/memdb.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/objvalue.d.ts +0 -10
- package/node_modules/@hcengineering/core/types/objvalue.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/operations.d.ts +0 -87
- package/node_modules/@hcengineering/core/types/operations.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/operator.d.ts +0 -16
- package/node_modules/@hcengineering/core/types/operator.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/predicate.d.ts +0 -6
- package/node_modules/@hcengineering/core/types/predicate.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/proxy.d.ts +0 -21
- package/node_modules/@hcengineering/core/types/proxy.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/query.d.ts +0 -21
- package/node_modules/@hcengineering/core/types/query.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/server.d.ts +0 -82
- package/node_modules/@hcengineering/core/types/server.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/status.d.ts +0 -30
- package/node_modules/@hcengineering/core/types/status.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/storage.d.ts +0 -233
- package/node_modules/@hcengineering/core/types/storage.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/time.d.ts +0 -8
- package/node_modules/@hcengineering/core/types/time.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/tx.d.ts +0 -261
- package/node_modules/@hcengineering/core/types/tx.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/utils.d.ts +0 -207
- package/node_modules/@hcengineering/core/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/__tests__/context.test.d.ts +0 -2
- package/node_modules/@hcengineering/measurements/types/__tests__/context.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/__tests__/index.test.d.ts +0 -2
- package/node_modules/@hcengineering/measurements/types/__tests__/index.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/__tests__/metrics.test.d.ts +0 -2
- package/node_modules/@hcengineering/measurements/types/__tests__/metrics.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/__tests__/performance.test.d.ts +0 -2
- package/node_modules/@hcengineering/measurements/types/__tests__/performance.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/context.d.ts +0 -64
- package/node_modules/@hcengineering/measurements/types/context.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/index.d.ts +0 -12
- package/node_modules/@hcengineering/measurements/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/metrics.d.ts +0 -34
- package/node_modules/@hcengineering/measurements/types/metrics.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/types.d.ts +0 -88
- package/node_modules/@hcengineering/measurements/types/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/__tests__/i18n.test.d.ts +0 -2
- package/node_modules/@hcengineering/platform/types/__tests__/i18n.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/__tests__/ident.test.d.ts +0 -2
- package/node_modules/@hcengineering/platform/types/__tests__/ident.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/__tests__/plugin.d.ts +0 -7
- package/node_modules/@hcengineering/platform/types/__tests__/plugin.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/__tests__/resource.test.d.ts +0 -2
- package/node_modules/@hcengineering/platform/types/__tests__/resource.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/event.d.ts +0 -39
- package/node_modules/@hcengineering/platform/types/event.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/i18n.d.ts +0 -28
- package/node_modules/@hcengineering/platform/types/i18n.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/ident.d.ts +0 -14
- package/node_modules/@hcengineering/platform/types/ident.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/index.d.ts +0 -19
- package/node_modules/@hcengineering/platform/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/metadata.d.ts +0 -38
- package/node_modules/@hcengineering/platform/types/metadata.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/platform.d.ts +0 -218
- package/node_modules/@hcengineering/platform/types/platform.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/resource.d.ts +0 -49
- package/node_modules/@hcengineering/platform/types/resource.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/status.d.ts +0 -60
- package/node_modules/@hcengineering/platform/types/status.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/testUtils.d.ts +0 -8
- package/node_modules/@hcengineering/platform/types/testUtils.d.ts.map +0 -1
- package/node_modules/@hcengineering/rank/types/__tests__/utils.test.d.ts +0 -2
- package/node_modules/@hcengineering/rank/types/__tests__/utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/rank/types/index.d.ts +0 -3
- package/node_modules/@hcengineering/rank/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/rank/types/types.d.ts +0 -2
- package/node_modules/@hcengineering/rank/types/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/rank/types/utils.d.ts +0 -6
- package/node_modules/@hcengineering/rank/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/rpc/types/index.d.ts +0 -3
- package/node_modules/@hcengineering/rpc/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/rpc/types/rpc.d.ts +0 -96
- package/node_modules/@hcengineering/rpc/types/rpc.d.ts.map +0 -1
- package/node_modules/@hcengineering/rpc/types/sliding.d.ts +0 -11
- package/node_modules/@hcengineering/rpc/types/sliding.d.ts.map +0 -1
- package/node_modules/@hcengineering/rpc/types/test/rateLimit.spec.d.ts +0 -2
- package/node_modules/@hcengineering/rpc/types/test/rateLimit.spec.d.ts.map +0 -1
- package/node_modules/@hcengineering/tags/types/analytics.d.ts +0 -5
- package/node_modules/@hcengineering/tags/types/analytics.d.ts.map +0 -1
- package/node_modules/@hcengineering/tags/types/index.d.ts +0 -105
- package/node_modules/@hcengineering/tags/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/task/types/index.d.ts +0 -227
- package/node_modules/@hcengineering/task/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/task/types/utils.d.ts +0 -61
- package/node_modules/@hcengineering/task/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/extensions.d.ts +0 -53
- package/node_modules/@hcengineering/text/types/extensions.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/index.d.ts +0 -13
- package/node_modules/@hcengineering/text/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/kit.d.ts +0 -12
- package/node_modules/@hcengineering/text/types/kit.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/kits/common-kit.d.ts +0 -72
- package/node_modules/@hcengineering/text/types/kits/common-kit.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/kits/server-kit.d.ts +0 -106
- package/node_modules/@hcengineering/text/types/kits/server-kit.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/marks/code.d.ts +0 -8
- package/node_modules/@hcengineering/text/types/marks/code.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/marks/colors.d.ts +0 -21
- package/node_modules/@hcengineering/text/types/marks/colors.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/marks/inlineComment.d.ts +0 -5
- package/node_modules/@hcengineering/text/types/marks/inlineComment.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/marks/noteBase.d.ts +0 -23
- package/node_modules/@hcengineering/text/types/marks/noteBase.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/marks/qmsInlineCommentMark.d.ts +0 -6
- package/node_modules/@hcengineering/text/types/marks/qmsInlineCommentMark.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/markup/__tests__/dsl.test.d.ts +0 -2
- package/node_modules/@hcengineering/text/types/markup/__tests__/dsl.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/markup/__tests__/utils.test.d.ts +0 -5
- package/node_modules/@hcengineering/text/types/markup/__tests__/utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/markup/utils.d.ts +0 -19
- package/node_modules/@hcengineering/text/types/markup/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/codeblock.d.ts +0 -12
- package/node_modules/@hcengineering/text/types/nodes/codeblock.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/comment.d.ts +0 -6
- package/node_modules/@hcengineering/text/types/nodes/comment.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/embed.d.ts +0 -3
- package/node_modules/@hcengineering/text/types/nodes/embed.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/emoji.d.ts +0 -17
- package/node_modules/@hcengineering/text/types/nodes/emoji.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/file.d.ts +0 -13
- package/node_modules/@hcengineering/text/types/nodes/file.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/image.d.ts +0 -52
- package/node_modules/@hcengineering/text/types/nodes/image.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/index.d.ts +0 -11
- package/node_modules/@hcengineering/text/types/nodes/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/markdown.d.ts +0 -3
- package/node_modules/@hcengineering/text/types/nodes/markdown.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/mermaid.d.ts +0 -4
- package/node_modules/@hcengineering/text/types/nodes/mermaid.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/reference.d.ts +0 -18
- package/node_modules/@hcengineering/text/types/nodes/reference.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/todo.d.ts +0 -3
- package/node_modules/@hcengineering/text/types/nodes/todo.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/utils.d.ts +0 -6
- package/node_modules/@hcengineering/text/types/nodes/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/tiptapExtensions.d.ts +0 -28
- package/node_modules/@hcengineering/text/types/tiptapExtensions.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/index.d.ts +0 -6
- package/node_modules/@hcengineering/text-core/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/__tests__/traverse.test.d.ts +0 -2
- package/node_modules/@hcengineering/text-core/types/markup/__tests__/traverse.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/__tests__/utils.test.d.ts +0 -2
- package/node_modules/@hcengineering/text-core/types/markup/__tests__/utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/dsl.d.ts +0 -25
- package/node_modules/@hcengineering/text-core/types/markup/dsl.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/model.d.ts +0 -74
- package/node_modules/@hcengineering/text-core/types/markup/model.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/reference.d.ts +0 -15
- package/node_modules/@hcengineering/text-core/types/markup/reference.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/traverse.d.ts +0 -6
- package/node_modules/@hcengineering/text-core/types/markup/traverse.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/utils.d.ts +0 -25
- package/node_modules/@hcengineering/text-core/types/markup/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-html/types/__tests__/html.test.d.ts +0 -2
- package/node_modules/@hcengineering/text-html/types/__tests__/html.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-html/types/index.d.ts +0 -6
- package/node_modules/@hcengineering/text-html/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-html/types/parser.d.ts +0 -10
- package/node_modules/@hcengineering/text-html/types/parser.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-html/types/serializer.d.ts +0 -9
- package/node_modules/@hcengineering/text-html/types/serializer.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/__tests__/markdown.test.d.ts +0 -9
- package/node_modules/@hcengineering/text-markdown/types/__tests__/markdown.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/compare.d.ts +0 -10
- package/node_modules/@hcengineering/text-markdown/types/compare.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/index.d.ts +0 -14
- package/node_modules/@hcengineering/text-markdown/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/marks.d.ts +0 -8
- package/node_modules/@hcengineering/text-markdown/types/marks.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/node.d.ts +0 -4
- package/node_modules/@hcengineering/text-markdown/types/node.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/parser.d.ts +0 -50
- package/node_modules/@hcengineering/text-markdown/types/parser.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/serializer.d.ts +0 -102
- package/node_modules/@hcengineering/text-markdown/types/serializer.d.ts.map +0 -1
- package/node_modules/@hcengineering/tracker/types/analytics.d.ts +0 -24
- package/node_modules/@hcengineering/tracker/types/analytics.d.ts.map +0 -1
- package/node_modules/@hcengineering/tracker/types/index.d.ts +0 -431
- package/node_modules/@hcengineering/tracker/types/index.d.ts.map +0 -1
|
@@ -305,11 +305,6 @@ const tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghik
|
|
|
305
305
|
// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead
|
|
306
306
|
const tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');
|
|
307
307
|
|
|
308
|
-
function resetScanCache (self) {
|
|
309
|
-
self.__index__ = -1;
|
|
310
|
-
self.__text_cache__ = '';
|
|
311
|
-
}
|
|
312
|
-
|
|
313
308
|
function createValidator (re) {
|
|
314
309
|
return function (text, pos) {
|
|
315
310
|
const tail = text.slice(pos);
|
|
@@ -348,8 +343,11 @@ function compile (self) {
|
|
|
348
343
|
function untpl (tpl) { return tpl.replace('%TLDS%', re.src_tlds) }
|
|
349
344
|
|
|
350
345
|
re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');
|
|
346
|
+
re.email_fuzzy_global = RegExp(untpl(re.tpl_email_fuzzy), 'ig');
|
|
351
347
|
re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');
|
|
348
|
+
re.link_fuzzy_global = RegExp(untpl(re.tpl_link_fuzzy), 'ig');
|
|
352
349
|
re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');
|
|
350
|
+
re.link_no_ip_fuzzy_global = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'ig');
|
|
353
351
|
re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');
|
|
354
352
|
|
|
355
353
|
//
|
|
@@ -443,12 +441,6 @@ function compile (self) {
|
|
|
443
441
|
'(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',
|
|
444
442
|
'i'
|
|
445
443
|
);
|
|
446
|
-
|
|
447
|
-
//
|
|
448
|
-
// Cleanup
|
|
449
|
-
//
|
|
450
|
-
|
|
451
|
-
resetScanCache(self);
|
|
452
444
|
}
|
|
453
445
|
|
|
454
446
|
/**
|
|
@@ -456,55 +448,45 @@ function compile (self) {
|
|
|
456
448
|
*
|
|
457
449
|
* Match result. Single element of array, returned by [[LinkifyIt#match]]
|
|
458
450
|
**/
|
|
459
|
-
function Match (
|
|
460
|
-
const
|
|
461
|
-
const end = self.__last_index__;
|
|
462
|
-
const text = self.__text_cache__.slice(start, end);
|
|
451
|
+
function Match (text, schema, index, lastIndex) {
|
|
452
|
+
const raw = text.slice(index, lastIndex);
|
|
463
453
|
|
|
464
454
|
/**
|
|
465
455
|
* Match#schema -> String
|
|
466
456
|
*
|
|
467
457
|
* Prefix (protocol) for matched string.
|
|
468
458
|
**/
|
|
469
|
-
this.schema =
|
|
459
|
+
this.schema = schema.toLowerCase();
|
|
470
460
|
/**
|
|
471
461
|
* Match#index -> Number
|
|
472
462
|
*
|
|
473
463
|
* First position of matched string.
|
|
474
464
|
**/
|
|
475
|
-
this.index =
|
|
465
|
+
this.index = index;
|
|
476
466
|
/**
|
|
477
467
|
* Match#lastIndex -> Number
|
|
478
468
|
*
|
|
479
469
|
* Next position after matched string.
|
|
480
470
|
**/
|
|
481
|
-
this.lastIndex =
|
|
471
|
+
this.lastIndex = lastIndex;
|
|
482
472
|
/**
|
|
483
473
|
* Match#raw -> String
|
|
484
474
|
*
|
|
485
475
|
* Matched string.
|
|
486
476
|
**/
|
|
487
|
-
this.raw =
|
|
477
|
+
this.raw = raw;
|
|
488
478
|
/**
|
|
489
479
|
* Match#text -> String
|
|
490
480
|
*
|
|
491
481
|
* Notmalized text of matched string.
|
|
492
482
|
**/
|
|
493
|
-
this.text =
|
|
483
|
+
this.text = raw;
|
|
494
484
|
/**
|
|
495
485
|
* Match#url -> String
|
|
496
486
|
*
|
|
497
487
|
* Normalized url of matched string.
|
|
498
488
|
**/
|
|
499
|
-
this.url =
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
function createMatch (self, shift) {
|
|
503
|
-
const match = new Match(self, shift);
|
|
504
|
-
|
|
505
|
-
self.__compiled__[match.schema].normalize(match, self);
|
|
506
|
-
|
|
507
|
-
return match
|
|
489
|
+
this.url = raw;
|
|
508
490
|
}
|
|
509
491
|
|
|
510
492
|
/**
|
|
@@ -559,12 +541,6 @@ function LinkifyIt (schemas, options) {
|
|
|
559
541
|
|
|
560
542
|
this.__opts__ = assign({}, defaultOptions, options);
|
|
561
543
|
|
|
562
|
-
// Cache last tested result. Used to skip repeating steps on next `match` call.
|
|
563
|
-
this.__index__ = -1;
|
|
564
|
-
this.__last_index__ = -1; // Next scan position
|
|
565
|
-
this.__schema__ = '';
|
|
566
|
-
this.__text_cache__ = '';
|
|
567
|
-
|
|
568
544
|
this.__schemas__ = assign({}, defaultSchemas, schemas);
|
|
569
545
|
this.__compiled__ = {};
|
|
570
546
|
|
|
@@ -606,69 +582,38 @@ LinkifyIt.prototype.set = function set (options) {
|
|
|
606
582
|
* Searches linkifiable pattern and returns `true` on success or `false` on fail.
|
|
607
583
|
**/
|
|
608
584
|
LinkifyIt.prototype.test = function test (text) {
|
|
609
|
-
// Reset scan cache
|
|
610
|
-
this.__text_cache__ = text;
|
|
611
|
-
this.__index__ = -1;
|
|
612
|
-
|
|
613
585
|
if (!text.length) { return false }
|
|
614
586
|
|
|
615
|
-
let m,
|
|
587
|
+
let m, re;
|
|
616
588
|
|
|
617
589
|
// try to scan for link with schema - that's the most simple rule
|
|
618
590
|
if (this.re.schema_test.test(text)) {
|
|
619
591
|
re = this.re.schema_search;
|
|
620
592
|
re.lastIndex = 0;
|
|
621
593
|
while ((m = re.exec(text)) !== null) {
|
|
622
|
-
|
|
623
|
-
if (len) {
|
|
624
|
-
this.__schema__ = m[2];
|
|
625
|
-
this.__index__ = m.index + m[1].length;
|
|
626
|
-
this.__last_index__ = m.index + m[0].length + len;
|
|
627
|
-
break
|
|
628
|
-
}
|
|
594
|
+
if (this.testSchemaAt(text, m[2], re.lastIndex)) { return true }
|
|
629
595
|
}
|
|
630
596
|
}
|
|
631
597
|
|
|
632
598
|
if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {
|
|
633
599
|
// guess schemaless links
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
if (this.__index__ < 0 || tld_pos < this.__index__) {
|
|
638
|
-
if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {
|
|
639
|
-
shift = ml.index + ml[1].length;
|
|
640
|
-
|
|
641
|
-
if (this.__index__ < 0 || shift < this.__index__) {
|
|
642
|
-
this.__schema__ = '';
|
|
643
|
-
this.__index__ = shift;
|
|
644
|
-
this.__last_index__ = ml.index + ml[0].length;
|
|
645
|
-
}
|
|
646
|
-
}
|
|
600
|
+
if (text.search(this.re.host_fuzzy_test) >= 0) {
|
|
601
|
+
if (text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy) !== null) {
|
|
602
|
+
return true
|
|
647
603
|
}
|
|
648
604
|
}
|
|
649
605
|
}
|
|
650
606
|
|
|
651
607
|
if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {
|
|
652
608
|
// guess schemaless emails
|
|
653
|
-
|
|
654
|
-
if (at_pos >= 0) {
|
|
609
|
+
if (text.indexOf('@') >= 0) {
|
|
655
610
|
// We can't skip this check, because this cases are possible:
|
|
656
611
|
// 192.168.1.1@gmail.com, my.in@example.com
|
|
657
|
-
if (
|
|
658
|
-
shift = me.index + me[1].length;
|
|
659
|
-
next = me.index + me[0].length;
|
|
660
|
-
|
|
661
|
-
if (this.__index__ < 0 || shift < this.__index__ ||
|
|
662
|
-
(shift === this.__index__ && next > this.__last_index__)) {
|
|
663
|
-
this.__schema__ = 'mailto:';
|
|
664
|
-
this.__index__ = shift;
|
|
665
|
-
this.__last_index__ = next;
|
|
666
|
-
}
|
|
667
|
-
}
|
|
612
|
+
if (text.match(this.re.email_fuzzy) !== null) { return true }
|
|
668
613
|
}
|
|
669
614
|
}
|
|
670
615
|
|
|
671
|
-
return
|
|
616
|
+
return false
|
|
672
617
|
};
|
|
673
618
|
|
|
674
619
|
/**
|
|
@@ -717,23 +662,88 @@ LinkifyIt.prototype.testSchemaAt = function testSchemaAt (text, schema, pos) {
|
|
|
717
662
|
**/
|
|
718
663
|
LinkifyIt.prototype.match = function match (text) {
|
|
719
664
|
const result = [];
|
|
720
|
-
|
|
665
|
+
const type_schemed = [];
|
|
666
|
+
const type_fuzzy_link = [];
|
|
667
|
+
const type_fuzzy_email = [];
|
|
668
|
+
let m, len, re;
|
|
669
|
+
|
|
670
|
+
function choose (a, b) {
|
|
671
|
+
if (!a) { return b }
|
|
672
|
+
if (!b) { return a }
|
|
673
|
+
if (a.index !== b.index) { return a.index < b.index ? a : b }
|
|
674
|
+
return a.lastIndex >= b.lastIndex ? a : b
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
if (!text.length) { return null }
|
|
678
|
+
|
|
679
|
+
// scan for links with schema
|
|
680
|
+
if (this.re.schema_test.test(text)) {
|
|
681
|
+
re = this.re.schema_search;
|
|
682
|
+
re.lastIndex = 0;
|
|
683
|
+
while ((m = re.exec(text)) !== null) {
|
|
684
|
+
len = this.testSchemaAt(text, m[2], re.lastIndex);
|
|
685
|
+
if (len) {
|
|
686
|
+
type_schemed.push({
|
|
687
|
+
schema: m[2],
|
|
688
|
+
index: m.index + m[1].length,
|
|
689
|
+
lastIndex: m.index + m[0].length + len
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}
|
|
721
694
|
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
695
|
+
if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {
|
|
696
|
+
re = this.__opts__.fuzzyIP ? this.re.link_fuzzy_global : this.re.link_no_ip_fuzzy_global;
|
|
697
|
+
re.lastIndex = 0;
|
|
698
|
+
while ((m = re.exec(text)) !== null) {
|
|
699
|
+
type_fuzzy_link.push({
|
|
700
|
+
schema: '',
|
|
701
|
+
index: m.index + m[1].length,
|
|
702
|
+
lastIndex: m.index + m[0].length
|
|
703
|
+
});
|
|
704
|
+
}
|
|
726
705
|
}
|
|
727
706
|
|
|
728
|
-
|
|
729
|
-
|
|
707
|
+
if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {
|
|
708
|
+
re = this.re.email_fuzzy_global;
|
|
709
|
+
re.lastIndex = 0;
|
|
710
|
+
while ((m = re.exec(text)) !== null) {
|
|
711
|
+
type_fuzzy_email.push({
|
|
712
|
+
schema: 'mailto:',
|
|
713
|
+
index: m.index + m[1].length,
|
|
714
|
+
lastIndex: m.index + m[0].length
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
const indexes = [0, 0, 0];
|
|
720
|
+
let lastIndex = 0;
|
|
721
|
+
|
|
722
|
+
for (;;) {
|
|
723
|
+
const candidates = [
|
|
724
|
+
type_schemed[indexes[0]],
|
|
725
|
+
type_fuzzy_email[indexes[1]],
|
|
726
|
+
type_fuzzy_link[indexes[2]]
|
|
727
|
+
];
|
|
728
|
+
|
|
729
|
+
const candidate = choose(choose(candidates[0], candidates[1]), candidates[2]);
|
|
730
730
|
|
|
731
|
-
|
|
732
|
-
while (this.test(tail)) {
|
|
733
|
-
result.push(createMatch(this, shift));
|
|
731
|
+
if (!candidate) { break }
|
|
734
732
|
|
|
735
|
-
|
|
736
|
-
|
|
733
|
+
if (candidate === candidates[0]) {
|
|
734
|
+
indexes[0]++;
|
|
735
|
+
} else if (candidate === candidates[1]) {
|
|
736
|
+
indexes[1]++;
|
|
737
|
+
} else {
|
|
738
|
+
indexes[2]++;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
if (candidate.index < lastIndex) { continue }
|
|
742
|
+
|
|
743
|
+
const match = new Match(text, candidate.schema, candidate.index, candidate.lastIndex);
|
|
744
|
+
this.__compiled__[match.schema].normalize(match, this);
|
|
745
|
+
result.push(match);
|
|
746
|
+
lastIndex = candidate.lastIndex;
|
|
737
747
|
}
|
|
738
748
|
|
|
739
749
|
if (result.length) {
|
|
@@ -750,10 +760,6 @@ LinkifyIt.prototype.match = function match (text) {
|
|
|
750
760
|
* of the string, and null otherwise.
|
|
751
761
|
**/
|
|
752
762
|
LinkifyIt.prototype.matchAtStart = function matchAtStart (text) {
|
|
753
|
-
// Reset scan cache
|
|
754
|
-
this.__text_cache__ = text;
|
|
755
|
-
this.__index__ = -1;
|
|
756
|
-
|
|
757
763
|
if (!text.length) return null
|
|
758
764
|
|
|
759
765
|
const m = this.re.schema_at_start.exec(text);
|
|
@@ -762,11 +768,10 @@ LinkifyIt.prototype.matchAtStart = function matchAtStart (text) {
|
|
|
762
768
|
const len = this.testSchemaAt(text, m[2], m[0].length);
|
|
763
769
|
if (!len) return null
|
|
764
770
|
|
|
765
|
-
|
|
766
|
-
this.__index__ = m.index + m[1].length;
|
|
767
|
-
this.__last_index__ = m.index + m[0].length + len;
|
|
771
|
+
const match = new Match(text, m[2], m.index + m[1].length, m.index + m[0].length + len);
|
|
768
772
|
|
|
769
|
-
|
|
773
|
+
this.__compiled__[match.schema].normalize(match, this);
|
|
774
|
+
return match
|
|
770
775
|
};
|
|
771
776
|
|
|
772
777
|
/** chainable
|
|
@@ -115,11 +115,6 @@ const tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghik
|
|
|
115
115
|
// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead
|
|
116
116
|
const tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|')
|
|
117
117
|
|
|
118
|
-
function resetScanCache (self) {
|
|
119
|
-
self.__index__ = -1
|
|
120
|
-
self.__text_cache__ = ''
|
|
121
|
-
}
|
|
122
|
-
|
|
123
118
|
function createValidator (re) {
|
|
124
119
|
return function (text, pos) {
|
|
125
120
|
const tail = text.slice(pos)
|
|
@@ -158,8 +153,11 @@ function compile (self) {
|
|
|
158
153
|
function untpl (tpl) { return tpl.replace('%TLDS%', re.src_tlds) }
|
|
159
154
|
|
|
160
155
|
re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i')
|
|
156
|
+
re.email_fuzzy_global = RegExp(untpl(re.tpl_email_fuzzy), 'ig')
|
|
161
157
|
re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i')
|
|
158
|
+
re.link_fuzzy_global = RegExp(untpl(re.tpl_link_fuzzy), 'ig')
|
|
162
159
|
re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i')
|
|
160
|
+
re.link_no_ip_fuzzy_global = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'ig')
|
|
163
161
|
re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i')
|
|
164
162
|
|
|
165
163
|
//
|
|
@@ -253,12 +251,6 @@ function compile (self) {
|
|
|
253
251
|
'(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',
|
|
254
252
|
'i'
|
|
255
253
|
)
|
|
256
|
-
|
|
257
|
-
//
|
|
258
|
-
// Cleanup
|
|
259
|
-
//
|
|
260
|
-
|
|
261
|
-
resetScanCache(self)
|
|
262
254
|
}
|
|
263
255
|
|
|
264
256
|
/**
|
|
@@ -266,55 +258,45 @@ function compile (self) {
|
|
|
266
258
|
*
|
|
267
259
|
* Match result. Single element of array, returned by [[LinkifyIt#match]]
|
|
268
260
|
**/
|
|
269
|
-
function Match (
|
|
270
|
-
const
|
|
271
|
-
const end = self.__last_index__
|
|
272
|
-
const text = self.__text_cache__.slice(start, end)
|
|
261
|
+
function Match (text, schema, index, lastIndex) {
|
|
262
|
+
const raw = text.slice(index, lastIndex)
|
|
273
263
|
|
|
274
264
|
/**
|
|
275
265
|
* Match#schema -> String
|
|
276
266
|
*
|
|
277
267
|
* Prefix (protocol) for matched string.
|
|
278
268
|
**/
|
|
279
|
-
this.schema =
|
|
269
|
+
this.schema = schema.toLowerCase()
|
|
280
270
|
/**
|
|
281
271
|
* Match#index -> Number
|
|
282
272
|
*
|
|
283
273
|
* First position of matched string.
|
|
284
274
|
**/
|
|
285
|
-
this.index =
|
|
275
|
+
this.index = index
|
|
286
276
|
/**
|
|
287
277
|
* Match#lastIndex -> Number
|
|
288
278
|
*
|
|
289
279
|
* Next position after matched string.
|
|
290
280
|
**/
|
|
291
|
-
this.lastIndex =
|
|
281
|
+
this.lastIndex = lastIndex
|
|
292
282
|
/**
|
|
293
283
|
* Match#raw -> String
|
|
294
284
|
*
|
|
295
285
|
* Matched string.
|
|
296
286
|
**/
|
|
297
|
-
this.raw =
|
|
287
|
+
this.raw = raw
|
|
298
288
|
/**
|
|
299
289
|
* Match#text -> String
|
|
300
290
|
*
|
|
301
291
|
* Notmalized text of matched string.
|
|
302
292
|
**/
|
|
303
|
-
this.text =
|
|
293
|
+
this.text = raw
|
|
304
294
|
/**
|
|
305
295
|
* Match#url -> String
|
|
306
296
|
*
|
|
307
297
|
* Normalized url of matched string.
|
|
308
298
|
**/
|
|
309
|
-
this.url =
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
function createMatch (self, shift) {
|
|
313
|
-
const match = new Match(self, shift)
|
|
314
|
-
|
|
315
|
-
self.__compiled__[match.schema].normalize(match, self)
|
|
316
|
-
|
|
317
|
-
return match
|
|
299
|
+
this.url = raw
|
|
318
300
|
}
|
|
319
301
|
|
|
320
302
|
/**
|
|
@@ -369,12 +351,6 @@ function LinkifyIt (schemas, options) {
|
|
|
369
351
|
|
|
370
352
|
this.__opts__ = assign({}, defaultOptions, options)
|
|
371
353
|
|
|
372
|
-
// Cache last tested result. Used to skip repeating steps on next `match` call.
|
|
373
|
-
this.__index__ = -1
|
|
374
|
-
this.__last_index__ = -1 // Next scan position
|
|
375
|
-
this.__schema__ = ''
|
|
376
|
-
this.__text_cache__ = ''
|
|
377
|
-
|
|
378
354
|
this.__schemas__ = assign({}, defaultSchemas, schemas)
|
|
379
355
|
this.__compiled__ = {}
|
|
380
356
|
|
|
@@ -416,69 +392,38 @@ LinkifyIt.prototype.set = function set (options) {
|
|
|
416
392
|
* Searches linkifiable pattern and returns `true` on success or `false` on fail.
|
|
417
393
|
**/
|
|
418
394
|
LinkifyIt.prototype.test = function test (text) {
|
|
419
|
-
// Reset scan cache
|
|
420
|
-
this.__text_cache__ = text
|
|
421
|
-
this.__index__ = -1
|
|
422
|
-
|
|
423
395
|
if (!text.length) { return false }
|
|
424
396
|
|
|
425
|
-
let m,
|
|
397
|
+
let m, re
|
|
426
398
|
|
|
427
399
|
// try to scan for link with schema - that's the most simple rule
|
|
428
400
|
if (this.re.schema_test.test(text)) {
|
|
429
401
|
re = this.re.schema_search
|
|
430
402
|
re.lastIndex = 0
|
|
431
403
|
while ((m = re.exec(text)) !== null) {
|
|
432
|
-
|
|
433
|
-
if (len) {
|
|
434
|
-
this.__schema__ = m[2]
|
|
435
|
-
this.__index__ = m.index + m[1].length
|
|
436
|
-
this.__last_index__ = m.index + m[0].length + len
|
|
437
|
-
break
|
|
438
|
-
}
|
|
404
|
+
if (this.testSchemaAt(text, m[2], re.lastIndex)) { return true }
|
|
439
405
|
}
|
|
440
406
|
}
|
|
441
407
|
|
|
442
408
|
if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {
|
|
443
409
|
// guess schemaless links
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
if (this.__index__ < 0 || tld_pos < this.__index__) {
|
|
448
|
-
if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {
|
|
449
|
-
shift = ml.index + ml[1].length
|
|
450
|
-
|
|
451
|
-
if (this.__index__ < 0 || shift < this.__index__) {
|
|
452
|
-
this.__schema__ = ''
|
|
453
|
-
this.__index__ = shift
|
|
454
|
-
this.__last_index__ = ml.index + ml[0].length
|
|
455
|
-
}
|
|
456
|
-
}
|
|
410
|
+
if (text.search(this.re.host_fuzzy_test) >= 0) {
|
|
411
|
+
if (text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy) !== null) {
|
|
412
|
+
return true
|
|
457
413
|
}
|
|
458
414
|
}
|
|
459
415
|
}
|
|
460
416
|
|
|
461
417
|
if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {
|
|
462
418
|
// guess schemaless emails
|
|
463
|
-
|
|
464
|
-
if (at_pos >= 0) {
|
|
419
|
+
if (text.indexOf('@') >= 0) {
|
|
465
420
|
// We can't skip this check, because this cases are possible:
|
|
466
421
|
// 192.168.1.1@gmail.com, my.in@example.com
|
|
467
|
-
if (
|
|
468
|
-
shift = me.index + me[1].length
|
|
469
|
-
next = me.index + me[0].length
|
|
470
|
-
|
|
471
|
-
if (this.__index__ < 0 || shift < this.__index__ ||
|
|
472
|
-
(shift === this.__index__ && next > this.__last_index__)) {
|
|
473
|
-
this.__schema__ = 'mailto:'
|
|
474
|
-
this.__index__ = shift
|
|
475
|
-
this.__last_index__ = next
|
|
476
|
-
}
|
|
477
|
-
}
|
|
422
|
+
if (text.match(this.re.email_fuzzy) !== null) { return true }
|
|
478
423
|
}
|
|
479
424
|
}
|
|
480
425
|
|
|
481
|
-
return
|
|
426
|
+
return false
|
|
482
427
|
}
|
|
483
428
|
|
|
484
429
|
/**
|
|
@@ -527,23 +472,88 @@ LinkifyIt.prototype.testSchemaAt = function testSchemaAt (text, schema, pos) {
|
|
|
527
472
|
**/
|
|
528
473
|
LinkifyIt.prototype.match = function match (text) {
|
|
529
474
|
const result = []
|
|
530
|
-
|
|
475
|
+
const type_schemed = []
|
|
476
|
+
const type_fuzzy_link = []
|
|
477
|
+
const type_fuzzy_email = []
|
|
478
|
+
let m, len, re
|
|
479
|
+
|
|
480
|
+
function choose (a, b) {
|
|
481
|
+
if (!a) { return b }
|
|
482
|
+
if (!b) { return a }
|
|
483
|
+
if (a.index !== b.index) { return a.index < b.index ? a : b }
|
|
484
|
+
return a.lastIndex >= b.lastIndex ? a : b
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
if (!text.length) { return null }
|
|
488
|
+
|
|
489
|
+
// scan for links with schema
|
|
490
|
+
if (this.re.schema_test.test(text)) {
|
|
491
|
+
re = this.re.schema_search
|
|
492
|
+
re.lastIndex = 0
|
|
493
|
+
while ((m = re.exec(text)) !== null) {
|
|
494
|
+
len = this.testSchemaAt(text, m[2], re.lastIndex)
|
|
495
|
+
if (len) {
|
|
496
|
+
type_schemed.push({
|
|
497
|
+
schema: m[2],
|
|
498
|
+
index: m.index + m[1].length,
|
|
499
|
+
lastIndex: m.index + m[0].length + len
|
|
500
|
+
})
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
531
504
|
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
505
|
+
if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {
|
|
506
|
+
re = this.__opts__.fuzzyIP ? this.re.link_fuzzy_global : this.re.link_no_ip_fuzzy_global
|
|
507
|
+
re.lastIndex = 0
|
|
508
|
+
while ((m = re.exec(text)) !== null) {
|
|
509
|
+
type_fuzzy_link.push({
|
|
510
|
+
schema: '',
|
|
511
|
+
index: m.index + m[1].length,
|
|
512
|
+
lastIndex: m.index + m[0].length
|
|
513
|
+
})
|
|
514
|
+
}
|
|
536
515
|
}
|
|
537
516
|
|
|
538
|
-
|
|
539
|
-
|
|
517
|
+
if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {
|
|
518
|
+
re = this.re.email_fuzzy_global
|
|
519
|
+
re.lastIndex = 0
|
|
520
|
+
while ((m = re.exec(text)) !== null) {
|
|
521
|
+
type_fuzzy_email.push({
|
|
522
|
+
schema: 'mailto:',
|
|
523
|
+
index: m.index + m[1].length,
|
|
524
|
+
lastIndex: m.index + m[0].length
|
|
525
|
+
})
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
const indexes = [0, 0, 0]
|
|
530
|
+
let lastIndex = 0
|
|
531
|
+
|
|
532
|
+
for (;;) {
|
|
533
|
+
const candidates = [
|
|
534
|
+
type_schemed[indexes[0]],
|
|
535
|
+
type_fuzzy_email[indexes[1]],
|
|
536
|
+
type_fuzzy_link[indexes[2]]
|
|
537
|
+
]
|
|
538
|
+
|
|
539
|
+
const candidate = choose(choose(candidates[0], candidates[1]), candidates[2])
|
|
540
540
|
|
|
541
|
-
|
|
542
|
-
while (this.test(tail)) {
|
|
543
|
-
result.push(createMatch(this, shift))
|
|
541
|
+
if (!candidate) { break }
|
|
544
542
|
|
|
545
|
-
|
|
546
|
-
|
|
543
|
+
if (candidate === candidates[0]) {
|
|
544
|
+
indexes[0]++
|
|
545
|
+
} else if (candidate === candidates[1]) {
|
|
546
|
+
indexes[1]++
|
|
547
|
+
} else {
|
|
548
|
+
indexes[2]++
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
if (candidate.index < lastIndex) { continue }
|
|
552
|
+
|
|
553
|
+
const match = new Match(text, candidate.schema, candidate.index, candidate.lastIndex)
|
|
554
|
+
this.__compiled__[match.schema].normalize(match, this)
|
|
555
|
+
result.push(match)
|
|
556
|
+
lastIndex = candidate.lastIndex
|
|
547
557
|
}
|
|
548
558
|
|
|
549
559
|
if (result.length) {
|
|
@@ -560,10 +570,6 @@ LinkifyIt.prototype.match = function match (text) {
|
|
|
560
570
|
* of the string, and null otherwise.
|
|
561
571
|
**/
|
|
562
572
|
LinkifyIt.prototype.matchAtStart = function matchAtStart (text) {
|
|
563
|
-
// Reset scan cache
|
|
564
|
-
this.__text_cache__ = text
|
|
565
|
-
this.__index__ = -1
|
|
566
|
-
|
|
567
573
|
if (!text.length) return null
|
|
568
574
|
|
|
569
575
|
const m = this.re.schema_at_start.exec(text)
|
|
@@ -572,11 +578,10 @@ LinkifyIt.prototype.matchAtStart = function matchAtStart (text) {
|
|
|
572
578
|
const len = this.testSchemaAt(text, m[2], m[0].length)
|
|
573
579
|
if (!len) return null
|
|
574
580
|
|
|
575
|
-
|
|
576
|
-
this.__index__ = m.index + m[1].length
|
|
577
|
-
this.__last_index__ = m.index + m[0].length + len
|
|
581
|
+
const match = new Match(text, m[2], m.index + m[1].length, m.index + m[0].length + len)
|
|
578
582
|
|
|
579
|
-
|
|
583
|
+
this.__compiled__[match.schema].normalize(match, this)
|
|
584
|
+
return match
|
|
580
585
|
}
|
|
581
586
|
|
|
582
587
|
/** chainable
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linkify-it",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Links recognition library with FULL unicode support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"linkify",
|
|
@@ -27,6 +27,16 @@
|
|
|
27
27
|
"build/"
|
|
28
28
|
],
|
|
29
29
|
"license": "MIT",
|
|
30
|
+
"funding": [
|
|
31
|
+
{
|
|
32
|
+
"type": "github",
|
|
33
|
+
"url": "https://github.com/sponsors/puzrin"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "github",
|
|
37
|
+
"url": "https://github.com/sponsors/markdown-it"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
30
40
|
"scripts": {
|
|
31
41
|
"lint": "eslint .",
|
|
32
42
|
"test": "npm run lint && npm run build && c8 --exclude build --exclude test -r text -r html -r lcov mocha",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
linkifyjs
|
|
2
|
-
===
|
|
1
|
+
# linkifyjs
|
|
3
2
|
|
|
4
3
|
[](https://www.npmjs.com/package/linkifyjs)
|
|
5
4
|
|
|
@@ -15,9 +14,11 @@ npm install linkifyjs
|
|
|
15
14
|
```
|
|
16
15
|
|
|
17
16
|
Import into your JavaScript with `require`
|
|
17
|
+
|
|
18
18
|
```js
|
|
19
19
|
const linkify = require('linkifyjs');
|
|
20
20
|
```
|
|
21
|
+
|
|
21
22
|
or with ES modules
|
|
22
23
|
|
|
23
24
|
```js
|
|
@@ -25,6 +26,7 @@ import * as linkify from 'linkifyjs';
|
|
|
25
26
|
```
|
|
26
27
|
|
|
27
28
|
Separate packages are available for each of the following features:
|
|
29
|
+
|
|
28
30
|
- [HTML strings](../linkify-html)
|
|
29
31
|
- [React component](../linkify-react)
|
|
30
32
|
- [jQuery plugin](../linkify-jquery)
|