@atlaskit/editor-plugin-block-controls 11.1.1 → 11.2.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 +11 -0
- package/dist/cjs/pm-plugins/decorations-anchor.js +15 -49
- package/dist/cjs/pm-plugins/decorations-drag-handle.js +1 -11
- package/dist/cjs/pm-plugins/decorations-quick-insert-button.js +0 -18
- package/dist/cjs/pm-plugins/main.js +2 -2
- package/dist/cjs/ui/drag-handle.js +11 -99
- package/dist/cjs/ui/global-styles.js +1 -85
- package/dist/es2019/pm-plugins/decorations-anchor.js +13 -45
- package/dist/es2019/pm-plugins/decorations-drag-handle.js +1 -11
- package/dist/es2019/pm-plugins/decorations-quick-insert-button.js +0 -18
- package/dist/es2019/pm-plugins/main.js +2 -2
- package/dist/es2019/ui/drag-handle.js +4 -91
- package/dist/es2019/ui/global-styles.js +2 -84
- package/dist/esm/pm-plugins/decorations-anchor.js +15 -49
- package/dist/esm/pm-plugins/decorations-drag-handle.js +1 -11
- package/dist/esm/pm-plugins/decorations-quick-insert-button.js +0 -18
- package/dist/esm/pm-plugins/main.js +2 -2
- package/dist/esm/ui/drag-handle.js +11 -99
- package/dist/esm/ui/global-styles.js +2 -86
- package/package.json +3 -3
|
@@ -6,11 +6,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
7
7
|
import { css, Global, jsx } from '@emotion/react';
|
|
8
8
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
9
|
-
import { ANCHOR_VARIABLE_NAME, DRAG_HANDLE_WIDTH, isCSSAnchorSupported
|
|
9
|
+
import { ANCHOR_VARIABLE_NAME, DRAG_HANDLE_WIDTH, isCSSAnchorSupported } from '@atlaskit/editor-common/styles';
|
|
10
10
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
11
11
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
12
12
|
import { akEditorBreakoutPadding, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorFullPageNarrowBreakout, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced } from '@atlaskit/editor-shared-styles';
|
|
13
|
-
import { layers } from '@atlaskit/theme/constants';
|
|
14
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
14
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
15
|
import { DRAG_HANDLE_MAX_WIDTH_PLUS_GAP } from './consts';
|
|
@@ -242,89 +241,6 @@ var globalStyles = function globalStyles() {
|
|
|
242
241
|
}
|
|
243
242
|
});
|
|
244
243
|
};
|
|
245
|
-
var quickInsertStyles = function quickInsertStyles() {
|
|
246
|
-
return css({
|
|
247
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
248
|
-
'.blocks-quick-insert-button': {
|
|
249
|
-
backgroundColor: 'transparent',
|
|
250
|
-
top: "var(--top-override,8px)",
|
|
251
|
-
position: 'sticky',
|
|
252
|
-
boxSizing: 'border-box',
|
|
253
|
-
display: 'flex',
|
|
254
|
-
flexDirection: 'column',
|
|
255
|
-
justifyContent: 'center',
|
|
256
|
-
alignItems: 'center',
|
|
257
|
-
height: "var(--ds-space-300, 24px)",
|
|
258
|
-
width: "var(--ds-space-300, 24px)",
|
|
259
|
-
border: 'none',
|
|
260
|
-
borderRadius: "var(--ds-radius-full, 9999px)",
|
|
261
|
-
zIndex: layers.card(),
|
|
262
|
-
outline: 'none',
|
|
263
|
-
cursor: 'pointer',
|
|
264
|
-
color: "var(--ds-icon-subtle, #505258)"
|
|
265
|
-
},
|
|
266
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
267
|
-
'[data-blocks-quick-insert-container]:has(~ [data-prosemirror-node-name="table"] .pm-table-with-controls tr.sticky) &': {
|
|
268
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
269
|
-
'--top-override': "".concat(tableControlsSpacing, "px")
|
|
270
|
-
},
|
|
271
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
272
|
-
'[data-prosemirror-mark-name="breakout"]:has([data-blocks-quick-insert-container]):has(~ [data-prosemirror-node-name="table"] .pm-table-with-controls tr.sticky) &': {
|
|
273
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
274
|
-
'--top-override': "".concat(tableControlsSpacing, "px")
|
|
275
|
-
},
|
|
276
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
277
|
-
'.blocks-quick-insert-button:hover': {
|
|
278
|
-
backgroundColor: "var(--ds-background-neutral-subtle-hovered, #0515240F)"
|
|
279
|
-
},
|
|
280
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
281
|
-
'.blocks-quick-insert-button:active': {
|
|
282
|
-
backgroundColor: "var(--ds-background-neutral-subtle-pressed, #0B120E24)"
|
|
283
|
-
},
|
|
284
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
285
|
-
'.blocks-quick-insert-button:focus': {
|
|
286
|
-
outline: "var(--ds-border-width-focused, 2px)".concat(" solid ", "var(--ds-border-focused, #4688EC)")
|
|
287
|
-
},
|
|
288
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
289
|
-
'.blocks-quick-insert-visible-container': {
|
|
290
|
-
transition: 'opacity 0.1s ease-in-out, visibility 0.1s ease-in-out',
|
|
291
|
-
opacity: 1,
|
|
292
|
-
visibility: 'visible'
|
|
293
|
-
},
|
|
294
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
295
|
-
'.blocks-quick-insert-invisible-container': {
|
|
296
|
-
transition: 'opacity 0.1s ease-in-out, visibility 0.1s ease-in-out',
|
|
297
|
-
opacity: 0,
|
|
298
|
-
visibility: 'hidden'
|
|
299
|
-
},
|
|
300
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
301
|
-
'.blocks-quick-insert-tooltip': {
|
|
302
|
-
zIndex: layers.tooltip(),
|
|
303
|
-
borderRadius: "var(--ds-radius-small, 4px)",
|
|
304
|
-
padding: "var(--ds-space-050, 4px)".concat(" 0"),
|
|
305
|
-
boxSizing: 'border-box',
|
|
306
|
-
maxWidth: '240px',
|
|
307
|
-
backgroundColor: "var(--ds-background-neutral-bold, #292A2E)",
|
|
308
|
-
color: "var(--ds-text-inverse, #FFFFFF)",
|
|
309
|
-
font: "var(--ds-font-body-small, normal 400 12px/16px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
310
|
-
insetBlockStart: "var(--ds-space-0, 0px)",
|
|
311
|
-
insetInlineStart: "var(--ds-space-0, 0px)",
|
|
312
|
-
overflowWrap: 'break-word',
|
|
313
|
-
paddingBlockEnd: "var(--ds-space-025, 2px)",
|
|
314
|
-
paddingBlockStart: "var(--ds-space-025, 2px)",
|
|
315
|
-
paddingInlineEnd: "var(--ds-space-075, 6px)",
|
|
316
|
-
paddingInlineStart: "var(--ds-space-075, 6px)",
|
|
317
|
-
wordWrap: 'break-word',
|
|
318
|
-
pointerEvents: 'none',
|
|
319
|
-
userSelect: 'none',
|
|
320
|
-
// Based on: platform/packages/design-system/motion/src/entering/keyframes-motion.tsx
|
|
321
|
-
transition: 'opacity .1s ease-in-out, transform .1s ease-in-out, visibility .1s ease-in-out',
|
|
322
|
-
'@media (prefers-reduced-motion: reduce)': {
|
|
323
|
-
transition: 'none'
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
};
|
|
328
244
|
var topLevelNodeMarginStyles = css({
|
|
329
245
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
330
246
|
'.ProseMirror': {
|
|
@@ -488,6 +404,6 @@ export var GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
|
|
|
488
404
|
exposure: true
|
|
489
405
|
}) ? expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined,
|
|
490
406
|
// platform_editor_controls note: this allows drag handles to render on empty lines
|
|
491
|
-
toolbarFlagsEnabled ? undefined : withInlineNodeStyle,
|
|
407
|
+
toolbarFlagsEnabled ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle, topLevelNodeMarginStyles, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && expValEquals('advanced_layouts', 'isEnabled', true) ? layoutColumnExtendedHoverZone : layoutColumnWithoutHoverZone, shouldRenderAnchors && (isDragging ? dragAnchorStyles : dragHandlerAnchorStyles)]
|
|
492
408
|
});
|
|
493
409
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
57
57
|
"@atlaskit/primitives": "^19.0.0",
|
|
58
58
|
"@atlaskit/theme": "^23.1.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^64.
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^64.1.0",
|
|
60
60
|
"@atlaskit/tokens": "^13.0.0",
|
|
61
61
|
"@atlaskit/tooltip": "^21.1.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"uuid": "^3.1.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@atlaskit/editor-common": "^114.
|
|
70
|
+
"@atlaskit/editor-common": "^114.6.0",
|
|
71
71
|
"react": "^18.2.0",
|
|
72
72
|
"react-dom": "^18.2.0",
|
|
73
73
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|