@atlaskit/editor-core 207.3.0 → 207.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/presets/default.js +8 -0
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +3 -3
- package/dist/cjs/ui/EditorContentContainer/styles/mediaStyles.js +230 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/presets/default.js +8 -0
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +4 -5
- package/dist/es2019/ui/EditorContentContainer/styles/mediaStyles.js +357 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/presets/default.js +8 -0
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +4 -4
- package/dist/esm/ui/EditorContentContainer/styles/mediaStyles.js +224 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/presets/default.d.ts +14 -4
- package/dist/types/types/editor-props.d.ts +11 -10
- package/dist/types/ui/EditorContentContainer/styles/mediaStyles.d.ts +1 -0
- package/dist/types-ts4.5/presets/default.d.ts +14 -4
- package/dist/types-ts4.5/types/editor-props.d.ts +11 -10
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/mediaStyles.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
var _ProseMirror, _css;
|
|
3
|
+
import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
4
|
+
|
|
5
|
+
import { INLINE_IMAGE_WRAPPER_CLASS_NAME } from '@atlaskit/editor-common/media-inline';
|
|
6
|
+
import { MediaSharedClassNames, richMediaClassName } from '@atlaskit/editor-common/styles';
|
|
7
|
+
import { akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPaddingWide, akEditorSelectedBorderBoldSize, akEditorSelectedBoxShadow, akEditorSelectedNodeClassName, akEditorWrappedNodeZIndex } from '@atlaskit/editor-shared-styles';
|
|
8
|
+
import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
|
|
9
|
+
var wrappedMediaBreakoutPoint = 410;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Reference Heights
|
|
13
|
+
*
|
|
14
|
+
* These heights enforce consistent sizes with media inline nodes due to
|
|
15
|
+
* inconsistencies with center aligned inline nodes and text.
|
|
16
|
+
*
|
|
17
|
+
* There is conversation about refactoring media inline nodes to conform to
|
|
18
|
+
* aligning correctly with the surrounding text.
|
|
19
|
+
*
|
|
20
|
+
* These constants originally came from `headingSizes` from the `theme` package
|
|
21
|
+
* and have been copied here to remove this package.
|
|
22
|
+
*/
|
|
23
|
+
var referenceHeights = {
|
|
24
|
+
p: 24 - 2,
|
|
25
|
+
h1: 32 + 4,
|
|
26
|
+
h2: 28 + 3,
|
|
27
|
+
h3: 24 + 1,
|
|
28
|
+
h4: 20 + 3,
|
|
29
|
+
h5: 16 + 4,
|
|
30
|
+
h6: 16 + 2
|
|
31
|
+
};
|
|
32
|
+
var inlineImageSelector = "> .mediaInlineView-content-wrap > .".concat(INLINE_IMAGE_WRAPPER_CLASS_NAME, ", > :is(a, span[data-mark-type='border']) .mediaInlineView-content-wrap > .").concat(INLINE_IMAGE_WRAPPER_CLASS_NAME, ", > .").concat(INLINE_IMAGE_WRAPPER_CLASS_NAME, ", > :is(a, span[data-mark-type='border']) .").concat(INLINE_IMAGE_WRAPPER_CLASS_NAME);
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles,@atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
35
|
+
export var mediaStyles = css((_css = {
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
37
|
+
'.ProseMirror': (_ProseMirror = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ProseMirror, "li .".concat(richMediaClassName), {
|
|
38
|
+
margin: 0
|
|
39
|
+
}), '&.ua-chrome li > .mediaSingleView-content-wrap::before', {
|
|
40
|
+
content: "''",
|
|
41
|
+
display: 'block',
|
|
42
|
+
height: 0
|
|
43
|
+
}), '&.ua-firefox', {
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
45
|
+
'.mediaSingleView-content-wrap': {
|
|
46
|
+
userSelect: 'none'
|
|
47
|
+
},
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
49
|
+
'.captionView-content-wrap': {
|
|
50
|
+
userSelect: 'text'
|
|
51
|
+
}
|
|
52
|
+
}), ".mediaSingleView-content-wrap[layout^='wrap-']", {
|
|
53
|
+
position: 'relative',
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-imported-style-values
|
|
55
|
+
zIndex: akEditorWrappedNodeZIndex,
|
|
56
|
+
maxWidth: '100%',
|
|
57
|
+
/* overwrite default Prosemirror setting making it clear: both */
|
|
58
|
+
clear: 'inherit'
|
|
59
|
+
}), ".mediaSingleView-content-wrap[layout='center']", {
|
|
60
|
+
clear: 'both'
|
|
61
|
+
}), "table .".concat(richMediaClassName), {
|
|
62
|
+
marginTop: "var(--ds-space-150, 12px)",
|
|
63
|
+
marginBottom: "var(--ds-space-150, 12px)",
|
|
64
|
+
clear: 'both',
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
66
|
+
'&.image-wrap-left[data-layout], &.image-wrap-right[data-layout]': {
|
|
67
|
+
clear: 'none',
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
69
|
+
'&:first-child': {
|
|
70
|
+
marginTop: "var(--ds-space-150, 12px)"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}), ".".concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-left"), {
|
|
74
|
+
clear: 'both'
|
|
75
|
+
}), ".".concat(richMediaClassName, ".image-wrap-left + .").concat(richMediaClassName, ".image-wrap-right, .").concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-left, .").concat(richMediaClassName, ".image-wrap-left + .").concat(richMediaClassName, ".image-wrap-left, .").concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-right"), {
|
|
76
|
+
marginRight: 0,
|
|
77
|
+
marginLeft: 0
|
|
78
|
+
}), "@media all and (max-width: ".concat(wrappedMediaBreakoutPoint, "px)"), {
|
|
79
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
80
|
+
"div.mediaSingleView-content-wrap[layout='wrap-left'], div.mediaSingleView-content-wrap[data-layout='wrap-left'], div.mediaSingleView-content-wrap[layout='wrap-right'], div.mediaSingleView-content-wrap[data-layout='wrap-right']": {
|
|
81
|
+
float: 'none',
|
|
82
|
+
overflow: 'auto',
|
|
83
|
+
margin: "var(--ds-space-150, 12px)".concat(" 0")
|
|
84
|
+
}
|
|
85
|
+
}), "& [layout='full-width'] .".concat(richMediaClassName, ", & [layout='wide'] .").concat(richMediaClassName), {
|
|
86
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
87
|
+
marginLeft: '50%',
|
|
88
|
+
transform: 'translateX(-50%)'
|
|
89
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ProseMirror, ".media-extended-resize-experience[layout^='wrap-']", {
|
|
90
|
+
// override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle
|
|
91
|
+
// to prevent scroll bar
|
|
92
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
93
|
+
overflow: 'visible !important'
|
|
94
|
+
}), "& [layout^='wrap-'] + [layout^='wrap-']", _defineProperty({
|
|
95
|
+
clear: 'none',
|
|
96
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
97
|
+
"& + p, & + div[class^='fabric-editor-align'], & + ul, & + ol, & + h1, & + h2, & + h3, & + h4, & + h5, & + h6": {
|
|
98
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
99
|
+
clear: 'both !important'
|
|
100
|
+
}
|
|
101
|
+
}, "& .".concat(richMediaClassName), {
|
|
102
|
+
marginLeft: 0,
|
|
103
|
+
marginRight: 0
|
|
104
|
+
})), ".".concat(INLINE_IMAGE_WRAPPER_CLASS_NAME), {
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
106
|
+
height: referenceHeights['p'],
|
|
107
|
+
transform: 'translateY(-2px)'
|
|
108
|
+
}), "h1", _defineProperty({}, inlineImageSelector, {
|
|
109
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
110
|
+
height: referenceHeights.h1,
|
|
111
|
+
transform: "translateY(-3px)"
|
|
112
|
+
})), "h2", _defineProperty({}, inlineImageSelector, {
|
|
113
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
114
|
+
height: referenceHeights.h2,
|
|
115
|
+
transform: "translateY(-3px)"
|
|
116
|
+
})), "h3", _defineProperty({}, inlineImageSelector, {
|
|
117
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
118
|
+
height: referenceHeights.h3,
|
|
119
|
+
transform: "translateY(-2px)"
|
|
120
|
+
})), "h4", _defineProperty({}, inlineImageSelector, {
|
|
121
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
122
|
+
height: referenceHeights.h4,
|
|
123
|
+
transform: "translateY(-2px)"
|
|
124
|
+
})), "h5", _defineProperty({}, inlineImageSelector, {
|
|
125
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
126
|
+
height: referenceHeights.h5,
|
|
127
|
+
transform: "translateY(-2px)"
|
|
128
|
+
})), "h6", _defineProperty({}, inlineImageSelector, {
|
|
129
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
130
|
+
height: referenceHeights.h6,
|
|
131
|
+
transform: "translateY(-2px)"
|
|
132
|
+
})), ".mediaSingleView-content-wrap[layout='wrap-left']", {
|
|
133
|
+
float: 'left'
|
|
134
|
+
}), _defineProperty(_defineProperty(_defineProperty(_ProseMirror, ".mediaSingleView-content-wrap[layout='wrap-right']", {
|
|
135
|
+
float: 'right'
|
|
136
|
+
}), ".mediaSingleView-content-wrap[layout='wrap-right'] + .mediaSingleView-content-wrap[layout='wrap-left']", {
|
|
137
|
+
clear: 'both'
|
|
138
|
+
}), '& > .mediaSingleView-content-wrap', {
|
|
139
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
140
|
+
'.richMedia-resize-handle-right': {
|
|
141
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
142
|
+
marginRight: "-".concat(akEditorMediaResizeHandlerPaddingWide, "px")
|
|
143
|
+
},
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
145
|
+
'.richMedia-resize-handle-left': {
|
|
146
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
147
|
+
marginLeft: "-".concat(akEditorMediaResizeHandlerPaddingWide, "px")
|
|
148
|
+
}
|
|
149
|
+
}))
|
|
150
|
+
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css, ".".concat(MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT), {
|
|
151
|
+
padding: 0
|
|
152
|
+
}), '.richMedia-resize-handle-right, .richMedia-resize-handle-left', {
|
|
153
|
+
display: 'flex',
|
|
154
|
+
flexDirection: 'column',
|
|
155
|
+
/* vertical align */
|
|
156
|
+
justifyContent: 'center'
|
|
157
|
+
}), '.richMedia-resize-handle-right', {
|
|
158
|
+
alignItems: 'flex-end',
|
|
159
|
+
paddingRight: "var(--ds-space-150, 12px)",
|
|
160
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
161
|
+
marginRight: "-".concat(akEditorMediaResizeHandlerPadding, "px")
|
|
162
|
+
}), '.richMedia-resize-handle-left', {
|
|
163
|
+
alignItems: 'flex-start',
|
|
164
|
+
paddingLeft: "var(--ds-space-150, 12px)",
|
|
165
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
166
|
+
marginLeft: "-".concat(akEditorMediaResizeHandlerPadding, "px")
|
|
167
|
+
}), '.richMedia-resize-handle-right::after, .richMedia-resize-handle-left::after', {
|
|
168
|
+
content: "' '",
|
|
169
|
+
display: 'flex',
|
|
170
|
+
width: 3,
|
|
171
|
+
height: 64,
|
|
172
|
+
borderRadius: 6
|
|
173
|
+
}), ".".concat(richMediaClassName, ":hover .richMedia-resize-handle-left::after, .").concat(richMediaClassName, ":hover .richMedia-resize-handle-right::after"), {
|
|
174
|
+
background: "var(--ds-border, #091E4224)"
|
|
175
|
+
}), ".".concat(akEditorSelectedNodeClassName, " .richMedia-resize-handle-right::after, .").concat(akEditorSelectedNodeClassName, " .richMedia-resize-handle-left::after, .").concat(richMediaClassName, " .richMedia-resize-handle-right:hover::after, .").concat(richMediaClassName, " .richMedia-resize-handle-left:hover::after, .").concat(richMediaClassName, ".is-resizing .richMedia-resize-handle-right::after, .").concat(richMediaClassName, ".is-resizing .richMedia-resize-handle-left::after"), {
|
|
176
|
+
background: "var(--ds-border-focused, #388BFF)"
|
|
177
|
+
}), '.__resizable_base__', {
|
|
178
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
179
|
+
left: 'unset !important',
|
|
180
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
181
|
+
width: 'auto !important',
|
|
182
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
183
|
+
height: 'auto !important'
|
|
184
|
+
}), '.danger > div > div > .media-card-frame, .danger > span > a', {
|
|
185
|
+
backgroundColor: "var(--ds-background-danger, #FFECEB)",
|
|
186
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
187
|
+
boxShadow: "0px 0px 0px ".concat(akEditorSelectedBorderBoldSize, "px, ", "var(--ds-border-danger, #E2483D)"),
|
|
188
|
+
transition: 'background-color 0s, box-shadow 0s'
|
|
189
|
+
}), '.danger', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(richMediaClassName, " .").concat(fileCardImageViewSelector, "::after"), {
|
|
190
|
+
border: "1px solid ".concat("var(--ds-border-danger, #E2483D)")
|
|
191
|
+
}), ".".concat(richMediaClassName, " .").concat(inlinePlayerClassName, "::after"), {
|
|
192
|
+
border: "1px solid ".concat("var(--ds-border-danger, #E2483D)")
|
|
193
|
+
}), ".".concat(richMediaClassName, " .").concat(newFileExperienceClassName), {
|
|
194
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
195
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-danger, #E2483D)", " !important")
|
|
196
|
+
}), '.richMedia-resize-handle-right::after, .richMedia-resize-handle-left::after', {
|
|
197
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
198
|
+
background: "var(--ds-icon-danger, #C9372C)".concat(" !important")
|
|
199
|
+
}), '.resizer-handle-thumb', {
|
|
200
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
201
|
+
background: "var(--ds-icon-danger, #C9372C)".concat(" !important")
|
|
202
|
+
}), 'div div .media-card-frame, .inlineCardView-content-wrap > span > a', {
|
|
203
|
+
backgroundColor: "var(--ds-blanket-danger, #EF5C4814)",
|
|
204
|
+
transition: "background-color 0s"
|
|
205
|
+
}), 'div div .media-card-frame::after', {
|
|
206
|
+
boxShadow: 'none'
|
|
207
|
+
})), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_css, '.warning', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(richMediaClassName, " .").concat(fileCardImageViewSelector, "::after"), {
|
|
208
|
+
border: "1px solid ".concat("var(--ds-border-warning, #E56910)")
|
|
209
|
+
}), ".".concat(richMediaClassName, " .").concat(inlinePlayerClassName, "::after"), {
|
|
210
|
+
border: "1px solid ".concat("var(--ds-border-warning, #E56910)")
|
|
211
|
+
}), ".".concat(richMediaClassName, " .").concat(newFileExperienceClassName), {
|
|
212
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
213
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-warning, #E56910)", " !important")
|
|
214
|
+
}), '.resizer-handle-thumb', {
|
|
215
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
216
|
+
background: "var(--ds-icon-warning, #E56910)".concat(" !important")
|
|
217
|
+
})), '.media-filmstrip-list-item', {
|
|
218
|
+
cursor: 'pointer'
|
|
219
|
+
}), ".mediaGroupView-content-wrap.".concat(akEditorSelectedNodeClassName, " #newFileExperienceWrapper"), {
|
|
220
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
221
|
+
boxShadow: akEditorSelectedBoxShadow
|
|
222
|
+
}), '.ak-editor-no-interaction #newFileExperienceWrapper', {
|
|
223
|
+
boxShadow: 'none'
|
|
224
|
+
})));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "207.
|
|
2
|
+
export var version = "207.4.0";
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
2
2
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { SelectionPluginOptions } from '@atlaskit/editor-common/selection';
|
|
4
|
-
import type { EditorAppearance, FeatureFlags,
|
|
4
|
+
import type { EditorAppearance, FeatureFlags, PerformanceTracking } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { BasePluginOptions } from '@atlaskit/editor-plugins/base';
|
|
6
6
|
import type { BlockTypePluginOptions } from '@atlaskit/editor-plugins/block-type';
|
|
7
|
-
import type {
|
|
7
|
+
import type { CodeBlockPluginOptions } from '@atlaskit/editor-plugins/code-block';
|
|
8
|
+
import { type HyperlinkPluginOptions } from '@atlaskit/editor-plugins/hyperlink';
|
|
8
9
|
import type { PastePluginOptions } from '@atlaskit/editor-plugins/paste';
|
|
9
10
|
import type { PlaceholderPluginOptions } from '@atlaskit/editor-plugins/placeholder';
|
|
11
|
+
import type { QuickInsertPluginOptions } from '@atlaskit/editor-plugins/quick-insert';
|
|
12
|
+
import type { TextFormattingPluginOptions } from '@atlaskit/editor-plugins/text-formatting';
|
|
10
13
|
import type { TypeAheadPluginOptions } from '@atlaskit/editor-plugins/type-ahead';
|
|
11
14
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
15
|
import type { DefaultPresetBuilder } from './default-preset-type';
|
|
@@ -15,10 +18,10 @@ export type DefaultPresetPluginOptions = {
|
|
|
15
18
|
base?: BasePluginOptions;
|
|
16
19
|
blockType?: BlockTypePluginOptions;
|
|
17
20
|
placeholder?: PlaceholderPluginOptions;
|
|
18
|
-
textFormatting?:
|
|
21
|
+
textFormatting?: TextFormattingPluginOptions;
|
|
19
22
|
submitEditor?: (editorView: EditorView) => void;
|
|
20
23
|
quickInsert?: QuickInsertPluginOptions;
|
|
21
|
-
codeBlock?:
|
|
24
|
+
codeBlock?: CodeBlockPluginOptions;
|
|
22
25
|
selection?: SelectionPluginOptions;
|
|
23
26
|
hyperlinkOptions?: HyperlinkPluginOptions;
|
|
24
27
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
@@ -44,6 +47,13 @@ export type DefaultPresetPluginOptions = {
|
|
|
44
47
|
/**
|
|
45
48
|
* Note: The order that presets are added determines
|
|
46
49
|
* their placement in the editor toolbar
|
|
50
|
+
* @param options
|
|
51
|
+
* @example
|
|
47
52
|
*/
|
|
48
53
|
export declare function createDefaultPreset(options: DefaultPresetPluginOptions): DefaultPresetBuilder;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @param props
|
|
57
|
+
* @example
|
|
58
|
+
*/
|
|
49
59
|
export declare function useDefaultPreset(props: DefaultPresetPluginOptions): DefaultPresetBuilder[];
|
|
@@ -6,21 +6,22 @@ import type { ErrorReportingHandler } from '@atlaskit/editor-common/error-report
|
|
|
6
6
|
import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
7
7
|
import type { AllEditorPresetPluginTypes, AllPluginNames, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
8
8
|
import type { ContextIdentifierProvider, Providers, SearchProvider } from '@atlaskit/editor-common/provider-factory';
|
|
9
|
-
import type { EditorAppearance, EmptyStateHandler, FeedbackInfo, LinkingOptions, PerformanceTracking, QuickInsertOptions,
|
|
9
|
+
import type { EditorAppearance, EmptyStateHandler, FeedbackInfo, LinkingOptions, PerformanceTracking, QuickInsertOptions, Transformer } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
|
|
11
11
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
12
12
|
import type { AnnotationProviders } from '@atlaskit/editor-plugins/annotation';
|
|
13
13
|
import type { BlockTypePluginOptions } from '@atlaskit/editor-plugins/block-type';
|
|
14
|
-
import type {
|
|
14
|
+
import type { CodeBlockPluginOptions } from '@atlaskit/editor-plugins/code-block';
|
|
15
15
|
import type { DatePluginOptions } from '@atlaskit/editor-plugins/date';
|
|
16
16
|
import type { FindReplaceOptions } from '@atlaskit/editor-plugins/find-replace';
|
|
17
17
|
import type { LayoutPluginOptions } from '@atlaskit/editor-plugins/layout';
|
|
18
|
-
import type {
|
|
18
|
+
import type { MediaPluginOptions, MediaState } from '@atlaskit/editor-plugins/media/types';
|
|
19
19
|
import type { MentionPluginConfig } from '@atlaskit/editor-plugins/mentions';
|
|
20
20
|
import type { PanelPluginConfig } from '@atlaskit/editor-plugins/panel';
|
|
21
|
-
import type {
|
|
21
|
+
import type { PlaceholderTextPluginOptions } from '@atlaskit/editor-plugins/placeholder-text';
|
|
22
22
|
import type { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugins/table/types';
|
|
23
23
|
import type { TextColorPluginConfig } from '@atlaskit/editor-plugins/text-color';
|
|
24
|
+
import type { TextFormattingPluginOptions } from '@atlaskit/editor-plugins/text-formatting';
|
|
24
25
|
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
25
26
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
26
27
|
import type { MentionProvider } from '@atlaskit/mention/resource';
|
|
@@ -160,7 +161,7 @@ export interface EditorNextProps extends EditorBaseProps, EditorSharedPropsWithP
|
|
|
160
161
|
* Example:
|
|
161
162
|
* ```ts
|
|
162
163
|
* // In preset creation you can pass the props passed to the editor like this:
|
|
163
|
-
* preset.add([mediaPlugin,
|
|
164
|
+
* preset.add([mediaPlugin, MediaPluginOptions])
|
|
164
165
|
* ```
|
|
165
166
|
*
|
|
166
167
|
* Note: Props you pass to the media plugin via the preset do not re-render like in React.
|
|
@@ -173,7 +174,7 @@ export interface EditorNextProps extends EditorBaseProps, EditorSharedPropsWithP
|
|
|
173
174
|
* editorApi?.media.actions.setProvider(mediaProvider);
|
|
174
175
|
* ```
|
|
175
176
|
*/
|
|
176
|
-
media?:
|
|
177
|
+
media?: MediaPluginOptions;
|
|
177
178
|
assistiveDescribedBy?: string;
|
|
178
179
|
emojiProvider?: Providers['emojiProvider'];
|
|
179
180
|
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
@@ -207,7 +208,7 @@ export interface EditorPluginFeatureProps {
|
|
|
207
208
|
allowPanel?: boolean | PanelPluginConfig;
|
|
208
209
|
allowExtension?: boolean | ExtensionConfig;
|
|
209
210
|
allowConfluenceInlineComment?: boolean;
|
|
210
|
-
allowTemplatePlaceholders?: boolean |
|
|
211
|
+
allowTemplatePlaceholders?: boolean | PlaceholderTextPluginOptions;
|
|
211
212
|
allowDate?: boolean | DatePluginOptions;
|
|
212
213
|
allowLayouts?: boolean | LayoutPluginOptions;
|
|
213
214
|
allowStatus?: boolean | {
|
|
@@ -259,14 +260,14 @@ export interface EditorPluginFeatureProps {
|
|
|
259
260
|
/** @deprecated Use linking.smartLinks prop instead. */
|
|
260
261
|
smartLinks?: CardOptions;
|
|
261
262
|
allowAnalyticsGASV3?: boolean;
|
|
262
|
-
codeBlock?:
|
|
263
|
-
textFormatting?:
|
|
263
|
+
codeBlock?: CodeBlockPluginOptions;
|
|
264
|
+
textFormatting?: TextFormattingPluginOptions;
|
|
264
265
|
placeholder?: string;
|
|
265
266
|
placeholderBracketHint?: string;
|
|
266
267
|
/**
|
|
267
268
|
* Configure and extend editor linking behaviour
|
|
268
269
|
*/
|
|
269
270
|
linking?: LinkingOptions;
|
|
270
|
-
media?:
|
|
271
|
+
media?: MediaPluginOptions;
|
|
271
272
|
}
|
|
272
273
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mediaStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
2
2
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { SelectionPluginOptions } from '@atlaskit/editor-common/selection';
|
|
4
|
-
import type { EditorAppearance, FeatureFlags,
|
|
4
|
+
import type { EditorAppearance, FeatureFlags, PerformanceTracking } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { BasePluginOptions } from '@atlaskit/editor-plugins/base';
|
|
6
6
|
import type { BlockTypePluginOptions } from '@atlaskit/editor-plugins/block-type';
|
|
7
|
-
import type {
|
|
7
|
+
import type { CodeBlockPluginOptions } from '@atlaskit/editor-plugins/code-block';
|
|
8
|
+
import { type HyperlinkPluginOptions } from '@atlaskit/editor-plugins/hyperlink';
|
|
8
9
|
import type { PastePluginOptions } from '@atlaskit/editor-plugins/paste';
|
|
9
10
|
import type { PlaceholderPluginOptions } from '@atlaskit/editor-plugins/placeholder';
|
|
11
|
+
import type { QuickInsertPluginOptions } from '@atlaskit/editor-plugins/quick-insert';
|
|
12
|
+
import type { TextFormattingPluginOptions } from '@atlaskit/editor-plugins/text-formatting';
|
|
10
13
|
import type { TypeAheadPluginOptions } from '@atlaskit/editor-plugins/type-ahead';
|
|
11
14
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
15
|
import type { DefaultPresetBuilder } from './default-preset-type';
|
|
@@ -15,10 +18,10 @@ export type DefaultPresetPluginOptions = {
|
|
|
15
18
|
base?: BasePluginOptions;
|
|
16
19
|
blockType?: BlockTypePluginOptions;
|
|
17
20
|
placeholder?: PlaceholderPluginOptions;
|
|
18
|
-
textFormatting?:
|
|
21
|
+
textFormatting?: TextFormattingPluginOptions;
|
|
19
22
|
submitEditor?: (editorView: EditorView) => void;
|
|
20
23
|
quickInsert?: QuickInsertPluginOptions;
|
|
21
|
-
codeBlock?:
|
|
24
|
+
codeBlock?: CodeBlockPluginOptions;
|
|
22
25
|
selection?: SelectionPluginOptions;
|
|
23
26
|
hyperlinkOptions?: HyperlinkPluginOptions;
|
|
24
27
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
@@ -44,6 +47,13 @@ export type DefaultPresetPluginOptions = {
|
|
|
44
47
|
/**
|
|
45
48
|
* Note: The order that presets are added determines
|
|
46
49
|
* their placement in the editor toolbar
|
|
50
|
+
* @param options
|
|
51
|
+
* @example
|
|
47
52
|
*/
|
|
48
53
|
export declare function createDefaultPreset(options: DefaultPresetPluginOptions): DefaultPresetBuilder;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @param props
|
|
57
|
+
* @example
|
|
58
|
+
*/
|
|
49
59
|
export declare function useDefaultPreset(props: DefaultPresetPluginOptions): DefaultPresetBuilder[];
|
|
@@ -6,21 +6,22 @@ import type { ErrorReportingHandler } from '@atlaskit/editor-common/error-report
|
|
|
6
6
|
import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
7
7
|
import type { AllEditorPresetPluginTypes, AllPluginNames, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
8
8
|
import type { ContextIdentifierProvider, Providers, SearchProvider } from '@atlaskit/editor-common/provider-factory';
|
|
9
|
-
import type { EditorAppearance, EmptyStateHandler, FeedbackInfo, LinkingOptions, PerformanceTracking, QuickInsertOptions,
|
|
9
|
+
import type { EditorAppearance, EmptyStateHandler, FeedbackInfo, LinkingOptions, PerformanceTracking, QuickInsertOptions, Transformer } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
|
|
11
11
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
12
12
|
import type { AnnotationProviders } from '@atlaskit/editor-plugins/annotation';
|
|
13
13
|
import type { BlockTypePluginOptions } from '@atlaskit/editor-plugins/block-type';
|
|
14
|
-
import type {
|
|
14
|
+
import type { CodeBlockPluginOptions } from '@atlaskit/editor-plugins/code-block';
|
|
15
15
|
import type { DatePluginOptions } from '@atlaskit/editor-plugins/date';
|
|
16
16
|
import type { FindReplaceOptions } from '@atlaskit/editor-plugins/find-replace';
|
|
17
17
|
import type { LayoutPluginOptions } from '@atlaskit/editor-plugins/layout';
|
|
18
|
-
import type {
|
|
18
|
+
import type { MediaPluginOptions, MediaState } from '@atlaskit/editor-plugins/media/types';
|
|
19
19
|
import type { MentionPluginConfig } from '@atlaskit/editor-plugins/mentions';
|
|
20
20
|
import type { PanelPluginConfig } from '@atlaskit/editor-plugins/panel';
|
|
21
|
-
import type {
|
|
21
|
+
import type { PlaceholderTextPluginOptions } from '@atlaskit/editor-plugins/placeholder-text';
|
|
22
22
|
import type { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugins/table/types';
|
|
23
23
|
import type { TextColorPluginConfig } from '@atlaskit/editor-plugins/text-color';
|
|
24
|
+
import type { TextFormattingPluginOptions } from '@atlaskit/editor-plugins/text-formatting';
|
|
24
25
|
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
25
26
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
26
27
|
import type { MentionProvider } from '@atlaskit/mention/resource';
|
|
@@ -160,7 +161,7 @@ export interface EditorNextProps extends EditorBaseProps, EditorSharedPropsWithP
|
|
|
160
161
|
* Example:
|
|
161
162
|
* ```ts
|
|
162
163
|
* // In preset creation you can pass the props passed to the editor like this:
|
|
163
|
-
* preset.add([mediaPlugin,
|
|
164
|
+
* preset.add([mediaPlugin, MediaPluginOptions])
|
|
164
165
|
* ```
|
|
165
166
|
*
|
|
166
167
|
* Note: Props you pass to the media plugin via the preset do not re-render like in React.
|
|
@@ -173,7 +174,7 @@ export interface EditorNextProps extends EditorBaseProps, EditorSharedPropsWithP
|
|
|
173
174
|
* editorApi?.media.actions.setProvider(mediaProvider);
|
|
174
175
|
* ```
|
|
175
176
|
*/
|
|
176
|
-
media?:
|
|
177
|
+
media?: MediaPluginOptions;
|
|
177
178
|
assistiveDescribedBy?: string;
|
|
178
179
|
emojiProvider?: Providers['emojiProvider'];
|
|
179
180
|
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
@@ -207,7 +208,7 @@ export interface EditorPluginFeatureProps {
|
|
|
207
208
|
allowPanel?: boolean | PanelPluginConfig;
|
|
208
209
|
allowExtension?: boolean | ExtensionConfig;
|
|
209
210
|
allowConfluenceInlineComment?: boolean;
|
|
210
|
-
allowTemplatePlaceholders?: boolean |
|
|
211
|
+
allowTemplatePlaceholders?: boolean | PlaceholderTextPluginOptions;
|
|
211
212
|
allowDate?: boolean | DatePluginOptions;
|
|
212
213
|
allowLayouts?: boolean | LayoutPluginOptions;
|
|
213
214
|
allowStatus?: boolean | {
|
|
@@ -259,14 +260,14 @@ export interface EditorPluginFeatureProps {
|
|
|
259
260
|
/** @deprecated Use linking.smartLinks prop instead. */
|
|
260
261
|
smartLinks?: CardOptions;
|
|
261
262
|
allowAnalyticsGASV3?: boolean;
|
|
262
|
-
codeBlock?:
|
|
263
|
-
textFormatting?:
|
|
263
|
+
codeBlock?: CodeBlockPluginOptions;
|
|
264
|
+
textFormatting?: TextFormattingPluginOptions;
|
|
264
265
|
placeholder?: string;
|
|
265
266
|
placeholderBracketHint?: string;
|
|
266
267
|
/**
|
|
267
268
|
* Configure and extend editor linking behaviour
|
|
268
269
|
*/
|
|
269
270
|
linking?: LinkingOptions;
|
|
270
|
-
media?:
|
|
271
|
+
media?: MediaPluginOptions;
|
|
271
272
|
}
|
|
272
273
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mediaStyles: import("@emotion/react").SerializedStyles;
|