@atlaskit/editor-plugin-rule 1.9.11 → 1.11.0

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,29 @@
1
1
  # @atlaskit/editor-plugin-rule
2
2
 
3
+ ## 1.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#105322](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105322)
8
+ [`8876083532adc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8876083532adc) -
9
+ Bumped editor-prosemirror version to 7.0.0
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 1.10.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#109060](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109060)
20
+ [`4660ec858a305`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4660ec858a305) -
21
+ Update `React` from v16 to v18
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies
26
+
3
27
  ## 1.9.11
4
28
 
5
29
  ### Patch Changes
@@ -12,10 +12,7 @@ var _utils = require("@atlaskit/editor-common/utils");
12
12
  var _model = require("@atlaskit/editor-prosemirror/model");
13
13
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
14
14
  var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
15
- var createHorizontalRule = exports.createHorizontalRule = function createHorizontalRule(state, start, end, inputMethod, editorAnalyticsAPI
16
- // Ignored via go/ees005
17
- // eslint-disable-next-line @typescript-eslint/max-params
18
- ) {
15
+ var createHorizontalRule = exports.createHorizontalRule = function createHorizontalRule(state, start, end, inputMethod, editorAnalyticsAPI) {
19
16
  if (!state.selection.empty) {
20
17
  return null;
21
18
  }
@@ -42,10 +39,7 @@ var createHorizontalRule = exports.createHorizontalRule = function createHorizon
42
39
  })(tr);
43
40
  return tr;
44
41
  };
45
- var createHorizontalRuleAutoformat = function createHorizontalRuleAutoformat(state, start, end, editorAnalyticsAPI
46
- // Ignored via go/ees005
47
- // eslint-disable-next-line @typescript-eslint/max-params
48
- ) {
42
+ var createHorizontalRuleAutoformat = function createHorizontalRuleAutoformat(state, start, end, editorAnalyticsAPI) {
49
43
  var listItem = state.schema.nodes.listItem;
50
44
  if ((0, _utils2.hasParentNodeOfType)(listItem)(state.selection)) {
51
45
  return null;
@@ -57,8 +51,7 @@ function inputRulePlugin(schema, editorAnalyticsAPI) {
57
51
  if (schema.nodes.rule) {
58
52
  // '---' and '***' for hr
59
53
  rules.push(
60
- // Ignored via go/ees005
61
- // eslint-disable-next-line require-unicode-regexp, @typescript-eslint/max-params
54
+ // eslint-disable-next-line require-unicode-regexp
62
55
  (0, _utils.createRule)(/^(\-\-\-|\*\*\*)$/, function (state, _match, start, end) {
63
56
  return createHorizontalRuleAutoformat(state, start, end, editorAnalyticsAPI);
64
57
  }));
@@ -67,10 +60,7 @@ function inputRulePlugin(schema, editorAnalyticsAPI) {
67
60
  rules.push((0, _utils.createRule)(
68
61
  // Ignored via go/ees005
69
62
  // eslint-disable-next-line require-unicode-regexp
70
- new RegExp("".concat(_prosemirrorInputRules.leafNodeReplacementCharacter, "(\\-\\-\\-|\\*\\*\\*)")),
71
- // Ignored via go/ees005
72
- // eslint-disable-next-line @typescript-eslint/max-params
73
- function (state, _match, start, end) {
63
+ new RegExp("".concat(_prosemirrorInputRules.leafNodeReplacementCharacter, "(\\-\\-\\-|\\*\\*\\*)")), function (state, _match, start, end) {
74
64
  var hardBreak = state.schema.nodes.hardBreak;
75
65
  // Ignored via go/ees005
76
66
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -5,10 +5,7 @@ import { createRule } from '@atlaskit/editor-common/utils';
5
5
  import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
6
6
  import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
7
7
  import { createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
8
- export const createHorizontalRule = (state, start, end, inputMethod, editorAnalyticsAPI
9
- // Ignored via go/ees005
10
- // eslint-disable-next-line @typescript-eslint/max-params
11
- ) => {
8
+ export const createHorizontalRule = (state, start, end, inputMethod, editorAnalyticsAPI) => {
12
9
  if (!state.selection.empty) {
13
10
  return null;
14
11
  }
@@ -37,10 +34,7 @@ export const createHorizontalRule = (state, start, end, inputMethod, editorAnaly
37
34
  })(tr);
38
35
  return tr;
39
36
  };
40
- const createHorizontalRuleAutoformat = (state, start, end, editorAnalyticsAPI
41
- // Ignored via go/ees005
42
- // eslint-disable-next-line @typescript-eslint/max-params
43
- ) => {
37
+ const createHorizontalRuleAutoformat = (state, start, end, editorAnalyticsAPI) => {
44
38
  const {
45
39
  listItem
46
40
  } = state.schema.nodes;
@@ -54,18 +48,14 @@ export function inputRulePlugin(schema, editorAnalyticsAPI) {
54
48
  if (schema.nodes.rule) {
55
49
  // '---' and '***' for hr
56
50
  rules.push(
57
- // Ignored via go/ees005
58
- // eslint-disable-next-line require-unicode-regexp, @typescript-eslint/max-params
51
+ // eslint-disable-next-line require-unicode-regexp
59
52
  createRule(/^(\-\-\-|\*\*\*)$/, (state, _match, start, end) => createHorizontalRuleAutoformat(state, start, end, editorAnalyticsAPI)));
60
53
 
61
54
  // '---' and '***' after shift+enter for hr
62
55
  rules.push(createRule(
63
56
  // Ignored via go/ees005
64
57
  // eslint-disable-next-line require-unicode-regexp
65
- new RegExp(`${leafNodeReplacementCharacter}(\\-\\-\\-|\\*\\*\\*)`),
66
- // Ignored via go/ees005
67
- // eslint-disable-next-line @typescript-eslint/max-params
68
- (state, _match, start, end) => {
58
+ new RegExp(`${leafNodeReplacementCharacter}(\\-\\-\\-|\\*\\*\\*)`), (state, _match, start, end) => {
69
59
  const {
70
60
  hardBreak
71
61
  } = state.schema.nodes;
@@ -5,10 +5,7 @@ import { createRule } from '@atlaskit/editor-common/utils';
5
5
  import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
6
6
  import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
7
7
  import { createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
8
- export var createHorizontalRule = function createHorizontalRule(state, start, end, inputMethod, editorAnalyticsAPI
9
- // Ignored via go/ees005
10
- // eslint-disable-next-line @typescript-eslint/max-params
11
- ) {
8
+ export var createHorizontalRule = function createHorizontalRule(state, start, end, inputMethod, editorAnalyticsAPI) {
12
9
  if (!state.selection.empty) {
13
10
  return null;
14
11
  }
@@ -35,10 +32,7 @@ export var createHorizontalRule = function createHorizontalRule(state, start, en
35
32
  })(tr);
36
33
  return tr;
37
34
  };
38
- var createHorizontalRuleAutoformat = function createHorizontalRuleAutoformat(state, start, end, editorAnalyticsAPI
39
- // Ignored via go/ees005
40
- // eslint-disable-next-line @typescript-eslint/max-params
41
- ) {
35
+ var createHorizontalRuleAutoformat = function createHorizontalRuleAutoformat(state, start, end, editorAnalyticsAPI) {
42
36
  var listItem = state.schema.nodes.listItem;
43
37
  if (hasParentNodeOfType(listItem)(state.selection)) {
44
38
  return null;
@@ -50,8 +44,7 @@ export function inputRulePlugin(schema, editorAnalyticsAPI) {
50
44
  if (schema.nodes.rule) {
51
45
  // '---' and '***' for hr
52
46
  rules.push(
53
- // Ignored via go/ees005
54
- // eslint-disable-next-line require-unicode-regexp, @typescript-eslint/max-params
47
+ // eslint-disable-next-line require-unicode-regexp
55
48
  createRule(/^(\-\-\-|\*\*\*)$/, function (state, _match, start, end) {
56
49
  return createHorizontalRuleAutoformat(state, start, end, editorAnalyticsAPI);
57
50
  }));
@@ -60,10 +53,7 @@ export function inputRulePlugin(schema, editorAnalyticsAPI) {
60
53
  rules.push(createRule(
61
54
  // Ignored via go/ees005
62
55
  // eslint-disable-next-line require-unicode-regexp
63
- new RegExp("".concat(leafNodeReplacementCharacter, "(\\-\\-\\-|\\*\\*\\*)")),
64
- // Ignored via go/ees005
65
- // eslint-disable-next-line @typescript-eslint/max-params
66
- function (state, _match, start, end) {
56
+ new RegExp("".concat(leafNodeReplacementCharacter, "(\\-\\-\\-|\\*\\*\\*)")), function (state, _match, start, end) {
67
57
  var hardBreak = state.schema.nodes.hardBreak;
68
58
  // Ignored via go/ees005
69
59
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -1,10 +1,12 @@
1
1
  import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import type { insertHorizontalRule } from './pm-plugins/commands';
4
+ type RulePluginDependencies = [OptionalPlugin<AnalyticsPlugin>];
4
5
  export type RulePlugin = NextEditorPlugin<'rule', {
5
6
  pluginConfiguration: undefined;
6
- dependencies: [OptionalPlugin<AnalyticsPlugin>];
7
+ dependencies: RulePluginDependencies;
7
8
  actions: {
8
9
  insertHorizontalRule: ReturnType<typeof insertHorizontalRule>;
9
10
  };
10
11
  }>;
12
+ export {};
@@ -1,12 +1,14 @@
1
1
  import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import type { insertHorizontalRule } from './pm-plugins/commands';
4
+ type RulePluginDependencies = [
5
+ OptionalPlugin<AnalyticsPlugin>
6
+ ];
4
7
  export type RulePlugin = NextEditorPlugin<'rule', {
5
8
  pluginConfiguration: undefined;
6
- dependencies: [
7
- OptionalPlugin<AnalyticsPlugin>
8
- ];
9
+ dependencies: RulePluginDependencies;
9
10
  actions: {
10
11
  insertHorizontalRule: ReturnType<typeof insertHorizontalRule>;
11
12
  };
12
13
  }>;
14
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-rule",
3
- "version": "1.9.11",
3
+ "version": "1.11.0",
4
4
  "description": "Rule plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,10 +32,10 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^46.1.0",
35
- "@atlaskit/editor-common": "^99.0.0",
36
- "@atlaskit/editor-plugin-analytics": "^1.10.0",
37
- "@atlaskit/editor-prosemirror": "6.2.1",
38
- "@atlaskit/prosemirror-input-rules": "^3.2.0",
35
+ "@atlaskit/editor-common": "^99.10.0",
36
+ "@atlaskit/editor-plugin-analytics": "^1.12.0",
37
+ "@atlaskit/editor-prosemirror": "7.0.0",
38
+ "@atlaskit/prosemirror-input-rules": "^3.3.0",
39
39
  "@babel/runtime": "^7.0.0"
40
40
  },
41
41
  "peerDependencies": {
@@ -43,7 +43,7 @@
43
43
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.2.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@testing-library/react": "^12.1.5",
46
+ "@testing-library/react": "^13.4.0",
47
47
  "typescript": "~5.4.2"
48
48
  },
49
49
  "techstack": {
@@ -74,8 +74,7 @@
74
74
  ],
75
75
  "deprecation": "no-deprecated-imports",
76
76
  "styling": [
77
- "emotion",
78
- "emotion"
77
+ "compiled"
79
78
  ],
80
79
  "imports": [
81
80
  "import-no-extraneous-disable-for-examples-and-docs"