@atlaskit/editor-plugin-card 4.5.18 → 4.6.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/nodeviews/inlineCard.js +2 -1
  3. package/dist/es2019/nodeviews/inlineCard.js +2 -1
  4. package/dist/esm/nodeviews/inlineCard.js +2 -1
  5. package/dist/types/nodeviews/blockCard.d.ts +3 -3
  6. package/dist/types/nodeviews/embedCard.d.ts +2 -2
  7. package/dist/types/nodeviews/inlineCard.d.ts +2 -2
  8. package/dist/types/nodeviews/inlineCardWithAwareness.d.ts +1 -1
  9. package/dist/types/ui/DatasourceIcon/index.d.ts +2 -2
  10. package/dist/types/ui/DatasourceModal/ModalWithState.d.ts +1 -1
  11. package/dist/types/ui/DatasourceModal/index.d.ts +2 -2
  12. package/dist/types/ui/EditLinkToolbar.d.ts +2 -2
  13. package/dist/types/ui/EditorAnalyticsContext.d.ts +1 -1
  14. package/dist/types/ui/EditorLinkingPlatformAnalytics/index.d.ts +1 -1
  15. package/dist/types/ui/HyperlinkToolbarAppearance.d.ts +2 -2
  16. package/dist/types/ui/LinkToolbarAppearance.d.ts +2 -2
  17. package/dist/types/ui/Pulse/index.d.ts +2 -2
  18. package/dist/types/ui/ToolbarViewedEvent.d.ts +2 -2
  19. package/dist/types/ui/WithCardContext.d.ts +1 -1
  20. package/dist/types/ui/datasourceErrorBoundary.d.ts +1 -1
  21. package/dist/types-ts4.5/nodeviews/blockCard.d.ts +3 -3
  22. package/dist/types-ts4.5/nodeviews/embedCard.d.ts +2 -2
  23. package/dist/types-ts4.5/nodeviews/inlineCard.d.ts +2 -2
  24. package/dist/types-ts4.5/nodeviews/inlineCardWithAwareness.d.ts +1 -1
  25. package/dist/types-ts4.5/ui/DatasourceIcon/index.d.ts +2 -2
  26. package/dist/types-ts4.5/ui/DatasourceModal/ModalWithState.d.ts +1 -1
  27. package/dist/types-ts4.5/ui/DatasourceModal/index.d.ts +2 -2
  28. package/dist/types-ts4.5/ui/EditLinkToolbar.d.ts +2 -2
  29. package/dist/types-ts4.5/ui/EditorAnalyticsContext.d.ts +1 -1
  30. package/dist/types-ts4.5/ui/EditorLinkingPlatformAnalytics/index.d.ts +1 -1
  31. package/dist/types-ts4.5/ui/HyperlinkToolbarAppearance.d.ts +2 -2
  32. package/dist/types-ts4.5/ui/LinkToolbarAppearance.d.ts +2 -2
  33. package/dist/types-ts4.5/ui/Pulse/index.d.ts +2 -2
  34. package/dist/types-ts4.5/ui/ToolbarViewedEvent.d.ts +2 -2
  35. package/dist/types-ts4.5/ui/WithCardContext.d.ts +1 -1
  36. package/dist/types-ts4.5/ui/datasourceErrorBoundary.d.ts +1 -1
  37. package/package.json +21 -21
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 4.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#105322](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105322)
8
+ [`8876083532adc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8876083532adc) -
9
+ Bumped editor-prosemirror version to 7.0.0
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 4.5.19
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 4.5.18
4
22
 
5
23
  ### Patch Changes
@@ -19,6 +19,7 @@ var _ui = require("@atlaskit/editor-common/ui");
19
19
  var _state = require("@atlaskit/editor-prosemirror/state");
20
20
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
21
  var _smartCard = require("@atlaskit/smart-card");
22
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
22
23
  var _actions = require("../pm-plugins/actions");
23
24
  var _utils = require("../pm-plugins/utils");
24
25
  var _ConfigureOverlay = _interopRequireDefault(require("../ui/ConfigureOverlay"));
@@ -181,7 +182,7 @@ function InlineCardNodeView(props) {
181
182
  onClickCallback: onClickCallback
182
183
  // Ignored via go/ees005
183
184
  // eslint-disable-next-line react/jsx-props-no-spreading
184
- }, enableInlineUpgradeFeatures && (0, _utils.getAwarenessProps)(view.state, getPos, allowEmbeds, allowBlockCards, (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view')));
185
+ }, enableInlineUpgradeFeatures && (0, _utils.getAwarenessProps)(view.state, getPos, allowEmbeds, allowBlockCards, !(0, _experiments.editorExperiment)('live_pages_graceful_edit', 'control') ? true : (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view')));
185
186
  }
186
187
  var inlineCardNodeView = exports.inlineCardNodeView = function inlineCardNodeView(_ref2) {
187
188
  var inlineCardViewProducer = _ref2.inlineCardViewProducer;
@@ -8,6 +8,7 @@ import { findOverflowScrollParent, UnsupportedInline } from '@atlaskit/editor-co
8
8
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
9
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
10
  import { Card as SmartCard } from '@atlaskit/smart-card';
11
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
11
12
  import { registerCard, removeCard } from '../pm-plugins/actions';
12
13
  import { getAwarenessProps } from '../pm-plugins/utils';
13
14
  import OverlayWrapper from '../ui/ConfigureOverlay';
@@ -172,7 +173,7 @@ export function InlineCardNodeView(props) {
172
173
  onClickCallback: onClickCallback
173
174
  // Ignored via go/ees005
174
175
  // eslint-disable-next-line react/jsx-props-no-spreading
175
- }, enableInlineUpgradeFeatures && getAwarenessProps(view.state, getPos, allowEmbeds, allowBlockCards, (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view')));
176
+ }, enableInlineUpgradeFeatures && getAwarenessProps(view.state, getPos, allowEmbeds, allowBlockCards, !editorExperiment('live_pages_graceful_edit', 'control') ? true : (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view')));
176
177
  }
177
178
  export const inlineCardNodeView = ({
178
179
  inlineCardViewProducer
@@ -9,6 +9,7 @@ import { findOverflowScrollParent, UnsupportedInline } from '@atlaskit/editor-co
9
9
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
10
10
  import { fg } from '@atlaskit/platform-feature-flags';
11
11
  import { Card as SmartCard } from '@atlaskit/smart-card';
12
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
12
13
  import { registerCard, removeCard } from '../pm-plugins/actions';
13
14
  import { getAwarenessProps } from '../pm-plugins/utils';
14
15
  import OverlayWrapper from '../ui/ConfigureOverlay';
@@ -169,7 +170,7 @@ export function InlineCardNodeView(props) {
169
170
  onClickCallback: onClickCallback
170
171
  // Ignored via go/ees005
171
172
  // eslint-disable-next-line react/jsx-props-no-spreading
172
- }, enableInlineUpgradeFeatures && getAwarenessProps(view.state, getPos, allowEmbeds, allowBlockCards, (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view')));
173
+ }, enableInlineUpgradeFeatures && getAwarenessProps(view.state, getPos, allowEmbeds, allowBlockCards, !editorExperiment('live_pages_graceful_edit', 'control') ? true : (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view')));
173
174
  }
174
175
  export var inlineCardNodeView = function inlineCardNodeView(_ref2) {
175
176
  var inlineCardViewProducer = _ref2.inlineCardViewProducer;
@@ -16,11 +16,11 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
16
16
  url?: string | undefined;
17
17
  title?: string | undefined;
18
18
  }) => void;
19
- gapCursorSpan: () => JSX.Element | undefined;
19
+ gapCursorSpan: () => React.JSX.Element | undefined;
20
20
  onError: ({ err }: {
21
21
  err?: Error | undefined;
22
22
  }) => void;
23
- render(): JSX.Element;
23
+ render(): React.JSX.Element;
24
24
  }
25
25
  export type BlockCardNodeViewProps = Pick<SmartCardProps, 'actionOptions' | 'pluginInjectionApi' | 'onClickCallback'>;
26
26
  export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
@@ -30,7 +30,7 @@ export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
30
30
  private updateContentEditable;
31
31
  validUpdate(currentNode: Node, newNode: Node): boolean;
32
32
  update(node: Node, decorations: ReadonlyArray<Decoration>, _innerDecorations?: DecorationSource): boolean;
33
- render(): JSX.Element;
33
+ render(): React.JSX.Element;
34
34
  destroy(): void;
35
35
  private removeCard;
36
36
  }
@@ -38,7 +38,7 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
38
38
  onError: ({ err }: {
39
39
  err?: Error | undefined;
40
40
  }) => void;
41
- render(): JSX.Element;
41
+ render(): React.JSX.Element;
42
42
  }
43
43
  export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback'>;
44
44
  export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
@@ -47,7 +47,7 @@ export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
47
47
  viewShouldUpdate(nextNode: PMNode): boolean;
48
48
  createDomRef(): HTMLElement;
49
49
  private updateContentEditable;
50
- render(): JSX.Element;
50
+ render(): React.JSX.Element;
51
51
  destroy(): void;
52
52
  private removeCard;
53
53
  }
@@ -4,9 +4,9 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { SmartCardProps } from './genericCard';
6
6
  import { type InlineCardWithAwarenessProps } from './inlineCardWithAwareness';
7
- export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, }: SmartCardProps) => JSX.Element | null>;
7
+ export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, }: SmartCardProps) => React.JSX.Element | null>;
8
8
  export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | '__livePage'>;
9
- export declare function InlineCardNodeView(props: InlineNodeViewComponentProps & InlineCardNodeViewProps & InlineCardWithAwarenessProps): JSX.Element;
9
+ export declare function InlineCardNodeView(props: InlineNodeViewComponentProps & InlineCardNodeViewProps & InlineCardWithAwarenessProps): React.JSX.Element;
10
10
  export interface InlineCardNodeViewProperties {
11
11
  inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
12
12
  }
@@ -5,4 +5,4 @@ export type InlineCardWithAwarenessProps = {
5
5
  isOverlayEnabled?: boolean;
6
6
  isSelected?: boolean;
7
7
  };
8
- export declare const InlineCardWithAwareness: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, pluginInjectionApi, onClick, isPulseEnabled, isOverlayEnabled, isSelected, }: SmartCardProps & InlineCardWithAwarenessProps) => JSX.Element>;
8
+ export declare const InlineCardWithAwareness: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, pluginInjectionApi, onClick, isPulseEnabled, isOverlayEnabled, isSelected, }: SmartCardProps & InlineCardWithAwarenessProps) => React.JSX.Element>;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const DatasourceIcon: (props: GlyphProps) => JSX.Element;
3
+ export declare const DatasourceIcon: (props: GlyphProps) => React.JSX.Element;
@@ -9,7 +9,7 @@ type ModalWithStateProps = {
9
9
  api: ExtractInjectionAPI<typeof cardPlugin> | undefined;
10
10
  editorView: EditorView;
11
11
  };
12
- declare const SafeModalWithState: React.MemoExoticComponent<({ api, editorView }: ModalWithStateProps) => JSX.Element>;
12
+ declare const SafeModalWithState: React.MemoExoticComponent<({ api, editorView }: ModalWithStateProps) => React.JSX.Element>;
13
13
  export type ModalTypeToComponentMap = {
14
14
  componentType: React.ComponentType<ConfigModalProps<InlineCardAdf | DatasourceAdf, DatasourceParameters>>;
15
15
  datasourceId: string;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { CardContext } from '@atlaskit/link-provider';
@@ -8,5 +8,5 @@ type DatasourceModalProps = {
8
8
  editorAnalyticsApi?: EditorAnalyticsAPI;
9
9
  cardContext?: CardContext;
10
10
  } & ModalTypeToComponentMap;
11
- export declare const DatasourceModal: ({ view, cardContext, datasourceId: defaultDatasourceId, componentType: Component, }: DatasourceModalProps) => JSX.Element | null;
11
+ export declare const DatasourceModal: ({ view, cardContext, datasourceId: defaultDatasourceId, componentType: Component, }: DatasourceModalProps) => React.JSX.Element | null;
12
12
  export {};
@@ -19,12 +19,12 @@ export type EditLinkToolbarProps = {
19
19
  forceFocusSelector: ForceFocusSelector | undefined;
20
20
  lpLinkPicker: boolean;
21
21
  };
22
- export declare function HyperlinkAddToolbarWithState({ linkPickerOptions, onSubmit, displayText, displayUrl, providerFactory, view, onCancel, invokeMethod, lpLinkPicker, onClose, onEscapeCallback, onClickAwayCallback, }: HyperlinkAddToolbarProps): JSX.Element;
22
+ export declare function HyperlinkAddToolbarWithState({ linkPickerOptions, onSubmit, displayText, displayUrl, providerFactory, view, onCancel, invokeMethod, lpLinkPicker, onClose, onEscapeCallback, onClickAwayCallback, }: HyperlinkAddToolbarProps): React.JSX.Element;
23
23
  export declare class EditLinkToolbar extends React.Component<EditLinkToolbarProps> {
24
24
  componentDidUpdate(prevProps: EditLinkToolbarProps): void;
25
25
  componentWillUnmount(): void;
26
26
  private hideLinkToolbar;
27
- render(): JSX.Element;
27
+ render(): React.JSX.Element;
28
28
  }
29
29
  export declare const getEditLinkCallback: (editorAnalyticsApi: EditorAnalyticsAPI | undefined, scrollIntoView: boolean) => Command;
30
30
  export declare const buildEditLinkToolbar: ({ providerFactory, node, pluginInjectionApi, linkPicker, lpLinkPicker, }: {
@@ -7,4 +7,4 @@ export type EditorAnalyticsContextProps = {
7
7
  /**
8
8
  * Provides location attribute to child events
9
9
  */
10
- export declare const EditorAnalyticsContext: ({ editorView, children }: EditorAnalyticsContextProps) => JSX.Element;
10
+ export declare const EditorAnalyticsContext: ({ editorView, children }: EditorAnalyticsContextProps) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import type { AnalyticsBindingsProps } from './common';
3
3
  export declare class EditorLinkingPlatformAnalytics extends React.PureComponent<AnalyticsBindingsProps> {
4
- render(): JSX.Element;
4
+ render(): React.JSX.Element;
5
5
  }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { IntlShape } from 'react-intl-next';
3
3
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
4
  import type { CardOptions } from '@atlaskit/editor-common/card';
@@ -15,4 +15,4 @@ export interface HyperlinkToolbarAppearanceProps {
15
15
  editorAnalyticsApi: EditorAnalyticsAPI | undefined;
16
16
  editorPluginApi: ExtractInjectionAPI<CardPlugin> | undefined;
17
17
  }
18
- export declare function HyperlinkToolbarAppearance(props: HyperlinkToolbarAppearanceProps): JSX.Element | null;
18
+ export declare function HyperlinkToolbarAppearance(props: HyperlinkToolbarAppearanceProps): React.JSX.Element | null;
@@ -18,6 +18,6 @@ export interface LinkToolbarAppearanceProps {
18
18
  isDatasourceView?: boolean;
19
19
  }
20
20
  export declare class LinkToolbarAppearance extends React.Component<LinkToolbarAppearanceProps, Object> {
21
- renderDropdown: (view?: EditorView, cardContext?: CardContext) => JSX.Element | null;
22
- render(): JSX.Element;
21
+ renderDropdown: (view?: EditorView, cardContext?: CardContext) => React.JSX.Element | null;
22
+ render(): React.JSX.Element;
23
23
  }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export type PulseDiscoveryMode = 'start' | 'iteration';
3
3
  export interface PulseProps {
4
4
  /**
@@ -21,4 +21,4 @@ export interface PulseProps {
21
21
  shouldShowPulse?: boolean;
22
22
  testId?: string;
23
23
  }
24
- export declare const DiscoveryPulse: ({ children, localStorageKey, localStorageKeyExpirationInMs, discoveryMode, shouldShowPulse, testId, }: PulseProps) => JSX.Element;
24
+ export declare const DiscoveryPulse: ({ children, localStorageKey, localStorageKeyExpirationInMs, discoveryMode, shouldShowPulse, testId, }: PulseProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { EditorAnalyticsContextProps } from './EditorAnalyticsContext';
3
3
  type ToolbarViewedEventProps = {
4
4
  url?: string;
@@ -7,5 +7,5 @@ type ToolbarViewedEventProps = {
7
7
  /**
8
8
  * Provides analytics context and card context
9
9
  */
10
- export declare const ToolbarViewedEvent: ({ url, display, editorView, }: ToolbarViewedEventProps & Omit<EditorAnalyticsContextProps, 'children'>) => JSX.Element;
10
+ export declare const ToolbarViewedEvent: ({ url, display, editorView, }: ToolbarViewedEventProps & Omit<EditorAnalyticsContextProps, 'children'>) => React.JSX.Element;
11
11
  export {};
@@ -2,4 +2,4 @@ import React from 'react';
2
2
  import { useSmartCardContext } from '@atlaskit/link-provider';
3
3
  export declare const WithCardContext: ({ children, }: {
4
4
  children: (cardContext: ReturnType<typeof useSmartCardContext>) => React.ReactNode;
5
- }) => JSX.Element;
5
+ }) => React.JSX.Element;
@@ -20,5 +20,5 @@ export declare class DatasourceErrorBoundary extends React.Component<DatasourceE
20
20
  error: Error | APIError;
21
21
  };
22
22
  componentDidCatch(error: Error | APIError): void;
23
- render(): string | number | boolean | JSX.Element | React.ReactFragment | null | undefined;
23
+ render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
24
24
  }
@@ -16,11 +16,11 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
16
16
  url?: string | undefined;
17
17
  title?: string | undefined;
18
18
  }) => void;
19
- gapCursorSpan: () => JSX.Element | undefined;
19
+ gapCursorSpan: () => React.JSX.Element | undefined;
20
20
  onError: ({ err }: {
21
21
  err?: Error | undefined;
22
22
  }) => void;
23
- render(): JSX.Element;
23
+ render(): React.JSX.Element;
24
24
  }
25
25
  export type BlockCardNodeViewProps = Pick<SmartCardProps, 'actionOptions' | 'pluginInjectionApi' | 'onClickCallback'>;
26
26
  export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
@@ -30,7 +30,7 @@ export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
30
30
  private updateContentEditable;
31
31
  validUpdate(currentNode: Node, newNode: Node): boolean;
32
32
  update(node: Node, decorations: ReadonlyArray<Decoration>, _innerDecorations?: DecorationSource): boolean;
33
- render(): JSX.Element;
33
+ render(): React.JSX.Element;
34
34
  destroy(): void;
35
35
  private removeCard;
36
36
  }
@@ -38,7 +38,7 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
38
38
  onError: ({ err }: {
39
39
  err?: Error | undefined;
40
40
  }) => void;
41
- render(): JSX.Element;
41
+ render(): React.JSX.Element;
42
42
  }
43
43
  export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'onClickCallback'>;
44
44
  export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
@@ -47,7 +47,7 @@ export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
47
47
  viewShouldUpdate(nextNode: PMNode): boolean;
48
48
  createDomRef(): HTMLElement;
49
49
  private updateContentEditable;
50
- render(): JSX.Element;
50
+ render(): React.JSX.Element;
51
51
  destroy(): void;
52
52
  private removeCard;
53
53
  }
@@ -4,9 +4,9 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { SmartCardProps } from './genericCard';
6
6
  import { type InlineCardWithAwarenessProps } from './inlineCardWithAwareness';
7
- export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, }: SmartCardProps) => JSX.Element | null>;
7
+ export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, }: SmartCardProps) => React.JSX.Element | null>;
8
8
  export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | '__livePage'>;
9
- export declare function InlineCardNodeView(props: InlineNodeViewComponentProps & InlineCardNodeViewProps & InlineCardWithAwarenessProps): JSX.Element;
9
+ export declare function InlineCardNodeView(props: InlineNodeViewComponentProps & InlineCardNodeViewProps & InlineCardWithAwarenessProps): React.JSX.Element;
10
10
  export interface InlineCardNodeViewProperties {
11
11
  inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
12
12
  }
@@ -5,4 +5,4 @@ export type InlineCardWithAwarenessProps = {
5
5
  isOverlayEnabled?: boolean;
6
6
  isSelected?: boolean;
7
7
  };
8
- export declare const InlineCardWithAwareness: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, pluginInjectionApi, onClick, isPulseEnabled, isOverlayEnabled, isSelected, }: SmartCardProps & InlineCardWithAwarenessProps) => JSX.Element>;
8
+ export declare const InlineCardWithAwareness: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, pluginInjectionApi, onClick, isPulseEnabled, isOverlayEnabled, isSelected, }: SmartCardProps & InlineCardWithAwarenessProps) => React.JSX.Element>;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const DatasourceIcon: (props: GlyphProps) => JSX.Element;
3
+ export declare const DatasourceIcon: (props: GlyphProps) => React.JSX.Element;
@@ -9,7 +9,7 @@ type ModalWithStateProps = {
9
9
  api: ExtractInjectionAPI<typeof cardPlugin> | undefined;
10
10
  editorView: EditorView;
11
11
  };
12
- declare const SafeModalWithState: React.MemoExoticComponent<({ api, editorView }: ModalWithStateProps) => JSX.Element>;
12
+ declare const SafeModalWithState: React.MemoExoticComponent<({ api, editorView }: ModalWithStateProps) => React.JSX.Element>;
13
13
  export type ModalTypeToComponentMap = {
14
14
  componentType: React.ComponentType<ConfigModalProps<InlineCardAdf | DatasourceAdf, DatasourceParameters>>;
15
15
  datasourceId: string;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { CardContext } from '@atlaskit/link-provider';
@@ -8,5 +8,5 @@ type DatasourceModalProps = {
8
8
  editorAnalyticsApi?: EditorAnalyticsAPI;
9
9
  cardContext?: CardContext;
10
10
  } & ModalTypeToComponentMap;
11
- export declare const DatasourceModal: ({ view, cardContext, datasourceId: defaultDatasourceId, componentType: Component, }: DatasourceModalProps) => JSX.Element | null;
11
+ export declare const DatasourceModal: ({ view, cardContext, datasourceId: defaultDatasourceId, componentType: Component, }: DatasourceModalProps) => React.JSX.Element | null;
12
12
  export {};
@@ -19,12 +19,12 @@ export type EditLinkToolbarProps = {
19
19
  forceFocusSelector: ForceFocusSelector | undefined;
20
20
  lpLinkPicker: boolean;
21
21
  };
22
- export declare function HyperlinkAddToolbarWithState({ linkPickerOptions, onSubmit, displayText, displayUrl, providerFactory, view, onCancel, invokeMethod, lpLinkPicker, onClose, onEscapeCallback, onClickAwayCallback, }: HyperlinkAddToolbarProps): JSX.Element;
22
+ export declare function HyperlinkAddToolbarWithState({ linkPickerOptions, onSubmit, displayText, displayUrl, providerFactory, view, onCancel, invokeMethod, lpLinkPicker, onClose, onEscapeCallback, onClickAwayCallback, }: HyperlinkAddToolbarProps): React.JSX.Element;
23
23
  export declare class EditLinkToolbar extends React.Component<EditLinkToolbarProps> {
24
24
  componentDidUpdate(prevProps: EditLinkToolbarProps): void;
25
25
  componentWillUnmount(): void;
26
26
  private hideLinkToolbar;
27
- render(): JSX.Element;
27
+ render(): React.JSX.Element;
28
28
  }
29
29
  export declare const getEditLinkCallback: (editorAnalyticsApi: EditorAnalyticsAPI | undefined, scrollIntoView: boolean) => Command;
30
30
  export declare const buildEditLinkToolbar: ({ providerFactory, node, pluginInjectionApi, linkPicker, lpLinkPicker, }: {
@@ -7,4 +7,4 @@ export type EditorAnalyticsContextProps = {
7
7
  /**
8
8
  * Provides location attribute to child events
9
9
  */
10
- export declare const EditorAnalyticsContext: ({ editorView, children }: EditorAnalyticsContextProps) => JSX.Element;
10
+ export declare const EditorAnalyticsContext: ({ editorView, children }: EditorAnalyticsContextProps) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import type { AnalyticsBindingsProps } from './common';
3
3
  export declare class EditorLinkingPlatformAnalytics extends React.PureComponent<AnalyticsBindingsProps> {
4
- render(): JSX.Element;
4
+ render(): React.JSX.Element;
5
5
  }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { IntlShape } from 'react-intl-next';
3
3
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
4
  import type { CardOptions } from '@atlaskit/editor-common/card';
@@ -15,4 +15,4 @@ export interface HyperlinkToolbarAppearanceProps {
15
15
  editorAnalyticsApi: EditorAnalyticsAPI | undefined;
16
16
  editorPluginApi: ExtractInjectionAPI<CardPlugin> | undefined;
17
17
  }
18
- export declare function HyperlinkToolbarAppearance(props: HyperlinkToolbarAppearanceProps): JSX.Element | null;
18
+ export declare function HyperlinkToolbarAppearance(props: HyperlinkToolbarAppearanceProps): React.JSX.Element | null;
@@ -18,6 +18,6 @@ export interface LinkToolbarAppearanceProps {
18
18
  isDatasourceView?: boolean;
19
19
  }
20
20
  export declare class LinkToolbarAppearance extends React.Component<LinkToolbarAppearanceProps, Object> {
21
- renderDropdown: (view?: EditorView, cardContext?: CardContext) => JSX.Element | null;
22
- render(): JSX.Element;
21
+ renderDropdown: (view?: EditorView, cardContext?: CardContext) => React.JSX.Element | null;
22
+ render(): React.JSX.Element;
23
23
  }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export type PulseDiscoveryMode = 'start' | 'iteration';
3
3
  export interface PulseProps {
4
4
  /**
@@ -21,4 +21,4 @@ export interface PulseProps {
21
21
  shouldShowPulse?: boolean;
22
22
  testId?: string;
23
23
  }
24
- export declare const DiscoveryPulse: ({ children, localStorageKey, localStorageKeyExpirationInMs, discoveryMode, shouldShowPulse, testId, }: PulseProps) => JSX.Element;
24
+ export declare const DiscoveryPulse: ({ children, localStorageKey, localStorageKeyExpirationInMs, discoveryMode, shouldShowPulse, testId, }: PulseProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { EditorAnalyticsContextProps } from './EditorAnalyticsContext';
3
3
  type ToolbarViewedEventProps = {
4
4
  url?: string;
@@ -7,5 +7,5 @@ type ToolbarViewedEventProps = {
7
7
  /**
8
8
  * Provides analytics context and card context
9
9
  */
10
- export declare const ToolbarViewedEvent: ({ url, display, editorView, }: ToolbarViewedEventProps & Omit<EditorAnalyticsContextProps, 'children'>) => JSX.Element;
10
+ export declare const ToolbarViewedEvent: ({ url, display, editorView, }: ToolbarViewedEventProps & Omit<EditorAnalyticsContextProps, 'children'>) => React.JSX.Element;
11
11
  export {};
@@ -2,4 +2,4 @@ import React from 'react';
2
2
  import { useSmartCardContext } from '@atlaskit/link-provider';
3
3
  export declare const WithCardContext: ({ children, }: {
4
4
  children: (cardContext: ReturnType<typeof useSmartCardContext>) => React.ReactNode;
5
- }) => JSX.Element;
5
+ }) => React.JSX.Element;
@@ -20,5 +20,5 @@ export declare class DatasourceErrorBoundary extends React.Component<DatasourceE
20
20
  error: Error | APIError;
21
21
  };
22
22
  componentDidCatch(error: Error | APIError): void;
23
- render(): string | number | boolean | JSX.Element | React.ReactFragment | null | undefined;
23
+ render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "4.5.18",
3
+ "version": "4.6.0",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,33 +33,33 @@
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^46.1.0",
35
35
  "@atlaskit/analytics-next": "^10.3.0",
36
- "@atlaskit/custom-steps": "^0.9.0",
37
- "@atlaskit/editor-common": "^99.7.0",
38
- "@atlaskit/editor-plugin-analytics": "^1.11.0",
39
- "@atlaskit/editor-plugin-base": "^2.1.0",
40
- "@atlaskit/editor-plugin-connectivity": "^1.1.0",
41
- "@atlaskit/editor-plugin-decorations": "^1.4.0",
42
- "@atlaskit/editor-plugin-editor-disabled": "^1.4.0",
43
- "@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
44
- "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
45
- "@atlaskit/editor-plugin-floating-toolbar": "^1.16.0",
46
- "@atlaskit/editor-plugin-grid": "^1.3.0",
47
- "@atlaskit/editor-plugin-width": "^2.0.0",
48
- "@atlaskit/editor-prosemirror": "6.2.1",
36
+ "@atlaskit/custom-steps": "^0.10.0",
37
+ "@atlaskit/editor-common": "^99.10.0",
38
+ "@atlaskit/editor-plugin-analytics": "^1.12.0",
39
+ "@atlaskit/editor-plugin-base": "^2.2.0",
40
+ "@atlaskit/editor-plugin-connectivity": "^1.2.0",
41
+ "@atlaskit/editor-plugin-decorations": "^1.5.0",
42
+ "@atlaskit/editor-plugin-editor-disabled": "^1.5.0",
43
+ "@atlaskit/editor-plugin-editor-viewmode": "^2.2.0",
44
+ "@atlaskit/editor-plugin-feature-flags": "^1.3.0",
45
+ "@atlaskit/editor-plugin-floating-toolbar": "^1.17.0",
46
+ "@atlaskit/editor-plugin-grid": "^1.4.0",
47
+ "@atlaskit/editor-plugin-width": "^2.1.0",
48
+ "@atlaskit/editor-prosemirror": "7.0.0",
49
49
  "@atlaskit/editor-shared-styles": "^3.2.0",
50
50
  "@atlaskit/frontend-utilities": "^2.9.0",
51
- "@atlaskit/icon": "^23.6.0",
51
+ "@atlaskit/icon": "^23.7.0",
52
52
  "@atlaskit/link-analytics": "^8.7.0",
53
53
  "@atlaskit/link-client-extension": "^3.1.0",
54
- "@atlaskit/link-datasource": "^3.18.0",
55
- "@atlaskit/linking-common": "^6.2.0",
54
+ "@atlaskit/link-datasource": "^3.19.0",
55
+ "@atlaskit/linking-common": "^6.3.0",
56
56
  "@atlaskit/linking-types": "^9.6.0",
57
- "@atlaskit/menu": "2.14.1",
57
+ "@atlaskit/menu": "2.14.2",
58
58
  "@atlaskit/platform-feature-flags": "^1.0.0",
59
- "@atlaskit/primitives": "^13.4.0",
59
+ "@atlaskit/primitives": "^13.5.0",
60
60
  "@atlaskit/smart-card": "^34.10.0",
61
- "@atlaskit/theme": "^14.1.0",
62
- "@atlaskit/tmp-editor-statsig": "^2.41.0",
61
+ "@atlaskit/theme": "^15.0.0",
62
+ "@atlaskit/tmp-editor-statsig": "^2.43.0",
63
63
  "@atlaskit/tokens": "^3.3.0",
64
64
  "@babel/runtime": "^7.0.0",
65
65
  "@emotion/react": "^11.7.1",