@atlaskit/editor-common 93.5.2 → 93.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 (99) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/card/LinkToolbarButtonGroup.js +8 -4
  3. package/dist/cjs/card/link-toolbar-button-group-options.js +16 -5
  4. package/dist/cjs/card/ui/assets/card.js +2 -0
  5. package/dist/cjs/card/ui/assets/embed.js +2 -0
  6. package/dist/cjs/card/ui/assets/inline.js +2 -0
  7. package/dist/cjs/card/ui/assets/url.js +2 -0
  8. package/dist/cjs/media-single/CommentBadge.js +6 -2
  9. package/dist/cjs/media-single/CommentBadgeNext.js +6 -2
  10. package/dist/cjs/messages/insert-block.js +20 -0
  11. package/dist/cjs/monitoring/error.js +1 -1
  12. package/dist/cjs/provider-factory/provider-factory.js +1 -0
  13. package/dist/cjs/provider-factory/with-providers.js +29 -8
  14. package/dist/cjs/quick-insert/assets/five-column-layout.js +173 -0
  15. package/dist/cjs/quick-insert/assets/four-column-layout.js +158 -0
  16. package/dist/cjs/quick-insert/assets/index.js +61 -1
  17. package/dist/cjs/quick-insert/assets/one-column-layout.js +109 -0
  18. package/dist/cjs/quick-insert/assets/three-column-layout.js +150 -0
  19. package/dist/cjs/quick-insert/assets/two-column-layout.js +128 -0
  20. package/dist/cjs/quick-insert/index.js +30 -0
  21. package/dist/cjs/ui/DropList/index.js +1 -1
  22. package/dist/cjs/ui-menu/ColorPickerButton/index.js +1 -0
  23. package/dist/es2019/card/LinkToolbarButtonGroup.js +24 -18
  24. package/dist/es2019/card/link-toolbar-button-group-options.js +15 -5
  25. package/dist/es2019/card/ui/assets/card.js +1 -0
  26. package/dist/es2019/card/ui/assets/embed.js +1 -0
  27. package/dist/es2019/card/ui/assets/inline.js +1 -0
  28. package/dist/es2019/card/ui/assets/url.js +1 -0
  29. package/dist/es2019/media-single/CommentBadge.js +6 -2
  30. package/dist/es2019/media-single/CommentBadgeNext.js +6 -2
  31. package/dist/es2019/messages/insert-block.js +20 -0
  32. package/dist/es2019/monitoring/error.js +1 -1
  33. package/dist/es2019/provider-factory/provider-factory.js +1 -0
  34. package/dist/es2019/provider-factory/with-providers.js +28 -8
  35. package/dist/es2019/quick-insert/assets/five-column-layout.js +167 -0
  36. package/dist/es2019/quick-insert/assets/four-column-layout.js +152 -0
  37. package/dist/es2019/quick-insert/assets/index.js +20 -0
  38. package/dist/es2019/quick-insert/assets/one-column-layout.js +103 -0
  39. package/dist/es2019/quick-insert/assets/three-column-layout.js +144 -0
  40. package/dist/es2019/quick-insert/assets/two-column-layout.js +122 -0
  41. package/dist/es2019/quick-insert/index.js +1 -1
  42. package/dist/es2019/ui/DropList/index.js +1 -1
  43. package/dist/es2019/ui-menu/ColorPickerButton/index.js +1 -0
  44. package/dist/esm/card/LinkToolbarButtonGroup.js +8 -4
  45. package/dist/esm/card/link-toolbar-button-group-options.js +15 -5
  46. package/dist/esm/card/ui/assets/card.js +1 -0
  47. package/dist/esm/card/ui/assets/embed.js +1 -0
  48. package/dist/esm/card/ui/assets/inline.js +1 -0
  49. package/dist/esm/card/ui/assets/url.js +1 -0
  50. package/dist/esm/media-single/CommentBadge.js +6 -2
  51. package/dist/esm/media-single/CommentBadgeNext.js +6 -2
  52. package/dist/esm/messages/insert-block.js +20 -0
  53. package/dist/esm/monitoring/error.js +1 -1
  54. package/dist/esm/provider-factory/provider-factory.js +1 -0
  55. package/dist/esm/provider-factory/with-providers.js +29 -7
  56. package/dist/esm/quick-insert/assets/five-column-layout.js +166 -0
  57. package/dist/esm/quick-insert/assets/four-column-layout.js +151 -0
  58. package/dist/esm/quick-insert/assets/index.js +50 -0
  59. package/dist/esm/quick-insert/assets/one-column-layout.js +102 -0
  60. package/dist/esm/quick-insert/assets/three-column-layout.js +143 -0
  61. package/dist/esm/quick-insert/assets/two-column-layout.js +121 -0
  62. package/dist/esm/quick-insert/index.js +1 -1
  63. package/dist/esm/ui/DropList/index.js +1 -1
  64. package/dist/esm/ui-menu/ColorPickerButton/index.js +1 -0
  65. package/dist/types/card/LinkToolbarButtonGroup.d.ts +3 -2
  66. package/dist/types/card/cardOptions.d.ts +74 -0
  67. package/dist/types/card/ui/assets/card.d.ts +2 -2
  68. package/dist/types/card/ui/assets/embed.d.ts +2 -2
  69. package/dist/types/card/ui/assets/inline.d.ts +2 -2
  70. package/dist/types/card/ui/assets/url.d.ts +2 -2
  71. package/dist/types/messages/insert-block.d.ts +20 -0
  72. package/dist/types/provider-factory/provider-factory.d.ts +1 -1
  73. package/dist/types/provider-factory/quick-insert-provider.d.ts +1 -1
  74. package/dist/types/provider-factory/with-providers.d.ts +6 -3
  75. package/dist/types/quick-insert/assets/five-column-layout.d.ts +2 -0
  76. package/dist/types/quick-insert/assets/four-column-layout.d.ts +2 -0
  77. package/dist/types/quick-insert/assets/index.d.ts +5 -0
  78. package/dist/types/quick-insert/assets/one-column-layout.d.ts +2 -0
  79. package/dist/types/quick-insert/assets/three-column-layout.d.ts +2 -0
  80. package/dist/types/quick-insert/assets/two-column-layout.d.ts +2 -0
  81. package/dist/types/quick-insert/index.d.ts +1 -1
  82. package/dist/types-ts4.5/card/LinkToolbarButtonGroup.d.ts +3 -2
  83. package/dist/types-ts4.5/card/cardOptions.d.ts +74 -0
  84. package/dist/types-ts4.5/card/ui/assets/card.d.ts +2 -2
  85. package/dist/types-ts4.5/card/ui/assets/embed.d.ts +2 -2
  86. package/dist/types-ts4.5/card/ui/assets/inline.d.ts +2 -2
  87. package/dist/types-ts4.5/card/ui/assets/url.d.ts +2 -2
  88. package/dist/types-ts4.5/messages/insert-block.d.ts +20 -0
  89. package/dist/types-ts4.5/provider-factory/provider-factory.d.ts +1 -1
  90. package/dist/types-ts4.5/provider-factory/quick-insert-provider.d.ts +1 -1
  91. package/dist/types-ts4.5/provider-factory/with-providers.d.ts +6 -3
  92. package/dist/types-ts4.5/quick-insert/assets/five-column-layout.d.ts +2 -0
  93. package/dist/types-ts4.5/quick-insert/assets/four-column-layout.d.ts +2 -0
  94. package/dist/types-ts4.5/quick-insert/assets/index.d.ts +5 -0
  95. package/dist/types-ts4.5/quick-insert/assets/one-column-layout.d.ts +2 -0
  96. package/dist/types-ts4.5/quick-insert/assets/three-column-layout.d.ts +2 -0
  97. package/dist/types-ts4.5/quick-insert/assets/two-column-layout.d.ts +2 -0
  98. package/dist/types-ts4.5/quick-insert/index.d.ts +1 -1
  99. package/package.json +5 -5
