@atlaskit/editor-plugin-list 9.0.2 → 9.0.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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/editor-plugin-list
2
2
 
3
+ ## 9.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6e8029473620b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e8029473620b) -
8
+ [EDITOR-4496] clean up experiment platform_editor_toolbar_aifc_patch_3 and remove view-mode plugin
9
+ dependency from loom plugin
10
+ - Updated dependencies
11
+
3
12
  ## 9.0.2
4
13
 
5
14
  ### Patch Changes
@@ -10,14 +10,13 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
10
10
  var _selection = require("@atlaskit/editor-common/selection");
11
11
  var _styles = require("@atlaskit/editor-common/styles");
12
12
  var _utils = require("@atlaskit/editor-common/utils");
13
- var _state = require("@atlaskit/editor-prosemirror/state");
13
+ var _state2 = require("@atlaskit/editor-prosemirror/state");
14
14
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
15
15
  var _view = require("@atlaskit/editor-prosemirror/view");
16
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
17
16
  var _selection2 = require("./utils/selection");
18
17
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
19
18
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
20
- var listPluginKey = new _state.PluginKey('listPlugin');
19
+ var listPluginKey = new _state2.PluginKey('listPlugin');
21
20
  var pluginKey = exports.pluginKey = listPluginKey;
22
21
  var initialState = {
23
22
  bulletListActive: false,
@@ -26,7 +25,7 @@ var initialState = {
26
25
  orderedListDisabled: false,
27
26
  decorationSet: _view.DecorationSet.empty
28
27
  };
29
- var getDecorations = exports.getDecorations = function getDecorations(doc, state, featureFlags) {
28
+ var getDecorations = exports.getDecorations = function getDecorations(doc, _state, _featureFlags) {
30
29
  var decorations = [];
31
30
 
32
31
  // this stack keeps track of each (nested) list to calculate the indentation level
@@ -125,7 +124,7 @@ var reducer = function reducer() {
125
124
  var createInitialState = function createInitialState(featureFlags, api) {
126
125
  return function (state) {
127
126
  var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
128
- return _objectSpread(_objectSpread({}, isToolbarAIFCEnabled && (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) ? getListState(state.doc, state.selection) : initialState), {}, {
127
+ return _objectSpread(_objectSpread({}, isToolbarAIFCEnabled ? getListState(state.doc, state.selection) : initialState), {}, {
129
128
  decorationSet: getDecorations(state.doc, state, featureFlags)
130
129
  });
131
130
  };
@@ -5,7 +5,6 @@ import { getItemCounterDigitsSize, isListNode, pluginFactory } from '@atlaskit/e
5
5
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
6
6
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
7
7
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
8
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
8
  import { isWrappingPossible } from './utils/selection';
10
9
  const listPluginKey = new PluginKey('listPlugin');
11
10
  export const pluginKey = listPluginKey;
@@ -16,7 +15,7 @@ const initialState = {
16
15
  orderedListDisabled: false,
17
16
  decorationSet: DecorationSet.empty
18
17
  };
19
- export const getDecorations = (doc, state, featureFlags) => {
18
+ export const getDecorations = (doc, _state, _featureFlags) => {
20
19
  const decorations = [];
21
20
 
22
21
  // this stack keeps track of each (nested) list to calculate the indentation level
@@ -117,7 +116,7 @@ const createInitialState = (featureFlags, api) => state => {
117
116
  return {
118
117
  // When plugin is initialised, editor state is defined with selection
119
118
  // hence returning the list state based on the selection to avoid list button in primary toolbar flickering during initial load
120
- ...(isToolbarAIFCEnabled && expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) ? getListState(state.doc, state.selection) : initialState),
119
+ ...(isToolbarAIFCEnabled ? getListState(state.doc, state.selection) : initialState),
121
120
  decorationSet: getDecorations(state.doc, state, featureFlags)
122
121
  };
123
122
  };
@@ -8,7 +8,6 @@ import { getItemCounterDigitsSize, isListNode, pluginFactory } from '@atlaskit/e
8
8
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
9
9
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
10
10
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
11
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
12
11
  import { isWrappingPossible } from './utils/selection';
13
12
  var listPluginKey = new PluginKey('listPlugin');
14
13
  export var pluginKey = listPluginKey;
@@ -19,7 +18,7 @@ var initialState = {
19
18
  orderedListDisabled: false,
20
19
  decorationSet: DecorationSet.empty
21
20
  };
22
- export var getDecorations = function getDecorations(doc, state, featureFlags) {
21
+ export var getDecorations = function getDecorations(doc, _state, _featureFlags) {
23
22
  var decorations = [];
24
23
 
25
24
  // this stack keeps track of each (nested) list to calculate the indentation level
@@ -118,7 +117,7 @@ var reducer = function reducer() {
118
117
  var createInitialState = function createInitialState(featureFlags, api) {
119
118
  return function (state) {
120
119
  var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
121
- return _objectSpread(_objectSpread({}, isToolbarAIFCEnabled && expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) ? getListState(state.doc, state.selection) : initialState), {}, {
120
+ return _objectSpread(_objectSpread({}, isToolbarAIFCEnabled ? getListState(state.doc, state.selection) : initialState), {}, {
122
121
  decorationSet: getDecorations(state.doc, state, featureFlags)
123
122
  });
124
123
  };
@@ -8,5 +8,5 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
8
8
  import type { ListPlugin } from '../listPluginType';
9
9
  import type { ListState } from '../types';
10
10
  export declare const pluginKey: PluginKey<ListState>;
11
- export declare const getDecorations: (doc: Node, state: EditorState, featureFlags: FeatureFlags) => DecorationSet;
11
+ export declare const getDecorations: (doc: Node, _state: EditorState, _featureFlags: FeatureFlags) => DecorationSet;
12
12
  export declare const createPlugin: (eventDispatch: Dispatch, featureFlags: FeatureFlags, api?: ExtractInjectionAPI<ListPlugin>) => SafePlugin;
@@ -8,5 +8,5 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
8
8
  import type { ListPlugin } from '../listPluginType';
9
9
  import type { ListState } from '../types';
10
10
  export declare const pluginKey: PluginKey<ListState>;
11
- export declare const getDecorations: (doc: Node, state: EditorState, featureFlags: FeatureFlags) => DecorationSet;
11
+ export declare const getDecorations: (doc: Node, _state: EditorState, _featureFlags: FeatureFlags) => DecorationSet;
12
12
  export declare const createPlugin: (eventDispatch: Dispatch, featureFlags: FeatureFlags, api?: ExtractInjectionAPI<ListPlugin>) => SafePlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-list",
3
- "version": "9.0.2",
3
+ "version": "9.0.3",
4
4
  "description": "List plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,18 +31,18 @@
31
31
  "@atlaskit/editor-plugin-analytics": "^7.0.0",
32
32
  "@atlaskit/editor-plugin-block-menu": "^6.0.0",
33
33
  "@atlaskit/editor-plugin-feature-flags": "^6.0.0",
34
- "@atlaskit/editor-plugin-toolbar": "^4.0.0",
34
+ "@atlaskit/editor-plugin-toolbar": "^4.1.0",
35
35
  "@atlaskit/editor-prosemirror": "^7.2.0",
36
36
  "@atlaskit/editor-toolbar": "^0.19.0",
37
37
  "@atlaskit/icon": "^29.4.0",
38
38
  "@atlaskit/platform-feature-flags": "^1.1.0",
39
39
  "@atlaskit/prosemirror-history": "^0.2.0",
40
40
  "@atlaskit/prosemirror-input-rules": "^3.6.0",
41
- "@atlaskit/tmp-editor-statsig": "^16.11.0",
41
+ "@atlaskit/tmp-editor-statsig": "^16.30.0",
42
42
  "@babel/runtime": "^7.0.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "@atlaskit/editor-common": "^111.7.0",
45
+ "@atlaskit/editor-common": "^111.8.0",
46
46
  "react": "^18.2.0",
47
47
  "react-intl-next": "npm:react-intl@^5.18.1"
48
48
  },