@atlaskit/emoji 67.4.1 → 67.4.2

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.
Files changed (139) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/components/picker/styles.js +11 -11
  3. package/dist/cjs/version.json +1 -1
  4. package/dist/es2019/components/picker/styles.js +11 -11
  5. package/dist/es2019/version.json +1 -1
  6. package/dist/esm/components/picker/styles.js +11 -11
  7. package/dist/esm/version.json +1 -1
  8. package/dist/types-ts4.5/admin.d.ts +1 -0
  9. package/dist/types-ts4.5/api/EmojiLoader.d.ts +13 -0
  10. package/dist/types-ts4.5/api/EmojiRepository.d.ts +72 -0
  11. package/dist/types-ts4.5/api/EmojiRepositoryRegex.d.ts +1 -0
  12. package/dist/types-ts4.5/api/EmojiResource.d.ts +139 -0
  13. package/dist/types-ts4.5/api/EmojiUtils.d.ts +24 -0
  14. package/dist/types-ts4.5/api/internal/Comparators.d.ts +109 -0
  15. package/dist/types-ts4.5/api/internal/UsageFrequencyTracker.d.ts +46 -0
  16. package/dist/types-ts4.5/api/media/MediaEmojiCache.d.ts +53 -0
  17. package/dist/types-ts4.5/api/media/MediaImageLoader.d.ts +21 -0
  18. package/dist/types-ts4.5/api/media/SiteEmojiResource.d.ts +46 -0
  19. package/dist/types-ts4.5/api/media/TokenManager.d.ts +13 -0
  20. package/dist/types-ts4.5/components/common/CachingEmoji.d.ts +21 -0
  21. package/dist/types-ts4.5/components/common/DeletableEmojiTooltipContent.d.ts +6 -0
  22. package/dist/types-ts4.5/components/common/DeleteButton.d.ts +9 -0
  23. package/dist/types-ts4.5/components/common/Emoji.d.ts +87 -0
  24. package/dist/types-ts4.5/components/common/EmojiActions.d.ts +35 -0
  25. package/dist/types-ts4.5/components/common/EmojiDeletePreview.d.ts +21 -0
  26. package/dist/types-ts4.5/components/common/EmojiErrorMessage.d.ts +15 -0
  27. package/dist/types-ts4.5/components/common/EmojiPlaceholder.d.ts +13 -0
  28. package/dist/types-ts4.5/components/common/EmojiPreviewComponent.d.ts +8 -0
  29. package/dist/types-ts4.5/components/common/EmojiRadioButton.d.ts +13 -0
  30. package/dist/types-ts4.5/components/common/EmojiUploadPicker.d.ts +21 -0
  31. package/dist/types-ts4.5/components/common/EmojiUploadPreview.d.ts +18 -0
  32. package/dist/types-ts4.5/components/common/FileChooser.d.ts +14 -0
  33. package/dist/types-ts4.5/components/common/LoadingEmojiComponent.d.ts +32 -0
  34. package/dist/types-ts4.5/components/common/Popup.d.ts +12 -0
  35. package/dist/types-ts4.5/components/common/RecordSelectionDefault.d.ts +12 -0
  36. package/dist/types-ts4.5/components/common/ResourcedEmoji.d.ts +6 -0
  37. package/dist/types-ts4.5/components/common/ResourcedEmojiComponent.d.ts +48 -0
  38. package/dist/types-ts4.5/components/common/RetryableButton.d.ts +15 -0
  39. package/dist/types-ts4.5/components/common/Scrollable.d.ts +21 -0
  40. package/dist/types-ts4.5/components/common/TonePreviewButton.d.ts +14 -0
  41. package/dist/types-ts4.5/components/common/ToneSelector.d.ts +15 -0
  42. package/dist/types-ts4.5/components/common/ToolTipContentWithKeymap.d.ts +9 -0
  43. package/dist/types-ts4.5/components/common/UfoErrorBoundary.d.ts +8 -0
  44. package/dist/types-ts4.5/components/common/UploadEmoji.d.ts +5 -0
  45. package/dist/types-ts4.5/components/common/internal-types.d.ts +20 -0
  46. package/dist/types-ts4.5/components/common/setSkinToneAriaLabelText.d.ts +1 -0
  47. package/dist/types-ts4.5/components/common/styles.d.ts +56 -0
  48. package/dist/types-ts4.5/components/i18n.d.ts +227 -0
  49. package/dist/types-ts4.5/components/picker/CategorySelector.d.ts +17 -0
  50. package/dist/types-ts4.5/components/picker/CategoryTracker.d.ts +16 -0
  51. package/dist/types-ts4.5/components/picker/EmojiPicker.d.ts +43 -0
  52. package/dist/types-ts4.5/components/picker/EmojiPickerCategoryHeading.d.ts +14 -0
  53. package/dist/types-ts4.5/components/picker/EmojiPickerComponent.d.ts +25 -0
  54. package/dist/types-ts4.5/components/picker/EmojiPickerEmojiRow.d.ts +17 -0
  55. package/dist/types-ts4.5/components/picker/EmojiPickerFooter.d.ts +9 -0
  56. package/dist/types-ts4.5/components/picker/EmojiPickerList.d.ts +94 -0
  57. package/dist/types-ts4.5/components/picker/EmojiPickerListSearch.d.ts +11 -0
  58. package/dist/types-ts4.5/components/picker/EmojiPickerSizes.d.ts +11 -0
  59. package/dist/types-ts4.5/components/picker/EmojiPickerVirtualItems.d.ts +33 -0
  60. package/dist/types-ts4.5/components/picker/VirtualList.d.ts +42 -0
  61. package/dist/types-ts4.5/components/picker/categories.d.ts +7 -0
  62. package/dist/types-ts4.5/components/picker/styles.d.ts +19 -0
  63. package/dist/types-ts4.5/components/picker/utils.d.ts +2 -0
  64. package/dist/types-ts4.5/components/typeahead/EmojiTypeAhead.d.ts +27 -0
  65. package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadComponent.d.ts +74 -0
  66. package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadItem.d.ts +17 -0
  67. package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadList.d.ts +37 -0
  68. package/dist/types-ts4.5/components/typeahead/styles.d.ts +10 -0
  69. package/dist/types-ts4.5/components/uploader/EmojiUploadComponent.d.ts +13 -0
  70. package/dist/types-ts4.5/components/uploader/EmojiUploader.d.ts +20 -0
  71. package/dist/types-ts4.5/components/uploader/styles.d.ts +2 -0
  72. package/dist/types-ts4.5/context/EmojiCommonProvider.d.ts +17 -0
  73. package/dist/types-ts4.5/context/EmojiContext.d.ts +4 -0
  74. package/dist/types-ts4.5/context/EmojiContextProvider.d.ts +7 -0
  75. package/dist/types-ts4.5/context/EmojiPickerListContext.d.ts +10 -0
  76. package/dist/types-ts4.5/element.d.ts +3 -0
  77. package/dist/types-ts4.5/hooks/useEmoji.d.ts +5 -0
  78. package/dist/types-ts4.5/hooks/useEmojiContext.d.ts +4 -0
  79. package/dist/types-ts4.5/hooks/useEmojiPickerListContext.d.ts +1 -0
  80. package/dist/types-ts4.5/hooks/useInView.d.ts +7 -0
  81. package/dist/types-ts4.5/hooks/useIsMounted.d.ts +1 -0
  82. package/dist/types-ts4.5/hooks/usePrevious.d.ts +1 -0
  83. package/dist/types-ts4.5/i18n/cs.d.ts +53 -0
  84. package/dist/types-ts4.5/i18n/da.d.ts +53 -0
  85. package/dist/types-ts4.5/i18n/de.d.ts +53 -0
  86. package/dist/types-ts4.5/i18n/en.d.ts +53 -0
  87. package/dist/types-ts4.5/i18n/en_GB.d.ts +53 -0
  88. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +43 -0
  89. package/dist/types-ts4.5/i18n/es.d.ts +53 -0
  90. package/dist/types-ts4.5/i18n/et.d.ts +39 -0
  91. package/dist/types-ts4.5/i18n/fi.d.ts +53 -0
  92. package/dist/types-ts4.5/i18n/fr.d.ts +53 -0
  93. package/dist/types-ts4.5/i18n/hu.d.ts +53 -0
  94. package/dist/types-ts4.5/i18n/index.d.ts +35 -0
  95. package/dist/types-ts4.5/i18n/is.d.ts +33 -0
  96. package/dist/types-ts4.5/i18n/it.d.ts +53 -0
  97. package/dist/types-ts4.5/i18n/ja.d.ts +53 -0
  98. package/dist/types-ts4.5/i18n/ko.d.ts +53 -0
  99. package/dist/types-ts4.5/i18n/languages.d.ts +27 -0
  100. package/dist/types-ts4.5/i18n/nb.d.ts +53 -0
  101. package/dist/types-ts4.5/i18n/nl.d.ts +53 -0
  102. package/dist/types-ts4.5/i18n/pl.d.ts +53 -0
  103. package/dist/types-ts4.5/i18n/pt_BR.d.ts +53 -0
  104. package/dist/types-ts4.5/i18n/pt_PT.d.ts +39 -0
  105. package/dist/types-ts4.5/i18n/ro.d.ts +33 -0
  106. package/dist/types-ts4.5/i18n/ru.d.ts +53 -0
  107. package/dist/types-ts4.5/i18n/sk.d.ts +39 -0
  108. package/dist/types-ts4.5/i18n/sv.d.ts +53 -0
  109. package/dist/types-ts4.5/i18n/th.d.ts +53 -0
  110. package/dist/types-ts4.5/i18n/tr.d.ts +53 -0
  111. package/dist/types-ts4.5/i18n/uk.d.ts +53 -0
  112. package/dist/types-ts4.5/i18n/vi.d.ts +53 -0
  113. package/dist/types-ts4.5/i18n/zh.d.ts +53 -0
  114. package/dist/types-ts4.5/i18n/zh_TW.d.ts +53 -0
  115. package/dist/types-ts4.5/index.d.ts +26 -0
  116. package/dist/types-ts4.5/picker.d.ts +1 -0
  117. package/dist/types-ts4.5/resource.d.ts +5 -0
  118. package/dist/types-ts4.5/typeahead.d.ts +2 -0
  119. package/dist/types-ts4.5/types.d.ts +363 -0
  120. package/dist/types-ts4.5/util/DuplicateLimitedQueue.d.ts +91 -0
  121. package/dist/types-ts4.5/util/StoredDuplicateLimitedQueue.d.ts +46 -0
  122. package/dist/types-ts4.5/util/analytics/analytics.d.ts +67 -0
  123. package/dist/types-ts4.5/util/analytics/index.d.ts +6 -0
  124. package/dist/types-ts4.5/util/analytics/samplingUfo.d.ts +38 -0
  125. package/dist/types-ts4.5/util/analytics/ufoExperiences.d.ts +14 -0
  126. package/dist/types-ts4.5/util/analytics/useSampledUFOComponentExperience.d.ts +8 -0
  127. package/dist/types-ts4.5/util/browser-support.d.ts +6 -0
  128. package/dist/types-ts4.5/util/constants.d.ts +60 -0
  129. package/dist/types-ts4.5/util/filters.d.ts +8 -0
  130. package/dist/types-ts4.5/util/image.d.ts +10 -0
  131. package/dist/types-ts4.5/util/keymaps.d.ts +14 -0
  132. package/dist/types-ts4.5/util/logger.d.ts +4 -0
  133. package/dist/types-ts4.5/util/mouse.d.ts +8 -0
  134. package/dist/types-ts4.5/util/shared-styles.d.ts +11 -0
  135. package/dist/types-ts4.5/util/storage-available.d.ts +3 -0
  136. package/dist/types-ts4.5/util/type-helpers.d.ts +23 -0
  137. package/dist/types-ts4.5/utils.d.ts +3 -0
  138. package/package.json +1 -1
  139. package/report.api.md +8 -16
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/emoji
2
2
 
