@atlaskit/emoji 73.10.4 → 73.10.5
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/components/common/EmojiPlaceholder.js +1 -22
- package/dist/cjs/components/common/SpriteEmoji.js +4 -17
- package/dist/cjs/util/analytics/createEvent.js +1 -1
- package/dist/es2019/components/common/EmojiPlaceholder.js +2 -22
- package/dist/es2019/components/common/SpriteEmoji.js +4 -17
- package/dist/es2019/util/analytics/createEvent.js +1 -1
- package/dist/esm/components/common/EmojiPlaceholder.js +2 -23
- package/dist/esm/components/common/SpriteEmoji.js +4 -17
- package/dist/esm/util/analytics/createEvent.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/emoji
|
|
2
2
|
|
|
3
|
+
## 73.10.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7413f134758c7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7413f134758c7) -
|
|
8
|
+
Keep the shipped emoji scaling behavior in the editor and renderer and remove its experiment.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 73.10.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -16,7 +16,6 @@ Object.defineProperty(exports, "emojiPlaceholderTestId", {
|
|
|
16
16
|
require("./EmojiPlaceholder.compiled.css");
|
|
17
17
|
var React = _interopRequireWildcard(require("react"));
|
|
18
18
|
var _runtime = require("@compiled/react/runtime");
|
|
19
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
20
19
|
var _constants = require("../../util/constants");
|
|
21
20
|
var _emojiPlaceholderTestId = require("./emojiPlaceholderTestId");
|
|
22
21
|
var _styles = require("./styles");
|
|
@@ -24,34 +23,14 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
24
23
|
var placeholderContainer = null;
|
|
25
24
|
var EmojiPlaceholder = function EmojiPlaceholder(props) {
|
|
26
25
|
var shortName = props.shortName,
|
|
27
|
-
_props$size = props.size,
|
|
28
|
-
size = _props$size === void 0 ? _constants.defaultEmojiHeight : _props$size,
|
|
29
26
|
showTooltip = props.showTooltip,
|
|
30
|
-
representation = props.representation,
|
|
31
27
|
_props$loading = props.loading,
|
|
32
28
|
loading = _props$loading === void 0 ? false : _props$loading,
|
|
33
29
|
xcss = props.xcss;
|
|
34
|
-
var
|
|
35
|
-
var scaledHeight;
|
|
36
|
-
if (representation && size) {
|
|
37
|
-
var _width = representation.width;
|
|
38
|
-
var _height = representation.height;
|
|
39
|
-
if (_width && _height) {
|
|
40
|
-
scaledWidth = size / _height * _width;
|
|
41
|
-
scaledHeight = size;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
var width = scaledWidth || size;
|
|
45
|
-
var height = scaledHeight || size;
|
|
46
|
-
var style = (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? {
|
|
30
|
+
var style = {
|
|
47
31
|
fill: 'f7f7f7',
|
|
48
32
|
minWidth: "".concat(_constants.defaultDenseEmojiHeight, "px"),
|
|
49
33
|
minHeight: "".concat(_constants.defaultDenseEmojiHeight, "px")
|
|
50
|
-
} : {
|
|
51
|
-
fill: 'f7f7f7',
|
|
52
|
-
minWidth: "".concat(width, "px"),
|
|
53
|
-
width: "".concat(width, "px"),
|
|
54
|
-
height: "".concat(height, "px")
|
|
55
34
|
};
|
|
56
35
|
return /*#__PURE__*/React.createElement("span", {
|
|
57
36
|
"data-testid": (0, _emojiPlaceholderTestId.emojiPlaceholderTestId)(shortName),
|
|
@@ -11,7 +11,6 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
14
|
var _Emoji = require("./Emoji");
|
|
16
15
|
var _styles = require("./styles");
|
|
17
16
|
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); }
|
|
@@ -29,22 +28,10 @@ var SpriteEmoji = exports.SpriteEmoji = function SpriteEmoji(props) {
|
|
|
29
28
|
var representation = emoji.representation;
|
|
30
29
|
var sprite = representation.sprite;
|
|
31
30
|
var classes = "".concat(_styles.emojiNodeStyles, " ").concat(selected ? _styles.commonSelectedStyles : '', " ").concat(selectOnHover ? _styles.selectOnHoverStyles : '', " ").concat(className ? className : '');
|
|
32
|
-
var sizing = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
minHeight: "".concat(fitToHeight, "px"),
|
|
37
|
-
minWidth: "".concat(fitToHeight, "px")
|
|
38
|
-
};
|
|
39
|
-
} else {
|
|
40
|
-
sizing = {
|
|
41
|
-
width: "".concat(fitToHeight, "px"),
|
|
42
|
-
height: "".concat(fitToHeight, "px"),
|
|
43
|
-
minHeight: "".concat(fitToHeight, "px"),
|
|
44
|
-
minWidth: "".concat(fitToHeight, "px")
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
}
|
|
31
|
+
var sizing = fitToHeight ? {
|
|
32
|
+
minHeight: "".concat(fitToHeight, "px"),
|
|
33
|
+
minWidth: "".concat(fitToHeight, "px")
|
|
34
|
+
} : {};
|
|
48
35
|
var xPositionInPercent = 100 / (sprite.column - 1) * (representation.xIndex - 0);
|
|
49
36
|
var yPositionInPercent = 100 / (sprite.row - 1) * (representation.yIndex - 0);
|
|
50
37
|
var style = _objectSpread({
|
|
@@ -17,7 +17,7 @@ var createEvent = exports.createEvent = function createEvent(eventType, action,
|
|
|
17
17
|
actionSubjectId: actionSubjectId,
|
|
18
18
|
attributes: _objectSpread({
|
|
19
19
|
packageName: "@atlaskit/emoji",
|
|
20
|
-
packageVersion: "73.10.
|
|
20
|
+
packageVersion: "73.10.4"
|
|
21
21
|
}, attributes)
|
|
22
22
|
};
|
|
23
23
|
};
|
|
@@ -3,41 +3,21 @@
|
|
|
3
3
|
import "./EmojiPlaceholder.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import {
|
|
7
|
-
import { defaultEmojiHeight, defaultDenseEmojiHeight } from '../../util/constants';
|
|
6
|
+
import { defaultDenseEmojiHeight } from '../../util/constants';
|
|
8
7
|
import { emojiPlaceholderTestId } from './emojiPlaceholderTestId';
|
|
9
8
|
import { placeholder } from './styles';
|
|
10
9
|
const placeholderContainer = null;
|
|
11
10
|
const EmojiPlaceholder = props => {
|
|
12
11
|
const {
|
|
13
12
|
shortName,
|
|
14
|
-
size = defaultEmojiHeight,
|
|
15
13
|
showTooltip,
|
|
16
|
-
representation,
|
|
17
14
|
loading = false,
|
|
18
15
|
xcss
|
|
19
16
|
} = props;
|
|
20
|
-
|
|
21
|
-
let scaledHeight;
|
|
22
|
-
if (representation && size) {
|
|
23
|
-
const width = representation.width;
|
|
24
|
-
const height = representation.height;
|
|
25
|
-
if (width && height) {
|
|
26
|
-
scaledWidth = size / height * width;
|
|
27
|
-
scaledHeight = size;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
const width = scaledWidth || size;
|
|
31
|
-
const height = scaledHeight || size;
|
|
32
|
-
const style = expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? {
|
|
17
|
+
const style = {
|
|
33
18
|
fill: 'f7f7f7',
|
|
34
19
|
minWidth: `${defaultDenseEmojiHeight}px`,
|
|
35
20
|
minHeight: `${defaultDenseEmojiHeight}px`
|
|
36
|
-
} : {
|
|
37
|
-
fill: 'f7f7f7',
|
|
38
|
-
minWidth: `${width}px`,
|
|
39
|
-
width: `${width}px`,
|
|
40
|
-
height: `${height}px`
|
|
41
21
|
};
|
|
42
22
|
return /*#__PURE__*/React.createElement("span", {
|
|
43
23
|
"data-testid": emojiPlaceholderTestId(shortName),
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { EmojiNodeWrapper } from './Emoji';
|
|
7
6
|
import { emojiNodeStyles, commonSelectedStyles, selectOnHoverStyles, emojiSprite } from './styles';
|
|
8
7
|
|
|
@@ -20,22 +19,10 @@ export const SpriteEmoji = props => {
|
|
|
20
19
|
const representation = emoji.representation;
|
|
21
20
|
const sprite = representation.sprite;
|
|
22
21
|
const classes = `${emojiNodeStyles} ${selected ? commonSelectedStyles : ''} ${selectOnHover ? selectOnHoverStyles : ''} ${className ? className : ''}`;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
minHeight: `${fitToHeight}px`,
|
|
28
|
-
minWidth: `${fitToHeight}px`
|
|
29
|
-
};
|
|
30
|
-
} else {
|
|
31
|
-
sizing = {
|
|
32
|
-
width: `${fitToHeight}px`,
|
|
33
|
-
height: `${fitToHeight}px`,
|
|
34
|
-
minHeight: `${fitToHeight}px`,
|
|
35
|
-
minWidth: `${fitToHeight}px`
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
}
|
|
22
|
+
const sizing = fitToHeight ? {
|
|
23
|
+
minHeight: `${fitToHeight}px`,
|
|
24
|
+
minWidth: `${fitToHeight}px`
|
|
25
|
+
} : {};
|
|
39
26
|
const xPositionInPercent = 100 / (sprite.column - 1) * (representation.xIndex - 0);
|
|
40
27
|
const yPositionInPercent = 100 / (sprite.row - 1) * (representation.yIndex - 0);
|
|
41
28
|
const style = {
|
|
@@ -3,41 +3,20 @@
|
|
|
3
3
|
import "./EmojiPlaceholder.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import {
|
|
7
|
-
import { defaultEmojiHeight, defaultDenseEmojiHeight } from '../../util/constants';
|
|
6
|
+
import { defaultDenseEmojiHeight } from '../../util/constants';
|
|
8
7
|
import { emojiPlaceholderTestId } from './emojiPlaceholderTestId';
|
|
9
8
|
import { placeholder } from './styles';
|
|
10
9
|
var placeholderContainer = null;
|
|
11
10
|
var EmojiPlaceholder = function EmojiPlaceholder(props) {
|
|
12
11
|
var shortName = props.shortName,
|
|
13
|
-
_props$size = props.size,
|
|
14
|
-
size = _props$size === void 0 ? defaultEmojiHeight : _props$size,
|
|
15
12
|
showTooltip = props.showTooltip,
|
|
16
|
-
representation = props.representation,
|
|
17
13
|
_props$loading = props.loading,
|
|
18
14
|
loading = _props$loading === void 0 ? false : _props$loading,
|
|
19
15
|
xcss = props.xcss;
|
|
20
|
-
var
|
|
21
|
-
var scaledHeight;
|
|
22
|
-
if (representation && size) {
|
|
23
|
-
var _width = representation.width;
|
|
24
|
-
var _height = representation.height;
|
|
25
|
-
if (_width && _height) {
|
|
26
|
-
scaledWidth = size / _height * _width;
|
|
27
|
-
scaledHeight = size;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
var width = scaledWidth || size;
|
|
31
|
-
var height = scaledHeight || size;
|
|
32
|
-
var style = expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? {
|
|
16
|
+
var style = {
|
|
33
17
|
fill: 'f7f7f7',
|
|
34
18
|
minWidth: "".concat(defaultDenseEmojiHeight, "px"),
|
|
35
19
|
minHeight: "".concat(defaultDenseEmojiHeight, "px")
|
|
36
|
-
} : {
|
|
37
|
-
fill: 'f7f7f7',
|
|
38
|
-
minWidth: "".concat(width, "px"),
|
|
39
|
-
width: "".concat(width, "px"),
|
|
40
|
-
height: "".concat(height, "px")
|
|
41
20
|
};
|
|
42
21
|
return /*#__PURE__*/React.createElement("span", {
|
|
43
22
|
"data-testid": emojiPlaceholderTestId(shortName),
|
|
@@ -5,7 +5,6 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
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; }
|
|
7
7
|
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; }
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
8
|
import { EmojiNodeWrapper } from './Emoji';
|
|
10
9
|
import { emojiNodeStyles, commonSelectedStyles, selectOnHoverStyles, emojiSprite } from './styles';
|
|
11
10
|
|
|
@@ -21,22 +20,10 @@ export var SpriteEmoji = function SpriteEmoji(props) {
|
|
|
21
20
|
var representation = emoji.representation;
|
|
22
21
|
var sprite = representation.sprite;
|
|
23
22
|
var classes = "".concat(emojiNodeStyles, " ").concat(selected ? commonSelectedStyles : '', " ").concat(selectOnHover ? selectOnHoverStyles : '', " ").concat(className ? className : '');
|
|
24
|
-
var sizing = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
minHeight: "".concat(fitToHeight, "px"),
|
|
29
|
-
minWidth: "".concat(fitToHeight, "px")
|
|
30
|
-
};
|
|
31
|
-
} else {
|
|
32
|
-
sizing = {
|
|
33
|
-
width: "".concat(fitToHeight, "px"),
|
|
34
|
-
height: "".concat(fitToHeight, "px"),
|
|
35
|
-
minHeight: "".concat(fitToHeight, "px"),
|
|
36
|
-
minWidth: "".concat(fitToHeight, "px")
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
23
|
+
var sizing = fitToHeight ? {
|
|
24
|
+
minHeight: "".concat(fitToHeight, "px"),
|
|
25
|
+
minWidth: "".concat(fitToHeight, "px")
|
|
26
|
+
} : {};
|
|
40
27
|
var xPositionInPercent = 100 / (sprite.column - 1) * (representation.xIndex - 0);
|
|
41
28
|
var yPositionInPercent = 100 / (sprite.row - 1) * (representation.yIndex - 0);
|
|
42
29
|
var style = _objectSpread({
|
|
@@ -10,7 +10,7 @@ export var createEvent = function createEvent(eventType, action, actionSubject,
|
|
|
10
10
|
actionSubjectId: actionSubjectId,
|
|
11
11
|
attributes: _objectSpread({
|
|
12
12
|
packageName: "@atlaskit/emoji",
|
|
13
|
-
packageVersion: "73.10.
|
|
13
|
+
packageVersion: "73.10.4"
|
|
14
14
|
}, attributes)
|
|
15
15
|
};
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/emoji",
|
|
3
|
-
"version": "73.10.
|
|
3
|
+
"version": "73.10.5",
|
|
4
4
|
"description": "Fabric emoji React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/spinner": "^20.4.0",
|
|
54
54
|
"@atlaskit/textfield": "^11.0.0",
|
|
55
55
|
"@atlaskit/theme": "^28.2.0",
|
|
56
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
56
|
+
"@atlaskit/tmp-editor-statsig": "^276.0.0",
|
|
57
57
|
"@atlaskit/tokens": "^20.15.0",
|
|
58
58
|
"@atlaskit/tooltip": "^24.4.0",
|
|
59
59
|
"@atlaskit/ufo": "^2.0.0",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@atlaskit/docs": "^12.3.0",
|
|
83
83
|
"@atlaskit/editor-test-helpers": "workspace:^",
|
|
84
84
|
"@atlaskit/media-core": "^39.0.0",
|
|
85
|
-
"@atlaskit/popup": "^
|
|
85
|
+
"@atlaskit/popup": "^11.0.0",
|
|
86
86
|
"@atlaskit/section-message": "^10.3.0",
|
|
87
87
|
"@atlaskit/ssr": "workspace:^",
|
|
88
88
|
"@atlaskit/util-data-test": "^19.1.0",
|