@atlaskit/editor-common 74.20.0 → 74.21.1
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/CHANGELOG.md +13 -0
- package/collab/package.json +15 -0
- package/dist/cjs/collab/index.js +116 -0
- package/dist/cjs/i18n/cs.js +17 -0
- package/dist/cjs/i18n/da.js +17 -0
- package/dist/cjs/i18n/de.js +17 -0
- package/dist/cjs/i18n/en.js +36 -0
- package/dist/cjs/i18n/en_GB.js +36 -0
- package/dist/cjs/i18n/en_ZZ.js +36 -0
- package/dist/cjs/i18n/es.js +17 -0
- package/dist/cjs/i18n/fi.js +17 -0
- package/dist/cjs/i18n/fr.js +17 -0
- package/dist/cjs/i18n/hu.js +17 -0
- package/dist/cjs/i18n/it.js +17 -0
- package/dist/cjs/i18n/ja.js +17 -0
- package/dist/cjs/i18n/ko.js +17 -0
- package/dist/cjs/i18n/nb.js +17 -0
- package/dist/cjs/i18n/nl.js +17 -0
- package/dist/cjs/i18n/pl.js +17 -0
- package/dist/cjs/i18n/pt_BR.js +17 -0
- package/dist/cjs/i18n/ru.js +17 -0
- package/dist/cjs/i18n/sv.js +17 -0
- package/dist/cjs/i18n/th.js +17 -0
- package/dist/cjs/i18n/tr.js +17 -0
- package/dist/cjs/i18n/uk.js +17 -0
- package/dist/cjs/i18n/vi.js +17 -0
- package/dist/cjs/i18n/zh.js +17 -0
- package/dist/cjs/i18n/zh_TW.js +17 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/assets/datasource-jira-issue.js +108 -0
- package/dist/cjs/quick-insert/assets/index.js +15 -2
- package/dist/cjs/quick-insert/index.js +6 -0
- package/dist/cjs/types/datasource.js +5 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/datasource.js +4 -4
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/collab/index.js +121 -0
- package/dist/es2019/i18n/cs.js +17 -0
- package/dist/es2019/i18n/da.js +17 -0
- package/dist/es2019/i18n/de.js +17 -0
- package/dist/es2019/i18n/en.js +36 -0
- package/dist/es2019/i18n/en_GB.js +36 -0
- package/dist/es2019/i18n/en_ZZ.js +36 -0
- package/dist/es2019/i18n/es.js +17 -0
- package/dist/es2019/i18n/fi.js +17 -0
- package/dist/es2019/i18n/fr.js +17 -0
- package/dist/es2019/i18n/hu.js +17 -0
- package/dist/es2019/i18n/it.js +17 -0
- package/dist/es2019/i18n/ja.js +17 -0
- package/dist/es2019/i18n/ko.js +17 -0
- package/dist/es2019/i18n/nb.js +17 -0
- package/dist/es2019/i18n/nl.js +17 -0
- package/dist/es2019/i18n/pl.js +17 -0
- package/dist/es2019/i18n/pt_BR.js +17 -0
- package/dist/es2019/i18n/ru.js +17 -0
- package/dist/es2019/i18n/sv.js +17 -0
- package/dist/es2019/i18n/th.js +17 -0
- package/dist/es2019/i18n/tr.js +17 -0
- package/dist/es2019/i18n/uk.js +17 -0
- package/dist/es2019/i18n/vi.js +17 -0
- package/dist/es2019/i18n/zh.js +17 -0
- package/dist/es2019/i18n/zh_TW.js +17 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/assets/datasource-jira-issue.js +100 -0
- package/dist/es2019/quick-insert/assets/index.js +4 -0
- package/dist/es2019/quick-insert/index.js +1 -1
- package/dist/es2019/types/datasource.js +1 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/datasource.js +4 -4
- package/dist/es2019/version.json +1 -1
- package/dist/esm/collab/index.js +121 -0
- package/dist/esm/i18n/cs.js +17 -0
- package/dist/esm/i18n/da.js +17 -0
- package/dist/esm/i18n/de.js +17 -0
- package/dist/esm/i18n/en.js +36 -0
- package/dist/esm/i18n/en_GB.js +36 -0
- package/dist/esm/i18n/en_ZZ.js +36 -0
- package/dist/esm/i18n/es.js +17 -0
- package/dist/esm/i18n/fi.js +17 -0
- package/dist/esm/i18n/fr.js +17 -0
- package/dist/esm/i18n/hu.js +17 -0
- package/dist/esm/i18n/it.js +17 -0
- package/dist/esm/i18n/ja.js +17 -0
- package/dist/esm/i18n/ko.js +17 -0
- package/dist/esm/i18n/nb.js +17 -0
- package/dist/esm/i18n/nl.js +17 -0
- package/dist/esm/i18n/pl.js +17 -0
- package/dist/esm/i18n/pt_BR.js +17 -0
- package/dist/esm/i18n/ru.js +17 -0
- package/dist/esm/i18n/sv.js +17 -0
- package/dist/esm/i18n/th.js +17 -0
- package/dist/esm/i18n/tr.js +17 -0
- package/dist/esm/i18n/uk.js +17 -0
- package/dist/esm/i18n/vi.js +17 -0
- package/dist/esm/i18n/zh.js +17 -0
- package/dist/esm/i18n/zh_TW.js +17 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/assets/datasource-jira-issue.js +100 -0
- package/dist/esm/quick-insert/assets/index.js +10 -0
- package/dist/esm/quick-insert/index.js +1 -1
- package/dist/esm/types/datasource.js +1 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/datasource.js +4 -4
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/types/events.d.ts +1 -1
- package/dist/types/collab/index.d.ts +351 -0
- package/dist/types/i18n/cs.d.ts +17 -0
- package/dist/types/i18n/da.d.ts +17 -0
- package/dist/types/i18n/de.d.ts +17 -0
- package/dist/types/i18n/en.d.ts +36 -0
- package/dist/types/i18n/en_GB.d.ts +36 -0
- package/dist/types/i18n/en_ZZ.d.ts +36 -0
- package/dist/types/i18n/es.d.ts +17 -0
- package/dist/types/i18n/fi.d.ts +17 -0
- package/dist/types/i18n/fr.d.ts +17 -0
- package/dist/types/i18n/hu.d.ts +17 -0
- package/dist/types/i18n/it.d.ts +17 -0
- package/dist/types/i18n/ja.d.ts +17 -0
- package/dist/types/i18n/ko.d.ts +17 -0
- package/dist/types/i18n/nb.d.ts +17 -0
- package/dist/types/i18n/nl.d.ts +17 -0
- package/dist/types/i18n/pl.d.ts +17 -0
- package/dist/types/i18n/pt_BR.d.ts +17 -0
- package/dist/types/i18n/ru.d.ts +17 -0
- package/dist/types/i18n/sv.d.ts +17 -0
- package/dist/types/i18n/th.d.ts +17 -0
- package/dist/types/i18n/tr.d.ts +17 -0
- package/dist/types/i18n/uk.d.ts +17 -0
- package/dist/types/i18n/vi.d.ts +17 -0
- package/dist/types/i18n/zh.d.ts +17 -0
- package/dist/types/i18n/zh_TW.d.ts +17 -0
- package/dist/types/provider-factory/quick-insert-provider.d.ts +1 -1
- package/dist/types/provider-factory/types.d.ts +1 -1
- package/dist/types/quick-insert/assets/datasource-jira-issue.d.ts +2 -0
- package/dist/types/quick-insert/assets/index.d.ts +1 -0
- package/dist/types/quick-insert/index.d.ts +1 -1
- package/dist/types/types/datasource.d.ts +1 -0
- package/dist/types/types/editor-actions.d.ts +1 -1
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/utils/datasource.d.ts +1 -2
- package/dist/types-ts4.5/analytics/types/events.d.ts +1 -1
- package/dist/types-ts4.5/collab/index.d.ts +351 -0
- package/dist/types-ts4.5/i18n/cs.d.ts +17 -0
- package/dist/types-ts4.5/i18n/da.d.ts +17 -0
- package/dist/types-ts4.5/i18n/de.d.ts +17 -0
- package/dist/types-ts4.5/i18n/en.d.ts +36 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +36 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +36 -0
- package/dist/types-ts4.5/i18n/es.d.ts +17 -0
- package/dist/types-ts4.5/i18n/fi.d.ts +17 -0
- package/dist/types-ts4.5/i18n/fr.d.ts +17 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +17 -0
- package/dist/types-ts4.5/i18n/it.d.ts +17 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +17 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +17 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +17 -0
- package/dist/types-ts4.5/i18n/nl.d.ts +17 -0
- package/dist/types-ts4.5/i18n/pl.d.ts +17 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +17 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +17 -0
- package/dist/types-ts4.5/i18n/sv.d.ts +17 -0
- package/dist/types-ts4.5/i18n/th.d.ts +17 -0
- package/dist/types-ts4.5/i18n/tr.d.ts +17 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +17 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +17 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +17 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +17 -0
- package/dist/types-ts4.5/provider-factory/quick-insert-provider.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/types.d.ts +1 -1
- package/dist/types-ts4.5/quick-insert/assets/datasource-jira-issue.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/index.d.ts +1 -0
- package/dist/types-ts4.5/quick-insert/index.d.ts +1 -1
- package/dist/types-ts4.5/types/datasource.d.ts +1 -0
- package/dist/types-ts4.5/types/editor-actions.d.ts +1 -1
- package/dist/types-ts4.5/types/index.d.ts +1 -0
- package/dist/types-ts4.5/utils/datasource.d.ts +1 -2
- package/package.json +3 -3
- package/tmp/api-report-tmp.d.ts +9 -0
package/dist/esm/i18n/zh.js
CHANGED
|
@@ -13,9 +13,13 @@ export default {
|
|
|
13
13
|
'fabric.editor.alignImageCenter': '居中',
|
|
14
14
|
'fabric.editor.alignImageLeft': '左对齐',
|
|
15
15
|
'fabric.editor.alignImageRight': '右对齐',
|
|
16
|
+
'fabric.editor.blockCardUnavailable': '内联链接位于 {node} 内部,无法更改其视图',
|
|
17
|
+
'fabric.editor.blockDescription': '显示有关链接的更多信息,包括摘要和操作',
|
|
18
|
+
'fabric.editor.blockTitle': '卡片',
|
|
16
19
|
'fabric.editor.blockquote': '引用',
|
|
17
20
|
'fabric.editor.cancelButton': '取消',
|
|
18
21
|
'fabric.editor.captionPlaceholder': '添加标题',
|
|
22
|
+
'fabric.editor.cardFloatingControls': '卡片选项',
|
|
19
23
|
'fabric.editor.codeBidiWarningLabel': '双向字符会更改文本的呈现顺序。这可能被用于掩盖恶意代码。',
|
|
20
24
|
'fabric.editor.codeBlockCopyButton.copiedToClipboard': '已复制!',
|
|
21
25
|
'fabric.editor.codeBlockCopyButton.copyToClipboard': '复制为文本',
|
|
@@ -30,8 +34,16 @@ export default {
|
|
|
30
34
|
'fabric.editor.date.description': '使用日历添加日期',
|
|
31
35
|
'fabric.editor.decision': '决定',
|
|
32
36
|
'fabric.editor.decision.description': '捕获决策,以便轻松跟踪',
|
|
37
|
+
'fabric.editor.displayBlock': '显示卡片',
|
|
38
|
+
'fabric.editor.displayEmbed': '显示嵌入',
|
|
39
|
+
'fabric.editor.displayInline': '显示内联',
|
|
40
|
+
'fabric.editor.displayLink': '显示为文本',
|
|
41
|
+
'fabric.editor.displayOptionUnavailableInParentNode': '无法在 {node} 内使用此显示选项',
|
|
42
|
+
'fabric.editor.ecombedDescription': '显示链接的交互式预览',
|
|
43
|
+
'fabric.editor.edit.datasource': '编辑搜索查询',
|
|
33
44
|
'fabric.editor.editLink': '编辑链接',
|
|
34
45
|
'fabric.editor.editMode.inviteToEditButton.title': '邀请编辑',
|
|
46
|
+
'fabric.editor.embedTitle': '嵌入',
|
|
35
47
|
'fabric.editor.emoji': '表情符号',
|
|
36
48
|
'fabric.editor.emoji.description': '使用表情符号传达理念 🎉 和情绪 😄',
|
|
37
49
|
'fabric.editor.emptyLink': '请输入链接。',
|
|
@@ -48,6 +60,8 @@ export default {
|
|
|
48
60
|
'fabric.editor.horizontalRule.description': '使用水平线分隔内容',
|
|
49
61
|
'fabric.editor.hyperlinkToolbarPlaceholder': '粘贴或搜索链接',
|
|
50
62
|
'fabric.editor.image': '图片',
|
|
63
|
+
'fabric.editor.inlineDescription': '以内联文本显示链接',
|
|
64
|
+
'fabric.editor.inlineTitle': '内联',
|
|
51
65
|
'fabric.editor.insertMenu': '插入',
|
|
52
66
|
'fabric.editor.invalidLink': '请输入有效链接。',
|
|
53
67
|
'fabric.editor.layoutFixedWidth': '返回至中心',
|
|
@@ -87,6 +101,9 @@ export default {
|
|
|
87
101
|
'fabric.editor.unsupportedBlockContent': '此编辑器不支持显示此内容',
|
|
88
102
|
'fabric.editor.unsupportedContentTooltip': '此编辑器中的内容不可用,在编辑和保存时将保留此内容',
|
|
89
103
|
'fabric.editor.unsupportedInlineContent': '内容不受支持',
|
|
104
|
+
'fabric.editor.url': '显示 URL',
|
|
105
|
+
'fabric.editor.urlDescription': '以 URL 显示链接',
|
|
106
|
+
'fabric.editor.urlTitle': 'URL',
|
|
90
107
|
'fabric.editor.viewMore': '查看更多',
|
|
91
108
|
'fabric.editor.visit': '在新窗口中打开链接',
|
|
92
109
|
'fabric.editor.wrapLeft': '隐藏左边',
|
package/dist/esm/i18n/zh_TW.js
CHANGED
|
@@ -13,9 +13,13 @@ export default {
|
|
|
13
13
|
'fabric.editor.alignImageCenter': '置中對齊',
|
|
14
14
|
'fabric.editor.alignImageLeft': '靠左對齊',
|
|
15
15
|
'fabric.editor.alignImageRight': '靠右對齊',
|
|
16
|
+
'fabric.editor.blockCardUnavailable': '內嵌連結位於 {node} 內,無法變更其檢視',
|
|
17
|
+
'fabric.editor.blockDescription': '顯示有關連結的更多資訊,包括摘要和動作',
|
|
18
|
+
'fabric.editor.blockTitle': '卡片',
|
|
16
19
|
'fabric.editor.blockquote': '引述',
|
|
17
20
|
'fabric.editor.cancelButton': '取消',
|
|
18
21
|
'fabric.editor.captionPlaceholder': '新增標題',
|
|
22
|
+
'fabric.editor.cardFloatingControls': '卡片選項',
|
|
19
23
|
'fabric.editor.codeBidiWarningLabel': '雙向字元會變更文字呈現的順序。這可用來將惡意程式碼模糊化。',
|
|
20
24
|
'fabric.editor.codeBlockCopyButton.copiedToClipboard': '已複製!',
|
|
21
25
|
'fabric.editor.codeBlockCopyButton.copyToClipboard': '複製文字',
|
|
@@ -30,8 +34,16 @@ export default {
|
|
|
30
34
|
'fabric.editor.date.description': '使用日曆新增日期',
|
|
31
35
|
'fabric.editor.decision': '決定',
|
|
32
36
|
'fabric.editor.decision.description': '擷取決定以便追蹤',
|
|
37
|
+
'fabric.editor.displayBlock': '顯示卡片',
|
|
38
|
+
'fabric.editor.displayEmbed': '顯示嵌入',
|
|
39
|
+
'fabric.editor.displayInline': '顯示內嵌',
|
|
40
|
+
'fabric.editor.displayLink': '以文字顯示',
|
|
41
|
+
'fabric.editor.displayOptionUnavailableInParentNode': '{node} 內無法使用此顯示選項',
|
|
42
|
+
'fabric.editor.ecombedDescription': '顯示連結的互動式預覽',
|
|
43
|
+
'fabric.editor.edit.datasource': '編輯搜尋查詢',
|
|
33
44
|
'fabric.editor.editLink': '編輯連結',
|
|
34
45
|
'fabric.editor.editMode.inviteToEditButton.title': '邀請編輯',
|
|
46
|
+
'fabric.editor.embedTitle': '嵌入',
|
|
35
47
|
'fabric.editor.emoji': '表情符號',
|
|
36
48
|
'fabric.editor.emoji.description': '使用表情符號來傳達想法 🎉 和情緒 😄',
|
|
37
49
|
'fabric.editor.emptyLink': '請輸入連結。',
|
|
@@ -48,6 +60,8 @@ export default {
|
|
|
48
60
|
'fabric.editor.horizontalRule.description': '使用水平線來區隔內容',
|
|
49
61
|
'fabric.editor.hyperlinkToolbarPlaceholder': '貼上或搜尋連結',
|
|
50
62
|
'fabric.editor.image': '影像',
|
|
63
|
+
'fabric.editor.inlineDescription': '將連結顯示為內嵌文字',
|
|
64
|
+
'fabric.editor.inlineTitle': '內嵌',
|
|
51
65
|
'fabric.editor.insertMenu': '插入',
|
|
52
66
|
'fabric.editor.invalidLink': '請輸入有效的連結。',
|
|
53
67
|
'fabric.editor.layoutFixedWidth': '返回中央',
|
|
@@ -87,6 +101,9 @@ export default {
|
|
|
87
101
|
'fabric.editor.unsupportedBlockContent': '此編輯器不支援顯示此內容',
|
|
88
102
|
'fabric.editor.unsupportedContentTooltip': '內容不適用於此編輯器,這會在您編輯和儲存時進行保留',
|
|
89
103
|
'fabric.editor.unsupportedInlineContent': '不支援的內容',
|
|
104
|
+
'fabric.editor.url': '顯示 URL',
|
|
105
|
+
'fabric.editor.urlDescription': '將連結顯示為 URL',
|
|
106
|
+
'fabric.editor.urlTitle': 'URL',
|
|
90
107
|
'fabric.editor.viewMore': '檢視更多',
|
|
91
108
|
'fabric.editor.visit': '在新視窗中開啟連結',
|
|
92
109
|
'fabric.editor.wrapLeft': '靠左圍繞',
|
|
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "74.
|
|
9
|
+
var packageVersion = "74.21.1";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4138
|
|
2
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export default function IconDatasourceJiraIssue() {
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
6
|
+
width: "40",
|
|
7
|
+
height: "40",
|
|
8
|
+
viewBox: "0 0 40 40",
|
|
9
|
+
fill: "none",
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
12
|
+
clipPath: "url(#clip0_503_53432)"
|
|
13
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
14
|
+
width: "40",
|
|
15
|
+
height: "40",
|
|
16
|
+
rx: "3",
|
|
17
|
+
fill: "white"
|
|
18
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
fillRule: "evenodd",
|
|
20
|
+
clipRule: "evenodd",
|
|
21
|
+
d: "M18 12H44V22H18V12Z",
|
|
22
|
+
fill: "white",
|
|
23
|
+
stroke: "#C1C7D0"
|
|
24
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
25
|
+
fillRule: "evenodd",
|
|
26
|
+
clipRule: "evenodd",
|
|
27
|
+
d: "M18 8H43C43.5523 8 44 8.44772 44 9V12H18V8Z",
|
|
28
|
+
fill: "#DFE1E6",
|
|
29
|
+
stroke: "#C1C7D0"
|
|
30
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
31
|
+
fillRule: "evenodd",
|
|
32
|
+
clipRule: "evenodd",
|
|
33
|
+
d: "M18 22H44V31C44 31.5523 43.5523 32 43 32H18V22Z",
|
|
34
|
+
fill: "white",
|
|
35
|
+
stroke: "#C1C7D0"
|
|
36
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
37
|
+
fillRule: "evenodd",
|
|
38
|
+
clipRule: "evenodd",
|
|
39
|
+
d: "M7 12H19V22H7V12Z",
|
|
40
|
+
fill: "white",
|
|
41
|
+
stroke: "#C1C7D0"
|
|
42
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
43
|
+
fillRule: "evenodd",
|
|
44
|
+
clipRule: "evenodd",
|
|
45
|
+
d: "M7 9C7 8.44772 7.44772 8 8 8H19V12H7V9Z",
|
|
46
|
+
fill: "#DFE1E6",
|
|
47
|
+
stroke: "#C1C7D0"
|
|
48
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
49
|
+
fillRule: "evenodd",
|
|
50
|
+
clipRule: "evenodd",
|
|
51
|
+
d: "M7 22H19V32H8C7.44772 32 7 31.5523 7 31V22Z",
|
|
52
|
+
fill: "white",
|
|
53
|
+
stroke: "#C1C7D0"
|
|
54
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
55
|
+
x: "10",
|
|
56
|
+
y: "14",
|
|
57
|
+
width: "6",
|
|
58
|
+
height: "6",
|
|
59
|
+
rx: "1",
|
|
60
|
+
fill: "#FF5230"
|
|
61
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
62
|
+
fillRule: "evenodd",
|
|
63
|
+
clipRule: "evenodd",
|
|
64
|
+
d: "M13 18C13.5523 18 14 17.5523 14 17C14 16.4477 13.5523 16 13 16C12.4477 16 12 16.4477 12 17C12 17.5523 12.4477 18 13 18Z",
|
|
65
|
+
fill: "white"
|
|
66
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
67
|
+
x: "10",
|
|
68
|
+
y: "24",
|
|
69
|
+
width: "6",
|
|
70
|
+
height: "6",
|
|
71
|
+
rx: "1",
|
|
72
|
+
fill: "#36B37E"
|
|
73
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
74
|
+
fillRule: "evenodd",
|
|
75
|
+
clipRule: "evenodd",
|
|
76
|
+
d: "M12.2 25.7002C12.0895 25.7002 12 25.7897 12 25.9002V28.2174C12 28.3955 12.2154 28.4848 12.3414 28.3588L13 27.7002L13.6586 28.3588C13.7846 28.4848 14 28.3955 14 28.2174V25.9002C14 25.7897 13.9105 25.7002 13.8 25.7002H12.2Z",
|
|
77
|
+
fill: "white"
|
|
78
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
79
|
+
x: "22",
|
|
80
|
+
y: "16",
|
|
81
|
+
width: "19",
|
|
82
|
+
height: "2",
|
|
83
|
+
rx: "1",
|
|
84
|
+
fill: "#C1C7D0"
|
|
85
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
86
|
+
x: "22",
|
|
87
|
+
y: "26",
|
|
88
|
+
width: "19",
|
|
89
|
+
height: "2",
|
|
90
|
+
rx: "1",
|
|
91
|
+
fill: "#C1C7D0"
|
|
92
|
+
})), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
93
|
+
id: "clip0_503_53432"
|
|
94
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
95
|
+
width: "40",
|
|
96
|
+
height: "40",
|
|
97
|
+
rx: "3",
|
|
98
|
+
fill: "white"
|
|
99
|
+
}))));
|
|
100
|
+
}
|
|
@@ -245,4 +245,14 @@ export var IconExpand = Loadable({
|
|
|
245
245
|
loading: function loading() {
|
|
246
246
|
return null;
|
|
247
247
|
}
|
|
248
|
+
});
|
|
249
|
+
export var IconDatasourceJiraIssue = Loadable({
|
|
250
|
+
loader: function loader() {
|
|
251
|
+
return import( /* webpackChunkName: "@atlaskit-internal_editor-icon-datasource-jira-issue" */'./datasource-jira-issue').then(function (module) {
|
|
252
|
+
return module.default;
|
|
253
|
+
});
|
|
254
|
+
},
|
|
255
|
+
loading: function loading() {
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
248
258
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { IconAction, IconCode, IconDate, IconDecision, IconDivider, IconEmoji, IconImages, IconLayout, IconLink, IconListNumber, IconList, IconMention, IconPanelError, IconPanelNote, IconPanelSuccess, IconPanelWarning, IconPanel, IconQuote, IconStatus, IconHeading, IconFeedback, IconExpand, IconCustomPanel, IconFallback } from './assets';
|
|
1
|
+
export { IconAction, IconCode, IconDate, IconDecision, IconDivider, IconEmoji, IconImages, IconLayout, IconLink, IconListNumber, IconList, IconMention, IconPanelError, IconPanelNote, IconPanelSuccess, IconPanelWarning, IconPanel, IconQuote, IconStatus, IconHeading, IconFeedback, IconExpand, IconCustomPanel, IconFallback, IconDatasourceJiraIssue } from './assets';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -18,7 +18,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
18
18
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
19
19
|
import Layer from '../Layer';
|
|
20
20
|
var packageName = "@atlaskit/editor-common";
|
|
21
|
-
var packageVersion = "74.
|
|
21
|
+
var packageVersion = "74.21.1";
|
|
22
22
|
var halfFocusRing = 1;
|
|
23
23
|
var dropOffset = '0, 8';
|
|
24
24
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { JIRA_LIST_OF_LINKS_DATASOURCE_ID } from '@atlaskit/link-datasource';
|
|
2
2
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
var getDatasourceType = function getDatasourceType(
|
|
4
|
-
switch (
|
|
3
|
+
var getDatasourceType = function getDatasourceType(datasourceId) {
|
|
4
|
+
switch (datasourceId) {
|
|
5
5
|
case JIRA_LIST_OF_LINKS_DATASOURCE_ID:
|
|
6
6
|
return 'jira';
|
|
7
7
|
default:
|
|
8
8
|
return undefined;
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
|
-
export var canRenderDatasource = function canRenderDatasource(
|
|
11
|
+
export var canRenderDatasource = function canRenderDatasource(datasourceId) {
|
|
12
12
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
13
|
-
var datasourceType = getDatasourceType(
|
|
13
|
+
var datasourceType = getDatasourceType(datasourceId);
|
|
14
14
|
switch (datasourceType) {
|
|
15
15
|
case 'jira':
|
|
16
16
|
if (getBooleanFF('platform.linking-platform.datasource-jira_issues')) {
|
package/dist/esm/version.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { EditorState, PluginKey } from 'prosemirror-state';
|
|
3
3
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import type { NewCollabSyncUpErrorAttributes } from '
|
|
4
|
+
import type { NewCollabSyncUpErrorAttributes } from '../../collab';
|
|
5
5
|
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload, UserBrowserExtensionResults } from '../../utils';
|
|
6
6
|
import type { AvatarEventPayload } from './avatar';
|
|
7
7
|
import type { ConfigPanelEventPayload } from './config-panel-events';
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import type { EditorState, Transaction } from 'prosemirror-state';
|
|
2
|
+
import type { Step } from 'prosemirror-transform';
|
|
3
|
+
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
4
|
+
export type NewCollabSyncUpErrorAttributes = {
|
|
5
|
+
lengthOfUnconfirmedSteps?: number;
|
|
6
|
+
tries: number;
|
|
7
|
+
maxRetries: number;
|
|
8
|
+
clientId?: number | string;
|
|
9
|
+
version: number;
|
|
10
|
+
};
|
|
11
|
+
export type ResolvedEditorState<T = any> = {
|
|
12
|
+
content: JSONDocNode | T;
|
|
13
|
+
title: string | null;
|
|
14
|
+
stepVersion: number;
|
|
15
|
+
};
|
|
16
|
+
export declare enum PROVIDER_ERROR_CODE {
|
|
17
|
+
NO_PERMISSION_ERROR = "NO_PERMISSION_ERROR",
|
|
18
|
+
INVALID_USER_TOKEN = "INVALID_USER_TOKEN",
|
|
19
|
+
DOCUMENT_NOT_FOUND = "DOCUMENT_NOT_FOUND",
|
|
20
|
+
LOCKED = "LOCKED",
|
|
21
|
+
FAIL_TO_SAVE = "FAIL_TO_SAVE",
|
|
22
|
+
DOCUMENT_RESTORE_ERROR = "DOCUMENT_RESTORE_ERROR",
|
|
23
|
+
INITIALISATION_ERROR = "INITIALISATION_ERROR",
|
|
24
|
+
NETWORK_ISSUE = "NETWORK_ISSUE",
|
|
25
|
+
INVALID_PROVIDER_CONFIGURATION = "INVALID_PROVIDER_CONFIGURATION",
|
|
26
|
+
INTERNAL_SERVICE_ERROR = "INTERNAL_SERVICE_ERROR",
|
|
27
|
+
DOCUMENT_UPDATE_ERROR = "DOCUMENT_UPDATE_ERROR"
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* This occurs when the provided user token is considered invalid for the given document ARI.
|
|
31
|
+
* It happens during initialisation of the provider.
|
|
32
|
+
* It could mean the document has been deleted (hence not found).
|
|
33
|
+
* @message Message returned to editor, i.e User does not have permissions to access this document or document is not found
|
|
34
|
+
* @recoverable It is recoverable, as we will try to refresh the token.
|
|
35
|
+
*/
|
|
36
|
+
type InsufficientEditingPermission = {
|
|
37
|
+
code: PROVIDER_ERROR_CODE.NO_PERMISSION_ERROR;
|
|
38
|
+
message: string;
|
|
39
|
+
recoverable: boolean;
|
|
40
|
+
reason?: string;
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
43
|
+
*/
|
|
44
|
+
status?: number;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Similar to InsufficientEditingPermission, but the user token is invalid because it has expired or been revoked.
|
|
48
|
+
* It may also be an invalid token format.
|
|
49
|
+
* This error is given to the provider by NCS.
|
|
50
|
+
* @message Message returned to editor, i.e. The user token was invalid
|
|
51
|
+
* @recoverable It is recoverable, as we will try to refresh the token.
|
|
52
|
+
*/
|
|
53
|
+
type InvalidUserToken = {
|
|
54
|
+
code: PROVIDER_ERROR_CODE.INVALID_USER_TOKEN;
|
|
55
|
+
message: string;
|
|
56
|
+
recoverable: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
59
|
+
*/
|
|
60
|
+
status?: number;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Document not found error, thrown when the provider is unable to find a document with the given ARI and user token.
|
|
64
|
+
* It occurs during fetchCatchup, a function that fetches the latest document state during catchup.
|
|
65
|
+
* We need to recieve a 404 from the document service to throw this error.
|
|
66
|
+
* @message Message returned to editor, i.e. The requested document is not found
|
|
67
|
+
* @recoverable It is recoverable, as the provider can try again later.
|
|
68
|
+
*/
|
|
69
|
+
type DocumentNotFound = {
|
|
70
|
+
code: PROVIDER_ERROR_CODE.DOCUMENT_NOT_FOUND;
|
|
71
|
+
message: string;
|
|
72
|
+
recoverable: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
75
|
+
*/
|
|
76
|
+
status?: number;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* This error is thrown when the document is locked by another user.
|
|
80
|
+
* The error is passed to us by NCS.
|
|
81
|
+
* @message Message returned to editor, i.e. The document is currently not available, please try again later
|
|
82
|
+
* @recoverable It is recoverable, as the provider can try again later.
|
|
83
|
+
*/
|
|
84
|
+
type Locked = {
|
|
85
|
+
code: PROVIDER_ERROR_CODE.LOCKED;
|
|
86
|
+
message: string;
|
|
87
|
+
recoverable: boolean;
|
|
88
|
+
status?: number;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* This error is thrown when the provider is unable to save the document.
|
|
92
|
+
* This can happen when the connection to dynamoDB is lost, or when we do not have sufficient permissions (DYNAMO ERROR).
|
|
93
|
+
* This error is given to us by NCS.
|
|
94
|
+
* @message Message returned to editor, i.e. Collab service is not able to save changes
|
|
95
|
+
* @recoverable It is not recoverable, as we don't want the user to continue editing a document that is not being saved.
|
|
96
|
+
*/
|
|
97
|
+
type FailToSave = {
|
|
98
|
+
code: PROVIDER_ERROR_CODE.FAIL_TO_SAVE;
|
|
99
|
+
message: string;
|
|
100
|
+
recoverable: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
103
|
+
*/
|
|
104
|
+
status?: number;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* This error is thrown when the provider is unable to restore the document.
|
|
108
|
+
* It occurs during onRestore, a function that restores the document to a previous version and reapplies unconfirmed steps.
|
|
109
|
+
* onRestore is called when page recovery has emitted an 'init' event on a page client is currently connected to.
|
|
110
|
+
* It could mean we failed to update the page metadata, or we failed to reapply unconfirmed steps.
|
|
111
|
+
* @message Message returned to editor, i.e. Collab service unable to restore document
|
|
112
|
+
* @recoverable It is not recoverable, as the provider has no further options after this.
|
|
113
|
+
* The user will need to refresh the page to try again.
|
|
114
|
+
*/
|
|
115
|
+
type DocumentNotRestore = {
|
|
116
|
+
code: PROVIDER_ERROR_CODE.DOCUMENT_RESTORE_ERROR;
|
|
117
|
+
message: string;
|
|
118
|
+
recoverable: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
121
|
+
*/
|
|
122
|
+
status?: number;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* The initial document couldn't be loaded from the collab service.
|
|
126
|
+
* This error is given to us by NCS.
|
|
127
|
+
* It could indicate either a network issue, or an internal service error in NCS.
|
|
128
|
+
* @message Message returned to editor, i.e. The initial document couldn't be loaded from the collab service
|
|
129
|
+
* @recoverable It is not recoverable, as the provider cannot do anything to fix it.
|
|
130
|
+
* The user will need to refresh the page to try again.
|
|
131
|
+
*/
|
|
132
|
+
type InitialisationError = {
|
|
133
|
+
code: PROVIDER_ERROR_CODE.INITIALISATION_ERROR;
|
|
134
|
+
message: string;
|
|
135
|
+
recoverable: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
138
|
+
*/
|
|
139
|
+
status?: number;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Couldn't reconnect to the collab service (NCS) due to network issues.
|
|
143
|
+
* NCS could be down, or the user could be offline. It's also possible the url is incorrect, or the user is behind a proxy blocking the connection.
|
|
144
|
+
* Fired upon a reconnection attempt error (from Socket.IO Manager)
|
|
145
|
+
* @message Message returned to editor, i.e. Couldn't reconnect to the collab service due to network issues
|
|
146
|
+
* @recoverable It is recoverable, as the provider will try to reconnect.
|
|
147
|
+
*/
|
|
148
|
+
type NetworkIssue = {
|
|
149
|
+
code: PROVIDER_ERROR_CODE.NETWORK_ISSUE;
|
|
150
|
+
message: string;
|
|
151
|
+
recoverable: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
154
|
+
*/
|
|
155
|
+
status?: number;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* This error is thrown when the provider has an invalid configuration.
|
|
159
|
+
* It could happen due to these errors from NCS:
|
|
160
|
+
* NAMESPACE_INVALID
|
|
161
|
+
INVALID_ACTIVATION_ID
|
|
162
|
+
INVALID_DOCUMENT_ARI
|
|
163
|
+
INVALID_CLOUD_ID
|
|
164
|
+
* @message Message returned to editor, i.e. Invalid provider configuration
|
|
165
|
+
* @recoverable It is not recoverable, as the provider cannot do anything to fix it.
|
|
166
|
+
* The service using the provider will need to fix the configuration.
|
|
167
|
+
*/
|
|
168
|
+
type InvalidProviderConfiguration = {
|
|
169
|
+
code: PROVIDER_ERROR_CODE.INVALID_PROVIDER_CONFIGURATION;
|
|
170
|
+
message: string;
|
|
171
|
+
recoverable: boolean;
|
|
172
|
+
reason: string;
|
|
173
|
+
/**
|
|
174
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
175
|
+
*/
|
|
176
|
+
status?: number;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* This error is thrown when the provider encounters an internal service error, not otherwise accounted for.
|
|
180
|
+
* @message Message returned to editor, i.e. Collab Provider experienced an unrecoverable error
|
|
181
|
+
* @recoverable It is not recoverable, as the provider cannot do anything to fix it.
|
|
182
|
+
*/
|
|
183
|
+
type InternalServiceError = {
|
|
184
|
+
code: PROVIDER_ERROR_CODE.INTERNAL_SERVICE_ERROR;
|
|
185
|
+
message: string;
|
|
186
|
+
recoverable: boolean;
|
|
187
|
+
reason: string;
|
|
188
|
+
/**
|
|
189
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
190
|
+
*/
|
|
191
|
+
status?: number;
|
|
192
|
+
};
|
|
193
|
+
type ProviderDocumentUpdateError = {
|
|
194
|
+
code: PROVIDER_ERROR_CODE.DOCUMENT_UPDATE_ERROR;
|
|
195
|
+
message: 'The provider failed to apply changes to the editor';
|
|
196
|
+
recoverable: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
199
|
+
*/
|
|
200
|
+
status?: number;
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* A union of all possible provider errors that can be emitted back to the editor.
|
|
204
|
+
*/
|
|
205
|
+
export type ProviderError = InsufficientEditingPermission | InvalidUserToken | DocumentNotFound | Locked | FailToSave | DocumentNotRestore | InitialisationError | NetworkIssue | InvalidProviderConfiguration | InternalServiceError | ProviderDocumentUpdateError;
|
|
206
|
+
export interface Metadata {
|
|
207
|
+
[key: string]: string | number | boolean;
|
|
208
|
+
}
|
|
209
|
+
export type CollabMetadataPayload = Metadata;
|
|
210
|
+
export interface CollabEventInitData {
|
|
211
|
+
doc?: any;
|
|
212
|
+
json?: any;
|
|
213
|
+
version?: number;
|
|
214
|
+
sid?: string;
|
|
215
|
+
reserveCursor?: boolean;
|
|
216
|
+
}
|
|
217
|
+
export interface CollabInitPayload extends CollabEventInitData {
|
|
218
|
+
doc: any;
|
|
219
|
+
version: number;
|
|
220
|
+
metadata?: Metadata;
|
|
221
|
+
reserveCursor?: boolean;
|
|
222
|
+
}
|
|
223
|
+
export interface CollabEventConnectionData {
|
|
224
|
+
sid: string;
|
|
225
|
+
initial: boolean;
|
|
226
|
+
}
|
|
227
|
+
export type CollabConnectedPayload = CollabEventConnectionData;
|
|
228
|
+
export declare enum DisconnectReason {
|
|
229
|
+
CLIENT_DISCONNECT = "CLIENT_DISCONNECT",
|
|
230
|
+
SERVER_DISCONNECT = "SERVER_DISCONNECT",
|
|
231
|
+
SOCKET_CLOSED = "SOCKET_CLOSED",
|
|
232
|
+
SOCKET_ERROR = "SOCKET_ERROR",
|
|
233
|
+
SOCKET_TIMEOUT = "SOCKET_TIMEOUT",
|
|
234
|
+
UNKNOWN_DISCONNECT = "UNKNOWN_DISCONNECT"
|
|
235
|
+
}
|
|
236
|
+
export interface CollabDisconnectedPayload {
|
|
237
|
+
reason: DisconnectReason;
|
|
238
|
+
sid: string;
|
|
239
|
+
}
|
|
240
|
+
export interface CollabEventRemoteData {
|
|
241
|
+
json?: any;
|
|
242
|
+
newState?: EditorState;
|
|
243
|
+
userIds?: (number | string)[];
|
|
244
|
+
}
|
|
245
|
+
type MarkJson = {
|
|
246
|
+
type: string;
|
|
247
|
+
attrs: {
|
|
248
|
+
[key: string]: any;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
type NodeJson = {
|
|
252
|
+
type: string;
|
|
253
|
+
attrs: {
|
|
254
|
+
[key: string]: any;
|
|
255
|
+
};
|
|
256
|
+
content: NodeJson[];
|
|
257
|
+
marks: MarkJson[];
|
|
258
|
+
text?: string;
|
|
259
|
+
};
|
|
260
|
+
type SliceJson = {
|
|
261
|
+
content: NodeJson[];
|
|
262
|
+
openStart: number;
|
|
263
|
+
openEnd: number;
|
|
264
|
+
};
|
|
265
|
+
export type StepJson = {
|
|
266
|
+
stepType?: string;
|
|
267
|
+
from?: number;
|
|
268
|
+
to?: number;
|
|
269
|
+
slice?: SliceJson;
|
|
270
|
+
clientId: number | string;
|
|
271
|
+
userId: string;
|
|
272
|
+
createdAt?: number;
|
|
273
|
+
structure?: boolean;
|
|
274
|
+
};
|
|
275
|
+
export interface CollabDataPayload extends CollabEventRemoteData {
|
|
276
|
+
version: number;
|
|
277
|
+
json: StepJson[];
|
|
278
|
+
userIds: (number | string)[];
|
|
279
|
+
}
|
|
280
|
+
export interface CollabSendableSelection {
|
|
281
|
+
type: 'textSelection' | 'nodeSelection';
|
|
282
|
+
anchor?: number | string;
|
|
283
|
+
head?: number | string;
|
|
284
|
+
}
|
|
285
|
+
export interface CollabEventTelepointerData {
|
|
286
|
+
type: 'telepointer';
|
|
287
|
+
selection: CollabSendableSelection;
|
|
288
|
+
sessionId: string;
|
|
289
|
+
}
|
|
290
|
+
export type CollabTelepointerPayload = CollabEventTelepointerData;
|
|
291
|
+
export interface CollabParticipant {
|
|
292
|
+
lastActive: number;
|
|
293
|
+
sessionId: string;
|
|
294
|
+
avatar: string;
|
|
295
|
+
name: string;
|
|
296
|
+
cursorPos?: number;
|
|
297
|
+
}
|
|
298
|
+
export type ProviderParticipant = CollabParticipant & {
|
|
299
|
+
userId: string;
|
|
300
|
+
clientId: number | string;
|
|
301
|
+
email: string;
|
|
302
|
+
};
|
|
303
|
+
export interface CollabEventPresenceData {
|
|
304
|
+
joined?: ProviderParticipant[];
|
|
305
|
+
left?: {
|
|
306
|
+
sessionId: string;
|
|
307
|
+
}[];
|
|
308
|
+
}
|
|
309
|
+
export type CollabPresencePayload = CollabEventPresenceData;
|
|
310
|
+
export type CollabLocalStepsPayload = {
|
|
311
|
+
steps: readonly Step[];
|
|
312
|
+
};
|
|
313
|
+
export interface CollabEventConnectingData {
|
|
314
|
+
initial: boolean;
|
|
315
|
+
}
|
|
316
|
+
export type CollabConnectingPayload = CollabEventConnectingData;
|
|
317
|
+
export type CollabCommitStatusEventPayload = {
|
|
318
|
+
status: 'attempt' | 'success' | 'failure';
|
|
319
|
+
version: number;
|
|
320
|
+
};
|
|
321
|
+
export interface CollabEvents {
|
|
322
|
+
'metadata:changed': Metadata;
|
|
323
|
+
init: CollabInitPayload;
|
|
324
|
+
connected: CollabConnectedPayload;
|
|
325
|
+
disconnected: CollabDisconnectedPayload;
|
|
326
|
+
data: CollabDataPayload;
|
|
327
|
+
telepointer: CollabTelepointerPayload;
|
|
328
|
+
presence: CollabPresencePayload;
|
|
329
|
+
'local-steps': CollabLocalStepsPayload;
|
|
330
|
+
error: ProviderError;
|
|
331
|
+
entity: any;
|
|
332
|
+
connecting: CollabConnectingPayload;
|
|
333
|
+
'commit-status': CollabCommitStatusEventPayload;
|
|
334
|
+
}
|
|
335
|
+
export type SyncUpErrorFunction = (attributes: NewCollabSyncUpErrorAttributes) => void;
|
|
336
|
+
export interface CollabEditProvider<Events extends CollabEvents = CollabEvents> {
|
|
337
|
+
initialize(getState: () => any, createStep: (json: object) => Step): this;
|
|
338
|
+
setup(props: {
|
|
339
|
+
getState?: () => EditorState;
|
|
340
|
+
onSyncUpError?: SyncUpErrorFunction;
|
|
341
|
+
}): this;
|
|
342
|
+
send(tr: Transaction, oldState: EditorState, newState: EditorState): void;
|
|
343
|
+
on(evt: keyof Events, handler: (...args: any) => void): this;
|
|
344
|
+
off(evt: keyof Events, handler: (...args: any) => void): this;
|
|
345
|
+
unsubscribeAll(evt: keyof Events): this;
|
|
346
|
+
sendMessage<K extends keyof Events>(data: {
|
|
347
|
+
type: K;
|
|
348
|
+
} & Events[K]): void;
|
|
349
|
+
getFinalAcknowledgedState(): Promise<ResolvedEditorState>;
|
|
350
|
+
}
|
|
351
|
+
export {};
|