@atlaskit/editor-common 134.12.0 → 134.14.0
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 +34 -0
- package/credit-guard/floating-toolbar-button/package.json +10 -0
- package/credit-guard/floating-toolbar-item/package.json +10 -0
- package/dist/cjs/credit-guard/CreditCheckedFloatingToolbarButton.js +114 -0
- package/dist/cjs/credit-guard/CreditCheckedPopup.js +1 -1
- package/dist/cjs/credit-guard/getCreditCheckedFloatingToolbarItem.js +30 -0
- package/dist/cjs/element-browser/components/ViewMore.js +1 -1
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
- package/dist/cjs/extensibility/GeneratedContentReveal.js +1 -1
- package/dist/cjs/extensions/UnknownMacroPlaceholder.js +1 -1
- package/dist/cjs/icons/shared/PanelErrorIcon.js +1 -1
- package/dist/cjs/icons/shared/PanelInfoIcon.js +1 -1
- package/dist/cjs/icons/shared/PanelNoteIcon.js +1 -1
- package/dist/cjs/icons/shared/PanelSuccessIcon.js +1 -1
- package/dist/cjs/icons/shared/PanelWarningIcon.js +1 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.js +1 -1
- package/dist/cjs/quick-insert/ElementBrowserQuickInsertMenuItem.js +1 -1
- package/dist/cjs/quick-insert/QuickInsertHoverPreview.js +1 -1
- package/dist/cjs/quick-insert/QuickInsertPreviewContent.compiled.css +1 -0
- package/dist/cjs/quick-insert/QuickInsertPreviewContent.js +9 -6
- package/dist/cjs/quick-insert/QuickInsertShortcut.js +1 -1
- package/dist/cjs/quick-insert/SkillTag.js +1 -1
- package/dist/cjs/quick-insert/messages.js +30 -0
- package/dist/cjs/table/NewSortingIcon.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/FloatingToolbar/Button.js +2 -0
- package/dist/cjs/ui/Shortcut/index.js +1 -1
- package/dist/cjs/ui/Toolbar/ButtonGroup.js +1 -1
- package/dist/cjs/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
- package/dist/cjs/ui/Toolbar/DropdownWrapper.js +1 -1
- package/dist/cjs/ui/Toolbar/ExpandIcon.js +1 -1
- package/dist/cjs/ui/Toolbar/Separator.js +1 -1
- package/dist/es2019/credit-guard/CreditCheckedFloatingToolbarButton.js +102 -0
- package/dist/es2019/credit-guard/CreditCheckedPopup.js +1 -1
- package/dist/es2019/credit-guard/getCreditCheckedFloatingToolbarItem.js +21 -0
- package/dist/es2019/element-browser/components/ViewMore.js +1 -1
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
- package/dist/es2019/extensibility/GeneratedContentReveal.js +1 -1
- package/dist/es2019/extensions/UnknownMacroPlaceholder.js +1 -1
- package/dist/es2019/icons/shared/PanelErrorIcon.js +1 -1
- package/dist/es2019/icons/shared/PanelInfoIcon.js +1 -1
- package/dist/es2019/icons/shared/PanelNoteIcon.js +1 -1
- package/dist/es2019/icons/shared/PanelSuccessIcon.js +1 -1
- package/dist/es2019/icons/shared/PanelWarningIcon.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.js +1 -1
- package/dist/es2019/quick-insert/ElementBrowserQuickInsertMenuItem.js +1 -1
- package/dist/es2019/quick-insert/QuickInsertHoverPreview.js +1 -1
- package/dist/es2019/quick-insert/QuickInsertPreviewContent.compiled.css +1 -0
- package/dist/es2019/quick-insert/QuickInsertPreviewContent.js +9 -6
- package/dist/es2019/quick-insert/QuickInsertShortcut.js +1 -1
- package/dist/es2019/quick-insert/SkillTag.js +1 -1
- package/dist/es2019/quick-insert/messages.js +30 -0
- package/dist/es2019/table/NewSortingIcon.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/FloatingToolbar/Button.js +2 -0
- package/dist/es2019/ui/Shortcut/index.js +1 -1
- package/dist/es2019/ui/Toolbar/ButtonGroup.js +1 -1
- package/dist/es2019/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
- package/dist/es2019/ui/Toolbar/DropdownWrapper.js +1 -1
- package/dist/es2019/ui/Toolbar/ExpandIcon.js +1 -1
- package/dist/es2019/ui/Toolbar/Separator.js +1 -1
- package/dist/esm/credit-guard/CreditCheckedFloatingToolbarButton.js +106 -0
- package/dist/esm/credit-guard/CreditCheckedPopup.js +1 -1
- package/dist/esm/credit-guard/getCreditCheckedFloatingToolbarItem.js +24 -0
- package/dist/esm/element-browser/components/ViewMore.js +1 -1
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
- package/dist/esm/extensibility/GeneratedContentReveal.js +1 -1
- package/dist/esm/extensions/UnknownMacroPlaceholder.js +1 -1
- package/dist/esm/icons/shared/PanelErrorIcon.js +1 -1
- package/dist/esm/icons/shared/PanelInfoIcon.js +1 -1
- package/dist/esm/icons/shared/PanelNoteIcon.js +1 -1
- package/dist/esm/icons/shared/PanelSuccessIcon.js +1 -1
- package/dist/esm/icons/shared/PanelWarningIcon.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/CompactQuickInsertMenuItem.js +1 -1
- package/dist/esm/quick-insert/ElementBrowserQuickInsertMenuItem.js +1 -1
- package/dist/esm/quick-insert/QuickInsertHoverPreview.js +1 -1
- package/dist/esm/quick-insert/QuickInsertPreviewContent.compiled.css +1 -0
- package/dist/esm/quick-insert/QuickInsertPreviewContent.js +9 -6
- package/dist/esm/quick-insert/QuickInsertShortcut.js +1 -1
- package/dist/esm/quick-insert/SkillTag.js +1 -1
- package/dist/esm/quick-insert/messages.js +30 -0
- package/dist/esm/table/NewSortingIcon.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/FloatingToolbar/Button.js +2 -0
- package/dist/esm/ui/Shortcut/index.js +1 -1
- package/dist/esm/ui/Toolbar/ButtonGroup.js +1 -1
- package/dist/esm/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
- package/dist/esm/ui/Toolbar/DropdownWrapper.js +1 -1
- package/dist/esm/ui/Toolbar/ExpandIcon.js +1 -1
- package/dist/esm/ui/Toolbar/Separator.js +1 -1
- package/dist/types/credit-guard/CreditCheckedFloatingToolbarButton.d.ts +26 -0
- package/dist/types/credit-guard/getCreditCheckedFloatingToolbarItem.d.ts +5 -0
- package/dist/types/quick-insert/messages.d.ts +1 -1
- package/dist/types/quick-insert/preview.d.ts +6 -0
- package/dist/types/ui/FloatingToolbar/Button.d.ts +1 -0
- package/package.json +7 -7
|
@@ -204,5 +204,35 @@ export var messages = defineMessages({
|
|
|
204
204
|
id: 'editor-common.quick-insert.previewAttributionMicrosoft.ai-non-final',
|
|
205
205
|
defaultMessage: 'Microsoft',
|
|
206
206
|
description: 'Microsoft company name shown as the creator in a slash-command preview attribution.'
|
|
207
|
+
},
|
|
208
|
+
elementBrowserAllElements: {
|
|
209
|
+
id: 'editor.quick-insert.all-elements',
|
|
210
|
+
defaultMessage: 'All elements',
|
|
211
|
+
description: 'Heading above the remaining elements in the element browser All category, shown below the Recommended elements.'
|
|
212
|
+
},
|
|
213
|
+
elementBrowserCategoriesLabel: {
|
|
214
|
+
id: 'editor.quick-insert.categories-label',
|
|
215
|
+
defaultMessage: 'Element categories',
|
|
216
|
+
description: 'Accessible label for the group of category buttons in the element browser sidebar, read by screen readers.'
|
|
217
|
+
},
|
|
218
|
+
elementBrowserResultsAvailable: {
|
|
219
|
+
id: 'editor.quick-insert.results-available',
|
|
220
|
+
defaultMessage: '{count, plural, one {# result available} other {# results available}}',
|
|
221
|
+
description: 'Shown in the element browser footer. Tells the user how many elements match the current search and category.'
|
|
222
|
+
},
|
|
223
|
+
elementBrowserResultsLabel: {
|
|
224
|
+
id: 'editor.quick-insert.results-label',
|
|
225
|
+
defaultMessage: 'Element results',
|
|
226
|
+
description: 'Accessible label for the list of elements in the element browser, read by screen readers.'
|
|
227
|
+
},
|
|
228
|
+
elementBrowserSearch: {
|
|
229
|
+
id: 'editor.quick-insert.search',
|
|
230
|
+
defaultMessage: 'Search elements',
|
|
231
|
+
description: 'Accessible label for the search field at the top of the element browser, used to filter the elements that can be inserted.'
|
|
232
|
+
},
|
|
233
|
+
elementBrowserTitle: {
|
|
234
|
+
id: 'editor.quick-insert.title',
|
|
235
|
+
defaultMessage: 'Insert elements',
|
|
236
|
+
description: 'Title of the element browser dialog, where users browse and insert elements such as tables, panels and macros.'
|
|
207
237
|
}
|
|
208
238
|
});
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "134.
|
|
23
|
+
var packageVersion = "134.14.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -18,6 +18,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
18
18
|
var title = _ref.title,
|
|
19
19
|
icon = _ref.icon,
|
|
20
20
|
iconAfter = _ref.iconAfter,
|
|
21
|
+
id = _ref.id,
|
|
21
22
|
onClick = _ref.onClick,
|
|
22
23
|
onKeyDown = _ref.onKeyDown,
|
|
23
24
|
onMouseEnter = _ref.onMouseEnter,
|
|
@@ -109,6 +110,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
109
110
|
})), areAnyNewToolbarFlagsEnabled ? customSizeAndPadding : {})
|
|
110
111
|
}, rest);
|
|
111
112
|
},
|
|
113
|
+
id: id,
|
|
112
114
|
"aria-label": ariaLabel || title,
|
|
113
115
|
"aria-pressed": ariaPressed,
|
|
114
116
|
"aria-checked": ariaChecked,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v3.0.
|
|
1
|
+
/* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
2
|
import "./DropdownTriggerWrapper.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
+
import type { Command } from '../types/command';
|
|
4
|
+
import type { FloatingToolbarButton } from '../types/floating-toolbar';
|
|
5
|
+
import type { AICreditCheck, GetAICreditStatus } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* A confirm dialog needs the floating toolbar's own state, and a link would navigate before the
|
|
8
|
+
* credit check, so neither can be credit checked.
|
|
9
|
+
*/
|
|
10
|
+
type UnsupportedButtonProps = 'confirmDialog' | 'href' | 'target';
|
|
11
|
+
export type CreditCheckableFloatingToolbarButton = Omit<FloatingToolbarButton<Command>, UnsupportedButtonProps> & {
|
|
12
|
+
[Prop in UnsupportedButtonProps]?: never;
|
|
13
|
+
};
|
|
14
|
+
export type CreditCheckedFloatingToolbarButtonProps = {
|
|
15
|
+
areAnyNewToolbarFlagsEnabled: boolean;
|
|
16
|
+
button: CreditCheckableFloatingToolbarButton;
|
|
17
|
+
creditCheck: AICreditCheck;
|
|
18
|
+
getAICreditStatus: GetAICreditStatus;
|
|
19
|
+
view?: EditorView;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* A floating toolbar button that checks AI credits before running its action, and anchors the
|
|
23
|
+
* product's credits popup to itself when credits are blocked. Matches the floating toolbar's own buttons.
|
|
24
|
+
*/
|
|
25
|
+
export declare const CreditCheckedFloatingToolbarButton: ({ areAnyNewToolbarFlagsEnabled, button, creditCheck, getAICreditStatus, view, }: CreditCheckedFloatingToolbarButtonProps) => React.JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Command } from '../types/command';
|
|
2
|
+
import type { FloatingToolbarCustom } from '../types/floating-toolbar';
|
|
3
|
+
import { type CreditCheckedFloatingToolbarButtonProps } from './CreditCheckedFloatingToolbarButton';
|
|
4
|
+
/** Wraps a floating toolbar button so it is credit checked, keeping its own appearance and handlers. */
|
|
5
|
+
export declare const getCreditCheckedFloatingToolbarItem: ({ areAnyNewToolbarFlagsEnabled, button, creditCheck, getAICreditStatus, }: Omit<CreditCheckedFloatingToolbarButtonProps, 'view'>) => FloatingToolbarCustom<Command>;
|
|
@@ -3,5 +3,5 @@ type Messages<Keys extends string> = Record<Keys, MessageDescriptor & {
|
|
|
3
3
|
defaultMessage: string;
|
|
4
4
|
id: string;
|
|
5
5
|
}>;
|
|
6
|
-
export declare const messages: Messages<'admin' | 'AI' | 'all' | 'browse' | 'categoryBlockTemplates' | 'categoryCreate' | 'categoryDataAndCharts' | 'categoryEmbed' | 'categoryMedia' | 'categoryOther' | 'categoryRecommended' | 'categoryRovo' | 'categoryStructure' | 'categoryTextFormatting' | 'searchResults' | 'noSearchResults' | 'previewAttributionBy' | 'previewAttributionAtlassian' | 'previewAttributionAssets' | 'previewAttributionConfluence' | 'previewAttributionFeedback' | 'previewAttributionFocus' | 'previewAttributionJira' | 'previewAttributionJiraServiceManagement' | 'previewAttributionMicrosoft' | 'previewAttributionStudio' | 'previewAttributionTalent' | 'previewAttributionTrello' | 'close' | 'communication' | 'confluence-content' | 'development' | 'external-content' | 'featuredWhiteboardDescription' | 'formatting' | 'help' | 'insert' | 'media' | 'navigation' | 'reporting' | 'visuals'>;
|
|
6
|
+
export declare const messages: Messages<'admin' | 'AI' | 'all' | 'browse' | 'categoryBlockTemplates' | 'categoryCreate' | 'categoryDataAndCharts' | 'categoryEmbed' | 'categoryMedia' | 'categoryOther' | 'categoryRecommended' | 'categoryRovo' | 'categoryStructure' | 'categoryTextFormatting' | 'searchResults' | 'noSearchResults' | 'previewAttributionBy' | 'previewAttributionAtlassian' | 'previewAttributionAssets' | 'previewAttributionConfluence' | 'previewAttributionFeedback' | 'previewAttributionFocus' | 'previewAttributionJira' | 'previewAttributionJiraServiceManagement' | 'previewAttributionMicrosoft' | 'previewAttributionStudio' | 'previewAttributionTalent' | 'previewAttributionTrello' | 'close' | 'communication' | 'confluence-content' | 'development' | 'external-content' | 'featuredWhiteboardDescription' | 'formatting' | 'help' | 'insert' | 'media' | 'navigation' | 'reporting' | 'visuals' | 'elementBrowserAllElements' | 'elementBrowserCategoriesLabel' | 'elementBrowserResultsAvailable' | 'elementBrowserResultsLabel' | 'elementBrowserSearch' | 'elementBrowserTitle'>;
|
|
7
7
|
export {};
|
|
@@ -4,6 +4,12 @@ import type { MessageDescriptor } from 'react-intl';
|
|
|
4
4
|
export type PreviewImage = {
|
|
5
5
|
dark?: string;
|
|
6
6
|
light: string;
|
|
7
|
+
/**
|
|
8
|
+
* How the image fills the preview's fixed-height image area, as CSS `object-fit`. Defaults to
|
|
9
|
+
* `contain`, which shows the whole image. Use `cover` only for images whose edges are
|
|
10
|
+
* background, since it crops whatever doesn't fit the area's shape.
|
|
11
|
+
*/
|
|
12
|
+
objectFit?: 'contain' | 'cover';
|
|
7
13
|
};
|
|
8
14
|
export type QuickInsertPreview = {
|
|
9
15
|
attribution?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "134.
|
|
3
|
+
"version": "134.14.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/activity-provider": "^3.1.0",
|
|
32
32
|
"@atlaskit/adf-schema": "^57.7.0",
|
|
33
33
|
"@atlaskit/adf-utils": "^20.9.0",
|
|
34
|
-
"@atlaskit/afm-i18n-platform-editor-editor-common": "2.
|
|
34
|
+
"@atlaskit/afm-i18n-platform-editor-editor-common": "2.306.0",
|
|
35
35
|
"@atlaskit/analytics-listeners": "^11.4.0",
|
|
36
36
|
"@atlaskit/analytics-namespaced-context": "^8.2.0",
|
|
37
37
|
"@atlaskit/analytics-next": "^12.6.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@atlaskit/editor-toolbar": "^2.10.0",
|
|
51
51
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
52
52
|
"@atlaskit/editor-ui-control-model": "^3.0.0",
|
|
53
|
-
"@atlaskit/emoji": "^73.
|
|
53
|
+
"@atlaskit/emoji": "^73.6.0",
|
|
54
54
|
"@atlaskit/feature-gate-js-client": "^8.0.0",
|
|
55
55
|
"@atlaskit/icon": "^38.0.0",
|
|
56
56
|
"@atlaskit/link": "^5.1.0",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"@atlaskit/media-common": "^14.7.0",
|
|
64
64
|
"@atlaskit/media-file-preview": "^2.0.0",
|
|
65
65
|
"@atlaskit/media-picker": "^73.3.0",
|
|
66
|
-
"@atlaskit/media-ui": "^31.
|
|
66
|
+
"@atlaskit/media-ui": "^31.9.0",
|
|
67
67
|
"@atlaskit/media-viewer": "^54.12.0",
|
|
68
|
-
"@atlaskit/mention": "^30.
|
|
68
|
+
"@atlaskit/mention": "^30.9.0",
|
|
69
69
|
"@atlaskit/menu": "^11.0.0",
|
|
70
70
|
"@atlaskit/object": "^2.3.0",
|
|
71
71
|
"@atlaskit/onboarding": "^15.4.0",
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
"@atlaskit/react-ufo": "^8.4.0",
|
|
82
82
|
"@atlaskit/section-message": "^10.2.0",
|
|
83
83
|
"@atlaskit/smart-card": "^46.13.0",
|
|
84
|
-
"@atlaskit/smart-user-picker": "^12.
|
|
84
|
+
"@atlaskit/smart-user-picker": "^12.12.0",
|
|
85
85
|
"@atlaskit/spinner": "^20.4.0",
|
|
86
|
-
"@atlaskit/task-decision": "^21.
|
|
86
|
+
"@atlaskit/task-decision": "^21.16.0",
|
|
87
87
|
"@atlaskit/teams-app-config": "^3.1.0",
|
|
88
88
|
"@atlaskit/textfield": "^10.3.0",
|
|
89
89
|
"@atlaskit/tmp-editor-statsig": "^260.0.0",
|