@atlaskit/editor-plugin-help-dialog 24.0.3 → 25.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 +18 -0
- package/dist/cjs/ui/formatting.js +12 -29
- package/dist/es2019/ui/formatting.js +1 -13
- package/dist/esm/ui/formatting.js +12 -29
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-help-dialog
|
|
2
2
|
|
|
3
|
+
## 25.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 24.0.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`0a81f6fa7cbf8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0a81f6fa7cbf8) -
|
|
14
|
+
Clean up experiment `platform_editor_breakout_resizing`. Behind the
|
|
15
|
+
`platform_editor_list_join_strip_breakout` experiment, strip the breakout mark from a code block
|
|
16
|
+
before nesting it into a list item when joining from a gap cursor. Behind the
|
|
17
|
+
`platform_editor_resizer_selector_jsdom_fix` experiment, make the panel and rule breakout resizer
|
|
18
|
+
selectors parseable by jsdom (`> *[data-prosemirror-node-name=…]`).
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 24.0.3
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -12,7 +12,6 @@ var _browser = require("@atlaskit/editor-common/browser");
|
|
|
12
12
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
13
13
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
14
|
var _primitives = require("@atlaskit/primitives");
|
|
15
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
16
15
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
16
|
var _styles = require("./styles");
|
|
18
17
|
/**
|
|
@@ -599,24 +598,8 @@ var otherFormatting = function otherFormatting(_ref4) {
|
|
|
599
598
|
}
|
|
600
599
|
}]);
|
|
601
600
|
};
|
|
602
|
-
var
|
|
601
|
+
var newResizeInformationFormatting = function newResizeInformationFormatting(_ref5) {
|
|
603
602
|
var formatMessage = _ref5.formatMessage;
|
|
604
|
-
return [{
|
|
605
|
-
name: formatMessage(_messages.helpDialogMessages.increaseSize),
|
|
606
|
-
type: 'media',
|
|
607
|
-
keymap: function keymap() {
|
|
608
|
-
return _keymaps.increaseMediaSize;
|
|
609
|
-
}
|
|
610
|
-
}, {
|
|
611
|
-
name: formatMessage(_messages.helpDialogMessages.decreaseSize),
|
|
612
|
-
type: 'media',
|
|
613
|
-
keymap: function keymap() {
|
|
614
|
-
return _keymaps.decreaseMediaSize;
|
|
615
|
-
}
|
|
616
|
-
}];
|
|
617
|
-
};
|
|
618
|
-
var newResizeInformationFormatting = function newResizeInformationFormatting(_ref6) {
|
|
619
|
-
var formatMessage = _ref6.formatMessage;
|
|
620
603
|
return [{
|
|
621
604
|
name: formatMessage(_messages.helpDialogMessages.increaseElementSize),
|
|
622
605
|
type: 'media',
|
|
@@ -631,8 +614,8 @@ var newResizeInformationFormatting = function newResizeInformationFormatting(_re
|
|
|
631
614
|
}
|
|
632
615
|
}];
|
|
633
616
|
};
|
|
634
|
-
var focusTableResizeHandleFormatting = function focusTableResizeHandleFormatting(
|
|
635
|
-
var formatMessage =
|
|
617
|
+
var focusTableResizeHandleFormatting = function focusTableResizeHandleFormatting(_ref6) {
|
|
618
|
+
var formatMessage = _ref6.formatMessage;
|
|
636
619
|
return [{
|
|
637
620
|
name: formatMessage(_messages.helpDialogMessages.focusTableResizeHandle),
|
|
638
621
|
type: 'navigation',
|
|
@@ -645,8 +628,8 @@ var focusTableResizeHandleFormatting = function focusTableResizeHandleFormatting
|
|
|
645
628
|
// 'navigation' is used as the type for these entries because Format.type is designed to match ADF
|
|
646
629
|
// schema node/mark names — these shortcuts have no corresponding ADF type, so 'navigation' acts as
|
|
647
630
|
// a catch-all that passes the schema filter and routes entries to the keyboard shortcuts column in the UI.
|
|
648
|
-
var blockControlsShortcutsFormatting = function blockControlsShortcutsFormatting(
|
|
649
|
-
var formatMessage =
|
|
631
|
+
var blockControlsShortcutsFormatting = function blockControlsShortcutsFormatting(_ref7) {
|
|
632
|
+
var formatMessage = _ref7.formatMessage;
|
|
650
633
|
return [{
|
|
651
634
|
name: formatMessage(_messages.helpDialogMessages.selectDragHandle),
|
|
652
635
|
type: 'navigation',
|
|
@@ -679,8 +662,8 @@ var blockControlsShortcutsFormatting = function blockControlsShortcutsFormatting
|
|
|
679
662
|
}
|
|
680
663
|
}];
|
|
681
664
|
};
|
|
682
|
-
var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(
|
|
683
|
-
var formatMessage =
|
|
665
|
+
var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(_ref8) {
|
|
666
|
+
var formatMessage = _ref8.formatMessage;
|
|
684
667
|
return [{
|
|
685
668
|
name: formatMessage(_messages.tableMessages.moveColumnLeftHelpDialogLabel),
|
|
686
669
|
type: 'table',
|
|
@@ -707,8 +690,8 @@ var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(_ref9)
|
|
|
707
690
|
}
|
|
708
691
|
}];
|
|
709
692
|
};
|
|
710
|
-
var openCellOptionsFormattingtoFormat = function openCellOptionsFormattingtoFormat(
|
|
711
|
-
var formatMessage =
|
|
693
|
+
var openCellOptionsFormattingtoFormat = function openCellOptionsFormattingtoFormat(_ref9) {
|
|
694
|
+
var formatMessage = _ref9.formatMessage;
|
|
712
695
|
return [{
|
|
713
696
|
name: formatMessage(_messages.helpDialogMessages.openCellOptions),
|
|
714
697
|
type: 'image',
|
|
@@ -730,8 +713,8 @@ var imageAutoFormat = {
|
|
|
730
713
|
, _messages.helpDialogMessages.altText), "](http://www.image.com)"));
|
|
731
714
|
}
|
|
732
715
|
};
|
|
733
|
-
var quickInsertAutoFormat = function quickInsertAutoFormat(
|
|
734
|
-
var formatMessage =
|
|
716
|
+
var quickInsertAutoFormat = function quickInsertAutoFormat(_ref0) {
|
|
717
|
+
var formatMessage = _ref0.formatMessage;
|
|
735
718
|
return {
|
|
736
719
|
name: formatMessage(_messages.helpDialogMessages.quickInsert),
|
|
737
720
|
type: 'quickInsert',
|
|
@@ -747,5 +730,5 @@ var getSupportedFormatting = exports.getSupportedFormatting = function getSuppor
|
|
|
747
730
|
var supportedBySchema = formatting(intl).filter(function (format) {
|
|
748
731
|
return schema.nodes[format.type] || schema.marks[format.type];
|
|
749
732
|
});
|
|
750
|
-
return [].concat((0, _toConsumableArray2.default)(aiEnabled ? [quickInsertAskAI(intl)] : []), (0, _toConsumableArray2.default)(navigationKeymaps(intl)), (0, _toConsumableArray2.default)(otherFormatting(intl)), (0, _toConsumableArray2.default)(supportedBySchema), (0, _toConsumableArray2.default)(blockControlsShortcutsFormatting(intl)), (0, _toConsumableArray2.default)(imageEnabled ? [imageAutoFormat] : []), (0, _toConsumableArray2.default)(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), (0, _toConsumableArray2.default)(focusTableResizeHandleFormatting(intl)), (0, _toConsumableArray2.default)(
|
|
733
|
+
return [].concat((0, _toConsumableArray2.default)(aiEnabled ? [quickInsertAskAI(intl)] : []), (0, _toConsumableArray2.default)(navigationKeymaps(intl)), (0, _toConsumableArray2.default)(otherFormatting(intl)), (0, _toConsumableArray2.default)(supportedBySchema), (0, _toConsumableArray2.default)(blockControlsShortcutsFormatting(intl)), (0, _toConsumableArray2.default)(imageEnabled ? [imageAutoFormat] : []), (0, _toConsumableArray2.default)(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), (0, _toConsumableArray2.default)(focusTableResizeHandleFormatting(intl)), (0, _toConsumableArray2.default)(newResizeInformationFormatting(intl)), (0, _toConsumableArray2.default)(openCellOptionsFormattingtoFormat(intl)), (0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('editor-a11y-fy26-keyboard-move-row-column', 'isEnabled', true) ? moveTableRowColumnFormatting(intl) : []));
|
|
751
734
|
};
|
|
@@ -10,7 +10,6 @@ import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, askAIQui
|
|
|
10
10
|
import { alignmentMessages, annotationMessages, blockTypeMessages, listMessages, helpDialogMessages as messages, tableMessages, toolbarInsertBlockMessages, toolbarMessages, undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
12
12
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
13
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
14
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
14
|
import { shortcutsArray } from './styles';
|
|
16
15
|
const codeSm = xcss({
|
|
@@ -466,17 +465,6 @@ const otherFormatting = ({
|
|
|
466
465
|
keymap: () => toggleHighlightPalette
|
|
467
466
|
}];
|
|
468
467
|
};
|
|
469
|
-
const resizeInformationFormatting = ({
|
|
470
|
-
formatMessage
|
|
471
|
-
}) => [{
|
|
472
|
-
name: formatMessage(messages.increaseSize),
|
|
473
|
-
type: 'media',
|
|
474
|
-
keymap: () => increaseMediaSize
|
|
475
|
-
}, {
|
|
476
|
-
name: formatMessage(messages.decreaseSize),
|
|
477
|
-
type: 'media',
|
|
478
|
-
keymap: () => decreaseMediaSize
|
|
479
|
-
}];
|
|
480
468
|
const newResizeInformationFormatting = ({
|
|
481
469
|
formatMessage
|
|
482
470
|
}) => [{
|
|
@@ -571,5 +559,5 @@ const quickInsertAutoFormat = ({
|
|
|
571
559
|
});
|
|
572
560
|
export const getSupportedFormatting = (schema, intl, imageEnabled, quickInsertEnabled, aiEnabled) => {
|
|
573
561
|
const supportedBySchema = formatting(intl).filter(format => schema.nodes[format.type] || schema.marks[format.type]);
|
|
574
|
-
return [...(aiEnabled ? [quickInsertAskAI(intl)] : []), ...navigationKeymaps(intl), ...otherFormatting(intl), ...supportedBySchema, ...blockControlsShortcutsFormatting(intl), ...(imageEnabled ? [imageAutoFormat] : []), ...(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), ...focusTableResizeHandleFormatting(intl), ...
|
|
562
|
+
return [...(aiEnabled ? [quickInsertAskAI(intl)] : []), ...navigationKeymaps(intl), ...otherFormatting(intl), ...supportedBySchema, ...blockControlsShortcutsFormatting(intl), ...(imageEnabled ? [imageAutoFormat] : []), ...(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), ...focusTableResizeHandleFormatting(intl), ...newResizeInformationFormatting(intl), ...openCellOptionsFormattingtoFormat(intl), ...(expValEquals('editor-a11y-fy26-keyboard-move-row-column', 'isEnabled', true) ? moveTableRowColumnFormatting(intl) : [])];
|
|
575
563
|
};
|
|
@@ -11,7 +11,6 @@ import { addInlineComment, addLink, alignCenter, alignLeft, alignRight, askAIQui
|
|
|
11
11
|
import { alignmentMessages, annotationMessages, blockTypeMessages, listMessages, helpDialogMessages as messages, tableMessages, toolbarInsertBlockMessages, toolbarMessages, undoRedoMessages } from '@atlaskit/editor-common/messages';
|
|
12
12
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
13
13
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
14
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
15
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
15
|
import { shortcutsArray } from './styles';
|
|
17
16
|
var codeSm = xcss({
|
|
@@ -590,24 +589,8 @@ var otherFormatting = function otherFormatting(_ref4) {
|
|
|
590
589
|
}
|
|
591
590
|
}]);
|
|
592
591
|
};
|
|
593
|
-
var
|
|
592
|
+
var newResizeInformationFormatting = function newResizeInformationFormatting(_ref5) {
|
|
594
593
|
var formatMessage = _ref5.formatMessage;
|
|
595
|
-
return [{
|
|
596
|
-
name: formatMessage(messages.increaseSize),
|
|
597
|
-
type: 'media',
|
|
598
|
-
keymap: function keymap() {
|
|
599
|
-
return increaseMediaSize;
|
|
600
|
-
}
|
|
601
|
-
}, {
|
|
602
|
-
name: formatMessage(messages.decreaseSize),
|
|
603
|
-
type: 'media',
|
|
604
|
-
keymap: function keymap() {
|
|
605
|
-
return decreaseMediaSize;
|
|
606
|
-
}
|
|
607
|
-
}];
|
|
608
|
-
};
|
|
609
|
-
var newResizeInformationFormatting = function newResizeInformationFormatting(_ref6) {
|
|
610
|
-
var formatMessage = _ref6.formatMessage;
|
|
611
594
|
return [{
|
|
612
595
|
name: formatMessage(messages.increaseElementSize),
|
|
613
596
|
type: 'media',
|
|
@@ -622,8 +605,8 @@ var newResizeInformationFormatting = function newResizeInformationFormatting(_re
|
|
|
622
605
|
}
|
|
623
606
|
}];
|
|
624
607
|
};
|
|
625
|
-
var focusTableResizeHandleFormatting = function focusTableResizeHandleFormatting(
|
|
626
|
-
var formatMessage =
|
|
608
|
+
var focusTableResizeHandleFormatting = function focusTableResizeHandleFormatting(_ref6) {
|
|
609
|
+
var formatMessage = _ref6.formatMessage;
|
|
627
610
|
return [{
|
|
628
611
|
name: formatMessage(messages.focusTableResizeHandle),
|
|
629
612
|
type: 'navigation',
|
|
@@ -636,8 +619,8 @@ var focusTableResizeHandleFormatting = function focusTableResizeHandleFormatting
|
|
|
636
619
|
// 'navigation' is used as the type for these entries because Format.type is designed to match ADF
|
|
637
620
|
// schema node/mark names — these shortcuts have no corresponding ADF type, so 'navigation' acts as
|
|
638
621
|
// a catch-all that passes the schema filter and routes entries to the keyboard shortcuts column in the UI.
|
|
639
|
-
var blockControlsShortcutsFormatting = function blockControlsShortcutsFormatting(
|
|
640
|
-
var formatMessage =
|
|
622
|
+
var blockControlsShortcutsFormatting = function blockControlsShortcutsFormatting(_ref7) {
|
|
623
|
+
var formatMessage = _ref7.formatMessage;
|
|
641
624
|
return [{
|
|
642
625
|
name: formatMessage(messages.selectDragHandle),
|
|
643
626
|
type: 'navigation',
|
|
@@ -670,8 +653,8 @@ var blockControlsShortcutsFormatting = function blockControlsShortcutsFormatting
|
|
|
670
653
|
}
|
|
671
654
|
}];
|
|
672
655
|
};
|
|
673
|
-
var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(
|
|
674
|
-
var formatMessage =
|
|
656
|
+
var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(_ref8) {
|
|
657
|
+
var formatMessage = _ref8.formatMessage;
|
|
675
658
|
return [{
|
|
676
659
|
name: formatMessage(tableMessages.moveColumnLeftHelpDialogLabel),
|
|
677
660
|
type: 'table',
|
|
@@ -698,8 +681,8 @@ var moveTableRowColumnFormatting = function moveTableRowColumnFormatting(_ref9)
|
|
|
698
681
|
}
|
|
699
682
|
}];
|
|
700
683
|
};
|
|
701
|
-
var openCellOptionsFormattingtoFormat = function openCellOptionsFormattingtoFormat(
|
|
702
|
-
var formatMessage =
|
|
684
|
+
var openCellOptionsFormattingtoFormat = function openCellOptionsFormattingtoFormat(_ref9) {
|
|
685
|
+
var formatMessage = _ref9.formatMessage;
|
|
703
686
|
return [{
|
|
704
687
|
name: formatMessage(messages.openCellOptions),
|
|
705
688
|
type: 'image',
|
|
@@ -721,8 +704,8 @@ var imageAutoFormat = {
|
|
|
721
704
|
, messages.altText), "](http://www.image.com)"));
|
|
722
705
|
}
|
|
723
706
|
};
|
|
724
|
-
var quickInsertAutoFormat = function quickInsertAutoFormat(
|
|
725
|
-
var formatMessage =
|
|
707
|
+
var quickInsertAutoFormat = function quickInsertAutoFormat(_ref0) {
|
|
708
|
+
var formatMessage = _ref0.formatMessage;
|
|
726
709
|
return {
|
|
727
710
|
name: formatMessage(messages.quickInsert),
|
|
728
711
|
type: 'quickInsert',
|
|
@@ -738,5 +721,5 @@ export var getSupportedFormatting = function getSupportedFormatting(schema, intl
|
|
|
738
721
|
var supportedBySchema = formatting(intl).filter(function (format) {
|
|
739
722
|
return schema.nodes[format.type] || schema.marks[format.type];
|
|
740
723
|
});
|
|
741
|
-
return [].concat(_toConsumableArray(aiEnabled ? [quickInsertAskAI(intl)] : []), _toConsumableArray(navigationKeymaps(intl)), _toConsumableArray(otherFormatting(intl)), _toConsumableArray(supportedBySchema), _toConsumableArray(blockControlsShortcutsFormatting(intl)), _toConsumableArray(imageEnabled ? [imageAutoFormat] : []), _toConsumableArray(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), _toConsumableArray(focusTableResizeHandleFormatting(intl)), _toConsumableArray(
|
|
724
|
+
return [].concat(_toConsumableArray(aiEnabled ? [quickInsertAskAI(intl)] : []), _toConsumableArray(navigationKeymaps(intl)), _toConsumableArray(otherFormatting(intl)), _toConsumableArray(supportedBySchema), _toConsumableArray(blockControlsShortcutsFormatting(intl)), _toConsumableArray(imageEnabled ? [imageAutoFormat] : []), _toConsumableArray(quickInsertEnabled ? [quickInsertAutoFormat(intl)] : []), _toConsumableArray(focusTableResizeHandleFormatting(intl)), _toConsumableArray(newResizeInformationFormatting(intl)), _toConsumableArray(openCellOptionsFormattingtoFormat(intl)), _toConsumableArray(expValEquals('editor-a11y-fy26-keyboard-move-row-column', 'isEnabled', true) ? moveTableRowColumnFormatting(intl) : []));
|
|
742
725
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-help-dialog",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"description": "Help Dialog plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
],
|
|
22
22
|
"atlaskit:src": "src/index.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
25
|
-
"@atlaskit/editor-plugin-quick-insert": "^
|
|
24
|
+
"@atlaskit/editor-plugin-analytics": "^25.0.0",
|
|
25
|
+
"@atlaskit/editor-plugin-quick-insert": "^25.0.0",
|
|
26
26
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
27
27
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
28
28
|
"@atlaskit/heading": "^8.0.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
32
32
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
33
33
|
"@atlaskit/primitives": "^22.5.0",
|
|
34
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
34
|
+
"@atlaskit/tmp-editor-statsig": "^224.0.0",
|
|
35
35
|
"@atlaskit/tokens": "^20.3.0",
|
|
36
36
|
"@atlaskit/tooltip": "^24.4.0",
|
|
37
37
|
"@babel/runtime": "^7.0.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"react-intl": "^7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@atlaskit/editor-common": "^
|
|
48
|
+
"@atlaskit/editor-common": "^129.0.0",
|
|
49
49
|
"react": "^18.2.0 || ^19.2.0",
|
|
50
50
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
51
51
|
}
|