@atlaskit/prosemirror-input-rules 2.2.3 → 2.2.5

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,18 @@
1
1
  # @atlaskit/prosemirror-input-rules
2
2
 
3
+ ## 2.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5f5ba16de66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f5ba16de66) - [ED-13910] Fix prosemirror types
8
+
9
+ ## 2.2.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [`73b5128036b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/73b5128036b) - [ED-17082] Mark package as a singleton one
14
+ - Updated dependencies
15
+
3
16
  ## 2.2.3
4
17
 
5
18
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/prosemirror-input-rules",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/prosemirror-input-rules",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/prosemirror-input-rules",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/prosemirror-input-rules",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "A package that contains helpers to create autoformatting rules for ProseMirror",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,21 +24,17 @@
24
24
  "atlaskit:src": "src/index.ts",
25
25
  "atlassian": {
26
26
  "team": "Editor",
27
- "releaseModel": "scheduled"
27
+ "singleton": true,
28
+ "releaseModel": "continuous"
28
29
  },
29
30
  "dependencies": {
30
- "@atlaskit/editor-common": "^74.1.0",
31
+ "@atlaskit/editor-common": "^74.15.0",
31
32
  "@babel/runtime": "^7.0.0",
32
33
  "prosemirror-state": "1.3.4"
33
34
  },
34
35
  "devDependencies": {
35
- "@atlaskit/adf-schema": "^25.6.0",
36
- "@atlaskit/editor-test-helpers": "^18.3.0",
36
+ "@atlaskit/editor-test-helpers": "^18.8.0",
37
37
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
38
- "@types/prosemirror-history": "^1.0.1",
39
- "@types/prosemirror-model": "^1.11.0",
40
- "@types/prosemirror-state": "^1.2.0",
41
- "@types/prosemirror-view": "^1.9.0",
42
38
  "prosemirror-view": "1.23.7"
43
39
  },
44
40
  "techstack": {
@@ -27,7 +27,7 @@ describe('input-tule/handles/createInputEventHandler', () => {
27
27
 
28
28
  beforeEach(() => {
29
29
  initialEditorState = createEditorState(doc(p('before{<>}')));
30
- editorView = new EditorView(undefined, {
30
+ editorView = new EditorView(null, {
31
31
  state: initialEditorState,
32
32
  });
33
33
 
@@ -52,7 +52,7 @@ describe('input-tule/handles/createInputEventHandler', () => {
52
52
  let inputHandleResult: boolean;
53
53
  beforeEach(() => {
54
54
  const newEditorState = createEditorState(doc(code_block()('before{<>}')));
55
- editorView = new EditorView(undefined, {
55
+ editorView = new EditorView(null, {
56
56
  state: newEditorState,
57
57
  });
58
58
 
@@ -0,0 +1,58 @@
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 type { EditorState } from 'prosemirror-state';
8
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
9
+ import type { Transaction } from 'prosemirror-state';
10
+
11
+ // @public (undocumented)
12
+ export function createInputRulePlugin(pluginName: string, rules: InputRuleWrapper[], options?: Options): SafePlugin;
13
+
14
+ // @public (undocumented)
15
+ export type InputRuleHandler = (state: EditorState, matchResult: RegExpExecArray, start: number, end: number) => Transaction | null;
16
+
17
+ // @public (undocumented)
18
+ export interface InputRuleWrapper {
19
+ // (undocumented)
20
+ handler: InputRuleHandler;
21
+ // (undocumented)
22
+ match: RegExp;
23
+ // (undocumented)
24
+ onHandlerApply?: OnHandlerApply;
25
+ }
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
+ // @public (undocumented)
37
+ export type OnHandlerApply = (state: EditorState, tr: Transaction, matchResult: RegExpExecArray) => void;
38
+
39
+ // @public (undocumented)
40
+ export type OnInputEvent = (props: {
41
+ state: EditorState;
42
+ from: number;
43
+ to: number;
44
+ }) => boolean;
45
+
46
+ // @public (undocumented)
47
+ type Options = {
48
+ allowInsertTextOnDocument?: boolean;
49
+ onInputEvent?: OnInputEvent;
50
+ onBeforeRegexMatch?: OnBeforeRegexMatch;
51
+ };
52
+
53
+ // @public (undocumented)
54
+ export const TEXT_INPUT_RULE_TRANSACTION_KEY = "input_rule_plugin_transaction";
55
+
56
+ // (No @packageDocumentation comment for this package)
57
+
58
+ ```