@atlaskit/editor-core 189.3.3 → 189.3.6

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 (148) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/plugins/index.js +0 -7
  3. package/dist/cjs/presets/default.js +2 -2
  4. package/dist/cjs/utils/deprecation-warnings.js +1 -3
  5. package/dist/cjs/utils/editorDeprecationWarnings.js +2 -4
  6. package/dist/cjs/version-wrapper.js +2 -5
  7. package/dist/es2019/plugins/index.js +0 -1
  8. package/dist/es2019/presets/default.js +1 -1
  9. package/dist/es2019/utils/deprecation-warnings.js +1 -3
  10. package/dist/es2019/utils/editorDeprecationWarnings.js +2 -4
  11. package/dist/es2019/version-wrapper.js +1 -4
  12. package/dist/esm/plugins/index.js +0 -1
  13. package/dist/esm/presets/default.js +1 -1
  14. package/dist/esm/utils/deprecation-warnings.js +1 -3
  15. package/dist/esm/utils/editorDeprecationWarnings.js +2 -4
  16. package/dist/esm/version-wrapper.js +1 -4
  17. package/dist/types/plugins/index.d.ts +0 -1
  18. package/dist/types/plugins/insert-block/types.d.ts +1 -1
  19. package/dist/types/presets/default.d.ts +1 -1
  20. package/dist/types/types/editor-props.d.ts +1 -1
  21. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  22. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  23. package/dist/types/version-wrapper.d.ts +0 -1
  24. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  25. package/dist/types-ts4.5/plugins/insert-block/types.d.ts +1 -1
  26. package/dist/types-ts4.5/presets/default.d.ts +1 -1
  27. package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
  28. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  29. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
  30. package/dist/types-ts4.5/version-wrapper.d.ts +0 -1
  31. package/package.json +4 -3
  32. package/report.api.md +1 -11
  33. package/tmp/api-report-tmp.d.ts +1 -11
  34. package/dist/cjs/plugins/code-block/actions.js +0 -201
  35. package/dist/cjs/plugins/code-block/ide-ux/bracket-handling.js +0 -35
  36. package/dist/cjs/plugins/code-block/ide-ux/commands.js +0 -115
  37. package/dist/cjs/plugins/code-block/ide-ux/line-handling.js +0 -81
  38. package/dist/cjs/plugins/code-block/ide-ux/paired-character-handling.js +0 -23
  39. package/dist/cjs/plugins/code-block/ide-ux/quote-handling.js +0 -40
  40. package/dist/cjs/plugins/code-block/index.js +0 -120
  41. package/dist/cjs/plugins/code-block/language-list.js +0 -62
  42. package/dist/cjs/plugins/code-block/nodeviews/code-block.js +0 -153
  43. package/dist/cjs/plugins/code-block/plugin-key.js +0 -8
  44. package/dist/cjs/plugins/code-block/pm-plugins/actions.js +0 -10
  45. package/dist/cjs/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +0 -113
  46. package/dist/cjs/plugins/code-block/pm-plugins/ide-ux.js +0 -132
  47. package/dist/cjs/plugins/code-block/pm-plugins/input-rule.js +0 -68
  48. package/dist/cjs/plugins/code-block/pm-plugins/keymaps.js +0 -66
  49. package/dist/cjs/plugins/code-block/pm-plugins/main-state.js +0 -10
  50. package/dist/cjs/plugins/code-block/pm-plugins/main.js +0 -114
  51. package/dist/cjs/plugins/code-block/refresh-browser-selection.js +0 -29
  52. package/dist/cjs/plugins/code-block/toolbar.js +0 -131
  53. package/dist/cjs/plugins/code-block/transform-to-code-block.js +0 -84
  54. package/dist/cjs/plugins/code-block/types.js +0 -5
  55. package/dist/cjs/plugins/code-block/ui/class-names.js +0 -15
  56. package/dist/cjs/plugins/code-block/utils.js +0 -28
  57. package/dist/es2019/plugins/code-block/actions.js +0 -211
  58. package/dist/es2019/plugins/code-block/ide-ux/bracket-handling.js +0 -27
  59. package/dist/es2019/plugins/code-block/ide-ux/commands.js +0 -114
  60. package/dist/es2019/plugins/code-block/ide-ux/line-handling.js +0 -75
  61. package/dist/es2019/plugins/code-block/ide-ux/paired-character-handling.js +0 -12
  62. package/dist/es2019/plugins/code-block/ide-ux/quote-handling.js +0 -32
  63. package/dist/es2019/plugins/code-block/index.js +0 -104
  64. package/dist/es2019/plugins/code-block/language-list.js +0 -51
  65. package/dist/es2019/plugins/code-block/nodeviews/code-block.js +0 -126
  66. package/dist/es2019/plugins/code-block/plugin-key.js +0 -2
  67. package/dist/es2019/plugins/code-block/pm-plugins/actions.js +0 -4
  68. package/dist/es2019/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +0 -101
  69. package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +0 -135
  70. package/dist/es2019/plugins/code-block/pm-plugins/input-rule.js +0 -60
  71. package/dist/es2019/plugins/code-block/pm-plugins/keymaps.js +0 -58
  72. package/dist/es2019/plugins/code-block/pm-plugins/main-state.js +0 -2
  73. package/dist/es2019/plugins/code-block/pm-plugins/main.js +0 -102
  74. package/dist/es2019/plugins/code-block/refresh-browser-selection.js +0 -25
  75. package/dist/es2019/plugins/code-block/toolbar.js +0 -108
  76. package/dist/es2019/plugins/code-block/transform-to-code-block.js +0 -79
  77. package/dist/es2019/plugins/code-block/types.js +0 -1
  78. package/dist/es2019/plugins/code-block/ui/class-names.js +0 -9
  79. package/dist/es2019/plugins/code-block/utils.js +0 -4
  80. package/dist/esm/plugins/code-block/actions.js +0 -191
  81. package/dist/esm/plugins/code-block/ide-ux/bracket-handling.js +0 -29
  82. package/dist/esm/plugins/code-block/ide-ux/commands.js +0 -106
  83. package/dist/esm/plugins/code-block/ide-ux/line-handling.js +0 -73
  84. package/dist/esm/plugins/code-block/ide-ux/paired-character-handling.js +0 -16
  85. package/dist/esm/plugins/code-block/ide-ux/quote-handling.js +0 -34
  86. package/dist/esm/plugins/code-block/index.js +0 -113
  87. package/dist/esm/plugins/code-block/language-list.js +0 -52
  88. package/dist/esm/plugins/code-block/nodeviews/code-block.js +0 -146
  89. package/dist/esm/plugins/code-block/plugin-key.js +0 -2
  90. package/dist/esm/plugins/code-block/pm-plugins/actions.js +0 -4
  91. package/dist/esm/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.js +0 -103
  92. package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +0 -126
  93. package/dist/esm/plugins/code-block/pm-plugins/input-rule.js +0 -62
  94. package/dist/esm/plugins/code-block/pm-plugins/keymaps.js +0 -59
  95. package/dist/esm/plugins/code-block/pm-plugins/main-state.js +0 -4
  96. package/dist/esm/plugins/code-block/pm-plugins/main.js +0 -107
  97. package/dist/esm/plugins/code-block/refresh-browser-selection.js +0 -25
  98. package/dist/esm/plugins/code-block/toolbar.js +0 -121
  99. package/dist/esm/plugins/code-block/transform-to-code-block.js +0 -77
  100. package/dist/esm/plugins/code-block/types.js +0 -1
  101. package/dist/esm/plugins/code-block/ui/class-names.js +0 -9
  102. package/dist/esm/plugins/code-block/utils.js +0 -4
  103. package/dist/types/plugins/code-block/actions.d.ts +0 -18
  104. package/dist/types/plugins/code-block/ide-ux/bracket-handling.d.ts +0 -12
  105. package/dist/types/plugins/code-block/ide-ux/commands.d.ts +0 -7
  106. package/dist/types/plugins/code-block/ide-ux/line-handling.d.ts +0 -25
  107. package/dist/types/plugins/code-block/ide-ux/paired-character-handling.d.ts +0 -2
  108. package/dist/types/plugins/code-block/ide-ux/quote-handling.d.ts +0 -12
  109. package/dist/types/plugins/code-block/index.d.ts +0 -19
  110. package/dist/types/plugins/code-block/language-list.d.ts +0 -942
  111. package/dist/types/plugins/code-block/nodeviews/code-block.d.ts +0 -21
  112. package/dist/types/plugins/code-block/plugin-key.d.ts +0 -2
  113. package/dist/types/plugins/code-block/pm-plugins/actions.d.ts +0 -4
  114. package/dist/types/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.d.ts +0 -11
  115. package/dist/types/plugins/code-block/pm-plugins/ide-ux.d.ts +0 -5
  116. package/dist/types/plugins/code-block/pm-plugins/input-rule.d.ts +0 -3
  117. package/dist/types/plugins/code-block/pm-plugins/keymaps.d.ts +0 -4
  118. package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +0 -8
  119. package/dist/types/plugins/code-block/pm-plugins/main.d.ts +0 -10
  120. package/dist/types/plugins/code-block/refresh-browser-selection.d.ts +0 -5
  121. package/dist/types/plugins/code-block/toolbar.d.ts +0 -14
  122. package/dist/types/plugins/code-block/transform-to-code-block.d.ts +0 -3
  123. package/dist/types/plugins/code-block/types.d.ts +0 -6
  124. package/dist/types/plugins/code-block/ui/class-names.d.ts +0 -8
  125. package/dist/types/plugins/code-block/utils.d.ts +0 -4
  126. package/dist/types-ts4.5/plugins/code-block/actions.d.ts +0 -18
  127. package/dist/types-ts4.5/plugins/code-block/ide-ux/bracket-handling.d.ts +0 -12
  128. package/dist/types-ts4.5/plugins/code-block/ide-ux/commands.d.ts +0 -7
  129. package/dist/types-ts4.5/plugins/code-block/ide-ux/line-handling.d.ts +0 -25
  130. package/dist/types-ts4.5/plugins/code-block/ide-ux/paired-character-handling.d.ts +0 -2
  131. package/dist/types-ts4.5/plugins/code-block/ide-ux/quote-handling.d.ts +0 -12
  132. package/dist/types-ts4.5/plugins/code-block/index.d.ts +0 -19
  133. package/dist/types-ts4.5/plugins/code-block/language-list.d.ts +0 -1641
  134. package/dist/types-ts4.5/plugins/code-block/nodeviews/code-block.d.ts +0 -21
  135. package/dist/types-ts4.5/plugins/code-block/plugin-key.d.ts +0 -2
  136. package/dist/types-ts4.5/plugins/code-block/pm-plugins/actions.d.ts +0 -4
  137. package/dist/types-ts4.5/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.d.ts +0 -14
  138. package/dist/types-ts4.5/plugins/code-block/pm-plugins/ide-ux.d.ts +0 -5
  139. package/dist/types-ts4.5/plugins/code-block/pm-plugins/input-rule.d.ts +0 -3
  140. package/dist/types-ts4.5/plugins/code-block/pm-plugins/keymaps.d.ts +0 -4
  141. package/dist/types-ts4.5/plugins/code-block/pm-plugins/main-state.d.ts +0 -8
  142. package/dist/types-ts4.5/plugins/code-block/pm-plugins/main.d.ts +0 -10
  143. package/dist/types-ts4.5/plugins/code-block/refresh-browser-selection.d.ts +0 -5
  144. package/dist/types-ts4.5/plugins/code-block/toolbar.d.ts +0 -14
  145. package/dist/types-ts4.5/plugins/code-block/transform-to-code-block.d.ts +0 -3
  146. package/dist/types-ts4.5/plugins/code-block/types.d.ts +0 -6
  147. package/dist/types-ts4.5/plugins/code-block/ui/class-names.d.ts +0 -8
  148. package/dist/types-ts4.5/plugins/code-block/utils.d.ts +0 -4
