@atlaskit/editor-core 215.1.0 → 215.1.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 +8 -0
- package/dist/cjs/create-editor/ReactEditorView.js +28 -0
- package/dist/cjs/ui/EditorContentContainer/styles/emoji.js +14 -3
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +27 -0
- package/dist/es2019/ui/EditorContentContainer/styles/emoji.js +16 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +28 -0
- package/dist/esm/ui/EditorContentContainer/styles/emoji.js +14 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 215.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`dbb9e84ab30e0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dbb9e84ab30e0) -
|
|
8
|
+
[ux] dense mode emoji icon in panel
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 215.1.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -439,6 +439,31 @@ function ReactEditorView(props) {
|
|
|
439
439
|
var ttfb = (0, _navigation.getResponseEndTime)();
|
|
440
440
|
var contextIdentifier = (_pluginInjectionAPI$c2 = pluginInjectionAPI.current.api().base) === null || _pluginInjectionAPI$c2 === void 0 ? void 0 : _pluginInjectionAPI$c2.sharedState.currentState();
|
|
441
441
|
var nodesInViewport = (0, _expValEquals.expValEquals)('platform_editor_ttvc_nodes_in_viewport', 'isEnabled', true) ? (0, _getNodesVisibleInViewport.getNodesVisibleInViewport)(viewRef.current.dom) : {};
|
|
442
|
+
var nodeSize = viewRef.current.state.doc.nodeSize;
|
|
443
|
+
var _ref4 = (0, _expValEquals.expValEquals)('cc_editor_insm_doc_size_stats', 'isEnabled', true) ? {
|
|
444
|
+
totalNodes: Object.values(nodes).reduce(function (acc, curr) {
|
|
445
|
+
return acc + curr;
|
|
446
|
+
}, 0),
|
|
447
|
+
// Computed on client for dimension bucketing in Statsig
|
|
448
|
+
nodeSizeBucket: function () {
|
|
449
|
+
switch (true) {
|
|
450
|
+
case nodeSize < 10000:
|
|
451
|
+
return '<10000';
|
|
452
|
+
case nodeSize < 20000:
|
|
453
|
+
return '<20000';
|
|
454
|
+
case nodeSize < 30000:
|
|
455
|
+
return '<30000';
|
|
456
|
+
case nodeSize < 40000:
|
|
457
|
+
return '<40000';
|
|
458
|
+
case nodeSize < 50000:
|
|
459
|
+
return '<50000';
|
|
460
|
+
default:
|
|
461
|
+
return '50000+';
|
|
462
|
+
}
|
|
463
|
+
}()
|
|
464
|
+
} : {},
|
|
465
|
+
totalNodes = _ref4.totalNodes,
|
|
466
|
+
nodeSizeBucket = _ref4.nodeSizeBucket;
|
|
442
467
|
dispatchAnalyticsEvent({
|
|
443
468
|
action: _analytics.ACTION.PROSEMIRROR_RENDERED,
|
|
444
469
|
actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
|
|
@@ -447,6 +472,9 @@ function ReactEditorView(props) {
|
|
|
447
472
|
startTime: startTime,
|
|
448
473
|
nodes: nodes,
|
|
449
474
|
nodesInViewport: nodesInViewport,
|
|
475
|
+
nodeSize: nodeSize,
|
|
476
|
+
nodeSizeBucket: nodeSizeBucket,
|
|
477
|
+
totalNodes: totalNodes,
|
|
450
478
|
ttfb: ttfb,
|
|
451
479
|
severity: proseMirrorRenderedSeverity,
|
|
452
480
|
objectId: contextIdentifier === null || contextIdentifier === void 0 ? void 0 : contextIdentifier.objectId,
|
|
@@ -53,14 +53,25 @@ var getDenseEmojiStyles = exports.getDenseEmojiStyles = function getDenseEmojiSt
|
|
|
53
53
|
// Default: 20px emoji at 16px base font
|
|
54
54
|
// Scaled: 20px * (baseFontSize/16)
|
|
55
55
|
// E.g., dense mode (13px base): 20px * (13/16) = 16.25px
|
|
56
|
-
var emojiSize = _emoji.defaultEmojiHeight * baseFontSize /
|
|
57
|
-
return (0, _react.css)((0, _defineProperty2.default)({}, ".ProseMirror :is(.".concat(_emoji.EmojiSharedCssClassName.EMOJI_SPRITE, ", .").concat(_emoji.EmojiSharedCssClassName.EMOJI_IMAGE, ")"), {
|
|
56
|
+
var emojiSize = _emoji.defaultEmojiHeight * baseFontSize / _editorSharedStyles.akEditorFullPageDefaultFontSize;
|
|
57
|
+
return (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".ProseMirror :is(.".concat(_emoji.EmojiSharedCssClassName.EMOJI_SPRITE, ", .").concat(_emoji.EmojiSharedCssClassName.EMOJI_IMAGE, ")"), {
|
|
58
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
59
59
|
width: emojiSize,
|
|
60
60
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
61
61
|
height: emojiSize,
|
|
62
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
63
|
-
maxHeight: emojiSize
|
|
63
|
+
maxHeight: emojiSize,
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
65
|
+
img: {
|
|
66
|
+
width: '100%',
|
|
67
|
+
height: '100%',
|
|
68
|
+
objectFit: 'contain'
|
|
69
|
+
}
|
|
70
|
+
}), '.ProseMirror .ak-editor-panel .ak-editor-panel__icon', {
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
72
|
+
height: "var(--ds-space-250, 20px)",
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
74
|
+
width: "var(--ds-space-250, 20px)"
|
|
64
75
|
}));
|
|
65
76
|
};
|
|
66
77
|
|
|
@@ -409,6 +409,30 @@ export function ReactEditorView(props) {
|
|
|
409
409
|
const ttfb = getResponseEndTime();
|
|
410
410
|
const contextIdentifier = (_pluginInjectionAPI$c4 = pluginInjectionAPI.current.api().base) === null || _pluginInjectionAPI$c4 === void 0 ? void 0 : _pluginInjectionAPI$c4.sharedState.currentState();
|
|
411
411
|
const nodesInViewport = expValEquals('platform_editor_ttvc_nodes_in_viewport', 'isEnabled', true) ? getNodesVisibleInViewport(viewRef.current.dom) : {};
|
|
412
|
+
const nodeSize = viewRef.current.state.doc.nodeSize;
|
|
413
|
+
const {
|
|
414
|
+
totalNodes,
|
|
415
|
+
nodeSizeBucket
|
|
416
|
+
} = expValEquals('cc_editor_insm_doc_size_stats', 'isEnabled', true) ? {
|
|
417
|
+
totalNodes: Object.values(nodes).reduce((acc, curr) => acc + curr, 0),
|
|
418
|
+
// Computed on client for dimension bucketing in Statsig
|
|
419
|
+
nodeSizeBucket: (() => {
|
|
420
|
+
switch (true) {
|
|
421
|
+
case nodeSize < 10000:
|
|
422
|
+
return '<10000';
|
|
423
|
+
case nodeSize < 20000:
|
|
424
|
+
return '<20000';
|
|
425
|
+
case nodeSize < 30000:
|
|
426
|
+
return '<30000';
|
|
427
|
+
case nodeSize < 40000:
|
|
428
|
+
return '<40000';
|
|
429
|
+
case nodeSize < 50000:
|
|
430
|
+
return '<50000';
|
|
431
|
+
default:
|
|
432
|
+
return '50000+';
|
|
433
|
+
}
|
|
434
|
+
})()
|
|
435
|
+
} : {};
|
|
412
436
|
dispatchAnalyticsEvent({
|
|
413
437
|
action: ACTION.PROSEMIRROR_RENDERED,
|
|
414
438
|
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
@@ -417,6 +441,9 @@ export function ReactEditorView(props) {
|
|
|
417
441
|
startTime,
|
|
418
442
|
nodes,
|
|
419
443
|
nodesInViewport,
|
|
444
|
+
nodeSize,
|
|
445
|
+
nodeSizeBucket,
|
|
446
|
+
totalNodes,
|
|
420
447
|
ttfb,
|
|
421
448
|
severity: proseMirrorRenderedSeverity,
|
|
422
449
|
objectId: contextIdentifier === null || contextIdentifier === void 0 ? void 0 : contextIdentifier.objectId,
|
|
@@ -54,7 +54,7 @@ export const getDenseEmojiStyles = baseFontSize => {
|
|
|
54
54
|
// Default: 20px emoji at 16px base font
|
|
55
55
|
// Scaled: 20px * (baseFontSize/16)
|
|
56
56
|
// E.g., dense mode (13px base): 20px * (13/16) = 16.25px
|
|
57
|
-
const emojiSize = defaultEmojiHeight * baseFontSize /
|
|
57
|
+
const emojiSize = defaultEmojiHeight * baseFontSize / akEditorFullPageDefaultFontSize;
|
|
58
58
|
return css({
|
|
59
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
60
|
[`.ProseMirror :is(.${EmojiSharedCssClassName.EMOJI_SPRITE}, .${EmojiSharedCssClassName.EMOJI_IMAGE})`]: {
|
|
@@ -63,7 +63,21 @@ export const getDenseEmojiStyles = baseFontSize => {
|
|
|
63
63
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
64
64
|
height: emojiSize,
|
|
65
65
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
66
|
-
maxHeight: emojiSize
|
|
66
|
+
maxHeight: emojiSize,
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
68
|
+
img: {
|
|
69
|
+
width: '100%',
|
|
70
|
+
height: '100%',
|
|
71
|
+
objectFit: 'contain'
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
// Scale panel icon in dense mode
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
76
|
+
'.ProseMirror .ak-editor-panel .ak-editor-panel__icon': {
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
78
|
+
height: "var(--ds-space-250, 20px)",
|
|
79
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
80
|
+
width: "var(--ds-space-250, 20px)"
|
|
67
81
|
}
|
|
68
82
|
});
|
|
69
83
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "215.0
|
|
2
|
+
export const version = "215.1.0";
|
|
@@ -429,6 +429,31 @@ export function ReactEditorView(props) {
|
|
|
429
429
|
var ttfb = getResponseEndTime();
|
|
430
430
|
var contextIdentifier = (_pluginInjectionAPI$c2 = pluginInjectionAPI.current.api().base) === null || _pluginInjectionAPI$c2 === void 0 ? void 0 : _pluginInjectionAPI$c2.sharedState.currentState();
|
|
431
431
|
var nodesInViewport = expValEquals('platform_editor_ttvc_nodes_in_viewport', 'isEnabled', true) ? getNodesVisibleInViewport(viewRef.current.dom) : {};
|
|
432
|
+
var nodeSize = viewRef.current.state.doc.nodeSize;
|
|
433
|
+
var _ref4 = expValEquals('cc_editor_insm_doc_size_stats', 'isEnabled', true) ? {
|
|
434
|
+
totalNodes: Object.values(nodes).reduce(function (acc, curr) {
|
|
435
|
+
return acc + curr;
|
|
436
|
+
}, 0),
|
|
437
|
+
// Computed on client for dimension bucketing in Statsig
|
|
438
|
+
nodeSizeBucket: function () {
|
|
439
|
+
switch (true) {
|
|
440
|
+
case nodeSize < 10000:
|
|
441
|
+
return '<10000';
|
|
442
|
+
case nodeSize < 20000:
|
|
443
|
+
return '<20000';
|
|
444
|
+
case nodeSize < 30000:
|
|
445
|
+
return '<30000';
|
|
446
|
+
case nodeSize < 40000:
|
|
447
|
+
return '<40000';
|
|
448
|
+
case nodeSize < 50000:
|
|
449
|
+
return '<50000';
|
|
450
|
+
default:
|
|
451
|
+
return '50000+';
|
|
452
|
+
}
|
|
453
|
+
}()
|
|
454
|
+
} : {},
|
|
455
|
+
totalNodes = _ref4.totalNodes,
|
|
456
|
+
nodeSizeBucket = _ref4.nodeSizeBucket;
|
|
432
457
|
dispatchAnalyticsEvent({
|
|
433
458
|
action: ACTION.PROSEMIRROR_RENDERED,
|
|
434
459
|
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
@@ -437,6 +462,9 @@ export function ReactEditorView(props) {
|
|
|
437
462
|
startTime: startTime,
|
|
438
463
|
nodes: nodes,
|
|
439
464
|
nodesInViewport: nodesInViewport,
|
|
465
|
+
nodeSize: nodeSize,
|
|
466
|
+
nodeSizeBucket: nodeSizeBucket,
|
|
467
|
+
totalNodes: totalNodes,
|
|
440
468
|
ttfb: ttfb,
|
|
441
469
|
severity: proseMirrorRenderedSeverity,
|
|
442
470
|
objectId: contextIdentifier === null || contextIdentifier === void 0 ? void 0 : contextIdentifier.objectId,
|
|
@@ -45,14 +45,25 @@ export var getDenseEmojiStyles = function getDenseEmojiStyles(baseFontSize) {
|
|
|
45
45
|
// Default: 20px emoji at 16px base font
|
|
46
46
|
// Scaled: 20px * (baseFontSize/16)
|
|
47
47
|
// E.g., dense mode (13px base): 20px * (13/16) = 16.25px
|
|
48
|
-
var emojiSize = defaultEmojiHeight * baseFontSize /
|
|
49
|
-
return css(_defineProperty({}, ".ProseMirror :is(.".concat(EmojiSharedCssClassName.EMOJI_SPRITE, ", .").concat(EmojiSharedCssClassName.EMOJI_IMAGE, ")"), {
|
|
48
|
+
var emojiSize = defaultEmojiHeight * baseFontSize / akEditorFullPageDefaultFontSize;
|
|
49
|
+
return css(_defineProperty(_defineProperty({}, ".ProseMirror :is(.".concat(EmojiSharedCssClassName.EMOJI_SPRITE, ", .").concat(EmojiSharedCssClassName.EMOJI_IMAGE, ")"), {
|
|
50
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
51
51
|
width: emojiSize,
|
|
52
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
53
53
|
height: emojiSize,
|
|
54
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
55
|
-
maxHeight: emojiSize
|
|
55
|
+
maxHeight: emojiSize,
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
57
|
+
img: {
|
|
58
|
+
width: '100%',
|
|
59
|
+
height: '100%',
|
|
60
|
+
objectFit: 'contain'
|
|
61
|
+
}
|
|
62
|
+
}), '.ProseMirror .ak-editor-panel .ak-editor-panel__icon', {
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
64
|
+
height: "var(--ds-space-250, 20px)",
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
66
|
+
width: "var(--ds-space-250, 20px)"
|
|
56
67
|
}));
|
|
57
68
|
};
|
|
58
69
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "215.0
|
|
2
|
+
export var version = "215.1.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "215.1.
|
|
3
|
+
"version": "215.1.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"uuid": "^3.1.0"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
|
-
"@atlaskit/editor-common": "^110.
|
|
84
|
+
"@atlaskit/editor-common": "^110.11.0",
|
|
85
85
|
"@atlaskit/link-provider": "^4.0.0",
|
|
86
86
|
"@atlaskit/media-core": "^37.0.0",
|
|
87
87
|
"react": "^18.2.0",
|