@atlaskit/prosemirror-input-rules 2.2.0 → 2.2.1

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,11 @@
1
1
  # @atlaskit/prosemirror-input-rules
2
2
 
3
+ ## 2.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
8
+
3
9
  ## 2.2.0
4
10
 
5
11
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/prosemirror-input-rules",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/prosemirror-input-rules",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/prosemirror-input-rules",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import type { PluginKey } from 'prosemirror-state';
2
2
  import type { HandleInputEvent, InputRuleWrapper, OnBeforeRegexMatch, OnInputEvent } from './types';
3
- declare type Options = {
3
+ type Options = {
4
4
  pluginKey: PluginKey;
5
5
  rules: InputRuleWrapper[];
6
6
  allowInsertTextOnDocument: boolean;
@@ -1,6 +1,6 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { InputRuleWrapper, OnBeforeRegexMatch, OnInputEvent } from './types';
3
- declare type Options = {
3
+ type Options = {
4
4
  allowInsertTextOnDocument?: boolean;
5
5
  onInputEvent?: OnInputEvent;
6
6
  onBeforeRegexMatch?: OnBeforeRegexMatch;
@@ -1,30 +1,30 @@
1
1
  import type { EditorState, Transaction } from 'prosemirror-state';
2
2
  import type { EditorView } from 'prosemirror-view';
3
- export declare type InputRuleHandler = (state: EditorState, matchResult: RegExpExecArray, start: number, end: number) => Transaction | null;
4
- export declare type HandleInputEvent = (props: {
3
+ export type InputRuleHandler = (state: EditorState, matchResult: RegExpExecArray, start: number, end: number) => Transaction | null;
4
+ export type HandleInputEvent = (props: {
5
5
  view: EditorView;
6
6
  from: number;
7
7
  to: number;
8
8
  text: string;
9
9
  }) => boolean;
10
- export declare type InputRulePluginState = {
10
+ export type InputRulePluginState = {
11
11
  matchedRule: MatchedRule;
12
12
  from: number;
13
13
  to: number;
14
14
  textInserted: string;
15
15
  } | null;
16
- export declare type OnHandlerApply = (state: EditorState, tr: Transaction, matchResult: RegExpExecArray) => void;
16
+ export type OnHandlerApply = (state: EditorState, tr: Transaction, matchResult: RegExpExecArray) => void;
17
17
  export interface InputRuleWrapper {
18
18
  match: RegExp;
19
19
  handler: InputRuleHandler;
20
20
  onHandlerApply?: OnHandlerApply;
21
21
  }
22
- export declare type MatchedRule = InputRuleWrapper & {
22
+ export type MatchedRule = InputRuleWrapper & {
23
23
  result: RegExpExecArray;
24
24
  };
25
- export declare type OnInputEvent = (props: {
25
+ export type OnInputEvent = (props: {
26
26
  state: EditorState;
27
27
  from: number;
28
28
  to: number;
29
29
  }) => boolean;
30
- export declare type OnBeforeRegexMatch = (tr: Transaction) => void;
30
+ export type OnBeforeRegexMatch = (tr: Transaction) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/prosemirror-input-rules",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "A package that contains helpers to create autoformatting rules for ProseMirror",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,6 +12,14 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
15
23
  "sideEffects": false,
16
24
  "atlaskit:src": "src/index.ts",
17
25
  "atlassian": {
@@ -25,7 +33,7 @@
25
33
  },
26
34
  "devDependencies": {
27
35
  "@atlaskit/adf-schema": "^25.6.0",
28
- "@atlaskit/editor-test-helpers": "^18.2.0",
36
+ "@atlaskit/editor-test-helpers": "^18.3.0",
29
37
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
30
38
  "@types/prosemirror-history": "^1.0.1",
31
39
  "@types/prosemirror-model": "^1.11.0",