@atlaskit/editor-core 197.7.0 → 197.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/afm-cc/tsconfig.json +0 -3
- package/afm-jira/tsconfig.json +0 -3
- package/dist/cjs/create-editor/ReactEditorView.js +11 -2
- package/dist/cjs/editor.js +7 -0
- package/dist/cjs/ui/Addon/Dropdown/styles.js +2 -4
- package/dist/cjs/ui/Appearance/Comment/Comment.js +2 -4
- package/dist/cjs/ui/ChromeCollapsed/styles.js +3 -5
- package/dist/cjs/ui/ContentStyles/ai-panels.js +2 -3
- package/dist/cjs/ui/ContentStyles/code-block.js +1 -2
- package/dist/cjs/ui/ContentStyles/expand.js +5 -6
- package/dist/cjs/ui/ContentStyles/extension.js +1 -2
- package/dist/cjs/ui/ContentStyles/index.js +2 -3
- package/dist/cjs/ui/ContentStyles/layout.js +1 -2
- package/dist/cjs/ui/ContentStyles/media.js +1 -2
- package/dist/cjs/ui/ContextPanel/index.js +1 -2
- package/dist/cjs/ui/ToolbarFeedback/styles.js +5 -7
- package/dist/cjs/ui/WithFlash/index.js +3 -4
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +12 -3
- package/dist/es2019/editor.js +7 -0
- package/dist/es2019/ui/Addon/Dropdown/styles.js +2 -4
- package/dist/es2019/ui/Appearance/Comment/Comment.js +2 -4
- package/dist/es2019/ui/ChromeCollapsed/styles.js +3 -5
- package/dist/es2019/ui/ContentStyles/ai-panels.js +4 -5
- package/dist/es2019/ui/ContentStyles/code-block.js +1 -2
- package/dist/es2019/ui/ContentStyles/expand.js +7 -8
- package/dist/es2019/ui/ContentStyles/extension.js +4 -5
- package/dist/es2019/ui/ContentStyles/index.js +4 -5
- package/dist/es2019/ui/ContentStyles/layout.js +2 -3
- package/dist/es2019/ui/ContentStyles/media.js +6 -7
- package/dist/es2019/ui/ContextPanel/index.js +1 -2
- package/dist/es2019/ui/ToolbarFeedback/styles.js +5 -7
- package/dist/es2019/ui/WithFlash/index.js +3 -4
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +12 -3
- package/dist/esm/editor.js +7 -0
- package/dist/esm/ui/Addon/Dropdown/styles.js +2 -4
- package/dist/esm/ui/Appearance/Comment/Comment.js +2 -4
- package/dist/esm/ui/ChromeCollapsed/styles.js +3 -5
- package/dist/esm/ui/ContentStyles/ai-panels.js +2 -3
- package/dist/esm/ui/ContentStyles/code-block.js +1 -2
- package/dist/esm/ui/ContentStyles/expand.js +6 -7
- package/dist/esm/ui/ContentStyles/extension.js +1 -2
- package/dist/esm/ui/ContentStyles/index.js +2 -3
- package/dist/esm/ui/ContentStyles/layout.js +1 -2
- package/dist/esm/ui/ContentStyles/media.js +1 -2
- package/dist/esm/ui/ContextPanel/index.js +1 -2
- package/dist/esm/ui/ToolbarFeedback/styles.js +5 -7
- package/dist/esm/ui/WithFlash/index.js +3 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +11 -11
- package/dist/types/editor.d.ts +7 -0
- package/dist/types/presets/default.d.ts +10 -10
- package/dist/types/presets/universal.d.ts +11 -11
- package/dist/types/presets/useUniversalPreset.d.ts +11 -11
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +11 -11
- package/dist/types-ts4.5/editor.d.ts +7 -0
- package/dist/types-ts4.5/presets/default.d.ts +10 -10
- package/dist/types-ts4.5/presets/universal.d.ts +11 -11
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +11 -11
- package/package.json +17 -10
|
@@ -17,8 +17,6 @@ import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-me
|
|
|
17
17
|
import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
18
18
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
|
-
import { N100 } from '@atlaskit/theme/colors';
|
|
21
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
22
20
|
import messages from '../../../messages';
|
|
23
21
|
import { ClickAreaBlock } from '../../Addon';
|
|
24
22
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
@@ -37,10 +35,10 @@ const commentEditorStyles = css({
|
|
|
37
35
|
minWidth: '272px',
|
|
38
36
|
height: 'auto',
|
|
39
37
|
backgroundColor: "var(--ds-background-input, white)",
|
|
40
|
-
border: `1px solid ${
|
|
38
|
+
border: `1px solid ${"var(--ds-border-input, #8590A2)"}`,
|
|
41
39
|
boxSizing: 'border-box',
|
|
42
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
43
|
-
borderRadius:
|
|
41
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
44
42
|
maxWidth: 'inherit',
|
|
45
43
|
wordWrap: 'break-word'
|
|
46
44
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { akEditorSubtleAccent, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { N300, N50 } from '@atlaskit/theme/colors';
|
|
5
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
6
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
7
5
|
export const inputStyle = css({
|
|
8
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
@@ -11,7 +9,7 @@ export const inputStyle = css({
|
|
|
11
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
12
10
|
border: `1px solid ${`var(--ds-border-input, ${akEditorSubtleAccent})`}`,
|
|
13
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
14
|
-
borderRadius:
|
|
12
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
15
13
|
boxSizing: 'border-box',
|
|
16
14
|
height: '40px',
|
|
17
15
|
paddingLeft: "var(--ds-space-250, 20px)",
|
|
@@ -23,10 +21,10 @@ export const inputStyle = css({
|
|
|
23
21
|
fontWeight: 400,
|
|
24
22
|
lineHeight: 1.42857142857143,
|
|
25
23
|
letterSpacing: '-0.005em',
|
|
26
|
-
color:
|
|
24
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
27
25
|
'&:hover': {
|
|
28
26
|
backgroundColor: "var(--ds-background-input-hovered, white)",
|
|
29
|
-
borderColor:
|
|
27
|
+
borderColor: "var(--ds-border-input, #8590A2)",
|
|
30
28
|
cursor: 'text'
|
|
31
29
|
}
|
|
32
30
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css, keyframes } from '@emotion/react';
|
|
3
|
-
import { N0, N500, R400 } from '@atlaskit/theme/colors';
|
|
4
3
|
const isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
5
4
|
const rotationAnimation = keyframes({
|
|
6
5
|
'0%': {
|
|
@@ -68,7 +67,7 @@ const prismBorderStyles = (colorMode, hover) => css({
|
|
|
68
67
|
transform: 'translate3d(0, 0, 0)',
|
|
69
68
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
70
69
|
...(hover ? {
|
|
71
|
-
background:
|
|
70
|
+
background: "var(--ds-border-input, #8590A2)"
|
|
72
71
|
} : isFirefox ? {
|
|
73
72
|
background: `linear-gradient(90deg,
|
|
74
73
|
${aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light']} 0%,
|
|
@@ -112,7 +111,7 @@ export const aiPanelStyles = colorMode => css`
|
|
|
112
111
|
position: relative;
|
|
113
112
|
box-shadow: none;
|
|
114
113
|
overflow: unset;
|
|
115
|
-
background-color: ${
|
|
114
|
+
background-color: ${"var(--ds-surface, #FFFFFF)"} !important;
|
|
116
115
|
&::before,
|
|
117
116
|
&::after {
|
|
118
117
|
${prismBorderStyles(colorMode)}
|
|
@@ -124,7 +123,7 @@ export const aiPanelStyles = colorMode => css`
|
|
|
124
123
|
}
|
|
125
124
|
}
|
|
126
125
|
& .with-margin-styles {
|
|
127
|
-
background-color: ${
|
|
126
|
+
background-color: ${"var(--ds-surface, #FFFFFF)"} !important;
|
|
128
127
|
border-radius: ${"var(--ds-border-radius-100, 3px)"};
|
|
129
128
|
}
|
|
130
129
|
}
|
|
@@ -146,7 +145,7 @@ export const aiPanelStyles = colorMode => css`
|
|
|
146
145
|
// This styles the ai panel correctly when a user is hovering over the delete button in the floating panel
|
|
147
146
|
div[extensionType='com.atlassian.ai-blocks'].danger {
|
|
148
147
|
.extension-container {
|
|
149
|
-
box-shadow: 0 0 0 1px ${
|
|
148
|
+
box-shadow: 0 0 0 1px ${"var(--ds-border-danger, #E2483D)"};
|
|
150
149
|
}
|
|
151
150
|
}
|
|
152
151
|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { CodeBlockSharedCssClassName, codeBlockSharedStyles } from '@atlaskit/editor-common/styles';
|
|
5
5
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
|
-
import { R75 } from '@atlaskit/theme/colors';
|
|
7
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
7
|
const GutterDangerOverlay = () => css`
|
|
9
8
|
&::after {
|
|
@@ -63,7 +62,7 @@ export const codeBlockStyles = () => css`
|
|
|
63
62
|
${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
|
|
64
63
|
|
|
65
64
|
.${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER} {
|
|
66
|
-
background-color: ${
|
|
65
|
+
background-color: ${"var(--ds-background-danger, #FFECEB)"};
|
|
67
66
|
color: ${`var(--ds-text-danger, ${akEditorDeleteIconColor})`};
|
|
68
67
|
${GutterDangerOverlay()};
|
|
69
68
|
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { BreakoutCssClassName, expandClassNames, sharedExpandStyles } from '@atlaskit/editor-common/styles';
|
|
4
|
-
import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
import { akEditorSelectedBorder, akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { N100A, N40A, N50A, R300, R50 } from '@atlaskit/theme/colors';
|
|
7
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
7
|
const EXPAND_SELECTED_BACKGROUND = "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))";
|
|
9
8
|
const EXPAND_ICON_COLOR = () => css({
|
|
10
|
-
color:
|
|
9
|
+
color: "var(--ds-icon-subtle, #626F86)"
|
|
11
10
|
});
|
|
12
|
-
const DANGER_STATE_BACKGROUND_COLOR =
|
|
13
|
-
const DANGER_STATE_BORDER_COLOR =
|
|
11
|
+
const DANGER_STATE_BACKGROUND_COLOR = "var(--ds-background-danger, #FFECEB)";
|
|
12
|
+
const DANGER_STATE_BORDER_COLOR = "var(--ds-border-danger, #E2483D)";
|
|
14
13
|
const firstNodeWithNotMarginTop = () => editorExperiment('nested-dnd', true) ?
|
|
15
14
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
16
15
|
css`
|
|
@@ -49,7 +48,7 @@ export const expandStyles = () => css`
|
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
&.${akEditorSelectedNodeClassName}:not(.danger) {
|
|
52
|
-
${getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.Border])}
|
|
51
|
+
${editorExperiment('nested-dnd', true) ? getSelectionStyles([SelectionStyle.Blanket]) + `border: ${akEditorSelectedBorder};` : getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.Border])}
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
&.danger {
|
|
@@ -88,7 +87,7 @@ export const expandStyles = () => css`
|
|
|
88
87
|
|
|
89
88
|
.${expandClassNames.expanded} {
|
|
90
89
|
background: ${EXPAND_SELECTED_BACKGROUND};
|
|
91
|
-
border-color: ${
|
|
90
|
+
border-color: ${"var(--ds-border, #091E4224)"};
|
|
92
91
|
|
|
93
92
|
.${expandClassNames.content} {
|
|
94
93
|
padding-top: ${"var(--ds-space-100, 8px)"};
|
|
@@ -129,7 +128,7 @@ export const expandStyles = () => css`
|
|
|
129
128
|
border-color: transparent;
|
|
130
129
|
|
|
131
130
|
&:hover {
|
|
132
|
-
border-color: ${
|
|
131
|
+
border-color: ${"var(--ds-border, #091E4224)"};
|
|
133
132
|
background: ${EXPAND_SELECTED_BACKGROUND};
|
|
134
133
|
}
|
|
135
134
|
}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { B400, B50, R400, R50 } from '@atlaskit/theme/colors';
|
|
5
4
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
6
5
|
const extensionLabelStyles = css`
|
|
7
6
|
&.danger > span > div > .extension-label {
|
|
8
|
-
background-color: ${
|
|
9
|
-
color: ${
|
|
7
|
+
background-color: ${"var(--ds-background-accent-red-subtler, #FFD5D2)"};
|
|
8
|
+
color: ${"var(--ds-text-danger, #AE2E24)"};
|
|
10
9
|
opacity: 1;
|
|
11
10
|
box-shadow: none;
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
&:not(.danger).${akEditorSelectedNodeClassName} > span > div > .extension-label {
|
|
15
|
-
background-color: ${
|
|
16
|
-
color: ${
|
|
14
|
+
background-color: ${"var(--ds-background-selected, #E9F2FF)"};
|
|
15
|
+
color: ${"var(--ds-text-selected, #0C66E4)"};
|
|
17
16
|
opacity: 1;
|
|
18
17
|
box-shadow: none;
|
|
19
18
|
}
|
|
@@ -24,7 +24,6 @@ import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolb
|
|
|
24
24
|
import { placeholderTextStyles } from '@atlaskit/editor-plugins/placeholder-text/styles';
|
|
25
25
|
import { akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorDefaultLayoutWidth, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorSelectedBorderColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
26
26
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
27
|
-
import { N200, N30A, N500 } from '@atlaskit/theme/colors';
|
|
28
27
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
29
28
|
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
30
29
|
import { usePresetContext } from '../../presets/context';
|
|
@@ -68,7 +67,7 @@ const mentionsStyles = css`
|
|
|
68
67
|
|
|
69
68
|
/* need to specify dark text colour because personal mentions
|
|
70
69
|
(in dark blue) have white text by default */
|
|
71
|
-
color: ${
|
|
70
|
+
color: ${"var(--ds-text-subtle, #44546F)"};
|
|
72
71
|
}
|
|
73
72
|
}
|
|
74
73
|
|
|
@@ -81,8 +80,8 @@ const mentionsStyles = css`
|
|
|
81
80
|
background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackgroundWithOpacity})`};
|
|
82
81
|
}
|
|
83
82
|
.${MentionSharedCssClassName.MENTION_CONTAINER} > span > span > span {
|
|
84
|
-
background-color: ${
|
|
85
|
-
color: ${
|
|
83
|
+
background-color: ${"var(--ds-background-neutral, #091E420F)"};
|
|
84
|
+
color: ${"var(--ds-text-subtle, #44546F)"};
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
87
|
`;
|
|
@@ -136,7 +135,7 @@ const emojiStyles = css`
|
|
|
136
135
|
export const placeholderStyles = css({
|
|
137
136
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
138
137
|
'.ProseMirror .placeholder-decoration': {
|
|
139
|
-
color:
|
|
138
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
140
139
|
width: '100%',
|
|
141
140
|
pointerEvents: 'none',
|
|
142
141
|
userSelect: 'none',
|
|
@@ -4,7 +4,6 @@ import { columnLayoutSharedStyle, LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN }
|
|
|
4
4
|
import { TableCssClassName } from '@atlaskit/editor-plugins/table/types';
|
|
5
5
|
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/consts';
|
|
6
6
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, getSelectionStyles, gridMediumMaxWidth, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
7
|
-
import { N40A, N50A } from '@atlaskit/theme/colors';
|
|
8
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
8
|
export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
10
9
|
const firstNodeWithNotMarginTop = () => editorExperiment('nested-dnd', true) ?
|
|
@@ -46,7 +45,7 @@ export const layoutStyles = viewMode => css`
|
|
|
46
45
|
flex: 1;
|
|
47
46
|
min-width: 0;
|
|
48
47
|
border: ${viewMode === 'view' ? 0 : akEditorSelectedBorderSize}px solid
|
|
49
|
-
${
|
|
48
|
+
${"var(--ds-border, #091E4224)"};
|
|
50
49
|
border-radius: 4px;
|
|
51
50
|
padding: ${LAYOUT_COLUMN_PADDING}px
|
|
52
51
|
${LAYOUT_COLUMN_PADDING + (editorExperiment('nested-dnd', true) ? 8 : 0)}px;
|
|
@@ -125,7 +124,7 @@ export const layoutStyles = viewMode => css`
|
|
|
125
124
|
&.selected [data-layout-column],
|
|
126
125
|
&:hover [data-layout-column] {
|
|
127
126
|
border: ${viewMode === 'view' ? 0 : akEditorSelectedBorderSize}px solid
|
|
128
|
-
${
|
|
127
|
+
${"var(--ds-border, #091E4224)"};
|
|
129
128
|
}
|
|
130
129
|
|
|
131
130
|
&.selected.danger > [data-layout-column] {
|
|
@@ -4,7 +4,6 @@ import { mediaInlineImageStyles } from '@atlaskit/editor-common/media-inline';
|
|
|
4
4
|
import { mediaSingleSharedStyle, richMediaClassName } from '@atlaskit/editor-common/styles';
|
|
5
5
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPaddingWide, akEditorSelectedBorderBoldSize, akEditorSelectedBoxShadow, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
|
|
7
|
-
import { B200, N60, Y500 } from '@atlaskit/theme/colors';
|
|
8
7
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
9
8
|
export const mediaStyles = css`
|
|
10
9
|
.ProseMirror {
|
|
@@ -105,7 +104,7 @@ export const mediaStyles = css`
|
|
|
105
104
|
|
|
106
105
|
.${richMediaClassName}:hover .richMedia-resize-handle-left::after,
|
|
107
106
|
.${richMediaClassName}:hover .richMedia-resize-handle-right::after {
|
|
108
|
-
background: ${
|
|
107
|
+
background: ${"var(--ds-border, #091E4224)"};
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
.${akEditorSelectedNodeClassName} .richMedia-resize-handle-right::after,
|
|
@@ -114,7 +113,7 @@ export const mediaStyles = css`
|
|
|
114
113
|
.${richMediaClassName} .richMedia-resize-handle-left:hover::after,
|
|
115
114
|
.${richMediaClassName}.is-resizing .richMedia-resize-handle-right::after,
|
|
116
115
|
.${richMediaClassName}.is-resizing .richMedia-resize-handle-left::after {
|
|
117
|
-
background: ${
|
|
116
|
+
background: ${"var(--ds-border-focused, #388BFF)"};
|
|
118
117
|
}
|
|
119
118
|
|
|
120
119
|
.__resizable_base__ {
|
|
@@ -172,19 +171,19 @@ export const mediaStyles = css`
|
|
|
172
171
|
.warning {
|
|
173
172
|
/* Media single */
|
|
174
173
|
.${richMediaClassName} .${fileCardImageViewSelector}::after {
|
|
175
|
-
border: 1px solid ${
|
|
174
|
+
border: 1px solid ${"var(--ds-border-warning, #E56910)"};
|
|
176
175
|
}
|
|
177
176
|
|
|
178
177
|
.${richMediaClassName} .${inlinePlayerClassName}::after {
|
|
179
|
-
border: 1px solid ${
|
|
178
|
+
border: 1px solid ${"var(--ds-border-warning, #E56910)"};
|
|
180
179
|
}
|
|
181
180
|
|
|
182
181
|
.${richMediaClassName} .${newFileExperienceClassName} {
|
|
183
|
-
box-shadow: 0 0 0 1px ${
|
|
182
|
+
box-shadow: 0 0 0 1px ${"var(--ds-border-warning, #E56910)"} !important;
|
|
184
183
|
}
|
|
185
184
|
|
|
186
185
|
.resizer-handle-thumb {
|
|
187
|
-
background: ${
|
|
186
|
+
background: ${"var(--ds-icon-warning, #E56910)"} !important;
|
|
188
187
|
}
|
|
189
188
|
}
|
|
190
189
|
|
|
@@ -12,7 +12,6 @@ import Transition from 'react-transition-group/Transition';
|
|
|
12
12
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
13
13
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
14
14
|
import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
15
|
-
import { N30 } from '@atlaskit/theme/colors';
|
|
16
15
|
const ANIM_SPEED_MS = 500;
|
|
17
16
|
const panelHidden = css({
|
|
18
17
|
width: 0
|
|
@@ -26,7 +25,7 @@ export const panel = css({
|
|
|
26
25
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
27
26
|
transition: `width ${ANIM_SPEED_MS}ms ${akEditorSwoopCubicBezier}`,
|
|
28
27
|
overflow: 'hidden',
|
|
29
|
-
boxShadow: `inset 2px 0 0 0 ${
|
|
28
|
+
boxShadow: `inset 2px 0 0 0 ${"var(--ds-border, #091E4224)"}`
|
|
30
29
|
});
|
|
31
30
|
|
|
32
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { N400, N60A, P400 } from '@atlaskit/theme/colors';
|
|
5
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
6
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
7
5
|
export const buttonContent = css({
|
|
8
6
|
display: 'flex',
|
|
@@ -19,10 +17,10 @@ export const wrapper = css({
|
|
|
19
17
|
|
|
20
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
21
19
|
export const confirmationPopup = css({
|
|
22
|
-
background: "var(--ds-surface-overlay, #
|
|
20
|
+
background: "var(--ds-surface-overlay, #FFFFFF)",
|
|
23
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
24
|
-
borderRadius:
|
|
25
|
-
boxShadow:
|
|
22
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
23
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)",
|
|
26
24
|
display: 'flex',
|
|
27
25
|
flexDirection: 'column',
|
|
28
26
|
boxSizing: 'border-box',
|
|
@@ -38,7 +36,7 @@ export const confirmationText = css({
|
|
|
38
36
|
fontSize: relativeFontSizeToBase16(14),
|
|
39
37
|
wordSpacing: '4px',
|
|
40
38
|
lineHeight: '22px',
|
|
41
|
-
color:
|
|
39
|
+
color: "var(--ds-text-subtle, #44546F)",
|
|
42
40
|
marginTop: "var(--ds-space-400, 32px)",
|
|
43
41
|
padding: "var(--ds-space-250, 20px)",
|
|
44
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -57,7 +55,7 @@ export const confirmationText = css({
|
|
|
57
55
|
|
|
58
56
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
59
57
|
export const confirmationHeader = css({
|
|
60
|
-
backgroundColor:
|
|
58
|
+
backgroundColor: "var(--ds-background-discovery-bold, #6E5DC6)",
|
|
61
59
|
height: '100px',
|
|
62
60
|
width: '100%',
|
|
63
61
|
display: 'inline-block'
|
|
@@ -7,21 +7,20 @@ import React from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx, keyframes } from '@emotion/react';
|
|
10
|
-
import { R100 } from '@atlaskit/theme/colors';
|
|
11
10
|
const pulseBackground = keyframes({
|
|
12
11
|
'50%': {
|
|
13
|
-
backgroundColor:
|
|
12
|
+
backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
|
|
14
13
|
}
|
|
15
14
|
});
|
|
16
15
|
const pulseBackgroundReverse = keyframes({
|
|
17
16
|
'0%': {
|
|
18
|
-
backgroundColor:
|
|
17
|
+
backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
|
|
19
18
|
},
|
|
20
19
|
'50%': {
|
|
21
20
|
backgroundColor: 'auto'
|
|
22
21
|
},
|
|
23
22
|
'100%': {
|
|
24
|
-
backgroundColor:
|
|
23
|
+
backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
|
|
25
24
|
}
|
|
26
25
|
});
|
|
27
26
|
const flashWrapper = css({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "197.7.
|
|
2
|
+
export const version = "197.7.2";
|
|
@@ -22,11 +22,12 @@ import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-m
|
|
|
22
22
|
import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
|
|
23
23
|
import { getResponseEndTime } from '@atlaskit/editor-common/performance/navigation';
|
|
24
24
|
import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
25
|
-
import { processRawValue } from '@atlaskit/editor-common/process-raw-value';
|
|
25
|
+
import { processRawValue, processRawValueWithoutTransformation } from '@atlaskit/editor-common/process-raw-value';
|
|
26
26
|
import { EditorExperience, ExperienceStore, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
27
27
|
import { analyticsEventKey, getAnalyticsEventSeverity } from '@atlaskit/editor-common/utils/analytics';
|
|
28
28
|
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
29
29
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
30
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
30
31
|
import { createDispatch, EventDispatcher } from '../event-dispatcher';
|
|
31
32
|
import { EditorAPIContext } from '../presets/context';
|
|
32
33
|
import { findChangedNodesFromTransaction } from '../utils/findChangedNodesFromTransaction';
|
|
@@ -210,10 +211,18 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
210
211
|
});
|
|
211
212
|
_this.contentTransformer = contentTransformerProvider ? contentTransformerProvider(schema) : undefined;
|
|
212
213
|
var doc;
|
|
214
|
+
var api = _this.pluginInjectionAPI.api();
|
|
215
|
+
// If we have a doc prop, we need to process it into a PMNode
|
|
216
|
+
|
|
213
217
|
if (options.doc) {
|
|
214
|
-
|
|
218
|
+
// if the collabEdit API is set, skip this validation due to potential pm validation errors
|
|
219
|
+
// from docs that end up with invalid marks after processing (See #hot-111702 for more details)
|
|
220
|
+
if ((api === null || api === void 0 ? void 0 : api.collabEdit) !== undefined && fg('editor_load_conf_collab_docs_without_checks')) {
|
|
221
|
+
doc = processRawValueWithoutTransformation(schema, options.doc);
|
|
222
|
+
} else {
|
|
223
|
+
doc = processRawValue(schema, options.doc, options.props.providerFactory, options.props.editorProps.sanitizePrivateContent, _this.contentTransformer, _this.dispatchAnalyticsEvent);
|
|
224
|
+
}
|
|
215
225
|
}
|
|
216
|
-
var api = _this.pluginInjectionAPI.api();
|
|
217
226
|
var isViewMode = (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.sharedState.currentState().mode) === 'view';
|
|
218
227
|
var selection;
|
|
219
228
|
if (doc) {
|
package/dist/esm/editor.js
CHANGED
|
@@ -29,6 +29,13 @@ var ComposableEditorWrapper = function ComposableEditorWrapper(_ref) {
|
|
|
29
29
|
preset: preset
|
|
30
30
|
}, props));
|
|
31
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated - Please use the `ComposableEditor` component instead.
|
|
34
|
+
* We strongly encourage the use of custom presets, however your easiest migration path is to use the `useUniversalPreset` hook.
|
|
35
|
+
* The `ComposableEditor` component is a more flexible and customizable alternative to the `Editor` component.
|
|
36
|
+
* It allows you to create an editor with a custom set of plugins and configurations.
|
|
37
|
+
* For more information, see the documentation for the `ComposableEditor` component here: https://atlaskit.atlassian.com/packages/editor/editor-core
|
|
38
|
+
*/
|
|
32
39
|
var Editor = /*#__PURE__*/function (_React$Component) {
|
|
33
40
|
_inherits(Editor, _React$Component);
|
|
34
41
|
var _super = _createSuper(Editor);
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import { N60A } from '@atlaskit/theme/colors';
|
|
4
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
5
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
6
4
|
export var dropdown = css({
|
|
7
5
|
display: 'flex',
|
|
8
6
|
flexDirection: 'column',
|
|
9
7
|
background: "var(--ds-surface-overlay, white)",
|
|
10
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
11
|
-
borderRadius: "
|
|
12
|
-
boxShadow: "var(--ds-shadow-overlay,
|
|
9
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
10
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)",
|
|
13
11
|
boxSizing: 'border-box',
|
|
14
12
|
padding: "var(--ds-space-050, 4px)".concat(" 0")
|
|
15
13
|
});
|
|
@@ -18,8 +18,6 @@ import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-me
|
|
|
18
18
|
import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
19
19
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
20
20
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
|
-
import { N100 } from '@atlaskit/theme/colors';
|
|
22
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
23
21
|
import messages from '../../../messages';
|
|
24
22
|
import { ClickAreaBlock } from '../../Addon';
|
|
25
23
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
@@ -38,10 +36,10 @@ var commentEditorStyles = css({
|
|
|
38
36
|
minWidth: '272px',
|
|
39
37
|
height: 'auto',
|
|
40
38
|
backgroundColor: "var(--ds-background-input, white)",
|
|
41
|
-
border: "1px solid ".concat("var(--ds-border-input,
|
|
39
|
+
border: "1px solid ".concat("var(--ds-border-input, #8590A2)"),
|
|
42
40
|
boxSizing: 'border-box',
|
|
43
41
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
44
|
-
borderRadius: "
|
|
42
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
45
43
|
maxWidth: 'inherit',
|
|
46
44
|
wordWrap: 'break-word'
|
|
47
45
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { akEditorSubtleAccent, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { N300, N50 } from '@atlaskit/theme/colors';
|
|
5
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
6
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
7
5
|
export var inputStyle = css({
|
|
8
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
@@ -11,7 +9,7 @@ export var inputStyle = css({
|
|
|
11
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
12
10
|
border: "1px solid ".concat("var(--ds-border-input, ".concat(akEditorSubtleAccent, ")")),
|
|
13
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
14
|
-
borderRadius: "
|
|
12
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
15
13
|
boxSizing: 'border-box',
|
|
16
14
|
height: '40px',
|
|
17
15
|
paddingLeft: "var(--ds-space-250, 20px)",
|
|
@@ -23,10 +21,10 @@ export var inputStyle = css({
|
|
|
23
21
|
fontWeight: 400,
|
|
24
22
|
lineHeight: 1.42857142857143,
|
|
25
23
|
letterSpacing: '-0.005em',
|
|
26
|
-
color: "var(--ds-text-subtlest,
|
|
24
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
27
25
|
'&:hover': {
|
|
28
26
|
backgroundColor: "var(--ds-background-input-hovered, white)",
|
|
29
|
-
borderColor: "var(--ds-border-input,
|
|
27
|
+
borderColor: "var(--ds-border-input, #8590A2)",
|
|
30
28
|
cursor: 'text'
|
|
31
29
|
}
|
|
32
30
|
}
|
|
@@ -5,7 +5,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
5
5
|
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) { _defineProperty(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; }
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
7
|
import { css, keyframes } from '@emotion/react';
|
|
8
|
-
import { N0, N500, R400 } from '@atlaskit/theme/colors';
|
|
9
8
|
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
10
9
|
var rotationAnimation = keyframes({
|
|
11
10
|
'0%': _objectSpread({
|
|
@@ -63,7 +62,7 @@ var prismBorderStyles = function prismBorderStyles(colorMode, hover) {
|
|
|
63
62
|
borderRadius: "calc(".concat("var(--ds-border-radius-100, 3px)", " + 1px)"),
|
|
64
63
|
transform: 'translate3d(0, 0, 0)'
|
|
65
64
|
}, hover ? {
|
|
66
|
-
background: "var(--ds-border-input,
|
|
65
|
+
background: "var(--ds-border-input, #8590A2)"
|
|
67
66
|
} : isFirefox ? {
|
|
68
67
|
background: "linear-gradient(90deg,\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 12%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 24%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 48%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 64%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 80%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 100%\n\t\t\t\t\t\t\t)"),
|
|
69
68
|
backgroundSize: '200%'
|
|
@@ -74,5 +73,5 @@ var prismBorderStyles = function prismBorderStyles(colorMode, hover) {
|
|
|
74
73
|
|
|
75
74
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
|
|
76
75
|
export var aiPanelStyles = function aiPanelStyles(colorMode) {
|
|
77
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t@property --panel-gradient-angle {\n\t\tsyntax: '<angle>';\n\t\tinitial-value: 270deg;\n\t\tinherits: false;\n\t}\n\n\tdiv[extensionType='com.atlassian.ai-blocks'] {\n\t\t// This hides the label for the extension\n\t\t.extension-label {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t// This styles the ai panel correctly when its just sitting on the page and there\n\t\t// is no user interaction\n\t\t.extension-container {\n\t\t\tposition: relative;\n\t\t\tbox-shadow: none;\n\t\t\toverflow: unset;\n\t\t\tbackground-color: ", " !important;\n\t\t\t&::before,\n\t\t\t&::after {\n\t\t\t\t", "\n\t\t\t}\n\t\t\t&.with-hover-border {\n\t\t\t\t&::before,\n\t\t\t\t&::after {\n\t\t\t\t\t", "\n\t\t\t\t}\n\t\t\t}\n\t\t\t& .with-margin-styles {\n\t\t\t\tbackground-color: ", " !important;\n\t\t\t\tborder-radius: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t// This styles the ai panel correctly when its streaming\n\tdiv[extensionType='com.atlassian.ai-blocks']:has(.streaming) {\n\t\t.extension-container {\n\t\t\tbox-shadow: none;\n\t\t\toverflow: unset;\n\t\t\t", "\n\t\t\t&::before,\n\t\t\t&::after {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n\n\t// This styles the ai panel correctly when a user is hovering over the delete button in the floating panel\n\tdiv[extensionType='com.atlassian.ai-blocks'].danger {\n\t\t.extension-container {\n\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t}\n\t}\n\n\t// This removes the margin from the action list when inside an ai panel\n\tdiv[extensiontype='com.atlassian.ai-blocks'][extensionkey='ai-action-items-block:aiActionItemsBodiedExtension'] {\n\t\tdiv[data-node-type='actionList'] {\n\t\t\tmargin: 0 !important;\n\t\t}\n\t}\n"])), "var(--ds-surface,
|
|
76
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t@property --panel-gradient-angle {\n\t\tsyntax: '<angle>';\n\t\tinitial-value: 270deg;\n\t\tinherits: false;\n\t}\n\n\tdiv[extensionType='com.atlassian.ai-blocks'] {\n\t\t// This hides the label for the extension\n\t\t.extension-label {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t// This styles the ai panel correctly when its just sitting on the page and there\n\t\t// is no user interaction\n\t\t.extension-container {\n\t\t\tposition: relative;\n\t\t\tbox-shadow: none;\n\t\t\toverflow: unset;\n\t\t\tbackground-color: ", " !important;\n\t\t\t&::before,\n\t\t\t&::after {\n\t\t\t\t", "\n\t\t\t}\n\t\t\t&.with-hover-border {\n\t\t\t\t&::before,\n\t\t\t\t&::after {\n\t\t\t\t\t", "\n\t\t\t\t}\n\t\t\t}\n\t\t\t& .with-margin-styles {\n\t\t\t\tbackground-color: ", " !important;\n\t\t\t\tborder-radius: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t// This styles the ai panel correctly when its streaming\n\tdiv[extensionType='com.atlassian.ai-blocks']:has(.streaming) {\n\t\t.extension-container {\n\t\t\tbox-shadow: none;\n\t\t\toverflow: unset;\n\t\t\t", "\n\t\t\t&::before,\n\t\t\t&::after {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n\n\t// This styles the ai panel correctly when a user is hovering over the delete button in the floating panel\n\tdiv[extensionType='com.atlassian.ai-blocks'].danger {\n\t\t.extension-container {\n\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t}\n\t}\n\n\t// This removes the margin from the action list when inside an ai panel\n\tdiv[extensiontype='com.atlassian.ai-blocks'][extensionkey='ai-action-items-block:aiActionItemsBodiedExtension'] {\n\t\tdiv[data-node-type='actionList'] {\n\t\t\tmargin: 0 !important;\n\t\t}\n\t}\n"])), "var(--ds-surface, #FFFFFF)", prismBorderStyles(colorMode), prismBorderStyles(colorMode, true), "var(--ds-surface, #FFFFFF)", "var(--ds-border-radius-100, 3px)", prismBorderAnimationStyles, prismBorderStyles(colorMode), "var(--ds-border-danger, #E2483D)");
|
|
78
77
|
};
|
|
@@ -5,7 +5,6 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { CodeBlockSharedCssClassName, codeBlockSharedStyles } from '@atlaskit/editor-common/styles';
|
|
7
7
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
8
|
-
import { R75 } from '@atlaskit/theme/colors';
|
|
9
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
9
|
var GutterDangerOverlay = function GutterDangerOverlay() {
|
|
11
10
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t&::after {\n\t\theight: 100%;\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 24px;\n\t\tbackground-color: ", ";\n\t}\n"])), "var(--ds-blanket-danger, none)");
|
|
@@ -14,5 +13,5 @@ var GutterDangerOverlay = function GutterDangerOverlay() {
|
|
|
14
13
|
/* When code-block is inside the panel */
|
|
15
14
|
var firstCodeBlockWithNoMargin = editorExperiment('nested-dnd', true) ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t.ak-editor-panel__content {\n\t\t\t\t> .code-block:first-child,\n\t\t\t\t> .ProseMirror-widget:first-child + .code-block,\n\t\t\t\t> .ProseMirror-widget:first-child + .ProseMirror-widget + .code-block {\n\t\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t\t}\n\t\t\t}\n\t\t"]))) : css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t\t.ak-editor-panel__content {\n\t\t\t\t> .code-block:first-child {\n\t\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t\t}\n\t\t\t}\n\t\t"])));
|
|
16
15
|
export var codeBlockStyles = function codeBlockStyles() {
|
|
17
|
-
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t}\n\n\t.ProseMirror li {\n\t\t/* if same list item has multiple code blocks we need top margin for all but first */\n\t\t> .code-block {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\t\t> .code-block:first-child,\n\t\t> .ProseMirror-gapcursor:first-child + .code-block {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t> div:last-of-type.code-block {\n\t\t\tmargin-bottom: ", ";\n\t\t}\n\t}\n\n\t.ProseMirror .code-block.", ":not(.danger) {\n\t\t", "\n\t}\n\n\t/* Danger when top level node */\n\t.ProseMirror .danger.code-block {\n\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t", ";\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t/* Danger when nested node */\n\t.ProseMirror .danger .code-block {\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t", "\n"])), codeBlockSharedStyles(), blockNodesVerticalMargin, blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger,
|
|
16
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t}\n\n\t.ProseMirror li {\n\t\t/* if same list item has multiple code blocks we need top margin for all but first */\n\t\t> .code-block {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\t\t> .code-block:first-child,\n\t\t> .ProseMirror-gapcursor:first-child + .code-block {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t> div:last-of-type.code-block {\n\t\t\tmargin-bottom: ", ";\n\t\t}\n\t}\n\n\t.ProseMirror .code-block.", ":not(.danger) {\n\t\t", "\n\t}\n\n\t/* Danger when top level node */\n\t.ProseMirror .danger.code-block {\n\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t", ";\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t/* Danger when nested node */\n\t.ProseMirror .danger .code-block {\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t", "\n"])), codeBlockSharedStyles(), blockNodesVerticalMargin, blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, #FFECEB)", "var(--ds-text-danger, ".concat(akEditorDeleteIconColor, ")"), GutterDangerOverlay(), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, ".concat(akEditorDeleteBackground, ")"), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, rgba(255, 143, 115, 0.5))", "var(--ds-text-danger, ".concat(akEditorDeleteIconColor, ")"), GutterDangerOverlay(), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, rgba(255, 189, 173, 0.5))", firstCodeBlockWithNoMargin);
|
|
18
17
|
};
|