@atlaskit/editor-core 207.0.2 → 207.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/ui/Appearance/Chromeless.js +13 -2
  3. package/dist/cjs/ui/Appearance/Comment/Comment.js +3 -1
  4. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +3 -1
  5. package/dist/cjs/ui/ContentStyles/ai-panels.js +6 -1
  6. package/dist/cjs/ui/ContentStyles/index.js +2 -2
  7. package/dist/cjs/ui/ContentStyles/layout.js +8 -1
  8. package/dist/cjs/ui/ContentStyles/status.js +2 -2
  9. package/dist/cjs/ui/EditorContentContainer.js +220 -30
  10. package/dist/cjs/version-wrapper.js +1 -1
  11. package/dist/es2019/ui/Appearance/Chromeless.js +11 -1
  12. package/dist/es2019/ui/Appearance/Comment/Comment.js +3 -1
  13. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +3 -1
  14. package/dist/es2019/ui/ContentStyles/ai-panels.js +7 -0
  15. package/dist/es2019/ui/ContentStyles/index.js +4 -4
  16. package/dist/es2019/ui/ContentStyles/layout.js +7 -0
  17. package/dist/es2019/ui/ContentStyles/status.js +2 -2
  18. package/dist/es2019/ui/EditorContentContainer.js +753 -34
  19. package/dist/es2019/version-wrapper.js +1 -1
  20. package/dist/esm/ui/Appearance/Chromeless.js +13 -2
  21. package/dist/esm/ui/Appearance/Comment/Comment.js +3 -1
  22. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +3 -1
  23. package/dist/esm/ui/ContentStyles/ai-panels.js +7 -0
  24. package/dist/esm/ui/ContentStyles/index.js +2 -2
  25. package/dist/esm/ui/ContentStyles/layout.js +7 -0
  26. package/dist/esm/ui/ContentStyles/status.js +2 -2
  27. package/dist/esm/ui/EditorContentContainer.js +224 -30
  28. package/dist/esm/version-wrapper.js +1 -1
  29. package/dist/types/ui/Appearance/Chromeless.d.ts +8 -0
  30. package/dist/types/ui/ContentStyles/ai-panels.d.ts +6 -0
  31. package/dist/types/ui/ContentStyles/layout.d.ts +6 -0
  32. package/dist/types/ui/EditorContentContainer.d.ts +0 -3
  33. package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +8 -0
  34. package/dist/types-ts4.5/ui/ContentStyles/ai-panels.d.ts +6 -0
  35. package/dist/types-ts4.5/ui/ContentStyles/layout.d.ts +6 -0
  36. package/dist/types-ts4.5/ui/EditorContentContainer.d.ts +0 -3
  37. package/package.json +2 -2
@@ -41,8 +41,14 @@ scrollbarStyles, {
41
41
  });
42
42
  export const ContentArea = createEditorContentStyle();
43
43
  ContentArea.displayName = 'ContentArea';
44
- const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true), EditorContentContainer, ContentArea);
44
+ const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true, {
45
+ exposure: true
46
+ }), EditorContentContainer, ContentArea);
45
47
 
48
+ /**
49
+ * Render the editor in a chromeless appearance.
50
+ * Example use is the inline comment editor, which doesn't have editor toolbar
51
+ */
46
52
  // Ignored via go/ees005
47
53
  // eslint-disable-next-line @repo/internal/react/no-class-components
48
54
  export default class Editor extends React.Component {
@@ -116,6 +122,10 @@ export default class Editor extends React.Component {
116
122
  }), editorDOMElement, customContentComponents && 'after' in customContentComponents ? customContentComponents.after : null)));
117
123
  });
118
124
  }
