@atlaskit/editor-plugin-card 0.2.5 → 0.3.1
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 +12 -0
- package/dist/cjs/pm-plugins/analytics/events-from-tr.js +3 -3
- package/dist/cjs/pm-plugins/doc.js +9 -9
- package/dist/cjs/pm-plugins/keymap.js +7 -7
- package/dist/cjs/pm-plugins/main.js +9 -9
- package/dist/cjs/pm-plugins/mountHyperlink.js +22 -2
- package/dist/cjs/pm-plugins/plugin-key.js +2 -2
- package/dist/cjs/toolbar.js +39 -17
- package/dist/cjs/ui/CardContextProvider.js +45 -0
- package/dist/cjs/ui/DatasourceModal/index.js +2 -2
- package/dist/cjs/ui/EditLinkToolbar.js +2 -2
- package/dist/cjs/ui/EditorAnalyticsContext.js +32 -0
- package/dist/cjs/ui/EditorSmartCardEventsNext.js +3 -14
- package/dist/cjs/ui/LayoutButton/utils.js +2 -2
- package/dist/cjs/ui/LinkToolbarAppearance.js +3 -3
- package/dist/cjs/ui/ResizableEmbedCard.js +4 -4
- package/dist/cjs/ui/ToolbarViewedEvent.js +73 -0
- package/dist/cjs/utils.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/pm-plugins/analytics/events-from-tr.js +1 -1
- package/dist/es2019/pm-plugins/doc.js +2 -2
- package/dist/es2019/pm-plugins/keymap.js +3 -3
- package/dist/es2019/pm-plugins/main.js +2 -2
- package/dist/es2019/pm-plugins/mountHyperlink.js +18 -1
- package/dist/es2019/pm-plugins/plugin-key.js +1 -1
- package/dist/es2019/toolbar.js +23 -3
- package/dist/es2019/ui/CardContextProvider.js +19 -0
- package/dist/es2019/ui/DatasourceModal/index.js +1 -1
- package/dist/es2019/ui/EditLinkToolbar.js +1 -1
- package/dist/es2019/ui/EditorAnalyticsContext.js +25 -0
- package/dist/es2019/ui/EditorSmartCardEventsNext.js +4 -15
- package/dist/es2019/ui/LayoutButton/utils.js +1 -1
- package/dist/es2019/ui/LinkToolbarAppearance.js +1 -1
- package/dist/es2019/ui/ResizableEmbedCard.js +1 -1
- package/dist/es2019/ui/ToolbarViewedEvent.js +62 -0
- package/dist/es2019/utils.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/pm-plugins/analytics/events-from-tr.js +1 -1
- package/dist/esm/pm-plugins/doc.js +2 -2
- package/dist/esm/pm-plugins/keymap.js +3 -3
- package/dist/esm/pm-plugins/main.js +2 -2
- package/dist/esm/pm-plugins/mountHyperlink.js +22 -2
- package/dist/esm/pm-plugins/plugin-key.js +1 -1
- package/dist/esm/toolbar.js +26 -4
- package/dist/esm/ui/CardContextProvider.js +36 -0
- package/dist/esm/ui/DatasourceModal/index.js +1 -1
- package/dist/esm/ui/EditLinkToolbar.js +1 -1
- package/dist/esm/ui/EditorAnalyticsContext.js +24 -0
- package/dist/esm/ui/EditorSmartCardEventsNext.js +4 -15
- package/dist/esm/ui/LayoutButton/utils.js +1 -1
- package/dist/esm/ui/LinkToolbarAppearance.js +1 -1
- package/dist/esm/ui/ResizableEmbedCard.js +1 -1
- package/dist/esm/ui/ToolbarViewedEvent.js +62 -0
- package/dist/esm/utils.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/nodeviews/datasource.d.ts +2 -2
- package/dist/types/nodeviews/embedCard.d.ts +1 -1
- package/dist/types/nodeviews/genericCard.d.ts +2 -2
- package/dist/types/pm-plugins/actions.d.ts +1 -1
- package/dist/types/pm-plugins/analytics/events-from-tr.d.ts +1 -1
- package/dist/types/pm-plugins/analytics/types.d.ts +1 -1
- package/dist/types/pm-plugins/analytics/utils.d.ts +2 -2
- package/dist/types/pm-plugins/doc.d.ts +3 -3
- package/dist/types/pm-plugins/plugin-key.d.ts +1 -1
- package/dist/types/pm-plugins/shouldReplaceLink.d.ts +1 -1
- package/dist/types/pm-plugins/util/resolve.d.ts +1 -1
- package/dist/types/pm-plugins/util/state.d.ts +1 -1
- package/dist/types/ui/CardContextProvider.d.ts +19 -0
- package/dist/types/ui/DatasourceModal/ModalWithState.d.ts +1 -1
- package/dist/types/ui/DatasourceModal/index.d.ts +1 -1
- package/dist/types/ui/EditLinkToolbar.d.ts +2 -2
- package/dist/types/ui/EditorAnalyticsContext.d.ts +10 -0
- package/dist/types/ui/EditorSmartCardEvents.d.ts +1 -1
- package/dist/types/ui/EditorSmartCardEventsNext.d.ts +1 -1
- package/dist/types/ui/HyperlinkToolbarAppearance.d.ts +2 -2
- package/dist/types/ui/LayoutButton/types.d.ts +1 -1
- package/dist/types/ui/LayoutButton/utils.d.ts +1 -1
- package/dist/types/ui/LinkToolbarAppearance.d.ts +2 -2
- package/dist/types/ui/ToolbarViewedEvent.d.ts +11 -0
- package/dist/types/utils.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/datasource.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/embedCard.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/genericCard.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/actions.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/analytics/events-from-tr.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/analytics/types.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/analytics/utils.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/doc.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/shouldReplaceLink.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/util/resolve.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/util/state.d.ts +1 -1
- package/dist/types-ts4.5/ui/CardContextProvider.d.ts +19 -0
- package/dist/types-ts4.5/ui/DatasourceModal/ModalWithState.d.ts +1 -1
- package/dist/types-ts4.5/ui/DatasourceModal/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditLinkToolbar.d.ts +2 -2
- package/dist/types-ts4.5/ui/EditorAnalyticsContext.d.ts +10 -0
- package/dist/types-ts4.5/ui/EditorSmartCardEvents.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditorSmartCardEventsNext.d.ts +1 -1
- package/dist/types-ts4.5/ui/HyperlinkToolbarAppearance.d.ts +2 -2
- package/dist/types-ts4.5/ui/LayoutButton/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/LayoutButton/utils.d.ts +1 -1
- package/dist/types-ts4.5/ui/LinkToolbarAppearance.d.ts +2 -2
- package/dist/types-ts4.5/ui/ToolbarViewedEvent.d.ts +11 -0
- package/dist/types-ts4.5/utils.d.ts +2 -2
- package/package.json +10 -12
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { EditorState } from 'prosemirror-state';
|
|
4
|
-
import { EditorView } from 'prosemirror-view';
|
|
5
3
|
import { IntlShape } from 'react-intl-next';
|
|
6
4
|
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
5
|
import { CardPluginActions } from '@atlaskit/editor-common/card';
|
|
8
6
|
import { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
7
|
+
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import { CardContext } from '@atlaskit/link-provider';
|
|
10
10
|
import { CardPlatform } from '@atlaskit/smart-card';
|
|
11
11
|
export interface LinkToolbarAppearanceProps {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { EditorAnalyticsContextProps } from './EditorAnalyticsContext';
|
|
3
|
+
type ToolbarViewedEventProps = {
|
|
4
|
+
url?: string;
|
|
5
|
+
display: string | null;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Provides analytics context and card context
|
|
9
|
+
*/
|
|
10
|
+
export declare const ToolbarViewedEvent: ({ url, display, editorView, }: ToolbarViewedEventProps & Omit<EditorAnalyticsContextProps, 'children'>) => JSX.Element;
|
|
11
|
+
export {};
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Node, NodeType } from 'prosemirror-model';
|
|
2
|
-
import { EditorState } from 'prosemirror-state';
|
|
3
1
|
import { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
+
import { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { CardInfo } from './types';
|
|
5
5
|
export declare const appearanceForNodeType: (spec: NodeType) => CardAppearance | undefined;
|
|
6
6
|
export declare const selectedCardAppearance: (state: EditorState) => CardAppearance | undefined;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
6
|
-
import { EditorView } from 'prosemirror-view';
|
|
7
5
|
import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
8
6
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
9
7
|
import ReactNodeView, { getPosHandler, ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
10
8
|
import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
|
+
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
10
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
11
|
import type { cardPlugin } from '../index';
|
|
12
12
|
import { DatasourceTableLayout } from '../ui/LayoutButton/types';
|
|
13
13
|
interface DatasourceProps extends ReactComponentProps {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
4
3
|
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
5
4
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
5
|
+
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { SmartCardProps } from './genericCard';
|
|
7
7
|
export type EmbedCardState = {
|
|
8
8
|
hasPreview: boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
3
|
-
import { EditorView } from 'prosemirror-view';
|
|
4
2
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
5
3
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
6
4
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
7
5
|
import { getPosHandler, ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
8
6
|
import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
|
+
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
8
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import { SmartCardContext } from '@atlaskit/link-provider';
|
|
10
10
|
import { CardPlatform } from '@atlaskit/smart-card';
|
|
11
11
|
import type { cardPlugin } from '../index';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Transaction } from 'prosemirror-state';
|
|
2
1
|
import { CardProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
2
|
import type { DatasourceModalType } from '@atlaskit/editor-common/types';
|
|
3
|
+
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { SmartLinkEvents } from '@atlaskit/smart-card';
|
|
5
5
|
import { CardInfo, CardPluginAction, Request, SmartLinkEventsNext } from '../types';
|
|
6
6
|
import { DatasourceTableLayout } from '../ui/LayoutButton/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorState, ReadonlyTransaction, Transaction } from 'prosemirror
|
|
1
|
+
import { EditorState, ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import { LifecycleEvent } from '../../types';
|
|
3
3
|
import { Link } from './types';
|
|
4
4
|
export declare const findChangedLinks: (tr: Transaction | ReadonlyTransaction, state: EditorState) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Node, Schema } from 'prosemirror
|
|
2
|
-
import { ReadonlyTransaction, Transaction } from 'prosemirror
|
|
1
|
+
import { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { Link } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Whether a node is a "link" node, ie inline card, block card, embed card
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Node } from 'prosemirror-model';
|
|
2
|
-
import { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
-
import { EditorView } from 'prosemirror-view';
|
|
4
1
|
import type { CreateUIAnalyticsEvent, UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
2
|
import { ACTION, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
3
|
import type { CardReplacementInputMethod } from '@atlaskit/editor-common/card';
|
|
7
4
|
import { CardAdf, CardAppearance, DatasourceAdf } from '@atlaskit/editor-common/provider-factory';
|
|
8
5
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
6
|
+
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
+
import { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import type { InlineCardAdf } from '@atlaskit/smart-card';
|
|
10
10
|
import { Request } from '../types';
|
|
11
11
|
export declare const replaceQueuedUrlWithCard: (url: string, cardData: CardAdf | DatasourceAdf, analyticsAction?: ACTION, editorAnalyticsApi?: EditorAnalyticsAPI, createAnalyticsEvent?: CreateUIAnalyticsEvent) => Command;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Node } from 'prosemirror
|
|
1
|
+
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare function shouldReplaceLink(node: Node, compareLinkText?: boolean, compareToUrl?: string): boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { EditorView } from 'prosemirror-view';
|
|
2
1
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
2
|
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
3
|
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
5
4
|
import { CardProvider, DatasourceAdf } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import { Request } from '../../types';
|
|
7
7
|
export declare const resolveWithProvider: (view: EditorView, provider: CardProvider, request: Request, options: CardOptions, editorAnalyticsApi: EditorAnalyticsAPI | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent | undefined) => Promise<void | import("@atlaskit/linking-common").InlineCardAdf | import("@atlaskit/linking-common").BlockCardAdf | import("@atlaskit/linking-common").EmbedCardAdf | DatasourceAdf>;
|
|
8
8
|
export declare const handleProvider: (_: 'cardProvider', provider: Promise<CardProvider> | undefined, view: EditorView) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorState, ReadonlyTransaction } from 'prosemirror
|
|
1
|
+
import { EditorState, ReadonlyTransaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import { CardPluginState, Request } from '../../types';
|
|
3
3
|
export declare const getPluginState: (editorState: EditorState) => CardPluginState | undefined;
|
|
4
4
|
export declare const getPluginStateWithUpdatedPos: (pluginState: CardPluginState, tr: ReadonlyTransaction) => {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import type { CardContext } from '@atlaskit/link-provider';
|
|
4
|
+
type CardContextProviderProps = {
|
|
5
|
+
children: ({ cardContext }: {
|
|
6
|
+
cardContext?: CardContext;
|
|
7
|
+
}) => React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Provides the link provider context via the legacy context adapter
|
|
11
|
+
* and children render function
|
|
12
|
+
*/
|
|
13
|
+
export declare class CardContextProvider extends React.Component<CardContextProviderProps, {}> {
|
|
14
|
+
static contextTypes: {
|
|
15
|
+
contextAdapter: PropTypes.Requireable<object>;
|
|
16
|
+
};
|
|
17
|
+
render(): React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { EditorView } from 'prosemirror-view';
|
|
3
2
|
import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { cardPlugin } from '../../plugin';
|
|
5
5
|
declare const ModalWithState: ({ api, editorView, }: {
|
|
6
6
|
api: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { EditorView } from 'prosemirror-view';
|
|
3
2
|
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
3
|
import { DatasourceModalType } from '@atlaskit/editor-common/types';
|
|
4
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
type DatasourceModalProps = {
|
|
6
6
|
view: EditorView;
|
|
7
7
|
editorAnalyticsApi?: EditorAnalyticsAPI;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Node } from 'prosemirror-model';
|
|
3
|
-
import { EditorView } from 'prosemirror-view';
|
|
4
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
3
|
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
4
|
import { HyperlinkAddToolbarProps } from '@atlaskit/editor-common/link';
|
|
@@ -8,6 +6,8 @@ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
8
6
|
import type { Command, ExtractInjectionAPI, FloatingToolbarConfig, FloatingToolbarItem, LinkInputType, LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
9
7
|
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
10
8
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
9
|
+
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
10
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
11
|
import type { cardPlugin } from '../plugin';
|
|
12
12
|
interface InjectionAPI {
|
|
13
13
|
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
+
export type EditorAnalyticsContextProps = {
|
|
4
|
+
editorView?: EditorView;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Provides location attribute to child events
|
|
9
|
+
*/
|
|
10
|
+
export declare const EditorAnalyticsContext: ({ editorView, children, }: EditorAnalyticsContextProps) => JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
-
import { EditorState } from 'prosemirror-state';
|
|
3
|
-
import { EditorView } from 'prosemirror-view';
|
|
4
2
|
import { IntlShape } from 'react-intl-next';
|
|
5
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
4
|
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
7
5
|
import type { CardPluginActions } from '@atlaskit/editor-common/card';
|
|
8
6
|
import { CardProvider, ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
7
|
+
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import { CardPlatform } from '@atlaskit/smart-card';
|
|
10
10
|
export interface HyperlinkToolbarAppearanceProps {
|
|
11
11
|
intl: IntlShape;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EditorView } from 'prosemirror-view';
|
|
2
1
|
import { IntlShape } from 'react-intl-next';
|
|
3
2
|
import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { cardPlugin } from '../../index';
|
|
5
5
|
export type DatasourceTableLayout = 'full-width' | 'center' | 'wide';
|
|
6
6
|
export type LayoutButtonProps = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { EditorState } from 'prosemirror-state';
|
|
4
|
-
import { EditorView } from 'prosemirror-view';
|
|
5
3
|
import { IntlShape } from 'react-intl-next';
|
|
6
4
|
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
5
|
import { CardPluginActions } from '@atlaskit/editor-common/card';
|
|
8
6
|
import { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
7
|
+
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
+
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import { CardContext } from '@atlaskit/link-provider';
|
|
10
10
|
import { CardPlatform } from '@atlaskit/smart-card';
|
|
11
11
|
export interface LinkToolbarAppearanceProps {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { EditorAnalyticsContextProps } from './EditorAnalyticsContext';
|
|
3
|
+
type ToolbarViewedEventProps = {
|
|
4
|
+
url?: string;
|
|
5
|
+
display: string | null;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Provides analytics context and card context
|
|
9
|
+
*/
|
|
10
|
+
export declare const ToolbarViewedEvent: ({ url, display, editorView, }: ToolbarViewedEventProps & Omit<EditorAnalyticsContextProps, 'children'>) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Node, NodeType } from 'prosemirror-model';
|
|
2
|
-
import { EditorState } from 'prosemirror-state';
|
|
3
1
|
import { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
+
import { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { CardInfo } from './types';
|
|
5
5
|
export declare const appearanceForNodeType: (spec: NodeType) => CardAppearance | undefined;
|
|
6
6
|
export declare const selectedCardAppearance: (state: EditorState) => CardAppearance | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/adf-schema": "^26.
|
|
34
|
+
"@atlaskit/adf-schema": "^26.4.0",
|
|
35
35
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
36
|
-
"@atlaskit/editor-common": "^74.
|
|
36
|
+
"@atlaskit/editor-common": "^74.29.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^0.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-decorations": "^0.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|
|
@@ -41,24 +41,19 @@
|
|
|
41
41
|
"@atlaskit/editor-plugin-grid": "^0.1.0",
|
|
42
42
|
"@atlaskit/editor-plugin-hyperlink": "^0.2.0",
|
|
43
43
|
"@atlaskit/editor-plugin-width": "^0.1.0",
|
|
44
|
+
"@atlaskit/editor-prosemirror": "1.0.2",
|
|
44
45
|
"@atlaskit/editor-shared-styles": "^2.5.0",
|
|
45
46
|
"@atlaskit/icon": "^21.12.0",
|
|
46
47
|
"@atlaskit/link-analytics": "^8.2.0",
|
|
47
48
|
"@atlaskit/link-datasource": "^0.30.0",
|
|
48
|
-
"@atlaskit/
|
|
49
|
+
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
50
|
+
"@atlaskit/smart-card": "^26.13.0",
|
|
49
51
|
"@atlaskit/theme": "^12.5.0",
|
|
50
52
|
"@atlaskit/tokens": "^1.13.0",
|
|
51
53
|
"@babel/runtime": "^7.0.0",
|
|
52
54
|
"@emotion/react": "^11.7.1",
|
|
53
55
|
"lodash": "^4.17.21",
|
|
54
56
|
"prop-types": "^15.5.10",
|
|
55
|
-
"prosemirror-history": "^1.1.3",
|
|
56
|
-
"prosemirror-keymap": "1.1.4",
|
|
57
|
-
"prosemirror-model": "1.16.0",
|
|
58
|
-
"prosemirror-state": "1.3.4",
|
|
59
|
-
"prosemirror-transform": "1.3.2",
|
|
60
|
-
"prosemirror-utils": "^1.0.0-0",
|
|
61
|
-
"prosemirror-view": "1.23.7",
|
|
62
57
|
"raf-schd": "^4.0.3"
|
|
63
58
|
},
|
|
64
59
|
"peerDependencies": {
|
|
@@ -69,7 +64,7 @@
|
|
|
69
64
|
"devDependencies": {
|
|
70
65
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
71
66
|
"@atlaskit/editor-test-helpers": "^18.9.0",
|
|
72
|
-
"@atlaskit/link-test-helpers": "^
|
|
67
|
+
"@atlaskit/link-test-helpers": "^6.0.0",
|
|
73
68
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
74
69
|
"@atlaskit/ssr": "*",
|
|
75
70
|
"@atlaskit/util-data-test": "^17.8.0",
|
|
@@ -121,6 +116,9 @@
|
|
|
121
116
|
"platform-feature-flags": {
|
|
122
117
|
"platform.linking-platform.datasource-jira_issues": {
|
|
123
118
|
"type": "boolean"
|
|
119
|
+
},
|
|
120
|
+
"platform.linking-platform.editor.toolbar-viewed-event": {
|
|
121
|
+
"type": "boolean"
|
|
124
122
|
}
|
|
125
123
|
}
|
|
126
124
|
}
|