@atlaskit/editor-core 215.0.4 → 215.0.6
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 +3 -18
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +0 -11
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +8 -2
- package/dist/cjs/ui/EditorContentContainer/styles/emoji.js +27 -1
- package/dist/cjs/ui/EditorContentContainer/styles/syncBlockStyles.js +35 -12
- package/dist/cjs/utils/extensions.js +1 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/Chromeless.js +2 -19
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +0 -11
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +9 -3
- package/dist/es2019/ui/EditorContentContainer/styles/emoji.js +30 -1
- package/dist/es2019/ui/EditorContentContainer/styles/syncBlockStyles.js +36 -13
- package/dist/es2019/utils/extensions.js +1 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/Chromeless.js +3 -18
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +0 -11
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +9 -3
- package/dist/esm/ui/EditorContentContainer/styles/emoji.js +27 -1
- package/dist/esm/ui/EditorContentContainer/styles/syncBlockStyles.js +36 -13
- package/dist/esm/utils/extensions.js +1 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +1 -0
- package/dist/types/presets/universal.d.ts +1 -0
- package/dist/types/presets/useUniversalPreset.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/emoji.d.ts +7 -0
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +1 -0
- package/dist/types-ts4.5/presets/universal.d.ts +1 -0
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/emoji.d.ts +7 -0
- package/package.json +6 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 215.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1e40e7f832859`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1e40e7f832859) -
|
|
8
|
+
[ux] Scale emojis in editor compact mode
|
|
9
|
+
- [`a48139f041cd4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a48139f041cd4) -
|
|
10
|
+
[ux] EDITOR-1654 implement sync block ui for hovered, selected and delete states
|
|
11
|
+
- [`ab5c971734fe5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ab5c971734fe5) -
|
|
12
|
+
NOISSUE: Hydration mutation detection within editor example
|
|
13
|
+
- [`9d0a393b141f9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9d0a393b141f9) -
|
|
14
|
+
[HOT-121657] Revert PR that sets minHeight behind FG
|
|
15
|
+
`platform_expand_editor_click_area_with_minheight`, there is another solution behind
|
|
16
|
+
`platform_editor_focus_fix` that can be used instead
|
|
17
|
+
- [`b0b556769b28e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b0b556769b28e) -
|
|
18
|
+
[EDITOR-1735] prompt editor padding issue
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
21
|
+
## 215.0.5
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [`8e2162706bb08`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e2162706bb08) -
|
|
26
|
+
[REMOVE FF] platform_nested_nbm_analytics_location
|
|
27
|
+
- [`0b4cd77e72217`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0b4cd77e72217) -
|
|
28
|
+
clean up references to platform_editor_controls_performance_fixes
|
|
29
|
+
- Updated dependencies
|
|
30
|
+
|
|
3
31
|
## 215.0.4
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
|
@@ -21,14 +21,11 @@ var _EditorContentContainer = _interopRequireDefault(require("../EditorContentCo
|
|
|
21
21
|
var _PluginSlot = _interopRequireDefault(require("../PluginSlot"));
|
|
22
22
|
var _WithFlash = _interopRequireDefault(require("../WithFlash"));
|
|
23
23
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
24
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26
24
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
27
25
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
28
26
|
* @jsxRuntime classic
|
|
29
27
|
* @jsx jsx
|
|
30
28
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
31
|
-
var AK_EDITOR_CHROMELESS_MIN_HEIGHT_VAR = '--ak-editor-chromeless-min-height';
|
|
32
29
|
var scrollbarStylesNew = (0, _react2.css)({
|
|
33
30
|
msOverflowStyle: '-ms-autohiding-scrollbar',
|
|
34
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
@@ -70,18 +67,6 @@ var chromelessEditorStylesNew = (0, _react2.css)({
|
|
|
70
67
|
}
|
|
71
68
|
}
|
|
72
69
|
});
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* minHeight styles are needed to expand the clickable area of ProseMirror.
|
|
76
|
-
* Here, we propagate the minHeight that's used in the editor container to ProseMirror.
|
|
77
|
-
*/
|
|
78
|
-
var minHeightStyles = (0, _react2.css)({
|
|
79
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
80
|
-
'div > .ProseMirror': {
|
|
81
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
82
|
-
minHeight: "var(".concat(AK_EDITOR_CHROMELESS_MIN_HEIGHT_VAR, ")")
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
70
|
var extraSpaceLastLineFix = (0, _react2.css)({
|
|
86
71
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
87
72
|
'.ProseMirror': {
|
|
@@ -198,11 +183,11 @@ function ChromelessEditorContainer(_ref3) {
|
|
|
198
183
|
children = _ref3.children,
|
|
199
184
|
containerRef = _ref3.containerRef;
|
|
200
185
|
return (0, _react2.jsx)("div", {
|
|
201
|
-
css: [chromelessEditorStylesNew, scrollbarStylesNew, (0, _platformFeatureFlags.fg)('
|
|
202
|
-
style:
|
|
186
|
+
css: [chromelessEditorStylesNew, scrollbarStylesNew, (0, _platformFeatureFlags.fg)('platform_fix_extra_space_last_line_comment_editor') && extraSpaceLastLineFix],
|
|
187
|
+
style: {
|
|
203
188
|
maxHeight: maxHeight ? "".concat(maxHeight, "px") : undefined,
|
|
204
189
|
minHeight: "".concat(minHeight, "px")
|
|
205
|
-
},
|
|
190
|
+
},
|
|
206
191
|
"data-testid": "chromeless-editor",
|
|
207
192
|
id: "chromeless-editor",
|
|
208
193
|
ref: containerRef
|
|
@@ -46,7 +46,7 @@ var commentEditorStyles = (0, _react2.css)({
|
|
|
46
46
|
display: 'flex',
|
|
47
47
|
flexDirection: 'column',
|
|
48
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
49
|
-
'.less-margin .ProseMirror': {
|
|
49
|
+
'.less-margin > .ProseMirror': {
|
|
50
50
|
margin: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-100, 8px)", " ", "var(--ds-space-100, 8px)")
|
|
51
51
|
},
|
|
52
52
|
minWidth: '272px',
|
|
@@ -234,16 +234,6 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
236
|
}, []);
|
|
237
|
-
var shouldSetHiddenDataAttribute = function shouldSetHiddenDataAttribute() {
|
|
238
|
-
// When platform_editor_controls_performance_fixes is enabled we use a different method to
|
|
239
|
-
// determine if the toolbar is hidden from outside of the editor, which doesn't require setting
|
|
240
|
-
// data-editor-primary-toolbar-hidden on the content area
|
|
241
|
-
// NOTE: When tidying, this function and the data attribute can be removed
|
|
242
|
-
if (!props.isEditorToolbarHidden || (0, _experiments.editorExperiment)('platform_editor_controls_performance_fixes', true)) {
|
|
243
|
-
return false;
|
|
244
|
-
}
|
|
245
|
-
return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1');
|
|
246
|
-
};
|
|
247
237
|
return (0, _react2.jsx)("div", {
|
|
248
238
|
css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
|
|
249
239
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
@@ -279,7 +269,6 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
279
269
|
,
|
|
280
270
|
className: "ak-editor-content-area-region",
|
|
281
271
|
"data-editor-editable-content": true,
|
|
282
|
-
"data-editor-primary-toolbar-hidden": shouldSetHiddenDataAttribute() ? 'true' : undefined,
|
|
283
272
|
role: "region",
|
|
284
273
|
"aria-label": props.intl.formatMessage(_messages.fullPageMessages.editableContentLabel),
|
|
285
274
|
ref: contentAreaRef
|
|
@@ -17,6 +17,7 @@ var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equa
|
|
|
17
17
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
18
18
|
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
19
19
|
var _tokens = require("@atlaskit/tokens");
|
|
20
|
+
var _getBaseFontSize = require("../../composable-editor/utils/getBaseFontSize");
|
|
20
21
|
var _aiPanel = require("./styles/aiPanel");
|
|
21
22
|
var _annotationStyles = require("./styles/annotationStyles");
|
|
22
23
|
var _backgroundColorStyles = require("./styles/backgroundColorStyles");
|
|
@@ -66,7 +67,6 @@ var _textColorStyles = require("./styles/textColorStyles");
|
|
|
66
67
|
var _textHighlightStyles = require("./styles/textHighlightStyles");
|
|
67
68
|
var _unsupportedStyles = require("./styles/unsupportedStyles");
|
|
68
69
|
var _whitespaceStyles = require("./styles/whitespaceStyles");
|
|
69
|
-
/* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
70
70
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
71
71
|
/**
|
|
72
72
|
* @jsxRuntime classic
|
|
@@ -116,12 +116,14 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
116
116
|
children = props.children,
|
|
117
117
|
viewMode = props.viewMode,
|
|
118
118
|
isScrollable = props.isScrollable,
|
|
119
|
-
appearance = props.appearance
|
|
119
|
+
appearance = props.appearance,
|
|
120
|
+
contentMode = props.contentMode;
|
|
120
121
|
var theme = (0, _react2.useTheme)();
|
|
121
122
|
var _useThemeObserver = (0, _tokens.useThemeObserver)(),
|
|
122
123
|
colorMode = _useThemeObserver.colorMode;
|
|
123
124
|
var isFullPage = appearance === 'full-page' || appearance === 'full-width';
|
|
124
125
|
var isComment = appearance === 'comment';
|
|
126
|
+
var baseFontSize = (0, _getBaseFontSize.getBaseFontSize)(appearance, contentMode);
|
|
125
127
|
var style = (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
|
|
126
128
|
exposure: true
|
|
127
129
|
}) ? {
|
|
@@ -393,6 +395,10 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
393
395
|
_mentions.mentionsStylesMixin_platform_editor_centre_mention_padding,
|
|
394
396
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
395
397
|
_emoji.emojiStyles,
|
|
398
|
+
// Dense emoji scaling based on base font size
|
|
399
|
+
(0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') &&
|
|
400
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
401
|
+
(0, _emoji.getDenseEmojiStyles)(baseFontSize),
|
|
396
402
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
397
403
|
_panelStyles.panelViewStyles,
|
|
398
404
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.emojiStyles = exports.emojiDangerStyles = void 0;
|
|
7
|
+
exports.getDenseEmojiStyles = exports.emojiStyles = exports.emojiDangerStyles = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _emoji = require("@atlaskit/editor-common/emoji");
|
|
@@ -38,6 +38,32 @@ _selectionStyles.boxShadowSelectionStyles,
|
|
|
38
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
39
39
|
_selectionStyles.hideNativeBrowserTextSelectionStyles])));
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Gets dynamic emoji styles that scale emoji size based on the base font size.
|
|
43
|
+
* This allows emojis to scale proportionally when the base font size changes.
|
|
44
|
+
* @param baseFontSize - The base font size in pixels (e.g., 16 for default, 13 for dense mode)
|
|
45
|
+
* @returns SerializedStyles with emoji size overrides if baseFontSize is provided and different from default.
|
|
46
|
+
*/
|
|
47
|
+
var getDenseEmojiStyles = exports.getDenseEmojiStyles = function getDenseEmojiStyles(baseFontSize) {
|
|
48
|
+
if (!baseFontSize || baseFontSize === _editorSharedStyles.akEditorFullPageDefaultFontSize) {
|
|
49
|
+
return (0, _react.css)({});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Calculate emoji size based on base font size
|
|
53
|
+
// Default: 20px emoji at 16px base font
|
|
54
|
+
// Scaled: 20px * (baseFontSize/16)
|
|
55
|
+
// E.g., dense mode (13px base): 20px * (13/16) = 16.25px
|
|
56
|
+
var emojiSize = _emoji.defaultEmojiHeight * baseFontSize / 16;
|
|
57
|
+
return (0, _react.css)((0, _defineProperty2.default)({}, ".ProseMirror :is(.".concat(_emoji.EmojiSharedCssClassName.EMOJI_SPRITE, ", .").concat(_emoji.EmojiSharedCssClassName.EMOJI_IMAGE, ")"), {
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
59
|
+
width: emojiSize,
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
61
|
+
height: emojiSize,
|
|
62
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
63
|
+
maxHeight: emojiSize
|
|
64
|
+
}));
|
|
65
|
+
};
|
|
66
|
+
|
|
41
67
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
42
68
|
var emojiDangerStyles = exports.emojiDangerStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".ProseMirror .".concat(_editorSharedStyles.akEditorSelectedNodeClassName, ".danger"), (0, _defineProperty2.default)({}, ".".concat(_emoji.EmojiSharedCssClassName.EMOJI_SPRITE, ", .").concat(_emoji.EmojiSharedCssClassName.EMOJI_IMAGE), [
|
|
43
69
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -14,6 +14,7 @@ var syncBlockStyles = exports.syncBlockStyles = (0, _react.css)({
|
|
|
14
14
|
'.ProseMirror': {
|
|
15
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
16
16
|
'.ak-editor-sync-block': {
|
|
17
|
+
position: 'relative',
|
|
17
18
|
cursor: 'pointer',
|
|
18
19
|
/* Danger when top level node */
|
|
19
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -25,25 +26,26 @@ var syncBlockStyles = exports.syncBlockStyles = (0, _react.css)({
|
|
|
25
26
|
'.ak-editor-panel__icon': {
|
|
26
27
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
27
28
|
color: "var(--ds-icon-danger, #C9372C)".concat(" !important")
|
|
29
|
+
},
|
|
30
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
31
|
+
'.ak-editor-sync-block__label': {
|
|
32
|
+
color: "var(--ds-icon-danger, #C9372C)",
|
|
33
|
+
backgroundColor: "var(--ds-background-danger-hovered, #FFD5D2)"
|
|
28
34
|
}
|
|
29
35
|
},
|
|
30
|
-
|
|
36
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
31
37
|
marginTop: "var(--ds-space-150, 12px)",
|
|
32
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
33
|
-
marginRight: "-".concat(
|
|
39
|
+
marginRight: "-".concat(_editorSharedStyles.akEditorGutterPadding, "px"),
|
|
34
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
35
|
-
marginLeft: "-".concat(
|
|
41
|
+
marginLeft: "-".concat(_editorSharedStyles.akEditorGutterPadding, "px"),
|
|
36
42
|
marginBottom: 0,
|
|
37
|
-
paddingTop:
|
|
38
|
-
paddingBottom:
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
40
|
-
paddingRight: "".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)() - 32, "px"),
|
|
41
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
42
|
-
paddingLeft: "".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)() - 32, "px"),
|
|
43
|
+
paddingTop: "var(--ds-space-050, 4px)",
|
|
44
|
+
paddingBottom: "var(--ds-space-050, 4px)",
|
|
43
45
|
color: 'inherit',
|
|
44
46
|
'&:hover': {
|
|
45
47
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
46
|
-
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-
|
|
48
|
+
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-accent-purple, #8270DB)")
|
|
47
49
|
},
|
|
48
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
49
51
|
'.ak-editor-sync-block__editor': {
|
|
@@ -57,7 +59,28 @@ var syncBlockStyles = exports.syncBlockStyles = (0, _react.css)({
|
|
|
57
59
|
},
|
|
58
60
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
59
61
|
'.ak-editor-sync-block.ak-editor-selected-node:not(.danger)': {
|
|
60
|
-
boxShadow: "0 0 0 1px ".concat("var(--ds-
|
|
61
|
-
|
|
62
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-accent-purple, #8270DB)")
|
|
63
|
+
},
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
65
|
+
'.ak-editor-sync-block.ak-editor-selected-node': {
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
67
|
+
'.ak-editor-sync-block__label': {
|
|
68
|
+
display: 'unset'
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
72
|
+
'.ak-editor-sync-block__label': {
|
|
73
|
+
color: "var(--ds-text-accent-purple, #5E4DB2)",
|
|
74
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
75
|
+
position: 'absolute',
|
|
76
|
+
display: 'none',
|
|
77
|
+
paddingLeft: "var(--ds-space-100, 8px)",
|
|
78
|
+
paddingRight: "var(--ds-space-100, 8px)",
|
|
79
|
+
paddingBottom: "var(--ds-space-050, 4px)",
|
|
80
|
+
paddingTop: "var(--ds-space-050, 4px)",
|
|
81
|
+
// height of label (32px) + space between sync block and label (4px) = 36px
|
|
82
|
+
top: '-36px',
|
|
83
|
+
right: '0px',
|
|
84
|
+
backgroundColor: "var(--ds-background-accent-purple-subtlest, #F3F0FF)"
|
|
62
85
|
}
|
|
63
86
|
});
|
|
@@ -15,7 +15,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
15
15
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
16
16
|
var _providerHelpers = require("@atlaskit/editor-common/provider-helpers");
|
|
17
17
|
var _analytics2 = require("@atlaskit/editor-common/utils/analytics");
|
|
18
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
20
|
/**
|
|
@@ -23,7 +22,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
23
22
|
*/
|
|
24
23
|
function sendExtensionQuickInsertAnalytics(item, selection, createAnalyticsEvent, source) {
|
|
25
24
|
if (createAnalyticsEvent) {
|
|
26
|
-
var insertLocation = (0,
|
|
25
|
+
var insertLocation = (0, _analytics2.findInsertLocation)(selection);
|
|
27
26
|
(0, _analytics.fireAnalyticsEvent)(createAnalyticsEvent)({
|
|
28
27
|
payload: {
|
|
29
28
|
action: _analytics.ACTION.INSERTED,
|
|
@@ -12,7 +12,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
12
12
|
import EditorContentContainer from '../EditorContentContainer/EditorContentContainer';
|
|
13
13
|
import PluginSlot from '../PluginSlot';
|
|
14
14
|
import WithFlash from '../WithFlash';
|
|
15
|
-
const AK_EDITOR_CHROMELESS_MIN_HEIGHT_VAR = '--ak-editor-chromeless-min-height';
|
|
16
15
|
const scrollbarStylesNew = css({
|
|
17
16
|
msOverflowStyle: '-ms-autohiding-scrollbar',
|
|
18
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
@@ -54,18 +53,6 @@ const chromelessEditorStylesNew = css({
|
|
|
54
53
|
}
|
|
55
54
|
}
|
|
56
55
|
});
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* minHeight styles are needed to expand the clickable area of ProseMirror.
|
|
60
|
-
* Here, we propagate the minHeight that's used in the editor container to ProseMirror.
|
|
61
|
-
*/
|
|
62
|
-
const minHeightStyles = css({
|
|
63
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
64
|
-
'div > .ProseMirror': {
|
|
65
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
66
|
-
minHeight: `var(${AK_EDITOR_CHROMELESS_MIN_HEIGHT_VAR})`
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
56
|
const extraSpaceLastLineFix = css({
|
|
70
57
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
71
58
|
'.ProseMirror': {
|
|
@@ -173,14 +160,10 @@ export function ChromelessEditorContainer({
|
|
|
173
160
|
containerRef
|
|
174
161
|
}) {
|
|
175
162
|
return jsx("div", {
|
|
176
|
-
css: [chromelessEditorStylesNew, scrollbarStylesNew, fg('
|
|
163
|
+
css: [chromelessEditorStylesNew, scrollbarStylesNew, fg('platform_fix_extra_space_last_line_comment_editor') && extraSpaceLastLineFix],
|
|
177
164
|
style: {
|
|
178
165
|
maxHeight: maxHeight ? `${maxHeight}px` : undefined,
|
|
179
|
-
minHeight: `${minHeight}px
|
|
180
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
181
|
-
...(fg('platform_expand_editor_click_area_with_minheight') && {
|
|
182
|
-
[AK_EDITOR_CHROMELESS_MIN_HEIGHT_VAR]: `${minHeight}px`
|
|
183
|
-
})
|
|
166
|
+
minHeight: `${minHeight}px`
|
|
184
167
|
},
|
|
185
168
|
"data-testid": "chromeless-editor",
|
|
186
169
|
id: "chromeless-editor",
|
|
@@ -33,7 +33,7 @@ const commentEditorStyles = css({
|
|
|
33
33
|
display: 'flex',
|
|
34
34
|
flexDirection: 'column',
|
|
35
35
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
36
|
-
'.less-margin .ProseMirror': {
|
|
36
|
+
'.less-margin > .ProseMirror': {
|
|
37
37
|
margin: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"}`
|
|
38
38
|
},
|
|
39
39
|
minWidth: '272px',
|
|
@@ -226,16 +226,6 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
226
226
|
return containerRef.current;
|
|
227
227
|
}
|
|
228
228
|
}), []);
|
|
229
|
-
const shouldSetHiddenDataAttribute = () => {
|
|
230
|
-
// When platform_editor_controls_performance_fixes is enabled we use a different method to
|
|
231
|
-
// determine if the toolbar is hidden from outside of the editor, which doesn't require setting
|
|
232
|
-
// data-editor-primary-toolbar-hidden on the content area
|
|
233
|
-
// NOTE: When tidying, this function and the data attribute can be removed
|
|
234
|
-
if (!props.isEditorToolbarHidden || editorExperiment('platform_editor_controls_performance_fixes', true)) {
|
|
235
|
-
return false;
|
|
236
|
-
}
|
|
237
|
-
return editorExperiment('platform_editor_controls', 'variant1');
|
|
238
|
-
};
|
|
239
229
|
return jsx("div", {
|
|
240
230
|
css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
|
|
241
231
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
@@ -272,7 +262,6 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
272
262
|
,
|
|
273
263
|
className: "ak-editor-content-area-region",
|
|
274
264
|
"data-editor-editable-content": true,
|
|
275
|
-
"data-editor-primary-toolbar-hidden": shouldSetHiddenDataAttribute() ? 'true' : undefined,
|
|
276
265
|
role: "region",
|
|
277
266
|
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
278
267
|
ref: contentAreaRef
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
2
1
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
3
2
|
/**
|
|
4
3
|
* @jsxRuntime classic
|
|
@@ -17,6 +16,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
|
|
|
17
16
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
17
|
import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
19
18
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
19
|
+
import { getBaseFontSize } from '../../composable-editor/utils/getBaseFontSize';
|
|
20
20
|
import { aiPanelBaseFirefoxStyles, aiPanelBaseStyles, aiPanelDarkFirefoxStyles, aiPanelDarkStyles } from './styles/aiPanel';
|
|
21
21
|
import { annotationStyles } from './styles/annotationStyles';
|
|
22
22
|
import { backgroundColorStyles, textHighlightPaddingStyles } from './styles/backgroundColorStyles';
|
|
@@ -31,7 +31,7 @@ import { cursorStyles } from './styles/cursorStyles';
|
|
|
31
31
|
import { dangerDateStyles, dateStyles, dateVanillaStyles } from './styles/dateStyles';
|
|
32
32
|
import { editorUGCTokensDefault, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
|
|
33
33
|
import { embedCardStyles } from './styles/embedCardStyles';
|
|
34
|
-
import { emojiDangerStyles, emojiStyles } from './styles/emoji';
|
|
34
|
+
import { emojiDangerStyles, emojiStyles, getDenseEmojiStyles } from './styles/emoji';
|
|
35
35
|
import { expandStyles, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes } from './styles/expandStyles';
|
|
36
36
|
import { getExtensionStyles } from './styles/extensionStyles';
|
|
37
37
|
import { findReplaceStyles, findReplaceStylesNew } from './styles/findReplaceStyles';
|
|
@@ -110,7 +110,8 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
110
110
|
children,
|
|
111
111
|
viewMode,
|
|
112
112
|
isScrollable,
|
|
113
|
-
appearance
|
|
113
|
+
appearance,
|
|
114
|
+
contentMode
|
|
114
115
|
} = props;
|
|
115
116
|
const theme = useTheme();
|
|
116
117
|
const {
|
|
@@ -118,6 +119,7 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
118
119
|
} = useThemeObserver();
|
|
119
120
|
const isFullPage = appearance === 'full-page' || appearance === 'full-width';
|
|
120
121
|
const isComment = appearance === 'comment';
|
|
122
|
+
const baseFontSize = getBaseFontSize(appearance, contentMode);
|
|
121
123
|
const style = editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
122
124
|
exposure: true
|
|
123
125
|
}) ? {
|
|
@@ -389,6 +391,10 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
389
391
|
mentionsStylesMixin_platform_editor_centre_mention_padding,
|
|
390
392
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
391
393
|
emojiStyles,
|
|
394
|
+
// Dense emoji scaling based on base font size
|
|
395
|
+
expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') &&
|
|
396
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
397
|
+
getDenseEmojiStyles(baseFontSize),
|
|
392
398
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
393
399
|
panelViewStyles,
|
|
394
400
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { defaultEmojiHeight, EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
4
|
-
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
import { akEditorFullPageDefaultFontSize, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
import { blanketSelectionStyles, boxShadowSelectionStyles, dangerBackgroundStyles, dangerBorderStyles, hideNativeBrowserTextSelectionStyles } from './selectionStyles';
|
|
6
6
|
const emojiSelectionStyles = css({
|
|
7
7
|
borderRadius: "var(--ds-radius-xsmall, 2px)"
|
|
@@ -39,6 +39,35 @@ export const emojiStyles = css({
|
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Gets dynamic emoji styles that scale emoji size based on the base font size.
|
|
44
|
+
* This allows emojis to scale proportionally when the base font size changes.
|
|
45
|
+
* @param baseFontSize - The base font size in pixels (e.g., 16 for default, 13 for dense mode)
|
|
46
|
+
* @returns SerializedStyles with emoji size overrides if baseFontSize is provided and different from default.
|
|
47
|
+
*/
|
|
48
|
+
export const getDenseEmojiStyles = baseFontSize => {
|
|
49
|
+
if (!baseFontSize || baseFontSize === akEditorFullPageDefaultFontSize) {
|
|
50
|
+
return css({});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Calculate emoji size based on base font size
|
|
54
|
+
// Default: 20px emoji at 16px base font
|
|
55
|
+
// Scaled: 20px * (baseFontSize/16)
|
|
56
|
+
// E.g., dense mode (13px base): 20px * (13/16) = 16.25px
|
|
57
|
+
const emojiSize = defaultEmojiHeight * baseFontSize / 16;
|
|
58
|
+
return css({
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
60
|
+
[`.ProseMirror :is(.${EmojiSharedCssClassName.EMOJI_SPRITE}, .${EmojiSharedCssClassName.EMOJI_IMAGE})`]: {
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
62
|
+
width: emojiSize,
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
64
|
+
height: emojiSize,
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
66
|
+
maxHeight: emojiSize
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
|
|
42
71
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
43
72
|
export const emojiDangerStyles = css({
|
|
44
73
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import { akEditorGutterPadding } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
5
|
export const syncBlockStyles = css({
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
7
7
|
'.ProseMirror': {
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
9
9
|
'.ak-editor-sync-block': {
|
|
10
|
+
position: 'relative',
|
|
10
11
|
cursor: 'pointer',
|
|
11
12
|
/* Danger when top level node */
|
|
12
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -18,25 +19,26 @@ export const syncBlockStyles = css({
|
|
|
18
19
|
'.ak-editor-panel__icon': {
|
|
19
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
20
21
|
color: `${"var(--ds-icon-danger, #C9372C)"} !important`
|
|
22
|
+
},
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
24
|
+
'.ak-editor-sync-block__label': {
|
|
25
|
+
color: "var(--ds-icon-danger, #C9372C)",
|
|
26
|
+
backgroundColor: "var(--ds-background-danger-hovered, #FFD5D2)"
|
|
21
27
|
}
|
|
22
28
|
},
|
|
23
|
-
|
|
29
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
24
30
|
marginTop: "var(--ds-space-150, 12px)",
|
|
25
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
26
|
-
marginRight: `-${
|
|
32
|
+
marginRight: `-${akEditorGutterPadding}px`,
|
|
27
33
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
28
|
-
marginLeft: `-${
|
|
34
|
+
marginLeft: `-${akEditorGutterPadding}px`,
|
|
29
35
|
marginBottom: 0,
|
|
30
|
-
paddingTop:
|
|
31
|
-
paddingBottom:
|
|
32
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
33
|
-
paddingRight: `${akEditorGutterPaddingDynamic() - 32}px`,
|
|
34
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
35
|
-
paddingLeft: `${akEditorGutterPaddingDynamic() - 32}px`,
|
|
36
|
+
paddingTop: "var(--ds-space-050, 4px)",
|
|
37
|
+
paddingBottom: "var(--ds-space-050, 4px)",
|
|
36
38
|
color: 'inherit',
|
|
37
39
|
'&:hover': {
|
|
38
40
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
39
|
-
boxShadow: `0px 0px 0px 1px ${"var(--ds-
|
|
41
|
+
boxShadow: `0px 0px 0px 1px ${"var(--ds-border-accent-purple, #8270DB)"}`
|
|
40
42
|
},
|
|
41
43
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
42
44
|
'.ak-editor-sync-block__editor': {
|
|
@@ -50,7 +52,28 @@ export const syncBlockStyles = css({
|
|
|
50
52
|
},
|
|
51
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
52
54
|
'.ak-editor-sync-block.ak-editor-selected-node:not(.danger)': {
|
|
53
|
-
boxShadow: `0 0 0 1px ${"var(--ds-
|
|
54
|
-
|
|
55
|
+
boxShadow: `0 0 0 1px ${"var(--ds-border-accent-purple, #8270DB)"}`
|
|
56
|
+
},
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
58
|
+
'.ak-editor-sync-block.ak-editor-selected-node': {
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
60
|
+
'.ak-editor-sync-block__label': {
|
|
61
|
+
display: 'unset'
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
65
|
+
'.ak-editor-sync-block__label': {
|
|
66
|
+
color: "var(--ds-text-accent-purple, #5E4DB2)",
|
|
67
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
68
|
+
position: 'absolute',
|
|
69
|
+
display: 'none',
|
|
70
|
+
paddingLeft: "var(--ds-space-100, 8px)",
|
|
71
|
+
paddingRight: "var(--ds-space-100, 8px)",
|
|
72
|
+
paddingBottom: "var(--ds-space-050, 4px)",
|
|
73
|
+
paddingTop: "var(--ds-space-050, 4px)",
|
|
74
|
+
// height of label (32px) + space between sync block and label (4px) = 36px
|
|
75
|
+
top: '-36px',
|
|
76
|
+
right: '0px',
|
|
77
|
+
backgroundColor: "var(--ds-background-accent-purple-subtlest, #F3F0FF)"
|
|
55
78
|
}
|
|
56
79
|
});
|
|
@@ -4,13 +4,12 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEve
|
|
|
4
4
|
import { getQuickInsertItemsFromModule, resolveImport } from '@atlaskit/editor-common/extensions';
|
|
5
5
|
import { combineProviders } from '@atlaskit/editor-common/provider-helpers';
|
|
6
6
|
import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
/**
|
|
9
8
|
* Utils to send analytics event when a extension is inserted using quickInsert
|
|
10
9
|
*/
|
|
11
10
|
function sendExtensionQuickInsertAnalytics(item, selection, createAnalyticsEvent, source) {
|
|
12
11
|
if (createAnalyticsEvent) {
|
|
13
|
-
const insertLocation =
|
|
12
|
+
const insertLocation = findInsertLocation(selection);
|
|
14
13
|
fireAnalyticsEvent(createAnalyticsEvent)({
|
|
15
14
|
payload: {
|
|
16
15
|
action: ACTION.INSERTED,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "215.0.
|
|
2
|
+
export const version = "215.0.5";
|
|
@@ -4,8 +4,6 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
4
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
5
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
7
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
9
|
/**
|
|
@@ -21,7 +19,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
21
19
|
import EditorContentContainer from '../EditorContentContainer/EditorContentContainer';
|
|
22
20
|
import PluginSlot from '../PluginSlot';
|
|
23
21
|
import WithFlash from '../WithFlash';
|
|
24
|
-
var AK_EDITOR_CHROMELESS_MIN_HEIGHT_VAR = '--ak-editor-chromeless-min-height';
|
|
25
22
|
var scrollbarStylesNew = css({
|
|
26
23
|
msOverflowStyle: '-ms-autohiding-scrollbar',
|
|
27
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
@@ -63,18 +60,6 @@ var chromelessEditorStylesNew = css({
|
|
|
63
60
|
}
|
|
64
61
|
}
|
|
65
62
|
});
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* minHeight styles are needed to expand the clickable area of ProseMirror.
|
|
69
|
-
* Here, we propagate the minHeight that's used in the editor container to ProseMirror.
|
|
70
|
-
*/
|
|
71
|
-
var minHeightStyles = css({
|
|
72
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
73
|
-
'div > .ProseMirror': {
|
|
74
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
75
|
-
minHeight: "var(".concat(AK_EDITOR_CHROMELESS_MIN_HEIGHT_VAR, ")")
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
63
|
var extraSpaceLastLineFix = css({
|
|
79
64
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
80
65
|
'.ProseMirror': {
|
|
@@ -192,11 +177,11 @@ export function ChromelessEditorContainer(_ref3) {
|
|
|
192
177
|
children = _ref3.children,
|
|
193
178
|
containerRef = _ref3.containerRef;
|
|
194
179
|
return jsx("div", {
|
|
195
|
-
css: [chromelessEditorStylesNew, scrollbarStylesNew, fg('
|
|
196
|
-
style:
|
|
180
|
+
css: [chromelessEditorStylesNew, scrollbarStylesNew, fg('platform_fix_extra_space_last_line_comment_editor') && extraSpaceLastLineFix],
|
|
181
|
+
style: {
|
|
197
182
|
maxHeight: maxHeight ? "".concat(maxHeight, "px") : undefined,
|
|
198
183
|
minHeight: "".concat(minHeight, "px")
|
|
199
|
-
},
|
|
184
|
+
},
|
|
200
185
|
"data-testid": "chromeless-editor",
|
|
201
186
|
id: "chromeless-editor",
|
|
202
187
|
ref: containerRef
|
|
@@ -35,7 +35,7 @@ var commentEditorStyles = css({
|
|
|
35
35
|
display: 'flex',
|
|
36
36
|
flexDirection: 'column',
|
|
37
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
38
|
-
'.less-margin .ProseMirror': {
|
|
38
|
+
'.less-margin > .ProseMirror': {
|
|
39
39
|
margin: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-100, 8px)", " ", "var(--ds-space-100, 8px)")
|
|
40
40
|
},
|
|
41
41
|
minWidth: '272px',
|
|
@@ -224,16 +224,6 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
226
|
}, []);
|
|
227
|
-
var shouldSetHiddenDataAttribute = function shouldSetHiddenDataAttribute() {
|
|
228
|
-
// When platform_editor_controls_performance_fixes is enabled we use a different method to
|
|
229
|
-
// determine if the toolbar is hidden from outside of the editor, which doesn't require setting
|
|
230
|
-
// data-editor-primary-toolbar-hidden on the content area
|
|
231
|
-
// NOTE: When tidying, this function and the data attribute can be removed
|
|
232
|
-
if (!props.isEditorToolbarHidden || editorExperiment('platform_editor_controls_performance_fixes', true)) {
|
|
233
|
-
return false;
|
|
234
|
-
}
|
|
235
|
-
return editorExperiment('platform_editor_controls', 'variant1');
|
|
236
|
-
};
|
|
237
227
|
return jsx("div", {
|
|
238
228
|
css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
|
|
239
229
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
@@ -269,7 +259,6 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
269
259
|
,
|
|
270
260
|
className: "ak-editor-content-area-region",
|
|
271
261
|
"data-editor-editable-content": true,
|
|
272
|
-
"data-editor-primary-toolbar-hidden": shouldSetHiddenDataAttribute() ? 'true' : undefined,
|
|
273
262
|
role: "region",
|
|
274
263
|
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
275
264
|
ref: contentAreaRef
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
3
2
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
4
3
|
/**
|
|
5
4
|
* @jsxRuntime classic
|
|
@@ -18,6 +17,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
|
|
|
18
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
18
|
import { expValNoExposure } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
20
19
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
20
|
+
import { getBaseFontSize } from '../../composable-editor/utils/getBaseFontSize';
|
|
21
21
|
import { aiPanelBaseFirefoxStyles, aiPanelBaseStyles, aiPanelDarkFirefoxStyles, aiPanelDarkStyles } from './styles/aiPanel';
|
|
22
22
|
import { annotationStyles } from './styles/annotationStyles';
|
|
23
23
|
import { backgroundColorStyles, textHighlightPaddingStyles } from './styles/backgroundColorStyles';
|
|
@@ -32,7 +32,7 @@ import { cursorStyles } from './styles/cursorStyles';
|
|
|
32
32
|
import { dangerDateStyles, dateStyles, dateVanillaStyles } from './styles/dateStyles';
|
|
33
33
|
import { editorUGCTokensDefault, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
|
|
34
34
|
import { embedCardStyles } from './styles/embedCardStyles';
|
|
35
|
-
import { emojiDangerStyles, emojiStyles } from './styles/emoji';
|
|
35
|
+
import { emojiDangerStyles, emojiStyles, getDenseEmojiStyles } from './styles/emoji';
|
|
36
36
|
import { expandStyles, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes } from './styles/expandStyles';
|
|
37
37
|
import { getExtensionStyles } from './styles/extensionStyles';
|
|
38
38
|
import { findReplaceStyles, findReplaceStylesNew } from './styles/findReplaceStyles';
|
|
@@ -108,12 +108,14 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
108
108
|
children = props.children,
|
|
109
109
|
viewMode = props.viewMode,
|
|
110
110
|
isScrollable = props.isScrollable,
|
|
111
|
-
appearance = props.appearance
|
|
111
|
+
appearance = props.appearance,
|
|
112
|
+
contentMode = props.contentMode;
|
|
112
113
|
var theme = useTheme();
|
|
113
114
|
var _useThemeObserver = useThemeObserver(),
|
|
114
115
|
colorMode = _useThemeObserver.colorMode;
|
|
115
116
|
var isFullPage = appearance === 'full-page' || appearance === 'full-width';
|
|
116
117
|
var isComment = appearance === 'comment';
|
|
118
|
+
var baseFontSize = getBaseFontSize(appearance, contentMode);
|
|
117
119
|
var style = editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
118
120
|
exposure: true
|
|
119
121
|
}) ? {
|
|
@@ -385,6 +387,10 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
385
387
|
mentionsStylesMixin_platform_editor_centre_mention_padding,
|
|
386
388
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
387
389
|
emojiStyles,
|
|
390
|
+
// Dense emoji scaling based on base font size
|
|
391
|
+
expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') &&
|
|
392
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
393
|
+
getDenseEmojiStyles(baseFontSize),
|
|
388
394
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
389
395
|
panelViewStyles,
|
|
390
396
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { defaultEmojiHeight, EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
5
|
-
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
5
|
+
import { akEditorFullPageDefaultFontSize, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
import { blanketSelectionStyles, boxShadowSelectionStyles, dangerBackgroundStyles, dangerBorderStyles, hideNativeBrowserTextSelectionStyles } from './selectionStyles';
|
|
7
7
|
var emojiSelectionStyles = css({
|
|
8
8
|
borderRadius: "var(--ds-radius-xsmall, 2px)"
|
|
@@ -30,6 +30,32 @@ boxShadowSelectionStyles,
|
|
|
30
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
31
31
|
hideNativeBrowserTextSelectionStyles])));
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Gets dynamic emoji styles that scale emoji size based on the base font size.
|
|
35
|
+
* This allows emojis to scale proportionally when the base font size changes.
|
|
36
|
+
* @param baseFontSize - The base font size in pixels (e.g., 16 for default, 13 for dense mode)
|
|
37
|
+
* @returns SerializedStyles with emoji size overrides if baseFontSize is provided and different from default.
|
|
38
|
+
*/
|
|
39
|
+
export var getDenseEmojiStyles = function getDenseEmojiStyles(baseFontSize) {
|
|
40
|
+
if (!baseFontSize || baseFontSize === akEditorFullPageDefaultFontSize) {
|
|
41
|
+
return css({});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Calculate emoji size based on base font size
|
|
45
|
+
// Default: 20px emoji at 16px base font
|
|
46
|
+
// Scaled: 20px * (baseFontSize/16)
|
|
47
|
+
// E.g., dense mode (13px base): 20px * (13/16) = 16.25px
|
|
48
|
+
var emojiSize = defaultEmojiHeight * baseFontSize / 16;
|
|
49
|
+
return css(_defineProperty({}, ".ProseMirror :is(.".concat(EmojiSharedCssClassName.EMOJI_SPRITE, ", .").concat(EmojiSharedCssClassName.EMOJI_IMAGE, ")"), {
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
51
|
+
width: emojiSize,
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
53
|
+
height: emojiSize,
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
55
|
+
maxHeight: emojiSize
|
|
56
|
+
}));
|
|
57
|
+
};
|
|
58
|
+
|
|
33
59
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
34
60
|
export var emojiDangerStyles = css(_defineProperty({}, ".ProseMirror .".concat(akEditorSelectedNodeClassName, ".danger"), _defineProperty({}, ".".concat(EmojiSharedCssClassName.EMOJI_SPRITE, ", .").concat(EmojiSharedCssClassName.EMOJI_IMAGE), [
|
|
35
61
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import { akEditorGutterPadding } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
5
|
export var syncBlockStyles = css({
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
7
7
|
'.ProseMirror': {
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
9
9
|
'.ak-editor-sync-block': {
|
|
10
|
+
position: 'relative',
|
|
10
11
|
cursor: 'pointer',
|
|
11
12
|
/* Danger when top level node */
|
|
12
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -18,25 +19,26 @@ export var syncBlockStyles = css({
|
|
|
18
19
|
'.ak-editor-panel__icon': {
|
|
19
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
20
21
|
color: "var(--ds-icon-danger, #C9372C)".concat(" !important")
|
|
22
|
+
},
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
24
|
+
'.ak-editor-sync-block__label': {
|
|
25
|
+
color: "var(--ds-icon-danger, #C9372C)",
|
|
26
|
+
backgroundColor: "var(--ds-background-danger-hovered, #FFD5D2)"
|
|
21
27
|
}
|
|
22
28
|
},
|
|
23
|
-
|
|
29
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
24
30
|
marginTop: "var(--ds-space-150, 12px)",
|
|
25
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
26
|
-
marginRight: "-".concat(
|
|
32
|
+
marginRight: "-".concat(akEditorGutterPadding, "px"),
|
|
27
33
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
28
|
-
marginLeft: "-".concat(
|
|
34
|
+
marginLeft: "-".concat(akEditorGutterPadding, "px"),
|
|
29
35
|
marginBottom: 0,
|
|
30
|
-
paddingTop:
|
|
31
|
-
paddingBottom:
|
|
32
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
33
|
-
paddingRight: "".concat(akEditorGutterPaddingDynamic() - 32, "px"),
|
|
34
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
35
|
-
paddingLeft: "".concat(akEditorGutterPaddingDynamic() - 32, "px"),
|
|
36
|
+
paddingTop: "var(--ds-space-050, 4px)",
|
|
37
|
+
paddingBottom: "var(--ds-space-050, 4px)",
|
|
36
38
|
color: 'inherit',
|
|
37
39
|
'&:hover': {
|
|
38
40
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
39
|
-
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-
|
|
41
|
+
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-accent-purple, #8270DB)")
|
|
40
42
|
},
|
|
41
43
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
42
44
|
'.ak-editor-sync-block__editor': {
|
|
@@ -50,7 +52,28 @@ export var syncBlockStyles = css({
|
|
|
50
52
|
},
|
|
51
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
52
54
|
'.ak-editor-sync-block.ak-editor-selected-node:not(.danger)': {
|
|
53
|
-
boxShadow: "0 0 0 1px ".concat("var(--ds-
|
|
54
|
-
|
|
55
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-accent-purple, #8270DB)")
|
|
56
|
+
},
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
58
|
+
'.ak-editor-sync-block.ak-editor-selected-node': {
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
60
|
+
'.ak-editor-sync-block__label': {
|
|
61
|
+
display: 'unset'
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
65
|
+
'.ak-editor-sync-block__label': {
|
|
66
|
+
color: "var(--ds-text-accent-purple, #5E4DB2)",
|
|
67
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
68
|
+
position: 'absolute',
|
|
69
|
+
display: 'none',
|
|
70
|
+
paddingLeft: "var(--ds-space-100, 8px)",
|
|
71
|
+
paddingRight: "var(--ds-space-100, 8px)",
|
|
72
|
+
paddingBottom: "var(--ds-space-050, 4px)",
|
|
73
|
+
paddingTop: "var(--ds-space-050, 4px)",
|
|
74
|
+
// height of label (32px) + space between sync block and label (4px) = 36px
|
|
75
|
+
top: '-36px',
|
|
76
|
+
right: '0px',
|
|
77
|
+
backgroundColor: "var(--ds-background-accent-purple-subtlest, #F3F0FF)"
|
|
55
78
|
}
|
|
56
79
|
});
|
|
@@ -9,13 +9,12 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEve
|
|
|
9
9
|
import { getQuickInsertItemsFromModule, resolveImport } from '@atlaskit/editor-common/extensions';
|
|
10
10
|
import { combineProviders } from '@atlaskit/editor-common/provider-helpers';
|
|
11
11
|
import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
/**
|
|
14
13
|
* Utils to send analytics event when a extension is inserted using quickInsert
|
|
15
14
|
*/
|
|
16
15
|
function sendExtensionQuickInsertAnalytics(item, selection, createAnalyticsEvent, source) {
|
|
17
16
|
if (createAnalyticsEvent) {
|
|
18
|
-
var insertLocation =
|
|
17
|
+
var insertLocation = findInsertLocation(selection);
|
|
19
18
|
fireAnalyticsEvent(createAnalyticsEvent)({
|
|
20
19
|
payload: {
|
|
21
20
|
action: ACTION.INSERTED,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "215.0.
|
|
2
|
+
export var version = "215.0.5";
|
|
@@ -461,6 +461,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
461
461
|
commands: {
|
|
462
462
|
setAnimatingPlaceholderPrompts: (placeholderPrompts: string[]) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
463
463
|
setPlaceholder: (placeholder: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
464
|
+
setPlaceholderHidden: (isPlaceholderHidden: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
464
465
|
};
|
|
465
466
|
dependencies: [import("@atlaskit/editor-plugins/focus").FocusPlugin, import("@atlaskit/editor-plugins/composition").CompositionPlugin, import("@atlaskit/editor-plugins/type-ahead").TypeAheadPlugin, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/show-diff").ShowDiffPlugin>];
|
|
466
467
|
pluginConfiguration: import("@atlaskit/editor-plugins/placeholder").PlaceholderPluginOptions | undefined;
|
|
@@ -522,6 +522,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
522
522
|
commands: {
|
|
523
523
|
setAnimatingPlaceholderPrompts: (placeholderPrompts: string[]) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
524
524
|
setPlaceholder: (placeholder: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
525
|
+
setPlaceholderHidden: (isPlaceholderHidden: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
525
526
|
};
|
|
526
527
|
dependencies: [import("@atlaskit/editor-plugins/focus").FocusPlugin, import("@atlaskit/editor-plugins/composition").CompositionPlugin, import("@atlaskit/editor-plugins/type-ahead").TypeAheadPlugin, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/show-diff").ShowDiffPlugin>];
|
|
527
528
|
pluginConfiguration: import("@atlaskit/editor-plugins/placeholder").PlaceholderPluginOptions | undefined;
|
|
@@ -461,6 +461,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
461
461
|
commands: {
|
|
462
462
|
setAnimatingPlaceholderPrompts: (placeholderPrompts: string[]) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
463
463
|
setPlaceholder: (placeholder: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
464
|
+
setPlaceholderHidden: (isPlaceholderHidden: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
464
465
|
};
|
|
465
466
|
dependencies: [import("@atlaskit/editor-plugins/focus").FocusPlugin, import("@atlaskit/editor-plugins/composition").CompositionPlugin, import("@atlaskit/editor-plugins/type-ahead").TypeAheadPlugin, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/show-diff").ShowDiffPlugin>];
|
|
466
467
|
pluginConfiguration: import("@atlaskit/editor-plugins/placeholder").PlaceholderPluginOptions | undefined;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { type SerializedStyles } from '@emotion/react';
|
|
2
2
|
export declare const emojiStyles: SerializedStyles;
|
|
3
|
+
/**
|
|
4
|
+
* Gets dynamic emoji styles that scale emoji size based on the base font size.
|
|
5
|
+
* This allows emojis to scale proportionally when the base font size changes.
|
|
6
|
+
* @param baseFontSize - The base font size in pixels (e.g., 16 for default, 13 for dense mode)
|
|
7
|
+
* @returns SerializedStyles with emoji size overrides if baseFontSize is provided and different from default.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getDenseEmojiStyles: (baseFontSize?: number) => SerializedStyles;
|
|
3
10
|
export declare const emojiDangerStyles: SerializedStyles;
|
|
@@ -650,6 +650,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
650
650
|
commands: {
|
|
651
651
|
setAnimatingPlaceholderPrompts: (placeholderPrompts: string[]) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
652
652
|
setPlaceholder: (placeholder: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
653
|
+
setPlaceholderHidden: (isPlaceholderHidden: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
653
654
|
};
|
|
654
655
|
dependencies: [
|
|
655
656
|
import("@atlaskit/editor-plugins/focus").FocusPlugin,
|
|
@@ -711,6 +711,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
711
711
|
commands: {
|
|
712
712
|
setAnimatingPlaceholderPrompts: (placeholderPrompts: string[]) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
713
713
|
setPlaceholder: (placeholder: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
714
|
+
setPlaceholderHidden: (isPlaceholderHidden: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
714
715
|
};
|
|
715
716
|
dependencies: [
|
|
716
717
|
import("@atlaskit/editor-plugins/focus").FocusPlugin,
|
|
@@ -650,6 +650,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
650
650
|
commands: {
|
|
651
651
|
setAnimatingPlaceholderPrompts: (placeholderPrompts: string[]) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
652
652
|
setPlaceholder: (placeholder: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
653
|
+
setPlaceholderHidden: (isPlaceholderHidden: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
653
654
|
};
|
|
654
655
|
dependencies: [
|
|
655
656
|
import("@atlaskit/editor-plugins/focus").FocusPlugin,
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { type SerializedStyles } from '@emotion/react';
|
|
2
2
|
export declare const emojiStyles: SerializedStyles;
|
|
3
|
+
/**
|
|
4
|
+
* Gets dynamic emoji styles that scale emoji size based on the base font size.
|
|
5
|
+
* This allows emojis to scale proportionally when the base font size changes.
|
|
6
|
+
* @param baseFontSize - The base font size in pixels (e.g., 16 for default, 13 for dense mode)
|
|
7
|
+
* @returns SerializedStyles with emoji size overrides if baseFontSize is provided and different from default.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getDenseEmojiStyles: (baseFontSize?: number) => SerializedStyles;
|
|
3
10
|
export declare const emojiDangerStyles: SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "215.0.
|
|
3
|
+
"version": "215.0.6",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
65
65
|
"@atlaskit/react-ufo": "^4.11.0",
|
|
66
66
|
"@atlaskit/task-decision": "^19.2.0",
|
|
67
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
67
|
+
"@atlaskit/tmp-editor-statsig": "^13.10.0",
|
|
68
68
|
"@atlaskit/tokens": "^6.4.0",
|
|
69
69
|
"@atlaskit/tooltip": "^20.5.0",
|
|
70
70
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"@atlaskit/media-test-helpers": "^39.0.0",
|
|
106
106
|
"@atlaskit/modal-dialog": "^14.5.0",
|
|
107
107
|
"@atlaskit/primitives": "^14.15.0",
|
|
108
|
-
"@atlaskit/renderer": "^124.
|
|
108
|
+
"@atlaskit/renderer": "^124.3.0",
|
|
109
109
|
"@atlaskit/section-message": "^8.7.0",
|
|
110
110
|
"@atlaskit/smart-card": "^43.1.0",
|
|
111
111
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
@@ -150,6 +150,9 @@
|
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
152
|
"platform-feature-flags": {
|
|
153
|
+
"aifc_use_llm_space_recommendations": {
|
|
154
|
+
"type": "boolean"
|
|
155
|
+
},
|
|
153
156
|
"confluence_floating_toolbar_animation": {
|
|
154
157
|
"type": "boolean"
|
|
155
158
|
},
|
|
@@ -298,9 +301,6 @@
|
|
|
298
301
|
"type": "boolean",
|
|
299
302
|
"referenceOnly": true
|
|
300
303
|
},
|
|
301
|
-
"platform_nested_nbm_analytics_location": {
|
|
302
|
-
"type": "boolean"
|
|
303
|
-
},
|
|
304
304
|
"platform_editor_add_media_from_url_rollout": {
|
|
305
305
|
"type": "boolean"
|
|
306
306
|
},
|
|
@@ -422,9 +422,6 @@
|
|
|
422
422
|
"platform_editor_controls_increase_full_page_gutter": {
|
|
423
423
|
"type": "boolean"
|
|
424
424
|
},
|
|
425
|
-
"platform_expand_editor_click_area_with_minheight": {
|
|
426
|
-
"type": "boolean"
|
|
427
|
-
},
|
|
428
425
|
"cc_editor_focus_before_editor_on_load": {
|
|
429
426
|
"type": "boolean"
|
|
430
427
|
},
|