@atlaskit/editor-plugin-card 32.1.3 → 32.1.4
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 +6 -0
- package/dist/cjs/cardPlugin.js +15 -15
- package/dist/cjs/nodeviews/blockCard.js +10 -9
- package/dist/cjs/nodeviews/datasource.js +8 -7
- package/dist/cjs/nodeviews/embedCard.js +21 -18
- package/dist/cjs/nodeviews/genericCard.js +7 -7
- package/dist/cjs/nodeviews/inlineCard.js +4 -4
- package/dist/cjs/nodeviews/inlineCardBase.js +6 -6
- package/dist/cjs/nodeviews/inlineCardWithAwareness.js +10 -10
- package/dist/cjs/nodeviews/toDOM-fixes/blockCard.js +2 -2
- package/dist/cjs/nodeviews/toDOM-fixes/embedCard.js +6 -6
- package/dist/cjs/nodeviews/toDOM-fixes/inlineCard.js +2 -2
- package/dist/cjs/pm-plugins/doc.js +45 -40
- package/dist/cjs/pm-plugins/main.js +8 -8
- package/dist/cjs/pm-plugins/shouldReplaceLink.js +4 -4
- package/dist/cjs/pm-plugins/util/resolve.js +2 -1
- package/dist/cjs/ui/ConfigureOverlay/index.js +2 -2
- package/dist/cjs/ui/DatasourceAppearanceButton.js +7 -6
- package/dist/cjs/ui/DatasourceDropdownOption.js +5 -5
- package/dist/cjs/ui/DatasourceModal/ModalWithState.js +2 -2
- package/dist/cjs/ui/EditLinkToolbar.js +16 -15
- package/dist/cjs/ui/EditToolbarButton/EditToolbarButtonPresentation.js +20 -17
- package/dist/cjs/ui/EditToolbarButton/index.js +18 -15
- package/dist/cjs/ui/EditorAnalyticsContext.js +2 -2
- package/dist/cjs/ui/EditorLinkingPlatformAnalytics/common.js +11 -11
- package/dist/cjs/ui/EditorSmartCardEvents.js +2 -2
- package/dist/cjs/ui/HyperlinkToolbarAppearance.js +4 -4
- package/dist/cjs/ui/HyperlinkToolbarAppearanceDropdown.js +8 -6
- package/dist/cjs/ui/InlineCardOverlay/index.js +3 -3
- package/dist/cjs/ui/LayoutButton/index.js +6 -6
- package/dist/cjs/ui/LinkToolbarAppearance.js +23 -22
- package/dist/cjs/ui/LinkToolbarAppearanceDropdown.js +20 -17
- package/dist/cjs/ui/OpenLinkToolbarButton/index.js +2 -2
- package/dist/cjs/ui/OpenPreviewButton/index.js +9 -9
- package/dist/cjs/ui/PasteDisplayAsMenu.js +21 -18
- package/dist/cjs/ui/ResizableEmbedCard.js +17 -14
- package/dist/cjs/ui/SmartCardSSRReactContextsProvider.js +2 -2
- package/dist/cjs/ui/analytics/events-from-tr.js +7 -6
- package/dist/cjs/ui/editDatasourceAction.js +5 -5
- package/dist/cjs/ui/nativeEmbedNode.js +6 -6
- package/dist/cjs/ui/preview/PreviewInvoker.js +2 -2
- package/dist/cjs/ui/quick-insert/DatasourceQuickInsertMenuItem.js +5 -5
- package/dist/cjs/ui/quick-insert/getCardQuickInsertComponents.js +11 -11
- package/dist/cjs/ui/toolbar.js +75 -68
- package/dist/es2019/cardPlugin.js +3 -3
- package/dist/es2019/nodeviews/blockCard.js +4 -3
- package/dist/es2019/nodeviews/datasource.js +4 -3
- package/dist/es2019/nodeviews/embedCard.js +8 -5
- package/dist/es2019/nodeviews/genericCard.js +2 -2
- package/dist/es2019/nodeviews/inlineCard.js +2 -2
- package/dist/es2019/nodeviews/inlineCardBase.js +3 -3
- package/dist/es2019/nodeviews/inlineCardWithAwareness.js +3 -3
- package/dist/es2019/nodeviews/toDOM-fixes/blockCard.js +1 -1
- package/dist/es2019/nodeviews/toDOM-fixes/embedCard.js +2 -2
- package/dist/es2019/nodeviews/toDOM-fixes/inlineCard.js +1 -1
- package/dist/es2019/pm-plugins/doc.js +8 -3
- package/dist/es2019/pm-plugins/main.js +3 -3
- package/dist/es2019/pm-plugins/shouldReplaceLink.js +1 -1
- package/dist/es2019/pm-plugins/util/resolve.js +2 -1
- package/dist/es2019/ui/ConfigureOverlay/index.js +1 -1
- package/dist/es2019/ui/DatasourceAppearanceButton.js +3 -3
- package/dist/es2019/ui/DatasourceDropdownOption.js +1 -1
- package/dist/es2019/ui/DatasourceModal/ModalWithState.js +1 -1
- package/dist/es2019/ui/EditLinkToolbar.js +6 -5
- package/dist/es2019/ui/EditToolbarButton/EditToolbarButtonPresentation.js +6 -3
- package/dist/es2019/ui/EditToolbarButton/index.js +6 -3
- package/dist/es2019/ui/EditorAnalyticsContext.js +1 -1
- package/dist/es2019/ui/EditorLinkingPlatformAnalytics/common.js +1 -1
- package/dist/es2019/ui/EditorSmartCardEvents.js +1 -1
- package/dist/es2019/ui/HyperlinkToolbarAppearance.js +2 -2
- package/dist/es2019/ui/HyperlinkToolbarAppearanceDropdown.js +4 -2
- package/dist/es2019/ui/InlineCardOverlay/index.js +2 -2
- package/dist/es2019/ui/LayoutButton/index.js +3 -3
- package/dist/es2019/ui/LinkToolbarAppearance.js +6 -3
- package/dist/es2019/ui/LinkToolbarAppearanceDropdown.js +6 -3
- package/dist/es2019/ui/OpenLinkToolbarButton/index.js +1 -1
- package/dist/es2019/ui/OpenPreviewButton/index.js +3 -3
- package/dist/es2019/ui/PasteDisplayAsMenu.js +7 -4
- package/dist/es2019/ui/ResizableEmbedCard.js +6 -3
- package/dist/es2019/ui/SmartCardSSRReactContextsProvider.js +1 -1
- package/dist/es2019/ui/analytics/events-from-tr.js +4 -3
- package/dist/es2019/ui/editDatasourceAction.js +1 -1
- package/dist/es2019/ui/nativeEmbedNode.js +2 -2
- package/dist/es2019/ui/preview/PreviewInvoker.js +1 -1
- package/dist/es2019/ui/quick-insert/DatasourceQuickInsertMenuItem.js +1 -1
- package/dist/es2019/ui/quick-insert/getCardQuickInsertComponents.js +2 -2
- package/dist/es2019/ui/toolbar.js +15 -8
- package/dist/esm/cardPlugin.js +3 -3
- package/dist/esm/nodeviews/blockCard.js +4 -3
- package/dist/esm/nodeviews/datasource.js +4 -3
- package/dist/esm/nodeviews/embedCard.js +8 -5
- package/dist/esm/nodeviews/genericCard.js +2 -2
- package/dist/esm/nodeviews/inlineCard.js +2 -2
- package/dist/esm/nodeviews/inlineCardBase.js +3 -3
- package/dist/esm/nodeviews/inlineCardWithAwareness.js +3 -3
- package/dist/esm/nodeviews/toDOM-fixes/blockCard.js +1 -1
- package/dist/esm/nodeviews/toDOM-fixes/embedCard.js +2 -2
- package/dist/esm/nodeviews/toDOM-fixes/inlineCard.js +1 -1
- package/dist/esm/pm-plugins/doc.js +8 -3
- package/dist/esm/pm-plugins/main.js +3 -3
- package/dist/esm/pm-plugins/shouldReplaceLink.js +1 -1
- package/dist/esm/pm-plugins/util/resolve.js +2 -1
- package/dist/esm/ui/ConfigureOverlay/index.js +1 -1
- package/dist/esm/ui/DatasourceAppearanceButton.js +3 -3
- package/dist/esm/ui/DatasourceDropdownOption.js +1 -1
- package/dist/esm/ui/DatasourceModal/ModalWithState.js +1 -1
- package/dist/esm/ui/EditLinkToolbar.js +6 -5
- package/dist/esm/ui/EditToolbarButton/EditToolbarButtonPresentation.js +6 -3
- package/dist/esm/ui/EditToolbarButton/index.js +6 -3
- package/dist/esm/ui/EditorAnalyticsContext.js +1 -1
- package/dist/esm/ui/EditorLinkingPlatformAnalytics/common.js +1 -1
- package/dist/esm/ui/EditorSmartCardEvents.js +1 -1
- package/dist/esm/ui/HyperlinkToolbarAppearance.js +2 -2
- package/dist/esm/ui/HyperlinkToolbarAppearanceDropdown.js +4 -2
- package/dist/esm/ui/InlineCardOverlay/index.js +2 -2
- package/dist/esm/ui/LayoutButton/index.js +3 -3
- package/dist/esm/ui/LinkToolbarAppearance.js +6 -3
- package/dist/esm/ui/LinkToolbarAppearanceDropdown.js +6 -3
- package/dist/esm/ui/OpenLinkToolbarButton/index.js +1 -1
- package/dist/esm/ui/OpenPreviewButton/index.js +3 -3
- package/dist/esm/ui/PasteDisplayAsMenu.js +7 -4
- package/dist/esm/ui/ResizableEmbedCard.js +6 -3
- package/dist/esm/ui/SmartCardSSRReactContextsProvider.js +1 -1
- package/dist/esm/ui/analytics/events-from-tr.js +4 -3
- package/dist/esm/ui/editDatasourceAction.js +1 -1
- package/dist/esm/ui/nativeEmbedNode.js +2 -2
- package/dist/esm/ui/preview/PreviewInvoker.js +1 -1
- package/dist/esm/ui/quick-insert/DatasourceQuickInsertMenuItem.js +1 -1
- package/dist/esm/ui/quick-insert/getCardQuickInsertComponents.js +2 -2
- package/dist/esm/ui/toolbar.js +15 -8
- package/dist/types/cardPluginType.d.ts +20 -18
- package/dist/types/nodeviews/blockCard.d.ts +2 -2
- package/dist/types/nodeviews/datasource.d.ts +3 -3
- package/dist/types/nodeviews/embedCard.d.ts +2 -1
- package/dist/types/nodeviews/genericCard.d.ts +7 -6
- package/dist/types/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types/nodeviews/lazy-inline-card.d.ts +1 -1
- package/dist/types/pm-plugins/actions.d.ts +3 -3
- package/dist/types/pm-plugins/doc.d.ts +5 -5
- package/dist/types/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +2 -1
- package/dist/types/pm-plugins/util/resolve.d.ts +4 -3
- package/dist/types/pm-plugins/util/state.d.ts +6 -5
- package/dist/types/pm-plugins/utils.d.ts +2 -2
- package/dist/types/types/index.d.ts +8 -5
- package/dist/types/ui/DatasourceAppearanceButton.d.ts +1 -1
- package/dist/types/ui/DatasourceDropdownOption.d.ts +1 -1
- package/dist/types/ui/DatasourceModal/ModalWithState.d.ts +2 -1
- package/dist/types/ui/DatasourceModal/index.d.ts +1 -1
- package/dist/types/ui/EditLinkToolbar.d.ts +8 -5
- package/dist/types/ui/EditToolbarButton/types.d.ts +2 -2
- package/dist/types/ui/HyperlinkToolbarAppearance.d.ts +3 -3
- package/dist/types/ui/HyperlinkToolbarAppearanceDropdown.d.ts +2 -1
- package/dist/types/ui/LayoutButton/types.d.ts +1 -1
- package/dist/types/ui/LinkToolbarAppearance.d.ts +2 -2
- package/dist/types/ui/LinkToolbarAppearanceDropdown.d.ts +2 -1
- package/dist/types/ui/OpenLinkToolbarButton/index.d.ts +1 -1
- package/dist/types/ui/OpenPreviewButton/index.d.ts +1 -1
- package/dist/types/ui/PasteDisplayAsMenu.d.ts +1 -1
- package/dist/types/ui/ResizableEmbedCard.d.ts +1 -1
- package/dist/types/ui/analytics/utils.d.ts +1 -1
- package/dist/types/ui/datasourceErrorBoundary.d.ts +1 -1
- package/dist/types/ui/editDatasourceAction.d.ts +2 -2
- package/dist/types/ui/hooks/useLinkUpgradeDiscoverability.d.ts +1 -1
- package/dist/types/ui/nativeEmbedNode.d.ts +1 -1
- package/dist/types/ui/quick-insert/DatasourceQuickInsertMenuItem.d.ts +1 -1
- package/dist/types/ui/quick-insert/getCardQuickInsertComponents.d.ts +1 -1
- package/dist/types/ui/toolbar.d.ts +7 -4
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeUrl } from '@atlaskit/adf-schema/normalize-url';
|
|
2
|
-
import { md } from '@atlaskit/editor-common/paste';
|
|
2
|
+
import { md } from '@atlaskit/editor-common/paste/md';
|
|
3
3
|
export function shouldReplaceLink(node) {
|
|
4
4
|
var compareLinkText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
5
5
|
var compareToUrl = arguments.length > 2 ? arguments[2] : undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hasDocAsParent } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { canRenderDatasource } from '@atlaskit/editor-common/utils/datasource';
|
|
2
3
|
import { setProvider } from '../actions';
|
|
3
4
|
import { handleFallbackWithAnalytics, replaceQueuedUrlWithCard } from '../doc';
|
|
4
5
|
var isFreshlyPastedOnNewLine = function isFreshlyPastedOnNewLine(view) {
|
|
@@ -8,7 +8,7 @@ import { useCallback, useState } from 'react';
|
|
|
8
8
|
// not permitted to migrate atlaskit packages to compiled yet, see https://hello.atlassian.net/wiki/spaces/UAF/pages/3006969423/Migrating+AFM+platform+components+to+Compiled+a+guide
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
|
-
import { OverlayButton } from '@atlaskit/editor-common/link';
|
|
11
|
+
import { OverlayButton } from '@atlaskit/editor-common/link/ConfigureLinkOverlay';
|
|
12
12
|
var ConfigureOverlayWrapperStyles = css({
|
|
13
13
|
position: 'relative',
|
|
14
14
|
left: "var(--ds-space-025, 2px)"
|
|
@@ -6,9 +6,9 @@ import { useCallback } from 'react';
|
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
9
|
+
import Button from '@atlaskit/editor-common/FloatingToolbar/Button';
|
|
10
|
+
import { messages } from '@atlaskit/editor-common/messages/card';
|
|
11
|
+
import { canRenderDatasource } from '@atlaskit/editor-common/utils/datasource';
|
|
12
12
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
13
13
|
import { buildDatasourceAdf } from '@atlaskit/link-datasource/utils/schema';
|
|
14
14
|
import { useSmartLinkContext } from '@atlaskit/link-provider/use-smart-link-context';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { messages } from '@atlaskit/editor-common/messages/card';
|
|
3
3
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import SmartLinkListIcon from '@atlaskit/icon/core/smart-link-list';
|
|
5
5
|
import { buildDatasourceAdf } from '@atlaskit/link-datasource/utils/schema';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
2
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
3
3
|
import { AssetsConfigModalWithWrappers as AssetsConfigModal } from '@atlaskit/link-datasource/assets-config-modal-with-wrappers';
|
|
4
4
|
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '@atlaskit/link-datasource/assets-modal';
|
|
5
5
|
import { ConfluenceSearchConfigModalWithWrappers as ConfluenceSearchConfigModal } from '@atlaskit/link-datasource/confluence-search-config-modal-with-wrappers';
|
|
@@ -6,11 +6,12 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
6
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
9
|
+
import { buildEditLinkPayload } from '@atlaskit/editor-common/analytics/linking-utils';
|
|
10
|
+
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
11
|
+
import { commandWithMetadata } from '@atlaskit/editor-common/card/utils';
|
|
12
|
+
import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/link-search-constants';
|
|
13
|
+
import { HyperlinkAddToolbar as HyperlinkToolbar } from '@atlaskit/editor-common/link/HyperlinkAddToolbar';
|
|
14
|
+
import { linkToolbarMessages } from '@atlaskit/editor-common/messages/link-toolbar';
|
|
14
15
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
15
16
|
import { hideLinkToolbar as _hideLinkToolbar, showLinkToolbar } from '../pm-plugins/actions';
|
|
16
17
|
import { changeSelectedCardToLink, updateCard } from '../pm-plugins/doc';
|
|
@@ -8,9 +8,12 @@ import { useCallback, useRef, useState } from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { FormattedMessage } from 'react-intl';
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
11
|
+
import Button from '@atlaskit/editor-common/FloatingToolbar/Button';
|
|
12
|
+
import Separator from '@atlaskit/editor-common/FloatingToolbar/Separator';
|
|
13
|
+
import { messages } from '@atlaskit/editor-common/messages/card';
|
|
14
|
+
import { linkToolbarMessages } from '@atlaskit/editor-common/messages/link-toolbar';
|
|
15
|
+
import { ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types';
|
|
16
|
+
import { DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu/DropdownContainer';
|
|
14
17
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
15
18
|
import EditIcon from '@atlaskit/icon/core/edit';
|
|
16
19
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
@@ -10,9 +10,12 @@ import { useCallback, useMemo, useRef, useState } from 'react';
|
|
|
10
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
11
11
|
import { css, jsx } from '@emotion/react';
|
|
12
12
|
import { FormattedMessage } from 'react-intl';
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
13
|
+
import Button from '@atlaskit/editor-common/FloatingToolbar/Button';
|
|
14
|
+
import Separator from '@atlaskit/editor-common/FloatingToolbar/Separator';
|
|
15
|
+
import { messages } from '@atlaskit/editor-common/messages/card';
|
|
16
|
+
import { linkToolbarMessages } from '@atlaskit/editor-common/messages/link-toolbar';
|
|
17
|
+
import { ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types';
|
|
18
|
+
import { DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu/DropdownContainer';
|
|
16
19
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
17
20
|
import { useSmartLinkContext } from '@atlaskit/link-provider/use-smart-link-context';
|
|
18
21
|
import ButtonItem from '@atlaskit/menu/button-item';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
3
|
-
import { getAnalyticsEditorAppearance } from '@atlaskit/editor-common/utils';
|
|
3
|
+
import { getAnalyticsEditorAppearance } from '@atlaskit/editor-common/utils/analytics';
|
|
4
4
|
import { getPluginState } from '../pm-plugins/util/state';
|
|
5
5
|
/**
|
|
6
6
|
* Provides location attribute to child events
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
|
|
2
|
-
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
3
|
/**
|
|
4
4
|
* If the metadata is for a history event,
|
|
5
5
|
* returns undo/redo instead of instead of what fn(metadata) would have otherwise
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import { useSmartLinkEvents } from '@atlaskit/smart-card';
|
|
2
|
+
import { useSmartLinkEvents } from '@atlaskit/smart-card/hook/use-smart-link-events';
|
|
3
3
|
import { registerSmartCardEvents } from '../pm-plugins/actions';
|
|
4
4
|
export var EditorSmartCardEvents = function EditorSmartCardEvents(_ref) {
|
|
5
5
|
var editorView = _ref.editorView;
|
|
@@ -2,9 +2,9 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import React, { useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
|
+
import Separator from '@atlaskit/editor-common/FloatingToolbar/Separator';
|
|
6
7
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
7
|
-
import { FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
|
|
8
8
|
import { Flex } from '@atlaskit/primitives/compiled';
|
|
9
9
|
import { DatasourceAppearanceButton } from './DatasourceAppearanceButton';
|
|
10
10
|
import { LinkToolbarAppearance } from './LinkToolbarAppearance';
|
|
@@ -3,9 +3,11 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import React, { useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { appearancePropsMap } from '@atlaskit/editor-common/card';
|
|
6
|
+
import Button from '@atlaskit/editor-common/FloatingToolbar/Button';
|
|
7
|
+
import Separator from '@atlaskit/editor-common/FloatingToolbar/Separator';
|
|
6
8
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
+
import { ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types';
|
|
10
|
+
import { DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu/DropdownContainer';
|
|
9
11
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
10
12
|
import { Flex } from '@atlaskit/primitives/compiled';
|
|
11
13
|
import { LinkAppearanceMenu } from './LinkToolbarAppearanceDropdown';
|
|
@@ -16,8 +16,8 @@ import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from
|
|
|
16
16
|
import { css, jsx } from '@emotion/react';
|
|
17
17
|
import debounce from 'lodash/debounce';
|
|
18
18
|
import { useIntl } from 'react-intl';
|
|
19
|
-
import {
|
|
20
|
-
import { ZERO_WIDTH_JOINER } from '@atlaskit/editor-common/whitespace';
|
|
19
|
+
import { messages } from '@atlaskit/editor-common/messages/card';
|
|
20
|
+
import { ZERO_WIDTH_JOINER } from '@atlaskit/editor-common/whitespace/whitespace';
|
|
21
21
|
import CustomizeIcon from '@atlaskit/icon/core/customize';
|
|
22
22
|
import { useSmartLinkDestinationUrl } from '@atlaskit/smart-card/hook/use-smart-link-destination-url';
|
|
23
23
|
import { getChildElement, getInlineCardAvailableWidth, getOverlayWidths, isOneLine } from './utils';
|
|
@@ -9,9 +9,9 @@ import { useCallback, useMemo } from 'react';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { injectIntl } from 'react-intl';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
12
|
+
import Popup from '@atlaskit/editor-common/Popup';
|
|
13
|
+
import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
|
|
14
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
15
15
|
import { getNextBreakoutMode, getTitle } from '@atlaskit/editor-common/utils';
|
|
16
16
|
import GrowHorizontalIcon from '@atlaskit/icon/core/grow-horizontal';
|
|
17
17
|
import ShrinkHorizontalIcon from '@atlaskit/icon/core/shrink-horizontal';
|
|
@@ -10,9 +10,12 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
13
|
-
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
13
|
+
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
14
|
+
import { getButtonGroupOption } from '@atlaskit/editor-common/card/link-toolbar-button-group-options';
|
|
15
|
+
import { LinkToolbarButtonGroup } from '@atlaskit/editor-common/card/LinkToolbarButtonGroup';
|
|
16
|
+
import { commandWithMetadata } from '@atlaskit/editor-common/card/utils';
|
|
17
|
+
import nodeNames from '@atlaskit/editor-common/messages';
|
|
18
|
+
import { messages } from '@atlaskit/editor-common/messages/card';
|
|
16
19
|
import { isSupportedInParent } from '@atlaskit/editor-common/utils';
|
|
17
20
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
18
21
|
import { changeSelectedCardToLink, setSelectedCardAppearance } from '../pm-plugins/doc';
|
|
@@ -2,9 +2,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
6
|
-
import { appearancePropsMap
|
|
7
|
-
import {
|
|
5
|
+
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
|
+
import { appearancePropsMap } from '@atlaskit/editor-common/card';
|
|
7
|
+
import { getDropdownOption } from '@atlaskit/editor-common/card/link-toolbar-dropdown-options';
|
|
8
|
+
import { commandWithMetadata } from '@atlaskit/editor-common/card/utils';
|
|
9
|
+
import { messages } from '@atlaskit/editor-common/messages/card';
|
|
10
|
+
import { linkToolbarMessages } from '@atlaskit/editor-common/messages/link-toolbar';
|
|
8
11
|
import { isSupportedInParent } from '@atlaskit/editor-common/utils';
|
|
9
12
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
10
13
|
import { useSmartCardContext } from '@atlaskit/link-provider/use-smart-card-context';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Button from '@atlaskit/editor-common/FloatingToolbar/Button';
|
|
3
3
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
4
4
|
import { useSmartLinkDestinationUrl } from '@atlaskit/smart-card/hook/use-smart-link-destination-url';
|
|
5
5
|
/**
|
|
@@ -2,9 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
5
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
|
+
import Button from '@atlaskit/editor-common/FloatingToolbar/Button';
|
|
7
|
+
import { linkMessages } from '@atlaskit/editor-common/messages/link';
|
|
8
8
|
import PanelRightIcon from '@atlaskit/icon/core/panel-right';
|
|
9
9
|
import { extractSmartLinkEmbed } from '@atlaskit/link-extractors/extract-smart-link-embed';
|
|
10
10
|
import { useSmartLinkContext } from '@atlaskit/link-provider/use-smart-link-context';
|
|
@@ -7,13 +7,16 @@ import React, { useCallback, useEffect, useRef } from 'react';
|
|
|
7
7
|
import { useIntl } from 'react-intl';
|
|
8
8
|
import { cx } from '@atlaskit/css';
|
|
9
9
|
import { appearancePropsMap } from '@atlaskit/editor-common/card';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { PASTE_MENU
|
|
10
|
+
import { getActiveLinkMark } from '@atlaskit/editor-common/link/utils';
|
|
11
|
+
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar/context';
|
|
12
|
+
import { PASTE_MENU } from '@atlaskit/editor-common/toolbar/keys';
|
|
13
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
13
14
|
import { isSupportedInParent } from '@atlaskit/editor-common/utils';
|
|
14
15
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
15
16
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
16
|
-
import { ToolbarDropdownItemSection
|
|
17
|
+
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar/toolbar-dropdown-item-section';
|
|
18
|
+
import { useToolbarDropdownMenu } from '@atlaskit/editor-toolbar/toolbar-dropdown-menu-context';
|
|
19
|
+
import { ToolbarTooltip } from '@atlaskit/editor-toolbar/toolbar-tooltip';
|
|
17
20
|
import MinusIcon from '@atlaskit/icon/core/minus';
|
|
18
21
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
19
22
|
import SmartLinkEmbedIcon from '@atlaskit/icon/core/smart-link-embed';
|
|
@@ -17,12 +17,15 @@ import React from 'react';
|
|
|
17
17
|
|
|
18
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
19
19
|
import { jsx } from '@emotion/react';
|
|
20
|
-
import {
|
|
20
|
+
import { calcMediaPxWidth } from '@atlaskit/editor-common/MediaSingle/grid';
|
|
21
|
+
import Resizer from '@atlaskit/editor-common/ResizerLegacy';
|
|
22
|
+
import { wrapperStyle } from '@atlaskit/editor-common/ResizerLegacy/styled';
|
|
23
|
+
import { calcColumnsFromPx, calcPctFromPx, calcPxFromColumns, handleSides, imageAlignmentMap, snapTo, wrappedLayouts } from '@atlaskit/editor-common/ui';
|
|
21
24
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
22
25
|
import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
23
|
-
import { akEditorBreakoutPadding, akEditorMediaResizeHandlerPadding, akEditorWideLayoutWidth, breakoutWideScaleRatio, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
26
|
+
import { akEditorBreakoutPadding, akEditorMediaResizeHandlerPadding, akEditorWideLayoutWidth, breakoutWideScaleRatio, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles/constants';
|
|
24
27
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
25
|
-
import { embedHeaderHeight } from '@atlaskit/smart-card';
|
|
28
|
+
import { embedHeaderHeight } from '@atlaskit/smart-card/embed-resize-message-listener';
|
|
26
29
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
27
30
|
// Layouts where the left handle is the only resize handle today.
|
|
28
31
|
// These must keep the left handle.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RawIntlProvider } from 'react-intl';
|
|
3
|
-
import { isSSR } from '@atlaskit/editor-common/
|
|
3
|
+
import { isSSR } from '@atlaskit/editor-common/is-ssr';
|
|
4
4
|
import { SmartCardContext } from '@atlaskit/link-provider/context';
|
|
5
5
|
export function SmartCardSSRReactContextsProvider(_ref) {
|
|
6
6
|
var smartCardContext = _ref.smartCardContext,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import { LinkMetaStep } from '@atlaskit/adf-schema/steps/link-meta-step';
|
|
4
|
-
import { TableSortStep } from '@atlaskit/custom-steps';
|
|
5
|
-
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { TableSortStep } from '@atlaskit/custom-steps/sort-column';
|
|
5
|
+
import { ACTION } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
6
|
import { getLinkMetadataFromTransaction } from '@atlaskit/editor-common/card';
|
|
7
|
-
import {
|
|
7
|
+
import { pmHistoryPluginKey } from '@atlaskit/editor-common/utils';
|
|
8
|
+
import { isLinkMark } from '@atlaskit/editor-common/utils/nodes';
|
|
8
9
|
import { AddMarkStep, RemoveMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
9
10
|
import { pluginKey } from '../../pm-plugins/plugin-key';
|
|
10
11
|
import { getPluginState } from '../../pm-plugins/util/state';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
2
|
import { getDatasourceType } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { showDatasourceModal } from '../pm-plugins/actions';
|
|
4
4
|
export var editDatasource = function editDatasource(datasourceId, editorAnalyticsApi, appearance, extensionKey) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import { isSafeUrl } from '@atlaskit/adf-schema/is-safe-url';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { NATIVE_EMBED_EXTENSION_KEY, NATIVE_EMBED_EXTENSION_TYPE } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { NATIVE_EMBED_EXTENSION_KEY, NATIVE_EMBED_EXTENSION_TYPE } from '@atlaskit/editor-common/extensions/manifest-helpers';
|
|
5
5
|
/**
|
|
6
6
|
* A native embed is an `extension` node that `editor-plugin-native-embeds` builds from
|
|
7
7
|
* embedCard ADF (via the `embedCardNodeTransformer` registered on the card plugin).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
|
-
import { useSmartLinkActions } from '@atlaskit/smart-card/
|
|
2
|
+
import { useSmartLinkActions } from '@atlaskit/smart-card/hook/use-smart-link-actions';
|
|
3
3
|
export var PreviewInvoker = function PreviewInvoker(_ref) {
|
|
4
4
|
var url = _ref.url,
|
|
5
5
|
appearance = _ref.appearance,
|
|
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
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; }
|
|
4
4
|
import React, { useCallback, useMemo } from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
|
-
import {
|
|
6
|
+
import { messages } from '@atlaskit/editor-common/messages/card';
|
|
7
7
|
import { ConfluenceAttributionIcon } from '@atlaskit/editor-common/quick-insert/confluence-attribution-icon';
|
|
8
8
|
import { JiraAttributionIcon } from '@atlaskit/editor-common/quick-insert/jira-attribution-icon';
|
|
9
9
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { messages } from '@atlaskit/editor-common/messages/card';
|
|
4
4
|
import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
|
|
5
5
|
import { ASSETS_MENU_ITEM, CONFLUENCE_LIST_MENU_ITEM, DATA_AND_CHARTS_SECTION, JIRA_WORK_ITEMS_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
|
|
6
6
|
import { DATA_AND_CHARTS_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
7
|
-
import { canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
7
|
+
import { canRenderDatasource } from '@atlaskit/editor-common/utils/datasource';
|
|
8
8
|
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '@atlaskit/link-datasource/assets-modal';
|
|
9
9
|
import { CONFLUENCE_SEARCH_DATASOURCE_ID } from '@atlaskit/link-datasource/confluence-search-modal';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -4,17 +4,24 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
4
4
|
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; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { isSafeUrl } from '@atlaskit/adf-schema/is-safe-url';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
7
|
+
import { buildOpenedSettingsPayload, buildVisitedNonHyperLinkPayload } from '@atlaskit/editor-common/analytics/linking-utils';
|
|
8
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID as ACTION_SUBJECTID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
9
|
+
import buildLayoutButtons, { buildLayoutDropdown } from '@atlaskit/editor-common/card/MediaAndEmbedsToolbar';
|
|
10
|
+
import { commandWithMetadata } from '@atlaskit/editor-common/card/utils';
|
|
11
|
+
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
12
|
+
import { getLinkPreferencesURLFromENV } from '@atlaskit/editor-common/link/utils';
|
|
13
|
+
import commonMessages from '@atlaskit/editor-common/messages';
|
|
14
|
+
import { annotationMessages } from '@atlaskit/editor-common/messages/annotation';
|
|
15
|
+
import { messages } from '@atlaskit/editor-common/messages/card';
|
|
16
|
+
import { linkMessages } from '@atlaskit/editor-common/messages/link';
|
|
17
|
+
import { linkToolbarMessages } from '@atlaskit/editor-common/messages/link-toolbar';
|
|
18
|
+
import { richMediaClassName } from '@atlaskit/editor-common/styles/media-single';
|
|
19
|
+
import { FLOATING_TOOLBAR_LINKPICKER_CLASSNAME } from '@atlaskit/editor-common/styles/smartCard';
|
|
12
20
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
13
|
-
import { canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
14
|
-
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
21
|
+
import { canRenderDatasource } from '@atlaskit/editor-common/utils/datasource';
|
|
15
22
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
16
23
|
import { findDomRefAtPos, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
17
|
-
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
24
|
+
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles/constants';
|
|
18
25
|
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
19
26
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
20
27
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import type UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
|
|
2
|
-
import type { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { CardPluginActions, CardReplacementInputMethod } from '@atlaskit/editor-common/card';
|
|
4
|
-
import type { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import type { Command
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
17
|
-
import type {
|
|
18
|
-
import type {
|
|
2
|
+
import type { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import type { CardPluginActions, CardReplacementInputMethod } from '@atlaskit/editor-common/card/types';
|
|
4
|
+
import type { CardAppearance } from '@atlaskit/editor-common/provider-factory/card-provider';
|
|
5
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
6
|
+
import type { EditorCommand } from '@atlaskit/editor-common/types/editor-command';
|
|
7
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
8
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics/analyticsPluginType';
|
|
9
|
+
import type { InlineCommentPluginState } from '@atlaskit/editor-plugin-annotation/pm-plugins/types';
|
|
10
|
+
import type { BasePlugin } from '@atlaskit/editor-plugin-base/basePluginType';
|
|
11
|
+
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity/connectivityPluginType';
|
|
12
|
+
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations/decorationsPluginType';
|
|
13
|
+
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled/editorDisabledPluginType';
|
|
14
|
+
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode/editorViewmodePluginType';
|
|
15
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags/featureFlagsPluginType';
|
|
16
|
+
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar/floatingToolbarPluginType';
|
|
17
|
+
import type { GridPlugin } from '@atlaskit/editor-plugin-grid/gridPluginType';
|
|
18
|
+
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection/selection-plugin-type';
|
|
19
|
+
import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar/toolbar-plugin-type';
|
|
20
|
+
import type { UiControlRegistryPlugin } from '@atlaskit/editor-plugin-ui-control-registry/ui-control-registry-plugin-type';
|
|
19
21
|
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent/user-intent-plugin-type';
|
|
20
|
-
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
22
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width/width-plugin-type';
|
|
21
23
|
import type { CardPluginOptions, CardPluginState } from './types';
|
|
22
24
|
type DummyAnnotationPlugin = NextEditorPlugin<'annotation', {
|
|
23
25
|
actions: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { IntlShape } from 'react-intl';
|
|
3
|
+
import type { getInlineNodeViewProducer } from '@atlaskit/editor-common/getInlineNodeViewProducer';
|
|
3
4
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
4
|
-
import type {
|
|
5
|
-
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types/plugin-factory';
|
|
6
6
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
7
7
|
import type { Decoration, DecorationSource, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import type { CardContext } from '@atlaskit/link-provider/types';
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
+
import type { PortalProviderAPI } from '@atlaskit/editor-common/common';
|
|
7
8
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
8
|
-
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
9
|
-
import type { getPosHandler, ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
10
9
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
11
|
-
import type {
|
|
10
|
+
import type { getPosHandler, ReactComponentProps } from '@atlaskit/editor-common/react-node-view/types';
|
|
11
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
12
12
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
13
13
|
import type { Decoration, DecorationSource, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
14
14
|
import type { cardPlugin } from '../index';
|
|
@@ -3,7 +3,8 @@ import type { ComponentProps } from 'react';
|
|
|
3
3
|
import type { IntlShape } from 'react-intl';
|
|
4
4
|
import type { Layout as RichMediaLayout } from '@atlaskit/adf-schema/rich-media-common';
|
|
5
5
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
6
|
-
import type { ExtractInjectionAPI
|
|
6
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
7
|
+
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types/plugin-factory';
|
|
7
8
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
8
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
10
|
import type { CardContext } from '@atlaskit/link-provider/types';
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { EventHandler, KeyboardEvent, MouseEvent } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { IntlShape } from 'react-intl';
|
|
4
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import type { OnClickCallback } from '@atlaskit/editor-common/card';
|
|
4
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event';
|
|
5
|
+
import type { OnClickCallback } from '@atlaskit/editor-common/card/cardOptions';
|
|
6
6
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
7
|
-
import type
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
7
|
+
import type ProviderFactory from '@atlaskit/editor-common/provider-factory/provider-factory';
|
|
8
|
+
import type { Providers } from '@atlaskit/editor-common/provider-factory/types';
|
|
9
|
+
import type { ReactComponentProps, getPosHandler } from '@atlaskit/editor-common/react-node-view/types';
|
|
10
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
10
11
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
11
12
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
12
13
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
13
14
|
import type { CardContext } from '@atlaskit/link-provider/types';
|
|
14
|
-
import type { CardProps as BaseCardProps } from '@atlaskit/smart-card';
|
|
15
|
+
import type { CardProps as BaseCardProps } from '@atlaskit/smart-card/card/types';
|
|
15
16
|
import type { cardPlugin } from '../index';
|
|
16
17
|
export type EditorContext<T> = React.Context<T> & {
|
|
17
18
|
value: T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { InlineNodeViewComponentProps, getInlineNodeViewProducer } from '@atlaskit/editor-common/
|
|
2
|
+
import type { InlineNodeViewComponentProps, getInlineNodeViewProducer } from '@atlaskit/editor-common/getInlineNodeViewProducer';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { Decoration, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { SmartCardProps } from './genericCard';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
|
|
1
|
+
import type { NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view/types';
|
|
2
2
|
import type { InlineCardNodeViewProperties } from './inlineCard';
|
|
3
3
|
export declare const lazyInlineCardView: (props: InlineCardNodeViewProperties) => NodeViewConstructor;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { CardProvider } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
-
import type { DatasourceModalType } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { CardProvider } from '@atlaskit/editor-common/provider-factory/card-provider';
|
|
2
|
+
import type { DatasourceModalType } from '@atlaskit/editor-common/types/datasource';
|
|
3
3
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { DatasourceAdfView } from '@atlaskit/linking-common/types';
|
|
5
|
-
import type { SmartLinkEvents } from '@atlaskit/smart-card';
|
|
5
|
+
import type { SmartLinkEvents } from '@atlaskit/smart-card/smart-link-events';
|
|
6
6
|
import type { CardInfo, CardPluginAction, Request, ToolbarResolvedAttributes } from '../types';
|
|
7
7
|
import type { DatasourceTableLayout } from '../ui/LayoutButton/types';
|
|
8
8
|
export declare const cardAction: (tr: Transaction, action: CardPluginAction) => Transaction;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
2
2
|
import type UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
|
|
3
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import type { CardReplacementInputMethod, EmbedCardNodeTransformer } from '@atlaskit/editor-common/card';
|
|
6
|
-
import type { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
7
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
4
|
+
import { ACTION } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
|
+
import type { CardReplacementInputMethod, EmbedCardNodeTransformer } from '@atlaskit/editor-common/card/types';
|
|
6
|
+
import type { CardAppearance } from '@atlaskit/editor-common/provider-factory/card-provider';
|
|
7
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
8
8
|
import type { Attrs, Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types/feature-flags';
|
|
3
3
|
export declare function cardKeymap(featureFlags: FeatureFlags): SafePlugin;
|