@atlaskit/editor-core 197.2.0 → 197.2.2

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 (68) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/composable-editor/core-editor.js +2 -2
  3. package/dist/cjs/create-editor/create-schema.js +2 -2
  4. package/dist/cjs/index.js +2 -2
  5. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +57 -66
  6. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +1 -18
  7. package/dist/cjs/ui/ContextPanel/index.js +1 -8
  8. package/dist/cjs/utils/document.js +0 -24
  9. package/dist/cjs/version-wrapper.js +1 -1
  10. package/dist/es2019/composable-editor/core-editor.js +1 -1
  11. package/dist/es2019/create-editor/create-schema.js +1 -1
  12. package/dist/es2019/index.js +1 -1
  13. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +58 -68
  14. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +1 -18
  15. package/dist/es2019/ui/ContextPanel/index.js +0 -5
  16. package/dist/es2019/utils/document.js +0 -20
  17. package/dist/es2019/version-wrapper.js +1 -1
  18. package/dist/esm/composable-editor/core-editor.js +1 -1
  19. package/dist/esm/create-editor/create-schema.js +1 -1
  20. package/dist/esm/index.js +1 -1
  21. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +58 -67
  22. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +1 -18
  23. package/dist/esm/ui/ContextPanel/index.js +0 -5
  24. package/dist/esm/utils/document.js +0 -22
  25. package/dist/esm/version-wrapper.js +1 -1
  26. package/dist/types/composable-editor/editor-internal.d.ts +1 -1
  27. package/dist/types/composable-editor/hooks/useEditorMeasuresConstructor.d.ts +1 -1
  28. package/dist/types/composable-editor/hooks/useMeasureEditorMountTime.d.ts +1 -1
  29. package/dist/types/composable-editor/hooks/useProviderFactory.d.ts +1 -1
  30. package/dist/types/composable-editor/utils/editorMeasureTTICallback.d.ts +1 -1
  31. package/dist/types/composable-editor/utils/sendDurationAnalytics.d.ts +1 -1
  32. package/dist/types/create-editor/ErrorBoundary.d.ts +1 -1
  33. package/dist/types/create-editor/ReactEditorView.d.ts +1 -1
  34. package/dist/types/create-editor/create-plugins-list.d.ts +1 -1
  35. package/dist/types/index.d.ts +1 -1
  36. package/dist/types/presets/default.d.ts +1 -1
  37. package/dist/types/presets/universal.d.ts +1 -1
  38. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -2
  39. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  40. package/dist/types/ui/ContextPanel/index.d.ts +0 -1
  41. package/dist/types/utils/document.d.ts +0 -5
  42. package/dist/types-ts4.5/composable-editor/editor-internal.d.ts +1 -1
  43. package/dist/types-ts4.5/composable-editor/hooks/useEditorMeasuresConstructor.d.ts +1 -1
  44. package/dist/types-ts4.5/composable-editor/hooks/useMeasureEditorMountTime.d.ts +1 -1
  45. package/dist/types-ts4.5/composable-editor/hooks/useProviderFactory.d.ts +1 -1
  46. package/dist/types-ts4.5/composable-editor/utils/editorMeasureTTICallback.d.ts +1 -1
  47. package/dist/types-ts4.5/composable-editor/utils/sendDurationAnalytics.d.ts +1 -1
  48. package/dist/types-ts4.5/create-editor/ErrorBoundary.d.ts +1 -1
  49. package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +1 -1
  50. package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +1 -1
  51. package/dist/types-ts4.5/index.d.ts +1 -1
  52. package/dist/types-ts4.5/presets/default.d.ts +1 -1
  53. package/dist/types-ts4.5/presets/universal.d.ts +1 -1
  54. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -2
  55. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
  56. package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +0 -1
  57. package/dist/types-ts4.5/utils/document.d.ts +0 -5
  58. package/package.json +3 -7
  59. package/dist/cjs/ui/ContextPanel/deprecated.js +0 -283
  60. package/dist/cjs/utils/node-width.js +0 -20
  61. package/dist/es2019/ui/ContextPanel/deprecated.js +0 -258
  62. package/dist/es2019/utils/node-width.js +0 -9
  63. package/dist/esm/ui/ContextPanel/deprecated.js +0 -277
  64. package/dist/esm/utils/node-width.js +0 -9
  65. package/dist/types/ui/ContextPanel/deprecated.d.ts +0 -44
  66. package/dist/types/utils/node-width.d.ts +0 -7
  67. package/dist/types-ts4.5/ui/ContextPanel/deprecated.d.ts +0 -44
  68. package/dist/types-ts4.5/utils/node-width.d.ts +0 -7
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
3
3
  import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
