@atlaskit/prosemirror-input-rules 2.1.4 → 2.1.7
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 +18 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +4 -4
- package/report.api.md +57 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/prosemirror-input-rules
|
|
2
2
|
|
|
3
|
+
## 2.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.1.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 2.1.5
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 2.1.4
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/prosemirror-input-rules",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"description": "A package that contains helpers to create autoformatting rules for ProseMirror",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"releaseModel": "scheduled"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@atlaskit/editor-common": "^
|
|
22
|
+
"@atlaskit/editor-common": "^69.0.0",
|
|
23
23
|
"@babel/runtime": "^7.0.0",
|
|
24
24
|
"prosemirror-state": "1.3.4"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@atlaskit/adf-schema": "^
|
|
28
|
-
"@atlaskit/editor-test-helpers": "^17.
|
|
27
|
+
"@atlaskit/adf-schema": "^23.2.0",
|
|
28
|
+
"@atlaskit/editor-test-helpers": "^17.1.0",
|
|
29
29
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
30
30
|
"@types/prosemirror-history": "^1.0.1",
|
|
31
31
|
"@types/prosemirror-model": "^1.11.0",
|
package/report.api.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
import type { EditorState } from 'prosemirror-state';
|
|
7
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
8
|
+
import type { Transaction } from 'prosemirror-state';
|
|
9
|
+
|
|
10
|
+
export declare function createInputRulePlugin(
|
|
11
|
+
pluginName: string,
|
|
12
|
+
rules: InputRuleWrapper[],
|
|
13
|
+
options?: Options,
|
|
14
|
+
): SafePlugin;
|
|
15
|
+
|
|
16
|
+
export declare type InputRuleHandler = (
|
|
17
|
+
state: EditorState,
|
|
18
|
+
matchResult: RegExpExecArray,
|
|
19
|
+
start: number,
|
|
20
|
+
end: number,
|
|
21
|
+
) => Transaction | null;
|
|
22
|
+
|
|
23
|
+
export declare interface InputRuleWrapper {
|
|
24
|
+
match: RegExp;
|
|
25
|
+
handler: InputRuleHandler;
|
|
26
|
+
onHandlerApply?: OnHandlerApply;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export declare const leafNodeReplacementCharacter = '\uFFFC';
|
|
30
|
+
|
|
31
|
+
export declare const MAX_REGEX_MATCH = 500;
|
|
32
|
+
|
|
33
|
+
declare type OnBeforeRegexMatch = (tr: Transaction) => void;
|
|
34
|
+
|
|
35
|
+
export declare type OnHandlerApply = (
|
|
36
|
+
state: EditorState,
|
|
37
|
+
tr: Transaction,
|
|
38
|
+
matchResult: RegExpExecArray,
|
|
39
|
+
) => void;
|
|
40
|
+
|
|
41
|
+
export declare type OnInputEvent = (props: {
|
|
42
|
+
state: EditorState;
|
|
43
|
+
from: number;
|
|
44
|
+
to: number;
|
|
45
|
+
}) => boolean;
|
|
46
|
+
|
|
47
|
+
declare type Options = {
|
|
48
|
+
allowInsertTextOnDocument?: boolean;
|
|
49
|
+
onInputEvent?: OnInputEvent;
|
|
50
|
+
onBeforeRegexMatch?: OnBeforeRegexMatch;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export declare const TEXT_INPUT_RULE_TRANSACTION_KEY =
|
|
54
|
+
'input_rule_plugin_transaction';
|
|
55
|
+
|
|
56
|
+
export {};
|
|
57
|
+
```
|