@atlaskit/editor-plugin-card 13.0.0 → 13.0.2

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 (65) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/nodeviews/datasource.js +1 -1
  3. package/dist/cjs/nodeviews/inlineCard.js +8 -1
  4. package/dist/cjs/pm-plugins/utils.js +3 -1
  5. package/dist/cjs/ui/AwarenessWrapper/index.js +1 -1
  6. package/dist/cjs/ui/ConfigureOverlay/index.js +1 -1
  7. package/dist/cjs/ui/DatasourceAppearanceButton.js +1 -1
  8. package/dist/cjs/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -1
  9. package/dist/cjs/ui/EditToolbarButton/index.js +1 -1
  10. package/dist/cjs/ui/InlineCardOverlay/index.js +1 -1
  11. package/dist/cjs/ui/LayoutButton/index.js +3 -2
  12. package/dist/cjs/ui/ResizableEmbedCard.js +1 -1
  13. package/dist/es2019/nodeviews/datasource.js +1 -1
  14. package/dist/es2019/nodeviews/inlineCard.js +9 -2
  15. package/dist/es2019/pm-plugins/utils.js +3 -1
  16. package/dist/es2019/ui/AwarenessWrapper/index.js +1 -1
  17. package/dist/es2019/ui/ConfigureOverlay/index.js +1 -1
  18. package/dist/es2019/ui/DatasourceAppearanceButton.js +1 -1
  19. package/dist/es2019/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -1
  20. package/dist/es2019/ui/EditToolbarButton/index.js +1 -1
  21. package/dist/es2019/ui/InlineCardOverlay/index.js +1 -1
  22. package/dist/es2019/ui/LayoutButton/index.js +3 -2
  23. package/dist/es2019/ui/ResizableEmbedCard.js +1 -1
  24. package/dist/esm/nodeviews/datasource.js +1 -1
  25. package/dist/esm/nodeviews/inlineCard.js +9 -2
  26. package/dist/esm/pm-plugins/utils.js +3 -1
  27. package/dist/esm/ui/AwarenessWrapper/index.js +1 -1
  28. package/dist/esm/ui/ConfigureOverlay/index.js +1 -1
  29. package/dist/esm/ui/DatasourceAppearanceButton.js +1 -1
  30. package/dist/esm/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -1
  31. package/dist/esm/ui/EditToolbarButton/index.js +1 -1
  32. package/dist/esm/ui/InlineCardOverlay/index.js +1 -1
  33. package/dist/esm/ui/LayoutButton/index.js +3 -2
  34. package/dist/esm/ui/ResizableEmbedCard.js +1 -1
  35. package/dist/types/nodeviews/blockCard.d.ts +2 -2
  36. package/dist/types/nodeviews/inlineCard.d.ts +4 -3
  37. package/dist/types/nodeviews/lazy-inline-card.d.ts +2 -1
  38. package/dist/types/nodeviews/toDOM-fixes/blockCard.d.ts +18 -17
  39. package/dist/types/nodeviews/toDOM-fixes/embedCard.d.ts +18 -17
  40. package/dist/types/nodeviews/toDOM-fixes/inlineCard.d.ts +18 -17
  41. package/dist/types/pm-plugins/doc.d.ts +2 -2
  42. package/dist/types/pm-plugins/util/resolve.d.ts +2 -2
  43. package/dist/types/pm-plugins/util/state.d.ts +28 -20
  44. package/dist/types/ui/DatasourceDropdownOption.d.ts +8 -7
  45. package/dist/types/ui/LayoutButton/index.d.ts +9 -4
  46. package/dist/types/ui/LayoutButton/utils.d.ts +3 -2
  47. package/dist/types/ui/ResizableEmbedCard.d.ts +3 -2
  48. package/dist/types/ui/analytics/utils.d.ts +2 -1
  49. package/dist/types/ui/datasourceErrorBoundary.d.ts +1 -1
  50. package/dist/types-ts4.5/nodeviews/blockCard.d.ts +2 -2
  51. package/dist/types-ts4.5/nodeviews/inlineCard.d.ts +4 -3
  52. package/dist/types-ts4.5/nodeviews/lazy-inline-card.d.ts +2 -1
  53. package/dist/types-ts4.5/nodeviews/toDOM-fixes/blockCard.d.ts +18 -17
  54. package/dist/types-ts4.5/nodeviews/toDOM-fixes/embedCard.d.ts +18 -17
  55. package/dist/types-ts4.5/nodeviews/toDOM-fixes/inlineCard.d.ts +18 -17
  56. package/dist/types-ts4.5/pm-plugins/doc.d.ts +2 -2
  57. package/dist/types-ts4.5/pm-plugins/util/resolve.d.ts +2 -2
  58. package/dist/types-ts4.5/pm-plugins/util/state.d.ts +28 -20
  59. package/dist/types-ts4.5/ui/DatasourceDropdownOption.d.ts +8 -7
  60. package/dist/types-ts4.5/ui/LayoutButton/index.d.ts +9 -4
  61. package/dist/types-ts4.5/ui/LayoutButton/utils.d.ts +3 -2
  62. package/dist/types-ts4.5/ui/ResizableEmbedCard.d.ts +3 -2
  63. package/dist/types-ts4.5/ui/analytics/utils.d.ts +2 -1
  64. package/dist/types-ts4.5/ui/datasourceErrorBoundary.d.ts +1 -1
  65. package/package.json +3 -3
