@atlaskit/editor-common 103.0.0 → 103.1.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,29 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 103.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#138280](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/138280)
8
+ [`f2eac0d6772c2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2eac0d6772c2) -
9
+ [ux] Adds a new temporary floating toolbar's config option to hide any toolbars when any table's
10
+ menu is opened.
11
+
12
+ ## 103.1.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#138170](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/138170)
17
+ [`160cf374f7ac1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/160cf374f7ac1) -
18
+ ED-27441 update docking preference with analytics
19
+
20
+ ### Patch Changes
21
+
22
+ - [#133802](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/133802)
23
+ [`f523489c8b68a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f523489c8b68a) -
24
+ [ux] ED-27217 Clean up experiment platform_editor_element_drag_and_drop_nested
25
+ - Updated dependencies
26
+
3
27
  ## 103.0.0
4
28
 
5
29
  ### Major Changes
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "103.0.0";
20
+ var packageVersion = "103.1.1";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // Ignored via go/ees007
@@ -34,7 +34,7 @@ var getHandleStyle = function getHandleStyle(node) {
34
34
  };
35
35
  // expand and layout section elements have a negative margin applied
36
36
  default:
37
- var handleOffset = (0, _experiments.editorExperiment)('nested-dnd', true) ? _styles.LAYOUT_SECTION_MARGIN * 2 + layoutMarginOffset : _styles.LAYOUT_COLUMN_PADDING * 2;
37
+ var handleOffset = (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? _styles.LAYOUT_SECTION_MARGIN * 2 + layoutMarginOffset : _styles.LAYOUT_COLUMN_PADDING * 2;
38
38
  return {
39
39
  left: {
40
40
  left: "-".concat(handleOffset, "px"),
@@ -16,7 +16,6 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
16
16
  var _consts = require("@atlaskit/editor-shared-styles/consts");
17
17
  var _emoji = require("@atlaskit/emoji");
18
18
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
20
19
  var _templateObject;
21
20
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
22
21
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -157,7 +156,7 @@ var mainDynamicStyles = function mainDynamicStyles(panelType) {
157
156
 
158
157
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Safe to autofix with a tiny tweak to `mainDynamicStyles` being an object, but holding off…
159
158
  var panelSharedStylesWithoutPrefix = exports.panelSharedStylesWithoutPrefix = function panelSharedStylesWithoutPrefix() {
160
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tborder-radius: ", ";\n\tmargin: ", " 0 0;\n\tpadding-top: ", ";\n\tpadding-right: ", ";\n\tpadding-bottom: ", ";\n\tpadding-left: ", ";\n\tmin-width: ", "px;\n\tdisplay: flex;\n\tposition: relative;\n\talign-items: normal;\n\tword-break: break-word;\n\n\t", "\n\n\t.", " {\n\t\tflex-shrink: 0;\n\t\theight: ", ";\n\t\twidth: ", ";\n\t\tbox-sizing: content-box;\n\t\tpadding-right: ", ";\n\t\ttext-align: center;\n\t\tuser-select: none;\n\t\t-moz-user-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t\tmargin-top: 0.1em;\n\n\t\t> span {\n\t\t\tvertical-align: middle;\n\t\t\tdisplay: inline-flex;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\n\t\t\t// Vertical align only works for inline-block elements in Firefox\n\t\t\t@-moz-document url-prefix() {\n\t\t\t\timg {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.ak-editor-panel__content {\n\t\tmargin: ", " 0 ", ";\n\t\tflex: 1 0 0;\n\t\t/*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n\t\tmin-width: 0;\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t", "\n"])), "var(--ds-border-radius, 3px)", _editorSharedStyles.blockNodesVerticalMargin, "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", _editorSharedStyles.akEditorTableCellMinWidth, mainDynamicStyles(_adfSchema.PanelType.INFO), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", _emoji.emojiSprite, panelEmojiSpriteVerticalAlignment, _emoji.emojiImage, panelEmojiImageVerticalAlignment, "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", _adfSchema.PanelType.INFO, getIconStyles(_adfSchema.PanelType.INFO), _adfSchema.PanelType.NOTE, mainDynamicStyles(_adfSchema.PanelType.NOTE), getIconStyles(_adfSchema.PanelType.NOTE), _adfSchema.PanelType.TIP, mainDynamicStyles(_adfSchema.PanelType.TIP), getIconStyles(_adfSchema.PanelType.TIP), _adfSchema.PanelType.WARNING, mainDynamicStyles(_adfSchema.PanelType.WARNING), getIconStyles(_adfSchema.PanelType.WARNING), _adfSchema.PanelType.ERROR, mainDynamicStyles(_adfSchema.PanelType.ERROR), getIconStyles(_adfSchema.PanelType.ERROR), _adfSchema.PanelType.SUCCESS, mainDynamicStyles(_adfSchema.PanelType.SUCCESS), getIconStyles(_adfSchema.PanelType.SUCCESS), (0, _experiments.editorExperiment)('nested-dnd', true) ? "&.".concat(PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t\tpadding-left: ", "var(--ds-space-150, 12px)", ";\n\t\t}") : '');
159
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tborder-radius: ", ";\n\tmargin: ", " 0 0;\n\tpadding-top: ", ";\n\tpadding-right: ", ";\n\tpadding-bottom: ", ";\n\tpadding-left: ", ";\n\tmin-width: ", "px;\n\tdisplay: flex;\n\tposition: relative;\n\talign-items: normal;\n\tword-break: break-word;\n\n\t", "\n\n\t.", " {\n\t\tflex-shrink: 0;\n\t\theight: ", ";\n\t\twidth: ", ";\n\t\tbox-sizing: content-box;\n\t\tpadding-right: ", ";\n\t\ttext-align: center;\n\t\tuser-select: none;\n\t\t-moz-user-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t\tmargin-top: 0.1em;\n\n\t\t> span {\n\t\t\tvertical-align: middle;\n\t\t\tdisplay: inline-flex;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\n\t\t\t// Vertical align only works for inline-block elements in Firefox\n\t\t\t@-moz-document url-prefix() {\n\t\t\t\timg {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.ak-editor-panel__content {\n\t\tmargin: ", " 0 ", ";\n\t\tflex: 1 0 0;\n\t\t/*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n\t\tmin-width: 0;\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t", "\n"])), "var(--ds-border-radius, 3px)", _editorSharedStyles.blockNodesVerticalMargin, "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", _editorSharedStyles.akEditorTableCellMinWidth, mainDynamicStyles(_adfSchema.PanelType.INFO), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", _emoji.emojiSprite, panelEmojiSpriteVerticalAlignment, _emoji.emojiImage, panelEmojiImageVerticalAlignment, "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", _adfSchema.PanelType.INFO, getIconStyles(_adfSchema.PanelType.INFO), _adfSchema.PanelType.NOTE, mainDynamicStyles(_adfSchema.PanelType.NOTE), getIconStyles(_adfSchema.PanelType.NOTE), _adfSchema.PanelType.TIP, mainDynamicStyles(_adfSchema.PanelType.TIP), getIconStyles(_adfSchema.PanelType.TIP), _adfSchema.PanelType.WARNING, mainDynamicStyles(_adfSchema.PanelType.WARNING), getIconStyles(_adfSchema.PanelType.WARNING), _adfSchema.PanelType.ERROR, mainDynamicStyles(_adfSchema.PanelType.ERROR), getIconStyles(_adfSchema.PanelType.ERROR), _adfSchema.PanelType.SUCCESS, mainDynamicStyles(_adfSchema.PanelType.SUCCESS), getIconStyles(_adfSchema.PanelType.SUCCESS), (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? "&.".concat(PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t\tpadding-left: ", "var(--ds-space-150, 12px)", ";\n\t\t}") : '');
161
160
  };
162
161
  var panelSharedStyles = exports.panelSharedStyles = function panelSharedStyles() {
163
162
  return (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(PanelSharedCssClassName.prefix), panelSharedStylesWithoutPrefix()));
@@ -10,7 +10,6 @@ var _react = require("@emotion/react");
10
10
  var _adfSchema = require("@atlaskit/adf-schema");
11
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
12
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
14
13
  var _browser = require("../../utils/browser");
15
14
  var _codeBlock = require("./code-block");
16
15
  var _tableCell = require("./tableCell");
@@ -51,7 +50,7 @@ var TableSharedCssClassName = exports.TableSharedCssClassName = {
51
50
 
52
51
  /* first block node has 0 top margin */
53
52
  var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
54
- return (0, _experiments.editorExperiment)('nested-dnd', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
53
+ return (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
55
54
  (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"]))) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
56
55
  (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :first-child:not(style),\n\t\t\t\t> style:first-child + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"])));
57
56
  };
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "103.0.0";
26
+ var packageVersion = "103.1.1";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "103.0.0";
4
+ const packageVersion = "103.1.1";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -23,7 +23,7 @@ const getHandleStyle = node => {
23
23
  };
24
24
  // expand and layout section elements have a negative margin applied
25
25
  default:
26
- const handleOffset = editorExperiment('nested-dnd', true) ? LAYOUT_SECTION_MARGIN * 2 + layoutMarginOffset : LAYOUT_COLUMN_PADDING * 2;
26
+ const handleOffset = fg('platform_editor_nested_dnd_styles_changes') ? LAYOUT_SECTION_MARGIN * 2 + layoutMarginOffset : LAYOUT_COLUMN_PADDING * 2;
27
27
  return {
28
28
  left: {
29
29
  left: `-${handleOffset}px`,
@@ -7,7 +7,6 @@ import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/e
7
7
  import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
8
8
  import { emojiImage, emojiSprite } from '@atlaskit/emoji';
9
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
11
10
  const lightPanelColors = {
12
11
  info: '#DEEBFF',
13
12
  note: '#EAE6FF',
@@ -244,7 +243,7 @@ export const panelSharedStylesWithoutPrefix = () => css`
244
243
  ${getIconStyles(PanelType.SUCCESS)}
245
244
  }
246
245
 
247
- ${editorExperiment('nested-dnd', true) ? `&.${PanelSharedCssClassName.noIcon} {
246
+ ${fg('platform_editor_nested_dnd_styles_changes') ? `&.${PanelSharedCssClassName.noIcon} {
248
247
  padding-right: ${"var(--ds-space-150, 12px)"};
249
248
  padding-left: ${"var(--ds-space-150, 12px)"};
250
249
  }` : ''}
@@ -3,7 +3,6 @@ import { css } from '@emotion/react';
3
3
  import { tableCellContentDomSelector, tableCellSelector, tableHeaderSelector, tablePrefixSelector } from '@atlaskit/adf-schema';
4
4
  import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorSelectedNodeClassName, akEditorTableBorder, akEditorTableNumberColumnWidth, akEditorTableToolbar, akEditorWideLayoutWidth, overflowShadow } from '@atlaskit/editor-shared-styles';
5
5
  import { fg } from '@atlaskit/platform-feature-flags';
6
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
6
  import { browser } from '../../utils/browser';
8
7
  import { CodeBlockSharedCssClassName } from './code-block';
9
8
  import { tableCellBackgroundStyleOverride } from './tableCell';
@@ -42,7 +41,7 @@ export const TableSharedCssClassName = {
42
41
  };
43
42
 
44
43
  /* first block node has 0 top margin */
45
- const firstNodeWithNotMarginTop = () => editorExperiment('nested-dnd', true) ?
44
+ const firstNodeWithNotMarginTop = () => fg('platform_editor_nested_dnd_styles_changes') ?
46
45
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
47
46
  css`
48
47
  > :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "103.0.0";
16
+ const packageVersion = "103.1.1";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "103.0.0";
10
+ var packageVersion = "103.1.1";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ var getHandleStyle = function getHandleStyle(node) {
24
24
  };
25
25
  // expand and layout section elements have a negative margin applied
26
26
  default:
27
- var handleOffset = editorExperiment('nested-dnd', true) ? LAYOUT_SECTION_MARGIN * 2 + layoutMarginOffset : LAYOUT_COLUMN_PADDING * 2;
27
+ var handleOffset = fg('platform_editor_nested_dnd_styles_changes') ? LAYOUT_SECTION_MARGIN * 2 + layoutMarginOffset : LAYOUT_COLUMN_PADDING * 2;
28
28
  return {
29
29
  left: {
30
30
  left: "-".concat(handleOffset, "px"),
@@ -10,7 +10,6 @@ import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/e
10
10
  import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
11
11
  import { emojiImage, emojiSprite } from '@atlaskit/emoji';
12
12
  import { fg } from '@atlaskit/platform-feature-flags';
13
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
14
13
  var lightPanelColors = {
15
14
  info: '#DEEBFF',
16
15
  note: '#EAE6FF',
@@ -148,7 +147,7 @@ var mainDynamicStyles = function mainDynamicStyles(panelType) {
148
147
 
149
148
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Safe to autofix with a tiny tweak to `mainDynamicStyles` being an object, but holding off…
150
149
  export var panelSharedStylesWithoutPrefix = function panelSharedStylesWithoutPrefix() {
151
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tborder-radius: ", ";\n\tmargin: ", " 0 0;\n\tpadding-top: ", ";\n\tpadding-right: ", ";\n\tpadding-bottom: ", ";\n\tpadding-left: ", ";\n\tmin-width: ", "px;\n\tdisplay: flex;\n\tposition: relative;\n\talign-items: normal;\n\tword-break: break-word;\n\n\t", "\n\n\t.", " {\n\t\tflex-shrink: 0;\n\t\theight: ", ";\n\t\twidth: ", ";\n\t\tbox-sizing: content-box;\n\t\tpadding-right: ", ";\n\t\ttext-align: center;\n\t\tuser-select: none;\n\t\t-moz-user-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t\tmargin-top: 0.1em;\n\n\t\t> span {\n\t\t\tvertical-align: middle;\n\t\t\tdisplay: inline-flex;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\n\t\t\t// Vertical align only works for inline-block elements in Firefox\n\t\t\t@-moz-document url-prefix() {\n\t\t\t\timg {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.ak-editor-panel__content {\n\t\tmargin: ", " 0 ", ";\n\t\tflex: 1 0 0;\n\t\t/*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n\t\tmin-width: 0;\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t", "\n"])), "var(--ds-border-radius, 3px)", blockNodesVerticalMargin, "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", akEditorTableCellMinWidth, mainDynamicStyles(PanelType.INFO), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", emojiSprite, panelEmojiSpriteVerticalAlignment, emojiImage, panelEmojiImageVerticalAlignment, "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", PanelType.INFO, getIconStyles(PanelType.INFO), PanelType.NOTE, mainDynamicStyles(PanelType.NOTE), getIconStyles(PanelType.NOTE), PanelType.TIP, mainDynamicStyles(PanelType.TIP), getIconStyles(PanelType.TIP), PanelType.WARNING, mainDynamicStyles(PanelType.WARNING), getIconStyles(PanelType.WARNING), PanelType.ERROR, mainDynamicStyles(PanelType.ERROR), getIconStyles(PanelType.ERROR), PanelType.SUCCESS, mainDynamicStyles(PanelType.SUCCESS), getIconStyles(PanelType.SUCCESS), editorExperiment('nested-dnd', true) ? "&.".concat(PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t\tpadding-left: ", "var(--ds-space-150, 12px)", ";\n\t\t}") : '');
150
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tborder-radius: ", ";\n\tmargin: ", " 0 0;\n\tpadding-top: ", ";\n\tpadding-right: ", ";\n\tpadding-bottom: ", ";\n\tpadding-left: ", ";\n\tmin-width: ", "px;\n\tdisplay: flex;\n\tposition: relative;\n\talign-items: normal;\n\tword-break: break-word;\n\n\t", "\n\n\t.", " {\n\t\tflex-shrink: 0;\n\t\theight: ", ";\n\t\twidth: ", ";\n\t\tbox-sizing: content-box;\n\t\tpadding-right: ", ";\n\t\ttext-align: center;\n\t\tuser-select: none;\n\t\t-moz-user-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t\tmargin-top: 0.1em;\n\n\t\t> span {\n\t\t\tvertical-align: middle;\n\t\t\tdisplay: inline-flex;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\n\t\t\t// Vertical align only works for inline-block elements in Firefox\n\t\t\t@-moz-document url-prefix() {\n\t\t\t\timg {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.ak-editor-panel__content {\n\t\tmargin: ", " 0 ", ";\n\t\tflex: 1 0 0;\n\t\t/*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n\t\tmin-width: 0;\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\t\t", "\n\t}\n\n\t", "\n"])), "var(--ds-border-radius, 3px)", blockNodesVerticalMargin, "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", akEditorTableCellMinWidth, mainDynamicStyles(PanelType.INFO), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", emojiSprite, panelEmojiSpriteVerticalAlignment, emojiImage, panelEmojiImageVerticalAlignment, "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", PanelType.INFO, getIconStyles(PanelType.INFO), PanelType.NOTE, mainDynamicStyles(PanelType.NOTE), getIconStyles(PanelType.NOTE), PanelType.TIP, mainDynamicStyles(PanelType.TIP), getIconStyles(PanelType.TIP), PanelType.WARNING, mainDynamicStyles(PanelType.WARNING), getIconStyles(PanelType.WARNING), PanelType.ERROR, mainDynamicStyles(PanelType.ERROR), getIconStyles(PanelType.ERROR), PanelType.SUCCESS, mainDynamicStyles(PanelType.SUCCESS), getIconStyles(PanelType.SUCCESS), fg('platform_editor_nested_dnd_styles_changes') ? "&.".concat(PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t\tpadding-left: ", "var(--ds-space-150, 12px)", ";\n\t\t}") : '');
152
151
  };
153
152
  export var panelSharedStyles = function panelSharedStyles() {
154
153
  return css(_defineProperty({}, ".".concat(PanelSharedCssClassName.prefix), panelSharedStylesWithoutPrefix()));
@@ -5,7 +5,6 @@ import { css } from '@emotion/react';
5
5
  import { tableCellContentDomSelector, tableCellSelector, tableHeaderSelector, tablePrefixSelector } from '@atlaskit/adf-schema';
6
6
  import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorSelectedNodeClassName, akEditorTableBorder, akEditorTableNumberColumnWidth, akEditorTableToolbar, akEditorWideLayoutWidth, overflowShadow } from '@atlaskit/editor-shared-styles';
7
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
8
  import { browser } from '../../utils/browser';
10
9
  import { CodeBlockSharedCssClassName } from './code-block';
11
10
  import { tableCellBackgroundStyleOverride } from './tableCell';
@@ -45,7 +44,7 @@ export var TableSharedCssClassName = {
45
44
 
46
45
  /* first block node has 0 top margin */
47
46
  var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
48
- return editorExperiment('nested-dnd', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
47
+ return fg('platform_editor_nested_dnd_styles_changes') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
49
48
  css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\t> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"]))) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
50
49
  css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t\t> :first-child:not(style),\n\t\t\t\t> style:first-child + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"])));
51
50
  };
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "103.0.0";
23
+ var packageVersion = "103.1.1";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -1,6 +1,9 @@
1
1
  import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
2
- import { type OperationalAEP } from './utils';
3
- export type SelectionToolbarAEP = OperationalAEP<ACTION.INITIALISED, ACTION_SUBJECT.USER_PREFERENCES, ACTION_SUBJECT_ID.SELECTION_TOOLBAR_PREFERENCES, {
2
+ import { TrackAEP, type OperationalAEP } from './utils';
3
+ export type UserPreferencesInitialisedAEP = OperationalAEP<ACTION.INITIALISED, ACTION_SUBJECT.USER_PREFERENCES, ACTION_SUBJECT_ID.SELECTION_TOOLBAR_PREFERENCES, {
4
4
  toolbarDocking: string | null;
5
5
  }>;
6
- export type SelectionToolbarEventPayload = SelectionToolbarAEP;
6
+ export type UserPreferencesUpdatedAEP = TrackAEP<ACTION.UPDATED, ACTION_SUBJECT.USER_PREFERENCES, ACTION_SUBJECT_ID.SELECTION_TOOLBAR_PREFERENCES, {
7
+ toolbarDocking: string | null;
8
+ }, undefined>;
9
+ export type SelectionToolbarEventPayload = UserPreferencesInitialisedAEP | UserPreferencesUpdatedAEP;
@@ -339,6 +339,15 @@ export interface FloatingToolbarConfig {
339
339
  * @see clean up ticket ED-26803
340
340
  */
341
341
  forceStaticToolbar?: boolean;
342
+ /**
343
+ * For internal use only, we will be depricating this API soon.
344
+ * If any config has __suppressAllToolbars set to true, no floating toolbar will be rendered.
345
+ * Use case:
346
+ * When a node is nested inside a table and the cursor is inside of the nested node.
347
+ * Nested node's toolbar is active. When table's menu opens, we provide table's config with
348
+ * __suppressAllToolbars set to true.
349
+ */
350
+ __suppressAllToolbars?: boolean;
342
351
  }
343
352
  export type FloatingToolbarHandler = (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory, processedConfigs?: Array<FloatingToolbarConfig>) => FloatingToolbarConfig | undefined;
344
353
  export {};
@@ -1,6 +1,9 @@
1
1
  import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
2
- import { type OperationalAEP } from './utils';
3
- export type SelectionToolbarAEP = OperationalAEP<ACTION.INITIALISED, ACTION_SUBJECT.USER_PREFERENCES, ACTION_SUBJECT_ID.SELECTION_TOOLBAR_PREFERENCES, {
2
+ import { TrackAEP, type OperationalAEP } from './utils';
3
+ export type UserPreferencesInitialisedAEP = OperationalAEP<ACTION.INITIALISED, ACTION_SUBJECT.USER_PREFERENCES, ACTION_SUBJECT_ID.SELECTION_TOOLBAR_PREFERENCES, {
4
4
  toolbarDocking: string | null;
5
5
  }>;
6
- export type SelectionToolbarEventPayload = SelectionToolbarAEP;
6
+ export type UserPreferencesUpdatedAEP = TrackAEP<ACTION.UPDATED, ACTION_SUBJECT.USER_PREFERENCES, ACTION_SUBJECT_ID.SELECTION_TOOLBAR_PREFERENCES, {
7
+ toolbarDocking: string | null;
8
+ }, undefined>;
9
+ export type SelectionToolbarEventPayload = UserPreferencesInitialisedAEP | UserPreferencesUpdatedAEP;
@@ -342,6 +342,15 @@ export interface FloatingToolbarConfig {
342
342
  * @see clean up ticket ED-26803
343
343
  */
344
344
  forceStaticToolbar?: boolean;
345
+ /**
346
+ * For internal use only, we will be depricating this API soon.
347
+ * If any config has __suppressAllToolbars set to true, no floating toolbar will be rendered.
348
+ * Use case:
349
+ * When a node is nested inside a table and the cursor is inside of the nested node.
350
+ * Nested node's toolbar is active. When table's menu opens, we provide table's config with
351
+ * __suppressAllToolbars set to true.
352
+ */
353
+ __suppressAllToolbars?: boolean;
345
354
  }
346
355
  export type FloatingToolbarHandler = (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory, processedConfigs?: Array<FloatingToolbarConfig>) => FloatingToolbarConfig | undefined;
347
356
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "103.0.0",
3
+ "version": "103.1.1",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -332,6 +332,9 @@
332
332
  "atlas_editor_typography_refreshed": {
333
333
  "type": "boolean"
334
334
  },
335
+ "platform_editor_nested_dnd_styles_changes": {
336
+ "type": "boolean"
337
+ },
335
338
  "platform_editor_controls_patch_1": {
336
339
  "type": "boolean"
337
340
  },