@atlaskit/prosemirror-input-rules 3.2.2 → 3.2.3
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 +8 -0
- package/afm-cc/tsconfig.json +1 -2
- package/afm-jira/tsconfig.json +19 -19
- package/dist/es2019/index.js +3 -0
- package/dist/esm/index.js +3 -0
- package/dist/types/handler.d.ts +2 -1
- package/dist/types/plugin.d.ts +2 -1
- package/dist/types/types.d.ts +0 -1
- package/dist/types/utils.d.ts +1 -1
- package/dist/types-ts4.5/handler.d.ts +2 -1
- package/dist/types-ts4.5/plugin.d.ts +2 -1
- package/dist/types-ts4.5/types.d.ts +0 -1
- package/dist/types-ts4.5/utils.d.ts +1 -1
- package/package.json +3 -3
- package/src/__tests__/unit/handler.ts +2 -1
- package/src/handler.ts +1 -1
- package/src/index.ts +2 -0
- package/src/plugin.ts +2 -6
- package/src/types.ts +0 -2
- package/src/utils.ts +2 -1
- package/tsconfig.dev.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/prosemirror-input-rules
|
|
2
2
|
|
|
3
|
+
## 3.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#164503](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/164503)
|
|
8
|
+
[`9dcc5abdbf880`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9dcc5abdbf880) -
|
|
9
|
+
Removed internal re-exports in input rules
|
|
10
|
+
|
|
3
11
|
## 3.2.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
package/afm-jira/tsconfig.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.jira.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../tsDist/@atlaskit__prosemirror-input-rules/app",
|
|
7
|
+
"rootDir": "../",
|
|
8
|
+
"composite": true
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../src/**/*.ts",
|
|
12
|
+
"../src/**/*.tsx"
|
|
13
|
+
],
|
|
14
|
+
"exclude": [
|
|
15
|
+
"../src/**/__tests__/*",
|
|
16
|
+
"../src/**/*.test.*",
|
|
17
|
+
"../src/**/test.*"
|
|
18
|
+
],
|
|
19
|
+
"references": []
|
|
20
|
+
}
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
+
// Entry file in package.json
|
|
3
|
+
|
|
1
4
|
export { leafNodeReplacementCharacter, TEXT_INPUT_RULE_TRANSACTION_KEY, MAX_REGEX_MATCH } from './constants';
|
|
2
5
|
export { createInputRulePlugin } from './plugin';
|
|
3
6
|
export { createPlugin } from './utils';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
+
// Entry file in package.json
|
|
3
|
+
|
|
1
4
|
export { leafNodeReplacementCharacter, TEXT_INPUT_RULE_TRANSACTION_KEY, MAX_REGEX_MATCH } from './constants';
|
|
2
5
|
export { createInputRulePlugin } from './plugin';
|
|
3
6
|
export { createPlugin } from './utils';
|
package/dist/types/handler.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type {
|
|
2
|
+
import type { InputRuleWrapper } from './editor-common';
|
|
3
|
+
import type { HandleInputEvent, OnBeforeRegexMatch, OnInputEvent } from './types';
|
|
3
4
|
type Options = {
|
|
4
5
|
pluginKey: PluginKey;
|
|
5
6
|
rules: InputRuleWrapper[];
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SafePluginSpec } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { InputRuleWrapper
|
|
2
|
+
import type { InputRuleWrapper } from './editor-common';
|
|
3
|
+
import type { OnBeforeRegexMatch, OnInputEvent } from './types';
|
|
3
4
|
type Options = {
|
|
4
5
|
allowInsertTextOnDocument?: boolean;
|
|
5
6
|
onInputEvent?: OnInputEvent;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { InputRuleWrapper } from './editor-common';
|
|
4
|
-
export type { InputRuleHandler, InputRuleWrapper, OnHandlerApply } from './editor-common';
|
|
5
4
|
export type HandleInputEvent = (props: {
|
|
6
5
|
view: EditorView;
|
|
7
6
|
from: number;
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SafePluginSpec } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { InputRuleWrapper } from './
|
|
2
|
+
import type { InputRuleWrapper } from './editor-common';
|
|
3
3
|
type Options = {
|
|
4
4
|
isBlockNodeRule?: boolean;
|
|
5
5
|
allowInsertTextOnDocument?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type {
|
|
2
|
+
import type { InputRuleWrapper } from './editor-common';
|
|
3
|
+
import type { HandleInputEvent, OnBeforeRegexMatch, OnInputEvent } from './types';
|
|
3
4
|
type Options = {
|
|
4
5
|
pluginKey: PluginKey;
|
|
5
6
|
rules: InputRuleWrapper[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SafePluginSpec } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { InputRuleWrapper
|
|
2
|
+
import type { InputRuleWrapper } from './editor-common';
|
|
3
|
+
import type { OnBeforeRegexMatch, OnInputEvent } from './types';
|
|
3
4
|
type Options = {
|
|
4
5
|
allowInsertTextOnDocument?: boolean;
|
|
5
6
|
onInputEvent?: OnInputEvent;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { InputRuleWrapper } from './editor-common';
|
|
4
|
-
export type { InputRuleHandler, InputRuleWrapper, OnHandlerApply } from './editor-common';
|
|
5
4
|
export type HandleInputEvent = (props: {
|
|
6
5
|
view: EditorView;
|
|
7
6
|
from: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SafePluginSpec } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { InputRuleWrapper } from './
|
|
2
|
+
import type { InputRuleWrapper } from './editor-common';
|
|
3
3
|
type Options = {
|
|
4
4
|
isBlockNodeRule?: boolean;
|
|
5
5
|
allowInsertTextOnDocument?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/prosemirror-input-rules",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.3",
|
|
4
4
|
"description": "A package that contains helpers to create autoformatting rules for ProseMirror",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"singleton": true
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/editor-prosemirror": "6.
|
|
30
|
+
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
31
31
|
"@babel/runtime": "^7.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
34
|
+
"@atlaskit/editor-common": "^96.3.0"
|
|
35
35
|
},
|
|
36
36
|
"techstack": {
|
|
37
37
|
"@atlassian/frontend": {
|
|
@@ -6,8 +6,9 @@ import { createEditorState } from '@atlaskit/editor-test-helpers/create-editor-s
|
|
|
6
6
|
// eslint-disable-next-line import/no-extraneous-dependencies -- Removed import for fixing circular dependencies
|
|
7
7
|
import { code_block, doc, p } from '@atlaskit/editor-test-helpers/doc-builder';
|
|
8
8
|
|
|
9
|
+
import type { InputRuleWrapper } from '../../editor-common';
|
|
9
10
|
import { createInputEventHandler } from '../../handler';
|
|
10
|
-
import type { HandleInputEvent
|
|
11
|
+
import type { HandleInputEvent } from '../../types';
|
|
11
12
|
|
|
12
13
|
describe('input-tule/handles/createInputEventHandler', () => {
|
|
13
14
|
let inputEvent: HandleInputEvent;
|
package/src/handler.ts
CHANGED
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
TEXT_INPUT_RULE_TRANSACTION_KEY,
|
|
7
7
|
} from './constants';
|
|
8
8
|
import { isGapCursorSelection } from './editor-common';
|
|
9
|
+
import type { InputRuleWrapper } from './editor-common';
|
|
9
10
|
import type {
|
|
10
11
|
HandleInputEvent,
|
|
11
12
|
InputRulePluginState,
|
|
12
|
-
InputRuleWrapper,
|
|
13
13
|
MatchedRule,
|
|
14
14
|
OnBeforeRegexMatch,
|
|
15
15
|
OnInputEvent,
|
package/src/index.ts
CHANGED
package/src/plugin.ts
CHANGED
|
@@ -2,13 +2,9 @@ import type { SafePluginSpec } from '@atlaskit/editor-prosemirror/state';
|
|
|
2
2
|
import { PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
|
|
4
4
|
import { TEXT_INPUT_RULE_TRANSACTION_KEY } from './constants';
|
|
5
|
+
import type { InputRuleWrapper } from './editor-common';
|
|
5
6
|
import { createInputEventHandler } from './handler';
|
|
6
|
-
import type {
|
|
7
|
-
InputRulePluginState,
|
|
8
|
-
InputRuleWrapper,
|
|
9
|
-
OnBeforeRegexMatch,
|
|
10
|
-
OnInputEvent,
|
|
11
|
-
} from './types';
|
|
7
|
+
import type { InputRulePluginState, OnBeforeRegexMatch, OnInputEvent } from './types';
|
|
12
8
|
|
|
13
9
|
type Options = {
|
|
14
10
|
allowInsertTextOnDocument?: boolean;
|
package/src/types.ts
CHANGED
|
@@ -3,8 +3,6 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
3
3
|
|
|
4
4
|
import type { InputRuleWrapper } from './editor-common';
|
|
5
5
|
|
|
6
|
-
export type { InputRuleHandler, InputRuleWrapper, OnHandlerApply } from './editor-common';
|
|
7
|
-
|
|
8
6
|
export type HandleInputEvent = (props: {
|
|
9
7
|
view: EditorView;
|
|
10
8
|
from: number;
|
package/src/utils.ts
CHANGED
|
@@ -4,8 +4,9 @@ import type { EditorState, SafePluginSpec } from '@atlaskit/editor-prosemirror/s
|
|
|
4
4
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
|
|
6
6
|
import { isGapCursorSelection } from './editor-common';
|
|
7
|
+
import type { InputRuleWrapper } from './editor-common';
|
|
7
8
|
import { createInputRulePlugin } from './plugin';
|
|
8
|
-
import type {
|
|
9
|
+
import type { OnInputEvent } from './types';
|
|
9
10
|
|
|
10
11
|
const hasUnsupportedMarks = (
|
|
11
12
|
state: EditorState,
|