@atlaskit/editor-plugin-synced-block 4.3.10 → 4.3.11

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-synced-block
2
2
 
3
+ ## 4.3.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`55920a92e882a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55920a92e882a) -
8
+ tsignores added for help-center local consumpton removed
9
+ - Updated dependencies
10
+
3
11
  ## 4.3.10
4
12
 
5
13
  ### Patch Changes
@@ -28,7 +28,6 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pmPlugi
28
28
  return new _safePlugin.SafePlugin({
29
29
  key: syncedBlockPluginKey,
30
30
  state: {
31
- // @ts-ignore - Workaround for help-center local consumption
32
31
  init: function init(_, instance) {
33
32
  var syncBlockNodes = instance.doc.children.filter(function (node) {
34
33
  return node.type.name === 'syncBlock';
@@ -40,7 +39,6 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pmPlugi
40
39
  syncBlockStore: syncBlockStore
41
40
  };
42
41
  },
43
- // @ts-ignore - Workaround for help-center local consumption
44
42
  apply: function apply(tr, currentPluginState, oldEditorState) {
45
43
  var _meta$showFlag;
46
44
  var meta = tr.getMeta(syncedBlockPluginKey);
@@ -70,7 +68,6 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pmPlugi
70
68
  api: api
71
69
  })
72
70
  },
73
- // @ts-ignore - Workaround for help-center local consumption
74
71
  decorations: function decorations(state) {
75
72
  var _syncedBlockPluginKey, _syncedBlockPluginKey2, _api$connectivity, _api$editorViewMode;
76
73
  var selectionDecorationSet = (_syncedBlockPluginKey = (_syncedBlockPluginKey2 = syncedBlockPluginKey.getState(state)) === null || _syncedBlockPluginKey2 === void 0 ? void 0 : _syncedBlockPluginKey2.selectionDecorationSet) !== null && _syncedBlockPluginKey !== void 0 ? _syncedBlockPluginKey : _view.DecorationSet.empty;
@@ -79,8 +76,6 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pmPlugi
79
76
  var isViewMode = (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view';
80
77
  var offlineDecorations = [];
81
78
  var viewModeDecorations = [];
82
-
83
- // @ts-ignore - Workaround for help-center local consumption
84
79
  state.doc.descendants(function (node, pos) {
85
80
  if (node.type.name === 'bodiedSyncBlock' && isOffline) {
86
81
  offlineDecorations.push(_view.Decoration.node(pos, pos + node.nodeSize, {
@@ -101,11 +96,9 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pmPlugi
101
96
  useLongPressSelection: useLongPressSelection
102
97
  }),
103
98
  handleDOMEvents: {
104
- // @ts-ignore - Workaround for help-center local consumption
105
99
  mouseover: function mouseover(view, event) {
106
100
  return (0, _ignoreDomEvent.shouldIgnoreDomEvent)(view, event, api);
107
101
  },
108
- // @ts-ignore - Workaround for help-center local consumption
109
102
  mousedown: function mousedown(view, event) {
110
103
  return (0, _ignoreDomEvent.shouldIgnoreDomEvent)(view, event, api);
111
104
  }
@@ -119,7 +112,6 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pmPlugi
119
112
  }
120
113
  };
121
114
  },
122
- // @ts-ignore - Workaround for help-center local consumption
123
115
  filterTransaction: function filterTransaction(tr, state) {
124
116
  var _api$connectivity2;
125
117
  var isOffline = (api === null || api === void 0 || (_api$connectivity2 = api.connectivity) === null || _api$connectivity2 === void 0 || (_api$connectivity2 = _api$connectivity2.sharedState.currentState()) === null || _api$connectivity2 === void 0 ? void 0 : _api$connectivity2.mode) === 'offline';
@@ -196,15 +188,10 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pmPlugi
196
188
  }
197
189
  return true;
198
190
  },
199
- // @ts-ignore - Workaround for help-center local consumption
200
191
  appendTransaction: function appendTransaction(trs, oldState, newState) {
201
- trs
202
- // @ts-ignore - Workaround for help-center local consumption
203
- .filter(function (tr) {
192
+ trs.filter(function (tr) {
204
193
  return tr.docChanged;
205
- })
206
- // @ts-ignore - Workaround for help-center local consumption
207
- .forEach(function (tr) {
194
+ }).forEach(function (tr) {
208
195
  syncBlockStore === null || syncBlockStore === void 0 || syncBlockStore.sourceManager.rebaseTransaction(tr, newState);
209
196
  });
210
197
  var _iterator = _createForOfIteratorHelper(trs),
@@ -19,7 +19,6 @@ export const createPlugin = (options, pmPluginFactoryParams, syncBlockStore, api
19
19
  return new SafePlugin({
20
20
  key: syncedBlockPluginKey,
21
21
  state: {
22
- // @ts-ignore - Workaround for help-center local consumption
23
22
  init(_, instance) {
24
23
  const syncBlockNodes = instance.doc.children.filter(node => node.type.name === 'syncBlock');
25
24
  syncBlockStore.referenceManager.fetchSyncBlocksData(convertPMNodesToSyncBlockNodes(syncBlockNodes));
@@ -29,7 +28,6 @@ export const createPlugin = (options, pmPluginFactoryParams, syncBlockStore, api
29
28
  syncBlockStore: syncBlockStore
30
29
  };
31
30
  },
32
- // @ts-ignore - Workaround for help-center local consumption
33
31
  apply: (tr, currentPluginState, oldEditorState) => {
34
32
  var _meta$showFlag;
35
33
  const meta = tr.getMeta(syncedBlockPluginKey);
@@ -61,7 +59,6 @@ export const createPlugin = (options, pmPluginFactoryParams, syncBlockStore, api
61
59
  api
62
60
  })
63
61
  },
64
- // @ts-ignore - Workaround for help-center local consumption
65
62
  decorations: state => {
66
63
  var _syncedBlockPluginKey, _syncedBlockPluginKey2, _api$connectivity, _api$connectivity$sha, _api$editorViewMode, _api$editorViewMode$s;
67
64
  const selectionDecorationSet = (_syncedBlockPluginKey = (_syncedBlockPluginKey2 = syncedBlockPluginKey.getState(state)) === null || _syncedBlockPluginKey2 === void 0 ? void 0 : _syncedBlockPluginKey2.selectionDecorationSet) !== null && _syncedBlockPluginKey !== void 0 ? _syncedBlockPluginKey : DecorationSet.empty;
@@ -72,8 +69,6 @@ export const createPlugin = (options, pmPluginFactoryParams, syncBlockStore, api
72
69
  const isViewMode = (api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : (_api$editorViewMode$s = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode$s === void 0 ? void 0 : _api$editorViewMode$s.mode) === 'view';
73
70
  const offlineDecorations = [];
74
71
  const viewModeDecorations = [];
75
-
76
- // @ts-ignore - Workaround for help-center local consumption
77
72
  state.doc.descendants((node, pos) => {
78
73
  if (node.type.name === 'bodiedSyncBlock' && isOffline) {
79
74
  offlineDecorations.push(Decoration.node(pos, pos + node.nodeSize, {
@@ -92,11 +87,9 @@ export const createPlugin = (options, pmPluginFactoryParams, syncBlockStore, api
92
87
  useLongPressSelection
93
88
  }),
94
89
  handleDOMEvents: {
95
- // @ts-ignore - Workaround for help-center local consumption
96
90
  mouseover(view, event) {
97
91
  return shouldIgnoreDomEvent(view, event, api);
98
92
  },
99
- // @ts-ignore - Workaround for help-center local consumption
100
93
  mousedown(view, event) {
101
94
  return shouldIgnoreDomEvent(view, event, api);
102
95
  }
@@ -110,7 +103,6 @@ export const createPlugin = (options, pmPluginFactoryParams, syncBlockStore, api
110
103
  }
111
104
  };
112
105
  },
113
- // @ts-ignore - Workaround for help-center local consumption
114
106
  filterTransaction: (tr, state) => {
115
107
  var _api$connectivity2, _api$connectivity2$sh;
116
108
  const isOffline = (api === null || api === void 0 ? void 0 : (_api$connectivity2 = api.connectivity) === null || _api$connectivity2 === void 0 ? void 0 : (_api$connectivity2$sh = _api$connectivity2.sharedState.currentState()) === null || _api$connectivity2$sh === void 0 ? void 0 : _api$connectivity2$sh.mode) === 'offline';
@@ -186,13 +178,8 @@ export const createPlugin = (options, pmPluginFactoryParams, syncBlockStore, api
186
178
  }
187
179
  return true;
188
180
  },
189
- // @ts-ignore - Workaround for help-center local consumption
190
181
  appendTransaction: (trs, oldState, newState) => {
191
- trs
192
- // @ts-ignore - Workaround for help-center local consumption
193
- .filter(tr => tr.docChanged)
194
- // @ts-ignore - Workaround for help-center local consumption
195
- .forEach(tr => {
182
+ trs.filter(tr => tr.docChanged).forEach(tr => {
196
183
  syncBlockStore === null || syncBlockStore === void 0 ? void 0 : syncBlockStore.sourceManager.rebaseTransaction(tr, newState);
197
184
  });
198
185
  for (const tr of trs) {
@@ -22,7 +22,6 @@ export var createPlugin = function createPlugin(options, pmPluginFactoryParams,
22
22
  return new SafePlugin({
23
23
  key: syncedBlockPluginKey,
24
24
  state: {
25
- // @ts-ignore - Workaround for help-center local consumption
26
25
  init: function init(_, instance) {
27
26
  var syncBlockNodes = instance.doc.children.filter(function (node) {
28
27
  return node.type.name === 'syncBlock';
@@ -34,7 +33,6 @@ export var createPlugin = function createPlugin(options, pmPluginFactoryParams,
34
33
  syncBlockStore: syncBlockStore
35
34
  };
36
35
  },
37
- // @ts-ignore - Workaround for help-center local consumption
38
36
  apply: function apply(tr, currentPluginState, oldEditorState) {
39
37
  var _meta$showFlag;
40
38
  var meta = tr.getMeta(syncedBlockPluginKey);
@@ -64,7 +62,6 @@ export var createPlugin = function createPlugin(options, pmPluginFactoryParams,
64
62
  api: api
65
63
  })
66
64
  },
67
- // @ts-ignore - Workaround for help-center local consumption
68
65
  decorations: function decorations(state) {
69
66
  var _syncedBlockPluginKey, _syncedBlockPluginKey2, _api$connectivity, _api$editorViewMode;
70
67
  var selectionDecorationSet = (_syncedBlockPluginKey = (_syncedBlockPluginKey2 = syncedBlockPluginKey.getState(state)) === null || _syncedBlockPluginKey2 === void 0 ? void 0 : _syncedBlockPluginKey2.selectionDecorationSet) !== null && _syncedBlockPluginKey !== void 0 ? _syncedBlockPluginKey : DecorationSet.empty;
@@ -73,8 +70,6 @@ export var createPlugin = function createPlugin(options, pmPluginFactoryParams,
73
70
  var isViewMode = (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view';
74
71
  var offlineDecorations = [];
75
72
  var viewModeDecorations = [];
76
-
77
- // @ts-ignore - Workaround for help-center local consumption
78
73
  state.doc.descendants(function (node, pos) {
79
74
  if (node.type.name === 'bodiedSyncBlock' && isOffline) {
80
75
  offlineDecorations.push(Decoration.node(pos, pos + node.nodeSize, {
@@ -95,11 +90,9 @@ export var createPlugin = function createPlugin(options, pmPluginFactoryParams,
95
90
  useLongPressSelection: useLongPressSelection
96
91
  }),
97
92
  handleDOMEvents: {
98
- // @ts-ignore - Workaround for help-center local consumption
99
93
  mouseover: function mouseover(view, event) {
100
94
  return shouldIgnoreDomEvent(view, event, api);
101
95
  },
102
- // @ts-ignore - Workaround for help-center local consumption
103
96
  mousedown: function mousedown(view, event) {
104
97
  return shouldIgnoreDomEvent(view, event, api);
105
98
  }
@@ -113,7 +106,6 @@ export var createPlugin = function createPlugin(options, pmPluginFactoryParams,
113
106
  }
114
107
  };
115
108
  },
116
- // @ts-ignore - Workaround for help-center local consumption
117
109
  filterTransaction: function filterTransaction(tr, state) {
118
110
  var _api$connectivity2;
119
111
  var isOffline = (api === null || api === void 0 || (_api$connectivity2 = api.connectivity) === null || _api$connectivity2 === void 0 || (_api$connectivity2 = _api$connectivity2.sharedState.currentState()) === null || _api$connectivity2 === void 0 ? void 0 : _api$connectivity2.mode) === 'offline';
@@ -190,15 +182,10 @@ export var createPlugin = function createPlugin(options, pmPluginFactoryParams,
190
182
  }
191
183
  return true;
192
184
  },
193
- // @ts-ignore - Workaround for help-center local consumption
194
185
  appendTransaction: function appendTransaction(trs, oldState, newState) {
195
- trs
196
- // @ts-ignore - Workaround for help-center local consumption
197
- .filter(function (tr) {
186
+ trs.filter(function (tr) {
198
187
  return tr.docChanged;
199
- })
200
- // @ts-ignore - Workaround for help-center local consumption
201
- .forEach(function (tr) {
188
+ }).forEach(function (tr) {
202
189
  syncBlockStore === null || syncBlockStore === void 0 || syncBlockStore.sourceManager.rebaseTransaction(tr, newState);
203
190
  });
204
191
  var _iterator = _createForOfIteratorHelper(trs),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-synced-block",
3
- "version": "4.3.10",
3
+ "version": "4.3.11",
4
4
  "description": "SyncedBlock plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/button": "23.6.3",
33
33
  "@atlaskit/editor-json-transformer": "^8.31.0",
34
34
  "@atlaskit/editor-plugin-analytics": "^6.2.0",
35
- "@atlaskit/editor-plugin-block-menu": "^5.0.0",
35
+ "@atlaskit/editor-plugin-block-menu": "^5.1.0",
36
36
  "@atlaskit/editor-plugin-connectivity": "6.0.0",
37
37
  "@atlaskit/editor-plugin-decorations": "^6.1.0",
38
38
  "@atlaskit/editor-plugin-floating-toolbar": "^8.2.0",