@atlaskit/editor-plugin-toolbar-lists-indentation 18.0.5 → 18.0.6
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 +18 -0
- package/dist/cjs/toolbarListsIndentationPlugin.js +3 -2
- package/dist/cjs/ui/FloatingToolbarComponent.js +3 -2
- package/dist/cjs/ui/Toolbar.js +1 -1
- package/dist/cjs/ui/ToolbarDropdown.js +1 -1
- package/dist/cjs/ui/index.js +1 -1
- package/dist/es2019/toolbarListsIndentationPlugin.js +3 -2
- package/dist/es2019/ui/FloatingToolbarComponent.js +3 -2
- package/dist/es2019/ui/Toolbar.js +1 -1
- package/dist/es2019/ui/ToolbarDropdown.js +1 -1
- package/dist/es2019/ui/index.js +1 -1
- package/dist/esm/toolbarListsIndentationPlugin.js +3 -2
- package/dist/esm/ui/FloatingToolbarComponent.js +3 -2
- package/dist/esm/ui/Toolbar.js +1 -1
- package/dist/esm/ui/ToolbarDropdown.js +1 -1
- package/dist/esm/ui/index.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar-lists-indentation
|
|
2
2
|
|
|
3
|
+
## 18.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`728f80b4dc5d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/728f80b4dc5d2) -
|
|
8
|
+
Replace the toolbar's dependency on `listState.decorationSet` identity with an explicit
|
|
9
|
+
`listStructureToken` on the list plugin state.
|
|
10
|
+
|
|
11
|
+
The lists and indentation toolbar re-rendered by watching `decorationSet` for a new object, which
|
|
12
|
+
only worked while a fresh `DecorationSet` was allocated on every list edit. Indenting to the
|
|
13
|
+
maximum nesting depth changes whether indent is available without moving any of the active or
|
|
14
|
+
disabled flags, so that identity change was the only thing prompting the toolbar to re-evaluate.
|
|
15
|
+
The token is incremented when the document changes while the selection is inside a list, which
|
|
16
|
+
makes the dependency explicit and keeps documents with no list involvement from re-rendering the
|
|
17
|
+
toolbar on every keystroke.
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 18.0.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -135,8 +135,9 @@ function PrimaryToolbarComponent(_ref4) {
|
|
|
135
135
|
isIndentationAllowed: (_states$indentationSt = states.indentationState) === null || _states$indentationSt === void 0 ? void 0 : _states$indentationSt.isIndentationAllowed,
|
|
136
136
|
indentDisabled: (_states$indentationSt2 = states.indentationState) === null || _states$indentationSt2 === void 0 ? void 0 : _states$indentationSt2.indentDisabled,
|
|
137
137
|
outdentDisabled: (_states$indentationSt3 = states.indentationState) === null || _states$indentationSt3 === void 0 ? void 0 : _states$indentationSt3.outdentDisabled,
|
|
138
|
-
//
|
|
139
|
-
|
|
138
|
+
// listStructureToken changes when a list edit could have altered indent/outdent
|
|
139
|
+
// availability, which none of the flags above capture on their own
|
|
140
|
+
listStructureToken: (_states$listState5 = states.listState) === null || _states$listState5 === void 0 ? void 0 : _states$listState5.listStructureToken
|
|
140
141
|
};
|
|
141
142
|
}),
|
|
142
143
|
bulletListActive = _useSharedPluginState.bulletListActive,
|
|
@@ -37,8 +37,9 @@ function FloatingToolbarComponent(_ref) {
|
|
|
37
37
|
isIndentationAllowed: (_states$indentationSt = states.indentationState) === null || _states$indentationSt === void 0 ? void 0 : _states$indentationSt.isIndentationAllowed,
|
|
38
38
|
indentDisabled: (_states$indentationSt2 = states.indentationState) === null || _states$indentationSt2 === void 0 ? void 0 : _states$indentationSt2.indentDisabled,
|
|
39
39
|
outdentDisabled: (_states$indentationSt3 = states.indentationState) === null || _states$indentationSt3 === void 0 ? void 0 : _states$indentationSt3.outdentDisabled,
|
|
40
|
-
//
|
|
41
|
-
|
|
40
|
+
// listStructureToken changes when a list edit could have altered indent/outdent
|
|
41
|
+
// availability, which none of the flags above capture on their own
|
|
42
|
+
listStructureToken: (_states$listState5 = states.listState) === null || _states$listState5 === void 0 ? void 0 : _states$listState5.listStructureToken
|
|
42
43
|
};
|
|
43
44
|
}),
|
|
44
45
|
bulletListActive = _useSharedPluginState.bulletListActive,
|
package/dist/cjs/ui/Toolbar.js
CHANGED
package/dist/cjs/ui/index.js
CHANGED
|
@@ -133,8 +133,9 @@ export function PrimaryToolbarComponent({
|
|
|
133
133
|
isIndentationAllowed: (_states$indentationSt = states.indentationState) === null || _states$indentationSt === void 0 ? void 0 : _states$indentationSt.isIndentationAllowed,
|
|
134
134
|
indentDisabled: (_states$indentationSt2 = states.indentationState) === null || _states$indentationSt2 === void 0 ? void 0 : _states$indentationSt2.indentDisabled,
|
|
135
135
|
outdentDisabled: (_states$indentationSt3 = states.indentationState) === null || _states$indentationSt3 === void 0 ? void 0 : _states$indentationSt3.outdentDisabled,
|
|
136
|
-
//
|
|
137
|
-
|
|
136
|
+
// listStructureToken changes when a list edit could have altered indent/outdent
|
|
137
|
+
// availability, which none of the flags above capture on their own
|
|
138
|
+
listStructureToken: (_states$listState5 = states.listState) === null || _states$listState5 === void 0 ? void 0 : _states$listState5.listStructureToken
|
|
138
139
|
};
|
|
139
140
|
});
|
|
140
141
|
const [taskDecisionState, setTaskDecisionState] = useState();
|
|
@@ -36,8 +36,9 @@ export function FloatingToolbarComponent({
|
|
|
36
36
|
isIndentationAllowed: (_states$indentationSt = states.indentationState) === null || _states$indentationSt === void 0 ? void 0 : _states$indentationSt.isIndentationAllowed,
|
|
37
37
|
indentDisabled: (_states$indentationSt2 = states.indentationState) === null || _states$indentationSt2 === void 0 ? void 0 : _states$indentationSt2.indentDisabled,
|
|
38
38
|
outdentDisabled: (_states$indentationSt3 = states.indentationState) === null || _states$indentationSt3 === void 0 ? void 0 : _states$indentationSt3.outdentDisabled,
|
|
39
|
-
//
|
|
40
|
-
|
|
39
|
+
// listStructureToken changes when a list edit could have altered indent/outdent
|
|
40
|
+
// availability, which none of the flags above capture on their own
|
|
41
|
+
listStructureToken: (_states$listState5 = states.listState) === null || _states$listState5 === void 0 ? void 0 : _states$listState5.listStructureToken
|
|
41
42
|
};
|
|
42
43
|
});
|
|
43
44
|
const [taskDecisionState, setTaskDecisionState] = useState();
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
@@ -125,8 +125,9 @@ export function PrimaryToolbarComponent(_ref4) {
|
|
|
125
125
|
isIndentationAllowed: (_states$indentationSt = states.indentationState) === null || _states$indentationSt === void 0 ? void 0 : _states$indentationSt.isIndentationAllowed,
|
|
126
126
|
indentDisabled: (_states$indentationSt2 = states.indentationState) === null || _states$indentationSt2 === void 0 ? void 0 : _states$indentationSt2.indentDisabled,
|
|
127
127
|
outdentDisabled: (_states$indentationSt3 = states.indentationState) === null || _states$indentationSt3 === void 0 ? void 0 : _states$indentationSt3.outdentDisabled,
|
|
128
|
-
//
|
|
129
|
-
|
|
128
|
+
// listStructureToken changes when a list edit could have altered indent/outdent
|
|
129
|
+
// availability, which none of the flags above capture on their own
|
|
130
|
+
listStructureToken: (_states$listState5 = states.listState) === null || _states$listState5 === void 0 ? void 0 : _states$listState5.listStructureToken
|
|
130
131
|
};
|
|
131
132
|
}),
|
|
132
133
|
bulletListActive = _useSharedPluginState.bulletListActive,
|
|
@@ -28,8 +28,9 @@ export function FloatingToolbarComponent(_ref) {
|
|
|
28
28
|
isIndentationAllowed: (_states$indentationSt = states.indentationState) === null || _states$indentationSt === void 0 ? void 0 : _states$indentationSt.isIndentationAllowed,
|
|
29
29
|
indentDisabled: (_states$indentationSt2 = states.indentationState) === null || _states$indentationSt2 === void 0 ? void 0 : _states$indentationSt2.indentDisabled,
|
|
30
30
|
outdentDisabled: (_states$indentationSt3 = states.indentationState) === null || _states$indentationSt3 === void 0 ? void 0 : _states$indentationSt3.outdentDisabled,
|
|
31
|
-
//
|
|
32
|
-
|
|
31
|
+
// listStructureToken changes when a list edit could have altered indent/outdent
|
|
32
|
+
// availability, which none of the flags above capture on their own
|
|
33
|
+
listStructureToken: (_states$listState5 = states.listState) === null || _states$listState5 === void 0 ? void 0 : _states$listState5.listStructureToken
|
|
33
34
|
};
|
|
34
35
|
}),
|
|
35
36
|
bulletListActive = _useSharedPluginState.bulletListActive,
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ToolbarDropdown.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* ToolbarDropdown.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar-lists-indentation",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.6",
|
|
4
4
|
"description": "Toolbar lists and indentation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"@atlaskit/icon": "^37.6.0",
|
|
39
39
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^185.0.0",
|
|
42
42
|
"@atlaskit/tokens": "^16.11.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@atlaskit/editor-common": "^121.
|
|
46
|
+
"@atlaskit/editor-common": "^121.3.0",
|
|
47
47
|
"react": "^18.2.0 || ^19.2.0",
|
|
48
48
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
49
49
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|