@atlaskit/editor-core 207.16.0 → 207.17.1
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 +28 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +1 -0
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +36 -18
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +3 -3
- package/dist/cjs/ui/EditorContentContainer/styles/statusStyles.js +208 -0
- package/dist/cjs/utils/validateNodes.js +46 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/Chromeless.js +1 -0
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +36 -18
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +9 -2
- package/dist/es2019/ui/EditorContentContainer/styles/statusStyles.js +201 -0
- package/dist/es2019/utils/validateNodes.js +43 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/Chromeless.js +1 -0
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +36 -18
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +3 -3
- package/dist/esm/ui/EditorContentContainer/styles/statusStyles.js +201 -0
- package/dist/esm/utils/validateNodes.js +47 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/EditorContentContainer/styles/statusStyles.d.ts +6 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/statusStyles.d.ts +6 -0
- package/package.json +5 -6
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
4
|
+
export const statusStyles = css({
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
6
|
+
'.pm-table-cell-content-wrap, .pm-table-header-content-wrap, [data-layout-section]': {
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
8
|
+
'.statusView-content-wrap': {
|
|
9
|
+
maxWidth: '100%',
|
|
10
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
11
|
+
lineHeight: 0,
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
13
|
+
'& > span': {
|
|
14
|
+
width: '100%'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
19
|
+
'.statusView-content-wrap': {
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
21
|
+
'& > span': {
|
|
22
|
+
cursor: 'pointer',
|
|
23
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
24
|
+
lineHeight: 0 // Prevent responsive layouts increasing height of container.
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
28
|
+
'.danger': {
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
30
|
+
'.status-lozenge-span > span': {
|
|
31
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
32
|
+
backgroundColor: 'rgba(255, 189, 173, 0.5)' // akEditorDeleteBackgroundWithOpacity
|
|
33
|
+
},
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
35
|
+
'.statusView-content-wrap.ak-editor-selected-node': {
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
37
|
+
'.status-lozenge-span > span': {
|
|
38
|
+
boxShadow: `0 0 0 1px ${"var(--ds-border-danger, #E2483D)"}`
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
45
|
+
export const statusStylesMixin_fg_platform_component_visual_refresh = css({
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
47
|
+
'.statusView-content-wrap': {
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
49
|
+
'&.ak-editor-selected-node .status-lozenge-span > span': {
|
|
50
|
+
boxShadow: `0 0 0 2px ${"var(--ds-border-selected, #0C66E4)"}`
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
56
|
+
export const statusStylesMixin_without_fg_platform_component_visual_refresh = css({
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
58
|
+
'.statusView-content-wrap': {
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
60
|
+
'&.ak-editor-selected-node .status-lozenge-span > span': {
|
|
61
|
+
// getSelectionStyles([SelectionStyle.BoxShadow]);
|
|
62
|
+
boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}`,
|
|
63
|
+
borderColor: 'transparent',
|
|
64
|
+
// hideNativeBrowserTextSelectionStyles
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
66
|
+
'&::selection, & *::selection': {
|
|
67
|
+
backgroundColor: 'transparent'
|
|
68
|
+
},
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
70
|
+
'&::-moz-selection, & *::-moz-selection': {
|
|
71
|
+
backgroundColor: 'transparent'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
78
|
+
export const vanillaStatusStyles = css({
|
|
79
|
+
// baseVanillaStatusStyles
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
81
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] .lozenge-wrapper': {
|
|
82
|
+
backgroundColor: "var(--ds-background-neutral, #091E420F)",
|
|
83
|
+
maxWidth: '100%',
|
|
84
|
+
paddingInline: "var(--ds-space-050, 4px)",
|
|
85
|
+
display: 'inline-flex',
|
|
86
|
+
borderRadius: '3px',
|
|
87
|
+
blockSize: 'min-content',
|
|
88
|
+
position: 'static',
|
|
89
|
+
overflow: 'hidden',
|
|
90
|
+
boxSizing: 'border-box',
|
|
91
|
+
appearance: 'none',
|
|
92
|
+
border: 'none'
|
|
93
|
+
},
|
|
94
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
95
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] .lozenge-text': {
|
|
96
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
97
|
+
fontSize: '11px',
|
|
98
|
+
fontStyle: 'normal',
|
|
99
|
+
fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
100
|
+
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
101
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
102
|
+
lineHeight: '16px',
|
|
103
|
+
overflow: 'hidden',
|
|
104
|
+
textOverflow: 'ellipsis',
|
|
105
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
106
|
+
textTransform: 'uppercase',
|
|
107
|
+
whiteSpace: 'nowrap',
|
|
108
|
+
maxWidth: `calc(200px - ${"var(--ds-space-100, 8px)"})`
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
113
|
+
export const vanillaStatusStylesMixin_fg_platform_component_visual_refresh = css({
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
115
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] .lozenge-text': {
|
|
116
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
117
|
+
color: '#292A2E'
|
|
118
|
+
},
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
120
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=neutral] > .lozenge-wrapper': {
|
|
121
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
122
|
+
backgroundColor: '#DDDEE1'
|
|
123
|
+
},
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
125
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=purple] > .lozenge-wrapper': {
|
|
126
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
127
|
+
backgroundColor: '#D8A0F7'
|
|
128
|
+
},
|
|
129
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
130
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=blue] > .lozenge-wrapper': {
|
|
131
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
132
|
+
backgroundColor: '#8FB8F6'
|
|
133
|
+
},
|
|
134
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
135
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=yellow] > .lozenge-wrapper': {
|
|
136
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
137
|
+
backgroundColor: '#F9C84E'
|
|
138
|
+
},
|
|
139
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
140
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=red] > .lozenge-wrapper': {
|
|
141
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
142
|
+
backgroundColor: '#FD9891'
|
|
143
|
+
},
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
145
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=green] > .lozenge-wrapper': {
|
|
146
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
147
|
+
backgroundColor: '#B3DF72'
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
152
|
+
export const vanillaStatusStylesMixin_without_fg_platform_component_visual_refresh = css({
|
|
153
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
154
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=neutral] .lozenge-wrapper': {
|
|
155
|
+
backgroundColor: "var(--ds-background-neutral, #091E420F)"
|
|
156
|
+
},
|
|
157
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
158
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=neutral] .lozenge-text': {
|
|
159
|
+
color: "var(--ds-text-subtle, #44546F)"
|
|
160
|
+
},
|
|
161
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
162
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=purple] .lozenge-wrapper': {
|
|
163
|
+
backgroundColor: "var(--ds-background-discovery, #F3F0FF)"
|
|
164
|
+
},
|
|
165
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
166
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=purple] .lozenge-text': {
|
|
167
|
+
color: "var(--ds-text-discovery, #5E4DB2)"
|
|
168
|
+
},
|
|
169
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
170
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=blue] .lozenge-wrapper': {
|
|
171
|
+
backgroundColor: "var(--ds-background-information, #E9F2FF)"
|
|
172
|
+
},
|
|
173
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
174
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=blue] .lozenge-text': {
|
|
175
|
+
color: "var(--ds-text-information, #0055CC)"
|
|
176
|
+
},
|
|
177
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
178
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=yellow] .lozenge-wrapper': {
|
|
179
|
+
backgroundColor: "var(--ds-background-warning, #FFF7D6)"
|
|
180
|
+
},
|
|
181
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
182
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=yellow] .lozenge-text': {
|
|
183
|
+
color: "var(--ds-text-warning, #A54800)"
|
|
184
|
+
},
|
|
185
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
186
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=red] .lozenge-wrapper': {
|
|
187
|
+
backgroundColor: "var(--ds-background-danger, #FFECEB)"
|
|
188
|
+
},
|
|
189
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
190
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=red] .lozenge-text': {
|
|
191
|
+
color: "var(--ds-text-danger, #AE2E24)"
|
|
192
|
+
},
|
|
193
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
194
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=green] .lozenge-wrapper': {
|
|
195
|
+
backgroundColor: "var(--ds-background-success, #DCFFF1)"
|
|
196
|
+
},
|
|
197
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
198
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=green] .lozenge-text': {
|
|
199
|
+
color: "var(--ds-text-success, #216E4E)"
|
|
200
|
+
}
|
|
201
|
+
});
|
|
@@ -1,6 +1,48 @@
|
|
|
1
|
+
import { Mark } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
|
+
|
|
4
|
+
// We don't want to use memoize from lodash, because we need to use WeakMap or WeakSet
|
|
5
|
+
// to avoid memory leaks, but lodash allow to change the cache type only globally
|
|
6
|
+
// like `memoize.Cache = WeakMap`, and we don't want to do that.
|
|
7
|
+
// So we use our own cache implementation.
|
|
8
|
+
const cache = new WeakSet();
|
|
9
|
+
|
|
10
|
+
// See https://github.com/ProseMirror/prosemirror-model/blob/20d26c9843d6a69a1d417d937c401537ee0b2342/src/node.ts#L303
|
|
11
|
+
function checkNode(node) {
|
|
12
|
+
if (cache.has(node)) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// @ts-expect-error - This is internal ProseMirror API, but we okay with it
|
|
17
|
+
node.type.checkContent(node.content);
|
|
18
|
+
// @ts-expect-error - This is internal ProseMirror API, but we okay with it
|
|
19
|
+
node.type.checkAttrs(node.attrs);
|
|
20
|
+
let copy = Mark.none;
|
|
21
|
+
for (let i = 0; i < node.marks.length; i++) {
|
|
22
|
+
const mark = node.marks[i];
|
|
23
|
+
// @ts-expect-error - This is internal ProseMirror API, but we okay with it
|
|
24
|
+
mark.type.checkAttrs(mark.attrs);
|
|
25
|
+
copy = mark.addToSet(copy);
|
|
26
|
+
}
|
|
27
|
+
if (!Mark.sameSet(copy, node.marks)) {
|
|
28
|
+
throw new RangeError(`Invalid collection of marks for node ${node.type.name}: ${node.marks.map(m => m.type.name)}`);
|
|
29
|
+
}
|
|
30
|
+
node.content.forEach(node => checkNode(node));
|
|
31
|
+
|
|
32
|
+
// The set value should be added in the end of the function,
|
|
33
|
+
// because any previous check can throw an error,
|
|
34
|
+
// and we don't want to add invalid node to the cache.
|
|
35
|
+
cache.add(node);
|
|
36
|
+
}
|
|
1
37
|
export const validNode = node => {
|
|
2
38
|
try {
|
|
3
|
-
|
|
39
|
+
if (editorExperiment('platform_editor_memoized_node_check', true, {
|
|
40
|
+
exposure: true
|
|
41
|
+
})) {
|
|
42
|
+
checkNode(node);
|
|
43
|
+
} else {
|
|
44
|
+
node.check();
|
|
45
|
+
}
|
|
4
46
|
} catch (error) {
|
|
5
47
|
return false;
|
|
6
48
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "207.
|
|
2
|
+
export const version = "207.17.1";
|
|
@@ -164,6 +164,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
164
164
|
minHeight: "".concat(minHeight, "px")
|
|
165
165
|
})],
|
|
166
166
|
"data-testid": "chromeless-editor",
|
|
167
|
+
id: "chromeless-editor",
|
|
167
168
|
ref: function ref(_ref2) {
|
|
168
169
|
return _this.containerElement = _ref2;
|
|
169
170
|
}
|
|
@@ -128,7 +128,7 @@ export var editorContentAreaStyle = function editorContentAreaStyle(_ref) {
|
|
|
128
128
|
var layoutMaxWidth = _ref.layoutMaxWidth,
|
|
129
129
|
fullWidthMode = _ref.fullWidthMode,
|
|
130
130
|
isEditorToolbarHidden = _ref.isEditorToolbarHidden;
|
|
131
|
-
return [editorContentArea, !fullWidthMode && editorContentAreaWithLayoutWith(layoutMaxWidth), editorContentAreaContainerStyle()].concat(_toConsumableArray(fg('platform_editor_controls_no_toolbar_space') ? [] : [editorExperiment('platform_editor_controls', 'variant1') &&
|
|
131
|
+
return [editorContentArea, fg('platform_editor_fix_table_width_inline_comment') ? fullWidthNonChromelessBreakoutBlockTableStyle : fullWidthModeBreakoutBlockTableStyle, !fullWidthMode && editorContentAreaWithLayoutWith(layoutMaxWidth), editorContentAreaContainerStyle()].concat(_toConsumableArray(fg('platform_editor_controls_no_toolbar_space') ? [] : [editorExperiment('platform_editor_controls', 'variant1') &&
|
|
132
132
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
133
133
|
contentAreaReducedHeaderSpace, isEditorToolbarHidden && editorExperiment('platform_editor_controls', 'variant1') &&
|
|
134
134
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -141,6 +141,40 @@ var editorContentAreaWithLayoutWith = function editorContentAreaWithLayoutWith(l
|
|
|
141
141
|
maxWidth: "".concat(layoutMaxWidth + getTotalPadding(), "px")
|
|
142
142
|
});
|
|
143
143
|
};
|
|
144
|
+
var fullWidthModeBreakoutBlockTableStyle = css({
|
|
145
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
146
|
+
'.fabric-editor--full-width-mode': {
|
|
147
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
148
|
+
'.fabric-editor-breakout-mark, .extension-container.block, .pm-table-container': {
|
|
149
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
150
|
+
width: '100% !important'
|
|
151
|
+
},
|
|
152
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
153
|
+
'.fabric-editor-breakout-mark': {
|
|
154
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
155
|
+
marginLeft: 'unset !important',
|
|
156
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
157
|
+
transform: 'none !important'
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
var fullWidthNonChromelessBreakoutBlockTableStyle = css({
|
|
162
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
163
|
+
'.fabric-editor--full-width-mode:not(:has(#chromeless-editor))': {
|
|
164
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
165
|
+
'.fabric-editor-breakout-mark, .extension-container.block, .pm-table-container': {
|
|
166
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
167
|
+
width: '100% !important'
|
|
168
|
+
},
|
|
169
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
170
|
+
'.fabric-editor-breakout-mark': {
|
|
171
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
172
|
+
marginLeft: 'unset !important',
|
|
173
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
174
|
+
transform: 'none !important'
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
});
|
|
144
178
|
var editorContentArea = css({
|
|
145
179
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
146
180
|
lineHeight: '24px',
|
|
@@ -176,23 +210,7 @@ var editorContentArea = css({
|
|
|
176
210
|
})
|
|
177
211
|
},
|
|
178
212
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
179
|
-
tableFullPageEditorStyles
|
|
180
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
181
|
-
'.fabric-editor--full-width-mode': {
|
|
182
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
183
|
-
'.fabric-editor-breakout-mark, .extension-container.block, .pm-table-container': {
|
|
184
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
185
|
-
width: '100% !important'
|
|
186
|
-
},
|
|
187
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
188
|
-
'.fabric-editor-breakout-mark': {
|
|
189
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
190
|
-
marginLeft: 'unset !important',
|
|
191
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
192
|
-
transform: 'none !important'
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
});
|
|
213
|
+
tableFullPageEditorStyles);
|
|
196
214
|
|
|
197
215
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
198
216
|
export var editorContentGutterStyle = function editorContentGutterStyle() {
|
|
@@ -21,7 +21,6 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
|
21
21
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
22
22
|
import { extensionStyles } from '../ContentStyles/extension';
|
|
23
23
|
import { panelStyles } from '../ContentStyles/panel';
|
|
24
|
-
import { statusStyles, vanillaStatusStyles } from '../ContentStyles/status';
|
|
25
24
|
import { aiPanelBaseFirefoxStyles, aiPanelBaseStyles, aiPanelDarkFirefoxStyles, aiPanelDarkStyles } from './styles/aiPanel';
|
|
26
25
|
import { annotationStyles } from './styles/annotationStyles';
|
|
27
26
|
import { backgroundColorStyles } from './styles/backgroundColorStyles';
|
|
@@ -50,6 +49,7 @@ import { resizerStyles, pragmaticResizerStyles } from './styles/resizerStyles';
|
|
|
50
49
|
import { ruleStyles } from './styles/rule';
|
|
51
50
|
import { shadowStyles } from './styles/shadowStyles';
|
|
52
51
|
import { linkingVisualRefreshV1Styles, smartCardStyles, smartLinksInLivePagesStyles, smartLinksInLivePagesStylesOld } from './styles/smartCardStyles';
|
|
52
|
+
import { statusStyles, statusStylesMixin_fg_platform_component_visual_refresh, statusStylesMixin_without_fg_platform_component_visual_refresh, vanillaStatusStyles, vanillaStatusStylesMixin_fg_platform_component_visual_refresh, vanillaStatusStylesMixin_without_fg_platform_component_visual_refresh } from './styles/statusStyles';
|
|
53
53
|
import { decisionStyles, tasksAndDecisionsStyles, vanillaDecisionIconWithoutVisualRefresh, vanillaDecisionIconWithVisualRefresh, vanillaDecisionStyles, vanillaTaskItemStyles } from './styles/tasksAndDecisionsStyles';
|
|
54
54
|
import { telepointerColorAndCommonStyle, telepointerStyle, telepointerStyleWithInitialOnly } from './styles/telepointerStyles';
|
|
55
55
|
import { textColorStyles } from './styles/textColorStyles';
|
|
@@ -97,7 +97,7 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
97
97
|
|
|
98
98
|
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
99
99
|
var contentStyles = function contentStyles() {
|
|
100
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\t}\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\t", "\n \t", "\n\n\n \t", "\n\n\t", "\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n /* This needs to be after telepointer styles as some overlapping rules have equal specificity, and so the order is significant */\n ", "\n\n ", ";\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n\t.panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n\t is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), akEditorGutterPadding, akEditorGutterPaddingDynamic(), akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, whitespaceStyles, indentationStyles, shadowStyles, InlineNodeViewSharedStyles, fg('platform_editor_hide_cursor_when_pm_hideselection') ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, editorExperiment('platform_editor_advanced_code_blocks', true) ? css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, codeBlockStyles, !fg('platform_editor_typography_ugc') && editorUGCTokensDefault,
|
|
100
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\t}\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\t", "\n \t", "\n\n\n \t", "\n\n\t", "\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n /* This needs to be after telepointer styles as some overlapping rules have equal specificity, and so the order is significant */\n ", "\n\n ", ";\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n\t.panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n\t is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), akEditorGutterPadding, akEditorGutterPaddingDynamic(), akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, whitespaceStyles, indentationStyles, shadowStyles, InlineNodeViewSharedStyles, fg('platform_editor_hide_cursor_when_pm_hideselection') ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, editorExperiment('platform_editor_advanced_code_blocks', true) ? css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, codeBlockStyles, !fg('platform_editor_typography_ugc') && editorUGCTokensDefault,
|
|
101
101
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
102
102
|
fg('platform_editor_typography_ugc') && ( /* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
103
103
|
fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed')) && editorUGCTokensRefreshed
|
|
@@ -113,7 +113,7 @@ var contentStyles = function contentStyles() {
|
|
|
113
113
|
exposure: false
|
|
114
114
|
}) && fg('platform-visual-refresh-icons') && vanillaDecisionIconWithVisualRefresh, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
115
115
|
exposure: false
|
|
116
|
-
}) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh, statusStyles, editorExperiment('platform_editor_vanilla_dom', true)
|
|
116
|
+
}) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh, statusStyles, fg('platform-component-visual-refresh') && statusStylesMixin_fg_platform_component_visual_refresh, !fg('platform-component-visual-refresh') && statusStylesMixin_without_fg_platform_component_visual_refresh, editorExperiment('platform_editor_vanilla_dom', true) && vanillaStatusStyles, editorExperiment('platform_editor_vanilla_dom', true) && fg('platform-component-visual-refresh') && vanillaStatusStylesMixin_fg_platform_component_visual_refresh, editorExperiment('platform_editor_vanilla_dom', true) && !fg('platform-component-visual-refresh') && vanillaStatusStylesMixin_without_fg_platform_component_visual_refresh, annotationStyles, smartCardStyles, embedCardStyles, unsupportedStyles, resizerStyles, !fg('platform-visual-refresh-icons') ? css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
|
|
117
117
|
};
|
|
118
118
|
var CommentEditorMargin = 14;
|
|
119
119
|
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
4
|
+
export var statusStyles = css({
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
6
|
+
'.pm-table-cell-content-wrap, .pm-table-header-content-wrap, [data-layout-section]': {
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
8
|
+
'.statusView-content-wrap': {
|
|
9
|
+
maxWidth: '100%',
|
|
10
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
11
|
+
lineHeight: 0,
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
13
|
+
'& > span': {
|
|
14
|
+
width: '100%'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
19
|
+
'.statusView-content-wrap': {
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
21
|
+
'& > span': {
|
|
22
|
+
cursor: 'pointer',
|
|
23
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
24
|
+
lineHeight: 0 // Prevent responsive layouts increasing height of container.
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
28
|
+
'.danger': {
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
30
|
+
'.status-lozenge-span > span': {
|
|
31
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
32
|
+
backgroundColor: 'rgba(255, 189, 173, 0.5)' // akEditorDeleteBackgroundWithOpacity
|
|
33
|
+
},
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
35
|
+
'.statusView-content-wrap.ak-editor-selected-node': {
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
37
|
+
'.status-lozenge-span > span': {
|
|
38
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-danger, #E2483D)")
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
45
|
+
export var statusStylesMixin_fg_platform_component_visual_refresh = css({
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
47
|
+
'.statusView-content-wrap': {
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
49
|
+
'&.ak-editor-selected-node .status-lozenge-span > span': {
|
|
50
|
+
boxShadow: "0 0 0 2px ".concat("var(--ds-border-selected, #0C66E4)")
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
56
|
+
export var statusStylesMixin_without_fg_platform_component_visual_refresh = css({
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
58
|
+
'.statusView-content-wrap': {
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
60
|
+
'&.ak-editor-selected-node .status-lozenge-span > span': {
|
|
61
|
+
// getSelectionStyles([SelectionStyle.BoxShadow]);
|
|
62
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)"),
|
|
63
|
+
borderColor: 'transparent',
|
|
64
|
+
// hideNativeBrowserTextSelectionStyles
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
66
|
+
'&::selection, & *::selection': {
|
|
67
|
+
backgroundColor: 'transparent'
|
|
68
|
+
},
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
70
|
+
'&::-moz-selection, & *::-moz-selection': {
|
|
71
|
+
backgroundColor: 'transparent'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
78
|
+
export var vanillaStatusStyles = css({
|
|
79
|
+
// baseVanillaStatusStyles
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
81
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] .lozenge-wrapper': {
|
|
82
|
+
backgroundColor: "var(--ds-background-neutral, #091E420F)",
|
|
83
|
+
maxWidth: '100%',
|
|
84
|
+
paddingInline: "var(--ds-space-050, 4px)",
|
|
85
|
+
display: 'inline-flex',
|
|
86
|
+
borderRadius: '3px',
|
|
87
|
+
blockSize: 'min-content',
|
|
88
|
+
position: 'static',
|
|
89
|
+
overflow: 'hidden',
|
|
90
|
+
boxSizing: 'border-box',
|
|
91
|
+
appearance: 'none',
|
|
92
|
+
border: 'none'
|
|
93
|
+
},
|
|
94
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
95
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] .lozenge-text': {
|
|
96
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
97
|
+
fontSize: '11px',
|
|
98
|
+
fontStyle: 'normal',
|
|
99
|
+
fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
100
|
+
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
101
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
102
|
+
lineHeight: '16px',
|
|
103
|
+
overflow: 'hidden',
|
|
104
|
+
textOverflow: 'ellipsis',
|
|
105
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
106
|
+
textTransform: 'uppercase',
|
|
107
|
+
whiteSpace: 'nowrap',
|
|
108
|
+
maxWidth: "calc(200px - ".concat("var(--ds-space-100, 8px)", ")")
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
113
|
+
export var vanillaStatusStylesMixin_fg_platform_component_visual_refresh = css({
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
115
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] .lozenge-text': {
|
|
116
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
117
|
+
color: '#292A2E'
|
|
118
|
+
},
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
120
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=neutral] > .lozenge-wrapper': {
|
|
121
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
122
|
+
backgroundColor: '#DDDEE1'
|
|
123
|
+
},
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
125
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=purple] > .lozenge-wrapper': {
|
|
126
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
127
|
+
backgroundColor: '#D8A0F7'
|
|
128
|
+
},
|
|
129
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
130
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=blue] > .lozenge-wrapper': {
|
|
131
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
132
|
+
backgroundColor: '#8FB8F6'
|
|
133
|
+
},
|
|
134
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
135
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=yellow] > .lozenge-wrapper': {
|
|
136
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
137
|
+
backgroundColor: '#F9C84E'
|
|
138
|
+
},
|
|
139
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
140
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=red] > .lozenge-wrapper': {
|
|
141
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
142
|
+
backgroundColor: '#FD9891'
|
|
143
|
+
},
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
145
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=green] > .lozenge-wrapper': {
|
|
146
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
147
|
+
backgroundColor: '#B3DF72'
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
152
|
+
export var vanillaStatusStylesMixin_without_fg_platform_component_visual_refresh = css({
|
|
153
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
154
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=neutral] .lozenge-wrapper': {
|
|
155
|
+
backgroundColor: "var(--ds-background-neutral, #091E420F)"
|
|
156
|
+
},
|
|
157
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
158
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=neutral] .lozenge-text': {
|
|
159
|
+
color: "var(--ds-text-subtle, #44546F)"
|
|
160
|
+
},
|
|
161
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
162
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=purple] .lozenge-wrapper': {
|
|
163
|
+
backgroundColor: "var(--ds-background-discovery, #F3F0FF)"
|
|
164
|
+
},
|
|
165
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
166
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=purple] .lozenge-text': {
|
|
167
|
+
color: "var(--ds-text-discovery, #5E4DB2)"
|
|
168
|
+
},
|
|
169
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
170
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=blue] .lozenge-wrapper': {
|
|
171
|
+
backgroundColor: "var(--ds-background-information, #E9F2FF)"
|
|
172
|
+
},
|
|
173
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
174
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=blue] .lozenge-text': {
|
|
175
|
+
color: "var(--ds-text-information, #0055CC)"
|
|
176
|
+
},
|
|
177
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
178
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=yellow] .lozenge-wrapper': {
|
|
179
|
+
backgroundColor: "var(--ds-background-warning, #FFF7D6)"
|
|
180
|
+
},
|
|
181
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
182
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=yellow] .lozenge-text': {
|
|
183
|
+
color: "var(--ds-text-warning, #A54800)"
|
|
184
|
+
},
|
|
185
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
186
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=red] .lozenge-wrapper': {
|
|
187
|
+
backgroundColor: "var(--ds-background-danger, #FFECEB)"
|
|
188
|
+
},
|
|
189
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
190
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=red] .lozenge-text': {
|
|
191
|
+
color: "var(--ds-text-danger, #AE2E24)"
|
|
192
|
+
},
|
|
193
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
194
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=green] .lozenge-wrapper': {
|
|
195
|
+
backgroundColor: "var(--ds-background-success, #DCFFF1)"
|
|
196
|
+
},
|
|
197
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
198
|
+
'[data-prosemirror-node-view-type="vanilla"][data-prosemirror-node-name="status"] > [data-color=green] .lozenge-text': {
|
|
199
|
+
color: "var(--ds-text-success, #216E4E)"
|
|
200
|
+
}
|
|
201
|
+
});
|