@@ -9,6 +9,6 @@ type ContentStylesProps = {
9
9
  };
10
10
  export declare const placeholderStyles: SerializedStyles;
11
11
  type Props = ContentStylesProps & React.HTMLProps<HTMLDivElement>;
12
- export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "default" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "dir" | "color" | "content" | "height" | "translate" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "onKeyDown" | "placeholder" | "value" | "autoFocus" | "name" | "key" | "action" | "disabled" | "children" | "property" | "media" | "mediaGroup" | "size" | "hidden" | "href" | "list" | "id" | "start" | "accessKey" | "as" | "css" | "step" | "wrap" | "preload" | "className" | "alt" | "crossOrigin" | "sizes" | "src" | "srcSet" | "useMap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "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" | "multiple" | "selected" | "required" | "download" | "hrefLang" | "rel" | "target" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "readOnly" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "srcDoc" | "srcLang" | "wmode" | keyof ContentStylesProps> & React.RefAttributes<HTMLDivElement>>;
13
- declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "default" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "dir" | "color" | "content" | "height" | "translate" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "onKeyDown" | "placeholder" | "value" | "autoFocus" | "name" | "key" | "action" | "disabled" | "children" | "property" | "media" | "mediaGroup" | "size" | "hidden" | "href" | "list" | "id" | "start" | "accessKey" | "as" | "css" | "step" | "wrap" | "preload" | "className" | "alt" | "crossOrigin" | "sizes" | "src" | "srcSet" | "useMap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "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" | "multiple" | "selected" | "required" | "download" | "hrefLang" | "rel" | "target" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "readOnly" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "srcDoc" | "srcLang" | "wmode" | keyof ContentStylesProps> & React.RefAttributes<HTMLDivElement>>;
12
+ export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "default" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "dir" | "color" | "content" | "height" | "translate" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "onKeyDown" | "placeholder" | "value" | "autoFocus" | "name" | "key" | "action" | "disabled" | "children" | "property" | "media" | "mediaGroup" | "size" | "hidden" | "href" | "list" | "id" | "step" | "wrap" | "className" | "alt" | "crossOrigin" | "sizes" | "src" | "srcSet" | "useMap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "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" | "css" | "start" | "multiple" | "preload" | "selected" | "required" | "download" | "hrefLang" | "rel" | "target" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "readOnly" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "srcDoc" | "srcLang" | "wmode" | keyof ContentStylesProps> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "default" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "dir" | "color" | "content" | "height" | "translate" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "onKeyDown" | "placeholder" | "value" | "autoFocus" | "name" | "key" | "action" | "disabled" | "children" | "property" | "media" | "mediaGroup" | "size" | "hidden" | "href" | "list" | "id" | "step" | "wrap" | "className" | "alt" | "crossOrigin" | "sizes" | "src" | "srcSet" | "useMap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "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" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "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" | "css" | "start" | "multiple" | "preload" | "selected" | "required" | "download" | "hrefLang" | "rel" | "target" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "readOnly" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "srcDoc" | "srcLang" | "wmode" | keyof ContentStylesProps> & React.RefAttributes<HTMLDivElement>>;
14
14
  export default _default;
