@atlaskit/editor-plugin-list 17.0.0 → 17.0.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/editor-plugin-list
2
2
 
3
+ ## 17.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 17.0.0
4
10
 
5
11
  ### Patch Changes
@@ -137,7 +137,6 @@ var convertAroundList = function convertAroundList(_ref3) {
137
137
  nextListNodeType = _ref3.nextListNodeType,
138
138
  nodeRange = _ref3.nodeRange;
139
139
  for (var i = nodeRange.endIndex - 1; i >= nodeRange.startIndex; i--) {
140
- // @ts-ignore posAtIndex is a public API but has no type yet
141
140
  var position = nodeRange.$from.posAtIndex(i, nodeRange.depth);
142
141
  var resolvedPos = tr.doc.resolve(position + 1);
143
142
  var range = resolvedPos.blockRange(resolvedPos);
@@ -36,7 +36,6 @@ var indentListItemsSelected = exports.indentListItemsSelected = function indentL
36
36
  }
37
37
  var resolvedPos = tr.doc.resolve(listItemsSelected.from.pos);
38
38
  var listItemIndex = resolvedPos.index();
39
- // @ts-ignore
40
39
  var positionListItemPosition = resolvedPos.posAtIndex(listItemIndex - 1);
41
40
  var currentListItemPosition = resolvedPos.posAtIndex(listItemIndex);
42
41
  var previousListItem = tr.doc.nodeAt(positionListItemPosition);
@@ -46,9 +46,7 @@ function wrapInList(listType, attrs) {
46
46
  return false;
47
47
  }
48
48
  // This is at the top of an existing list item
49
- if (range.depth >= 2 &&
50
- // @ts-ignore - missing type for compatibleContent
51
- $from.node(range.depth - 1).type.compatibleContent(listType) && range.startIndex === 0) {
49
+ if (range.depth >= 2 && $from.node(range.depth - 1).type.compatibleContent(listType) && range.startIndex === 0) {
52
50
  // Don't do anything if this is the top of the list
53
51
  if ($from.index(range.depth - 1) === 0) {
54
52
  return false;
@@ -144,7 +144,6 @@ const convertAroundList = ({
144
144
  nodeRange
145
145
  }) => {
146
146
  for (let i = nodeRange.endIndex - 1; i >= nodeRange.startIndex; i--) {
147
- // @ts-ignore posAtIndex is a public API but has no type yet
148
147
  const position = nodeRange.$from.posAtIndex(i, nodeRange.depth);
149
148
  const resolvedPos = tr.doc.resolve(position + 1);
150
149
  const range = resolvedPos.blockRange(resolvedPos);
@@ -30,7 +30,6 @@ export const indentListItemsSelected = tr => {
30
30
  }
31
31
  const resolvedPos = tr.doc.resolve(listItemsSelected.from.pos);
32
32
  const listItemIndex = resolvedPos.index();
33
- // @ts-ignore
34
33
  const positionListItemPosition = resolvedPos.posAtIndex(listItemIndex - 1);
35
34
  const currentListItemPosition = resolvedPos.posAtIndex(listItemIndex);
36
35
  const previousListItem = tr.doc.nodeAt(positionListItemPosition);
@@ -39,9 +39,7 @@ export function wrapInList(listType, attrs) {
39
39
  return false;
40
40
  }
41
41
  // This is at the top of an existing list item
42
- if (range.depth >= 2 &&
43
- // @ts-ignore - missing type for compatibleContent
44
- $from.node(range.depth - 1).type.compatibleContent(listType) && range.startIndex === 0) {
42
+ if (range.depth >= 2 && $from.node(range.depth - 1).type.compatibleContent(listType) && range.startIndex === 0) {
45
43
  // Don't do anything if this is the top of the list
46
44
  if ($from.index(range.depth - 1) === 0) {
47
45
  return false;
@@ -131,7 +131,6 @@ var convertAroundList = function convertAroundList(_ref3) {
131
131
  nextListNodeType = _ref3.nextListNodeType,
132
132
  nodeRange = _ref3.nodeRange;
133
133
  for (var i = nodeRange.endIndex - 1; i >= nodeRange.startIndex; i--) {
134
- // @ts-ignore posAtIndex is a public API but has no type yet
135
134
  var position = nodeRange.$from.posAtIndex(i, nodeRange.depth);
136
135
  var resolvedPos = tr.doc.resolve(position + 1);
137
136
  var range = resolvedPos.blockRange(resolvedPos);
@@ -29,7 +29,6 @@ export var indentListItemsSelected = function indentListItemsSelected(tr) {
29
29
  }
30
30
  var resolvedPos = tr.doc.resolve(listItemsSelected.from.pos);
31
31
  var listItemIndex = resolvedPos.index();
32
- // @ts-ignore
33
32
  var positionListItemPosition = resolvedPos.posAtIndex(listItemIndex - 1);
34
33
  var currentListItemPosition = resolvedPos.posAtIndex(listItemIndex);
35
34
  var previousListItem = tr.doc.nodeAt(positionListItemPosition);
@@ -40,9 +40,7 @@ export function wrapInList(listType, attrs) {
40
40
  return false;
41
41
  }
42
42
  // This is at the top of an existing list item
43
- if (range.depth >= 2 &&
44
- // @ts-ignore - missing type for compatibleContent
45
- $from.node(range.depth - 1).type.compatibleContent(listType) && range.startIndex === 0) {
43
+ if (range.depth >= 2 && $from.node(range.depth - 1).type.compatibleContent(listType) && range.startIndex === 0) {
46
44
  // Don't do anything if this is the top of the list
47
45
  if ($from.index(range.depth - 1) === 0) {
48
46
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-list",
3
- "version": "17.0.0",
3
+ "version": "17.0.1",
4
4
  "description": "List plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -19,7 +19,7 @@
19
19
  "sideEffects": false,
20
20
  "atlaskit:src": "src/index.ts",
21
21
  "dependencies": {
22
- "@atlaskit/adf-schema": "^56.7.0",
22
+ "@atlaskit/adf-schema": "^57.0.0",
23
23
  "@atlaskit/editor-plugin-analytics": "^15.0.0",
24
24
  "@atlaskit/editor-plugin-block-menu": "^14.0.0",
25
25
  "@atlaskit/editor-plugin-feature-flags": "^14.0.0",
@@ -37,7 +37,7 @@
37
37
  "@babel/runtime": "^7.0.0"
38
38
  },
39
39
  "peerDependencies": {
40
- "@atlaskit/editor-common": "^119.0.0",
40
+ "@atlaskit/editor-common": "^119.4.0",
41
41
  "react": "^18.2.0 || ^19.2.0",
42
42
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
43
43
  },