@atlaskit/editor-core 165.0.0 → 166.0.2
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 +43 -0
- package/dist/cjs/actions/index.js +9 -0
- package/dist/cjs/create-editor/ReactEditorView.js +14 -6
- package/dist/cjs/create-editor/create-plugins-list.js +1 -2
- package/dist/cjs/editor.js +13 -0
- package/dist/cjs/event-dispatcher/index.js +9 -0
- package/dist/cjs/nodeviews/ReactNodeView.js +1 -11
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/cjs/plugins/analytics/types/enums.js +1 -0
- package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +2 -2
- package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +128 -79
- package/dist/cjs/plugins/base/utils/input-latency-tracking.js +157 -0
- package/dist/cjs/plugins/card/styles.js +3 -1
- package/dist/cjs/plugins/code-block/styles.js +6 -4
- package/dist/cjs/plugins/collab-edit/index.js +2 -2
- package/dist/cjs/plugins/collab-edit/plugin-state.js +23 -5
- package/dist/cjs/plugins/collab-edit/provider/channel.js +2 -2
- package/dist/cjs/plugins/date/styles.js +3 -1
- package/dist/cjs/plugins/emoji/index.js +30 -34
- package/dist/cjs/plugins/emoji/nodeviews/emoji.js +12 -66
- package/dist/cjs/plugins/emoji/styles.js +3 -17
- package/dist/cjs/plugins/expand/ui/styles.js +2 -2
- package/dist/cjs/plugins/extension/context-panel.js +2 -2
- package/dist/cjs/plugins/extension/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/extension/ui/styles.js +3 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +2 -2
- package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +1 -9
- package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +1 -9
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
- package/dist/cjs/plugins/layout/styles.js +3 -1
- package/dist/cjs/plugins/list/commands/indent-list.js +5 -1
- package/dist/cjs/plugins/list/commands/outdent-list.js +5 -1
- package/dist/cjs/plugins/list/transforms.js +11 -3
- package/dist/cjs/plugins/macro/actions.js +2 -2
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +2 -2
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/cjs/plugins/media/styles.js +3 -1
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
- package/dist/cjs/plugins/mentions/index.js +10 -14
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +15 -67
- package/dist/cjs/plugins/mentions/pm-plugins/main.js +19 -10
- package/dist/cjs/plugins/mentions/type-ahead/index.js +7 -2
- package/dist/cjs/plugins/panel/styles.js +3 -1
- package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
- package/dist/cjs/plugins/rule/styles.js +3 -1
- package/dist/cjs/plugins/selection/utils.js +39 -23
- package/dist/cjs/plugins/table/event-handlers.js +3 -3
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +24 -0
- package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
- package/dist/cjs/plugins/table/ui/consts.js +6 -4
- package/dist/cjs/plugins/tasks-and-decisions/styles.js +3 -1
- package/dist/cjs/plugins/text-formatting/utils.js +1 -1
- package/dist/cjs/plugins/type-ahead/index.js +6 -2
- package/dist/cjs/plugins/unsupported-content/index.js +22 -10
- package/dist/cjs/plugins/unsupported-content/styles.js +4 -2
- package/dist/cjs/plugins/unsupported-content/unsupported-inline-node-view.js +21 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +6 -3
- package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -4
- package/dist/cjs/ui/ChromeCollapsed/styles.js +3 -1
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +2 -2
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +2 -2
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +2 -2
- package/dist/cjs/ui/ConfigPanel/transformers.js +2 -2
- package/dist/cjs/ui/ContentStyles/index.js +2 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +12 -1
- package/dist/es2019/create-editor/ReactEditorView.js +14 -6
- package/dist/es2019/create-editor/create-plugins-list.js +1 -2
- package/dist/es2019/editor.js +14 -0
- package/dist/es2019/event-dispatcher/index.js +8 -0
- package/dist/es2019/nodeviews/ReactNodeView.js +1 -10
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +9 -0
- package/dist/es2019/plugins/analytics/types/enums.js +1 -0
- package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +138 -80
- package/dist/es2019/plugins/base/utils/input-latency-tracking.js +128 -0
- package/dist/es2019/plugins/card/styles.js +9 -5
- package/dist/es2019/plugins/code-block/styles.js +11 -8
- package/dist/es2019/plugins/collab-edit/plugin-state.js +23 -8
- package/dist/es2019/plugins/date/styles.js +3 -1
- package/dist/es2019/plugins/emoji/index.js +16 -21
- package/dist/es2019/plugins/emoji/nodeviews/emoji.js +12 -31
- package/dist/es2019/plugins/emoji/styles.js +1 -82
- package/dist/es2019/plugins/expand/ui/styles.js +2 -2
- package/dist/es2019/plugins/extension/ui/styles.js +4 -2
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
- package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
- package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +1 -8
- package/dist/es2019/plugins/layout/styles.js +3 -2
- package/dist/es2019/plugins/list/commands/indent-list.js +4 -1
- package/dist/es2019/plugins/list/commands/outdent-list.js +4 -1
- package/dist/es2019/plugins/list/transforms.js +9 -4
- package/dist/es2019/plugins/media/styles.js +9 -7
- package/dist/es2019/plugins/mentions/index.js +1 -6
- package/dist/es2019/plugins/mentions/nodeviews/mention.js +16 -35
- package/dist/es2019/plugins/mentions/pm-plugins/main.js +18 -10
- package/dist/es2019/plugins/mentions/type-ahead/index.js +7 -2
- package/dist/es2019/plugins/panel/styles.js +5 -4
- package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
- package/dist/es2019/plugins/rule/styles.js +2 -1
- package/dist/es2019/plugins/selection/utils.js +35 -20
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +22 -0
- package/dist/es2019/plugins/table/ui/common-styles.js +4 -0
- package/dist/es2019/plugins/table/ui/consts.js +5 -4
- package/dist/es2019/plugins/tasks-and-decisions/styles.js +4 -2
- package/dist/es2019/plugins/text-formatting/utils.js +1 -1
- package/dist/es2019/plugins/type-ahead/index.js +5 -1
- package/dist/es2019/plugins/unsupported-content/index.js +23 -12
- package/dist/es2019/plugins/unsupported-content/styles.js +5 -3
- package/dist/es2019/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
- package/dist/es2019/ui/Appearance/Chromeless.js +5 -2
- package/dist/es2019/ui/Appearance/Comment/Comment.js +5 -2
- package/dist/es2019/ui/ChromeCollapsed/styles.js +2 -1
- package/dist/es2019/ui/ContentStyles/index.js +3 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +9 -1
- package/dist/esm/create-editor/ErrorBoundary.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +14 -6
- package/dist/esm/create-editor/create-plugins-list.js +1 -2
- package/dist/esm/editor.js +16 -1
- package/dist/esm/event-dispatcher/index.js +9 -0
- package/dist/esm/nodeviews/ReactNodeView.js +1 -10
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/esm/plugins/analytics/types/enums.js +1 -0
- package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +1 -1
- package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +128 -79
- package/dist/esm/plugins/base/utils/input-latency-tracking.js +149 -0
- package/dist/esm/plugins/card/styles.js +2 -1
- package/dist/esm/plugins/code-block/styles.js +5 -4
- package/dist/esm/plugins/collab-edit/index.js +1 -1
- package/dist/esm/plugins/collab-edit/plugin-state.js +21 -6
- package/dist/esm/plugins/collab-edit/provider/channel.js +1 -1
- package/dist/esm/plugins/custom-autoformat/doc.js +1 -1
- package/dist/esm/plugins/custom-autoformat/index.js +1 -1
- package/dist/esm/plugins/date/styles.js +2 -1
- package/dist/esm/plugins/emoji/index.js +26 -29
- package/dist/esm/plugins/emoji/nodeviews/emoji.js +11 -56
- package/dist/esm/plugins/emoji/styles.js +3 -14
- package/dist/esm/plugins/expand/ui/styles.js +2 -2
- package/dist/esm/plugins/extension/actions.js +1 -1
- package/dist/esm/plugins/extension/context-panel.js +1 -1
- package/dist/esm/plugins/extension/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +1 -1
- package/dist/esm/plugins/extension/ui/styles.js +2 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
- package/dist/esm/plugins/feedback-dialog/index.js +1 -1
- package/dist/esm/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +1 -1
- package/dist/esm/plugins/find-replace/utils/batch-decorations.js +1 -1
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -1
- package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +1 -1
- package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
- package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +1 -8
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -1
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/layout/styles.js +2 -1
- package/dist/esm/plugins/list/commands/indent-list.js +4 -1
- package/dist/esm/plugins/list/commands/outdent-list.js +4 -1
- package/dist/esm/plugins/list/transforms.js +9 -4
- package/dist/esm/plugins/macro/actions.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +2 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/esm/plugins/media/picker-facade.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/media/styles.js +2 -1
- package/dist/esm/plugins/media/toolbar/utils.js +1 -1
- package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +1 -1
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +1 -1
- package/dist/esm/plugins/media/utils/check-media-type.js +1 -1
- package/dist/esm/plugins/mentions/index.js +10 -14
- package/dist/esm/plugins/mentions/nodeviews/mention.js +13 -58
- package/dist/esm/plugins/mentions/pm-plugins/main.js +18 -10
- package/dist/esm/plugins/mentions/type-ahead/index.js +7 -2
- package/dist/esm/plugins/panel/styles.js +2 -1
- package/dist/esm/plugins/paste/handlers.js +1 -1
- package/dist/esm/plugins/paste/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
- package/dist/esm/plugins/quick-insert/index.js +1 -1
- package/dist/esm/plugins/rule/styles.js +2 -1
- package/dist/esm/plugins/selection/utils.js +35 -20
- package/dist/esm/plugins/table/event-handlers.js +3 -3
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +23 -0
- package/dist/esm/plugins/table/ui/common-styles.js +1 -1
- package/dist/esm/plugins/table/ui/consts.js +5 -4
- package/dist/esm/plugins/tasks-and-decisions/styles.js +2 -1
- package/dist/esm/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +1 -1
- package/dist/esm/plugins/text-formatting/utils.js +1 -1
- package/dist/esm/plugins/type-ahead/index.js +6 -2
- package/dist/esm/plugins/unsupported-content/index.js +21 -11
- package/dist/esm/plugins/unsupported-content/styles.js +3 -2
- package/dist/esm/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
- package/dist/esm/ui/Appearance/Chromeless.js +6 -3
- package/dist/esm/ui/Appearance/Comment/Comment.js +6 -4
- package/dist/esm/ui/ChromeCollapsed/styles.js +2 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +1 -1
- package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +1 -1
- package/dist/esm/ui/ConfigPanel/transformers.js +1 -1
- package/dist/esm/ui/ContentStyles/index.js +3 -3
- package/dist/esm/ui/LinkSearch/index.js +1 -1
- package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
- package/dist/esm/utils/action.js +1 -1
- package/dist/esm/utils/clipboard.js +1 -1
- package/dist/esm/utils/extensions.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +3 -1
- package/dist/types/editor.d.ts +3 -0
- package/dist/types/event-dispatcher/index.d.ts +1 -0
- package/dist/types/nodeviews/ReactNodeView.d.ts +1 -5
- package/dist/types/plugins/analytics/types/enums.d.ts +1 -0
- package/dist/types/plugins/analytics/types/events.d.ts +2 -2
- package/dist/types/plugins/analytics/types/general-events.d.ts +10 -1
- package/dist/types/plugins/base/utils/input-latency-tracking.d.ts +44 -0
- package/dist/types/plugins/collab-edit/plugin-state.d.ts +4 -0
- package/dist/types/plugins/emoji/index.d.ts +2 -6
- package/dist/types/plugins/emoji/nodeviews/emoji.d.ts +4 -14
- package/dist/types/plugins/emoji/styles.d.ts +0 -1
- package/dist/types/plugins/emoji/types.d.ts +0 -1
- package/dist/types/plugins/list/transforms.d.ts +10 -1
- package/dist/types/plugins/mentions/nodeviews/mention.d.ts +6 -14
- package/dist/types/plugins/mentions/pm-plugins/main.d.ts +2 -5
- package/dist/types/plugins/selection/utils.d.ts +7 -15
- package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +3 -0
- package/dist/types/plugins/table/ui/consts.d.ts +2 -2
- package/dist/types/plugins/type-ahead/types.d.ts +1 -0
- package/dist/types/plugins/unsupported-content/unsupported-inline-node-view.d.ts +11 -0
- package/dist/types/types/editor-appearance-component.d.ts +1 -0
- package/dist/types/types/editor-props.d.ts +1 -0
- package/dist/types/types/feature-flags.d.ts +0 -14
- package/dist/types/ui/Appearance/Chromeless.d.ts +1 -0
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +4 -4
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/package.json +23 -23
- package/dist/cjs/plugins/emoji/nodeviews/emoji-next.js +0 -250
- package/dist/es2019/plugins/emoji/nodeviews/emoji-next.js +0 -177
- package/dist/esm/plugins/emoji/nodeviews/emoji-next.js +0 -234
- package/dist/types/plugins/emoji/nodeviews/emoji-next.d.ts +0 -31
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "166.0.2",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,26 +42,26 @@
|
|
|
42
42
|
"@atlaskit/date": "^0.9.0",
|
|
43
43
|
"@atlaskit/datetime-picker": "^11.1.0",
|
|
44
44
|
"@atlaskit/droplist": "^11.0.0",
|
|
45
|
-
"@atlaskit/editor-common": "^
|
|
45
|
+
"@atlaskit/editor-common": "^67.0.0",
|
|
46
46
|
"@atlaskit/editor-json-transformer": "^8.7.0",
|
|
47
47
|
"@atlaskit/editor-markdown-transformer": "^4.1.0",
|
|
48
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
48
|
+
"@atlaskit/editor-shared-styles": "^2.1.0",
|
|
49
49
|
"@atlaskit/editor-tables": "^2.1.0",
|
|
50
|
-
"@atlaskit/emoji": "^64.
|
|
50
|
+
"@atlaskit/emoji": "^64.6.0",
|
|
51
51
|
"@atlaskit/empty-state": "^7.3.0",
|
|
52
52
|
"@atlaskit/form": "^8.5.0",
|
|
53
53
|
"@atlaskit/icon": "^21.10.0",
|
|
54
54
|
"@atlaskit/icon-object": "^6.2.0",
|
|
55
55
|
"@atlaskit/item": "^12.0.0",
|
|
56
56
|
"@atlaskit/locale": "^2.3.0",
|
|
57
|
-
"@atlaskit/logo": "^13.
|
|
58
|
-
"@atlaskit/media-card": "^73.
|
|
59
|
-
"@atlaskit/media-client": "^
|
|
60
|
-
"@atlaskit/media-common": "^2.
|
|
61
|
-
"@atlaskit/media-filmstrip": "^
|
|
62
|
-
"@atlaskit/media-picker": "^
|
|
63
|
-
"@atlaskit/media-ui": "^
|
|
64
|
-
"@atlaskit/media-viewer": "^46.
|
|
57
|
+
"@atlaskit/logo": "^13.6.0",
|
|
58
|
+
"@atlaskit/media-card": "^73.6.0",
|
|
59
|
+
"@atlaskit/media-client": "^16.0.0",
|
|
60
|
+
"@atlaskit/media-common": "^2.13.0",
|
|
61
|
+
"@atlaskit/media-filmstrip": "^44.0.0",
|
|
62
|
+
"@atlaskit/media-picker": "^62.0.0",
|
|
63
|
+
"@atlaskit/media-ui": "^22.0.0",
|
|
64
|
+
"@atlaskit/media-viewer": "^46.3.0",
|
|
65
65
|
"@atlaskit/mention": "^21.0.0",
|
|
66
66
|
"@atlaskit/menu": "^1.3.0",
|
|
67
67
|
"@atlaskit/modal-dialog": "^12.2.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@atlaskit/textfield": "^5.1.0",
|
|
79
79
|
"@atlaskit/theme": "^12.1.0",
|
|
80
80
|
"@atlaskit/toggle": "^12.4.0",
|
|
81
|
-
"@atlaskit/tokens": "^0.
|
|
81
|
+
"@atlaskit/tokens": "^0.10.0",
|
|
82
82
|
"@atlaskit/tooltip": "^17.5.0",
|
|
83
83
|
"@atlaskit/util-service-support": "^6.1.0",
|
|
84
84
|
"@atlaskit/width-detector": "^4.0.0",
|
|
@@ -127,18 +127,18 @@
|
|
|
127
127
|
"w3c-keyname": "^2.1.0"
|
|
128
128
|
},
|
|
129
129
|
"peerDependencies": {
|
|
130
|
-
"@atlaskit/media-core": "^
|
|
131
|
-
"@atlaskit/smart-card": "^19.
|
|
130
|
+
"@atlaskit/media-core": "^33.0.0",
|
|
131
|
+
"@atlaskit/smart-card": "^19.1.1",
|
|
132
132
|
"react": "^16.8.0",
|
|
133
133
|
"react-dom": "^16.8.0",
|
|
134
134
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
135
135
|
"styled-components": "^3.2.6"
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
|
-
"@atlaskit/atlassian-navigation": "^2.
|
|
139
|
-
"@atlaskit/breadcrumbs": "11.
|
|
138
|
+
"@atlaskit/atlassian-navigation": "^2.2.0",
|
|
139
|
+
"@atlaskit/breadcrumbs": "11.6.1",
|
|
140
140
|
"@atlaskit/code": "^14.3.0",
|
|
141
|
-
"@atlaskit/collab-provider": "7.
|
|
141
|
+
"@atlaskit/collab-provider": "7.4.0",
|
|
142
142
|
"@atlaskit/docs": "*",
|
|
143
143
|
"@atlaskit/drawer": "^7.1.0",
|
|
144
144
|
"@atlaskit/dropdown-menu": "^11.1.0",
|
|
@@ -148,17 +148,17 @@
|
|
|
148
148
|
"@atlaskit/flag": "^14.5.0",
|
|
149
149
|
"@atlaskit/inline-dialog": "^13.3.0",
|
|
150
150
|
"@atlaskit/lozenge": "^11.1.0",
|
|
151
|
-
"@atlaskit/media-core": "^
|
|
151
|
+
"@atlaskit/media-core": "^33.0.0",
|
|
152
152
|
"@atlaskit/media-integration-test-helpers": "^2.6.0",
|
|
153
|
-
"@atlaskit/media-test-helpers": "^
|
|
153
|
+
"@atlaskit/media-test-helpers": "^30.0.0",
|
|
154
154
|
"@atlaskit/menu": "^1.3.0",
|
|
155
155
|
"@atlaskit/page-layout": "^1.2.0",
|
|
156
156
|
"@atlaskit/profilecard": "^16.4.0",
|
|
157
157
|
"@atlaskit/pubsub": "^6.0.0",
|
|
158
|
-
"@atlaskit/renderer": "^
|
|
158
|
+
"@atlaskit/renderer": "^95.0.0",
|
|
159
159
|
"@atlaskit/section-message": "^6.1.0",
|
|
160
160
|
"@atlaskit/share": "*",
|
|
161
|
-
"@atlaskit/smart-card": "^19.
|
|
161
|
+
"@atlaskit/smart-card": "^19.1.0",
|
|
162
162
|
"@atlaskit/smart-user-picker": "^5.0.2",
|
|
163
163
|
"@atlaskit/synchrony-test-helpers": "^2.3.0",
|
|
164
164
|
"@atlaskit/textarea": "^4.3.0",
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
"@atlaskit/visual-regression": "*",
|
|
169
169
|
"@atlaskit/webdriver-runner": "*",
|
|
170
170
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
171
|
-
"@atlassian/search-provider": "2.
|
|
171
|
+
"@atlassian/search-provider": "2.3.0",
|
|
172
172
|
"@atlassian/ufo": "^0.1.0",
|
|
173
173
|
"@emotion/jest": "^11.8.0",
|
|
174
174
|
"@testing-library/dom": "^7.7.3",
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.EmojiNodeView = void 0;
|
|
9
|
-
exports.default = emojiNodeView;
|
|
10
|
-
|
|
11
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
12
|
-
|
|
13
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
14
|
-
|
|
15
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
16
|
-
|
|
17
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
18
|
-
|
|
19
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
20
|
-
|
|
21
|
-
var _prosemirrorModel = require("prosemirror-model");
|
|
22
|
-
|
|
23
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
24
|
-
|
|
25
|
-
var EmojiNodeView = /*#__PURE__*/function () {
|
|
26
|
-
function EmojiNodeView(node, _, context) {
|
|
27
|
-
var _this = this,
|
|
28
|
-
_this$options;
|
|
29
|
-
|
|
30
|
-
(0, _classCallCheck2.default)(this, EmojiNodeView);
|
|
31
|
-
(0, _defineProperty2.default)(this, "hasProvider", false);
|
|
32
|
-
(0, _defineProperty2.default)(this, "subscribe", function (_, provider) {
|
|
33
|
-
_this.hasProvider = false;
|
|
34
|
-
_this.emojiProvider = provider;
|
|
35
|
-
provider === null || provider === void 0 ? void 0 : provider.then(function () {
|
|
36
|
-
return _this.hasProvider = true;
|
|
37
|
-
}).then(function () {
|
|
38
|
-
return _this.findEmoji();
|
|
39
|
-
}).then(function (emoji) {
|
|
40
|
-
return _this.update(_this.node, null, emoji);
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
this.node = node;
|
|
44
|
-
this.providers = context.providerFactory;
|
|
45
|
-
this.options = context.options;
|
|
46
|
-
this.dom = EmojiNodeView.toDom(node);
|
|
47
|
-
this.el = this.dom;
|
|
48
|
-
this.providers.subscribe('emojiProvider', this.subscribe);
|
|
49
|
-
|
|
50
|
-
if ((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.allowZeroWidthSpaceAfter) {
|
|
51
|
-
this.el.after(document.createTextNode(_utils.ZERO_WIDTH_SPACE));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
this.update(this.node, null);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
(0, _createClass2.default)(EmojiNodeView, [{
|
|
58
|
-
key: "findEmoji",
|
|
59
|
-
value: function () {
|
|
60
|
-
var _findEmoji = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
61
|
-
var node,
|
|
62
|
-
emojiProvider,
|
|
63
|
-
_args = arguments;
|
|
64
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
65
|
-
while (1) {
|
|
66
|
-
switch (_context.prev = _context.next) {
|
|
67
|
-
case 0:
|
|
68
|
-
node = _args.length > 0 && _args[0] !== undefined ? _args[0] : this.node;
|
|
69
|
-
_context.next = 3;
|
|
70
|
-
return this.emojiProvider;
|
|
71
|
-
|
|
72
|
-
case 3:
|
|
73
|
-
emojiProvider = _context.sent;
|
|
74
|
-
|
|
75
|
-
if (!emojiProvider) {
|
|
76
|
-
_context.next = 6;
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return _context.abrupt("return", emojiProvider.findByEmojiId({
|
|
81
|
-
id: node.attrs.id,
|
|
82
|
-
shortName: node.attrs.shortName,
|
|
83
|
-
fallback: node.attrs.text
|
|
84
|
-
}));
|
|
85
|
-
|
|
86
|
-
case 6:
|
|
87
|
-
case "end":
|
|
88
|
-
return _context.stop();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}, _callee, this);
|
|
92
|
-
}));
|
|
93
|
-
|
|
94
|
-
function findEmoji() {
|
|
95
|
-
return _findEmoji.apply(this, arguments);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return findEmoji;
|
|
99
|
-
}()
|
|
100
|
-
}, {
|
|
101
|
-
key: "destroy",
|
|
102
|
-
value: function destroy() {
|
|
103
|
-
this.providers.unsubscribe('emojiProvider', this.subscribe);
|
|
104
|
-
}
|
|
105
|
-
}, {
|
|
106
|
-
key: "update",
|
|
107
|
-
value: function update(node, _) {
|
|
108
|
-
var _this2 = this;
|
|
109
|
-
|
|
110
|
-
var emoji = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.emoji;
|
|
111
|
-
|
|
112
|
-
if (this.node.type !== node.type) {
|
|
113
|
-
this.node = node;
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
var prev = this.node.attrs;
|
|
118
|
-
var next = node.attrs;
|
|
119
|
-
var changed = false;
|
|
120
|
-
|
|
121
|
-
if (prev.id !== next.id) {
|
|
122
|
-
changed = true;
|
|
123
|
-
this.el.dataset.emojiId = next.id;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (prev.shortName !== next.shortName) {
|
|
127
|
-
changed = true;
|
|
128
|
-
this.el.dataset.emojiShortname = next.shortName;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (changed) {
|
|
132
|
-
this.emoji = undefined;
|
|
133
|
-
this.node = node;
|
|
134
|
-
this.findEmoji().then(function (emoji) {
|
|
135
|
-
return _this2.update(_this2.node, _, emoji);
|
|
136
|
-
});
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
if (!this.hasProvider) {
|
|
141
|
-
this.el.classList.add('editor-emoji-loading');
|
|
142
|
-
this.el.style.backgroundSize = '';
|
|
143
|
-
this.el.style.backgroundPosition = '';
|
|
144
|
-
this.el.style.backgroundImage = '';
|
|
145
|
-
this.node = node;
|
|
146
|
-
this.emoji = emoji;
|
|
147
|
-
return true;
|
|
148
|
-
} else {
|
|
149
|
-
this.el.classList.remove('editor-emoji-loading');
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (!emoji) {
|
|
153
|
-
this.el.classList.add('editor-emoji-fallback');
|
|
154
|
-
this.el.style.backgroundSize = '';
|
|
155
|
-
this.el.style.backgroundPosition = '';
|
|
156
|
-
this.el.style.backgroundImage = '';
|
|
157
|
-
this.node = node;
|
|
158
|
-
this.emoji = emoji;
|
|
159
|
-
return true;
|
|
160
|
-
} else {
|
|
161
|
-
this.el.classList.remove('editor-emoji-fallback');
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
if (this.emoji === emoji) {
|
|
165
|
-
return true;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
var representation = emoji === null || emoji === void 0 ? void 0 : emoji.representation;
|
|
169
|
-
|
|
170
|
-
if (EmojiNodeView.isSprite(representation)) {
|
|
171
|
-
var sprite = representation.sprite,
|
|
172
|
-
xIndex = representation.xIndex,
|
|
173
|
-
yIndex = representation.yIndex;
|
|
174
|
-
var row = sprite.row,
|
|
175
|
-
column = sprite.column,
|
|
176
|
-
url = sprite.url;
|
|
177
|
-
var xPosition = 100 / (column - 1) * (xIndex - 0);
|
|
178
|
-
var yPosition = 100 / (row - 1) * (yIndex - 0);
|
|
179
|
-
this.el.style.backgroundSize = "".concat(column * 100, "% ").concat(row * 100, "%");
|
|
180
|
-
this.el.style.backgroundPosition = "".concat(xPosition, "% ").concat(yPosition, "%");
|
|
181
|
-
this.el.style.backgroundImage = "url(".concat(url, ")");
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
if (EmojiNodeView.isImage(representation) || EmojiNodeView.isMedia(representation)) {
|
|
185
|
-
var path = EmojiNodeView.isImage(representation) ? representation.imagePath : representation.mediaPath;
|
|
186
|
-
var rawWidth = representation.width,
|
|
187
|
-
rawHeight = representation.height;
|
|
188
|
-
var width = rawWidth / (rawHeight / 20);
|
|
189
|
-
this.el.style.width = "".concat(width, "px");
|
|
190
|
-
this.el.style.backgroundImage = "url(".concat(path, ")");
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
this.emoji = emoji;
|
|
194
|
-
return true;
|
|
195
|
-
}
|
|
196
|
-
}, {
|
|
197
|
-
key: "ignoreMutation",
|
|
198
|
-
value: function ignoreMutation(_) {
|
|
199
|
-
return true;
|
|
200
|
-
}
|
|
201
|
-
}], [{
|
|
202
|
-
key: "toDomSpec",
|
|
203
|
-
value: function toDomSpec(node) {
|
|
204
|
-
return ['span', {
|
|
205
|
-
'aria-label': node.attrs.shortName,
|
|
206
|
-
'data-emoji-id': node.attrs.id,
|
|
207
|
-
'data-emoji-shortname': node.attrs.shortName,
|
|
208
|
-
class: 'editor-emoji'
|
|
209
|
-
}, node.attrs.shortName];
|
|
210
|
-
}
|
|
211
|
-
}, {
|
|
212
|
-
key: "toDom",
|
|
213
|
-
value: function toDom(node) {
|
|
214
|
-
return _prosemirrorModel.DOMSerializer.renderSpec(document, EmojiNodeView.toDomSpec(node)).dom;
|
|
215
|
-
}
|
|
216
|
-
}, {
|
|
217
|
-
key: "isSprite",
|
|
218
|
-
value: function isSprite(representation) {
|
|
219
|
-
var _representation$hasOw;
|
|
220
|
-
|
|
221
|
-
return (_representation$hasOw = representation === null || representation === void 0 ? void 0 : representation.hasOwnProperty('sprite')) !== null && _representation$hasOw !== void 0 ? _representation$hasOw : false;
|
|
222
|
-
}
|
|
223
|
-
}, {
|
|
224
|
-
key: "isImage",
|
|
225
|
-
value: function isImage(representation) {
|
|
226
|
-
var _representation$hasOw2;
|
|
227
|
-
|
|
228
|
-
return (_representation$hasOw2 = representation === null || representation === void 0 ? void 0 : representation.hasOwnProperty('imagePath')) !== null && _representation$hasOw2 !== void 0 ? _representation$hasOw2 : false;
|
|
229
|
-
}
|
|
230
|
-
}, {
|
|
231
|
-
key: "isMedia",
|
|
232
|
-
value: function isMedia(representation) {
|
|
233
|
-
var _representation$hasOw3;
|
|
234
|
-
|
|
235
|
-
return (_representation$hasOw3 = representation === null || representation === void 0 ? void 0 : representation.hasOwnProperty('mediaPath')) !== null && _representation$hasOw3 !== void 0 ? _representation$hasOw3 : false;
|
|
236
|
-
}
|
|
237
|
-
}]);
|
|
238
|
-
return EmojiNodeView;
|
|
239
|
-
}();
|
|
240
|
-
|
|
241
|
-
exports.EmojiNodeView = EmojiNodeView;
|
|
242
|
-
|
|
243
|
-
function emojiNodeView(providerFactory, options) {
|
|
244
|
-
return function (node, view) {
|
|
245
|
-
return new EmojiNodeView(node, view, {
|
|
246
|
-
providerFactory: providerFactory,
|
|
247
|
-
options: options
|
|
248
|
-
});
|
|
249
|
-
};
|
|
250
|
-
}
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { DOMSerializer } from 'prosemirror-model';
|
|
3
|
-
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
4
|
-
export class EmojiNodeView {
|
|
5
|
-
constructor(node, _, context) {
|
|
6
|
-
var _this$options;
|
|
7
|
-
|
|
8
|
-
_defineProperty(this, "hasProvider", false);
|
|
9
|
-
|
|
10
|
-
_defineProperty(this, "subscribe", (_, provider) => {
|
|
11
|
-
this.hasProvider = false;
|
|
12
|
-
this.emojiProvider = provider;
|
|
13
|
-
provider === null || provider === void 0 ? void 0 : provider.then(() => this.hasProvider = true).then(() => this.findEmoji()).then(emoji => this.update(this.node, null, emoji));
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
this.node = node;
|
|
17
|
-
this.providers = context.providerFactory;
|
|
18
|
-
this.options = context.options;
|
|
19
|
-
this.dom = EmojiNodeView.toDom(node);
|
|
20
|
-
this.el = this.dom;
|
|
21
|
-
this.providers.subscribe('emojiProvider', this.subscribe);
|
|
22
|
-
|
|
23
|
-
if ((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.allowZeroWidthSpaceAfter) {
|
|
24
|
-
this.el.after(document.createTextNode(ZERO_WIDTH_SPACE));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
this.update(this.node, null);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static toDomSpec(node) {
|
|
31
|
-
return ['span', {
|
|
32
|
-
'aria-label': node.attrs.shortName,
|
|
33
|
-
'data-emoji-id': node.attrs.id,
|
|
34
|
-
'data-emoji-shortname': node.attrs.shortName,
|
|
35
|
-
class: 'editor-emoji'
|
|
36
|
-
}, node.attrs.shortName];
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
static toDom(node) {
|
|
40
|
-
return DOMSerializer.renderSpec(document, EmojiNodeView.toDomSpec(node)).dom;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
static isSprite(representation) {
|
|
44
|
-
var _representation$hasOw;
|
|
45
|
-
|
|
46
|
-
return (_representation$hasOw = representation === null || representation === void 0 ? void 0 : representation.hasOwnProperty('sprite')) !== null && _representation$hasOw !== void 0 ? _representation$hasOw : false;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
static isImage(representation) {
|
|
50
|
-
var _representation$hasOw2;
|
|
51
|
-
|
|
52
|
-
return (_representation$hasOw2 = representation === null || representation === void 0 ? void 0 : representation.hasOwnProperty('imagePath')) !== null && _representation$hasOw2 !== void 0 ? _representation$hasOw2 : false;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
static isMedia(representation) {
|
|
56
|
-
var _representation$hasOw3;
|
|
57
|
-
|
|
58
|
-
return (_representation$hasOw3 = representation === null || representation === void 0 ? void 0 : representation.hasOwnProperty('mediaPath')) !== null && _representation$hasOw3 !== void 0 ? _representation$hasOw3 : false;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async findEmoji(node = this.node) {
|
|
62
|
-
const emojiProvider = await this.emojiProvider;
|
|
63
|
-
|
|
64
|
-
if (emojiProvider) {
|
|
65
|
-
return emojiProvider.findByEmojiId({
|
|
66
|
-
id: node.attrs.id,
|
|
67
|
-
shortName: node.attrs.shortName,
|
|
68
|
-
fallback: node.attrs.text
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
destroy() {
|
|
74
|
-
this.providers.unsubscribe('emojiProvider', this.subscribe);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
update(node, _, emoji = this.emoji) {
|
|
78
|
-
if (this.node.type !== node.type) {
|
|
79
|
-
this.node = node;
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const prev = this.node.attrs;
|
|
84
|
-
const next = node.attrs;
|
|
85
|
-
let changed = false;
|
|
86
|
-
|
|
87
|
-
if (prev.id !== next.id) {
|
|
88
|
-
changed = true;
|
|
89
|
-
this.el.dataset.emojiId = next.id;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (prev.shortName !== next.shortName) {
|
|
93
|
-
changed = true;
|
|
94
|
-
this.el.dataset.emojiShortname = next.shortName;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (changed) {
|
|
98
|
-
this.emoji = undefined;
|
|
99
|
-
this.node = node;
|
|
100
|
-
this.findEmoji().then(emoji => this.update(this.node, _, emoji));
|
|
101
|
-
return true;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
if (!this.hasProvider) {
|
|
105
|
-
this.el.classList.add('editor-emoji-loading');
|
|
106
|
-
this.el.style.backgroundSize = '';
|
|
107
|
-
this.el.style.backgroundPosition = '';
|
|
108
|
-
this.el.style.backgroundImage = '';
|
|
109
|
-
this.node = node;
|
|
110
|
-
this.emoji = emoji;
|
|
111
|
-
return true;
|
|
112
|
-
} else {
|
|
113
|
-
this.el.classList.remove('editor-emoji-loading');
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
if (!emoji) {
|
|
117
|
-
this.el.classList.add('editor-emoji-fallback');
|
|
118
|
-
this.el.style.backgroundSize = '';
|
|
119
|
-
this.el.style.backgroundPosition = '';
|
|
120
|
-
this.el.style.backgroundImage = '';
|
|
121
|
-
this.node = node;
|
|
122
|
-
this.emoji = emoji;
|
|
123
|
-
return true;
|
|
124
|
-
} else {
|
|
125
|
-
this.el.classList.remove('editor-emoji-fallback');
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
if (this.emoji === emoji) {
|
|
129
|
-
return true;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
const representation = emoji === null || emoji === void 0 ? void 0 : emoji.representation;
|
|
133
|
-
|
|
134
|
-
if (EmojiNodeView.isSprite(representation)) {
|
|
135
|
-
const {
|
|
136
|
-
sprite,
|
|
137
|
-
xIndex,
|
|
138
|
-
yIndex
|
|
139
|
-
} = representation;
|
|
140
|
-
const {
|
|
141
|
-
row,
|
|
142
|
-
column,
|
|
143
|
-
url
|
|
144
|
-
} = sprite;
|
|
145
|
-
const xPosition = 100 / (column - 1) * (xIndex - 0);
|
|
146
|
-
const yPosition = 100 / (row - 1) * (yIndex - 0);
|
|
147
|
-
this.el.style.backgroundSize = `${column * 100}% ${row * 100}%`;
|
|
148
|
-
this.el.style.backgroundPosition = `${xPosition}% ${yPosition}%`;
|
|
149
|
-
this.el.style.backgroundImage = `url(${url})`;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (EmojiNodeView.isImage(representation) || EmojiNodeView.isMedia(representation)) {
|
|
153
|
-
const path = EmojiNodeView.isImage(representation) ? representation.imagePath : representation.mediaPath;
|
|
154
|
-
const {
|
|
155
|
-
width: rawWidth,
|
|
156
|
-
height: rawHeight
|
|
157
|
-
} = representation;
|
|
158
|
-
const width = rawWidth / (rawHeight / 20);
|
|
159
|
-
this.el.style.width = `${width}px`;
|
|
160
|
-
this.el.style.backgroundImage = `url(${path})`;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
this.emoji = emoji;
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
ignoreMutation(_) {
|
|
168
|
-
return true;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
export default function emojiNodeView(providerFactory, options) {
|
|
173
|
-
return (node, view) => new EmojiNodeView(node, view, {
|
|
174
|
-
providerFactory,
|
|
175
|
-
options
|
|
176
|
-
});
|
|
177
|
-
}
|