@atlaskit/editor-core 207.8.0 → 207.10.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 +70 -0
- package/dist/cjs/composable-editor/core-editor.js +1 -2
- package/dist/cjs/create-editor/ReactEditorView.js +11 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +4 -65
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +1 -4
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +14 -2
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +29 -12
- package/dist/cjs/ui/EditorContentContainer/styles/aiPanel.js +203 -0
- package/dist/cjs/ui/EditorContentContainer/styles/blockMarksStyles.js +30 -0
- package/dist/cjs/ui/EditorContentContainer/styles/dateStyles.js +51 -0
- package/dist/cjs/ui/EditorContentContainer/styles/gridStyles.js +42 -0
- package/dist/cjs/ui/EditorContentContainer/styles/indentationStyles.js +45 -0
- package/dist/cjs/ui/EditorContentContainer/styles/list.js +49 -0
- package/dist/cjs/ui/EditorContentContainer/styles/selectionStyles.js +1 -1
- package/dist/cjs/ui/EditorContentContainer/styles/shadowStyles.js +52 -0
- package/dist/cjs/ui/EditorContentContainer/styles/textColorStyles.js +20 -0
- package/dist/cjs/ui/EditorContentContainer/styles/unsupportedStyles.js +35 -0
- package/dist/cjs/ui/EditorContentContainer/styles/whitespaceStyles.js +14 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/core-editor.js +1 -2
- package/dist/es2019/create-editor/ReactEditorView.js +11 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +5 -66
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +1 -4
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +15 -3
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +29 -33
- package/dist/es2019/ui/EditorContentContainer/styles/aiPanel.js +199 -0
- package/dist/es2019/ui/EditorContentContainer/styles/blockMarksStyles.js +23 -0
- package/dist/es2019/ui/EditorContentContainer/styles/dateStyles.js +69 -0
- package/dist/es2019/ui/EditorContentContainer/styles/gridStyles.js +35 -0
- package/dist/es2019/ui/EditorContentContainer/styles/indentationStyles.js +38 -0
- package/dist/es2019/ui/EditorContentContainer/styles/list.js +45 -0
- package/dist/es2019/ui/EditorContentContainer/styles/selectionStyles.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/styles/shadowStyles.js +56 -0
- package/dist/es2019/ui/EditorContentContainer/styles/textColorStyles.js +13 -0
- package/dist/es2019/ui/EditorContentContainer/styles/unsupportedStyles.js +39 -0
- package/dist/es2019/ui/EditorContentContainer/styles/whitespaceStyles.js +7 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/core-editor.js +1 -2
- package/dist/esm/create-editor/ReactEditorView.js +11 -0
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +5 -66
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +1 -4
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +15 -3
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +30 -13
- package/dist/esm/ui/EditorContentContainer/styles/aiPanel.js +195 -0
- package/dist/esm/ui/EditorContentContainer/styles/blockMarksStyles.js +23 -0
- package/dist/esm/ui/EditorContentContainer/styles/dateStyles.js +43 -0
- package/dist/esm/ui/EditorContentContainer/styles/gridStyles.js +35 -0
- package/dist/esm/ui/EditorContentContainer/styles/indentationStyles.js +38 -0
- package/dist/esm/ui/EditorContentContainer/styles/list.js +41 -0
- package/dist/esm/ui/EditorContentContainer/styles/selectionStyles.js +1 -1
- package/dist/esm/ui/EditorContentContainer/styles/shadowStyles.js +44 -0
- package/dist/esm/ui/EditorContentContainer/styles/textColorStyles.js +13 -0
- package/dist/esm/ui/EditorContentContainer/styles/unsupportedStyles.js +27 -0
- package/dist/esm/ui/EditorContentContainer/styles/whitespaceStyles.js +7 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +2 -5
- package/dist/types/presets/universal.d.ts +2 -5
- package/dist/types/presets/useUniversalPreset.d.ts +2 -5
- package/dist/types/ui/EditorContentContainer/EditorContentContainer.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/aiPanel.d.ts +4 -0
- package/dist/types/ui/EditorContentContainer/styles/blockMarksStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/dateStyles.d.ts +6 -0
- package/dist/types/ui/EditorContentContainer/styles/gridStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/indentationStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/list.d.ts +2 -0
- package/dist/types/ui/EditorContentContainer/styles/shadowStyles.d.ts +10 -0
- package/dist/types/ui/EditorContentContainer/styles/textColorStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/unsupportedStyles.d.ts +5 -0
- package/dist/types/ui/EditorContentContainer/styles/whitespaceStyles.d.ts +1 -0
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +2 -5
- package/dist/types-ts4.5/presets/universal.d.ts +2 -5
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +2 -5
- package/dist/types-ts4.5/ui/EditorContentContainer/EditorContentContainer.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/aiPanel.d.ts +4 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/blockMarksStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/dateStyles.d.ts +6 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/gridStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/indentationStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/list.d.ts +2 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/shadowStyles.d.ts +10 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/textColorStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/unsupportedStyles.d.ts +5 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/whitespaceStyles.d.ts +1 -0
- package/package.json +13 -9
- package/dist/cjs/ui/EditorContentContainer/styles/ai-panel.js +0 -97
- package/dist/es2019/ui/EditorContentContainer/styles/ai-panel.js +0 -213
- package/dist/esm/ui/EditorContentContainer/styles/ai-panel.js +0 -91
- package/dist/types/ui/EditorContentContainer/styles/ai-panel.d.ts +0 -2
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/ai-panel.d.ts +0 -2
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.aiPanelDarkStyles = exports.aiPanelDarkFirefoxStyles = exports.aiPanelBaseStyles = exports.aiPanelBaseFirefoxStyles = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* aiPanelStyles
|
|
14
|
+
* was imported from packages/editor/editor-core/src/ui/ContentStyles/ai-panels.ts
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
var rotationAnimation = (0, _react.keyframes)({
|
|
18
|
+
'0%': {
|
|
19
|
+
'--panel-gradient-angle': '0deg'
|
|
20
|
+
},
|
|
21
|
+
'100%': {
|
|
22
|
+
'--panel-gradient-angle': '360deg'
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
var rotationAnimationFirefox = (0, _react.keyframes)({
|
|
26
|
+
'0%': {
|
|
27
|
+
'--panel-gradient-angle': '0deg',
|
|
28
|
+
backgroundPosition: '100%'
|
|
29
|
+
},
|
|
30
|
+
'100%': {
|
|
31
|
+
'--panel-gradient-angle': '360deg',
|
|
32
|
+
backgroundPosition: '-100%'
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
var aiPrismColor = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, 'prism.border.step.1', {
|
|
36
|
+
light: '#0065FF',
|
|
37
|
+
dark: '#0065FF80'
|
|
38
|
+
}), 'prism.border.step.2', {
|
|
39
|
+
light: '#0469FF',
|
|
40
|
+
dark: '#0469FF80'
|
|
41
|
+
}), 'prism.border.step.3', {
|
|
42
|
+
light: '#BF63F3',
|
|
43
|
+
dark: '#BF63F380'
|
|
44
|
+
}), 'prism.border.step.4', {
|
|
45
|
+
light: '#FFA900',
|
|
46
|
+
dark: '#FFA90080'
|
|
47
|
+
});
|
|
48
|
+
var aiPrismColorStep1Light = aiPrismColor['prism.border.step.1']['light'];
|
|
49
|
+
var aiPrismColorStep2Light = aiPrismColor['prism.border.step.2']['light'];
|
|
50
|
+
var aiPrismColorStep3Light = aiPrismColor['prism.border.step.3']['light'];
|
|
51
|
+
var aiPrismColorStep4Light = aiPrismColor['prism.border.step.4']['light'];
|
|
52
|
+
var aiPrismColorStep1Dark = aiPrismColor['prism.border.step.1']['dark'];
|
|
53
|
+
var aiPrismColorStep2Dark = aiPrismColor['prism.border.step.2']['dark'];
|
|
54
|
+
var aiPrismColorStep3Dark = aiPrismColor['prism.border.step.3']['dark'];
|
|
55
|
+
var aiPrismColorStep4Dark = aiPrismColor['prism.border.step.4']['dark'];
|
|
56
|
+
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
58
|
+
var prismBorderBaseBackgroundFirefox = "linear-gradient(90deg, ".concat(aiPrismColorStep1Light, " 0%, ").concat(aiPrismColorStep2Light, " 12%, ").concat(aiPrismColorStep3Light, " 24%, ").concat(aiPrismColorStep4Light, " 48%, ").concat(aiPrismColorStep3Light, " 64%, ").concat(aiPrismColorStep2Light, " 80%, ").concat(aiPrismColorStep1Light, " 100%)");
|
|
59
|
+
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
61
|
+
var prismBorderBaseBackground = "conic-gradient(from var(--panel-gradient-angle, 270deg), ".concat(aiPrismColorStep1Light, " 0%, ").concat(aiPrismColorStep2Light, " 20%, ").concat(aiPrismColorStep3Light, " 50%, ").concat(aiPrismColorStep4Light, " 56%, ").concat(aiPrismColorStep1Light, " 100%)");
|
|
62
|
+
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
64
|
+
var prismBorderDarkBackgroundFirefox = "linear-gradient(90deg, ".concat(aiPrismColorStep1Dark, " 0%, ").concat(aiPrismColorStep2Dark, " 12%, ").concat(aiPrismColorStep3Dark, " 24%, ").concat(aiPrismColorStep4Dark, " 48%, ").concat(aiPrismColorStep3Dark, " 64%, ").concat(aiPrismColorStep2Dark, " 80%, ").concat(aiPrismColorStep1Dark, " 100%)");
|
|
65
|
+
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
67
|
+
var prismBorderDarkBackground = "conic-gradient(from var(--panel-gradient-angle, 270deg), ".concat(aiPrismColorStep1Dark, " 0%, ").concat(aiPrismColorStep2Dark, " 20%, ").concat(aiPrismColorStep3Dark, " 50%, ").concat(aiPrismColorStep4Dark, " 56%, ").concat(aiPrismColorStep1Dark, " 100%)");
|
|
68
|
+
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
70
|
+
var aiPanelBaseStyles = exports.aiPanelBaseStyles = (0, _react.css)({
|
|
71
|
+
'@property --panel-gradient-angle': {
|
|
72
|
+
syntax: '<angle>',
|
|
73
|
+
initialValue: '270deg',
|
|
74
|
+
inherits: false
|
|
75
|
+
},
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
77
|
+
'div[extensionType="com.atlassian.ai-blocks"]': {
|
|
78
|
+
/* This hides the label for the extension */
|
|
79
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
80
|
+
'.extension-label': {
|
|
81
|
+
display: 'none'
|
|
82
|
+
},
|
|
83
|
+
/* This styles the ai panel correctly when its just sitting on the page and there
|
|
84
|
+
is no user interaction */
|
|
85
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
86
|
+
'.extension-container': {
|
|
87
|
+
position: 'relative',
|
|
88
|
+
boxShadow: 'none',
|
|
89
|
+
overflow: 'unset',
|
|
90
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
91
|
+
backgroundColor: "var(--ds-surface, #FFFFFF)".concat(" !important"),
|
|
92
|
+
// prismBorderBaseStyles
|
|
93
|
+
'&::before, &::after': {
|
|
94
|
+
content: "''",
|
|
95
|
+
position: 'absolute',
|
|
96
|
+
zIndex: -1,
|
|
97
|
+
width: "calc(100% + 2px)",
|
|
98
|
+
height: "calc(100% + 2px)",
|
|
99
|
+
top: "-1px",
|
|
100
|
+
left: "-1px",
|
|
101
|
+
borderRadius: "calc(".concat("var(--ds-border-radius-100, 3px)", " + 1px)"),
|
|
102
|
+
transform: 'translate3d(0, 0, 0)',
|
|
103
|
+
background: prismBorderBaseBackground
|
|
104
|
+
},
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
106
|
+
'&.with-hover-border': {
|
|
107
|
+
'&::before, &::after': {
|
|
108
|
+
//prismBorderHoverStyles
|
|
109
|
+
background: "var(--ds-border-input, #8590A2)"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
113
|
+
'& .with-margin-styles': {
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
115
|
+
backgroundColor: "var(--ds-surface, #FFFFFF)".concat(" !important"),
|
|
116
|
+
borderRadius: "var(--ds-border-radius-100, 3px)"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
/* This styles the ai panel correctly when its streaming */
|
|
121
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
122
|
+
'div[extensionType="com.atlassian.ai-blocks"]:has(.streaming)': {
|
|
123
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
124
|
+
'.extension-container': {
|
|
125
|
+
'&::before, &::after': {
|
|
126
|
+
// prismBorderAnimationStyles
|
|
127
|
+
animationName: rotationAnimation,
|
|
128
|
+
animationDuration: '2s',
|
|
129
|
+
animationTimingFunction: 'linear',
|
|
130
|
+
animationIterationCount: 'infinite',
|
|
131
|
+
'@media (prefers-reduced-motion)': {
|
|
132
|
+
animation: 'none'
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
/* This styles the ai panel correctly when a user is hovering over the delete button in the floating panel */
|
|
138
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
139
|
+
'div[extensionType="com.atlassian.ai-blocks"].danger': {
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
141
|
+
'.extension-container': {
|
|
142
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-danger, #E2483D)")
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
/* This removes the margin from the action list when inside an ai panel */
|
|
146
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
147
|
+
'div[extensiontype="com.atlassian.ai-blocks"][extensionkey="ai-action-items-block:aiActionItemsBodiedExtension"]': {
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
149
|
+
'div[data-node-type="actionList"]': {
|
|
150
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
151
|
+
margin: '0 !important'
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
157
|
+
var aiPanelBaseFirefoxStyles = exports.aiPanelBaseFirefoxStyles = (0, _react.css)({
|
|
158
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
159
|
+
'div[extensionType="com.atlassian.ai-blocks"]': {
|
|
160
|
+
'&::before, &::after': {
|
|
161
|
+
background: prismBorderBaseBackgroundFirefox,
|
|
162
|
+
backgroundSize: '200%'
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
166
|
+
'div[extensionType="com.atlassian.ai-blocks"]:has(.streaming)': {
|
|
167
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
168
|
+
'.extension-container': {
|
|
169
|
+
'&::before, &::after': {
|
|
170
|
+
animationName: rotationAnimationFirefox,
|
|
171
|
+
animationDirection: 'normal',
|
|
172
|
+
animationDuration: '1s'
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
179
|
+
var aiPanelDarkStyles = exports.aiPanelDarkStyles = (0, _react.css)({
|
|
180
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
181
|
+
'div[extensionType="com.atlassian.ai-blocks"]': {
|
|
182
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
183
|
+
'.extension-container': {
|
|
184
|
+
'&::before, &::after': {
|
|
185
|
+
background: prismBorderDarkBackground
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
192
|
+
var aiPanelDarkFirefoxStyles = exports.aiPanelDarkFirefoxStyles = (0, _react.css)({
|
|
193
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
194
|
+
'div[extensionType="com.atlassian.ai-blocks"]': {
|
|
195
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
196
|
+
'.extension-container': {
|
|
197
|
+
'&::before, &::after': {
|
|
198
|
+
background: prismBorderDarkBackgroundFirefox,
|
|
199
|
+
backgroundSize: '200%'
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.blockMarksStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
// eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
|
+
var blockMarksStyles = exports.blockMarksStyles = (0, _react.css)({
|
|
12
|
+
// We need to remove margin-top from first item
|
|
13
|
+
// inside doc, tableCell, tableHeader, blockquote, etc.
|
|
14
|
+
//
|
|
15
|
+
// - For nested block marks apart from those with indentation mark.
|
|
16
|
+
// - Do not remove the margin top for nodes inside indentation marks.
|
|
17
|
+
// - Do not remove the margin top for nodes inside alignment marks.
|
|
18
|
+
//- If first element inside a block node has alignment mark, then remove the margin-top.
|
|
19
|
+
//- If first document element has indentation mark remove margin-top.
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
21
|
+
'*:not(.fabric-editor-block-mark) >, *:not(.fabric-editor-block-mark) > div.fabric-editor-block-mark:first-of-type:not(.fabric-editor-indentation-mark):not(.fabric-editor-alignment), .fabric-editor-alignment:first-of-type:first-child, .ProseMirror .fabric-editor-indentation-mark:first-of-type:first-child': {
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
23
|
+
'p, h1, h2, h3, h4, h5, h6, .heading-wrapper': {
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
25
|
+
'&:first-child:not(style), style:first-child + *': {
|
|
26
|
+
marginTop: 0
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.dateVanillaStyles = exports.dateStyles = exports.DateSharedCssClassName = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
var _selectionStyles = require("./selectionStyles");
|
|
11
|
+
// eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
12
|
+
|
|
13
|
+
var DateSharedCssClassName = exports.DateSharedCssClassName = {
|
|
14
|
+
DATE_WRAPPER: "date-lozenger-container",
|
|
15
|
+
DATE_CONTAINER: 'dateView-content-wrap'
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
19
|
+
var dateVanillaStyles = exports.dateVanillaStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "[data-prosemirror-node-view-type='vanilla'][data-prosemirror-node-name='date'] .".concat(DateSharedCssClassName.DATE_WRAPPER, " span"), {
|
|
20
|
+
backgroundColor: "var(--ds-background-neutral, #091E420F)",
|
|
21
|
+
color: "var(--ds-text, #172B4D)",
|
|
22
|
+
borderRadius: "var(--ds-border-radius-100, 4px)",
|
|
23
|
+
padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)"),
|
|
24
|
+
margin: '0 1px',
|
|
25
|
+
position: 'relative',
|
|
26
|
+
transition: 'background 0.3s',
|
|
27
|
+
whiteSpace: 'nowrap',
|
|
28
|
+
cursor: 'unset'
|
|
29
|
+
}), "[data-prosemirror-node-view-type='vanilla'][data-prosemirror-node-name='date'] .".concat(DateSharedCssClassName.DATE_WRAPPER, " span:hover"), {
|
|
30
|
+
backgroundColor: "var(--ds-background-neutral-hovered, #091E4224)"
|
|
31
|
+
}), "[data-prosemirror-node-view-type='vanilla'][data-prosemirror-node-name='date'] .".concat(DateSharedCssClassName.DATE_WRAPPER, " span.date-node-color-red"), {
|
|
32
|
+
backgroundColor: "var(--ds-background-accent-red-subtlest, #FFECEB)",
|
|
33
|
+
color: "var(--ds-text-accent-red, #AE2E24)"
|
|
34
|
+
}), "[data-prosemirror-node-view-type='vanilla'][data-prosemirror-node-name='date'] .".concat(DateSharedCssClassName.DATE_WRAPPER, " span.date-node-color-red:hover"), {
|
|
35
|
+
backgroundColor: "var(--ds-background-accent-red-subtler, #FFD5D2)"
|
|
36
|
+
}));
|
|
37
|
+
|
|
38
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
39
|
+
var dateStyles = exports.dateStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(DateSharedCssClassName.DATE_WRAPPER, " span"), {
|
|
40
|
+
whiteSpace: 'unset'
|
|
41
|
+
}), ".".concat(DateSharedCssClassName.DATE_CONTAINER), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(DateSharedCssClassName.DATE_WRAPPER), {
|
|
42
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
43
|
+
lineHeight: 'initial',
|
|
44
|
+
cursor: 'pointer'
|
|
45
|
+
}), '&.ak-editor-selected-node', (0, _defineProperty2.default)({}, ".".concat(DateSharedCssClassName.DATE_WRAPPER, " > span"), [
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
47
|
+
_selectionStyles.boxShadowSelectionStyles,
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
49
|
+
_selectionStyles.hideNativeBrowserTextSelectionStyles]))), '.danger', (0, _defineProperty2.default)({}, ".".concat(DateSharedCssClassName.DATE_CONTAINER, ".ak-editor-selected-node .").concat(DateSharedCssClassName.DATE_WRAPPER, " > span"), {
|
|
50
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-danger, #E2483D)")
|
|
51
|
+
})));
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.gridStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
// eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
11
|
+
var gridStyles = exports.gridStyles = (0, _react.css)({
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
13
|
+
'.gridParent': {
|
|
14
|
+
width: "calc(100% + 24px)",
|
|
15
|
+
marginLeft: "var(--ds-space-negative-150, -12px)",
|
|
16
|
+
marginRight: "var(--ds-space-negative-150, -12px)",
|
|
17
|
+
transform: 'scale(1)',
|
|
18
|
+
zIndex: 2
|
|
19
|
+
},
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
21
|
+
'.gridContainer': {
|
|
22
|
+
position: 'fixed',
|
|
23
|
+
height: '100vh',
|
|
24
|
+
width: '100%',
|
|
25
|
+
pointerEvents: 'none'
|
|
26
|
+
},
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
28
|
+
'.gridLine': {
|
|
29
|
+
borderLeft: "1px solid ".concat("var(--ds-border, #091E4224)"),
|
|
30
|
+
display: 'inline-block',
|
|
31
|
+
boxSizing: 'border-box',
|
|
32
|
+
height: '100%',
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
34
|
+
marginLeft: '-1px',
|
|
35
|
+
transition: 'border-color 0.15s linear',
|
|
36
|
+
zIndex: 0
|
|
37
|
+
},
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
39
|
+
'.highlight': {
|
|
40
|
+
borderLeft: "1px solid ".concat("var(--ds-border-focused, #388BFF)")
|
|
41
|
+
}
|
|
42
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.indentationStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
// eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
11
|
+
var indentationStyles = exports.indentationStyles = (0, _react.css)({
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
13
|
+
'.fabric-editor-indentation-mark': {
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
15
|
+
"&[data-level='1']": {
|
|
16
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
17
|
+
marginLeft: 30
|
|
18
|
+
},
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
|
+
"&[data-level='2']": {
|
|
21
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
22
|
+
marginLeft: 60
|
|
23
|
+
},
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
25
|
+
"&[data-level='3']": {
|
|
26
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
27
|
+
marginLeft: 90
|
|
28
|
+
},
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
30
|
+
"&[data-level='4']": {
|
|
31
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
32
|
+
marginLeft: 120
|
|
33
|
+
},
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
35
|
+
"&[data-level='5']": {
|
|
36
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
37
|
+
marginLeft: 150
|
|
38
|
+
},
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
40
|
+
"&[data-level='6']": {
|
|
41
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
42
|
+
marginLeft: 180
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.listsStylesSafariFix = exports.listsStyles = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
11
|
+
|
|
12
|
+
// copied from packages/editor/editor-shared-styles/src/consts/consts.ts
|
|
13
|
+
var akEditorLineHeight = 1.714;
|
|
14
|
+
// copied from packages/editor/editor-common/src/styles/shared/smart-card.ts
|
|
15
|
+
var BLOCK_CARD_CONTAINER = 'blockCardView-content-wrap';
|
|
16
|
+
|
|
17
|
+
// copied from packages/editor/editor-shared-styles/src/consts/consts.ts
|
|
18
|
+
var blockNodesVerticalMargin = '0.75rem';
|
|
19
|
+
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
21
|
+
var listsStyles = exports.listsStyles = (0, _react.css)({
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
23
|
+
'.ProseMirror li': {
|
|
24
|
+
position: 'relative',
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
26
|
+
'& > p:not(:first-child)': {
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
28
|
+
margin: "var(--ds-space-050, 4px)".concat(" 0 0 0")
|
|
29
|
+
},
|
|
30
|
+
/* In SSR the above rule will apply to all p tags because first-child would be a style tag.
|
|
31
|
+
The following rule resets the first p tag back to its original margin
|
|
32
|
+
defined in packages/editor/editor-common/src/styles/shared/paragraph.ts */
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
34
|
+
'& > style:first-child + p': {
|
|
35
|
+
marginTop: blockNodesVerticalMargin
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/* This prevents https://product-fabric.atlassian.net/browse/ED-20924 */
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
42
|
+
var listsStylesSafariFix = exports.listsStylesSafariFix = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".ProseMirror:not(.".concat(BLOCK_CARD_CONTAINER, ") > li::before"), {
|
|
43
|
+
content: '" "',
|
|
44
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
45
|
+
lineHeight: akEditorLineHeight
|
|
46
|
+
}), ".ProseMirror:not(.".concat(BLOCK_CARD_CONTAINER, ") > li > p:first-child, .ProseMirror:not(.").concat(BLOCK_CARD_CONTAINER, ") > li > .code-block:first-child, .ProseMirror:not(.").concat(BLOCK_CARD_CONTAINER, ") > li > .ProseMirror-gapcursor:first-child + .code-block"), {
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
48
|
+
marginTop: "-".concat(akEditorLineHeight, "em !important")
|
|
49
|
+
}));
|
|
@@ -28,7 +28,7 @@ var borderSelectionStyles = exports.borderSelectionStyles = (0, _react.css)({
|
|
|
28
28
|
// Fixes ED-15246: Trello card is visible through a border of a table border
|
|
29
29
|
'&::after': {
|
|
30
30
|
height: '100%',
|
|
31
|
-
content: '
|
|
31
|
+
content: "'\\00a0'",
|
|
32
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
33
33
|
background: "var(--ds-border-selected, #0C66E4)",
|
|
34
34
|
position: 'absolute',
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.shadowStyles = exports.shadowObserverClassNames = exports.shadowClassNames = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
// eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
11
|
+
|
|
12
|
+
var shadowClassNames = exports.shadowClassNames = {
|
|
13
|
+
RIGHT_SHADOW: 'right-shadow',
|
|
14
|
+
LEFT_SHADOW: 'left-shadow'
|
|
15
|
+
};
|
|
16
|
+
var shadowObserverClassNames = exports.shadowObserverClassNames = {
|
|
17
|
+
SENTINEL_LEFT: 'sentinel-left',
|
|
18
|
+
SENTINEL_RIGHT: 'sentinel-right',
|
|
19
|
+
SHADOW_CONTAINER: 'with-shadow-observer'
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
23
|
+
var shadowStyles = exports.shadowStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "& .".concat(shadowClassNames.RIGHT_SHADOW, "::before, .").concat(shadowClassNames.RIGHT_SHADOW, "::after, .").concat(shadowClassNames.LEFT_SHADOW, "::before, .").concat(shadowClassNames.LEFT_SHADOW, "::after"), {
|
|
24
|
+
display: 'none',
|
|
25
|
+
position: 'absolute',
|
|
26
|
+
pointerEvents: 'none',
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
|
+
zIndex: 2,
|
|
29
|
+
width: 8,
|
|
30
|
+
content: "''",
|
|
31
|
+
height: 'calc(100%)'
|
|
32
|
+
}), "& .".concat(shadowClassNames.RIGHT_SHADOW, ", .").concat(shadowClassNames.LEFT_SHADOW), {
|
|
33
|
+
position: 'relative'
|
|
34
|
+
}), "& .".concat(shadowClassNames.LEFT_SHADOW, "::before"), {
|
|
35
|
+
background: "linear-gradient(to left, transparent 0, ".concat("var(--ds-shadow-overflow-spread, #091e4229)", " 140% ), linear-gradient( to right, ", "var(--ds-shadow-overflow-perimeter, transparent)", " 0px, transparent 1px)"),
|
|
36
|
+
top: 0,
|
|
37
|
+
left: 0,
|
|
38
|
+
display: 'block'
|
|
39
|
+
}), "& .".concat(shadowClassNames.RIGHT_SHADOW, "::after"), {
|
|
40
|
+
background: "linear-gradient(to right, transparent 0, ".concat("var(--ds-shadow-overflow-spread, #091e4229)", " 140% ), linear-gradient( to left, ", "var(--ds-shadow-overflow-perimeter, transparent)", " 0px, transparent 1px)"),
|
|
41
|
+
right: 0,
|
|
42
|
+
top: 0,
|
|
43
|
+
display: 'block'
|
|
44
|
+
}), "& .".concat(shadowObserverClassNames.SENTINEL_LEFT), {
|
|
45
|
+
height: '100%',
|
|
46
|
+
width: 0,
|
|
47
|
+
minWidth: 0
|
|
48
|
+
}), "& .".concat(shadowObserverClassNames.SENTINEL_RIGHT), {
|
|
49
|
+
height: '100%',
|
|
50
|
+
width: 0,
|
|
51
|
+
minWidth: 0
|
|
52
|
+
}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.textColorStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
// eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
11
|
+
var textColorStyles = exports.textColorStyles = (0, _react.css)({
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
13
|
+
'.fabric-text-color-mark': {
|
|
14
|
+
color: 'var(--custom-palette-color, inherit)'
|
|
15
|
+
},
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
17
|
+
'a .fabric-text-color-mark': {
|
|
18
|
+
color: 'unset'
|
|
19
|
+
}
|
|
20
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.unsupportedStyles = exports.UnsupportedSharedCssClassName = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
var _selectionStyles = require("./selectionStyles");
|
|
11
|
+
// eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
12
|
+
|
|
13
|
+
var UnsupportedSharedCssClassName = exports.UnsupportedSharedCssClassName = {
|
|
14
|
+
BLOCK_CONTAINER: 'unsupportedBlockView-content-wrap',
|
|
15
|
+
INLINE_CONTAINER: 'unsupportedInlineView-content-wrap'
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
19
|
+
var unsupportedStyles = exports.unsupportedStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(UnsupportedSharedCssClassName.BLOCK_CONTAINER, " > div, .").concat(UnsupportedSharedCssClassName.INLINE_CONTAINER, " > span:nth-of-type(2)"), {
|
|
20
|
+
cursor: 'pointer'
|
|
21
|
+
}), '.ak-editor-selected-node', (0, _defineProperty2.default)({}, "&.".concat(UnsupportedSharedCssClassName.BLOCK_CONTAINER, " > div, &.").concat(UnsupportedSharedCssClassName.INLINE_CONTAINER, " > span:nth-of-type(2)"),
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
23
|
+
[
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
25
|
+
_selectionStyles.backgroundSelectionStyles,
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
27
|
+
_selectionStyles.borderSelectionStyles,
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
29
|
+
_selectionStyles.hideNativeBrowserTextSelectionStyles])), '.danger', {
|
|
30
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
31
|
+
'.ak-editor-selected-node': (0, _defineProperty2.default)({}, "&.".concat(UnsupportedSharedCssClassName.BLOCK_CONTAINER, " > div, &.").concat(UnsupportedSharedCssClassName.INLINE_CONTAINER, " > span:nth-of-type(2)"), {
|
|
32
|
+
border: "1px solid ".concat("var(--ds-border-danger, #E2483D)"),
|
|
33
|
+
backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
|
|
34
|
+
})
|
|
35
|
+
}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.whitespaceStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
// eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
|
+
var whitespaceStyles = exports.whitespaceStyles = (0, _react.css)({
|
|
12
|
+
wordWrap: 'break-word',
|
|
13
|
+
whiteSpace: 'pre-wrap'
|
|
14
|
+
});
|
|
@@ -14,7 +14,6 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents'
|
|
|
14
14
|
import { ACTION, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
15
15
|
import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
|
|
16
16
|
import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils/analytics';
|
|
17
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
17
|
import EditorActions from '../actions';
|
|
19
18
|
import { useEditorContext } from '../ui/EditorContext';
|
|
20
19
|
import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
|
|
@@ -92,7 +91,7 @@ function Editor(passedProps) {
|
|
|
92
91
|
}
|
|
93
92
|
}, [onSaveFromProps]);
|
|
94
93
|
const isFullPageApperance = Boolean(props.appearance && ['full-page', 'full-width'].includes(props.appearance));
|
|
95
|
-
return jsx(Fragment, null, isFullPageApperance
|
|
94
|
+
return jsx(Fragment, null, isFullPageApperance ? jsx(EditorINPMetrics, null) : null, jsx(EditorInternal, {
|
|
96
95
|
props: props,
|
|
97
96
|
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
98
97
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
@@ -4,6 +4,7 @@ import uuid from 'uuid/v4';
|
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, PLATFORMS } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { createDispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
6
6
|
import { useConstructor, usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
7
|
+
import { nodeVisibilityManager } from '@atlaskit/editor-common/node-visibility';
|
|
7
8
|
import { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-feature-flags';
|
|
8
9
|
import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
|
|
9
10
|
import { getResponseEndTime } from '@atlaskit/editor-common/performance/navigation';
|
|
@@ -15,6 +16,7 @@ import { isEmptyDocument } from '@atlaskit/editor-common/utils/document';
|
|
|
15
16
|
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
16
17
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
17
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
20
|
import { useProviders } from '../composable-editor/hooks/useProviders';
|
|
19
21
|
import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
|
|
20
22
|
import { getNodesCount } from '../utils/getNodesCount';
|
|
@@ -462,6 +464,12 @@ export function ReactEditorView(props) {
|
|
|
462
464
|
}, [editorView, shouldFocus, __livePage, mitigateScrollJump]);
|
|
463
465
|
const handleEditorViewRef = useCallback(node => {
|
|
464
466
|
if (!viewRef.current && node) {
|
|
467
|
+
// make sure this doesn't expose the experiment
|
|
468
|
+
if (editorExperiment('platform_editor_nodevisibility', true, {
|
|
469
|
+
exposure: false
|
|
470
|
+
})) {
|
|
471
|
+
nodeVisibilityManager(node).initialiseNodeObserver();
|
|
472
|
+
}
|
|
465
473
|
const view = createEditorView(node);
|
|
466
474
|
if (fg('platform_editor_reduce_scroll_jump_on_editor_start')) {
|
|
467
475
|
if (mitigateScrollJump) {
|
|
@@ -530,6 +538,9 @@ export function ReactEditorView(props) {
|
|
|
530
538
|
} else {
|
|
531
539
|
viewRef.current.destroy(); // Destroys the dom node & all node views
|
|
532
540
|
}
|
|
541
|
+
if (editorExperiment('platform_editor_nodevisibility', true)) {
|
|
542
|
+
nodeVisibilityManager(viewRef.current.dom).disconnect();
|
|
543
|
+
}
|
|
533
544
|
viewRef.current = undefined;
|
|
534
545
|
}
|
|
535
546
|
}, [createEditorView, onEditorCreated, eventDispatcher, shouldFocus, __livePage, onEditorDestroyed, handleAnalyticsEvent, mitigateScrollJump]);
|