@@ -1,3 +1,2 @@
1
1
  export declare const name: string;
2
2
  export declare const version: string;
3
- export declare const nextMajorVersion: () => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "189.3.3",
3
+ "version": "189.3.6",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -64,6 +64,7 @@
64
64
  "@atlaskit/editor-plugin-caption": "^0.2.0",
65
65
  "@atlaskit/editor-plugin-card": "^0.10.0",
66
66
  "@atlaskit/editor-plugin-clipboard": "^0.1.0",
67
+ "@atlaskit/editor-plugin-code-block": "^0.1.0",
67
68
  "@atlaskit/editor-plugin-composition": "^0.1.0",
68
69
  "@atlaskit/editor-plugin-content-insertion": "^0.1.4",
69
70
  "@atlaskit/editor-plugin-context-panel": "^0.2.0",
@@ -89,7 +90,7 @@
89
90
  "@atlaskit/editor-plugin-mentions": "^0.1.0",
90
91
  "@atlaskit/editor-plugin-panel": "^0.1.0",
91
92
  "@atlaskit/editor-plugin-paste": "^0.1.0",
92
- "@atlaskit/editor-plugin-paste-options-toolbar": "^0.2.0",
93
+ "@atlaskit/editor-plugin-paste-options-toolbar": "^0.3.0",
93
94
  "@atlaskit/editor-plugin-placeholder": "^0.1.0",
