@atlaskit/prosemirror-input-rules 2.4.2 → 2.4.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 +30 -18
- package/afm-cc/tsconfig.json +25 -0
- package/dist/cjs/constants.js +3 -6
- package/dist/cjs/handler.js +1 -2
- package/dist/cjs/utils.js +4 -5
- package/dist/esm/utils.js +2 -2
- package/package.json +3 -3
- package/src/__tests__/unit/handler.ts +4 -5
- package/src/__tests__/unit/plugin.ts +6 -3
- package/tmp/api-report-tmp.d.ts +0 -63
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/prosemirror-input-rules
|
|
2
2
|
|
|
3
|
+
## 2.4.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.4.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 2.4.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -16,7 +28,7 @@
|
|
|
16
28
|
|
|
17
29
|
### Minor Changes
|
|
18
30
|
|
|
19
|
-
- [`1944b35b538`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1944b35b538) - move common utilities to editor-common, to help with decoupling block-type plugin
|
|
31
|
+
- [#37964](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37964) [`1944b35b538`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1944b35b538) - move common utilities to editor-common, to help with decoupling block-type plugin
|
|
20
32
|
|
|
21
33
|
### Patch Changes
|
|
22
34
|
|
|
@@ -26,20 +38,20 @@
|
|
|
26
38
|
|
|
27
39
|
### Patch Changes
|
|
28
40
|
|
|
29
|
-
- [`d2ecb6bf1a3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d2ecb6bf1a3) - [ED-19203] Moved input rule types to editor-common to avoid circular dependencies
|
|
41
|
+
- [#37821](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37821) [`d2ecb6bf1a3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d2ecb6bf1a3) - [ED-19203] Moved input rule types to editor-common to avoid circular dependencies
|
|
30
42
|
- Updated dependencies
|
|
31
43
|
|
|
32
44
|
## 2.3.1
|
|
33
45
|
|
|
34
46
|
### Patch Changes
|
|
35
47
|
|
|
36
|
-
- [`4e6f1bf8511`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e6f1bf8511) - [ED-19233] Import prosemirror libraries from internal facade package
|
|
48
|
+
- [#37785](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37785) [`4e6f1bf8511`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e6f1bf8511) - [ED-19233] Import prosemirror libraries from internal facade package
|
|
37
49
|
|
|
38
50
|
## 2.3.0
|
|
39
51
|
|
|
40
52
|
### Minor Changes
|
|
41
53
|
|
|
42
|
-
- [`8b891bf3590`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8b891bf3590) - This change introduces `editor-plugin-hyperlink` which separates the hyperlink plugin from `editor-core`. In order to enable this change there are now new entry points on `editor-common` (such as `/link`, `/quick-insert`) in order to separate common code. Further `prosemirror-input-rules` now has new exports of `createPlugin` and `createRule` which are used in many plugins in `editor-core`.
|
|
54
|
+
- [#36631](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36631) [`8b891bf3590`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8b891bf3590) - This change introduces `editor-plugin-hyperlink` which separates the hyperlink plugin from `editor-core`. In order to enable this change there are now new entry points on `editor-common` (such as `/link`, `/quick-insert`) in order to separate common code. Further `prosemirror-input-rules` now has new exports of `createPlugin` and `createRule` which are used in many plugins in `editor-core`.
|
|
43
55
|
|
|
44
56
|
### Patch Changes
|
|
45
57
|
|
|
@@ -49,39 +61,39 @@
|
|
|
49
61
|
|
|
50
62
|
### Patch Changes
|
|
51
63
|
|
|
52
|
-
- [`5f5ba16de66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f5ba16de66) - [ED-13910] Fix prosemirror types
|
|
64
|
+
- [#36241](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36241) [`5f5ba16de66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f5ba16de66) - [ED-13910] Fix prosemirror types
|
|
53
65
|
|
|
54
66
|
## 2.2.4
|
|
55
67
|
|
|
56
68
|
### Patch Changes
|
|
57
69
|
|
|
58
|
-
- [`73b5128036b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/73b5128036b) - [ED-17082] Mark package as a singleton one
|
|
70
|
+
- [#35782](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35782) [`73b5128036b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/73b5128036b) - [ED-17082] Mark package as a singleton one
|
|
59
71
|
- Updated dependencies
|
|
60
72
|
|
|
61
73
|
## 2.2.3
|
|
62
74
|
|
|
63
75
|
### Patch Changes
|
|
64
76
|
|
|
65
|
-
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
77
|
+
- [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
66
78
|
|
|
67
79
|
## 2.2.2
|
|
68
80
|
|
|
69
81
|
### Patch Changes
|
|
70
82
|
|
|
71
|
-
- [`a142ba1aa28`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a142ba1aa28) - [ED17172] Bump prosemirror-model to 1.16.0 and prosemirror-view to 1.23.7 and removed work-arounds for fixed issues
|
|
83
|
+
- [#33771](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33771) [`a142ba1aa28`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a142ba1aa28) - [ED17172] Bump prosemirror-model to 1.16.0 and prosemirror-view to 1.23.7 and removed work-arounds for fixed issues
|
|
72
84
|
- Updated dependencies
|
|
73
85
|
|
|
74
86
|
## 2.2.1
|
|
75
87
|
|
|
76
88
|
### Patch Changes
|
|
77
89
|
|
|
78
|
-
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
90
|
+
- [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
79
91
|
|
|
80
92
|
## 2.2.0
|
|
81
93
|
|
|
82
94
|
### Minor Changes
|
|
83
95
|
|
|
84
|
-
- [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
96
|
+
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
85
97
|
|
|
86
98
|
### Patch Changes
|
|
87
99
|
|
|
@@ -91,14 +103,14 @@
|
|
|
91
103
|
|
|
92
104
|
### Patch Changes
|
|
93
105
|
|
|
94
|
-
- [`0ffb55018c9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0ffb55018c9) - Revert "[ED-17172] Bumped prosemirror-view from 1.23.2 to 1.23.7 and removed work-around for fixed issues"
|
|
106
|
+
- [#33004](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33004) [`0ffb55018c9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0ffb55018c9) - Revert "[ED-17172] Bumped prosemirror-view from 1.23.2 to 1.23.7 and removed work-around for fixed issues"
|
|
95
107
|
- Updated dependencies
|
|
96
108
|
|
|
97
109
|
## 2.1.11
|
|
98
110
|
|
|
99
111
|
### Patch Changes
|
|
100
112
|
|
|
101
|
-
- [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
|
|
113
|
+
- [#32424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32424) [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
|
|
102
114
|
- Updated dependencies
|
|
103
115
|
|
|
104
116
|
## 2.1.10
|
|
@@ -111,7 +123,7 @@
|
|
|
111
123
|
|
|
112
124
|
### Patch Changes
|
|
113
125
|
|
|
114
|
-
- [`0606572f9b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0606572f9b8) - [ux] ED-15348 docs(changeset): ED-15348 Fix a bug preventing typeahead actions to be fired from a gap cursor. Typing a typeahead trigger key (/, : or @) should pop-up a typeahead menu. However, if the current selection is inside a gap cursor, the trigger character is inserted and the pop-up menu doesn't open. This changeset fixes that.
|
|
126
|
+
- [#26712](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26712) [`0606572f9b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0606572f9b8) - [ux] ED-15348 docs(changeset): ED-15348 Fix a bug preventing typeahead actions to be fired from a gap cursor. Typing a typeahead trigger key (/, : or @) should pop-up a typeahead menu. However, if the current selection is inside a gap cursor, the trigger character is inserted and the pop-up menu doesn't open. This changeset fixes that.
|
|
115
127
|
- Updated dependencies
|
|
116
128
|
|
|
117
129
|
## 2.1.8
|
|
@@ -154,7 +166,7 @@
|
|
|
154
166
|
|
|
155
167
|
### Patch Changes
|
|
156
168
|
|
|
157
|
-
- [`4e6fbaf5898`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e6fbaf5898) - ED-14117 Change EditorState.apply type to receive readonly transaction
|
|
169
|
+
- [#18526](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/18526) [`4e6fbaf5898`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e6fbaf5898) - ED-14117 Change EditorState.apply type to receive readonly transaction
|
|
158
170
|
|
|
159
171
|
Transactions should not be mutated after being dispatched as it can lead to
|
|
160
172
|
unexpected behaviour. This change patches the relevant types declared in
|
|
@@ -166,13 +178,13 @@
|
|
|
166
178
|
|
|
167
179
|
### Patch Changes
|
|
168
180
|
|
|
169
|
-
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - ED-13025 Bump prosemirror-view 1.23.1 -> 1.23.2
|
|
181
|
+
- [#16752](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/16752) [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - ED-13025 Bump prosemirror-view 1.23.1 -> 1.23.2
|
|
170
182
|
|
|
171
183
|
## 2.1.0
|
|
172
184
|
|
|
173
185
|
### Minor Changes
|
|
174
186
|
|
|
175
|
-
- [`b230f366971`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b230f366971) - [ED-14008] Bump prosemirror-view from 1.20.2 to 1.23.1
|
|
187
|
+
- [#15998](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/15998) [`b230f366971`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b230f366971) - [ED-14008] Bump prosemirror-view from 1.20.2 to 1.23.1
|
|
176
188
|
|
|
177
189
|
### Patch Changes
|
|
178
190
|
|
|
@@ -188,13 +200,13 @@
|
|
|
188
200
|
|
|
189
201
|
### Patch Changes
|
|
190
202
|
|
|
191
|
-
- [`312a2810b0b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/312a2810b0b) - [ux] ED-12931 Fix input rules replacing text outside of matched word in a long paragraph
|
|
203
|
+
- [#10943](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/10943) [`312a2810b0b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/312a2810b0b) - [ux] ED-12931 Fix input rules replacing text outside of matched word in a long paragraph
|
|
192
204
|
|
|
193
205
|
## 2.0.0
|
|
194
206
|
|
|
195
207
|
### Major Changes
|
|
196
208
|
|
|
197
|
-
- [`d989a24dd88`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d989a24dd88) - [ED-11915] New package to manage auto formatting rules without a undoInputRules
|
|
209
|
+
- [#10230](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/10230) [`d989a24dd88`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d989a24dd88) - [ED-11915] New package to manage auto formatting rules without a undoInputRules
|
|
198
210
|
|
|
199
211
|
### Minor Changes
|
|
200
212
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.confluence.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"composite": true,
|
|
7
|
+
"outDir": "../dist",
|
|
8
|
+
"rootDir": "../",
|
|
9
|
+
"baseUrl": "../"
|
|
10
|
+
},
|
|
11
|
+
"include": [
|
|
12
|
+
"../src/**/*.ts",
|
|
13
|
+
"../src/**/*.tsx"
|
|
14
|
+
],
|
|
15
|
+
"exclude": [
|
|
16
|
+
"../src/**/__tests__/*",
|
|
17
|
+
"../src/**/*.test.*",
|
|
18
|
+
"../src/**/test.*"
|
|
19
|
+
],
|
|
20
|
+
"references": [
|
|
21
|
+
{
|
|
22
|
+
"path": "../../editor-common/afm-cc/tsconfig.json"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
package/dist/cjs/constants.js
CHANGED
|
@@ -8,9 +8,6 @@ exports.leafNodeReplacementCharacter = exports.TEXT_INPUT_RULE_TRANSACTION_KEY =
|
|
|
8
8
|
// leaf nodes, i.e. nodes that don't have any content or text property (e.g. hardBreak, emoji, mention, rule)
|
|
9
9
|
// It was introduced because of https://github.com/ProseMirror/prosemirror/issues/262
|
|
10
10
|
// This can be used in an input rule regex to be able to include or exclude such nodes.
|
|
11
|
-
var leafNodeReplacementCharacter = "\uFFFC";
|
|
12
|
-
exports.
|
|
13
|
-
var
|
|
14
|
-
exports.TEXT_INPUT_RULE_TRANSACTION_KEY = TEXT_INPUT_RULE_TRANSACTION_KEY;
|
|
15
|
-
var MAX_REGEX_MATCH = 500;
|
|
16
|
-
exports.MAX_REGEX_MATCH = MAX_REGEX_MATCH;
|
|
11
|
+
var leafNodeReplacementCharacter = exports.leafNodeReplacementCharacter = "\uFFFC";
|
|
12
|
+
var TEXT_INPUT_RULE_TRANSACTION_KEY = exports.TEXT_INPUT_RULE_TRANSACTION_KEY = 'input_rule_plugin_transaction';
|
|
13
|
+
var MAX_REGEX_MATCH = exports.MAX_REGEX_MATCH = 500;
|
package/dist/cjs/handler.js
CHANGED
|
@@ -10,7 +10,7 @@ var _selection = require("@atlaskit/editor-common/selection");
|
|
|
10
10
|
var _constants = require("./constants");
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
-
var createInputEventHandler = function createInputEventHandler(_ref) {
|
|
13
|
+
var createInputEventHandler = exports.createInputEventHandler = function createInputEventHandler(_ref) {
|
|
14
14
|
var rules = _ref.rules,
|
|
15
15
|
pluginKey = _ref.pluginKey,
|
|
16
16
|
allowInsertTextOnDocument = _ref.allowInsertTextOnDocument,
|
|
@@ -62,7 +62,6 @@ var createInputEventHandler = function createInputEventHandler(_ref) {
|
|
|
62
62
|
return true;
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
exports.createInputEventHandler = createInputEventHandler;
|
|
66
65
|
function findMatchOnRules(_ref3) {
|
|
67
66
|
var rules = _ref3.rules,
|
|
68
67
|
textBefore = _ref3.textBefore,
|
package/dist/cjs/utils.js
CHANGED
|
@@ -25,7 +25,7 @@ var hasUnsupportedMarks = function hasUnsupportedMarks(state, start, end, marksN
|
|
|
25
25
|
return (marksInSelection || []).some(isUnsupportedMark);
|
|
26
26
|
};
|
|
27
27
|
var isCursorInsideUnsupportedMarks = function isCursorInsideUnsupportedMarks(state, marksNameUnsupported) {
|
|
28
|
-
var _$cursor$nodeBefore
|
|
28
|
+
var _$cursor$nodeBefore;
|
|
29
29
|
var selection = state.selection;
|
|
30
30
|
if (!(selection instanceof _state.TextSelection)) {
|
|
31
31
|
return false;
|
|
@@ -34,9 +34,9 @@ var isCursorInsideUnsupportedMarks = function isCursorInsideUnsupportedMarks(sta
|
|
|
34
34
|
var isUnsupportedMark = function isUnsupportedMark(node) {
|
|
35
35
|
return marksNameUnsupported.includes(node.type.name);
|
|
36
36
|
};
|
|
37
|
-
return Boolean($cursor === null || $cursor === void 0
|
|
37
|
+
return Boolean($cursor === null || $cursor === void 0 || (_$cursor$nodeBefore = $cursor.nodeBefore) === null || _$cursor$nodeBefore === void 0 || (_$cursor$nodeBefore = _$cursor$nodeBefore.marks) === null || _$cursor$nodeBefore === void 0 ? void 0 : _$cursor$nodeBefore.some(isUnsupportedMark));
|
|
38
38
|
};
|
|
39
|
-
var createPlugin = function createPlugin(pluginName, rules) {
|
|
39
|
+
var createPlugin = exports.createPlugin = function createPlugin(pluginName, rules) {
|
|
40
40
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
41
41
|
var _options$isBlockNodeR = options.isBlockNodeRule,
|
|
42
42
|
isBlockNodeRule = _options$isBlockNodeR === void 0 ? false : _options$isBlockNodeR,
|
|
@@ -60,5 +60,4 @@ var createPlugin = function createPlugin(pluginName, rules) {
|
|
|
60
60
|
(0, _history.closeHistory)(tr);
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
-
};
|
|
64
|
-
exports.createPlugin = createPlugin;
|
|
63
|
+
};
|
package/dist/esm/utils.js
CHANGED
|
@@ -13,7 +13,7 @@ var hasUnsupportedMarks = function hasUnsupportedMarks(state, start, end, marksN
|
|
|
13
13
|
return (marksInSelection || []).some(isUnsupportedMark);
|
|
14
14
|
};
|
|
15
15
|
var isCursorInsideUnsupportedMarks = function isCursorInsideUnsupportedMarks(state, marksNameUnsupported) {
|
|
16
|
-
var _$cursor$nodeBefore
|
|
16
|
+
var _$cursor$nodeBefore;
|
|
17
17
|
var selection = state.selection;
|
|
18
18
|
if (!(selection instanceof TextSelection)) {
|
|
19
19
|
return false;
|
|
@@ -22,7 +22,7 @@ var isCursorInsideUnsupportedMarks = function isCursorInsideUnsupportedMarks(sta
|
|
|
22
22
|
var isUnsupportedMark = function isUnsupportedMark(node) {
|
|
23
23
|
return marksNameUnsupported.includes(node.type.name);
|
|
24
24
|
};
|
|
25
|
-
return Boolean($cursor === null || $cursor === void 0
|
|
25
|
+
return Boolean($cursor === null || $cursor === void 0 || (_$cursor$nodeBefore = $cursor.nodeBefore) === null || _$cursor$nodeBefore === void 0 || (_$cursor$nodeBefore = _$cursor$nodeBefore.marks) === null || _$cursor$nodeBefore === void 0 ? void 0 : _$cursor$nodeBefore.some(isUnsupportedMark));
|
|
26
26
|
};
|
|
27
27
|
export var createPlugin = function createPlugin(pluginName, rules) {
|
|
28
28
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/prosemirror-input-rules",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"description": "A package that contains helpers to create autoformatting rules for ProseMirror",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
7
7
|
},
|
|
8
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
9
|
"author": "Atlassian Pty Ltd",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "dist/cjs/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"releaseModel": "continuous"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/editor-common": "^
|
|
31
|
+
"@atlaskit/editor-common": "^77.0.0",
|
|
32
32
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
33
33
|
"@babel/runtime": "^7.0.0"
|
|
34
34
|
},
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
PluginKey,
|
|
4
|
-
Transaction,
|
|
5
|
-
} from '@atlaskit/editor-prosemirror/state';
|
|
1
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import { EditorState, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
3
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
7
5
|
import { createEditorState } from '@atlaskit/editor-test-helpers/create-editor-state';
|
|
6
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
8
7
|
import { code_block, doc, p } from '@atlaskit/editor-test-helpers/doc-builder';
|
|
9
8
|
|
|
10
9
|
import { createInputEventHandler } from '../../handler';
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import {
|
|
1
|
+
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
+
import type { DocBuilder } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
4
6
|
import { createEditorState } from '@atlaskit/editor-test-helpers/create-editor-state';
|
|
5
|
-
import
|
|
7
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
8
|
+
import { doc, p } from '@atlaskit/editor-test-helpers/doc-builder';
|
|
6
9
|
|
|
7
10
|
import { createInputRulePlugin } from '../../plugin';
|
|
8
11
|
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/prosemirror-input-rules"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import { createRule } from '@atlaskit/editor-common/utils';
|
|
8
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
9
|
-
import type { InputRuleHandler } from '@atlaskit/editor-common/types';
|
|
10
|
-
import type { InputRuleWrapper } from '@atlaskit/editor-common/types';
|
|
11
|
-
import type { OnHandlerApply } from '@atlaskit/editor-common/types';
|
|
12
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
13
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
14
|
-
|
|
15
|
-
// @public (undocumented)
|
|
16
|
-
export function createInputRulePlugin(pluginName: string, rules: InputRuleWrapper[], options?: Options): SafePlugin;
|
|
17
|
-
|
|
18
|
-
// @public (undocumented)
|
|
19
|
-
export const createPlugin: (pluginName: string, rules: Array<InputRuleWrapper>, options?: Options_2) => SafePlugin;
|
|
20
|
-
|
|
21
|
-
export { createRule }
|
|
22
|
-
|
|
23
|
-
export { InputRuleHandler }
|
|
24
|
-
|
|
25
|
-
export { InputRuleWrapper }
|
|
26
|
-
|
|
27
|
-
// @public (undocumented)
|
|
28
|
-
export const leafNodeReplacementCharacter = "\uFFFC";
|
|
29
|
-
|
|
30
|
-
// @public (undocumented)
|
|
31
|
-
export const MAX_REGEX_MATCH = 500;
|
|
32
|
-
|
|
33
|
-
// @public (undocumented)
|
|
34
|
-
type OnBeforeRegexMatch = (tr: Transaction) => void;
|
|
35
|
-
|
|
36
|
-
export { OnHandlerApply }
|
|
37
|
-
|
|
38
|
-
// @public (undocumented)
|
|
39
|
-
export type OnInputEvent = (props: {
|
|
40
|
-
state: EditorState;
|
|
41
|
-
from: number;
|
|
42
|
-
to: number;
|
|
43
|
-
}) => boolean;
|
|
44
|
-
|
|
45
|
-
// @public (undocumented)
|
|
46
|
-
type Options = {
|
|
47
|
-
allowInsertTextOnDocument?: boolean;
|
|
48
|
-
onInputEvent?: OnInputEvent;
|
|
49
|
-
onBeforeRegexMatch?: OnBeforeRegexMatch;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
// @public (undocumented)
|
|
53
|
-
type Options_2 = {
|
|
54
|
-
isBlockNodeRule?: boolean;
|
|
55
|
-
allowInsertTextOnDocument?: boolean;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
// @public (undocumented)
|
|
59
|
-
export const TEXT_INPUT_RULE_TRANSACTION_KEY = "input_rule_plugin_transaction";
|
|
60
|
-
|
|
61
|
-
// (No @packageDocumentation comment for this package)
|
|
62
|
-
|
|
63
|
-
```
|