@atlaskit/editor-plugin-layout 16.0.16 → 16.0.17

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,15 @@
1
1
  # @atlaskit/editor-plugin-layout
2
2
 
3
+ ## 16.0.17
4
+
5
+ ### Patch Changes
6
+
7
+ - [`656801b9e097c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/656801b9e097c) -
8
+ VOLTC-331 - Migrate updated package usage in platform/editor: rewrite barrel imports of
9
+ voltCompliant provider packages to deep/subpath imports (consumer-side debarrel). No public API
10
+ changes.
11
+ - Updated dependencies
12
+
3
13
  ## 16.0.16
4
14
 
5
15
  ### Patch Changes
@@ -16,7 +16,7 @@ var _model = require("@atlaskit/editor-prosemirror/model");
16
16
  var _state = require("@atlaskit/editor-prosemirror/state");
17
17
  var _transform = require("@atlaskit/editor-prosemirror/transform");
18
18
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
19
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
20
20
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
21
21
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
22
22
  var _consts = require("./consts");
@@ -185,8 +185,8 @@ var insertLayoutColumnsWithAnalytics = exports.insertLayoutColumnsWithAnalytics
185
185
  actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
186
186
  actionSubjectId: _analytics.ACTION_SUBJECT_ID.LAYOUT,
187
187
  attributes: {
188
- inputMethod: (0, _platformFeatureFlags.fg)('platform_editor_element_browser_analytic') ? inputMethod : _analytics.INPUT_METHOD.QUICK_INSERT,
189
- columnCount: (0, _platformFeatureFlags.fg)('platform_editor_column_count_analytics') ? 2 : undefined
188
+ inputMethod: (0, _fg.fg)('platform_editor_element_browser_analytic') ? inputMethod : _analytics.INPUT_METHOD.QUICK_INSERT,
189
+ columnCount: (0, _fg.fg)('platform_editor_column_count_analytics') ? 2 : undefined
190
190
  },
191
191
  eventType: _analytics.EVENT_TYPE.TRACK
192
192
  })(function (state, dispatch) {
@@ -692,7 +692,7 @@ var insertLayoutColumnAt = function insertLayoutColumnAt(side, editorAnalyticsAP
692
692
 
693
693
  // Inserting left shifts positions at/after the new column right by its size; inserting
694
694
  // right leaves them unchanged. Remap the original selection through that mapping.
695
- if (!(0, _platformFeatureFlags.fg)('platform_editor_layout_column_menu_kill_switch_1')) {
695
+ if (!(0, _fg.fg)('platform_editor_layout_column_menu_kill_switch_1')) {
696
696
  var insertMapping = side === 'left' ? new _transform.Mapping([new _transform.StepMap([insertedColumnPos, 0, newColumn.nodeSize])]) : new _transform.Mapping();
697
697
  var restoredSelection = remapSelectionThroughMapping(originalSelection, insertMapping, tr.doc);
698
698
  if (restoredSelection) {
@@ -989,7 +989,7 @@ var deleteLayoutColumn = exports.deleteLayoutColumn = function deleteLayoutColum
989
989
  // last column when the deleted slot no longer exists. Otherwise the replace above maps
990
990
  // the caret out of the layout to the following paragraph.
991
991
  var remainingColumnCount = remainingColumns.length;
992
- if (hadTextSelection && !(0, _platformFeatureFlags.fg)('platform_editor_layout_column_menu_kill_switch_1') && remainingColumnCount > 0) {
992
+ if (hadTextSelection && !(0, _fg.fg)('platform_editor_layout_column_menu_kill_switch_1') && remainingColumnCount > 0) {
993
993
  var targetColumnIndex = Math.min(startIndex, remainingColumnCount - 1);
994
994
  var updatedSectionNode = tr.doc.nodeAt(layoutSectionPos);
995
995
  if (updatedSectionNode) {
@@ -12,7 +12,7 @@ var _model = require("@atlaskit/editor-prosemirror/model");
12
12
  var _state = require("@atlaskit/editor-prosemirror/state");
13
13
  var _view = require("@atlaskit/editor-prosemirror/view");
14
14
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
16
16
  var _consts = require("./consts");
17
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; }
18
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; }
@@ -84,7 +84,7 @@ var dispatchColumnWidths = function dispatchColumnWidths(view, sectionPos, leftC
84
84
 
85
85
  // Capture the selection before the replace below, which otherwise maps the caret out of
86
86
  // the layout to the following paragraph. Restored at the same positions afterwards.
87
- var shouldPreserveSelection = !(0, _platformFeatureFlags.fg)('platform_editor_layout_column_menu_kill_switch_1');
87
+ var shouldPreserveSelection = !(0, _fg.fg)('platform_editor_layout_column_menu_kill_switch_1');
88
88
  var selectionBeforeResize = shouldPreserveSelection ? state.selection : null;
89
89
  tr.replaceWith(sectionPos + 1, sectionPos + sectionNode.nodeSize - 1, _model.Fragment.from(newColumns));
90
90
  tr.setMeta('layoutColumnResize', true);
@@ -8,7 +8,7 @@ var _selection = require("@atlaskit/editor-common/selection");
8
8
  var _state = require("@atlaskit/editor-prosemirror/state");
9
9
  var _utils = require("@atlaskit/editor-prosemirror/utils");
10
10
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
12
12
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
13
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
14
14
  // eslint-disable-next-line @typescript-eslint/consistent-type-imports
@@ -79,7 +79,7 @@ var supportsBlankSpaceGapCursorFallback = function supportsBlankSpaceGapCursorFa
79
79
  */
80
80
  var getGapCursorTargetForBlankSpaceClick = exports.getGapCursorTargetForBlankSpaceClick = function getGapCursorTargetForBlankSpaceClick(view, event) {
81
81
  var _columnNode$attrs;
82
- if ((0, _platformFeatureFlags.fg)('platform_editor_layout_column_menu_kill_switch_1')) {
82
+ if ((0, _fg.fg)('platform_editor_layout_column_menu_kill_switch_1')) {
83
83
  return undefined;
84
84
  }
85
85
 
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.shouldOpenLayoutColumnMenuBelow = exports.getLayoutColumnMenuPositioningProps = exports.calculateFallbackBottomPosition = exports.LAYOUT_COLUMN_MENU_POPUP_OFFSET_BELOW = exports.LAYOUT_COLUMN_MENU_POPUP_OFFSET = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _ui = require("@atlaskit/editor-common/ui");
10
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
11
11
  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; }
12
12
  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; }
13
13
  var LAYOUT_COLUMN_MENU_POPUP_OFFSET = exports.LAYOUT_COLUMN_MENU_POPUP_OFFSET = [0, 4];
@@ -16,7 +16,7 @@ var LAYOUT_COLUMN_MENU_POPUP_OFFSET = exports.LAYOUT_COLUMN_MENU_POPUP_OFFSET =
16
16
  var LAYOUT_COLUMN_MENU_POPUP_OFFSET_BELOW = exports.LAYOUT_COLUMN_MENU_POPUP_OFFSET_BELOW = [0, 2];
17
17
  // Gate OFF: left-aligned, below the handle. Gate ON (legacy): centred, prefer above with manual flip.
18
18
  var getLayoutColumnMenuPositioningProps = exports.getLayoutColumnMenuPositioningProps = function getLayoutColumnMenuPositioningProps() {
19
- if (!(0, _platformFeatureFlags.fg)('platform_editor_layout_column_menu_kill_switch_1')) {
19
+ if (!(0, _fg.fg)('platform_editor_layout_column_menu_kill_switch_1')) {
20
20
  return {
21
21
  alignX: undefined,
22
22
  alignY: undefined,
@@ -5,7 +5,7 @@ import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
5
5
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
6
6
  import { Mapping, StepMap } from '@atlaskit/editor-prosemirror/transform';
7
7
  import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
8
- import { fg } from '@atlaskit/platform-feature-flags';
8
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
9
9
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
10
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
11
11
  import { DEFAULT_LAYOUT_COLUMN_VALIGN, EVEN_DISTRIBUTED_COL_WIDTHS, MAX_LAYOUT_COLUMNS, MAX_STANDARD_LAYOUT_COLUMNS, MIN_LAYOUT_COLUMN_WIDTH_PERCENT } from './consts';
@@ -4,7 +4,7 @@ import { Fragment } from '@atlaskit/editor-prosemirror/model';
4
4
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
6
6
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
7
- import { fg } from '@atlaskit/platform-feature-flags';
7
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
8
8
  import { MIN_LAYOUT_COLUMN_WIDTH_PERCENT } from './consts';
9
9
 
10
10
  /**
@@ -3,7 +3,7 @@ import { GapCursorSelection } from '@atlaskit/editor-common/selection';
3
3
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
5
5
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
6
- import { fg } from '@atlaskit/platform-feature-flags';
6
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
8
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
9
  export const getMaybeLayoutSection = state => {
@@ -1,5 +1,5 @@
1
1
  import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
2
- import { fg } from '@atlaskit/platform-feature-flags';
2
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
3
3
  export const LAYOUT_COLUMN_MENU_POPUP_OFFSET = [0, 4];
4
4
 
5
5
  // Gate OFF: small gap below the handle; Popup handles invert/nudge fallbacks.
@@ -8,7 +8,7 @@ import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
8
8
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
9
9
  import { Mapping, StepMap } from '@atlaskit/editor-prosemirror/transform';
10
10
  import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
11
- import { fg } from '@atlaskit/platform-feature-flags';
11
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
12
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
13
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
14
14
  import { DEFAULT_LAYOUT_COLUMN_VALIGN, EVEN_DISTRIBUTED_COL_WIDTHS, MAX_LAYOUT_COLUMNS, MAX_STANDARD_LAYOUT_COLUMNS, MIN_LAYOUT_COLUMN_WIDTH_PERCENT } from './consts';
@@ -7,7 +7,7 @@ import { Fragment } from '@atlaskit/editor-prosemirror/model';
7
7
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
8
8
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
9
9
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
10
- import { fg } from '@atlaskit/platform-feature-flags';
10
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
11
11
  import { MIN_LAYOUT_COLUMN_WIDTH_PERCENT } from './consts';
12
12
 
13
13
  /**
@@ -3,7 +3,7 @@ import { GapCursorSelection } from '@atlaskit/editor-common/selection';
3
3
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
5
5
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
6
- import { fg } from '@atlaskit/platform-feature-flags';
6
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
8
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
9
  export var getMaybeLayoutSection = function getMaybeLayoutSection(state) {
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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) { _defineProperty(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; }
4
4
  import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
5
- import { fg } from '@atlaskit/platform-feature-flags';
5
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
6
6
  export var LAYOUT_COLUMN_MENU_POPUP_OFFSET = [0, 4];
7
7
 
8
8
  // Gate OFF: small gap below the handle; Popup handles invert/nudge fallbacks.
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import type { IconProps } from '@atlaskit/icon';
2
+ import type { IconProps } from '@atlaskit/icon/types';
3
3
  export declare const LayoutThreeWithLeftSidebarsIcon: (props: Omit<IconProps, 'glyph' | 'size'>) => React.JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import type { IconProps } from '@atlaskit/icon';
2
+ import type { IconProps } from '@atlaskit/icon/types';
3
3
  export declare const LayoutThreeWithRightSidebarsIcon: (props: Omit<IconProps, 'glyph' | 'size'>) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-layout",
3
- "version": "16.0.16",
3
+ "version": "16.0.17",
4
4
  "description": "Layout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",