@atlaskit/editor-common 130.4.1 → 130.5.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 +36 -0
- package/dist/cjs/ai-messages/ai-suggestions.js +5 -0
- package/dist/cjs/element-browser/components/ElementBrowserLoader.js +31 -8
- package/dist/cjs/extensions/extension-handlers.js +164 -33
- package/dist/cjs/floating-toolbar/DropdownMenuExtensionItems.js +25 -4
- package/dist/cjs/icons/index.js +33 -10
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/assets/index.js +888 -257
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/FloatingToolbar/Button.js +2 -0
- package/dist/cjs/ui/Mention/mention-with-profilecard.js +30 -11
- package/dist/cjs/utils/is-non-production-build.js +2 -6
- package/dist/es2019/ai-messages/ai-suggestions.js +5 -0
- package/dist/es2019/element-browser/components/ElementBrowserLoader.js +16 -2
- package/dist/es2019/extensions/extension-handlers.js +88 -15
- package/dist/es2019/floating-toolbar/DropdownMenuExtensionItems.js +16 -2
- package/dist/es2019/icons/index.js +17 -3
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/assets/index.js +386 -66
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/FloatingToolbar/Button.js +2 -0
- package/dist/es2019/ui/Mention/mention-with-profilecard.js +15 -4
- package/dist/es2019/utils/is-non-production-build.js +2 -6
- package/dist/esm/ai-messages/ai-suggestions.js +5 -0
- package/dist/esm/element-browser/components/ElementBrowserLoader.js +28 -6
- package/dist/esm/extensions/extension-handlers.js +165 -33
- package/dist/esm/floating-toolbar/DropdownMenuExtensionItems.js +24 -4
- package/dist/esm/icons/index.js +29 -7
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/assets/index.js +764 -194
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/FloatingToolbar/Button.js +2 -0
- package/dist/esm/ui/Mention/mention-with-profilecard.js +25 -8
- package/dist/esm/utils/is-non-production-build.js +2 -6
- package/dist/types/ai-messages/ai-suggestions.d.ts +5 -0
- package/dist/types/icons/index.d.ts +5 -3
- package/dist/types/quick-insert/assets/index.d.ts +34 -32
- package/dist/types/ui/FloatingToolbar/Button.d.ts +3 -2
- package/dist/types/utils/is-non-production-build.d.ts +2 -2
- package/package.json +4 -3
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "130.4.
|
|
24
|
+
var packageVersion = "130.4.2";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -46,6 +46,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
46
46
|
areaControls = _ref.areaControls,
|
|
47
47
|
ariaLabel = _ref.ariaLabel,
|
|
48
48
|
isRadioButton = _ref.isRadioButton,
|
|
49
|
+
isLoading = _ref.isLoading,
|
|
49
50
|
pulse = _ref.pulse,
|
|
50
51
|
areAnyNewToolbarFlagsEnabled = _ref.areAnyNewToolbarFlagsEnabled;
|
|
51
52
|
// Check if there's only an icon and add additional styles
|
|
@@ -125,6 +126,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
|
|
|
125
126
|
onKeyDown: onKeyDown,
|
|
126
127
|
isSelected: selected,
|
|
127
128
|
isDisabled: disabled,
|
|
129
|
+
isLoading: isLoading,
|
|
128
130
|
testId: testId,
|
|
129
131
|
interactionName: interactionName,
|
|
130
132
|
onMouseEnter: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? onMouseEnter : undefined,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import Loadable from 'react-loadable';
|
|
3
|
+
// oxlint-disable-next-line @atlassian/no-restricted-imports
|
|
4
|
+
import { lazy, LazySuspense } from 'react-loosely-lazy';
|
|
3
5
|
import ResourcedMention from '@atlaskit/mention/resourced-mention';
|
|
4
6
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
7
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -11,18 +13,33 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
11
13
|
// Lazy-loaded so the agent profile card chunk (and its `@atlaskit/rovo-agent-components`
|
|
12
14
|
// dependency) stays off the critical path — it is only fetched when an agent mention
|
|
13
15
|
// (`userType === 'APP'`) actually renders, never for person mentions.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
var loadAgentProfileCardTrigger = function loadAgentProfileCardTrigger() {
|
|
17
|
+
return import( /* webpackChunkName: "@atlaskit-internal_profilecard/agent-profile-card-trigger" */
|
|
18
|
+
'@atlaskit/profilecard/agent-profile-card-trigger').then(function (mod) {
|
|
19
|
+
return mod.AgentProfileCardTrigger;
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var AgentProfileCardTriggerLazy = lazy(function () {
|
|
23
|
+
return import( /* webpackChunkName: "@atlaskit-internal_profilecard/agent-profile-card-trigger" */
|
|
24
|
+
'@atlaskit/profilecard/agent-profile-card-trigger').then(function (mod) {
|
|
25
|
+
return mod.AgentProfileCardTrigger;
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
AgentProfileCardTriggerLazy.displayName = 'lazy(AgentProfileCardTrigger)';
|
|
29
|
+
var AgentProfileCardTriggerLoadable = Loadable({
|
|
30
|
+
loader: loadAgentProfileCardTrigger,
|
|
22
31
|
loading: function loading() {
|
|
23
32
|
return null;
|
|
24
33
|
}
|
|
25
34
|
});
|
|
35
|
+
var AgentProfileCardTrigger = function AgentProfileCardTrigger(props) {
|
|
36
|
+
return isExperimentEnabled('platform_editor_loosely_lazy_migration') ? /*#__PURE__*/React.createElement(LazySuspense, {
|
|
37
|
+
fallback: null
|
|
38
|
+
}, /*#__PURE__*/React.createElement(AgentProfileCardTriggerLazy, props)) :
|
|
39
|
+
/*#__PURE__*/
|
|
40
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
41
|
+
React.createElement(AgentProfileCardTriggerLoadable, props);
|
|
42
|
+
};
|
|
26
43
|
|
|
27
44
|
// Ignored via go/ees005
|
|
28
45
|
// eslint-disable-next-line require-unicode-regexp
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
2
1
|
/**
|
|
3
|
-
* Adds a product-owned build classification
|
|
4
|
-
* A classifier callback is
|
|
2
|
+
* Adds a product-owned build classification to analytics attributes.
|
|
3
|
+
* A classifier callback is evaluated lazily, so the caller controls when browser reads happen.
|
|
5
4
|
* An unknown classification is omitted; an explicit false is preserved.
|
|
6
5
|
*/
|
|
7
6
|
export var getNonProductionBuildAnalyticsAttributes = function getNonProductionBuildAnalyticsAttributes(classification) {
|
|
8
|
-
if (!isExperimentEnabled('platform_editor_non_production_build_analytics')) {
|
|
9
|
-
return {};
|
|
10
|
-
}
|
|
11
7
|
var isNonProductionBuild = typeof classification === 'function' ? classification() : classification;
|
|
12
8
|
return isNonProductionBuild !== undefined ? {
|
|
13
9
|
isNonProductionBuild: isNonProductionBuild
|
|
@@ -393,6 +393,11 @@ export declare const aiSuggestionsMessages: {
|
|
|
393
393
|
description: string;
|
|
394
394
|
id: string;
|
|
395
395
|
};
|
|
396
|
+
thinkingPreparingAgent: {
|
|
397
|
+
defaultMessage: string;
|
|
398
|
+
description: string;
|
|
399
|
+
id: string;
|
|
400
|
+
};
|
|
396
401
|
thinkingPreparingSuggestions: {
|
|
397
402
|
defaultMessage: string;
|
|
398
403
|
description: string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Loadable from 'react-loadable';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import type { IconProps } from '../types';
|
|
4
3
|
export { PanelInfoIcon } from './shared/PanelInfoIcon';
|
|
5
4
|
export { PanelWarningIcon } from './shared/PanelWarningIcon';
|
|
@@ -9,4 +8,7 @@ export { PanelNoteIcon } from './shared/PanelNoteIcon';
|
|
|
9
8
|
export { BorderIcon } from './shared/BorderIcon';
|
|
10
9
|
export { SteppedRainbowIconDecoration, rainbow, disabledRainbow, } from './shared/SteppedRainbowIconDecoration';
|
|
11
10
|
export { DynamicStrokeIconDecoration } from './shared/DynamicStrokeIconDecoration';
|
|
12
|
-
export declare const IconTable:
|
|
11
|
+
export declare const IconTable: {
|
|
12
|
+
(props: React.PropsWithChildren<IconProps>): React.ReactElement;
|
|
13
|
+
preload: () => void;
|
|
14
|
+
};
|
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Loadable from 'react-loadable';
|
|
3
2
|
import type { HeadingLevels, IconProps } from '../../types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
3
|
+
type PreloadableComponent<Props extends object> = React.ComponentType<Props> & {
|
|
4
|
+
preload: () => unknown;
|
|
5
|
+
};
|
|
6
|
+
export declare const IconAction: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
7
|
+
export declare const IconCode: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
8
|
+
export declare const IconDate: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
9
|
+
export declare const IconDecision: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
10
|
+
export declare const IconDivider: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
11
|
+
export declare const IconEmoji: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
12
|
+
export declare const IconImages: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
13
|
+
export declare const IconLayout: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
14
|
+
export declare const IconLink: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
15
|
+
export declare const IconListNumber: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
16
|
+
export declare const IconList: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
17
|
+
export declare const IconMention: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
18
|
+
export declare const IconPanelError: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
19
|
+
export declare const IconPanelNote: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
20
|
+
export declare const IconPanelSuccess: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
21
|
+
export declare const IconPanelWarning: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
22
|
+
export declare const IconPanel: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
23
|
+
export declare const IconQuote: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
24
|
+
export declare const IconStatus: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
25
|
+
export declare const IconOneColumnLayout: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
26
|
+
export declare const IconTwoColumnLayout: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
27
|
+
export declare const IconThreeColumnLayout: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
28
|
+
export declare const IconFourColumnLayout: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
29
|
+
export declare const IconFiveColumnLayout: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
28
30
|
type HeadingProps = IconProps & {
|
|
29
31
|
level: HeadingLevels;
|
|
30
32
|
};
|
|
31
33
|
export declare const IconHeading: ({ level, label, }: Pick<HeadingProps, 'level' | 'label'>) => React.JSX.Element;
|
|
32
|
-
export declare const IconFeedback:
|
|
33
|
-
export declare const IconExpand:
|
|
34
|
-
export declare const IconDatasourceJiraIssue:
|
|
35
|
-
export declare const IconDatasourceAssetsObjects:
|
|
36
|
-
export declare const IconDatasourceConfluenceSearch:
|
|
37
|
-
export declare const IconLoom:
|
|
38
|
-
export declare const IconSyncBlock:
|
|
34
|
+
export declare const IconFeedback: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
35
|
+
export declare const IconExpand: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
36
|
+
export declare const IconDatasourceJiraIssue: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
37
|
+
export declare const IconDatasourceAssetsObjects: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
38
|
+
export declare const IconDatasourceConfluenceSearch: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
39
|
+
export declare const IconLoom: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
40
|
+
export declare const IconSyncBlock: PreloadableComponent<React.PropsWithChildren<IconProps>>;
|
|
39
41
|
export {};
|
|
@@ -10,11 +10,14 @@ export interface Props {
|
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
className?: string;
|
|
12
12
|
disabled?: boolean;
|
|
13
|
+
/** Keep the tooltip open when the button is pressed. Set it when a press changes the tooltip content. */
|
|
14
|
+
hasNewContentOnTriggerClick?: boolean;
|
|
13
15
|
hideTooltipOnClick?: boolean;
|
|
14
16
|
href?: string;
|
|
15
17
|
icon?: React.ReactElement<any>;
|
|
16
18
|
iconAfter?: React.ReactElement<any>;
|
|
17
19
|
interactionName?: string;
|
|
20
|
+
isLoading?: boolean;
|
|
18
21
|
isRadioButton?: boolean;
|
|
19
22
|
onBlur?: <T>(event: React.FocusEvent<T>) => void;
|
|
20
23
|
onClick?: React.MouseEventHandler;
|
|
@@ -27,8 +30,6 @@ export interface Props {
|
|
|
27
30
|
/** If true, the component will have pulse onboarding effect around it. */
|
|
28
31
|
pulse?: boolean;
|
|
29
32
|
selected?: boolean;
|
|
30
|
-
/** Keep the tooltip open when the button is pressed. Set it when a press changes the tooltip content. */
|
|
31
|
-
hasNewContentOnTriggerClick?: boolean;
|
|
32
33
|
tabIndex?: number | null | undefined;
|
|
33
34
|
target?: string;
|
|
34
35
|
testId?: string;
|
|
@@ -2,8 +2,8 @@ type NonProductionBuildAnalyticsAttributes = {
|
|
|
2
2
|
isNonProductionBuild?: boolean;
|
|
3
3
|
};
|
|
4
4
|
/**
|
|
5
|
-
* Adds a product-owned build classification
|
|
6
|
-
* A classifier callback is
|
|
5
|
+
* Adds a product-owned build classification to analytics attributes.
|
|
6
|
+
* A classifier callback is evaluated lazily, so the caller controls when browser reads happen.
|
|
7
7
|
* An unknown classification is omitted; an explicit false is preserved.
|
|
8
8
|
*/
|
|
9
9
|
export declare const getNonProductionBuildAnalyticsAttributes: (classification?: boolean | (() => boolean | undefined)) => NonProductionBuildAnalyticsAttributes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "130.
|
|
3
|
+
"version": "130.5.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/"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@atlaskit/media-client-react": "^7.0.0",
|
|
63
63
|
"@atlaskit/media-common": "^14.6.0",
|
|
64
64
|
"@atlaskit/media-file-preview": "^2.0.0",
|
|
65
|
-
"@atlaskit/media-picker": "^73.
|
|
65
|
+
"@atlaskit/media-picker": "^73.1.0",
|
|
66
66
|
"@atlaskit/media-ui": "^31.3.0",
|
|
67
67
|
"@atlaskit/media-viewer": "^54.11.0",
|
|
68
68
|
"@atlaskit/mention": "^30.2.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@atlaskit/task-decision": "^21.12.0",
|
|
86
86
|
"@atlaskit/teams-app-config": "^3.1.0",
|
|
87
87
|
"@atlaskit/textfield": "^10.2.0",
|
|
88
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
88
|
+
"@atlaskit/tmp-editor-statsig": "^234.0.0",
|
|
89
89
|
"@atlaskit/tokens": "^20.4.0",
|
|
90
90
|
"@atlaskit/tooltip": "^24.4.0",
|
|
91
91
|
"@atlaskit/width-detector": "^7.2.0",
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
"re-resizable": "6.0.0",
|
|
114
114
|
"react-focus-lock": "^2.9.5",
|
|
115
115
|
"react-loadable": "^5.1.0",
|
|
116
|
+
"react-loosely-lazy": "^1.0.0",
|
|
116
117
|
"react-virtualized": "^9.22.6",
|
|
117
118
|
"rusha": "^0.8.13",
|
|
118
119
|
"uuid": "^11.1.1",
|