@atlaskit/editor-plugin-card 17.4.11 → 18.0.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 +32 -0
- package/cardPlugin/package.json +1 -8
- package/cardPluginType/package.json +1 -8
- package/package.json +42 -50
- package/types/package.json +1 -8
- package/dist/types-ts4.5/cardPlugin.d.ts +0 -2
- package/dist/types-ts4.5/cardPluginType.d.ts +0 -53
- package/dist/types-ts4.5/entry-points/cardPlugin.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/cardPluginType.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -3
- package/dist/types-ts4.5/nodeviews/blockCard.d.ts +0 -64
- package/dist/types-ts4.5/nodeviews/datasource.d.ts +0 -61
- package/dist/types-ts4.5/nodeviews/embedCard.d.ts +0 -102
- package/dist/types-ts4.5/nodeviews/genericCard.d.ts +0 -67
- package/dist/types-ts4.5/nodeviews/inlineCard.d.ts +0 -20
- package/dist/types-ts4.5/nodeviews/inlineCardWithAwareness.d.ts +0 -8
- package/dist/types-ts4.5/nodeviews/lazy-block-card.d.ts +0 -3
- package/dist/types-ts4.5/nodeviews/lazy-embed-card.d.ts +0 -3
- package/dist/types-ts4.5/nodeviews/lazy-inline-card.d.ts +0 -3
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/blockCard.d.ts +0 -29
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/embedCard.d.ts +0 -29
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/inlineCard.d.ts +0 -29
- package/dist/types-ts4.5/pm-plugins/actions.d.ts +0 -32
- package/dist/types-ts4.5/pm-plugins/doc.d.ts +0 -50
- package/dist/types-ts4.5/pm-plugins/keymap.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -5
- package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/reducers.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/shouldReplaceLink.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/util/resolve.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/util/state.d.ts +0 -56
- package/dist/types-ts4.5/pm-plugins/utils.d.ts +0 -48
- package/dist/types-ts4.5/types/index.d.ts +0 -208
- package/dist/types-ts4.5/ui/AwarenessWrapper/index.d.ts +0 -15
- package/dist/types-ts4.5/ui/ConfigureOverlay/index.d.ts +0 -11
- package/dist/types-ts4.5/ui/DatasourceAppearanceButton.d.ts +0 -18
- package/dist/types-ts4.5/ui/DatasourceDropdownOption.d.ts +0 -29
- package/dist/types-ts4.5/ui/DatasourceIcon/index.d.ts +0 -3
- package/dist/types-ts4.5/ui/DatasourceModal/ModalWithState.d.ts +0 -20
- package/dist/types-ts4.5/ui/DatasourceModal/index.d.ts +0 -12
- package/dist/types-ts4.5/ui/EditLinkToolbar.d.ts +0 -37
- package/dist/types-ts4.5/ui/EditToolbarButton/EditToolbarButtonPresentation.d.ts +0 -9
- package/dist/types-ts4.5/ui/EditToolbarButton/index.d.ts +0 -3
- package/dist/types-ts4.5/ui/EditToolbarButton/types.d.ts +0 -31
- package/dist/types-ts4.5/ui/EditorAnalyticsContext.d.ts +0 -10
- package/dist/types-ts4.5/ui/EditorLinkingPlatformAnalytics/DatasourceEvents.d.ts +0 -6
- package/dist/types-ts4.5/ui/EditorLinkingPlatformAnalytics/LinkEvents.d.ts +0 -6
- package/dist/types-ts4.5/ui/EditorLinkingPlatformAnalytics/common.d.ts +0 -20
- package/dist/types-ts4.5/ui/EditorLinkingPlatformAnalytics/index.d.ts +0 -5
- package/dist/types-ts4.5/ui/EditorSmartCardEvents.d.ts +0 -4
- package/dist/types-ts4.5/ui/HyperlinkToolbarAppearance.d.ts +0 -18
- package/dist/types-ts4.5/ui/HyperlinkToolbarAppearanceDropdown.d.ts +0 -7
- package/dist/types-ts4.5/ui/InlineCardOverlay/index.d.ts +0 -9
- package/dist/types-ts4.5/ui/InlineCardOverlay/types.d.ts +0 -6
- package/dist/types-ts4.5/ui/InlineCardOverlay/utils.d.ts +0 -20
- package/dist/types-ts4.5/ui/LayoutButton/index.d.ts +0 -9
- package/dist/types-ts4.5/ui/LayoutButton/types.d.ts +0 -24
- package/dist/types-ts4.5/ui/LayoutButton/utils.d.ts +0 -13
- package/dist/types-ts4.5/ui/LinkToolbarAppearance.d.ts +0 -25
- package/dist/types-ts4.5/ui/LinkToolbarAppearanceDropdown.d.ts +0 -14
- package/dist/types-ts4.5/ui/OpenLinkToolbarButton/index.d.ts +0 -20
- package/dist/types-ts4.5/ui/OpenPreviewButton/index.d.ts +0 -14
- package/dist/types-ts4.5/ui/PasteDisplayAsMenu.d.ts +0 -25
- package/dist/types-ts4.5/ui/Pulse/index.d.ts +0 -25
- package/dist/types-ts4.5/ui/ResizableEmbedCard.d.ts +0 -66
- package/dist/types-ts4.5/ui/SmartCardSSRReactContextsProvider.d.ts +0 -10
- package/dist/types-ts4.5/ui/ToolbarViewedEvent.d.ts +0 -11
- package/dist/types-ts4.5/ui/WithCardContext.d.ts +0 -5
- package/dist/types-ts4.5/ui/analytics/create-events-queue.d.ts +0 -21
- package/dist/types-ts4.5/ui/analytics/events-from-tr.d.ts +0 -19
- package/dist/types-ts4.5/ui/analytics/types.d.ts +0 -66
- package/dist/types-ts4.5/ui/analytics/utils.d.ts +0 -24
- package/dist/types-ts4.5/ui/currentPastedSmartLink.d.ts +0 -2
- package/dist/types-ts4.5/ui/datasourceErrorBoundary.d.ts +0 -24
- package/dist/types-ts4.5/ui/editDatasourceAction.d.ts +0 -4
- package/dist/types-ts4.5/ui/hooks/useLinkUpgradeDiscoverability.d.ts +0 -18
- package/dist/types-ts4.5/ui/local-storage.d.ts +0 -7
- package/dist/types-ts4.5/ui/pasteDisplayAsUtils.d.ts +0 -12
- package/dist/types-ts4.5/ui/preview/PreviewInvoker.d.ts +0 -12
- package/dist/types-ts4.5/ui/toolbar.d.ts +0 -19
- package/dist/types-ts4.5/ui/useFetchDatasourceDataInfo.d.ts +0 -10
- package/dist/types-ts4.5/ui/useFetchDatasourceInfo.d.ts +0 -15
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { CardContext } from '@atlaskit/link-provider';
|
|
3
|
-
import type { cardPlugin } from '../../cardPlugin';
|
|
4
|
-
export type LinkUpgradeDiscoverabilityProps = {
|
|
5
|
-
cardContext?: CardContext;
|
|
6
|
-
isOverlayEnabled?: boolean;
|
|
7
|
-
isPulseEnabled?: boolean;
|
|
8
|
-
linkPosition: number;
|
|
9
|
-
pluginInjectionApi?: ExtractInjectionAPI<typeof cardPlugin>;
|
|
10
|
-
url: string;
|
|
11
|
-
};
|
|
12
|
-
declare const useLinkUpgradeDiscoverability: ({ url, linkPosition, cardContext, pluginInjectionApi, isPulseEnabled, isOverlayEnabled, }: LinkUpgradeDiscoverabilityProps) => {
|
|
13
|
-
shouldShowToolbarPulse: boolean | undefined;
|
|
14
|
-
shouldShowLinkPulse: boolean | undefined;
|
|
15
|
-
shouldShowLinkOverlay: boolean | undefined;
|
|
16
|
-
isLinkMostRecentlyInserted: boolean;
|
|
17
|
-
};
|
|
18
|
-
export default useLinkUpgradeDiscoverability;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const LOCAL_STORAGE_CLIENT_KEY = "@atlaskit/editor-plugin-card";
|
|
2
|
-
export declare const LOCAL_STORAGE_DISCOVERED_KEY = "discovered";
|
|
3
|
-
export declare const LOCAL_STORAGE_DISCOVERY_KEY_SMART_LINK = "smart-link-upgrade-pulse";
|
|
4
|
-
export declare const LOCAL_STORAGE_DISCOVERY_KEY_TOOLBAR = "toolbar-upgrade-pulse";
|
|
5
|
-
export declare const ONE_DAY_IN_MILLISECONDS = 86400000;
|
|
6
|
-
export declare const isLocalStorageKeyDiscovered: (key: string) => boolean;
|
|
7
|
-
export declare const markLocalStorageKeyDiscovered: (key: string, expiration?: number) => void;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
export declare const DISPLAY_AS_OPTIONS: readonly [
|
|
3
|
-
"url",
|
|
4
|
-
"inline",
|
|
5
|
-
"block",
|
|
6
|
-
"embed"
|
|
7
|
-
];
|
|
8
|
-
export type DisplayAsOption = (typeof DISPLAY_AS_OPTIONS)[number];
|
|
9
|
-
export declare const getCardAtPasteRange: (state: EditorState, pasteStartPos: number, pasteEndPos: number) => {
|
|
10
|
-
appearance: Exclude<DisplayAsOption, "url">;
|
|
11
|
-
pos: number;
|
|
12
|
-
} | undefined;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
type PreviewInvokerProps = {
|
|
4
|
-
appearance: 'inline' | 'block' | 'embed';
|
|
5
|
-
children: (api: {
|
|
6
|
-
canPreview: boolean;
|
|
7
|
-
invokePreview?: () => void;
|
|
8
|
-
}) => ReactNode;
|
|
9
|
-
url: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const PreviewInvoker: ({ url, appearance, children, }: PreviewInvokerProps) => React.JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl';
|
|
2
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
5
|
-
import type { Command, ExtractInjectionAPI, FloatingToolbarHandler, FloatingToolbarItem, LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
-
import type { cardPlugin } from '../index';
|
|
8
|
-
import type { CardPluginOptions, ToolbarResolvedAttributes } from '../types';
|
|
9
|
-
export declare const removeCard: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
10
|
-
export declare const visitCardLinkAnalytics: (editorAnalyticsApi: EditorAnalyticsAPI | undefined, inputMethod: INPUT_METHOD.FLOATING_TB | INPUT_METHOD.TOOLBAR | INPUT_METHOD.BUTTON | INPUT_METHOD.DOUBLE_CLICK | INPUT_METHOD.META_CLICK, resolvedAttributes?: Partial<ToolbarResolvedAttributes>) => Command;
|
|
11
|
-
export declare const openLinkSettings: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
12
|
-
export declare const floatingToolbar: (cardOptions: CardOptions, lpLinkPicker: boolean, linkPickerOptions?: LinkPickerOptions, pluginInjectionApi?: ExtractInjectionAPI<typeof cardPlugin>, disableFloatingToolbar?: boolean) => FloatingToolbarHandler;
|
|
13
|
-
export declare const getSettingsButton: (intl: IntlShape, editorAnalyticsApi: EditorAnalyticsAPI | undefined, userPreferencesLink?: string) => FloatingToolbarItem<Command>;
|
|
14
|
-
export declare const shouldRenderToolbarPulse: (embedEnabled: boolean, appearance: string, status: string, isDiscoverabilityEnabled: boolean) => boolean;
|
|
15
|
-
export declare const getStartingToolbarItems: (options: CardPluginOptions, api?: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (intl: IntlShape, link: string, onEditLink: Command, metadata: {
|
|
16
|
-
title: string;
|
|
17
|
-
url: string;
|
|
18
|
-
}, _state?: EditorState) => FloatingToolbarItem<Command>[];
|
|
19
|
-
export declare const getEndingToolbarItems: (options: CardPluginOptions, api?: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (intl: IntlShape, _link: string) => FloatingToolbarItem<Command>[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { JiraIssueDatasourceParameters } from '@atlaskit/link-datasource';
|
|
2
|
-
import type { DatasourceParameters } from '@atlaskit/linking-types';
|
|
3
|
-
export interface useFetchDatasourceDataInfoProps {
|
|
4
|
-
datasourceId: string;
|
|
5
|
-
parameters?: DatasourceParameters | JiraIssueDatasourceParameters;
|
|
6
|
-
visibleColumnKeys?: string[];
|
|
7
|
-
}
|
|
8
|
-
export declare const useFetchDatasourceDataInfo: ({ datasourceId, parameters, visibleColumnKeys, }: useFetchDatasourceDataInfoProps) => {
|
|
9
|
-
extensionKey: string | undefined;
|
|
10
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { JiraIssueDatasourceParameters } from '@atlaskit/link-datasource';
|
|
2
|
-
import type { CardContext } from '@atlaskit/link-provider';
|
|
3
|
-
import type { DatasourceParameters } from '@atlaskit/linking-types';
|
|
4
|
-
export interface useFetchDatasourceInfoProps {
|
|
5
|
-
cardContext?: CardContext;
|
|
6
|
-
isRegularCardNode: boolean;
|
|
7
|
-
nodeParameters?: DatasourceParameters | JiraIssueDatasourceParameters;
|
|
8
|
-
url?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const useFetchDatasourceInfo: ({ isRegularCardNode, url, cardContext, nodeParameters, }: useFetchDatasourceInfoProps) => {
|
|
11
|
-
datasourceId: string | undefined;
|
|
12
|
-
parameters: DatasourceParameters | undefined;
|
|
13
|
-
ready: boolean;
|
|
14
|
-
extensionKey: string | undefined;
|
|
15
|
-
};
|