4
4
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
5
5
  import type { SelectionPluginOptions } from '@atlaskit/editor-common/selection';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
3
3
  import type { EditorAppearance } from '@atlaskit/editor-common/types';
4
4
  import { type EmojiPluginOptions } from '@atlaskit/editor-plugins/emoji';
5
5
  import type { EditorProps } from '../types';
@@ -5,13 +5,12 @@ export declare const ScrollContainer: import("react").ForwardRefExoticComponent<
5
5
  colorMode?: "light" | "dark" | undefined;
6
6
  featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
7
7
  viewMode?: "view" | "edit" | undefined;
8
- } & import("react").HTMLProps<HTMLDivElement>, "headers" | "method" | "id" | "default" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "children" | "value" | "name" | "key" | "width" | "property" | "type" | "content" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "list" | "open" | "accessKey" | "dir" | "className" | "role" | "start" | "action" | "step" | "wrap" | "color" | "height" | "translate" | "hidden" | keyof {
8
+ } & import("react").HTMLProps<HTMLDivElement>, "headers" | "method" | "id" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "children" | "value" | "name" | "key" | "width" | "property" | "type" | "content" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "list" | "open" | "accessKey" | "dir" | "className" | "role" | "start" | "action" | "step" | "wrap" | "color" | "height" | "translate" | "default" | "hidden" | keyof {
9
9
  theme?: import("@emotion/react").Theme | undefined;
10
10
  colorMode?: "light" | "dark" | undefined;
11
11
  featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
12
12
  viewMode?: "view" | "edit" | undefined;
13
13
  } | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "target" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("react").RefAttributes<HTMLDivElement>>;
14
- export declare const positionedOverEditorStyle: import("@emotion/react").SerializedStyles;
15
14
  export declare const contentArea: () => import("@emotion/react").SerializedStyles;
16
15
  export declare const contentAreaHeightNoToolbar: import("@emotion/react").SerializedStyles;
17
16
  export declare const sidebarArea: import("@emotion/react").SerializedStyles;
@@ -15,6 +15,6 @@ type ContentStylesProps = {
15
15
  };
16
16
  export declare const placeholderStyles: SerializedStyles;
17
17
  type Props = ContentStylesProps & React.HTMLProps<HTMLDivElement>;
18
- export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "id" | "default" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "children" | "value" | "name" | "key" | "width" | "property" | "type" | "content" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "list" | "open" | "accessKey" | "dir" | "className" | "role" | "start" | "action" | "step" | "wrap" | "color" | "height" | "translate" | "hidden" | keyof ContentStylesProps | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "target" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
19
- declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "id" | "default" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "children" | "value" | "name" | "key" | "width" | "property" | "type" | "content" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "list" | "open" | "accessKey" | "dir" | "className" | "role" | "start" | "action" | "step" | "wrap" | "color" | "height" | "translate" | "hidden" | keyof ContentStylesProps | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "target" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
18
+ export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "id" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "children" | "value" | "name" | "key" | "width" | "property" | "type" | "content" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "list" | "open" | "accessKey" | "dir" | "className" | "role" | "start" | "action" | "step" | "wrap" | "color" | "height" | "translate" | "default" | "hidden" | keyof ContentStylesProps | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "target" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "id" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "children" | "value" | "name" | "key" | "width" | "property" | "type" | "content" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "list" | "open" | "accessKey" | "dir" | "className" | "role" | "start" | "action" | "step" | "wrap" | "color" | "height" | "translate" | "default" | "hidden" | keyof ContentStylesProps | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "target" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
20
20
  export default _default;
