@atlaskit/editor-plugin-rule 12.0.1 → 12.1.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,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-rule
|
|
2
2
|
|
|
3
|
+
## 12.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`51c33ef5349b6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/51c33ef5349b6) -
|
|
8
|
+
Enable compatibility with React 19.2.0
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 12.0.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`346f91cfe1997`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/346f91cfe1997) -
|
|
19
|
+
Clean up prefer static regex violations
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 12.0.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/compass.yml
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
configVersion: 1
|
|
2
|
+
id: ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/bce1a592-1fdc-42a2-a4ad-e83029a44ef5
|
|
3
|
+
name: '@atlaskit/editor-plugin-rule'
|
|
4
|
+
ownerId: ari:cloud:identity::team/0250ee69-f755-47fd-a468-bf8a9d10a3c5 # Editor AI
|
|
5
|
+
labels:
|
|
6
|
+
- platform-code
|
|
7
|
+
- platform-afm
|
|
8
|
+
typeId: OTHER
|
|
9
|
+
fields:
|
|
10
|
+
tier: 4
|
|
11
|
+
lifecycle: Active
|
|
12
|
+
isMonorepoProject: true
|
|
13
|
+
links:
|
|
14
|
+
- name: Root Repository
|
|
15
|
+
type: REPOSITORY
|
|
16
|
+
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
|
|
17
|
+
- name: Slack Channel
|
|
18
|
+
type: CHAT_CHANNEL
|
|
19
|
+
url: https://atlassian.enterprise.slack.com/archives/CFG3PSQ9E # #help-editor
|
|
20
|
+
- name: Editor Plugin Rule
|
|
21
|
+
type: REPOSITORY
|
|
22
|
+
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/editor/editor-plugin-rule
|
|
23
|
+
customFields:
|
|
24
|
+
- name: Department
|
|
25
|
+
type: text
|
|
26
|
+
value: Eng - Editor AI
|
|
27
|
+
- name: Trusted Reviewer Teams
|
|
28
|
+
type: text
|
|
29
|
+
value: ari:cloud:identity::team/cf6a670b-5252-4c68-a769-9207de366beb
|
|
30
|
+
- name: Technical Owner
|
|
31
|
+
type: user
|
|
32
|
+
value: ari:cloud:identity::user/612646c53fe26c00694fbe6a # Chris Kimber
|
|
33
|
+
- name: Required Reviewers Opt In
|
|
34
|
+
type: boolean
|
|
35
|
+
value: true
|
|
36
|
+
- name: Reviewer Selection Mechanism
|
|
37
|
+
type: text
|
|
38
|
+
value: random(2)
|
|
39
|
+
- name: Required Reviewer Approvals
|
|
40
|
+
type: number
|
|
41
|
+
value: 1
|
|
@@ -48,13 +48,14 @@ var createHorizontalRuleAutoformat = function createHorizontalRuleAutoformat(sta
|
|
|
48
48
|
}
|
|
49
49
|
return createHorizontalRule(state, start, end, _analytics.INPUT_METHOD.FORMATTING, editorAnalyticsAPI);
|
|
50
50
|
};
|
|
51
|
+
|
|
52
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
53
|
+
var HORIZONTAL_RULE_AUTOFORMAT_REGEX = /^(\-\-\-|\*\*\*)$/;
|
|
51
54
|
function inputRulePlugin(schema, editorAnalyticsAPI) {
|
|
52
55
|
var rules = [];
|
|
53
56
|
if (schema.nodes.rule) {
|
|
54
57
|
// '---' and '***' for hr
|
|
55
|
-
rules.push(
|
|
56
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
57
|
-
(0, _utils.createRule)(/^(\-\-\-|\*\*\*)$/, function (state, _match, start, end) {
|
|
58
|
+
rules.push((0, _utils.createRule)(HORIZONTAL_RULE_AUTOFORMAT_REGEX, function (state, _match, start, end) {
|
|
58
59
|
return createHorizontalRuleAutoformat(state, start, end, editorAnalyticsAPI);
|
|
59
60
|
}));
|
|
60
61
|
|
|
@@ -45,13 +45,14 @@ const createHorizontalRuleAutoformat = (state, start, end, editorAnalyticsAPI) =
|
|
|
45
45
|
}
|
|
46
46
|
return createHorizontalRule(state, start, end, INPUT_METHOD.FORMATTING, editorAnalyticsAPI);
|
|
47
47
|
};
|
|
48
|
+
|
|
49
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
50
|
+
const HORIZONTAL_RULE_AUTOFORMAT_REGEX = /^(\-\-\-|\*\*\*)$/;
|
|
48
51
|
export function inputRulePlugin(schema, editorAnalyticsAPI) {
|
|
49
52
|
const rules = [];
|
|
50
53
|
if (schema.nodes.rule) {
|
|
51
54
|
// '---' and '***' for hr
|
|
52
|
-
rules.push(
|
|
53
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
54
|
-
createRule(/^(\-\-\-|\*\*\*)$/, (state, _match, start, end) => createHorizontalRuleAutoformat(state, start, end, editorAnalyticsAPI)));
|
|
55
|
+
rules.push(createRule(HORIZONTAL_RULE_AUTOFORMAT_REGEX, (state, _match, start, end) => createHorizontalRuleAutoformat(state, start, end, editorAnalyticsAPI)));
|
|
55
56
|
|
|
56
57
|
// '---' and '***' after shift+enter for hr
|
|
57
58
|
rules.push(createRule(
|
|
@@ -41,13 +41,14 @@ var createHorizontalRuleAutoformat = function createHorizontalRuleAutoformat(sta
|
|
|
41
41
|
}
|
|
42
42
|
return createHorizontalRule(state, start, end, INPUT_METHOD.FORMATTING, editorAnalyticsAPI);
|
|
43
43
|
};
|
|
44
|
+
|
|
45
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
46
|
+
var HORIZONTAL_RULE_AUTOFORMAT_REGEX = /^(\-\-\-|\*\*\*)$/;
|
|
44
47
|
export function inputRulePlugin(schema, editorAnalyticsAPI) {
|
|
45
48
|
var rules = [];
|
|
46
49
|
if (schema.nodes.rule) {
|
|
47
50
|
// '---' and '***' for hr
|
|
48
|
-
rules.push(
|
|
49
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
50
|
-
createRule(/^(\-\-\-|\*\*\*)$/, function (state, _match, start, end) {
|
|
51
|
+
rules.push(createRule(HORIZONTAL_RULE_AUTOFORMAT_REGEX, function (state, _match, start, end) {
|
|
51
52
|
return createHorizontalRuleAutoformat(state, start, end, editorAnalyticsAPI);
|
|
52
53
|
}));
|
|
53
54
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-rule",
|
|
3
|
-
"version": "12.0
|
|
3
|
+
"version": "12.1.0",
|
|
4
4
|
"description": "Rule plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -19,22 +19,22 @@
|
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"atlaskit:src": "src/index.ts",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@atlaskit/adf-schema": "^56.
|
|
23
|
-
"@atlaskit/editor-plugin-analytics": "^12.
|
|
22
|
+
"@atlaskit/adf-schema": "^56.2.0",
|
|
23
|
+
"@atlaskit/editor-plugin-analytics": "^12.1.0",
|
|
24
24
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
25
|
-
"@atlaskit/platform-feature-flags": "^2.
|
|
25
|
+
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
26
26
|
"@atlaskit/prosemirror-input-rules": "^4.0.0",
|
|
27
27
|
"@babel/runtime": "^7.0.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@atlaskit/editor-common": "^116.
|
|
31
|
-
"react": "^18.2.0",
|
|
32
|
-
"react-dom": "^18.2.0"
|
|
30
|
+
"@atlaskit/editor-common": "^116.45.0",
|
|
31
|
+
"react": "^18.2.0 || ^19.2.0",
|
|
32
|
+
"react-dom": "^18.2.0 || ^19.2.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@testing-library/react": "^16.3.0",
|
|
36
|
-
"react": "^
|
|
37
|
-
"react-dom": "^
|
|
36
|
+
"react": "^19.2.0",
|
|
37
|
+
"react-dom": "^19.2.0"
|
|
38
38
|
},
|
|
39
39
|
"techstack": {
|
|
40
40
|
"@atlassian/frontend": {
|