94
95
  "@atlaskit/editor-plugin-placeholder-text": "^0.1.0",
95
96
  "@atlaskit/editor-plugin-quick-insert": "^0.2.0",
@@ -116,7 +117,7 @@
116
117
  "@atlaskit/logo": "^13.14.0",
117
118
  "@atlaskit/media-card": "^77.2.0",
118
119
  "@atlaskit/media-client": "^25.0.0",
119
- "@atlaskit/media-common": "^9.0.0",
120
+ "@atlaskit/media-common": "^10.0.0",
120
121
  "@atlaskit/mention": "^22.1.0",
121
122
  "@atlaskit/platform-feature-flags": "^0.2.0",
122
123
  "@atlaskit/prosemirror-collab": "^0.2.0",
package/report.api.md CHANGED
@@ -27,6 +27,7 @@ import type { AnnotationTypes } from '@atlaskit/adf-schema';
27
27
  import type { BlockTypePluginOptions } from '@atlaskit/editor-plugin-block-type';
28
28
  import type { CardOptions } from '@atlaskit/editor-common/card';
29
29
  import { CardProvider } from '@atlaskit/editor-common/provider-factory';
30
+ import type { CodeBlockOptions } from '@atlaskit/editor-plugin-code-block';
30
31
  import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
31
32
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
32
33
  import type { ContextUpdateHandler } from '@atlaskit/editor-common/types';