3
+ ## 67.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`cccd619ffc5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cccd619ffc5) - fix focus style for category selector
8
+
3
9
  ## 67.4.1
4
10
 
5
11
  ### Patch Changes
@@ -46,7 +46,7 @@ var categorySelector = (0, _react.css)({
46
46
  });
47
47
  exports.categorySelector = categorySelector;
48
48
  var categorySelectorTablist = (0, _react.css)({
49
- padding: '6px 8px',
49
+ padding: "var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-100, 8px)"),
50
50
  display: 'flex',
51
51
  flexDirection: 'row',
52
52
  justifyContent: 'space-around',
@@ -72,14 +72,14 @@ var categoryStyles = (0, _react.css)((_css3 = {
72
72
  borderRadius: "var(--ds-radius-100, 3px)",
73
73
  color: "var(--ds-text-subtlest, ".concat(_colors.N100A, ")"),
74
74
  cursor: 'pointer',
75
- padding: 0,
75
+ padding: "var(--ds-space-0, 0px)",
76
76
  transition: 'color 0.2s ease'
77
77
  }, (0, _defineProperty2.default)(_css3, '&::-moz-focus-inner', {
78
78
  border: '0 none',
79
- padding: 0
79
+ padding: "var(--ds-space-0, 0px)"
80
80
  }), (0, _defineProperty2.default)(_css3, '&:hover', {
81
81
  color: "var(--ds-text-selected, ".concat(_colors.B200, ")")
82
- }), (0, _defineProperty2.default)(_css3, '&:focus', {
82
+ }), (0, _defineProperty2.default)(_css3, '&:focus-visible', {
83
83
  boxShadow: "0 0 0 2px ".concat("var(--ds-border-focused, ".concat(_colors.B100, ")")),
84
84
  transitionDuration: '0s, 0.2s',
85
85
  outline: 'none'
@@ -103,7 +103,7 @@ var virtualList = (0, _react.css)({
103
103
  '&:focus': {
104
104
  outline: 'none'
105
105
  },
106
- paddingBottom: '8px'
106
+ paddingBottom: "var(--ds-space-100, 8px)"
107
107
  });
108
108
 
109
109
  //// Search
@@ -118,7 +118,7 @@ var input = (0, _react.css)((_css4 = {
118
118
  cursor: 'inherit',
119
119
  fontSize: '14px',
120
120
  outline: 'none',
121
- padding: '1px 0 2px 6px',
121
+ padding: "1px ".concat("var(--ds-space-0, 0px)", " ", "var(--ds-space-025, 2px)", " ", "var(--ds-space-075, 6px)"),
122
122
  width: '100%'
123
123
  }, (0, _defineProperty2.default)(_css4, '&:invalid', {
124
124
  boxShadow: 'none'
@@ -148,14 +148,14 @@ var emojiPickerSpinner = (0, _react.css)({
148
148
  //// Category/Result
149
149
  exports.emojiPickerSpinner = emojiPickerSpinner;
150
150
  var emojiPickerRow = (0, _react.css)({
151
- marginLeft: '8px'
151
+ marginLeft: "var(--ds-space-100, 8px)"
152
152
  });
153
153
  exports.emojiPickerRow = emojiPickerRow;
154
154
  var emojiCategoryTitle = (0, _react.css)({
155
155
  boxSizing: 'border-box',
156
156
  color: "var(--ds-text, ".concat(_colors.N900, ")"),
157
157
  fontSize: '14px',
158
- padding: '5px 8px',
158
+ padding: "5px ".concat("var(--ds-space-100, 8px)"),
159
159
  textTransform: 'lowercase',
160
160
  '&:first-letter': {
161
161
  textTransform: 'uppercase'
@@ -168,17 +168,17 @@ var emojiItem = (0, _react.css)((_css5 = {
168
168
  width: '40px'
169
169
  }, (0, _defineProperty2.default)(_css5, "& .".concat(_styles.emojiNodeStyles), {
170
170
  cursor: 'pointer',
171
- padding: '8px',
171
+ padding: "var(--ds-space-100, 8px)",
172
172
  borderRadius: '5px',
173
173
  width: '24px',
174
174
  height: '24px'
175
175
  }), (0, _defineProperty2.default)(_css5, "& .".concat(_styles.placeholder), {
176
- padding: '0',
176
+ padding: "var(--ds-space-0, 0px)",
177
177
  margin: '7px',
178
178
  minWidth: '24px',
179
179
  maxWidth: '24px'
180
180
  }), (0, _defineProperty2.default)(_css5, "& .".concat(_styles.emojiNodeStyles, " .").concat(_styles.placeholder), {
181
- margin: '0'
181
+ margin: "var(--ds-space-0, 0px)"
182
182
  }), (0, _defineProperty2.default)(_css5, "& .".concat(_styles.emojiNodeStyles, " > img"), {
183
183
  position: 'relative',
184
184
  left: '50%',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/emoji",
3
- "version": "67.4.1",
3
+ "version": "67.4.2",
4
4
  "sideEffects": false
5
5
  }
@@ -36,7 +36,7 @@ export const categorySelector = css({
36
36
  });
37
37
 
38
38
  export const categorySelectorTablist = css({
39
- padding: '6px 8px',
39
+ padding: `${"var(--ds-space-075, 6px)"} ${"var(--ds-space-100, 8px)"}`,
40
40
  display: 'flex',
41
41
  flexDirection: 'row',
42
42
  justifyContent: 'space-around',
@@ -61,17 +61,17 @@ export const categoryStyles = css({
61
61
  borderRadius: "var(--ds-radius-100, 3px)",
62
62
  color: `var(--ds-text-subtlest, ${N100A})`,
63
63
  cursor: 'pointer',
64
- padding: 0,
64
+ padding: "var(--ds-space-0, 0px)",
65
65
  transition: 'color 0.2s ease',
66
66
  /* Firefox */
67
67
  ['&::-moz-focus-inner']: {
68
68
  border: '0 none',
69
- padding: 0
69
+ padding: "var(--ds-space-0, 0px)"
70
70
  },
71
71
  ['&:hover']: {
72
72
  color: `var(--ds-text-selected, ${B200})`
73
73
  },
74
- '&:focus': {
74
+ '&:focus-visible': {
75
75
  boxShadow: `0 0 0 2px ${`var(--ds-border-focused, ${B100})`}`,
76
76
  transitionDuration: '0s, 0.2s',
77
77
  outline: 'none'
@@ -95,7 +95,7 @@ export const virtualList = css({
95
95
  '&:focus': {
96
96
  outline: 'none'
97
97
  },
98
- paddingBottom: '8px'
98
+ paddingBottom: "var(--ds-space-100, 8px)"
99
99
  });
100
100
 
101
101
  //// Search
@@ -109,7 +109,7 @@ export const input = css({
109
109
  cursor: 'inherit',
110
110
  fontSize: '14px',
111
111
  outline: 'none',
112
- padding: '1px 0 2px 6px',
112
+ padding: `1px ${"var(--ds-space-0, 0px)"} ${"var(--ds-space-025, 2px)"} ${"var(--ds-space-075, 6px)"}`,
113
113
  width: '100%',
114
114
  ['&:invalid']: {
115
115
  boxShadow: 'none'
@@ -140,13 +140,13 @@ export const emojiPickerSpinner = css({
140
140
  //// Category/Result
141
141
 
142
142
  export const emojiPickerRow = css({
143
- marginLeft: '8px'
143
+ marginLeft: "var(--ds-space-100, 8px)"
144
144
  });
145
145
  export const emojiCategoryTitle = css({
146
146
  boxSizing: 'border-box',
147
147
  color: `var(--ds-text, ${N900})`,
148
148
  fontSize: '14px',
149
- padding: '5px 8px',
149
+ padding: `5px ${"var(--ds-space-100, 8px)"}`,
150
150
  textTransform: 'lowercase',
151
151
  '&:first-letter': {
152
152
  textTransform: 'uppercase'
@@ -158,19 +158,19 @@ export const emojiItem = css({
158
158
  width: '40px',
159
159
  [`& .${emojiNodeStyles}`]: {
160
160
  cursor: 'pointer',
161
- padding: '8px',
161
+ padding: "var(--ds-space-100, 8px)",
162
162
  borderRadius: '5px',
163
163
  width: '24px',
164
164
  height: '24px'
165
165
  },
166
166
  [`& .${placeholder}`]: {
167
- padding: '0',
167
+ padding: "var(--ds-space-0, 0px)",
168
168
  margin: '7px',
169
169
  minWidth: '24px',
170
170
  maxWidth: '24px'
171
171
  },
172
172
  [`& .${emojiNodeStyles} .${placeholder}`]: {
173
- margin: '0'
173
+ margin: "var(--ds-space-0, 0px)"
174
174
  },
175
175
  // Fit non-square emoji to square
176
176
  [`& .${emojiNodeStyles} > img`]: {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/emoji",
3
- "version": "67.4.1",
3
+ "version": "67.4.2",
4
4
  "sideEffects": false
5
5
  }
@@ -39,7 +39,7 @@ export var categorySelector = css({
39
39
  });
40
40
 
41
41
  export var categorySelectorTablist = css({
42
- padding: '6px 8px',
42
+ padding: "var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-100, 8px)"),
43
43
  display: 'flex',
44
44
  flexDirection: 'row',
45
45
  justifyContent: 'space-around',
@@ -62,14 +62,14 @@ export var categoryStyles = css((_css3 = {
62
62
  borderRadius: "var(--ds-radius-100, 3px)",
63
63
  color: "var(--ds-text-subtlest, ".concat(N100A, ")"),
64
64
  cursor: 'pointer',
65
- padding: 0,
65
+ padding: "var(--ds-space-0, 0px)",
66
66
  transition: 'color 0.2s ease'
67
67
  }, _defineProperty(_css3, '&::-moz-focus-inner', {
68
68
  border: '0 none',
69
- padding: 0
69
+ padding: "var(--ds-space-0, 0px)"
70
70
  }), _defineProperty(_css3, '&:hover', {
71
71
  color: "var(--ds-text-selected, ".concat(B200, ")")
72
- }), _defineProperty(_css3, '&:focus', {
72
+ }), _defineProperty(_css3, '&:focus-visible', {
73
73
  boxShadow: "0 0 0 2px ".concat("var(--ds-border-focused, ".concat(B100, ")")),
74
74
  transitionDuration: '0s, 0.2s',
75
75
  outline: 'none'
@@ -92,7 +92,7 @@ export var virtualList = css({
92
92
  '&:focus': {
93
93
  outline: 'none'
94
94
  },
95
- paddingBottom: '8px'
95
+ paddingBottom: "var(--ds-space-100, 8px)"
96
96
  });
97
97
 
98
98
  //// Search
@@ -106,7 +106,7 @@ export var input = css((_css4 = {
106
106
  cursor: 'inherit',
107
107
  fontSize: '14px',
108
108
  outline: 'none',
109
- padding: '1px 0 2px 6px',
109
+ padding: "1px ".concat("var(--ds-space-0, 0px)", " ", "var(--ds-space-025, 2px)", " ", "var(--ds-space-075, 6px)"),
110
110
  width: '100%'
111
111
  }, _defineProperty(_css4, '&:invalid', {
112
112
  boxShadow: 'none'
@@ -135,13 +135,13 @@ export var emojiPickerSpinner = css({
135
135
  //// Category/Result
136
136
 
137
137
  export var emojiPickerRow = css({
138
- marginLeft: '8px'
138
+ marginLeft: "var(--ds-space-100, 8px)"
139
139
  });
140
140
  export var emojiCategoryTitle = css({
141
141
  boxSizing: 'border-box',
142
142
  color: "var(--ds-text, ".concat(N900, ")"),
143
143
  fontSize: '14px',
144
- padding: '5px 8px',
144
+ padding: "5px ".concat("var(--ds-space-100, 8px)"),
145
145
  textTransform: 'lowercase',
146
146
  '&:first-letter': {
147
147
  textTransform: 'uppercase'
@@ -153,17 +153,17 @@ export var emojiItem = css((_css5 = {
153
153
  width: '40px'
154
154
  }, _defineProperty(_css5, "& .".concat(emojiNodeStyles), {
155
155
  cursor: 'pointer',
156
- padding: '8px',
156
+ padding: "var(--ds-space-100, 8px)",
157
157
  borderRadius: '5px',
158
158
  width: '24px',
159
159
  height: '24px'
160
160
  }), _defineProperty(_css5, "& .".concat(placeholder), {
161
- padding: '0',
161
+ padding: "var(--ds-space-0, 0px)",
162
162
  margin: '7px',
163
163
  minWidth: '24px',
164
164
  maxWidth: '24px'
165
165
  }), _defineProperty(_css5, "& .".concat(emojiNodeStyles, " .").concat(placeholder), {
166
- margin: '0'
166
+ margin: "var(--ds-space-0, 0px)"
167
167
  }), _defineProperty(_css5, "& .".concat(emojiNodeStyles, " > img"), {
168
168
  position: 'relative',
169
169
  left: '50%',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/emoji",
3
- "version": "67.4.1",
3
+ "version": "67.4.2",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1 @@
1
+ export { default as EmojiUploader } from './components/uploader/EmojiUploader';
@@ -0,0 +1,13 @@
1
+ import { EmojiResponse } from '../types';
2
+ import { EmojiLoaderConfig } from './EmojiUtils';
3
+ /**
4
+ * Emoji providers should return JSON in the format defined by EmojiServiceResponse.
5
+ */
6
+ export default class EmojiLoader {
7
+ private config;
8
+ constructor(config: EmojiLoaderConfig);
9
+ /**
10
+ * Returns a promise with an array of Emoji from all providers.
11
+ */
12
+ loadEmoji(): Promise<EmojiResponse>;
13
+ }
@@ -0,0 +1,72 @@
1
+ import { CategoryId } from '../components/picker/categories';
2
+ import { EmojiDescription, EmojiSearchResult, OptionalEmojiDescription, SearchOptions } from '../types';
3
+ import { UsageFrequencyTracker } from './internal/UsageFrequencyTracker';
4
+ export declare const getEmojiVariation: (emoji: EmojiDescription, options?: SearchOptions) => EmojiDescription;
5
+ export default class EmojiRepository {
6
+ private emojis;
7
+ private fullSearch;
8
+ private shortNameMap;
9
+ private idMap;
10
+ private asciiMap;
11
+ private dynamicCategoryList;
12
+ private static readonly defaultEmojiWeight;
13
+ protected usageTracker: UsageFrequencyTracker;
14
+ constructor(emojis: EmojiDescription[], usageTracker?: UsageFrequencyTracker);
15
+ /**
16
+ * Returns all available (and searchable) emoji in some default order.
17
+ */
18
+ all(): EmojiSearchResult;
19
+ /**
20
+ * Text search of emoji shortName and name field for suitable matches.
21
+ *
22
+ * Returns an array of all (searchable) emoji if query is empty or null, otherwise returns matching emoji.
23
+ *
24
+ * You can change how the results are sorted by specifying a custom EmojiComparator in the SearchOptions. If
25
+ * you don't want any sorting you can also disable via the SearchOptions (this might be a useful optimisation).
26
+ * If no sort is specified in SearchOptions then a default sorting it applied based on the query.
27
+ */
28
+ search(query?: string, options?: SearchOptions): EmojiSearchResult;
29
+ /**
30
+ * Returns all emoji with matching shortName
31
+ */
32
+ findAllMatchingShortName(shortName: string): EmojiDescription[];
33
+ /**
34
+ * Returns the first matching emoji matching the shortName, or null if none found.
35
+ */
36
+ findByShortName(shortName: string): OptionalEmojiDescription;
37
+ /**
38
+ * Returns the first matching emoji matching the id, or null if none found.
39
+ */
40
+ findById(id: string): OptionalEmojiDescription;
41
+ findByAsciiRepresentation(asciiEmoji: string): OptionalEmojiDescription;
42
+ findInCategory(categoryId: CategoryId): EmojiDescription[];
43
+ addUnknownEmoji(emoji: EmojiDescription): void;
44
+ getAsciiMap(): Map<string, EmojiDescription>;
45
+ /**
46
+ * Return the most frequently used emoji, ordered from most frequent to least frequent. Return an empty array if
47
+ * there are none.
48
+ *
49
+ * @param options optional settings to be applied to the set of frequently used emoji
50
+ */
51
+ getFrequentlyUsed(options?: SearchOptions): EmojiDescription[];
52
+ getDynamicCategoryList(): CategoryId[];
53
+ /**
54
+ * Call this on emoji usage to allow the EmojiRepository to track the usage of emoji (which could be useful
55
+ * in sorting, etc).
56
+ *
57
+ * @param emoji the emoji that was just used
58
+ */
59
+ used(emoji: EmojiDescription): void;
60
+ delete(emoji: EmojiDescription): void;
61
+ private withAsciiMatch;
62
+ private applySearchOptions;
63
+ private initMembers;
64
+ /**
65
+ * Optimisation to initialise all map member variables in single loop over emojis
66
+ */
67
+ private initRepositoryMetadata;
68
+ private initSearchIndex;
69
+ private getAllSearchableEmojis;
70
+ private addToMaps;
71
+ private addToDynamicCategories;
72
+ }
@@ -0,0 +1 @@
1
+ export declare const tokenizerRegex: RegExp;
@@ -0,0 +1,139 @@
1
+ import { AbstractResource, OnProviderChange, ServiceConfig } from '@atlaskit/util-service-support';
2
+ import { CategoryId } from '../components/picker/categories';
3
+ import { EmojiDescription, EmojiId, EmojiProvider, EmojiResponse, EmojiSearchResult, EmojiUpload, OptionalEmojiDescription, OptionalEmojiDescriptionWithVariations, OptionalUser, SearchOptions, ToneSelection, UploadingEmojiProvider, User } from '../types';
4
+ import EmojiRepository from './EmojiRepository';
5
+ import SiteEmojiResource from './media/SiteEmojiResource';
6
+ import { OptimisticImageApiLoaderConfig, SingleEmojiApiLoaderConfig } from './EmojiUtils';
7
+ interface GetEmojiProviderOptions {
8
+ /**
9
+ * Whether fetch emoji provider at start
10
+ * @defaultValue true
11
+ */
12
+ fetchAtStart?: boolean;
13
+ }
14
+ export type { EmojiProvider, UploadingEmojiProvider } from '../types';
15
+ export interface EmojiResourceConfig {
16
+ /**
17
+ * The service configuration for remotely recording emoji selections.
18
+ * A post will be performed to this URL with the EmojiId as the body.
19
+ */
20
+ recordConfig?: ServiceConfig;
21
+ /**
22
+ * This defines the different providers. Later providers will override earlier
23
+ * providers when performing shortName based look up.
24
+ */
25
+ providers: ServiceConfig[];
26
+ /**
27
+ * Must be set to true to enable upload support in the emoji components.
28
+ *
29
+ * Can be used for the restriction of the upload UI based on permissions, or feature flags.
30
+ *
31
+ * Note this also requires that other conditions are met (for example, one of the providers
32
+ * must support upload for the UploadingEmojiResource implementation of UploadingEmojiProvider).
33
+ */
34
+ allowUpload?: boolean;
35
+ /**
36
+ * Logged user in the Product.
37
+ */
38
+ currentUser?: User;
39
+ /**
40
+ * This is specifically used for fetching a meta information of a single emoji.
41
+ * Useful for when rendering a single or a subset of emojis on a page that does not require the
42
+ * whole provider list to be downloaded.
43
+ */
44
+ singleEmojiApi?: SingleEmojiApiLoaderConfig;
45
+ /**
46
+ * Renders an image while the provider is being downloaded to reduce the time
47
+ * the user is being presented with a placeholder
48
+ */
49
+ optimisticImageApi?: OptimisticImageApiLoaderConfig;
50
+ }
51
+ export interface OnEmojiProviderChange extends OnProviderChange<EmojiSearchResult, any, void> {
52
+ }
53
+ export interface Retry<T> {
54
+ (): Promise<T> | T;
55
+ }
56
+ export interface ResolveReject<T> {
57
+ resolve(result: T): void;
58
+ reject(reason?: any): void;
59
+ }
60
+ /**
61
+ * Checks if the emojiProvider can support uploading at a feature level.
62
+ *
63
+ * Follow this up with an isUploadSupported() check to see if the provider is actually
64
+ * configured to support uploads.
65
+ * https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates
66
+ */
67
+ export declare const supportsUploadFeature: (emojiProvider: EmojiProvider) => emojiProvider is UploadingEmojiProvider;
68
+ export interface LastQuery {
69
+ query?: string;
70
+ options?: SearchOptions;
71
+ }
72
+ export declare class EmojiResource extends AbstractResource<string, EmojiSearchResult, any, undefined, SearchOptions> implements EmojiProvider {
73
+ protected recordConfig?: ServiceConfig;
74
+ protected emojiRepository?: EmojiRepository;
75
+ protected lastQuery?: LastQuery;
76
+ protected activeLoaders: number;
77
+ protected initialLoaders: number;
78
+ protected retries: Map<Retry<any>, ResolveReject<any>>;
79
+ protected siteEmojiResource?: SiteEmojiResource;
80
+ protected selectedTone: ToneSelection;
81
+ protected currentUser?: User;
82
+ protected isInitialised: boolean;
83
+ protected emojiResponses: EmojiResponse[];
84
+ emojiProviderConfig: EmojiResourceConfig;
85
+ constructor(config: EmojiResourceConfig);
86
+ /**
87
+ * Get the emoji provider from Emoji Resource
88
+ * @returns Promise<EmojiProvider>
89
+ */
90
+ getEmojiProvider(options?: GetEmojiProviderOptions): Promise<EmojiProvider>;
91
+ private fetchIndividualProvider;
92
+ fetchEmojiProvider(force?: boolean): Promise<EmojiRepository | undefined>;
93
+ fetchByEmojiId(emojiId: EmojiId, optimistic: boolean): Promise<OptionalEmojiDescriptionWithVariations>;
94
+ private getProviderType;
95
+ protected initEmojiRepository(emojiResponses: EmojiResponse[]): void;
96
+ protected initSiteEmojiResource(emojiResponse: EmojiResponse, provider: ServiceConfig): Promise<void>;
97
+ private performRetries;
98
+ getOptimisticImageURL: (emojiId: EmojiId) => string | undefined;
99
+ protected isRepositoryAvailable: <T>(repository?: T | undefined) => repository is T;
100
+ private isLoaded;
101
+ private loadStoredTone;
102
+ protected refreshLastFilter(): void;
103
+ protected retryIfLoading<T>(retry: Retry<T>, defaultResponse: T): Promise<T>;
104
+ protected notifyResult(result: EmojiSearchResult): void;
105
+ /**
106
+ * Returns the EmojiDescription with a valid media path that includes query token and client attributes to access the emoji media inline.
107
+ */
108
+ getMediaEmojiDescriptionURLWithInlineToken(emoji: EmojiDescription): Promise<EmojiDescription>;
109
+ loadMediaEmoji(emoji: EmojiDescription, useAlt?: boolean): OptionalEmojiDescription | Promise<OptionalEmojiDescription>;
110
+ optimisticMediaRendering(emoji: EmojiDescription, useAlt?: boolean): boolean;
111
+ filter(query?: string, options?: SearchOptions): void;
112
+ findByShortName(shortName: string): OptionalEmojiDescription | Promise<OptionalEmojiDescription>;
113
+ findByEmojiId(emojiId: EmojiId): OptionalEmojiDescription | Promise<OptionalEmojiDescription>;
114
+ findById(id: string): OptionalEmojiDescription | Promise<OptionalEmojiDescription>;
115
+ findInCategory(categoryId: CategoryId): Promise<EmojiDescription[]>;
116
+ getAsciiMap(): Promise<Map<string, EmojiDescription>>;
117
+ getFrequentlyUsed(options?: SearchOptions): Promise<EmojiDescription[]>;
118
+ /**
119
+ * Record the selection of an emoji to a remote service if 'recordConfig' has been supplied.
120
+ * Regardless of the recordConfig, emoji selections will always be recorded on the EmojiRepository
121
+ * for the purposes of tracking the frequency of use.
122
+ *
123
+ * @param emoji The full description of the emoji to record usage for.
124
+ */
125
+ recordSelection(emoji: EmojiDescription): Promise<any>;
126
+ deleteSiteEmoji(emoji: EmojiDescription): Promise<boolean>;
127
+ getSelectedTone(): ToneSelection;
128
+ setSelectedTone(tone: ToneSelection): void;
129
+ calculateDynamicCategories(): Promise<CategoryId[]>;
130
+ getCurrentUser(): OptionalUser;
131
+ protected addUnknownEmoji(emoji: EmojiDescription): void;
132
+ }
133
+ export default class UploadingEmojiResource extends EmojiResource implements UploadingEmojiProvider {
134
+ protected allowUpload: boolean;
135
+ constructor(config: EmojiResourceConfig);
136
+ isUploadSupported(): Promise<boolean>;
137
+ uploadCustomEmoji(upload: EmojiUpload, retry?: boolean): Promise<EmojiDescription>;
138
+ prepareForUpload(): Promise<void>;
139
+ }
@@ -0,0 +1,24 @@
1
+ import { RequestServiceOptions, ServiceConfig } from '@atlaskit/util-service-support';
2
+ import { AltRepresentations, EmojiDescription, EmojiDescriptionWithVariations, EmojiMeta, EmojiRepresentation, EmojiResponse, EmojiServiceDescriptionWithVariations, EmojiServiceRepresentation, EmojiServiceResponse, EmojiId } from '../types';
3
+ export interface EmojiLoaderConfig extends ServiceConfig {
4
+ getRatio?: () => number;
5
+ }
6
+ export interface SingleEmojiApiLoaderConfig extends Omit<ServiceConfig, 'url'> {
7
+ getUrl: (emojiId: EmojiId) => string;
8
+ }
9
+ export interface OptimisticImageApiLoaderConfig extends Omit<ServiceConfig, 'url'> {
10
+ getUrl: (emojiId: EmojiId) => string;
11
+ }
12
+ export declare const emojiRequest: (provider: EmojiLoaderConfig, options?: RequestServiceOptions) => Promise<EmojiServiceResponse>;
13
+ export declare const getPixelRatio: () => number;
14
+ export declare const getAltRepresentation: (reps: AltRepresentations) => EmojiServiceRepresentation;
15
+ export declare const isMediaApiUrl: (url: string, meta?: EmojiMeta) => boolean;
16
+ export declare const denormaliseServiceRepresentation: (representation: EmojiServiceRepresentation, meta?: EmojiMeta) => EmojiRepresentation;
17
+ export declare const denormaliseServiceAltRepresentation: (altReps?: AltRepresentations, meta?: EmojiMeta) => EmojiRepresentation;
18
+ export declare const denormaliseSkinEmoji: (emoji: EmojiServiceDescriptionWithVariations, meta?: EmojiMeta) => EmojiDescriptionWithVariations[];
19
+ /**
20
+ * Denormalised an emoji response (emojis + sprite references) into an array of
21
+ * emoji with local sprite definitions.
22
+ */
23
+ export declare const denormaliseEmojiServiceResponse: (emojiData: EmojiServiceResponse) => EmojiResponse;
24
+ export declare const shouldUseAltRepresentation: (emoji: EmojiDescription, fitToHeight?: number) => boolean;
@@ -0,0 +1,109 @@
1
+ import { EmojiDescription } from '../../types';
2
+ /**
3
+ * Create the default sort comparator to be used for the user queries against emoji
4
+ *
5
+ * @param query the query used in the search to be sorted. Any colons will be stripped from the query and it will be
6
+ * converted to lowercase.
7
+ * @param orderedIds the id of emoji ordered by how frequently they are used
8
+ */
9
+ export declare function createSearchEmojiComparator(query?: string, orderedIds?: Array<string>): EmojiComparator;
10
+ export declare function createUsageOnlyEmojiComparator(orderedIds: Array<string>): EmojiComparator;
11
+ /**
12
+ * Returns a number representing the result of comparing e1 and e2.
13
+ * Compatible with Array.sort, which is to say -
14
+ * - less than 0 if e1 should come first
15
+ * - 0 if they are equal; e1 and e2 will be unchanged in position relative to each other
16
+ * - greater than 0 if e2 should come first.
17
+ */
18
+ export interface EmojiComparator {
19
+ compare(e1: EmojiDescription, e2: EmojiDescription): number;
20
+ }
21
+ /**
22
+ * A combinator comparator that applies an ordered chained of sub-comparators. The first comparator that
23
+ * returns a non-zero value stops the chain and causes that value to be returned. If a comparator returns a
24
+ * zero then the next one in the chain is tried.
25
+ *
26
+ * If no comparators in the chain return a non-zero value then zero will be returned.
27
+ */
28
+ export declare class ChainedEmojiComparator implements EmojiComparator {
29
+ private chain;
30
+ constructor(...comparators: EmojiComparator[]);
31
+ compare(e1: EmojiDescription, e2: EmojiDescription): number;
32
+ }
33
+ /**
34
+ * Orders two emoji such that if one of them has an ascii representation that exactly matches the query then it will
35
+ * be ordered first.
36
+ */
37
+ export declare class AsciiMatchComparator implements EmojiComparator {
38
+ private query;
39
+ constructor(query: string);
40
+ compare(e1: EmojiDescription, e2: EmojiDescription): 0 | 1 | -1;
41
+ }
42
+ /**
43
+ * Orders two emoji such that the one who's shortname matches the query exactly comes first. If there are matching
44
+ * shortnames then the type of emoji is taken into account with SITE emoji coming first.
45
+ */
46
+ export declare class ExactShortNameMatchComparator implements EmojiComparator {
47
+ private colonQuery;
48
+ private typeComparator;
49
+ constructor(query: string);
50
+ compare(e1: EmojiDescription, e2: EmojiDescription): number;
51
+ }
52
+ /**
53
+ * Orders two emoji based on their type, with the types being STANDARD, ATLASSIAN and SITE (in that order).
54
+ * If the comparator is configured to 'reverse' then the order will be SITE, ATLASSIAN, STANDARD.
55
+ *
56
+ * Regardless of the reverse setting, an unknown type will always come last.
57
+ */
58
+ export declare class EmojiTypeComparator implements EmojiComparator {
59
+ private typeToNumber;
60
+ constructor(reverse?: boolean);
61
+ compare(e1: EmojiDescription, e2: EmojiDescription): number;
62
+ private emojiTypeToOrdinal;
63
+ }
64
+ /**
65
+ * Order two emoji such as the one which is more frequently used comes first. If neither have any usage
66
+ * information then leave their order unchanged.
67
+ */
68
+ export declare class UsageFrequencyComparator implements EmojiComparator {
69
+ private positionLookup;
70
+ constructor(orderedIds: Array<string>);
71
+ compare(e1: EmojiDescription, e2: EmojiDescription): number;
72
+ /**
73
+ * Get the ordinal representing the position of this emoji.
74
+ *
75
+ * @param id the id of the emoji
76
+ */
77
+ private getPositionInOrder;
78
+ }
79
+ type KeysOfType<T, TProp> = {
80
+ [P in keyof T]: T[P] extends TProp | undefined ? P : never;
81
+ }[keyof T];
82
+ /**
83
+ * A comparator that will sort higher an emoji which matches the query string earliest in the indicated
84
+ * property.
85
+ */
86
+ export declare class QueryStringPositionMatchComparator implements EmojiComparator {
87
+ private readonly propertyName;
88
+ private query;
89
+ /**
90
+ * @param query the query to match
91
+ * @param propertyToCompare the property of EmojiDescription to check for query within
92
+ */
93
+ constructor(query: string, propertyToCompare: KeysOfType<EmojiDescription, string>);
94
+ private getScore;
95
+ compare(e1: EmojiDescription, e2: EmojiDescription): number;
96
+ }
97
+ export declare class OrderComparator implements EmojiComparator {
98
+ private static INSTANCE;
99
+ private constructor();
100
+ static get Instance(): OrderComparator;
101
+ compare(e1: EmojiDescription, e2: EmojiDescription): number;
102
+ }
103
+ export declare class AlphabeticalShortnameComparator implements EmojiComparator {
104
+ private static INSTANCE;
105
+ private constructor();
106
+ static get Instance(): AlphabeticalShortnameComparator;
107
+ compare(e1: EmojiDescription, e2: EmojiDescription): number;
108
+ }
109
+ export {};