125
+ /**
126
+ *
127
+ * @example
128
+ */
119
129
  render() {
120
130
  return jsx(RenderWithPluginState, {
121
131
  editorAPI: this.props.editorAPI,
@@ -76,7 +76,9 @@ const secondaryToolbarStyles = css({
76
76
  padding: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-025, 2px)"}`
77
77
  });
78
78
  const appearance = 'comment';
79
- const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true), EditorContentContainer, ContentArea);
79
+ const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true, {
80
+ exposure: true
81
+ }), EditorContentContainer, ContentArea);
80
82
  export const CommentEditorWithIntl = props => {
81
83
  const {
82
84
  editorAPI
@@ -40,7 +40,9 @@ scrollbarStyles);
40
40
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
41
41
  const ScrollContainer = createEditorContentStyle(scrollStyles);
42
42
  ScrollContainer.displayName = 'ScrollContainer';
43
- const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true), EditorContentContainer, ScrollContainer);
43
+ const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true, {
44
+ exposure: true
45
+ }), EditorContentContainer, ScrollContainer);
44
46
  const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
45
47
  var _contentAreaRef$curre;
46
48
  const theme = useTheme();
@@ -1,3 +1,10 @@
1
+ /**
2
+ * TODO ED-26957 - remove legacy styles when static emotion refactor is complete
3
+ * We are moving this to new location under FF: platform_editor_core_static_emotion
4
+ * New location: packages/editor/editor-core/src/ui/EditorContentContainer.tsx
5
+ * If you are making updates to this file, please updates in new location as well.
6
+ */
7
+
1
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
9
  import { css, keyframes } from '@emotion/react';
3
10
  const isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
@@ -361,7 +361,7 @@ const legacyContentStyles = props => css`
361
361
  pointer-events: none;
362
362
  opacity: 0.7;
363
363
  }
364
- `}
364
+ `}
365
365
 
366
366
  .ProseMirror-hideselection *::selection {
367
367
  background: transparent;
@@ -382,14 +382,14 @@ const legacyContentStyles = props => css`
382
382
  .ProseMirror-hideselection {
383
383
  caret-color: transparent;
384
384
  }
385
- ` : null}
385
+ ` : null}
386
386
 
387
387
  /* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */
388
388
  ${editorExperiment('platform_editor_advanced_code_blocks', true) ? css`
389
389
  .ProseMirror-hideselection {
390
390
  caret-color: transparent;
391
391
  }
392
- ` : null}
392
+ ` : null}
393
393
 
394
394
  .ProseMirror-selectednode {
395
395
  outline: none;
@@ -536,7 +536,7 @@ const legacyContentStyles = props => css`
536
536
  max-width: 18px;
537
537
  }
538
538
  }
539
- ` : null}
539
+ ` : null}
540
540
  `;
541
541
  export const createEditorContentStyle = styles => {
542
542
  return /*#__PURE__*/React.forwardRef((props, ref) => {
@@ -1,3 +1,10 @@
1
+ /**
2
+ * TODO ED-26957 - remove legacy styles when static emotion refactor is complete
3
+ * We are moving this to new location under FF: platform_editor_core_static_emotion
4
+ * New location: packages/editor/editor-core/src/ui/EditorContentContainer.tsx
5
+ * If you are making updates to this file, please updates in new location as well.
6
+ */
7
+
1
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
9
  import { css } from '@emotion/react';
3
10
  import { columnLayoutResponsiveSharedStyle, columnLayoutSharedStyle, LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '@atlaskit/editor-common/styles';
@@ -12,13 +12,13 @@ css`
12
12
  &.${akEditorSelectedNodeClassName} .${StatusSharedCssClassName.STATUS_LOZENGE} > span {
13
13
  box-shadow: ${akEditorSelectedBoldBoxShadow};
14
14
  }
15
- ` :
15
+ ` :
16
16
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
17
17
  css`
18
18
  &.${akEditorSelectedNodeClassName} .${StatusSharedCssClassName.STATUS_LOZENGE} > span {
19
19
  ${getSelectionStyles([SelectionStyle.BoxShadow])}
20
20
  }
21
- `;
21
+ `;
22
22
  const getStatusColors = () => fg('platform-component-visual-refresh') ? css({
23
23
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
24
24
  '[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] .lozenge-text': {