@@ -38,5 +38,4 @@ export declare class SwappableContentArea extends React.PureComponent<SwappableC
38
38
  render(): jsx.JSX.Element;
39
39
  }
40
40
  export declare function ContextPanel(props: Props): jsx.JSX.Element;
41
- export default function ContextPanelDefault(props: Props): jsx.JSX.Element;
42
41
  export {};
@@ -1,4 +1,3 @@
1
- import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
2
1
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
2
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
3
  import type { ReplaceRawValue, Transformer } from '@atlaskit/editor-common/types';
@@ -6,7 +5,3 @@ import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
6
5
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
7
6
  export declare function processRawFragmentValue(schema: Schema, value?: ReplaceRawValue[], providerFactory?: ProviderFactory, sanitizePrivateContent?: boolean, contentTransformer?: Transformer<string>, dispatchAnalyticsEvent?: DispatchAnalyticsEvent): Fragment | undefined;
8
7
  export declare function getNodesCount(node: Node): Record<string, number>;
9
- /**
10
- * Returns a set of active child breakout modes
11
- */
12
- export declare function getChildBreakoutModes(doc: Node, schema: Schema, filter?: BreakoutMarkAttrs['mode'][]): BreakoutMarkAttrs['mode'][];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "197.2.0",
3
+ "version": "197.2.2",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/analytics-next": "^10.1.0",
44
44
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
45
45
  "@atlaskit/button": "^20.1.0",
46
- "@atlaskit/editor-common": "^88.6.0",
46
+ "@atlaskit/editor-common": "^88.7.0",
47
47
  "@atlaskit/editor-plugins": "^4.3.0",
48
48
  "@atlaskit/editor-prosemirror": "5.0.1",
49
49
  "@atlaskit/editor-shared-styles": "^2.13.0",
@@ -106,8 +106,7 @@
106
106
  "@atlaskit/util-data-test": "^17.9.0",
107
107
  "@atlaskit/visual-regression": "*",
108
108
  "@atlassian/adf-schema-json": "^1.22.0",
109
- "@atlassian/feature-flags-test-utils": "*",
110
- "@atlassian/search-provider": "2.4.117",
109
+ "@atlassian/search-provider": "2.4.118",
111
110
  "@emotion/jest": "^11.8.0",
112
111
  "@storybook/addon-knobs": "^5.3.18",
113
112
  "@testing-library/react": "^12.1.5",
@@ -218,9 +217,6 @@
218
217
  "type": "boolean",
219
218
  "referenceOnly": "true"
220
219
  },
221
- "platform_editor_context-panel_simplify_behaviour": {
222
- "type": "boolean"
223
- },
224
220
  "platform.confluence.frontend.narrow-full-page-editor-toolbar": {
225
221
  "type": "boolean"
226
222
  },
