@atlaskit/editor-core 207.3.0 → 207.5.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 +29 -0
- package/dist/cjs/presets/default.js +8 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +11 -1
- package/dist/cjs/ui/ContentStyles/layout.js +1 -1
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +7 -4
- package/dist/cjs/ui/EditorContentContainer/styles/mediaStyles.js +230 -0
- package/dist/cjs/ui/EditorContentContainer/styles/resizerStyles.js +211 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/presets/default.js +8 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +11 -1
- package/dist/es2019/ui/ContentStyles/layout.js +1 -2
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +8 -8
- package/dist/es2019/ui/EditorContentContainer/styles/ai-panel.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/styles/layout.js +7 -7
- package/dist/es2019/ui/EditorContentContainer/styles/link.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/styles/mediaStyles.js +357 -0
- package/dist/es2019/ui/EditorContentContainer/styles/resizerStyles.js +256 -0
- package/dist/es2019/ui/EditorContentContainer/styles/rule.js +2 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/presets/default.js +8 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +11 -1
- package/dist/esm/ui/ContentStyles/layout.js +1 -1
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +8 -5
- package/dist/esm/ui/EditorContentContainer/styles/ai-panel.js +1 -1
- package/dist/esm/ui/EditorContentContainer/styles/layout.js +7 -7
- package/dist/esm/ui/EditorContentContainer/styles/link.js +1 -1
- package/dist/esm/ui/EditorContentContainer/styles/mediaStyles.js +224 -0
- package/dist/esm/ui/EditorContentContainer/styles/resizerStyles.js +203 -0
- package/dist/esm/ui/EditorContentContainer/styles/rule.js +2 -2
- 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/ui/EditorContentContainer/styles/resizerStyles.d.ts +10 -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/dist/types-ts4.5/ui/EditorContentContainer/styles/resizerStyles.d.ts +10 -0
- package/package.json +9 -5
|
@@ -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
|
+
})));
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { css } from '@emotion/react'; // eslint-disable-line
|
|
3
|
+
|
|
4
|
+
export var resizerItemClassName = 'resizer-item';
|
|
5
|
+
export var resizerHoverZoneClassName = 'resizer-hover-zone';
|
|
6
|
+
export var resizerExtendedZone = 'resizer-is-extended';
|
|
7
|
+
export var resizerHandleClassName = 'resizer-handle';
|
|
8
|
+
export var resizerHandleTrackClassName = "".concat(resizerHandleClassName, "-track");
|
|
9
|
+
export var resizerHandleThumbClassName = "".concat(resizerHandleClassName, "-thumb");
|
|
10
|
+
export var resizerDangerClassName = "".concat(resizerHandleClassName, "-danger");
|
|
11
|
+
export var handleWrapperClass = 'resizer-handle-wrapper';
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766, Seems perfectly safe to autofix, but comments would be lost…
|
|
14
|
+
export var resizerStyles = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(resizerItemClassName), _defineProperty({
|
|
15
|
+
willChange: 'width',
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
17
|
+
'&:hover, &.display-handle': _defineProperty({}, "& > .".concat(handleWrapperClass, " > .").concat(resizerHandleClassName), {
|
|
18
|
+
visibility: 'visible',
|
|
19
|
+
opacity: 1
|
|
20
|
+
}),
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
22
|
+
'&.is-resizing': _defineProperty({}, "& .".concat(resizerHandleThumbClassName), {
|
|
23
|
+
background: "var(--ds-border-focused, #388BFF)"
|
|
24
|
+
})
|
|
25
|
+
}, "&.".concat(resizerDangerClassName), _defineProperty({}, "& .".concat(resizerHandleThumbClassName), {
|
|
26
|
+
transition: 'none',
|
|
27
|
+
background: "var(--ds-icon-danger, #C9372C)"
|
|
28
|
+
}))), ".".concat(resizerHandleClassName), {
|
|
29
|
+
display: 'flex',
|
|
30
|
+
visibility: 'hidden',
|
|
31
|
+
opacity: 0,
|
|
32
|
+
flexDirection: 'column',
|
|
33
|
+
justifyContent: 'center',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
width: 7,
|
|
36
|
+
transition: 'visibility 0.2s, opacity 0.2s',
|
|
37
|
+
// NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles
|
|
38
|
+
// into the tooltip
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
40
|
+
"& div[role='presentation']": {
|
|
41
|
+
width: '100%',
|
|
42
|
+
height: '100%',
|
|
43
|
+
display: 'flex',
|
|
44
|
+
flexDirection: 'column',
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
marginTop: "var(--ds-space-negative-200, -16px)",
|
|
48
|
+
whiteSpace: 'normal'
|
|
49
|
+
},
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
51
|
+
'&.left': {
|
|
52
|
+
alignItems: 'flex-start'
|
|
53
|
+
},
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
55
|
+
'&.right': {
|
|
56
|
+
alignItems: 'flex-end'
|
|
57
|
+
},
|
|
58
|
+
// Handle Sizing
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
60
|
+
'&.small': _defineProperty({}, "& .".concat(resizerHandleThumbClassName), {
|
|
61
|
+
height: 43
|
|
62
|
+
}),
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
64
|
+
'&.medium': _defineProperty({}, "& .".concat(resizerHandleThumbClassName), {
|
|
65
|
+
height: 64
|
|
66
|
+
}),
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
68
|
+
'&.large': _defineProperty({}, "& .".concat(resizerHandleThumbClassName), {
|
|
69
|
+
height: 96
|
|
70
|
+
}),
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
72
|
+
'&.clamped': _defineProperty({}, "& .".concat(resizerHandleThumbClassName), {
|
|
73
|
+
height: 'clamp(43px, calc(100% - 32px), 96px)'
|
|
74
|
+
}),
|
|
75
|
+
// Handle Alignment
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
77
|
+
'&.sticky': _defineProperty({}, "& .".concat(resizerHandleThumbClassName), {
|
|
78
|
+
position: 'sticky',
|
|
79
|
+
top: "var(--ds-space-150, 12px)",
|
|
80
|
+
bottom: "var(--ds-space-150, 12px)"
|
|
81
|
+
}),
|
|
82
|
+
'&:hover': _defineProperty(_defineProperty({}, "& .".concat(resizerHandleThumbClassName), {
|
|
83
|
+
background: "var(--ds-border-focused, #388BFF)"
|
|
84
|
+
}), "& .".concat(resizerHandleTrackClassName), {
|
|
85
|
+
visibility: 'visible',
|
|
86
|
+
opacity: 0.5
|
|
87
|
+
})
|
|
88
|
+
}), ".".concat(resizerHandleThumbClassName), {
|
|
89
|
+
content: "' '",
|
|
90
|
+
display: 'flex',
|
|
91
|
+
width: 3,
|
|
92
|
+
margin: "0 ".concat("var(--ds-space-025, 2px)"),
|
|
93
|
+
height: 64,
|
|
94
|
+
transition: 'background-color 0.2s',
|
|
95
|
+
borderRadius: 6,
|
|
96
|
+
border: 0,
|
|
97
|
+
padding: 0,
|
|
98
|
+
zIndex: 2,
|
|
99
|
+
outline: 'none',
|
|
100
|
+
minHeight: 24,
|
|
101
|
+
background: "var(--ds-border, #091E4224)",
|
|
102
|
+
'&:hover': {
|
|
103
|
+
cursor: 'col-resize'
|
|
104
|
+
},
|
|
105
|
+
'&:focus': {
|
|
106
|
+
background: "var(--ds-border-selected, #0C66E4)",
|
|
107
|
+
'&::after': {
|
|
108
|
+
content: "''",
|
|
109
|
+
position: 'absolute',
|
|
110
|
+
top: "var(--ds-space-negative-050, -4px)",
|
|
111
|
+
right: "var(--ds-space-negative-050, -4px)",
|
|
112
|
+
bottom: "var(--ds-space-negative-050, -4px)",
|
|
113
|
+
left: "var(--ds-space-negative-050, -4px)",
|
|
114
|
+
border: "2px solid ".concat("var(--ds-border-focused, #388BFF)"),
|
|
115
|
+
borderRadius: 'inherit',
|
|
116
|
+
zIndex: -1
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}), ".".concat(resizerHandleTrackClassName), {
|
|
120
|
+
visibility: 'hidden',
|
|
121
|
+
position: 'absolute',
|
|
122
|
+
width: 7,
|
|
123
|
+
height: 'calc(100% - 40px)',
|
|
124
|
+
borderRadius: 4,
|
|
125
|
+
opacity: 0,
|
|
126
|
+
transition: 'background-color 0.2s, visibility 0.2s, opacity 0.2s',
|
|
127
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
128
|
+
'&.none': {
|
|
129
|
+
background: 'none'
|
|
130
|
+
},
|
|
131
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
132
|
+
'&.shadow': {
|
|
133
|
+
background: "var(--ds-background-selected, #E9F2FF)"
|
|
134
|
+
},
|
|
135
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
136
|
+
'&.full-height': {
|
|
137
|
+
background: "var(--ds-background-selected, #E9F2FF)",
|
|
138
|
+
height: '100%',
|
|
139
|
+
minHeight: 36
|
|
140
|
+
}
|
|
141
|
+
}), '.ak-editor-selected-node', _defineProperty({}, "& .".concat(resizerHandleThumbClassName), {
|
|
142
|
+
background: "var(--ds-border-focused, #388BFF)"
|
|
143
|
+
})), ".ak-editor-no-interaction .ak-editor-selected-node .".concat(resizerHandleClassName, ":not(:hover) .").concat(resizerHandleThumbClassName), {
|
|
144
|
+
background: "var(--ds-border, #091E4224)"
|
|
145
|
+
}), ".".concat(resizerHoverZoneClassName), _defineProperty({
|
|
146
|
+
position: 'relative',
|
|
147
|
+
display: 'inline-block',
|
|
148
|
+
width: '100%'
|
|
149
|
+
}, "&.".concat(resizerExtendedZone), {
|
|
150
|
+
padding: "0 ".concat("var(--ds-space-150, 12px)"),
|
|
151
|
+
left: "var(--ds-space-negative-150, -12px)"
|
|
152
|
+
})), "table .".concat(resizerHoverZoneClassName, ", table .").concat(resizerHoverZoneClassName, ".").concat(resizerExtendedZone), {
|
|
153
|
+
padding: 'unset',
|
|
154
|
+
left: 'unset'
|
|
155
|
+
}));
|
|
156
|
+
|
|
157
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
158
|
+
export var pragmaticResizerStyles = css({
|
|
159
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
160
|
+
'.pm-breakout-resize-handle': {
|
|
161
|
+
position: 'relative',
|
|
162
|
+
display: 'flex',
|
|
163
|
+
alignItems: 'center',
|
|
164
|
+
justifyContent: 'center',
|
|
165
|
+
height: '100%',
|
|
166
|
+
width: 7,
|
|
167
|
+
alignSelf: 'center',
|
|
168
|
+
gridRow: 1,
|
|
169
|
+
gridColumn: 1,
|
|
170
|
+
cursor: 'col-resize',
|
|
171
|
+
borderRadius: 4,
|
|
172
|
+
transition: 'background-color 0.2s, visibility 0.2s, opacity 0.2s',
|
|
173
|
+
'&:hover': {
|
|
174
|
+
background: "var(--ds-background-selected, #E9F2FF)",
|
|
175
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
176
|
+
'.pm-breakout-resize-handle-inner': {
|
|
177
|
+
background: "var(--ds-border-focused, #388BFF)"
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
182
|
+
'.pm-breakout-resize-handle-left': {
|
|
183
|
+
justifySelf: 'start',
|
|
184
|
+
left: -20
|
|
185
|
+
},
|
|
186
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
187
|
+
'.pm-breakout-resize-handle-right': {
|
|
188
|
+
justifySelf: 'end',
|
|
189
|
+
right: -20
|
|
190
|
+
},
|
|
191
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
192
|
+
'.pm-breakout-resize-handle-inner': {
|
|
193
|
+
minWidth: 3,
|
|
194
|
+
// copied from resizeStyles.clamped
|
|
195
|
+
height: 'clamp(27px, calc(100% - 32px), 96px)',
|
|
196
|
+
background: "var(--ds-border, #091E4224)",
|
|
197
|
+
borderRadius: 6,
|
|
198
|
+
// sticky styles
|
|
199
|
+
position: 'sticky',
|
|
200
|
+
top: "var(--ds-space-150, 12px)",
|
|
201
|
+
bottom: "var(--ds-space-150, 12px)"
|
|
202
|
+
}
|
|
203
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
3
|
-
import { css } from
|
|
4
|
-
import { akEditorSelectedNodeClassName } from
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
6
6
|
export var ruleStyles = css(_defineProperty({
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "207.
|
|
2
|
+
export var version = "207.5.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;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const resizerItemClassName = "resizer-item";
|
|
2
|
+
export declare const resizerHoverZoneClassName = "resizer-hover-zone";
|
|
3
|
+
export declare const resizerExtendedZone = "resizer-is-extended";
|
|
4
|
+
export declare const resizerHandleClassName = "resizer-handle";
|
|
5
|
+
export declare const resizerHandleTrackClassName = "resizer-handle-track";
|
|
6
|
+
export declare const resizerHandleThumbClassName = "resizer-handle-thumb";
|
|
7
|
+
export declare const resizerDangerClassName = "resizer-handle-danger";
|
|
8
|
+
export declare const handleWrapperClass = "resizer-handle-wrapper";
|
|
9
|
+
export declare const resizerStyles: import("@emotion/react").SerializedStyles;
|
|
10
|
+
export declare const pragmaticResizerStyles: 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[];
|