@@ -1,8 +1,13 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ComponentType, type FC } from 'react';
1
6
  import { jsx } from '@emotion/react';
2
- import type { WrappedComponentProps } from 'react-intl-next';
7
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
3
8
  import type { LayoutButtonProps, LayoutButtonWrapperProps } from './types';
4
9
  export declare const LayoutButton: ({ onLayoutChange, layout, intl: { formatMessage }, mountPoint, boundariesElement, scrollableElement, targetElement, testId, }: LayoutButtonProps) => jsx.JSX.Element | null;
5
- declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<LayoutButtonWrapperProps & WrappedComponentProps>> & {
6
- WrappedComponent: import("react").ComponentType<LayoutButtonWrapperProps & WrappedComponentProps>;
10
+ declare const _default_1: FC<WithIntlProps<LayoutButtonWrapperProps & WrappedComponentProps>> & {
11
+ WrappedComponent: ComponentType<LayoutButtonWrapperProps & WrappedComponentProps>;
7
12
  };
8
- export default _default;
13
+ export default _default_1;
@@ -1,10 +1,11 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
+ import type { DatasourceNode } from '../../types';
2
3
  import { type DatasourceTableLayout } from './types';
3
4
  export declare const getDatasource: (editorView: EditorView | undefined) => {
4
- node: import("../../types").DatasourceNode;
5
- start: number;
6
5
  depth: number;
6
+ node: DatasourceNode;
7
7
  pos: number;
8
+ start: number;
8
9
  } | {
9
10
  node: undefined;
10
11
  pos: undefined;
@@ -6,6 +6,7 @@ import React from 'react';
6
6
  import { jsx } from '@emotion/react';
7
7
  import type { RichMediaLayout } from '@atlaskit/adf-schema';
8
8
  import type { ResizerProps } from '@atlaskit/editor-common/ui';
9
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
9
10
  type State = {
10
11
  offsetLeft: number;
11
12
  resizedPctWidth?: number;
@@ -29,11 +30,11 @@ export default class ResizableEmbedCard extends React.Component<Props, State> {
29
30
  */
30
31
  checkLayout(oldLayout: RichMediaLayout, newLayout: RichMediaLayout): void;
31
32
  calcNewSize: (newWidth: number, stop: boolean) => {
32
- width: number | null;
33
33
  layout: RichMediaLayout;
34
+ width: number | null;
34
35
  };
35
36
  calcUnwrappedLayout: (pct: number, width: number) => "center" | "wide" | "full-width";
36
- get $pos(): import("prosemirror-model").ResolvedPos | null;
37
+ get $pos(): ResolvedPos | null;
37
38
  /**
38
39
  * The maxmimum number of grid columns this node can resize to.
39
40
  */
@@ -1,3 +1,4 @@
1
+ import type { CardAppearance } from '@atlaskit/editor-common/provider-factory';
1
2
  import { type Node } from '@atlaskit/editor-prosemirror/model';
2
3
  import { type ReadonlyTransaction, type Transaction } from '@atlaskit/editor-prosemirror/state';
3
4
  import { type Entity, EVENT_SUBJECT } from './types';
@@ -10,7 +11,7 @@ export declare function getNodeSubject(node: Node): EVENT_SUBJECT | null;
10
11
  /**
11
12
  * Analytics appearance for link object
12
13
  */
13
- export declare function appearanceForLink(node: Node): import("@atlaskit/editor-common/provider-factory").CardAppearance | "url";
14
+ export declare function appearanceForLink(node: Node): 'url' | CardAppearance;
14
15
  export declare function getUrl(node: Node): string | undefined;
15
16
  export declare const getNodeContext: (doc: Node, pos: number) => string;
16
17
  export declare const findAtPositions: (tr: Transaction | ReadonlyTransaction, positions: number[]) => Entity[];
@@ -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 | React.JSX.Element | Iterable<React.ReactNode> | 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": "13.0.0",
3
+ "version": "13.0.2",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -62,7 +62,7 @@
62
62
  "@atlaskit/prosemirror-history": "^0.2.0",
63
63
  "@atlaskit/smart-card": "^43.26.0",
64
64
  "@atlaskit/theme": "^22.0.0",
65
- "@atlaskit/tmp-editor-statsig": "^35.10.0",
65
+ "@atlaskit/tmp-editor-statsig": "^36.1.0",
66
66
  "@atlaskit/tokens": "^11.1.0",
67
67
  "@babel/runtime": "^7.0.0",
68
68
  "@emotion/react": "^11.7.1",
@@ -72,7 +72,7 @@
72
72
  "uuid": "^3.1.0"
73
73
  },
74
74
  "peerDependencies": {
75
- "@atlaskit/editor-common": "^112.0.0",
75
+ "@atlaskit/editor-common": "^112.1.0",
76
76
  "@atlaskit/link-provider": "^4.2.0",
77
77
  "react": "^18.2.0",
78
78
  "react-intl-next": "npm:react-intl@^5.18.1"