@@ -1,283 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.content = exports.SwappableContentArea = void 0;
9
- exports.default = ContextPanel;
10
- exports.shouldPanelBePositionedOverEditor = exports.panel = void 0;
11
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
14
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
16
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
17
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
18
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
19
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
20
- var _react = _interopRequireWildcard(require("react"));
21
- var _react2 = require("@emotion/react");
22
- var _Transition = _interopRequireDefault(require("react-transition-group/Transition"));
23
- var _ui = require("@atlaskit/editor-common/ui");
24
- var _withPluginState = require("@atlaskit/editor-common/with-plugin-state");
25
- var _utils = require("@atlaskit/editor-prosemirror/utils");
26
- var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
27
- var _colors = require("@atlaskit/theme/colors");
28
- var _document = require("../../utils/document");
29
- var _WithEditorActions = _interopRequireDefault(require("../WithEditorActions"));
30
- var _excluded = ["actions"];
31
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
32
- 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 && Object.prototype.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; }
33
- 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; }
34
- 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; }
35
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
36
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
37
- * @jsxRuntime classic
38
- * @jsx jsx
39
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
40
- var ANIM_SPEED_MS = 500;
41
- var EDITOR_WIDTH = _editorSharedStyles.akEditorDefaultLayoutWidth + _editorSharedStyles.akEditorBreakoutPadding;
42
- var WIDE_EDITOR_WIDTH = _editorSharedStyles.akEditorWideLayoutWidth + _editorSharedStyles.akEditorBreakoutPadding;
43
- var FULLWIDTH_MODE = 'full-width';
44
- var WIDE_MODE = 'wide';
45
- var absolutePanelStyles = (0, _react2.css)({
46
- position: 'absolute',
47
- right: 0,
48
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
49
- height: "calc(100% - ".concat((0, _editorSharedStyles.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT)(), ")")
50
- });
51
- var checkTableExistsInDoc = function checkTableExistsInDoc(editorView) {
52
- var tableNodeSchema = editorView.state.schema.nodes.table;
53
- var findResult = (0, _utils.findChildrenByType)(editorView.state.doc, tableNodeSchema);
54
- return findResult.length > 0;
55
- };
56
- var shouldPanelBePositionedOverEditor = exports.shouldPanelBePositionedOverEditor = function shouldPanelBePositionedOverEditor(editorWidth, panelWidth, editorView) {
57
- var lineLength = editorWidth.lineLength,
58
- _editorWidth$containe = editorWidth.containerWidth,
59
- containerWidth = _editorWidth$containe === void 0 ? 0 : _editorWidth$containe,
60
- contentBreakoutModes = editorWidth.contentBreakoutModes;
61
- var editorNotFullWidth = !(lineLength && lineLength > _editorSharedStyles.akEditorDefaultLayoutWidth);
62
- var hasSpaceForPanel = !contentBreakoutModes.length && containerWidth >= panelWidth * 2 + EDITOR_WIDTH;
63
- var hasSpaceForWideBreakoutsAndPanel = !contentBreakoutModes.includes(FULLWIDTH_MODE) && contentBreakoutModes.includes(WIDE_MODE) && containerWidth >= panelWidth * 2 + WIDE_EDITOR_WIDTH;
64
- if (!editorView) {
65
- return editorNotFullWidth && (hasSpaceForPanel || hasSpaceForWideBreakoutsAndPanel);
66
- } else {
67
- // when custom table width feature flag is on,
68
- // there are scenarios when a table has attr layout default, but width is in full-width or very wide
69
- // but in this case we still want the shouldPanelBePositionedOverEditor return false
70
- // previous logic is returning false when table layout default
71
- // but when custom table width feature flag is one, we want to return false whenever there is a table in the doc
72
- var isTableInDoc = checkTableExistsInDoc(editorView);
73
- return editorNotFullWidth && (hasSpaceForPanel || hasSpaceForWideBreakoutsAndPanel) && !isTableInDoc;
74
- }
75
- };
76
- var panelHidden = (0, _react2.css)({
77
- width: 0
78
- });
79
-
80
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
81
- var panel = exports.panel = (0, _react2.css)({
82
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
83
- width: "".concat(_editorSharedStyles.akEditorContextPanelWidth, "px"),
84
- height: '100%',
85
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
86
- transition: "width ".concat(ANIM_SPEED_MS, "ms ").concat(_editorSharedStyles.akEditorSwoopCubicBezier),
87
- overflow: 'hidden',
88
- boxShadow: "inset 2px 0 0 0 ".concat("var(--ds-border, ".concat(_colors.N30, ")"))
89
- });
90
-
91
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
92
- var content = exports.content = (0, _react2.css)({
93
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
94
- transition: "width 600ms ".concat(_editorSharedStyles.akEditorSwoopCubicBezier),
95
- boxSizing: 'border-box',
96
- padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-200, 16px)", " 0px"),
97
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
98
- width: "".concat(_editorSharedStyles.akEditorContextPanelWidth, "px"),
99
- height: '100%',
100
- overflowY: 'auto'
101
- });
102
- var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
103
- (0, _inherits2.default)(SwappableContentArea, _React$PureComponent);
104
- var _super = _createSuper(SwappableContentArea);
105
- function SwappableContentArea() {
106
- var _this;
107
- (0, _classCallCheck2.default)(this, SwappableContentArea);
108
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
109
- args[_key] = arguments[_key];
110
- }
111
- _this = _super.call.apply(_super, [this].concat(args));
112
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
113
- mounted: false,
114
- currentPluginContent: undefined
115
- });
116
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "focusEditor", function () {
117
- var editorView = _this.props.editorView;
118
- if (editorView && !editorView.hasFocus()) {
119
- var _editorView$focus;
120
- (_editorView$focus = editorView.focus) === null || _editorView$focus === void 0 || _editorView$focus.call(editorView);
121
- }
122
- });
123
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "showPluginContent", function () {
124
- var pluginContent = _this.props.pluginContent;
125
- var currentPluginContent = _this.state.currentPluginContent;
126
- if (!currentPluginContent) {
127
- return;
128
- }
129
- return (0, _react2.jsx)(_Transition.default, {
130
- timeout: _this.state.mounted ? ANIM_SPEED_MS : 0,
131
- in: !!pluginContent,
132
- mountOnEnter: true,
133
- unmountOnExit: true,
134
- onExited: function onExited() {
135
- return _this.unsetPluginContent();
136
- }
137
- }, currentPluginContent);
138
- });
139
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "showProvidedContent", function (isVisible) {
140
- var children = _this.props.children;
141
- if (!children) {
142
- return;
143
- }
144
- return (0, _react2.jsx)(_Transition.default, {
145
- timeout: _this.state.mounted ? ANIM_SPEED_MS : 0,
146
- in: isVisible,
147
- mountOnEnter: true,
148
- unmountOnExit: true,
149
- onExiting: _this.focusEditor
150
- }, children);
151
- });
152
- return _this;
153
- }
154
- (0, _createClass2.default)(SwappableContentArea, [{
155
- key: "unsetPluginContent",
156
- value: function unsetPluginContent() {
157
- this.setState({
158
- currentPluginContent: undefined
159
- });
160
- }
161
- }, {
162
- key: "componentDidMount",
163
- value: function componentDidMount() {
164
- // use this to trigger an animation
165
- this.setState({
166
- mounted: true
167
- });
168
- }
169
- }, {
170
- key: "render",
171
- value: function render() {
172
- var _this2 = this;
173
- var _this$props = this.props,
174
- editorWidth = _this$props.editorWidth,
175
- editorView = _this$props.editorView;
176
- var width = _editorSharedStyles.akEditorContextPanelWidth;
177
- var userVisible = !!this.props.visible;
178
- var visible = userVisible || !!this.state.currentPluginContent;
179
- return (0, _react2.jsx)(_ui.ContextPanelConsumer, null, function (_ref) {
180
- var broadcastWidth = _ref.broadcastWidth,
181
- broadcastPosition = _ref.broadcastPosition,
182
- positionedOverEditor = _ref.positionedOverEditor;
183
- var contextPanelWidth = visible ? width : 0;
184
- var newPosition = editorWidth ? shouldPanelBePositionedOverEditor(editorWidth, width, editorView) : false;
185
- broadcastWidth(contextPanelWidth);
186
- (newPosition && visible) !== positionedOverEditor && broadcastPosition(newPosition && visible);
187
- return (0, _react2.jsx)("div", {
188
- css: [panel, !visible && panelHidden,
189
- /**
190
- * Only use absolute position for panel when screen size is wide enough
191
- * to accommodate breakout content and editor is not in wide mode.
192
- */
193
- newPosition && absolutePanelStyles],
194
- "data-testid": "context-panel-panel",
195
- "aria-labelledby": "context-panel-title",
196
- role: "dialog"
197
- }, (0, _react2.jsx)("div", {
198
- "data-testid": "context-panel-content",
199
- css: [content, !visible && panelHidden]
200
- }, _this2.showPluginContent() || _this2.showProvidedContent(userVisible)));
201
- });
202
- }
203
- }], [{
204
- key: "getDerivedStateFromProps",
205
- value: function getDerivedStateFromProps(props, state) {
206
- if (props.pluginContent !== state.currentPluginContent) {
207
- return _objectSpread(_objectSpread({}, state), {}, {
208
- currentPluginContent: props.pluginContent
209
- });
210
- }
211
- return null;
212
- }
213
- }]);
214
- return SwappableContentArea;
215
- }(_react.default.PureComponent); // TODO: ED-17837 We have this workaround because we do
216
- // not have access to the pluginInjectionApi at this location.
217
- // It might be that we need to inject the pluginInjectionApi
218
- // via context so that we can use it in this file (similar to
219
- // WithEditorActions). To be investigated further.
220
- // @ts-ignore
221
- var widthPluginKey = {
222
- key: 'widthPlugin$',
223
- getState: function getState(state) {
224
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
225
- return state['widthPlugin$'];
226
- }
227
- };
228
-
229
- // @ts-ignore
230
- var contextPanelPluginKey = {
231
- key: 'contextPanelPluginKey$',
232
- getState: function getState(state) {
233
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
234
- return state['contextPanelPluginKey$'];
235
- }
236
- };
237
- function ContextPanelWithActions(_ref2) {
238
- var actions = _ref2.actions,
239
- props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
240
- var eventDispatcher = actions._privateGetEventDispatcher();
241
- var editorView = actions._privateGetEditorView();
242
- var _useContext = (0, _react.useContext)(_ui.WidthContext),
243
- width = _useContext.width;
244
- if (!eventDispatcher) {
245
- return (0, _react2.jsx)(SwappableContentArea, (0, _extends2.default)({
246
- editorView: editorView
247
- }, props));
248
- }
249
- return (
250
- // @ts-ignore - 'WithPluginState' cannot be used as a JSX component.
251
- // This error was introduced after upgrading to TypeScript 5
252
- (0, _react2.jsx)(_withPluginState.WithPluginState, {
253
- eventDispatcher: eventDispatcher,
254
- plugins: {
255
- contextPanel: contextPanelPluginKey,
256
- widthState: widthPluginKey
257
- },
258
- render: function render(_ref3) {
259
- var contextPanel = _ref3.contextPanel,
260
- widthState = _ref3.widthState;
261
- var firstContent = contextPanel && contextPanel.contents.find(Boolean);
262
- var editorWidth = _objectSpread(_objectSpread({}, widthState), {}, {
263
- containerWidth: width,
264
- contentBreakoutModes: editorView ? (0, _document.getChildBreakoutModes)(editorView.state.doc, editorView.state.schema) : []
265
- });
266
- return (0, _react2.jsx)(SwappableContentArea, (0, _extends2.default)({}, props, {
267
- editorView: editorView,
268
- pluginContent: firstContent,
269
- editorWidth: editorWidth
270
- }));
271
- }
272
- })
273
- );
274
- }
275
- function ContextPanel(props) {
276
- return (0, _react2.jsx)(_WithEditorActions.default, {
277
- render: function render(actions) {
278
- return (0, _react2.jsx)(ContextPanelWithActions, (0, _extends2.default)({
279
- actions: actions
280
- }, props));
281
- }
282
- });
283
- }
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getBreakoutMode = void 0;
7
- Object.defineProperty(exports, "getParentNodeWidth", {
8
- enumerable: true,
9
- get: function get() {
10
- return _nodeWidth.getParentNodeWidth;
11
- }
12
- });
13
- var _nodeWidth = require("@atlaskit/editor-common/node-width");
14
- /**
15
- * Returns the breakout mode of a given node
16
- */
17
- var getBreakoutMode = exports.getBreakoutMode = function getBreakoutMode(node, breakout) {
18
- var breakoutMark = breakout && breakout.isInSet(node.marks);
19
- return breakoutMark ? breakoutMark.attrs.mode : node.attrs.layout;
20
- };