@@ -0,0 +1,121 @@
1
+ import React from 'react';
2
+ import { useIconThemed } from '../use-icon-themed';
3
+ export default function TwoColumnLayoutIcon() {
4
+ var _useIconThemed = useIconThemed(),
5
+ iconThemed = _useIconThemed.iconThemed;
6
+ return /*#__PURE__*/React.createElement("svg", {
7
+ focusable: "false",
8
+ "aria-hidden": true,
9
+ width: "40",
10
+ height: "40",
11
+ viewBox: "0 0 40 40",
12
+ fill: "none",
13
+ xmlns: "http://www.w3.org/2000/svg"
14
+ }, /*#__PURE__*/React.createElement("g", {
15
+ clipPath: "url(#clip0_5808_8970)"
16
+ }, /*#__PURE__*/React.createElement("rect", {
17
+ width: "40",
18
+ height: "40",
19
+ rx: "3",
20
+ fill: iconThemed({
21
+ light: '#FFF',
22
+ dark: '#161A1D'
23
+ })
24
+ }), /*#__PURE__*/React.createElement("rect", {
25
+ width: "40",
26
+ height: "40",
27
+ rx: "3",
28
+ fill: iconThemed({
29
+ light: '#FFF',
30
+ dark: '#161A1D'
31
+ })
32
+ }), /*#__PURE__*/React.createElement("rect", {
33
+ x: "0.5",
34
+ y: "0.5",
35
+ width: "39",
36
+ height: "39",
37
+ rx: "2.5",
38
+ stroke: "var(--ds-border, #091E42)",
39
+ strokeOpacity: "0.14"
40
+ })), /*#__PURE__*/React.createElement("rect", {
41
+ x: "6",
42
+ y: "6",
43
+ width: "28",
44
+ height: "1",
45
+ rx: "0.5",
46
+ fill: iconThemed({
47
+ light: '#a5adba',
48
+ dark: '#8696A7'
49
+ })
50
+ }), /*#__PURE__*/React.createElement("rect", {
51
+ x: "6",
52
+ y: "10",
53
+ width: "28",
54
+ height: "1",
55
+ rx: "0.5",
56
+ fill: iconThemed({
57
+ light: '#a5adba',
58
+ dark: '#8696A7'
59
+ })
60
+ }), /*#__PURE__*/React.createElement("rect", {
61
+ x: "6",
62
+ y: "29",
63
+ width: "28",
64
+ height: "1",
65
+ rx: "0.5",
66
+ fill: iconThemed({
67
+ light: '#a5adba',
68
+ dark: '#8696A7'
69
+ })
70
+ }), /*#__PURE__*/React.createElement("rect", {
71
+ x: "6",
72
+ y: "33",
73
+ width: "16",
74
+ height: "1",
75
+ rx: "0.5",
76
+ fill: iconThemed({
77
+ light: '#a5adba',
78
+ dark: '#8696A7'
79
+ })
80
+ }), /*#__PURE__*/React.createElement("rect", {
81
+ x: "6.25",
82
+ y: "14.25",
83
+ width: "12.5",
84
+ height: "11.5",
85
+ rx: "0.75",
86
+ fill: iconThemed({
87
+ light: '#DEEBFF',
88
+ dark: '#09326C'
89
+ }),
90
+ stroke: iconThemed({
91
+ light: '#4C9AFF',
92
+ dark: '#0C66E4'
93
+ }),
94
+ strokeWidth: "0.5"
95
+ }), /*#__PURE__*/React.createElement("rect", {
96
+ x: "21.25",
97
+ y: "14.25",
98
+ width: "12.5",
99
+ height: "11.5",
100
+ rx: "0.75",
101
+ fill: iconThemed({
102
+ light: '#DEEBFF',
103
+ dark: '#09326C'
104
+ }),
105
+ stroke: iconThemed({
106
+ light: '#4C9AFF',
107
+ dark: '#0C66E4'
108
+ }),
109
+ strokeWidth: "0.5"
110
+ }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
111
+ id: "clip0_5808_8970"
112
+ }, /*#__PURE__*/React.createElement("rect", {
113
+ width: "40",
114
+ height: "40",
115
+ rx: "3",
116
+ fill: iconThemed({
117
+ light: '#FFF',
118
+ dark: '#161A1D'
119
+ })
120
+ }))));
121
+ }
@@ -1,3 +1,3 @@
1
- export { IconAction, IconCode, IconDate, IconDecision, IconDivider, IconEmoji, IconImages, IconLayout, IconLink, IconListNumber, IconList, IconMention, IconPanelError, IconPanelNote, IconPanelSuccess, IconPanelWarning, IconPanel, IconQuote, IconStatus, IconHeading, IconFeedback, IconExpand, IconCustomPanel, IconFallback, IconDatasourceJiraIssue, IconDatasourceAssetsObjects, IconDatasourceConfluenceSearch, IconLoom } from './assets';
1
+ export { IconAction, IconCode, IconDate, IconDecision, IconDivider, IconEmoji, IconImages, IconLayout, IconLink, IconListNumber, IconList, IconMention, IconPanelError, IconPanelNote, IconPanelSuccess, IconPanelWarning, IconPanel, IconQuote, IconStatus, IconHeading, IconFeedback, IconExpand, IconCustomPanel, IconFallback, IconDatasourceJiraIssue, IconDatasourceAssetsObjects, IconDatasourceConfluenceSearch, IconLoom, IconOneColumnLayout, IconTwoColumnLayout, IconThreeColumnLayout, IconFourColumnLayout, IconFiveColumnLayout } from './assets';
2
2
  export { memoProcessQuickInsertItems, find } from './utils';
