@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
|
@@ -26,8 +26,9 @@ function hashPath(path) {
|
|
|
26
26
|
}
|
|
27
27
|
function getIcon(root, icon) {
|
|
28
28
|
var doc = (root.nodeType == 9 ? root : root.ownerDocument) || document;
|
|
29
|
-
var node = doc.createElement("
|
|
29
|
+
var node = doc.createElement("button");
|
|
30
30
|
node.className = prefix$2;
|
|
31
|
+
node.type = "button";
|
|
31
32
|
if (icon.path) {
|
|
32
33
|
var path = icon.path,
|
|
33
34
|
width = icon.width,
|
|
@@ -77,7 +78,9 @@ var MenuItem = function () {
|
|
|
77
78
|
key: "render",
|
|
78
79
|
value: function render(view) {
|
|
79
80
|
var spec = this.spec;
|
|
80
|
-
var dom = spec.render ? spec.render(view) : spec.icon ? getIcon(view.root, spec.icon) : spec.label ? crel("
|
|
81
|
+
var dom = spec.render ? spec.render(view) : spec.icon ? getIcon(view.root, spec.icon) : spec.label ? crel("button", {
|
|
82
|
+
type: "button"
|
|
83
|
+
}, translate(view, spec.label)) : null;
|
|
81
84
|
if (!dom) throw new RangeError("MenuItem without icon or label property");
|
|
82
85
|
if (spec.title) {
|
|
83
86
|
var title = typeof spec.title === "function" ? spec.title(view.state) : spec.title;
|
|
@@ -85,9 +88,15 @@ var MenuItem = function () {
|
|
|
85
88
|
}
|
|
86
89
|
if (spec["class"]) dom.classList.add(spec["class"]);
|
|
87
90
|
if (spec.css) dom.style.cssText += spec.css;
|
|
91
|
+
dom.addEventListener("click", function (e) {
|
|
92
|
+
if (!dom.classList.contains(prefix$1 + "-disabled")) {
|
|
93
|
+
var setFocus = document.activeElement == dom || document.activeElement == view.dom;
|
|
94
|
+
spec.run(view.state, view.dispatch, view, e);
|
|
95
|
+
if (setFocus && document.activeElement == dom) view.focus();
|
|
96
|
+
}
|
|
97
|
+
});
|
|
88
98
|
dom.addEventListener("mousedown", function (e) {
|
|
89
|
-
e.preventDefault();
|
|
90
|
-
if (!dom.classList.contains(prefix$1 + "-disabled")) spec.run(view.state, view.dispatch, view, e);
|
|
99
|
+
return e.preventDefault();
|
|
91
100
|
});
|
|
92
101
|
function update(state) {
|
|
93
102
|
if (spec.select) {
|
|
@@ -99,10 +108,12 @@ var MenuItem = function () {
|
|
|
99
108
|
if (spec.enable) {
|
|
100
109
|
enabled = spec.enable(state) || false;
|
|
101
110
|
setClass(dom, prefix$1 + "-disabled", !enabled);
|
|
111
|
+
dom.setAttribute("aria-disabled", (!enabled).toString());
|
|
102
112
|
}
|
|
103
113
|
if (spec.active) {
|
|
104
114
|
var active = enabled && spec.active(state) || false;
|
|
105
115
|
setClass(dom, prefix$1 + "-active", active);
|
|
116
|
+
dom.setAttribute("aria-pressed", active.toString());
|
|
106
117
|
}
|
|
107
118
|
return true;
|
|
108
119
|
}
|
|
@@ -133,6 +144,9 @@ var Dropdown = function () {
|
|
|
133
144
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
134
145
|
_classCallCheck(this, Dropdown);
|
|
135
146
|
this.options = options;
|
|
147
|
+
this.focusables = [];
|
|
148
|
+
this.focusIndex = 0;
|
|
149
|
+
this.focusTimeout = -1;
|
|
136
150
|
this.options = options || {};
|
|
137
151
|
this.content = Array.isArray(content) ? content : [content];
|
|
138
152
|
}
|
|
@@ -141,35 +155,61 @@ var Dropdown = function () {
|
|
|
141
155
|
value: function render(view) {
|
|
142
156
|
var _this = this;
|
|
143
157
|
var content = renderDropdownItems(this.content, view);
|
|
158
|
+
this.focusables = content.focusables;
|
|
144
159
|
var win = view.dom.ownerDocument.defaultView || window;
|
|
145
|
-
var
|
|
160
|
+
var btn = crel("button", {
|
|
161
|
+
type: "button",
|
|
146
162
|
"class": prefix$1 + "-dropdown " + (this.options["class"] || ""),
|
|
147
|
-
style: this.options.css
|
|
163
|
+
style: this.options.css,
|
|
164
|
+
"aria-haspopup": "menu",
|
|
165
|
+
"aria-expanded": "false"
|
|
148
166
|
}, translate(view, this.options.label || ""));
|
|
149
|
-
if (this.options.title)
|
|
167
|
+
if (this.options.title) btn.setAttribute("title", translate(view, this.options.title));
|
|
150
168
|
var wrap = crel("div", {
|
|
151
169
|
"class": prefix$1 + "-dropdown-wrap"
|
|
152
|
-
},
|
|
170
|
+
}, btn);
|
|
153
171
|
var open = null;
|
|
154
172
|
var listeningOnClose = null;
|
|
155
173
|
var close = function close() {
|
|
156
174
|
if (open && open.close()) {
|
|
157
175
|
open = null;
|
|
158
|
-
win.removeEventListener("
|
|
176
|
+
win.removeEventListener("click", listeningOnClose);
|
|
159
177
|
}
|
|
160
178
|
};
|
|
161
|
-
|
|
162
|
-
e.preventDefault();
|
|
179
|
+
btn.addEventListener("click", function (e) {
|
|
163
180
|
markMenuEvent(e);
|
|
164
181
|
if (open) {
|
|
165
182
|
close();
|
|
166
183
|
} else {
|
|
167
|
-
open = _this.expand(wrap, content.dom);
|
|
168
|
-
win.addEventListener("
|
|
184
|
+
open = _this.expand(wrap, content.dom, btn);
|
|
185
|
+
win.addEventListener("click", listeningOnClose = function listeningOnClose() {
|
|
169
186
|
if (!isMenuEvent(wrap)) close();
|
|
170
187
|
});
|
|
188
|
+
if (e.detail === 0) {
|
|
189
|
+
var focusIndex = findFocusableIndex(_this.focusables, -1, 1);
|
|
190
|
+
if (focusIndex != null) _this.setFocusIndex(focusIndex);
|
|
191
|
+
}
|
|
192
|
+
open.node.addEventListener("keydown", function (event) {
|
|
193
|
+
markMenuEvent(event);
|
|
194
|
+
if (keyboardMoveFocus(_this, event, "vertical")) ;else if (event.key === "Escape") {
|
|
195
|
+
event.preventDefault();
|
|
196
|
+
event.stopPropagation();
|
|
197
|
+
btn.focus();
|
|
198
|
+
close();
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
open.node.addEventListener("focusout", function () {
|
|
202
|
+
clearTimeout(_this.focusTimeout);
|
|
203
|
+
_this.focusTimeout = setTimeout(function () {
|
|
204
|
+
var active = win.document.activeElement;
|
|
205
|
+
if (active && open && !open.node.contains(active)) close();
|
|
206
|
+
}, 20);
|
|
207
|
+
});
|
|
171
208
|
}
|
|
172
209
|
});
|
|
210
|
+
btn.addEventListener("mousedown", function (e) {
|
|
211
|
+
return e.preventDefault();
|
|
212
|
+
});
|
|
173
213
|
function update(state) {
|
|
174
214
|
var inner = content.update(state);
|
|
175
215
|
wrap.style.display = inner ? "" : "none";
|
|
@@ -177,12 +217,13 @@ var Dropdown = function () {
|
|
|
177
217
|
}
|
|
178
218
|
return {
|
|
179
219
|
dom: wrap,
|
|
180
|
-
update: update
|
|
220
|
+
update: update,
|
|
221
|
+
focusable: btn
|
|
181
222
|
};
|
|
182
223
|
}
|
|
183
224
|
}, {
|
|
184
225
|
key: "expand",
|
|
185
|
-
value: function expand(dom, items) {
|
|
226
|
+
value: function expand(dom, items, trigger) {
|
|
186
227
|
var menuDOM = crel("div", {
|
|
187
228
|
"class": prefix$1 + "-dropdown-menu " + (this.options["class"] || "")
|
|
188
229
|
}, items);
|
|
@@ -191,32 +232,83 @@ var Dropdown = function () {
|
|
|
191
232
|
if (done) return false;
|
|
192
233
|
done = true;
|
|
193
234
|
dom.removeChild(menuDOM);
|
|
235
|
+
trigger.ariaControlsElements = [];
|
|
236
|
+
trigger.setAttribute("aria-expanded", "false");
|
|
194
237
|
return true;
|
|
195
238
|
}
|
|
196
239
|
dom.appendChild(menuDOM);
|
|
240
|
+
trigger.ariaControlsElements = [items];
|
|
241
|
+
trigger.setAttribute("aria-expanded", "true");
|
|
197
242
|
return {
|
|
198
243
|
close: close,
|
|
199
244
|
node: menuDOM
|
|
200
245
|
};
|
|
201
246
|
}
|
|
247
|
+
}, {
|
|
248
|
+
key: "setFocusIndex",
|
|
249
|
+
value: function setFocusIndex(index) {
|
|
250
|
+
if (this.focusables.length <= 1) return;
|
|
251
|
+
this.focusables[this.focusIndex].setAttribute("tabindex", "-1");
|
|
252
|
+
this.focusIndex = index;
|
|
253
|
+
var nextFocusItem = this.focusables[index];
|
|
254
|
+
nextFocusItem.setAttribute("tabindex", "0");
|
|
255
|
+
nextFocusItem.focus();
|
|
256
|
+
}
|
|
202
257
|
}]);
|
|
203
258
|
return Dropdown;
|
|
204
259
|
}();
|
|
260
|
+
function findFocusableIndex(focusables, startIndex, delta) {
|
|
261
|
+
var length = focusables.length;
|
|
262
|
+
for (var i = 0, index = startIndex + delta;; index += delta, i++) {
|
|
263
|
+
var normIndex = (index + length) % length;
|
|
264
|
+
if (focusables[normIndex].style.display != "none") return normIndex;
|
|
265
|
+
if (i == length) return null;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function keyboardMoveFocus(control, event, orientation) {
|
|
269
|
+
var focusables = control.focusables,
|
|
270
|
+
focusIndex = control.focusIndex;
|
|
271
|
+
var move = event.key == (orientation == "vertical" ? "ArrowDown" : "ArrowRight") ? findFocusableIndex(focusables, focusIndex, 1) : event.key == (orientation == "vertical" ? "ArrowUp" : "ArrowLeft") ? findFocusableIndex(focusables, focusIndex, -1) : event.key == "Home" ? findFocusableIndex(focusables, -1, 1) : event.key == "End" ? findFocusableIndex(focusables, focusables.length, -1) : null;
|
|
272
|
+
if (move == null) return false;
|
|
273
|
+
event.preventDefault();
|
|
274
|
+
event.stopPropagation();
|
|
275
|
+
control.setFocusIndex(move);
|
|
276
|
+
return true;
|
|
277
|
+
}
|
|
205
278
|
function renderDropdownItems(items, view) {
|
|
206
|
-
var
|
|
279
|
+
var elts = [],
|
|
280
|
+
focusables = [],
|
|
207
281
|
updates = [];
|
|
208
282
|
for (var i = 0; i < items.length; i++) {
|
|
209
|
-
var
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
283
|
+
var item = items[i];
|
|
284
|
+
var _item$render = item.render(view),
|
|
285
|
+
dom = _item$render.dom,
|
|
286
|
+
_update = _item$render.update,
|
|
287
|
+
focusable = _item$render.focusable;
|
|
288
|
+
elts.push(crel("li", {
|
|
289
|
+
"class": "".concat(prefix$1, "-dropdown-item"),
|
|
290
|
+
role: "menuitem",
|
|
291
|
+
"tabindex": "-1"
|
|
214
292
|
}, dom));
|
|
215
|
-
|
|
293
|
+
focusables.push(focusable || dom);
|
|
294
|
+
updates.push(_update);
|
|
295
|
+
}
|
|
296
|
+
function update(state) {
|
|
297
|
+
var something = false;
|
|
298
|
+
for (var _i = 0; _i < elts.length; _i++) {
|
|
299
|
+
var _dom = elts[_i],
|
|
300
|
+
up = updates[_i](state);
|
|
301
|
+
if (up) something = true;
|
|
302
|
+
_dom.style.display = up ? "" : "none";
|
|
303
|
+
}
|
|
304
|
+
return something;
|
|
216
305
|
}
|
|
217
306
|
return {
|
|
218
|
-
dom:
|
|
219
|
-
|
|
307
|
+
dom: crel("ul", {
|
|
308
|
+
role: "menu"
|
|
309
|
+
}, elts),
|
|
310
|
+
update: update,
|
|
311
|
+
focusables: focusables
|
|
220
312
|
};
|
|
221
313
|
}
|
|
222
314
|
function combineUpdates(updates, nodes) {
|
|
@@ -235,33 +327,67 @@ var DropdownSubmenu = function () {
|
|
|
235
327
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
236
328
|
_classCallCheck(this, DropdownSubmenu);
|
|
237
329
|
this.options = options;
|
|
330
|
+
this.focusables = [];
|
|
331
|
+
this.focusIndex = 0;
|
|
332
|
+
this.focusTimeout = -1;
|
|
238
333
|
this.content = Array.isArray(content) ? content : [content];
|
|
239
334
|
}
|
|
240
335
|
_createClass(DropdownSubmenu, [{
|
|
241
336
|
key: "render",
|
|
242
337
|
value: function render(view) {
|
|
338
|
+
var _this2 = this;
|
|
243
339
|
var items = renderDropdownItems(this.content, view);
|
|
340
|
+
this.focusables = items.focusables;
|
|
244
341
|
var win = view.dom.ownerDocument.defaultView || window;
|
|
245
|
-
var
|
|
342
|
+
var btn = crel("button", {
|
|
343
|
+
type: "button",
|
|
246
344
|
"class": prefix$1 + "-submenu-label"
|
|
247
345
|
}, translate(view, this.options.label || ""));
|
|
248
346
|
var wrap = crel("div", {
|
|
249
347
|
"class": prefix$1 + "-submenu-wrap"
|
|
250
|
-
},
|
|
348
|
+
}, btn, crel("div", {
|
|
251
349
|
"class": prefix$1 + "-submenu"
|
|
252
350
|
}, items.dom));
|
|
253
351
|
var _listeningOnClose = null;
|
|
254
|
-
|
|
352
|
+
var openSubmenu = function openSubmenu(e) {
|
|
255
353
|
e.preventDefault();
|
|
354
|
+
e.stopPropagation();
|
|
256
355
|
markMenuEvent(e);
|
|
257
|
-
setClass(wrap, prefix$1 + "-submenu-wrap-active",
|
|
258
|
-
if (!_listeningOnClose) win.addEventListener("
|
|
356
|
+
setClass(wrap, prefix$1 + "-submenu-wrap-active", true);
|
|
357
|
+
if (!_listeningOnClose) win.addEventListener("click", _listeningOnClose = function listeningOnClose() {
|
|
259
358
|
if (!isMenuEvent(wrap)) {
|
|
260
359
|
wrap.classList.remove(prefix$1 + "-submenu-wrap-active");
|
|
261
|
-
win.removeEventListener("
|
|
360
|
+
win.removeEventListener("click", _listeningOnClose);
|
|
262
361
|
_listeningOnClose = null;
|
|
263
362
|
}
|
|
264
363
|
});
|
|
364
|
+
if (!(e.type == "click" && e.detail)) {
|
|
365
|
+
var focusIndex = findFocusableIndex(_this2.focusables, -1, 1);
|
|
366
|
+
if (focusIndex != null) _this2.setFocusIndex(focusIndex);
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
btn.addEventListener("click", openSubmenu);
|
|
370
|
+
btn.addEventListener("keydown", function (e) {
|
|
371
|
+
if (e.key === "ArrowRight") openSubmenu(e);
|
|
372
|
+
});
|
|
373
|
+
btn.addEventListener("mousedown", function (e) {
|
|
374
|
+
return e.preventDefault();
|
|
375
|
+
});
|
|
376
|
+
items.dom.addEventListener("keydown", function (event) {
|
|
377
|
+
markMenuEvent(event);
|
|
378
|
+
if (keyboardMoveFocus(_this2, event, "vertical")) ;else if (event.key === "Escape" || event.key === "ArrowLeft") {
|
|
379
|
+
event.preventDefault();
|
|
380
|
+
event.stopPropagation();
|
|
381
|
+
setClass(wrap, prefix$1 + "-submenu-wrap-active", false);
|
|
382
|
+
btn.focus();
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
items.dom.addEventListener("focusout", function () {
|
|
386
|
+
clearTimeout(_this2.focusTimeout);
|
|
387
|
+
_this2.focusTimeout = setTimeout(function () {
|
|
388
|
+
var active = win.document.activeElement;
|
|
389
|
+
if (active && !items.dom.contains(active)) wrap.classList.remove(prefix$1 + "-submenu-wrap-active");
|
|
390
|
+
}, 20);
|
|
265
391
|
});
|
|
266
392
|
function update(state) {
|
|
267
393
|
var inner = items.update(state);
|
|
@@ -270,15 +396,27 @@ var DropdownSubmenu = function () {
|
|
|
270
396
|
}
|
|
271
397
|
return {
|
|
272
398
|
dom: wrap,
|
|
273
|
-
update: update
|
|
399
|
+
update: update,
|
|
400
|
+
focusable: btn
|
|
274
401
|
};
|
|
275
402
|
}
|
|
403
|
+
}, {
|
|
404
|
+
key: "setFocusIndex",
|
|
405
|
+
value: function setFocusIndex(index) {
|
|
406
|
+
if (this.focusables.length <= 1) return;
|
|
407
|
+
this.focusables[this.focusIndex].setAttribute("tabindex", "-1");
|
|
408
|
+
this.focusIndex = index;
|
|
409
|
+
var nextFocusItem = this.focusables[index];
|
|
410
|
+
nextFocusItem.setAttribute("tabindex", "0");
|
|
411
|
+
nextFocusItem.focus();
|
|
412
|
+
}
|
|
276
413
|
}]);
|
|
277
414
|
return DropdownSubmenu;
|
|
278
415
|
}();
|
|
279
416
|
function renderGrouped(view, content) {
|
|
280
417
|
var result = document.createDocumentFragment();
|
|
281
418
|
var updates = [],
|
|
419
|
+
focusables = [],
|
|
282
420
|
separators = [];
|
|
283
421
|
for (var i = 0; i < content.length; i++) {
|
|
284
422
|
var items = content[i],
|
|
@@ -287,13 +425,15 @@ function renderGrouped(view, content) {
|
|
|
287
425
|
for (var j = 0; j < items.length; j++) {
|
|
288
426
|
var _items$j$render = items[j].render(view),
|
|
289
427
|
dom = _items$j$render.dom,
|
|
290
|
-
|
|
428
|
+
_update2 = _items$j$render.update,
|
|
429
|
+
focusable = _items$j$render.focusable;
|
|
430
|
+
focusables.push(focusable || dom);
|
|
291
431
|
var span = crel("span", {
|
|
292
432
|
"class": prefix$1 + "item"
|
|
293
433
|
}, dom);
|
|
294
434
|
result.appendChild(span);
|
|
295
435
|
localNodes.push(span);
|
|
296
|
-
localUpdates.push(
|
|
436
|
+
localUpdates.push(_update2);
|
|
297
437
|
}
|
|
298
438
|
if (localUpdates.length) {
|
|
299
439
|
updates.push(combineUpdates(localUpdates, localNodes));
|
|
@@ -303,9 +443,9 @@ function renderGrouped(view, content) {
|
|
|
303
443
|
function update(state) {
|
|
304
444
|
var something = false,
|
|
305
445
|
needSep = false;
|
|
306
|
-
for (var
|
|
307
|
-
var hasContent = updates[
|
|
308
|
-
if (
|
|
446
|
+
for (var _i2 = 0; _i2 < updates.length; _i2++) {
|
|
447
|
+
var hasContent = updates[_i2](state);
|
|
448
|
+
if (_i2) separators[_i2 - 1].style.display = needSep && hasContent ? "" : "none";
|
|
309
449
|
needSep = hasContent;
|
|
310
450
|
if (hasContent) something = true;
|
|
311
451
|
}
|
|
@@ -313,12 +453,14 @@ function renderGrouped(view, content) {
|
|
|
313
453
|
}
|
|
314
454
|
return {
|
|
315
455
|
dom: result,
|
|
316
|
-
update: update
|
|
456
|
+
update: update,
|
|
457
|
+
focusables: focusables
|
|
317
458
|
};
|
|
318
459
|
}
|
|
319
460
|
function separator() {
|
|
320
461
|
return crel("span", {
|
|
321
|
-
"class": prefix$1 + "separator"
|
|
462
|
+
"class": prefix$1 + "separator",
|
|
463
|
+
role: "separator"
|
|
322
464
|
});
|
|
323
465
|
}
|
|
324
466
|
var icons = {
|
|
@@ -471,10 +613,12 @@ function menuBar(options) {
|
|
|
471
613
|
}
|
|
472
614
|
var MenuBarView = function () {
|
|
473
615
|
function MenuBarView(editorView, options) {
|
|
474
|
-
var
|
|
616
|
+
var _this3 = this;
|
|
475
617
|
_classCallCheck(this, MenuBarView);
|
|
476
618
|
this.editorView = editorView;
|
|
477
619
|
this.options = options;
|
|
620
|
+
this.focusables = [];
|
|
621
|
+
this.focusIndex = 0;
|
|
478
622
|
this.spacer = null;
|
|
479
623
|
this.maxHeight = 0;
|
|
480
624
|
this.widthForMaxHeight = 0;
|
|
@@ -485,32 +629,67 @@ var MenuBarView = function () {
|
|
|
485
629
|
"class": prefix + "-wrapper"
|
|
486
630
|
});
|
|
487
631
|
this.menu = this.wrapper.appendChild(crel("div", {
|
|
488
|
-
"class": prefix
|
|
632
|
+
"class": prefix,
|
|
633
|
+
role: "toolbar"
|
|
489
634
|
}));
|
|
490
635
|
this.menu.className = prefix;
|
|
636
|
+
this.menu.ariaControlsElements = [editorView.dom];
|
|
491
637
|
if (editorView.dom.parentNode) editorView.dom.parentNode.replaceChild(this.wrapper, editorView.dom);
|
|
492
|
-
|
|
638
|
+
if (options.position === "after") {
|
|
639
|
+
this.wrapper.insertBefore(editorView.dom, this.wrapper.firstChild);
|
|
640
|
+
} else {
|
|
641
|
+
this.wrapper.appendChild(editorView.dom);
|
|
642
|
+
}
|
|
493
643
|
var _renderGrouped = renderGrouped(this.editorView, this.options.content),
|
|
494
644
|
dom = _renderGrouped.dom,
|
|
495
|
-
update = _renderGrouped.update
|
|
645
|
+
update = _renderGrouped.update,
|
|
646
|
+
focusables = _renderGrouped.focusables;
|
|
496
647
|
this.contentUpdate = update;
|
|
648
|
+
this.focusables = focusables;
|
|
497
649
|
this.menu.appendChild(dom);
|
|
498
|
-
this.update();
|
|
499
650
|
if (options.floating && !isIOS()) {
|
|
500
651
|
this.updateFloat();
|
|
501
652
|
var potentialScrollers = getAllWrapping(this.wrapper);
|
|
502
653
|
this.scrollHandler = function (e) {
|
|
503
|
-
var root =
|
|
504
|
-
if (!(root.body || root).contains(
|
|
505
|
-
return el.removeEventListener("scroll",
|
|
506
|
-
});else
|
|
654
|
+
var root = _this3.editorView.root;
|
|
655
|
+
if (!(root.body || root).contains(_this3.wrapper)) potentialScrollers.forEach(function (el) {
|
|
656
|
+
return el.removeEventListener("scroll", _this3.scrollHandler);
|
|
657
|
+
});else _this3.updateFloat(e.target.getBoundingClientRect ? e.target : undefined);
|
|
507
658
|
};
|
|
508
659
|
potentialScrollers.forEach(function (el) {
|
|
509
|
-
return el.addEventListener('scroll',
|
|
660
|
+
return el.addEventListener('scroll', _this3.scrollHandler);
|
|
510
661
|
});
|
|
511
662
|
}
|
|
663
|
+
var _loop = function _loop(i) {
|
|
664
|
+
var focusable = focusables[i];
|
|
665
|
+
if (i) focusable.setAttribute("tabindex", "-1");
|
|
666
|
+
focusable.addEventListener("focus", function () {
|
|
667
|
+
if (_this3.focusIndex === i) return;
|
|
668
|
+
var prevFocusItem = _this3.focusables[_this3.focusIndex];
|
|
669
|
+
prevFocusItem.setAttribute("tabindex", "-1");
|
|
670
|
+
focusable.setAttribute("tabindex", "0");
|
|
671
|
+
_this3.focusIndex = i;
|
|
672
|
+
});
|
|
673
|
+
};
|
|
674
|
+
for (var i = 0; i < focusables.length; i++) {
|
|
675
|
+
_loop(i);
|
|
676
|
+
}
|
|
677
|
+
this.menu.addEventListener("keydown", function (event) {
|
|
678
|
+
keyboardMoveFocus(_this3, event, "horizontal");
|
|
679
|
+
});
|
|
680
|
+
this.update();
|
|
512
681
|
}
|
|
513
682
|
_createClass(MenuBarView, [{
|
|
683
|
+
key: "setFocusIndex",
|
|
684
|
+
value: function setFocusIndex(index) {
|
|
685
|
+
if (this.focusables.length <= 1) return;
|
|
686
|
+
this.focusables[this.focusIndex].setAttribute("tabindex", "-1");
|
|
687
|
+
this.focusIndex = index;
|
|
688
|
+
var nextFocusItem = this.focusables[index];
|
|
689
|
+
nextFocusItem.setAttribute("tabindex", "0");
|
|
690
|
+
nextFocusItem.focus();
|
|
691
|
+
}
|
|
692
|
+
}, {
|
|
514
693
|
key: "update",
|
|
515
694
|
value: function update() {
|
|
516
695
|
if (this.editorView.root != this.root) {
|
|
@@ -521,7 +700,12 @@ var MenuBarView = function () {
|
|
|
521
700
|
this.menu.replaceChild(dom, this.menu.firstChild);
|
|
522
701
|
this.root = this.editorView.root;
|
|
523
702
|
}
|
|
703
|
+
var active = this.editorView.dom.ownerDocument.activeElement == this.focusables[this.focusIndex];
|
|
524
704
|
this.contentUpdate(this.editorView.state);
|
|
705
|
+
if (active && this.focusables[this.focusIndex].style.display == "none") {
|
|
706
|
+
var next = findFocusableIndex(this.focusables, this.focusIndex, 1);
|
|
707
|
+
if (next != null) this.setFocusIndex(next);
|
|
708
|
+
}
|
|
525
709
|
if (this.floating) {
|
|
526
710
|
this.updateScrollCursor();
|
|
527
711
|
} else {
|
|
@@ -12,21 +12,24 @@ interface MenuElement {
|
|
|
12
12
|
Render the element for display in the menu. Must return a DOM
|
|
13
13
|
element and a function that can be used to update the element to
|
|
14
14
|
a new state. The `update` function must return false if the
|
|
15
|
-
update hid the entire element.
|
|
15
|
+
update hid the entire element. May also return a `focusable`
|
|
16
|
+
DOM node, which is the node that should receive focus when this
|
|
17
|
+
element is focused. If not provided, the `dom` element will be used.
|
|
16
18
|
*/
|
|
17
19
|
render(pm: EditorView): {
|
|
18
20
|
dom: HTMLElement;
|
|
19
21
|
update: (state: EditorState) => boolean;
|
|
22
|
+
focusable?: HTMLElement;
|
|
20
23
|
};
|
|
21
24
|
}
|
|
22
25
|
/**
|
|
23
26
|
An icon or label that, when clicked, executes a command.
|
|
24
27
|
*/
|
|
25
|
-
declare class MenuItem implements MenuElement {
|
|
28
|
+
declare class MenuItem<E extends HTMLElement = HTMLButtonElement> implements MenuElement {
|
|
26
29
|
/**
|
|
27
30
|
The spec used to create this item.
|
|
28
31
|
*/
|
|
29
|
-
readonly spec: MenuItemSpec
|
|
32
|
+
readonly spec: MenuItemSpec<E>;
|
|
30
33
|
/**
|
|
31
34
|
Create a menu item.
|
|
32
35
|
*/
|
|
@@ -34,14 +37,14 @@ declare class MenuItem implements MenuElement {
|
|
|
34
37
|
/**
|
|
35
38
|
The spec used to create this item.
|
|
36
39
|
*/
|
|
37
|
-
spec: MenuItemSpec);
|
|
40
|
+
spec: MenuItemSpec<E>);
|
|
38
41
|
/**
|
|
39
42
|
Renders the icon according to its [display
|
|
40
43
|
spec](https://prosemirror.net/docs/ref/#menu.MenuItemSpec.display), and adds an event handler which
|
|
41
44
|
executes the command when the representation is clicked.
|
|
42
45
|
*/
|
|
43
46
|
render(view: EditorView): {
|
|
44
|
-
dom:
|
|
47
|
+
dom: HTMLButtonElement | E;
|
|
45
48
|
update: (state: EditorState) => boolean;
|
|
46
49
|
};
|
|
47
50
|
}
|
|
@@ -68,7 +71,7 @@ type IconSpec = {
|
|
|
68
71
|
/**
|
|
69
72
|
The configuration object passed to the `MenuItem` constructor.
|
|
70
73
|
*/
|
|
71
|
-
interface MenuItemSpec {
|
|
74
|
+
interface MenuItemSpec<E extends HTMLElement = HTMLButtonElement> {
|
|
72
75
|
/**
|
|
73
76
|
The function to execute when the menu item is activated.
|
|
74
77
|
*/
|
|
@@ -94,7 +97,7 @@ interface MenuItemSpec {
|
|
|
94
97
|
A function that renders the item. You must provide either this,
|
|
95
98
|
[`icon`](https://prosemirror.net/docs/ref/#menu.MenuItemSpec.icon), or [`label`](https://prosemirror.net/docs/ref/#MenuItemSpec.label).
|
|
96
99
|
*/
|
|
97
|
-
render?: (view: EditorView) =>
|
|
100
|
+
render?: (view: EditorView) => E;
|
|
98
101
|
/**
|
|
99
102
|
Describes an icon to show for this item.
|
|
100
103
|
*/
|
|
@@ -124,6 +127,7 @@ A drop-down menu, displayed as a label with a downwards-pointing
|
|
|
124
127
|
triangle to the right of it.
|
|
125
128
|
*/
|
|
126
129
|
declare class Dropdown implements MenuElement {
|
|
130
|
+
private focusTimeout;
|
|
127
131
|
/**
|
|
128
132
|
Create a dropdown wrapping the elements.
|
|
129
133
|
*/
|
|
@@ -157,13 +161,16 @@ declare class Dropdown implements MenuElement {
|
|
|
157
161
|
render(view: EditorView): {
|
|
158
162
|
dom: HTMLElement;
|
|
159
163
|
update: (state: EditorState) => boolean;
|
|
164
|
+
focusable: HTMLElement;
|
|
160
165
|
};
|
|
166
|
+
setFocusIndex(index: number): void;
|
|
161
167
|
}
|
|
162
168
|
/**
|
|
163
169
|
Represents a submenu wrapping a group of elements that start
|
|
164
170
|
hidden and expand to the right when hovered over or tapped.
|
|
165
171
|
*/
|
|
166
172
|
declare class DropdownSubmenu implements MenuElement {
|
|
173
|
+
private focusTimeout;
|
|
167
174
|
/**
|
|
168
175
|
Creates a submenu for the given group of menu elements. The
|
|
169
176
|
following options are recognized:
|
|
@@ -184,7 +191,9 @@ declare class DropdownSubmenu implements MenuElement {
|
|
|
184
191
|
render(view: EditorView): {
|
|
185
192
|
dom: HTMLElement;
|
|
186
193
|
update: (state: EditorState) => boolean;
|
|
194
|
+
focusable: HTMLElement;
|
|
187
195
|
};
|
|
196
|
+
setFocusIndex(index: number): void;
|
|
188
197
|
}
|
|
189
198
|
/**
|
|
190
199
|
Render the given, possibly nested, array of menu elements into a
|
|
@@ -195,6 +204,7 @@ be empty).
|
|
|
195
204
|
declare function renderGrouped(view: EditorView, content: readonly (readonly MenuElement[])[]): {
|
|
196
205
|
dom: DocumentFragment;
|
|
197
206
|
update: (state: EditorState) => boolean;
|
|
207
|
+
focusables: HTMLElement[];
|
|
198
208
|
};
|
|
199
209
|
/**
|
|
200
210
|
A set of basic editor-related icons. Contains the properties
|
|
@@ -209,23 +219,23 @@ declare const icons: {
|
|
|
209
219
|
/**
|
|
210
220
|
Menu item for the `joinUp` command.
|
|
211
221
|
*/
|
|
212
|
-
declare const joinUpItem: MenuItem
|
|
222
|
+
declare const joinUpItem: MenuItem<HTMLButtonElement>;
|
|
213
223
|
/**
|
|
214
224
|
Menu item for the `lift` command.
|
|
215
225
|
*/
|
|
216
|
-
declare const liftItem: MenuItem
|
|
226
|
+
declare const liftItem: MenuItem<HTMLButtonElement>;
|
|
217
227
|
/**
|
|
218
228
|
Menu item for the `selectParentNode` command.
|
|
219
229
|
*/
|
|
220
|
-
declare const selectParentNodeItem: MenuItem
|
|
230
|
+
declare const selectParentNodeItem: MenuItem<HTMLButtonElement>;
|
|
221
231
|
/**
|
|
222
232
|
Menu item for the `undo` command.
|
|
223
233
|
*/
|
|
224
|
-
declare let undoItem: MenuItem
|
|
234
|
+
declare let undoItem: MenuItem<HTMLButtonElement>;
|
|
225
235
|
/**
|
|
226
236
|
Menu item for the `redo` command.
|
|
227
237
|
*/
|
|
228
|
-
declare let redoItem: MenuItem
|
|
238
|
+
declare let redoItem: MenuItem<HTMLButtonElement>;
|
|
229
239
|
/**
|
|
230
240
|
Build a menu item for wrapping the selection in a given node type.
|
|
231
241
|
Adds `run` and `select` properties to the ones present in
|
|
@@ -234,7 +244,7 @@ attributes for the wrapping node.
|
|
|
234
244
|
*/
|
|
235
245
|
declare function wrapItem(nodeType: NodeType, options: Partial<MenuItemSpec> & {
|
|
236
246
|
attrs?: Attrs | null;
|
|
237
|
-
}): MenuItem
|
|
247
|
+
}): MenuItem<HTMLButtonElement>;
|
|
238
248
|
/**
|
|
239
249
|
Build a menu item for changing the type of the textblock around the
|
|
240
250
|
selection to the given type. Provides `run`, `active`, and `select`
|
|
@@ -243,7 +253,7 @@ be an object to provide the attributes for the textblock node.
|
|
|
243
253
|
*/
|
|
244
254
|
declare function blockTypeItem(nodeType: NodeType, options: Partial<MenuItemSpec> & {
|
|
245
255
|
attrs?: Attrs | null;
|
|
246
|
-
}): MenuItem
|
|
256
|
+
}): MenuItem<HTMLButtonElement>;
|
|
247
257
|
|
|
248
258
|
/**
|
|
249
259
|
A plugin that will place a menu bar above the editor. Note that
|
|
@@ -256,6 +266,11 @@ declare function menuBar(options: {
|
|
|
256
266
|
*/
|
|
257
267
|
content: readonly (readonly MenuElement[])[];
|
|
258
268
|
/**
|
|
269
|
+
Determines whether the menu is placed before or after the editor in the DOM.
|
|
270
|
+
The default is "before".
|
|
271
|
+
*/
|
|
272
|
+
position?: "before" | "after";
|
|
273
|
+
/**
|
|
259
274
|
Determines whether the menu floats, i.e. whether it sticks to
|
|
260
275
|
the top of the viewport when the editor is partially scrolled
|
|
261
276
|
out of view.
|