@atlaskit/editor-plugin-panel 20.0.10 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/editor-plugin-panel
2
2
 
3
+ ## 21.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 20.0.11
10
+
11
+ ### Patch Changes
12
+
13
+ - [`88fb7a8d4013a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88fb7a8d4013a) -
14
+ [ux] Add optional light and dark preview URLs to slash-command menu items and pass theme-aware
15
+ previews to supported commands when the `platform_editor_slash_command` experiment is enabled.
16
+ - Updated dependencies
17
+
3
18
  ## 20.0.10
4
19
 
5
20
  ### Patch Changes
@@ -28,6 +28,7 @@ var PanelQuickInsertMenuItem = exports.PanelQuickInsertMenuItem = function Panel
28
28
  var api = _ref.api,
29
29
  Icon = _ref.icon,
30
30
  panelType = _ref.panelType,
31
+ previewImageUrls = _ref.previewImageUrls,
31
32
  title = _ref.title;
32
33
  var _useIntl = (0, _reactIntl.useIntl)(),
33
34
  formatMessage = _useIntl.formatMessage;
@@ -48,6 +49,7 @@ var PanelQuickInsertMenuItem = exports.PanelQuickInsertMenuItem = function Panel
48
49
  label: ""
49
50
  }),
50
51
  onSelect: onSelect,
52
+ previewImageUrls: previewImageUrls,
51
53
  title: formatMessage(title)
52
54
  });
53
55
  };
@@ -25,12 +25,20 @@ var standardPanelItems = [{
25
25
  keywords: ['panel'],
26
26
  menuItem: _keys.INFO_PANEL_MENU_ITEM,
27
27
  panelType: _panel.PanelType.INFO,
28
+ previewImageUrls: {
29
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/1ehbcks76dadn6s1ag865ovgv0725wf3.png',
30
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/sj4h840me816r662ei5r630c56mrs7r3.png'
31
+ },
28
32
  title: _messages.blockTypeMessages.infoPanel
29
33
  }, {
30
34
  description: _messages.blockTypeMessages.notePanelDescription,
31
35
  icon: _note.default,
32
36
  menuItem: _keys.NOTE_PANEL_MENU_ITEM,
33
37
  panelType: _panel.PanelType.NOTE,
38
+ previewImageUrls: {
39
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/248377u2ho62u47324ytqoh85dqha007.png',
40
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/h60803y651s373xi527m1g77h0yfc10m.png'
41
+ },
34
42
  title: _messages.blockTypeMessages.notePanel
35
43
  }, {
36
44
  description: _messages.blockTypeMessages.successPanelDescription,
@@ -38,18 +46,30 @@ var standardPanelItems = [{
38
46
  keywords: ['tip'],
39
47
  menuItem: _keys.SUCCESS_PANEL_MENU_ITEM,
40
48
  panelType: _panel.PanelType.SUCCESS,
49
+ previewImageUrls: {
50
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/hsw851w22c21u6ax4t5fiuyb03yhvs16.png',
51
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/wd47nv4tx2i1241dsnyv5j50hgibquo2.png'
52
+ },
41
53
  title: _messages.blockTypeMessages.successPanel
42
54
  }, {
43
55
  description: _messages.blockTypeMessages.warningPanelDescription,
44
56
  icon: _warningOutline.default,
45
57
  menuItem: _keys.WARNING_PANEL_MENU_ITEM,
46
58
  panelType: _panel.PanelType.WARNING,
59
+ previewImageUrls: {
60
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/54op86o010736t82k472108al33sm3hl.png',
61
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/1058288r80467lk7vg0ymq8yp0fs42ws.png'
62
+ },
47
63
  title: _messages.blockTypeMessages.warningPanel
48
64
  }, {
49
65
  description: _messages.blockTypeMessages.errorPanelDescription,
50
66
  icon: _statusWorkflowCancelled.default,
51
67
  menuItem: _keys.ERROR_PANEL_MENU_ITEM,
52
68
  panelType: _panel.PanelType.ERROR,
69
+ previewImageUrls: {
70
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/526333021m38g0ndel1s4ljcma4ce2s0.png',
71
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/c15gpkb25ds3078i0n8dp8k6o1io173f.png'
72
+ },
53
73
  title: _messages.blockTypeMessages.errorPanel
54
74
  }];
55
75
  var customPanelItem = {
@@ -57,6 +77,10 @@ var customPanelItem = {
57
77
  icon: _pencil.default,
58
78
  menuItem: _keys.CUSTOM_PANEL_MENU_ITEM,
59
79
  panelType: _panel.PanelType.CUSTOM,
80
+ previewImageUrls: {
81
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/kt0aor1ut1h72isq432188hmbs3du1l0.png',
82
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/f2m032ds3s1t81m362bp10ni7h8604xn.png'
83
+ },
60
84
  title: _messages.blockTypeMessages.customPanel
61
85
  };
62
86
  var getPanelQuickInsertComponents = exports.getPanelQuickInsertComponents = function getPanelQuickInsertComponents(_ref) {
@@ -70,6 +94,7 @@ var getPanelQuickInsertComponents = exports.getPanelQuickInsertComponents = func
70
94
  keywords = _ref2.keywords,
71
95
  menuItem = _ref2.menuItem,
72
96
  panelType = _ref2.panelType,
97
+ previewImageUrls = _ref2.previewImageUrls,
73
98
  title = _ref2.title;
74
99
  return {
75
100
  key: menuItem.key,
@@ -92,6 +117,7 @@ var getPanelQuickInsertComponents = exports.getPanelQuickInsertComponents = func
92
117
  api: api,
93
118
  icon: icon,
94
119
  panelType: panelType,
120
+ previewImageUrls: previewImageUrls,
95
121
  title: title
96
122
  });
97
123
  }
@@ -18,6 +18,7 @@ export const PanelQuickInsertMenuItem = ({
18
18
  api,
19
19
  icon: Icon,
20
20
  panelType,
21
+ previewImageUrls,
21
22
  title
22
23
  }) => {
23
24
  const {
@@ -39,6 +40,7 @@ export const PanelQuickInsertMenuItem = ({
39
40
  label: ""
40
41
  }),
41
42
  onSelect: onSelect,
43
+ previewImageUrls: previewImageUrls,
42
44
  title: formatMessage(title)
43
45
  });
44
46
  };
@@ -17,12 +17,20 @@ const standardPanelItems = [{
17
17
  keywords: ['panel'],
18
18
  menuItem: INFO_PANEL_MENU_ITEM,
19
19
  panelType: PanelType.INFO,
20
+ previewImageUrls: {
21
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/1ehbcks76dadn6s1ag865ovgv0725wf3.png',
22
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/sj4h840me816r662ei5r630c56mrs7r3.png'
23
+ },
20
24
  title: blockTypeMessages.infoPanel
21
25
  }, {
22
26
  description: blockTypeMessages.notePanelDescription,
23
27
  icon: NoteIcon,
24
28
  menuItem: NOTE_PANEL_MENU_ITEM,
25
29
  panelType: PanelType.NOTE,
30
+ previewImageUrls: {
31
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/248377u2ho62u47324ytqoh85dqha007.png',
32
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/h60803y651s373xi527m1g77h0yfc10m.png'
33
+ },
26
34
  title: blockTypeMessages.notePanel
27
35
  }, {
28
36
  description: blockTypeMessages.successPanelDescription,
@@ -30,18 +38,30 @@ const standardPanelItems = [{
30
38
  keywords: ['tip'],
31
39
  menuItem: SUCCESS_PANEL_MENU_ITEM,
32
40
  panelType: PanelType.SUCCESS,
41
+ previewImageUrls: {
42
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/hsw851w22c21u6ax4t5fiuyb03yhvs16.png',
43
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/wd47nv4tx2i1241dsnyv5j50hgibquo2.png'
44
+ },
33
45
  title: blockTypeMessages.successPanel
34
46
  }, {
35
47
  description: blockTypeMessages.warningPanelDescription,
36
48
  icon: WarningOutlineIcon,
37
49
  menuItem: WARNING_PANEL_MENU_ITEM,
38
50
  panelType: PanelType.WARNING,
51
+ previewImageUrls: {
52
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/54op86o010736t82k472108al33sm3hl.png',
53
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/1058288r80467lk7vg0ymq8yp0fs42ws.png'
54
+ },
39
55
  title: blockTypeMessages.warningPanel
40
56
  }, {
41
57
  description: blockTypeMessages.errorPanelDescription,
42
58
  icon: StatusWorkflowCancelledIcon,
43
59
  menuItem: ERROR_PANEL_MENU_ITEM,
44
60
  panelType: PanelType.ERROR,
61
+ previewImageUrls: {
62
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/526333021m38g0ndel1s4ljcma4ce2s0.png',
63
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/c15gpkb25ds3078i0n8dp8k6o1io173f.png'
64
+ },
45
65
  title: blockTypeMessages.errorPanel
46
66
  }];
47
67
  const customPanelItem = {
@@ -49,6 +69,10 @@ const customPanelItem = {
49
69
  icon: PencilIcon,
50
70
  menuItem: CUSTOM_PANEL_MENU_ITEM,
51
71
  panelType: PanelType.CUSTOM,
72
+ previewImageUrls: {
73
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/kt0aor1ut1h72isq432188hmbs3du1l0.png',
74
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/f2m032ds3s1t81m362bp10ni7h8604xn.png'
75
+ },
52
76
  title: blockTypeMessages.customPanel
53
77
  };
54
78
  export const getPanelQuickInsertComponents = ({
@@ -63,6 +87,7 @@ export const getPanelQuickInsertComponents = ({
63
87
  keywords,
64
88
  menuItem,
65
89
  panelType,
90
+ previewImageUrls,
66
91
  title
67
92
  }) => ({
68
93
  key: menuItem.key,
@@ -83,6 +108,7 @@ export const getPanelQuickInsertComponents = ({
83
108
  api: api,
84
109
  icon: icon,
85
110
  panelType: panelType,
111
+ previewImageUrls: previewImageUrls,
86
112
  title: title
87
113
  })
88
114
  }));
@@ -20,6 +20,7 @@ export var PanelQuickInsertMenuItem = function PanelQuickInsertMenuItem(_ref) {
20
20
  var api = _ref.api,
21
21
  Icon = _ref.icon,
22
22
  panelType = _ref.panelType,
23
+ previewImageUrls = _ref.previewImageUrls,
23
24
  title = _ref.title;
24
25
  var _useIntl = useIntl(),
25
26
  formatMessage = _useIntl.formatMessage;
@@ -40,6 +41,7 @@ export var PanelQuickInsertMenuItem = function PanelQuickInsertMenuItem(_ref) {
40
41
  label: ""
41
42
  }),
42
43
  onSelect: onSelect,
44
+ previewImageUrls: previewImageUrls,
43
45
  title: formatMessage(title)
44
46
  });
45
47
  };
@@ -18,12 +18,20 @@ var standardPanelItems = [{
18
18
  keywords: ['panel'],
19
19
  menuItem: INFO_PANEL_MENU_ITEM,
20
20
  panelType: PanelType.INFO,
21
+ previewImageUrls: {
22
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/1ehbcks76dadn6s1ag865ovgv0725wf3.png',
23
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/sj4h840me816r662ei5r630c56mrs7r3.png'
24
+ },
21
25
  title: blockTypeMessages.infoPanel
22
26
  }, {
23
27
  description: blockTypeMessages.notePanelDescription,
24
28
  icon: NoteIcon,
25
29
  menuItem: NOTE_PANEL_MENU_ITEM,
26
30
  panelType: PanelType.NOTE,
31
+ previewImageUrls: {
32
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/248377u2ho62u47324ytqoh85dqha007.png',
33
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/h60803y651s373xi527m1g77h0yfc10m.png'
34
+ },
27
35
  title: blockTypeMessages.notePanel
28
36
  }, {
29
37
  description: blockTypeMessages.successPanelDescription,
@@ -31,18 +39,30 @@ var standardPanelItems = [{
31
39
  keywords: ['tip'],
32
40
  menuItem: SUCCESS_PANEL_MENU_ITEM,
33
41
  panelType: PanelType.SUCCESS,
42
+ previewImageUrls: {
43
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/hsw851w22c21u6ax4t5fiuyb03yhvs16.png',
44
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/wd47nv4tx2i1241dsnyv5j50hgibquo2.png'
45
+ },
34
46
  title: blockTypeMessages.successPanel
35
47
  }, {
36
48
  description: blockTypeMessages.warningPanelDescription,
37
49
  icon: WarningOutlineIcon,
38
50
  menuItem: WARNING_PANEL_MENU_ITEM,
39
51
  panelType: PanelType.WARNING,
52
+ previewImageUrls: {
53
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/54op86o010736t82k472108al33sm3hl.png',
54
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/1058288r80467lk7vg0ymq8yp0fs42ws.png'
55
+ },
40
56
  title: blockTypeMessages.warningPanel
41
57
  }, {
42
58
  description: blockTypeMessages.errorPanelDescription,
43
59
  icon: StatusWorkflowCancelledIcon,
44
60
  menuItem: ERROR_PANEL_MENU_ITEM,
45
61
  panelType: PanelType.ERROR,
62
+ previewImageUrls: {
63
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/526333021m38g0ndel1s4ljcma4ce2s0.png',
64
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/c15gpkb25ds3078i0n8dp8k6o1io173f.png'
65
+ },
46
66
  title: blockTypeMessages.errorPanel
47
67
  }];
48
68
  var customPanelItem = {
@@ -50,6 +70,10 @@ var customPanelItem = {
50
70
  icon: PencilIcon,
51
71
  menuItem: CUSTOM_PANEL_MENU_ITEM,
52
72
  panelType: PanelType.CUSTOM,
73
+ previewImageUrls: {
74
+ light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/kt0aor1ut1h72isq432188hmbs3du1l0.png',
75
+ dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/f2m032ds3s1t81m362bp10ni7h8604xn.png'
76
+ },
53
77
  title: blockTypeMessages.customPanel
54
78
  };
55
79
  export var getPanelQuickInsertComponents = function getPanelQuickInsertComponents(_ref) {
@@ -63,6 +87,7 @@ export var getPanelQuickInsertComponents = function getPanelQuickInsertComponent
63
87
  keywords = _ref2.keywords,
64
88
  menuItem = _ref2.menuItem,
65
89
  panelType = _ref2.panelType,
90
+ previewImageUrls = _ref2.previewImageUrls,
66
91
  title = _ref2.title;
67
92
  return {
68
93
  key: menuItem.key,
@@ -85,6 +110,7 @@ export var getPanelQuickInsertComponents = function getPanelQuickInsertComponent
85
110
  api: api,
86
111
  icon: icon,
87
112
  panelType: panelType,
113
+ previewImageUrls: previewImageUrls,
88
114
  title: title
89
115
  });
90
116
  }
@@ -1,14 +1,16 @@
1
1
  import React from 'react';
2
2
  import type { MessageDescriptor } from 'react-intl';
3
3
  import { PanelType } from '@atlaskit/adf-schema/panel';
4
+ import { type QuickInsertMenuItemProps } from '@atlaskit/editor-common/quick-insert/menu-item';
4
5
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
6
  import type { PanelPlugin } from '../../panelPluginType';
6
7
  export type QuickInsertPanelType = Exclude<PanelType, PanelType.TIP>;
7
- export declare const PanelQuickInsertMenuItem: ({ api, icon: Icon, panelType, title, }: {
8
+ export declare const PanelQuickInsertMenuItem: ({ api, icon: Icon, panelType, previewImageUrls, title, }: {
8
9
  api: ExtractInjectionAPI<PanelPlugin> | undefined;
9
10
  icon: React.ComponentType<{
10
11
  label: string;
11
12
  }>;
12
13
  panelType: QuickInsertPanelType;
14
+ previewImageUrls?: QuickInsertMenuItemProps['previewImageUrls'];
13
15
  title: MessageDescriptor;
14
16
  }) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "20.0.10",
3
+ "version": "21.0.0",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -21,14 +21,14 @@
21
21
  "dependencies": {
22
22
  "@atlaskit/adf-schema": "^57.5.0",
23
23
  "@atlaskit/editor-palette": "^3.5.0",
24
- "@atlaskit/editor-plugin-analytics": "^18.0.0",
25
- "@atlaskit/editor-plugin-block-menu": "^17.0.0",
26
- "@atlaskit/editor-plugin-decorations": "^18.0.0",
27
- "@atlaskit/editor-plugin-emoji": "^19.1.0",
28
- "@atlaskit/editor-plugin-selection": "^18.0.0",
29
- "@atlaskit/editor-plugin-toolbar": "^15.0.0",
30
- "@atlaskit/editor-plugin-ui-control-registry": "^12.0.0",
31
- "@atlaskit/editor-prosemirror": "^8.0.0",
24
+ "@atlaskit/editor-plugin-analytics": "^19.0.0",
25
+ "@atlaskit/editor-plugin-block-menu": "^18.0.0",
26
+ "@atlaskit/editor-plugin-decorations": "^19.0.0",
27
+ "@atlaskit/editor-plugin-emoji": "^20.0.0",
28
+ "@atlaskit/editor-plugin-selection": "^19.0.0",
29
+ "@atlaskit/editor-plugin-toolbar": "^16.0.0",
30
+ "@atlaskit/editor-plugin-ui-control-registry": "^13.0.0",
31
+ "@atlaskit/editor-prosemirror": "^9.0.0",
32
32
  "@atlaskit/editor-shared-styles": "^4.3.0",
33
33
  "@atlaskit/editor-toolbar": "^2.6.0",
34
34
  "@atlaskit/editor-ui-control-model": "^2.9.0",
@@ -37,13 +37,13 @@
37
37
  "@atlaskit/icon-lab": "^7.9.0",
38
38
  "@atlaskit/platform-feature-experiments": "^0.3.0",
39
39
  "@atlaskit/platform-feature-flags": "^2.2.0",
40
- "@atlaskit/tmp-editor-statsig": "^198.0.0",
41
- "@atlaskit/tokens": "^17.0.0",
40
+ "@atlaskit/tmp-editor-statsig": "^199.0.0",
41
+ "@atlaskit/tokens": "^18.2.0",
42
42
  "@babel/runtime": "^7.0.0",
43
43
  "uuid": "^11.1.1"
44
44
  },
45
45
  "peerDependencies": {
46
- "@atlaskit/editor-common": "^122.10.0",
46
+ "@atlaskit/editor-common": "^123.0.0",
47
47
  "react": "^18.2.0 || ^19.2.0",
48
48
  "react-dom": "^18.2.0 || ^19.2.0",
49
49
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"