3
3
  export { messages } from './messages';
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
21
21
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "93.5.2";
24
+ var packageVersion = "93.6.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var DropList = /*#__PURE__*/function (_Component) {
@@ -224,6 +224,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
224
224
  }
225
225
  }
226
226
  // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
227
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
227
228
  ,
228
229
  css: buttonStyle,
229
230
  iconAfter: jsx(Box, {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { jsx } from '@emotion/react';
3
- import type { GlyphProps } from '@atlaskit/icon/types';
3
+ import type { UNSAFE_NewCoreIconProps } from '@atlaskit/icon/types';
4
4
  export interface ButtonOptionProps {
5
5
  title: string;
6
6
  selected: boolean;
@@ -8,7 +8,8 @@ export interface ButtonOptionProps {
8
8
  disabled: boolean;
9
9
  tooltipContent?: string | null;
10
10
  onClick: () => void;
11
- icon: (props: GlyphProps) => JSX.Element;
11
+ icon: (props: Omit<UNSAFE_NewCoreIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
12
+ iconFallback: (props: Omit<UNSAFE_NewCoreIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
12
13
  }
13
14
  export interface LinkToolbarButtonGroupProps {
14
15
  options: ButtonOptionProps[];
@@ -6,20 +6,94 @@ export type OnClickCallback = ({ event, url, }: {
6
6
  url?: string;
7
7
  }) => void;
8
8
  export interface CardOptions {
9
+ /**
10
+ * A promise returning the instance of EditorCardProvider
11
+ *
12
+ * Example: Promise.resolve(new EditorCardProvider())
13
+ */
9
14
  provider?: Providers['cardProvider'];
15
+ /**
16
+ * When the URL pattern is in conflict with Smart Links and macros, macros will take priority over Smart Links.
17
+ * Specify the names of macros to allow card plugin to override the macros behaviour and converts the URL to Smart Link.
18
+ */
10
19
  resolveBeforeMacros?: string[];
20
+ /**
21
+ * A flag to determine whether editor can display Smart Link with block (Card) appearance.
22
+ * Default is true.
23
+ *
24
+ * Component: block (card)
25
+ */
11
26
  allowBlockCards?: boolean;
27
+ /**
28
+ * A flag to determine whether editor can display link datasource (Jira issues and Confluence links).
29
+ * Default is false.
30
+ *
31
+ * Component: link datasource (Jira issues, Confluence list)
32
+ */
12
33
  allowDatasource?: boolean;
34
+ /**
35
+ * A flag to determine whether editor can display Smart Link with embed appearance.
36
+ * Default is false.
37
+ *
38
+ * Component: embed
39
+ */
13
40
  allowEmbeds?: boolean;
41
+ /**
42
+ * A flag to determine whether Smart Link with embed appearance can be resized.
43
+ * Default is true.
44
+ *
45
+ * Component: embed
46
+ */
14
47
  allowResizing?: boolean;
48
+ /**
49
+ * Configure visibility of actions available.
50
+ * By default, smart links show all actions available on the views.
51
+ * Set `hide` to true to disable all actions.
52
+ * Set `hide` to false and set `exclude` to enable only specific actions.
53
+ *
54
+ * Component: inline (hover preview), block (card)
55
+ */
15
56
  actionOptions?: CardProps['actionOptions'];
57
+ /**
58
+ * By default, Smart Link with inline appearance resolving states show a frame with a spinner on the left.
59
+ * An alternative is to remove the frame and place the spinner on the right by setting this value to `on-right-without-skeleton`.
60
+ * This property is specific to inline links in the editor.
61
+ * Default is true.
62
+ *
63
+ * Component: inline
64
+ */
16
65
  useAlternativePreloader?: boolean;
66
+ /**
67
+ * A flag to display alignment options in the link toolbar on Smart Link with embed appearance.
68
+ * Default is true.
69
+ *
70
+ * Component: embed
71
+ */
17
72
  allowAlignment?: boolean;
73
+ /**
74
+ * A flag to display wrapping options in the link toolbar on Smart Link with embed appearance.
75
+ * Default is true.
76
+ *
77
+ * Component: embed
78
+ */
18
79
  allowWrapping?: boolean;
80
+ /**
81
+ * A flag to display Smart Link upgrade discovery.
82
+ * Default is true.
83
+ *
84
+ * Component: link toolbar
85
+ */
19
86
  showUpgradeDiscoverability?: boolean;
87
+ /**
88
+ * A callback to determine the link click behaviour.
89
+ *
90
+ * Component: inline, block (card), embed
91
+ */
20
92
  onClickCallback?: OnClickCallback;
21
93
  /**
22
94
  * Customises the outbound link to configure user preferences
95
+ *
96
+ * Component: link toolbar
23
97
  */
24
98
  userPreferencesLink?: string;
25
99
  }
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconCard: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconCard: (props: Omit<UNSAFE_NewIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconEmbed: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconEmbed: (props: Omit<UNSAFE_NewIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconInline: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconInline: (props: Omit<UNSAFE_NewIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconUrl: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewCoreIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconUrl: (props: Omit<UNSAFE_NewCoreIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -164,6 +164,26 @@ export declare const toolbarInsertBlockMessages: {
164
164
  defaultMessage: string;
165
165
  description: string;
166
166
  };
167
+ twoColumns: {
168
+ id: string;
169
+ defaultMessage: string;
170
+ description: string;
171
+ };
172
+ threeColumns: {
173
+ id: string;
174
+ defaultMessage: string;
175
+ description: string;
176
+ };
177
+ fourColumns: {
178
+ id: string;
179
+ defaultMessage: string;
180
+ description: string;
181
+ };
182
+ fiveColumns: {
183
+ id: string;
184
+ defaultMessage: string;
185
+ description: string;
186
+ };
167
187
  columnsDescription: {
168
188
  id: string;
169
189
  defaultMessage: string;
@@ -9,7 +9,7 @@ export default class ProviderFactory {
9
9
  isEmpty(): boolean;
10
10
  setProvider<T extends ProviderName>(name: T, provider?: ProviderType<T>): void;
11
11
  removeProvider<T extends string>(name: T | ProviderName): void;
12
- subscribe<T extends string>(name: T, handler: ProviderHandler<typeof name>): void;
12
+ subscribe<T extends string>(name: T, handler: ProviderHandler<typeof name>): ProviderType<T> | undefined;
13
13
  unsubscribe<T extends string>(name: T, handler: ProviderHandler<typeof name>): void;
14
14
  unsubscribeAll<T extends string>(name: T | ProviderName): void;
15
15
  hasProvider<T extends string>(name: T | ProviderName): boolean;
@@ -5,7 +5,7 @@ import type { TypeAheadItem } from '../types/type-ahead';
5
5
  export type QuickInsertActionInsert = (node?: Node | Record<string, any> | string, opts?: {
6
6
  selectInlineNode?: boolean;
7
7
  }) => Transaction;
8
- export type QuickInsertItemId = 'hyperlink' | 'table' | 'helpdialog' | 'date' | 'media' | 'media-insert' | 'blockquote' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'codeblock' | 'unorderedList' | 'feedbackdialog' | 'orderedList' | 'rule' | 'status' | 'mention' | 'emoji' | 'action' | 'decision' | 'infopanel' | 'notepanel' | 'successpanel' | 'warningpanel' | 'errorpanel' | 'custompanel' | 'layout' | 'expand' | 'placeholderText' | 'datasource' | 'loom';
8
+ export type QuickInsertItemId = 'hyperlink' | 'table' | 'helpdialog' | 'date' | 'media' | 'media-insert' | 'blockquote' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'codeblock' | 'unorderedList' | 'feedbackdialog' | 'orderedList' | 'rule' | 'status' | 'mention' | 'emoji' | 'action' | 'decision' | 'infopanel' | 'notepanel' | 'successpanel' | 'warningpanel' | 'errorpanel' | 'custompanel' | 'layout' | 'expand' | 'placeholderText' | 'datasource' | 'loom' | 'onecolumnlayout' | 'twocolumnslayout' | 'threecolumnslayout' | 'fourcolumnslayout' | 'fivecolumnslayout';
9
9
  export type QuickInsertItem = TypeAheadItem & {
10
10
  /** other names used to find the item */
11
11
  keywords?: Array<string>;
@@ -1,18 +1,21 @@
1
- import { PureComponent, type ReactNode } from 'react';
1
+ import { PureComponent } from 'react';
2
2
  import type ProviderFactory from './provider-factory';
3
3
  import { type ProviderName, type Providers } from './types';
4
4
  export interface Props {
5
5
  providerFactory: ProviderFactory;
6
6
  providers: ProviderName[];
7
- renderNode: (providers: Providers) => ReactNode;
7
+ renderNode: (providers: Providers) => JSX.Element | null;
8
8
  }
9
9
  export declare class WithProviders extends PureComponent<Props, {
10
10
  providers: any;
11
11
  }> {
12
12
  static displayName: string;
13
+ mounted: boolean;
13
14
  constructor(props: Props);
15
+ componentDidMount(): void;
14
16
  UNSAFE_componentWillMount(): void;
15
17
  componentWillUnmount(): void;
18
+ handleProviderIfMounted: (name: string, provider?: Promise<any>) => void;
16
19
  handleProvider: (name: string, provider?: Promise<any>) => void;
17
- render(): ReactNode;
20
+ render(): JSX.Element | null;
18
21
  }
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function OneColumnLayoutIcon(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function OneColumnLayoutIcon(): JSX.Element;
@@ -22,6 +22,11 @@ export declare const IconPanelWarning: React.ComponentType<React.PropsWithChildr
22
22
  export declare const IconPanel: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
23
23
  export declare const IconQuote: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
24
24
  export declare const IconStatus: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
25
+ export declare const IconOneColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
26
+ export declare const IconTwoColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
27
+ export declare const IconThreeColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
28
+ export declare const IconFourColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
29
+ export declare const IconFiveColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
25
30
  type HeadingProps = IconProps & {
26
31
  level: HeadingLevels;
27
32
  };
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function OneColumnLayoutIcon(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function ThreeColumnLayoutIcon(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function TwoColumnLayoutIcon(): JSX.Element;
@@ -1,3 +1,3 @@
1
- export { IconAction, IconCode, IconDate, IconDecision, IconDivider, IconEmoji, IconImages, IconLayout, IconLink, IconListNumber, IconList, IconMention, IconPanelError, IconPanelNote, IconPanelSuccess, IconPanelWarning, IconPanel, IconQuote, IconStatus, IconHeading, IconFeedback, IconExpand, IconCustomPanel, IconFallback, IconDatasourceJiraIssue, IconDatasourceAssetsObjects, IconDatasourceConfluenceSearch, IconLoom, } from './assets';
1
+ export { IconAction, IconCode, IconDate, IconDecision, IconDivider, IconEmoji, IconImages, IconLayout, IconLink, IconListNumber, IconList, IconMention, IconPanelError, IconPanelNote, IconPanelSuccess, IconPanelWarning, IconPanel, IconQuote, IconStatus, IconHeading, IconFeedback, IconExpand, IconCustomPanel, IconFallback, IconDatasourceJiraIssue, IconDatasourceAssetsObjects, IconDatasourceConfluenceSearch, IconLoom, IconOneColumnLayout, IconTwoColumnLayout, IconThreeColumnLayout, IconFourColumnLayout, IconFiveColumnLayout, } from './assets';
2
2
  export { memoProcessQuickInsertItems, find } from './utils';
3
3
  export { messages } from './messages';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { jsx } from '@emotion/react';
3
- import type { GlyphProps } from '@atlaskit/icon/types';
3
+ import type { UNSAFE_NewCoreIconProps } from '@atlaskit/icon/types';
4
4
  export interface ButtonOptionProps {
5
5
  title: string;
6
6
  selected: boolean;
@@ -8,7 +8,8 @@ export interface ButtonOptionProps {
8
8
  disabled: boolean;
9
9
  tooltipContent?: string | null;
10
10
  onClick: () => void;
11
- icon: (props: GlyphProps) => JSX.Element;
11
+ icon: (props: Omit<UNSAFE_NewCoreIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
12
+ iconFallback: (props: Omit<UNSAFE_NewCoreIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
12
13
  }
13
14
  export interface LinkToolbarButtonGroupProps {
14
15
  options: ButtonOptionProps[];
@@ -6,20 +6,94 @@ export type OnClickCallback = ({ event, url, }: {
6
6
  url?: string;
7
7
  }) => void;
8
8
  export interface CardOptions {
9
+ /**
10
+ * A promise returning the instance of EditorCardProvider
11
+ *
12
+ * Example: Promise.resolve(new EditorCardProvider())
13
+ */
9
14
  provider?: Providers['cardProvider'];
15
+ /**
16
+ * When the URL pattern is in conflict with Smart Links and macros, macros will take priority over Smart Links.
17
+ * Specify the names of macros to allow card plugin to override the macros behaviour and converts the URL to Smart Link.
18
+ */
10
19
  resolveBeforeMacros?: string[];
20
+ /**
21
+ * A flag to determine whether editor can display Smart Link with block (Card) appearance.
22
+ * Default is true.
23
+ *
24
+ * Component: block (card)
25
+ */
11
26
  allowBlockCards?: boolean;
27
+ /**
28
+ * A flag to determine whether editor can display link datasource (Jira issues and Confluence links).
29
+ * Default is false.
30
+ *
31
+ * Component: link datasource (Jira issues, Confluence list)
32
+ */
12
33
  allowDatasource?: boolean;
34
+ /**
35
+ * A flag to determine whether editor can display Smart Link with embed appearance.
36
+ * Default is false.
37
+ *
38
+ * Component: embed
39
+ */
13
40
  allowEmbeds?: boolean;
41
+ /**
42
+ * A flag to determine whether Smart Link with embed appearance can be resized.
43
+ * Default is true.
44
+ *
45
+ * Component: embed
46
+ */
14
47
  allowResizing?: boolean;
48
+ /**
49
+ * Configure visibility of actions available.
50
+ * By default, smart links show all actions available on the views.
51
+ * Set `hide` to true to disable all actions.
52
+ * Set `hide` to false and set `exclude` to enable only specific actions.
53
+ *
54
+ * Component: inline (hover preview), block (card)
55
+ */
15
56
  actionOptions?: CardProps['actionOptions'];
57
+ /**
58
+ * By default, Smart Link with inline appearance resolving states show a frame with a spinner on the left.
59
+ * An alternative is to remove the frame and place the spinner on the right by setting this value to `on-right-without-skeleton`.
60
+ * This property is specific to inline links in the editor.
61
+ * Default is true.
62
+ *
63
+ * Component: inline
64
+ */
16
65
  useAlternativePreloader?: boolean;
66
+ /**
67
+ * A flag to display alignment options in the link toolbar on Smart Link with embed appearance.
68
+ * Default is true.
69
+ *
70
+ * Component: embed
71
+ */
17
72
  allowAlignment?: boolean;
73
+ /**
74
+ * A flag to display wrapping options in the link toolbar on Smart Link with embed appearance.
75
+ * Default is true.
76
+ *
77
+ * Component: embed
78
+ */
18
79
  allowWrapping?: boolean;
80
+ /**
81
+ * A flag to display Smart Link upgrade discovery.
82
+ * Default is true.
83
+ *
84
+ * Component: link toolbar
85
+ */
19
86
  showUpgradeDiscoverability?: boolean;
87
+ /**
88
+ * A callback to determine the link click behaviour.
89
+ *
90
+ * Component: inline, block (card), embed
91
+ */
20
92
  onClickCallback?: OnClickCallback;
21
93
  /**
22
94
  * Customises the outbound link to configure user preferences
95
+ *
96
+ * Component: link toolbar
23
97
  */
24
98
  userPreferencesLink?: string;
25
99
  }
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconCard: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconCard: (props: Omit<UNSAFE_NewIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconEmbed: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconEmbed: (props: Omit<UNSAFE_NewIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconInline: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconInline: (props: Omit<UNSAFE_NewIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconUrl: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewCoreIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconUrl: (props: Omit<UNSAFE_NewCoreIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -164,6 +164,26 @@ export declare const toolbarInsertBlockMessages: {
164
164
  defaultMessage: string;
165
165
  description: string;
166
166
  };
167
+ twoColumns: {
168
+ id: string;
169
+ defaultMessage: string;
170
+ description: string;
171
+ };
172
+ threeColumns: {
173
+ id: string;
174
+ defaultMessage: string;
175
+ description: string;
176
+ };
177
+ fourColumns: {
178
+ id: string;
179
+ defaultMessage: string;
180
+ description: string;
181
+ };
182
+ fiveColumns: {
183
+ id: string;
184
+ defaultMessage: string;
185
+ description: string;
186
+ };
167
187
  columnsDescription: {
168
188
  id: string;
169
189
  defaultMessage: string;
@@ -9,7 +9,7 @@ export default class ProviderFactory {
9
9
  isEmpty(): boolean;
10
10
  setProvider<T extends ProviderName>(name: T, provider?: ProviderType<T>): void;
11
11
  removeProvider<T extends string>(name: T | ProviderName): void;
12
- subscribe<T extends string>(name: T, handler: ProviderHandler<typeof name>): void;
12
+ subscribe<T extends string>(name: T, handler: ProviderHandler<typeof name>): ProviderType<T> | undefined;
13
13
  unsubscribe<T extends string>(name: T, handler: ProviderHandler<typeof name>): void;
14
14
  unsubscribeAll<T extends string>(name: T | ProviderName): void;
15
15
  hasProvider<T extends string>(name: T | ProviderName): boolean;
@@ -5,7 +5,7 @@ import type { TypeAheadItem } from '../types/type-ahead';
5
5
  export type QuickInsertActionInsert = (node?: Node | Record<string, any> | string, opts?: {
6
6
  selectInlineNode?: boolean;
7
7
  }) => Transaction;
8
- export type QuickInsertItemId = 'hyperlink' | 'table' | 'helpdialog' | 'date' | 'media' | 'media-insert' | 'blockquote' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'codeblock' | 'unorderedList' | 'feedbackdialog' | 'orderedList' | 'rule' | 'status' | 'mention' | 'emoji' | 'action' | 'decision' | 'infopanel' | 'notepanel' | 'successpanel' | 'warningpanel' | 'errorpanel' | 'custompanel' | 'layout' | 'expand' | 'placeholderText' | 'datasource' | 'loom';
8
+ export type QuickInsertItemId = 'hyperlink' | 'table' | 'helpdialog' | 'date' | 'media' | 'media-insert' | 'blockquote' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'codeblock' | 'unorderedList' | 'feedbackdialog' | 'orderedList' | 'rule' | 'status' | 'mention' | 'emoji' | 'action' | 'decision' | 'infopanel' | 'notepanel' | 'successpanel' | 'warningpanel' | 'errorpanel' | 'custompanel' | 'layout' | 'expand' | 'placeholderText' | 'datasource' | 'loom' | 'onecolumnlayout' | 'twocolumnslayout' | 'threecolumnslayout' | 'fourcolumnslayout' | 'fivecolumnslayout';
9
9
  export type QuickInsertItem = TypeAheadItem & {
10
10
  /** other names used to find the item */
11
11
  keywords?: Array<string>;
@@ -1,18 +1,21 @@
1
- import { PureComponent, type ReactNode } from 'react';
1
+ import { PureComponent } from 'react';
2
2
  import type ProviderFactory from './provider-factory';
3
3
  import { type ProviderName, type Providers } from './types';
4
4
  export interface Props {
5
5
  providerFactory: ProviderFactory;
6
6
  providers: ProviderName[];
7
- renderNode: (providers: Providers) => ReactNode;
7
+ renderNode: (providers: Providers) => JSX.Element | null;
8
8
  }
9
9
  export declare class WithProviders extends PureComponent<Props, {
10
10
  providers: any;
11
11
  }> {
12
12
  static displayName: string;
13
+ mounted: boolean;
13
14
  constructor(props: Props);
15
+ componentDidMount(): void;
14
16
  UNSAFE_componentWillMount(): void;
15
17
  componentWillUnmount(): void;
18
+ handleProviderIfMounted: (name: string, provider?: Promise<any>) => void;
16
19
  handleProvider: (name: string, provider?: Promise<any>) => void;
17
- render(): ReactNode;
20
+ render(): JSX.Element | null;
18
21
  }
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function OneColumnLayoutIcon(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function OneColumnLayoutIcon(): JSX.Element;
@@ -22,6 +22,11 @@ export declare const IconPanelWarning: React.ComponentType<React.PropsWithChildr
22
22
  export declare const IconPanel: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
23
23
  export declare const IconQuote: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
24
24
  export declare const IconStatus: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
25
+ export declare const IconOneColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
26
+ export declare const IconTwoColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
27
+ export declare const IconThreeColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
28
+ export declare const IconFourColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
29
+ export declare const IconFiveColumnLayout: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
25
30
  type HeadingProps = IconProps & {
26
31
  level: HeadingLevels;
27
32
  };