@atlaskit/editor-plugin-base 8.0.2 → 8.0.4

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,19 @@
1
1
  # @atlaskit/editor-plugin-base
2
2
 
3
+ ## 8.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 8.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`3242cbd5e88b9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3242cbd5e88b9) -
14
+ Update packages to match prosemirror library updates
15
+ - Updated dependencies
16
+
3
17
  ## 8.0.2
4
18
 
5
19
  ### Patch Changes
@@ -173,18 +173,19 @@ function handleTextInputInsideCursorTargetDecoration(_ref4) {
173
173
  event.stopPropagation();
174
174
  event.preventDefault();
175
175
  var content = event.data || '';
176
- var tr = view.state.tr;
177
176
 
178
177
  // ensure any custom handleTextInput handlers are called for the input event
179
178
  // ie. type ahead, emoji shortcuts.
179
+ var defaultTransaction = function defaultTransaction() {
180
+ return view.state.tr.insertText(content, cursorTarget.positions.from, cursorTarget.positions.to);
181
+ };
180
182
  var potentiallyHandleByHandleTextInput = view.someProp('handleTextInput', function (f) {
181
- return f(view, cursorTarget.positions.from, cursorTarget.positions.to, content);
183
+ return f(view, cursorTarget.positions.from, cursorTarget.positions.to, content, defaultTransaction);
182
184
  });
183
185
  if (potentiallyHandleByHandleTextInput) {
184
186
  // if a handleTextInput handler has handled the event, we don't want to
185
187
  // manually update the document.
186
188
  return;
187
189
  }
188
- tr.insertText(content);
189
- view.dispatch(tr);
190
+ view.dispatch(defaultTransaction());
190
191
  }
@@ -181,16 +181,15 @@ function handleTextInputInsideCursorTargetDecoration({
181
181
  event.stopPropagation();
182
182
  event.preventDefault();
183
183
  const content = event.data || '';
184
- const tr = view.state.tr;
185
184
 
186
185
  // ensure any custom handleTextInput handlers are called for the input event
187
186
  // ie. type ahead, emoji shortcuts.
188
- const potentiallyHandleByHandleTextInput = view.someProp('handleTextInput', f => f(view, cursorTarget.positions.from, cursorTarget.positions.to, content));
187
+ const defaultTransaction = () => view.state.tr.insertText(content, cursorTarget.positions.from, cursorTarget.positions.to);
188
+ const potentiallyHandleByHandleTextInput = view.someProp('handleTextInput', f => f(view, cursorTarget.positions.from, cursorTarget.positions.to, content, defaultTransaction));
189
189
  if (potentiallyHandleByHandleTextInput) {
190
190
  // if a handleTextInput handler has handled the event, we don't want to
191
191
  // manually update the document.
192
192
  return;
193
193
  }
194
- tr.insertText(content);
195
- view.dispatch(tr);
194
+ view.dispatch(defaultTransaction());
196
195
  }
@@ -167,18 +167,19 @@ function handleTextInputInsideCursorTargetDecoration(_ref4) {
167
167
  event.stopPropagation();
168
168
  event.preventDefault();
169
169
  var content = event.data || '';
170
- var tr = view.state.tr;
171
170
 
172
171
  // ensure any custom handleTextInput handlers are called for the input event
173
172
  // ie. type ahead, emoji shortcuts.
173
+ var defaultTransaction = function defaultTransaction() {
174
+ return view.state.tr.insertText(content, cursorTarget.positions.from, cursorTarget.positions.to);
175
+ };
174
176
  var potentiallyHandleByHandleTextInput = view.someProp('handleTextInput', function (f) {
175
- return f(view, cursorTarget.positions.from, cursorTarget.positions.to, content);
177
+ return f(view, cursorTarget.positions.from, cursorTarget.positions.to, content, defaultTransaction);
176
178
  });
177
179
  if (potentiallyHandleByHandleTextInput) {
178
180
  // if a handleTextInput handler has handled the event, we don't want to
179
181
  // manually update the document.
180
182
  return;
181
183
  }
182
- tr.insertText(content);
183
- view.dispatch(tr);
184
+ view.dispatch(defaultTransaction());
184
185
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-base",
3
- "version": "8.0.2",
3
+ "version": "8.0.4",
4
4
  "description": "Base plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,9 +30,9 @@
30
30
  "@atlaskit/adf-schema": "^51.5.0",
31
31
  "@atlaskit/editor-plugin-context-identifier": "^7.0.0",
32
32
  "@atlaskit/editor-plugin-feature-flags": "^6.0.0",
33
- "@atlaskit/editor-prosemirror": "^7.2.0",
33
+ "@atlaskit/editor-prosemirror": "^7.3.0",
34
34
  "@atlaskit/prosemirror-history": "^0.2.0",
35
- "@atlaskit/tmp-editor-statsig": "^17.0.0",
35
+ "@atlaskit/tmp-editor-statsig": "^18.0.0",
36
36
  "@babel/runtime": "^7.0.0"
37
37
  },
38
38
  "techstack": {
@@ -74,6 +74,6 @@
74
74
  }
75
75
  },
76
76
  "peerDependencies": {
77
- "@atlaskit/editor-common": "^111.9.0"
77
+ "@atlaskit/editor-common": "^111.11.0"
78
78
  }
79
79
  }
package/tsconfig.app.json CHANGED
@@ -28,7 +28,8 @@
28
28
  ],
29
29
  "compilerOptions": {
30
30
  "composite": true,
31
- "outDir": "../../../tsDist/@atlaskit__editor-plugin-base/app"
31
+ "outDir": "../../../tsDist/@atlaskit__editor-plugin-base/app",
32
+ "moduleResolution": "bundler"
32
33
  },
33
34
  "references": [
34
35
  {
package/tsconfig.dev.json CHANGED
@@ -34,7 +34,8 @@
34
34
  "exclude": ["./dist/**/*", "./build/**/*", "./node_modules/**/*"],
35
35
  "compilerOptions": {
36
36
  "composite": true,
37
- "outDir": "../../../tsDist/@atlaskit__editor-plugin-base/dev"
37
+ "outDir": "../../../tsDist/@atlaskit__editor-plugin-base/dev",
38
+ "moduleResolution": "bundler"
38
39
  },
39
40
  "references": [
40
41
  {