@@ -51,7 +52,6 @@ import { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
51
52
  import { jsx } from '@emotion/react';
52
53
  import type { LayoutPluginOptions } from '@atlaskit/editor-plugin-layout';
53
54
  import type { LinkingOptions } from '@atlaskit/editor-common/types';
54
- import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
55
55
  import { MacroAttributes } from '@atlaskit/editor-common/provider-factory';
56
56
  import { MacroProvider } from '@atlaskit/editor-common/provider-factory';
57
57
  import { MediaOptions } from '@atlaskit/editor-plugin-media/types';
@@ -166,16 +166,6 @@ type BeforeAndAfterToolbarComponents = {
166
166
 
167
167
  export { CardProvider };
168
168
 
169
- // @public (undocumented)
170
- interface CodeBlockOptions extends LongPressSelectionPluginOptions {
171
- // (undocumented)
172
- allowCompositionInputOverride?: boolean;
173
- // (undocumented)
174
- allowCopyToClipboard?: boolean;
175
- // (undocumented)
176
- appearance?: EditorAppearance | undefined;
177
- }
178
-
179
169
  // @public (undocumented)
180
170
  export class CollapsedEditor extends React_2.Component<Props, State> {
181
171
  // (undocumented)
@@ -16,6 +16,7 @@ import type { AnnotationTypes } from '@atlaskit/adf-schema';
16
16
  import type { BlockTypePluginOptions } from '@atlaskit/editor-plugin-block-type';
17
17
  import type { CardOptions } from '@atlaskit/editor-common/card';
18
18
  import { CardProvider } from '@atlaskit/editor-common/provider-factory';
19
+ import type { CodeBlockOptions } from '@atlaskit/editor-plugin-code-block';
19
20
  import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
20
21
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
21
22
  import type { ContextUpdateHandler } from '@atlaskit/editor-common/types';
@@ -40,7 +41,6 @@ import { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
40
41
  import { jsx } from '@emotion/react';
41
42
  import type { LayoutPluginOptions } from '@atlaskit/editor-plugin-layout';
42
43
  import type { LinkingOptions } from '@atlaskit/editor-common/types';
43
- import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
44
44
  import { MacroAttributes } from '@atlaskit/editor-common/provider-factory';
45
45
  import { MacroProvider } from '@atlaskit/editor-common/provider-factory';
46
46
  import { MediaOptions } from '@atlaskit/editor-plugin-media/types';
@@ -153,16 +153,6 @@ type BeforeAndAfterToolbarComponents = {
153
153
 
154
154
  export { CardProvider }
155
155
 
156
- // @public (undocumented)
157
- interface CodeBlockOptions extends LongPressSelectionPluginOptions {
158
- // (undocumented)
159
- allowCompositionInputOverride?: boolean;
160
- // (undocumented)
161
- allowCopyToClipboard?: boolean;
162
- // (undocumented)
163
- appearance?: EditorAppearance | undefined;
164
- }
165
-
166
156
  // @public (undocumented)
167
157
  export class CollapsedEditor extends React_2.Component<Props, State> {
168
158
  // (undocumented)
@@ -1,201 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.copyContentToClipboard = exports.changeLanguage = void 0;
7
- exports.createInsertCodeBlockTransaction = createInsertCodeBlockTransaction;
8
- exports.ignoreFollowingMutations = void 0;
9
- exports.insertCodeBlockWithAnalytics = insertCodeBlockWithAnalytics;
10
- exports.resetShouldIgnoreFollowingMutations = exports.resetCopiedState = exports.removeCodeBlock = void 0;
11
- var _utils = require("@atlaskit/editor-prosemirror/utils");
12
- var _state = require("@atlaskit/editor-prosemirror/state");
13
- var _pluginKey = require("./plugin-key");
14
- var _codeBlockCopySelectionPlugin = require("./pm-plugins/codeBlockCopySelectionPlugin");
15
- var _actions = require("./pm-plugins/actions");
16
- var _clipboard = require("@atlaskit/editor-common/clipboard");
17
- var _insert = require("@atlaskit/editor-common/insert");
18
- var _transformToCodeBlock = require("./transform-to-code-block");
19
- var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
20
- var _analytics = require("@atlaskit/editor-common/analytics");
21
- var removeCodeBlock = exports.removeCodeBlock = function removeCodeBlock(state, dispatch) {
22
- var nodes = state.schema.nodes,
23
- tr = state.tr;
24
- if (dispatch) {
25
- var removeTr = tr;
26
- if ((0, _utils.findSelectedNodeOfType)(nodes.codeBlock)(tr.selection)) {
27
- removeTr = (0, _utils.removeSelectedNode)(tr);
28
- } else {
29
- removeTr = (0, _utils.removeParentNodeOfType)(nodes.codeBlock)(tr);
30
- }
31
- dispatch(removeTr);
32
- }
33
- return true;
34
- };
35
- var changeLanguage = exports.changeLanguage = function changeLanguage(editorAnalyticsAPI) {
36
- return function (language) {
37
- return function (state, dispatch) {
38
- var _pluginKey$getState;
39
- var codeBlock = state.schema.nodes.codeBlock;
40
- var pos = (_pluginKey$getState = _pluginKey.pluginKey.getState(state)) === null || _pluginKey$getState === void 0 ? void 0 : _pluginKey$getState.pos;
41
- if (typeof pos !== 'number') {
42
- return false;
43
- }
44
- var tr = state.tr.setNodeMarkup(pos, codeBlock, {
45
- language: language
46
- }).setMeta('scrollIntoView', false);
47
- var selection = (0, _utils.isNodeSelection)(state.selection) ? _state.NodeSelection.create(tr.doc, pos) : tr.selection;
48
- var result = tr.setSelection(selection);
49
- if (dispatch) {
50
- editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent({
51
- action: _analytics.ACTION.LANGUAGE_SELECTED,
52
- actionSubject: _analytics.ACTION_SUBJECT.CODE_BLOCK,
53
- attributes: {
54
- language: language
55
- },
56
- eventType: _analytics.EVENT_TYPE.TRACK
57
- })(result);
58
- dispatch(result);
59
- }
60
- return true;
61
- };
62
- };
63
- };
64
- var copyContentToClipboard = exports.copyContentToClipboard = function copyContentToClipboard(state, dispatch) {
65
- var nodes = state.schema.nodes,
66
- tr = state.tr;
67
- var codeBlock = (0, _utils.findParentNodeOfType)(nodes.codeBlock)(tr.selection);
68
- var textContent = codeBlock && codeBlock.node.textContent;
69
- if (textContent) {
70
- (0, _clipboard.copyToClipboard)(textContent);
71
- var copyToClipboardTr = tr;
72
- copyToClipboardTr.setMeta(_pluginKey.pluginKey, {
73
- type: _actions.ACTIONS.SET_COPIED_TO_CLIPBOARD,
74
- data: true
75
- });
76
- copyToClipboardTr.setMeta(_codeBlockCopySelectionPlugin.copySelectionPluginKey, 'remove-selection');
77
- if (dispatch) {
78
- dispatch(copyToClipboardTr);
79
- }
80
- }
81
- return true;
82
- };
83
- var resetCopiedState = exports.resetCopiedState = function resetCopiedState(state, dispatch) {
84
- var tr = state.tr;
85
- var codeBlockState = _pluginKey.pluginKey.getState(state);
86
- var resetCopiedStateTr = tr;
87
- if (codeBlockState && codeBlockState.contentCopied) {
88
- resetCopiedStateTr.setMeta(_pluginKey.pluginKey, {
89
- type: _actions.ACTIONS.SET_COPIED_TO_CLIPBOARD,
90
- data: false
91
- });
92
- resetCopiedStateTr.setMeta(_codeBlockCopySelectionPlugin.copySelectionPluginKey, 'remove-selection');
93
- if (dispatch) {
94
- dispatch(resetCopiedStateTr);
95
- }
96
- } else {
97
- var clearSelectionStateTransaction = state.tr;
98
- clearSelectionStateTransaction.setMeta(_codeBlockCopySelectionPlugin.copySelectionPluginKey, 'remove-selection');
99
- // note: dispatch should always be defined when called from the
100
- // floating toolbar. Howver the Command type which floating toolbar uses
101
- // (and resetCopiedState) uses suggests it's optional.
102
- if (dispatch) {
103
- dispatch(clearSelectionStateTransaction);
104
- }
105
- }
106
- return true;
107
- };
108
- var ignoreFollowingMutations = exports.ignoreFollowingMutations = function ignoreFollowingMutations(state, dispatch) {
109
- var tr = state.tr;
110
- var ignoreFollowingMutationsTr = tr;
111
- ignoreFollowingMutationsTr.setMeta(_pluginKey.pluginKey, {
112
- type: _actions.ACTIONS.SET_SHOULD_IGNORE_FOLLOWING_MUTATIONS,
113
- data: true
114
- });
115
- if (dispatch) {
116
- dispatch(ignoreFollowingMutationsTr);
117
- }
118
- return true;
119
- };
120
- var resetShouldIgnoreFollowingMutations = exports.resetShouldIgnoreFollowingMutations = function resetShouldIgnoreFollowingMutations(state, dispatch) {
121
- var tr = state.tr;
122
- var ignoreFollowingMutationsTr = tr;
123
- ignoreFollowingMutationsTr.setMeta(_pluginKey.pluginKey, {
124
- type: _actions.ACTIONS.SET_SHOULD_IGNORE_FOLLOWING_MUTATIONS,
125
- data: false
126
- });
127
- if (dispatch) {
128
- dispatch(ignoreFollowingMutationsTr);
129
- }
130
- return true;
131
- };
132
-
133
- /**
134
- * This function creates a new transaction that inserts a code block,
135
- * if there is text selected it will wrap the current selection if not it will
136
- * append the codeblock to the end of the document.
137
- */
138
- function createInsertCodeBlockTransaction(_ref) {
139
- var _state$selection$$fro;
140
- var state = _ref.state;
141
- var tr = state.tr;
142
- var from = state.selection.from;
143
- var codeBlock = state.schema.nodes.codeBlock;
144
- var grandParentNodeType = (_state$selection$$fro = state.selection.$from.node(-1)) === null || _state$selection$$fro === void 0 ? void 0 : _state$selection$$fro.type;
145
- var parentNodeType = state.selection.$from.parent.type;
146
-
147
- /** We always want to append a codeBlock unless we're inserting into a paragraph
148
- * AND it's a valid child of the grandparent node.
149
- * Insert the current selection as codeBlock content unless it contains nodes other
150
- * than paragraphs and inline.
151
- */
152
- var canInsertCodeBlock = (0, _insert.shouldSplitSelectedNodeOnNodeInsertion)({
153
- parentNodeType: parentNodeType,
154
- grandParentNodeType: grandParentNodeType,
155
- content: codeBlock.createAndFill()
156
- }) && contentAllowedInCodeBlock(state);
157
- if (canInsertCodeBlock) {
158
- tr = (0, _transformToCodeBlock.transformToCodeBlockAction)(state, from);
159
- } else {
160
- (0, _utils.safeInsert)(codeBlock.createAndFill())(tr).scrollIntoView();
161
- }
162
- return tr;
163
- }
164
-
165
- /**
166
- * Check if the current selection contains any nodes that are not permitted
167
- * as codeBlock child nodes. Note that this allows paragraphs and inline nodes
168
- * as we extract their text content.
169
- */
170
- function contentAllowedInCodeBlock(state) {
171
- var _state$selection = state.selection,
172
- $from = _state$selection.$from,
173
- $to = _state$selection.$to;
174
- var isAllowedChild = true;
175
- state.doc.nodesBetween($from.pos, $to.pos, function (node) {
176
- if (!isAllowedChild) {
177
- return false;
178
- }
179
- return isAllowedChild = node.type === state.schema.nodes.listItem || node.type === state.schema.nodes.bulletList || node.type === state.schema.nodes.orderedList || node.type === state.schema.nodes.paragraph || node.isInline || node.isText;
180
- });
181
- return isAllowedChild;
182
- }
183
- function insertCodeBlockWithAnalytics(inputMethod, analyticsAPI) {
184
- return (0, _editorAnalytics.withAnalytics)(analyticsAPI, {
185
- action: _analytics.ACTION.INSERTED,
186
- actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
187
- actionSubjectId: _analytics.ACTION_SUBJECT_ID.CODE_BLOCK,
188
- attributes: {
189
- inputMethod: inputMethod
190
- },
191
- eventType: _analytics.EVENT_TYPE.TRACK
192
- })(function (state, dispatch) {
193
- var tr = createInsertCodeBlockTransaction({
194
- state: state
195
- });
196
- if (dispatch) {
197
- dispatch(tr);
198
- }
199
- return true;
200
- });
201
- }
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.shouldAutoCloseBracket = exports.getAutoClosingBracketInfo = exports.BRACKET_MAP = void 0;
7
- var BRACKET_MAP = exports.BRACKET_MAP = {
8
- '{': '}',
9
- '[': ']',
10
- '(': ')'
11
- };
12
- var shouldAutoCloseBracket = exports.shouldAutoCloseBracket = function shouldAutoCloseBracket(before, after) {
13
- // when directly before a closing bracket
14
- if (/^[}\])]/.test(after)) {
15
- return true;
16
- }
17
-
18
- // exclusion: when directly before a non-whitespace character
19
- if (/^[^\s]/.test(after)) {
20
- return false;
21
- }
22
- return true;
23
- };
24
- var getAutoClosingBracketInfo = exports.getAutoClosingBracketInfo = function getAutoClosingBracketInfo(before, after) {
25
- var left = Object.keys(BRACKET_MAP).find(function (item) {
26
- return before.endsWith(item);
27
- });
28
- var right = left ? BRACKET_MAP[left] : undefined;
29
- var hasTrailingMatchingBracket = right ? after.startsWith(right) : false;
30
- return {
31
- left: left,
32
- right: right,
33
- hasTrailingMatchingBracket: hasTrailingMatchingBracket
34
- };
35
- };
@@ -1,115 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.indent = void 0;
7
- exports.insertIndent = insertIndent;
8
- exports.insertNewlineWithIndent = insertNewlineWithIndent;
9
- exports.outdent = void 0;
10
- var _state = require("@atlaskit/editor-prosemirror/state");
11
- var _lineHandling = require("./line-handling");
12
- var _analytics = require("@atlaskit/editor-common/analytics");
13
- /**
14
- * Return the current indentation level
15
- * @param indentText - Text in the code block that represent an indentation
16
- * @param indentSize - Size of the indentation token in a string
17
- */
18
- function getIndentLevel(indentText, indentSize) {
19
- if (indentSize === 0 || indentText.length === 0) {
20
- return 0;
21
- }
22
- return indentText.length / indentSize;
23
- }
24
- var indent = exports.indent = function indent(editorAnalyticsAPI) {
25
- return function (state, dispatch) {
26
- var _getLinesFromSelectio = (0, _lineHandling.getLinesFromSelection)(state),
27
- text = _getLinesFromSelectio.text,
28
- start = _getLinesFromSelectio.start;
29
- var tr = state.tr,
30
- selection = state.selection;
31
- (0, _lineHandling.forEachLine)(text, function (line, offset) {
32
- var _getLineInfo = (0, _lineHandling.getLineInfo)(line),
33
- indentText = _getLineInfo.indentText,
34
- indentToken = _getLineInfo.indentToken;
35
- var indentLevel = getIndentLevel(indentText, indentToken.size);
36
- var indentToAdd = indentToken.token.repeat(indentToken.size - indentText.length % indentToken.size || indentToken.size);
37
- tr.insertText(indentToAdd, tr.mapping.map(start + offset, -1));
38
- editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent({
39
- action: _analytics.ACTION.FORMATTED,
40
- actionSubject: _analytics.ACTION_SUBJECT.TEXT,
41
- actionSubjectId: _analytics.ACTION_SUBJECT_ID.FORMAT_INDENT,
42
- eventType: _analytics.EVENT_TYPE.TRACK,
43
- attributes: {
44
- inputMethod: _analytics.INPUT_METHOD.KEYBOARD,
45
- previousIndentationLevel: indentLevel,
46
- newIndentLevel: indentLevel + 1,
47
- direction: _analytics.INDENT_DIRECTION.INDENT,
48
- indentType: _analytics.INDENT_TYPE.CODE_BLOCK
49
- }
50
- })(tr);
51
- if (!selection.empty) {
52
- tr.setSelection(_state.TextSelection.create(tr.doc, tr.mapping.map(selection.from, -1), tr.selection.to));
53
- }
54
- });
55
- if (dispatch) {
56
- dispatch(tr);
57
- }
58
- return true;
59
- };
60
- };
61
- var outdent = exports.outdent = function outdent(editorAnalyticsAPI) {
62
- return function (state, dispatch) {
63
- var _getLinesFromSelectio2 = (0, _lineHandling.getLinesFromSelection)(state),
64
- text = _getLinesFromSelectio2.text,
65
- start = _getLinesFromSelectio2.start;
66
- var tr = state.tr;
67
- (0, _lineHandling.forEachLine)(text, function (line, offset) {
68
- var _getLineInfo2 = (0, _lineHandling.getLineInfo)(line),
69
- indentText = _getLineInfo2.indentText,
70
- indentToken = _getLineInfo2.indentToken;
71
- if (indentText) {
72
- var indentLevel = getIndentLevel(indentText, indentToken.size);
73
- var unindentLength = indentText.length % indentToken.size || indentToken.size;
74
- tr.delete(tr.mapping.map(start + offset), tr.mapping.map(start + offset + unindentLength));
75
- editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent({
76
- action: _analytics.ACTION.FORMATTED,
77
- actionSubject: _analytics.ACTION_SUBJECT.TEXT,
78
- actionSubjectId: _analytics.ACTION_SUBJECT_ID.FORMAT_INDENT,
79
- eventType: _analytics.EVENT_TYPE.TRACK,
80
- attributes: {
81
- inputMethod: _analytics.INPUT_METHOD.KEYBOARD,
82
- previousIndentationLevel: indentLevel,
83
- newIndentLevel: indentLevel - 1,
84
- direction: _analytics.INDENT_DIRECTION.OUTDENT,
85
- indentType: _analytics.INDENT_TYPE.CODE_BLOCK
86
- }
87
- })(tr);
88
- }
89
- });
90
- if (dispatch) {
91
- dispatch(tr);
92
- }
93
- return true;
94
- };
95
- };
96
- function insertIndent(state, dispatch) {
97
- var _getStartOfCurrentLin = (0, _lineHandling.getStartOfCurrentLine)(state),
98
- textAtStartOfLine = _getStartOfCurrentLin.text;
99
- var _getLineInfo3 = (0, _lineHandling.getLineInfo)(textAtStartOfLine),
100
- indentToken = _getLineInfo3.indentToken;
101
- var indentToAdd = indentToken.token.repeat(indentToken.size - textAtStartOfLine.length % indentToken.size || indentToken.size);
102
- dispatch(state.tr.insertText(indentToAdd));
103
- return true;
104
- }
105
- function insertNewlineWithIndent(state, dispatch) {
106
- var _getStartOfCurrentLin2 = (0, _lineHandling.getStartOfCurrentLine)(state),
107
- textAtStartOfLine = _getStartOfCurrentLin2.text;
108
- var _getLineInfo4 = (0, _lineHandling.getLineInfo)(textAtStartOfLine),
109
- indentText = _getLineInfo4.indentText;
110
- if (indentText && dispatch) {
111
- dispatch(state.tr.insertText('\n' + indentText));
112
- return true;
113
- }
114
- return false;
115
- }
@@ -1,81 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getLineInfo = exports.getEndOfCurrentLine = exports.forEachLine = void 0;
7
- exports.getLinesFromSelection = getLinesFromSelection;
8
- exports.isSelectionEntirelyInsideCodeBlock = exports.isCursorInsideCodeBlock = exports.getStartOfCurrentLine = void 0;
9
- var _utils = require("../utils");
10
- var isSelectionEntirelyInsideCodeBlock = exports.isSelectionEntirelyInsideCodeBlock = function isSelectionEntirelyInsideCodeBlock(state) {
11
- return state.selection.$from.sameParent(state.selection.$to) && state.selection.$from.parent.type === state.schema.nodes.codeBlock;
12
- };
13
- var isCursorInsideCodeBlock = exports.isCursorInsideCodeBlock = function isCursorInsideCodeBlock(state) {
14
- return !!(0, _utils.getCursor)(state.selection) && isSelectionEntirelyInsideCodeBlock(state);
15
- };
16
- var getStartOfCurrentLine = exports.getStartOfCurrentLine = function getStartOfCurrentLine(state) {
17
- var $from = state.selection.$from;
18
- if ($from.nodeBefore && $from.nodeBefore.isText) {
19
- var prevNewLineIndex = $from.nodeBefore.text.lastIndexOf('\n');
20
- return {
21
- text: $from.nodeBefore.text.substring(prevNewLineIndex + 1),
22
- pos: $from.start() + prevNewLineIndex + 1
23
- };
24
- }
25
- return {
26
- text: '',
27
- pos: $from.pos
28
- };
29
- };
30
- var getEndOfCurrentLine = exports.getEndOfCurrentLine = function getEndOfCurrentLine(state) {
31
- var $to = state.selection.$to;
32
- if ($to.nodeAfter && $to.nodeAfter.isText) {
33
- var nextNewLineIndex = $to.nodeAfter.text.indexOf('\n');
34
- return {
35
- text: $to.nodeAfter.text.substring(0, nextNewLineIndex >= 0 ? nextNewLineIndex : undefined),
36
- pos: nextNewLineIndex >= 0 ? $to.pos + nextNewLineIndex : $to.end()
37
- };
38
- }
39
- return {
40
- text: '',
41
- pos: $to.pos
42
- };
43
- };
44
- function getLinesFromSelection(state) {
45
- var _getStartOfCurrentLin = getStartOfCurrentLine(state),
46
- start = _getStartOfCurrentLin.pos;
47
- var _getEndOfCurrentLine = getEndOfCurrentLine(state),
48
- end = _getEndOfCurrentLine.pos;
49
- var text = state.doc.textBetween(start, end);
50
- return {
51
- text: text,
52
- start: start,
53
- end: end
54
- };
55
- }
56
- var forEachLine = exports.forEachLine = function forEachLine(text, callback) {
57
- var offset = 0;
58
- text.split('\n').forEach(function (line) {
59
- callback(line, offset);
60
- offset += line.length + 1;
61
- });
62
- };
63
- var SPACE = {
64
- token: ' ',
65
- size: 2,
66
- regex: /[^ ]/
67
- };
68
- var TAB = {
69
- token: '\t',
70
- size: 1,
71
- regex: /[^\t]/
72
- };
73
- var getLineInfo = exports.getLineInfo = function getLineInfo(line) {
74
- var indentToken = line.startsWith('\t') ? TAB : SPACE;
75
- var indentLength = line.search(indentToken.regex);
76
- var indentText = line.substring(0, indentLength >= 0 ? indentLength : line.length);
77
- return {
78
- indentToken: indentToken,
79
- indentText: indentText
80
- };
81
- };
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.isCursorBeforeClosingCharacter = exports.isClosingCharacter = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _bracketHandling = require("./bracket-handling");
10
- var _quoteHandling = require("./quote-handling");
11
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
- var PAIRED_CHARACTER_MAP = _objectSpread(_objectSpread({}, _bracketHandling.BRACKET_MAP), _quoteHandling.QUOTE_MAP);
14
- var isCursorBeforeClosingCharacter = exports.isCursorBeforeClosingCharacter = function isCursorBeforeClosingCharacter(after) {
15
- return Object.keys(PAIRED_CHARACTER_MAP).some(function (leftCharacter) {
16
- return after.startsWith(PAIRED_CHARACTER_MAP[leftCharacter]);
17
- });
18
- };
19
- var isClosingCharacter = exports.isClosingCharacter = function isClosingCharacter(text) {
20
- return Object.keys(PAIRED_CHARACTER_MAP).some(function (leftCharacter) {
21
- return text === PAIRED_CHARACTER_MAP[leftCharacter];
22
- });
23
- };