@atlaskit/editor-common 99.5.0 → 99.5.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.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/analytics/types/ai-events.js +5 -0
- package/dist/cjs/analytics/types/enums.js +2 -0
- package/dist/cjs/card/MediaAndEmbedsToolbar/index.js +3 -12
- package/dist/cjs/commands/index.js +42 -50
- package/dist/cjs/commands/insert-block.js +1 -4
- package/dist/cjs/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +1 -6
- package/dist/cjs/extensibility/Extension/Extension/index.js +6 -3
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +4 -2
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +16 -6
- package/dist/cjs/extensibility/Extension/Lozenge/LozengeComponent.js +4 -2
- package/dist/cjs/extensibility/Extension/Lozenge/index.js +4 -2
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +4 -2
- package/dist/cjs/extensibility/extensionNodeView.js +1 -2
- package/dist/cjs/guideline/dynamicGuideline.js +1 -4
- package/dist/cjs/guideline/relativeGuideline.js +3 -12
- package/dist/cjs/guideline/updateGuideline.js +1 -4
- package/dist/cjs/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +9 -11
- package/dist/cjs/insert/index.js +1 -4
- package/dist/cjs/keymaps/index.js +0 -3
- package/dist/cjs/lazy-node-view/index.js +1 -6
- package/dist/cjs/lazy-node-view/node-view.js +0 -2
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +0 -2
- package/dist/cjs/lists/analytics.js +0 -2
- package/dist/cjs/mark/commands.js +2 -11
- package/dist/cjs/media-single/utils.js +0 -5
- package/dist/cjs/messages/ai-proactive-setting.js +109 -0
- package/dist/cjs/messages/ai-proactive-transform.js +99 -0
- package/dist/cjs/messages/ai-proactive.js +145 -0
- package/dist/cjs/messages/index.js +14 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/node-width/index.js +1 -4
- package/dist/cjs/paste/md-plugins/ignore-list-heading-md-plugin.js +0 -5
- package/dist/cjs/preset/core-plugin/requestDocument.js +1 -2
- package/dist/cjs/react-node-view/index.js +1 -9
- package/dist/cjs/resizer/Resizer.js +2 -8
- package/dist/cjs/selection/gap-cursor/actions.js +2 -8
- package/dist/cjs/selection/index.js +0 -2
- package/dist/cjs/selection-based-node-view/SelectionBasedNodeView.js +0 -6
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Layer/index.js +0 -2
- package/dist/cjs/ui/MediaSingle/grid.js +2 -8
- package/dist/cjs/ui/MediaSingle/styled.js +0 -4
- package/dist/cjs/ui/Popup/utils.js +0 -7
- package/dist/cjs/ui/ResizerLegacy/index.js +0 -4
- package/dist/cjs/ui/unsupported-content-helper.js +0 -2
- package/dist/cjs/utils/breakout.js +0 -2
- package/dist/cjs/utils/commands.js +1 -4
- package/dist/cjs/utils/editor-core-utils.js +0 -3
- package/dist/cjs/utils/input-rules.js +1 -4
- package/dist/cjs/utils/nodes.js +1 -6
- package/dist/cjs/utils/page-element-counts.js +10 -3
- package/dist/cjs/utils/performance/measure-tti.js +0 -5
- package/dist/cjs/utils/plugin-state-factory.js +0 -2
- package/dist/cjs/utils/processRawValue.js +0 -6
- package/dist/cjs/utils/prosemirror/autojoin.js +0 -2
- package/dist/cjs/utils/rich-media-utils.js +1 -4
- package/dist/cjs/utils/track-unsupported-content.js +2 -8
- package/dist/cjs/utils/validate-using-spec.js +1 -7
- package/dist/cjs/with-plugin-state/index.js +0 -4
- package/dist/es2019/analytics/types/ai-events.js +1 -0
- package/dist/es2019/analytics/types/enums.js +2 -0
- package/dist/es2019/card/MediaAndEmbedsToolbar/index.js +3 -12
- package/dist/es2019/commands/index.js +2 -8
- package/dist/es2019/commands/insert-block.js +1 -4
- package/dist/es2019/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +1 -6
- package/dist/es2019/extensibility/Extension/Extension/index.js +6 -3
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +4 -2
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +16 -6
- package/dist/es2019/extensibility/Extension/Lozenge/LozengeComponent.js +4 -2
- package/dist/es2019/extensibility/Extension/Lozenge/index.js +4 -2
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +4 -2
- package/dist/es2019/extensibility/extensionNodeView.js +0 -3
- package/dist/es2019/guideline/dynamicGuideline.js +1 -4
- package/dist/es2019/guideline/relativeGuideline.js +3 -12
- package/dist/es2019/guideline/snapping.js +1 -4
- package/dist/es2019/guideline/updateGuideline.js +1 -4
- package/dist/es2019/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +9 -11
- package/dist/es2019/insert/index.js +1 -4
- package/dist/es2019/keymaps/index.js +0 -3
- package/dist/es2019/lazy-node-view/index.js +1 -6
- package/dist/es2019/lazy-node-view/node-view.js +0 -2
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +0 -2
- package/dist/es2019/lists/analytics.js +0 -2
- package/dist/es2019/mark/commands.js +2 -11
- package/dist/es2019/media-single/utils.js +0 -5
- package/dist/es2019/messages/ai-proactive-setting.js +103 -0
- package/dist/es2019/messages/ai-proactive-transform.js +93 -0
- package/dist/es2019/messages/ai-proactive.js +145 -0
- package/dist/es2019/messages/index.js +2 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/node-width/index.js +1 -4
- package/dist/es2019/paste/md-plugins/ignore-list-heading-md-plugin.js +0 -5
- package/dist/es2019/preset/core-plugin/requestDocument.js +1 -2
- package/dist/es2019/react-node-view/index.js +0 -7
- package/dist/es2019/resizer/Resizer.js +2 -8
- package/dist/es2019/selection/gap-cursor/actions.js +2 -8
- package/dist/es2019/selection/index.js +0 -2
- package/dist/es2019/selection-based-node-view/SelectionBasedNodeView.js +0 -6
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Layer/index.js +0 -2
- package/dist/es2019/ui/MediaSingle/grid.js +2 -8
- package/dist/es2019/ui/MediaSingle/styled.js +0 -4
- package/dist/es2019/ui/Popup/utils.js +0 -7
- package/dist/es2019/ui/ResizerLegacy/index.js +0 -4
- package/dist/es2019/ui/unsupported-content-helper.js +0 -2
- package/dist/es2019/utils/breakout.js +0 -2
- package/dist/es2019/utils/commands.js +1 -4
- package/dist/es2019/utils/compare-props.js +1 -4
- package/dist/es2019/utils/editor-core-utils.js +0 -3
- package/dist/es2019/utils/input-rules.js +1 -4
- package/dist/es2019/utils/nodes.js +1 -6
- package/dist/es2019/utils/page-element-counts.js +10 -3
- package/dist/es2019/utils/performance/measure-tti.js +0 -6
- package/dist/es2019/utils/plugin-state-factory.js +0 -2
- package/dist/es2019/utils/processRawValue.js +0 -6
- package/dist/es2019/utils/prosemirror/autojoin.js +0 -2
- package/dist/es2019/utils/rich-media-utils.js +1 -4
- package/dist/es2019/utils/track-unsupported-content.js +3 -12
- package/dist/es2019/utils/validate-using-spec.js +1 -7
- package/dist/es2019/with-plugin-state/index.js +0 -4
- package/dist/esm/analytics/types/ai-events.js +1 -0
- package/dist/esm/analytics/types/enums.js +2 -0
- package/dist/esm/card/MediaAndEmbedsToolbar/index.js +3 -12
- package/dist/esm/commands/index.js +42 -50
- package/dist/esm/commands/insert-block.js +1 -4
- package/dist/esm/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +1 -6
- package/dist/esm/extensibility/Extension/Extension/index.js +6 -3
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +4 -2
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +16 -6
- package/dist/esm/extensibility/Extension/Lozenge/LozengeComponent.js +4 -2
- package/dist/esm/extensibility/Extension/Lozenge/index.js +4 -2
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +4 -2
- package/dist/esm/extensibility/extensionNodeView.js +0 -3
- package/dist/esm/guideline/dynamicGuideline.js +1 -4
- package/dist/esm/guideline/relativeGuideline.js +3 -12
- package/dist/esm/guideline/updateGuideline.js +1 -4
- package/dist/esm/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +9 -11
- package/dist/esm/insert/index.js +1 -4
- package/dist/esm/keymaps/index.js +0 -3
- package/dist/esm/lazy-node-view/index.js +1 -6
- package/dist/esm/lazy-node-view/node-view.js +0 -2
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +0 -2
- package/dist/esm/lists/analytics.js +0 -2
- package/dist/esm/mark/commands.js +2 -11
- package/dist/esm/media-single/utils.js +0 -5
- package/dist/esm/messages/ai-proactive-setting.js +103 -0
- package/dist/esm/messages/ai-proactive-transform.js +93 -0
- package/dist/esm/messages/ai-proactive.js +145 -0
- package/dist/esm/messages/index.js +2 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/node-width/index.js +1 -4
- package/dist/esm/paste/md-plugins/ignore-list-heading-md-plugin.js +0 -5
- package/dist/esm/preset/core-plugin/requestDocument.js +1 -2
- package/dist/esm/react-node-view/index.js +1 -9
- package/dist/esm/resizer/Resizer.js +2 -8
- package/dist/esm/selection/gap-cursor/actions.js +2 -8
- package/dist/esm/selection/index.js +0 -2
- package/dist/esm/selection-based-node-view/SelectionBasedNodeView.js +0 -6
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Layer/index.js +0 -2
- package/dist/esm/ui/MediaSingle/grid.js +2 -8
- package/dist/esm/ui/MediaSingle/styled.js +0 -4
- package/dist/esm/ui/Popup/utils.js +0 -7
- package/dist/esm/ui/ResizerLegacy/index.js +0 -4
- package/dist/esm/ui/unsupported-content-helper.js +0 -2
- package/dist/esm/utils/breakout.js +0 -2
- package/dist/esm/utils/commands.js +1 -4
- package/dist/esm/utils/editor-core-utils.js +0 -3
- package/dist/esm/utils/input-rules.js +1 -4
- package/dist/esm/utils/nodes.js +1 -6
- package/dist/esm/utils/page-element-counts.js +10 -3
- package/dist/esm/utils/performance/measure-tti.js +0 -6
- package/dist/esm/utils/plugin-state-factory.js +0 -2
- package/dist/esm/utils/processRawValue.js +0 -6
- package/dist/esm/utils/prosemirror/autojoin.js +0 -2
- package/dist/esm/utils/rich-media-utils.js +1 -4
- package/dist/esm/utils/track-unsupported-content.js +2 -8
- package/dist/esm/utils/validate-using-spec.js +1 -7
- package/dist/esm/with-plugin-state/index.js +0 -4
- package/dist/types/analytics/index.d.ts +1 -0
- package/dist/types/analytics/types/ai-events.d.ts +15 -0
- package/dist/types/analytics/types/ai-proactive-events.d.ts +1 -1
- package/dist/types/analytics/types/enums.d.ts +2 -0
- package/dist/types/analytics/types/events.d.ts +5 -4
- package/dist/types/extensibility/Extension/Lozenge/ExtensionLabel.d.ts +3 -1
- package/dist/types/extensibility/Extension/Lozenge/LozengeComponent.d.ts +3 -1
- package/dist/types/extensibility/Extension/Lozenge/index.d.ts +2 -0
- package/dist/types/messages/ai-proactive-setting.d.ts +102 -0
- package/dist/types/messages/ai-proactive-transform.d.ts +92 -0
- package/dist/types/messages/ai-proactive.d.ts +145 -0
- package/dist/types/messages/index.d.ts +2 -0
- package/dist/types-ts4.5/analytics/index.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/ai-events.d.ts +15 -0
- package/dist/types-ts4.5/analytics/types/ai-proactive-events.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/enums.d.ts +2 -0
- package/dist/types-ts4.5/analytics/types/events.d.ts +5 -4
- package/dist/types-ts4.5/extensibility/Extension/Lozenge/ExtensionLabel.d.ts +3 -1
- package/dist/types-ts4.5/extensibility/Extension/Lozenge/LozengeComponent.d.ts +3 -1
- package/dist/types-ts4.5/extensibility/Extension/Lozenge/index.d.ts +2 -0
- package/dist/types-ts4.5/messages/ai-proactive-setting.d.ts +102 -0
- package/dist/types-ts4.5/messages/ai-proactive-transform.d.ts +92 -0
- package/dist/types-ts4.5/messages/ai-proactive.d.ts +145 -0
- package/dist/types-ts4.5/messages/index.d.ts +2 -0
- package/package.json +3 -3
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export var aiProactiveTransformMessages = defineMessages({
|
|
3
|
+
recommendationDefaultTitle: {
|
|
4
|
+
id: 'fabric.editor.ai.proactive.recommendation.default.title.non-final',
|
|
5
|
+
defaultMessage: 'Suggestion',
|
|
6
|
+
description: 'The default generic title displayed in the side context panel for AI recommendations which have not explicit matching override'
|
|
7
|
+
},
|
|
8
|
+
recommendationDefaultDescription: {
|
|
9
|
+
id: 'fabric.editor.ai.proactive.recommendation.default.description.non-final',
|
|
10
|
+
defaultMessage: 'A suggestion to improve the content.',
|
|
11
|
+
description: 'The default generic description displayed in the side context panel for AI recommendations which have no explicit matching override'
|
|
12
|
+
},
|
|
13
|
+
recommendationConvertToTableTitle: {
|
|
14
|
+
id: 'fabric.editor.ai.proactive.recommendation.convertToTable.title.non-final',
|
|
15
|
+
defaultMessage: 'Format in table',
|
|
16
|
+
description: 'The title displayed in the side context panel for AI recommendations which suggest a conversion to table operation'
|
|
17
|
+
},
|
|
18
|
+
recommendationConvertToTableDescription: {
|
|
19
|
+
id: 'fabric.editor.ai.proactive.recommendation.convertToTable.description.non-final',
|
|
20
|
+
defaultMessage: 'Format content in a table to improve readability.',
|
|
21
|
+
description: 'The description displayed in the side context panel for AI recommendations which suggest a conversion to table operation'
|
|
22
|
+
},
|
|
23
|
+
recommendationConvertToNotePanelTitle: {
|
|
24
|
+
id: 'fabric.editor.ai.proactive.recommendation.convertToNotePanel.title.non-final',
|
|
25
|
+
defaultMessage: 'Frame with note panel',
|
|
26
|
+
description: 'The title displayed in the side context panel for AI recommendations which suggest a conversion to note panel operation'
|
|
27
|
+
},
|
|
28
|
+
recommendationConvertToNotePanelDescription: {
|
|
29
|
+
id: 'fabric.editor.ai.proactive.recommendation.convertToNotePanel.description.non-final',
|
|
30
|
+
defaultMessage: 'Use a purple note panel to make your message stand out.',
|
|
31
|
+
description: 'The description displayed in the side context panel for AI recommendations which suggest a conversion to note panel operation'
|
|
32
|
+
},
|
|
33
|
+
recommendationConvertToInfoPanelTitle: {
|
|
34
|
+
id: 'fabric.editor.ai.proactive.recommendation.convertToInfoPanel.title.non-final',
|
|
35
|
+
defaultMessage: 'Frame with info panel',
|
|
36
|
+
description: 'The title displayed in the side context panel for AI recommendations which suggest a conversion to note panel operation'
|
|
37
|
+
},
|
|
38
|
+
recommendationConvertToInfoPanelDescription: {
|
|
39
|
+
id: 'fabric.editor.ai.proactive.recommendation.convertToInfoPanel.description.non-final',
|
|
40
|
+
defaultMessage: 'Use a blue info panel to make your message stand out. ',
|
|
41
|
+
description: 'The description displayed in the side context panel for AI recommendations which suggest a conversion to info panel operation'
|
|
42
|
+
},
|
|
43
|
+
recommendationConvertToWarnPanelTitle: {
|
|
44
|
+
id: 'fabric.editor.ai.proactive.recommendation.convertToWarnPanel.title.non-final',
|
|
45
|
+
defaultMessage: 'Frame with warning panel',
|
|
46
|
+
description: 'The title displayed in the side context panel for AI recommendations which suggest a conversion to warning panel operation'
|
|
47
|
+
},
|
|
48
|
+
recommendationConvertToWarnPanelDescription: {
|
|
49
|
+
id: 'fabric.editor.ai.proactive.recommendation.convertToWarnPanel.description.non-final',
|
|
50
|
+
defaultMessage: 'Use a yellow warning panel to make your message stand out.',
|
|
51
|
+
description: 'The description displayed in the side context panel for AI recommendations which suggest a conversion to warning panel operation'
|
|
52
|
+
},
|
|
53
|
+
recommendationConvertToErrorPanelTitle: {
|
|
54
|
+
id: 'fabric.editor.ai.proactive.recommendation.convertToErrorPanel.title.non-final',
|
|
55
|
+
defaultMessage: 'Frame with error panel',
|
|
56
|
+
description: 'The title displayed in the side context panel for AI recommendations which suggest a conversion to error panel operation'
|
|
57
|
+
},
|
|
58
|
+
recommendationConvertToErrorPanelDescription: {
|
|
59
|
+
id: 'fabric.editor.ai.proactive.recommendation.convertToErrorPanel.description.non-final',
|
|
60
|
+
defaultMessage: 'Use a red error panel to make your message stand out.',
|
|
61
|
+
description: 'The description displayed in the side context panel for AI recommendations which suggest a conversion to error panel operation'
|
|
62
|
+
},
|
|
63
|
+
recommendationConvertToSuccessPanelTitle: {
|
|
64
|
+
id: 'fabric.editor.ai.proactive.recommendation.convertToSuccessPanel.title.non-final',
|
|
65
|
+
defaultMessage: 'Frame with success panel',
|
|
66
|
+
description: 'The title displayed in the side context panel for AI recommendations which suggest a conversion to success panel operation'
|
|
67
|
+
},
|
|
68
|
+
recommendationConvertToSuccessPanelDescription: {
|
|
69
|
+
id: 'fabric.editor.ai.proactive.recommendation.convertToSuccessPanel.description.non-final',
|
|
70
|
+
defaultMessage: 'Use a green success panel to make your message stand out.',
|
|
71
|
+
description: 'The description displayed in the side context panel for AI recommendations which suggest a conversion to success panel operation'
|
|
72
|
+
},
|
|
73
|
+
recommendationSplitParagraphTitle: {
|
|
74
|
+
id: 'fabric.editor.ai.proactive.recommendation.splitParagraph.title.non-final',
|
|
75
|
+
defaultMessage: 'Divide paragraph',
|
|
76
|
+
description: 'The title displayed in the side context panel for AI recommendations which suggest a split paragraph operation'
|
|
77
|
+
},
|
|
78
|
+
recommendationSplitParagraphDescription: {
|
|
79
|
+
id: 'fabric.editor.ai.proactive.recommendation.splitParagraph.description.non-final',
|
|
80
|
+
defaultMessage: 'Add paragraph breaks to separate key ideas.',
|
|
81
|
+
description: 'The description displayed in the side context panel for AI recommendations which suggest a split paragraph operation'
|
|
82
|
+
},
|
|
83
|
+
recommendationFormatParagraphTitle: {
|
|
84
|
+
id: 'fabric.editor.ai.proactive.recommendation.formatParagraph.title.non-final',
|
|
85
|
+
defaultMessage: 'Improve paragraph',
|
|
86
|
+
description: 'The title displayed in the side context panel for AI recommendations which suggest a format paragraph operation'
|
|
87
|
+
},
|
|
88
|
+
recommendationFormatParagraphDescription: {
|
|
89
|
+
id: 'fabric.editor.ai.proactive.recommendation.formatParagraph.description.non-final',
|
|
90
|
+
defaultMessage: 'Simplify content and fix spelling and grammar.',
|
|
91
|
+
description: 'The description displayed in the side context panel for AI recommendations which suggest a format paragraph operation'
|
|
92
|
+
}
|
|
93
|
+
});
|
|
@@ -4,5 +4,150 @@ export var aiProactiveMessages = defineMessages({
|
|
|
4
4
|
id: 'fabric.editor.ai.proactive.loading.iconAltText.non-final',
|
|
5
5
|
defaultMessage: 'Loading icon',
|
|
6
6
|
description: 'Icon alt text of the Loading icon'
|
|
7
|
+
},
|
|
8
|
+
findingSuggestionsLabel: {
|
|
9
|
+
id: 'fabric.editor.ai.proactive.findingSuggestionsLabel.non-final',
|
|
10
|
+
defaultMessage: 'Finding suggestions',
|
|
11
|
+
description: 'The label next to the spinner which indicates recommendations are being requested.'
|
|
12
|
+
},
|
|
13
|
+
findingSuggestionsLoadingLabel: {
|
|
14
|
+
id: 'fabric.editor.ai.proactive.findingSuggestionsLoadingLabel.non-final',
|
|
15
|
+
defaultMessage: 'Finding suggestions',
|
|
16
|
+
description: 'This is the label under the loading spinner when suggestions are being reloaded.'
|
|
17
|
+
},
|
|
18
|
+
findingMoreSuggestionsLoadingLabel: {
|
|
19
|
+
id: 'fabric.editor.ai.proactive.findingMoreSuggestionsLoadingLabel.non-final',
|
|
20
|
+
defaultMessage: 'Finding more suggestions',
|
|
21
|
+
description: 'The label next to the spinner which indicates more recommendations are being requested.'
|
|
22
|
+
},
|
|
23
|
+
unhandledErrorMessage: {
|
|
24
|
+
id: 'fabric.editor.ai.proactive.error.unhandledErrorMessage',
|
|
25
|
+
defaultMessage: "We're having trouble. Close the dialog and try again.",
|
|
26
|
+
description: 'Message to users that displays when an unexpected error happens'
|
|
27
|
+
},
|
|
28
|
+
markdownErrorMessage: {
|
|
29
|
+
id: 'fabric.editor.ai.proactive.error.markdownErrorMessage',
|
|
30
|
+
defaultMessage: "We're having trouble generating the preview. Close the dialog and try again.",
|
|
31
|
+
description: 'Message to users that displays when an error occurs while generating a preview.'
|
|
32
|
+
},
|
|
33
|
+
recommendationPreviewButtonLabel: {
|
|
34
|
+
id: 'fabric.editor.ai.proactive.recommendation.preview.button.non-final',
|
|
35
|
+
defaultMessage: 'Preview',
|
|
36
|
+
description: 'The preview button label which allows the user to open the preview modal and see the AI recommendation which will be applied when the user inserts'
|
|
37
|
+
},
|
|
38
|
+
recommendationReplaceButtonLabel: {
|
|
39
|
+
id: 'fabric.editor.ai.proactive.recommendation.replace.button.non-final',
|
|
40
|
+
defaultMessage: 'Replace',
|
|
41
|
+
description: 'The replace button label, when clicked the AI recommendation which immediately be inserted'
|
|
42
|
+
},
|
|
43
|
+
recommendationDismissButtonLabel: {
|
|
44
|
+
id: 'fabric.editor.ai.proactive.recommendation.dismiss.button.non-final',
|
|
45
|
+
defaultMessage: 'Dismiss',
|
|
46
|
+
description: 'The dismiss button label,when clicked the AI recommendation will be removed from the list and no longer displayed to the user'
|
|
47
|
+
},
|
|
48
|
+
dismissProactiveRecommendation: {
|
|
49
|
+
id: 'fabric.editor.ai.proactive.preview.dismissProactiveRecommendation.non-final',
|
|
50
|
+
defaultMessage: 'Dismiss',
|
|
51
|
+
description: 'Label for button to dismiss the proactive recommendation'
|
|
52
|
+
},
|
|
53
|
+
insertBelowProactiveRecommendation: {
|
|
54
|
+
id: 'fabric.editor.ai.proactive.preview.insertBelowProactiveRecommendation',
|
|
55
|
+
defaultMessage: 'Insert below',
|
|
56
|
+
description: 'Label for button to insert the proactive recommendation below the user selection'
|
|
57
|
+
},
|
|
58
|
+
replaceProactiveRecommendation: {
|
|
59
|
+
id: 'fabric.editor.ai.proactive.preview.replaceProactiveRecommendation',
|
|
60
|
+
defaultMessage: 'Replace',
|
|
61
|
+
description: 'Label for button to replace selection with proactive recommendation'
|
|
62
|
+
},
|
|
63
|
+
spellingAndGrammarLabel: {
|
|
64
|
+
id: 'fabric.editor.ai.proactive.spellingAndGrammar.label.non-final',
|
|
65
|
+
defaultMessage: 'Spelling and grammar',
|
|
66
|
+
description: 'The label displayed in the context panel on the spelling and grammar item which display the total spelling and grammar issues found'
|
|
67
|
+
},
|
|
68
|
+
ManageSuggestionTitle: {
|
|
69
|
+
id: 'fabric.editor.ai.proactive.moreMenu.manageSuggestionsTitle.non-final',
|
|
70
|
+
defaultMessage: 'Manage suggestions',
|
|
71
|
+
description: 'This is the message displayed in the more menu dropdown in the context panel to allow the user to manage suggestions on the suggestions'
|
|
72
|
+
},
|
|
73
|
+
closeButtonLabel: {
|
|
74
|
+
id: 'fabric.editor.ai.proactive.close.label.non-final',
|
|
75
|
+
defaultMessage: 'Close',
|
|
76
|
+
description: 'This is the text applied to the Close icon button label'
|
|
77
|
+
},
|
|
78
|
+
suggestionsTitle: {
|
|
79
|
+
id: 'fabric.editor.ai.proactive.suggestions.title.non-final',
|
|
80
|
+
defaultMessage: 'Suggestions',
|
|
81
|
+
description: 'The title displayed at the top of the context panel for all recommendations displayed'
|
|
82
|
+
},
|
|
83
|
+
betaLabel: {
|
|
84
|
+
id: 'fabric.editor.ai.proactive.beta.label.non-final',
|
|
85
|
+
defaultMessage: 'BETA',
|
|
86
|
+
description: 'This is a lozenge displayed in the suggested edits header to signify that this is a beta feature'
|
|
87
|
+
},
|
|
88
|
+
moreMenuLabel: {
|
|
89
|
+
id: 'fabric.editor.ai.proactive.moreMenu.label.non-final',
|
|
90
|
+
defaultMessage: 'more',
|
|
91
|
+
description: 'This is the message displayed tooltip in the more menu dropdown in the context panel'
|
|
92
|
+
},
|
|
93
|
+
moreMenuManageSuggestions: {
|
|
94
|
+
id: 'fabric.editor.ai.proactive.moreMenu.manageSuggestions.non-final',
|
|
95
|
+
defaultMessage: 'Manage Suggestions',
|
|
96
|
+
description: 'This is the message displayed in the more menu dropdown in the context panel to allow the user to manage suggestions on the suggestions'
|
|
97
|
+
},
|
|
98
|
+
moreMenuGiveFeedback: {
|
|
99
|
+
id: 'fabric.editor.ai.proactive.moreMenu.giveFeedback.non-final',
|
|
100
|
+
defaultMessage: 'Give feedback',
|
|
101
|
+
description: 'This is the message displayed in the more menu dropdown in the context panel to allow the user to give feedback on the suggestions'
|
|
102
|
+
},
|
|
103
|
+
moreActionsLabel: {
|
|
104
|
+
id: 'fabric.editor.ai.proactive.moreActions.label.non-final',
|
|
105
|
+
defaultMessage: 'More actions',
|
|
106
|
+
description: 'This is the text applied to the More icon button label'
|
|
107
|
+
},
|
|
108
|
+
reloadSuggestionsStateTitle: {
|
|
109
|
+
id: 'fabric.editor.ai.proactive.reloadSuggestionsState.title.non-final',
|
|
110
|
+
defaultMessage: 'Your content’s looking good',
|
|
111
|
+
description: 'This is the title of the message displayed in the suggested edits panel when there are new recommendations left after a user has dismissed them all.'
|
|
112
|
+
},
|
|
113
|
+
reloadSuggestionsStateDescription: {
|
|
114
|
+
id: 'fabric.editor.ai.proactive.reloadSuggestionsState.description.non-final',
|
|
115
|
+
defaultMessage: 'Any new suggestions will appear here.',
|
|
116
|
+
description: 'This is the message displayed in the suggested edits panel when there are no new recommendations left after a user has dismissed them all.'
|
|
117
|
+
},
|
|
118
|
+
reloadSuggestionsButtonLabel: {
|
|
119
|
+
id: 'fabric.editor.ai.proactive.reloadSuggestionsButtonLabel.non-final',
|
|
120
|
+
defaultMessage: 'View past suggestions',
|
|
121
|
+
description: 'This is the button label to reload suggestions when a user has dismised all recommendations.'
|
|
122
|
+
},
|
|
123
|
+
noSuggestionsStateTitle: {
|
|
124
|
+
id: 'fabric.editor.ai.proactive.noSuggestionsState.title.non-final',
|
|
125
|
+
defaultMessage: 'Suggestions will appear here',
|
|
126
|
+
description: 'This is the title of the message displayed in the suggested edits panel when there are no recommendations available.'
|
|
127
|
+
},
|
|
128
|
+
noSuggestionsStateDescription: {
|
|
129
|
+
id: 'fabric.editor.ai.proactive.noSuggestionsState.description.non-final',
|
|
130
|
+
defaultMessage: 'You can also ask AI to improve your page with requests such as <i>Add a table of contents</i> or <i>Create headings</i>.',
|
|
131
|
+
description: 'This is the message displayed in the suggested edits panel when there are no recommendations available'
|
|
132
|
+
},
|
|
133
|
+
askAIButtonLabel: {
|
|
134
|
+
id: 'fabric.editor.ai.proactive.askAIButtonLabel.non-final',
|
|
135
|
+
defaultMessage: 'Ask AI',
|
|
136
|
+
description: 'This is the button label to open the AI modal.'
|
|
137
|
+
},
|
|
138
|
+
enableSuggestionsStateTitle: {
|
|
139
|
+
id: 'fabric.editor.ai.proactive.enableSuggestionsState.title.non-final',
|
|
140
|
+
defaultMessage: 'You create. We polish.',
|
|
141
|
+
description: 'This is the title of the message displayed in the suggested edits panel when suggestions are disabled.'
|
|
142
|
+
},
|
|
143
|
+
enableSuggestionsStateDescription: {
|
|
144
|
+
id: 'fabric.editor.ai.proactive.enableSuggestionsState.description.non-final',
|
|
145
|
+
defaultMessage: 'Turn on suggested edits to quickly preview content improvements.',
|
|
146
|
+
description: 'This is the message displayed in the suggested edits panel when suggestions are disabled.'
|
|
147
|
+
},
|
|
148
|
+
enableSuggestionsButtonLabel: {
|
|
149
|
+
id: 'fabric.editor.ai.proactive.enableSuggestionsButtonLabel.non-final',
|
|
150
|
+
defaultMessage: 'Turn on',
|
|
151
|
+
description: 'This is the button label in the suggested edits panel when suggestions are disabled.'
|
|
7
152
|
}
|
|
8
153
|
});
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
import { defineMessages } from 'react-intl-next';
|
|
5
5
|
export { aiDefinitionsMessages } from './ai-definitions';
|
|
6
6
|
export { aiProactiveMessages } from './ai-proactive';
|
|
7
|
+
export { aiProactiveSettingMessages } from './ai-proactive-setting';
|
|
8
|
+
export { aiProactiveTransformMessages } from './ai-proactive-transform';
|
|
7
9
|
export { alignmentMessages } from './alignment';
|
|
8
10
|
export { annotationMessages } from './annotation';
|
|
9
11
|
export { messages as blockTypeMessages } from './block-type';
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "99.5.
|
|
10
|
+
var packageVersion = "99.5.2";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -17,10 +17,7 @@ export var layoutToWidth = {
|
|
|
17
17
|
* Calculates width of parent node of a nested node (inside layouts, extension)
|
|
18
18
|
* If current node selection is not nested will return undefined
|
|
19
19
|
*/
|
|
20
|
-
export var getParentNodeWidth = function getParentNodeWidth(pos, state, containerWidth, isFullWidthModeEnabled
|
|
21
|
-
// Ignored via go/ees005
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
23
|
-
) {
|
|
20
|
+
export var getParentNodeWidth = function getParentNodeWidth(pos, state, containerWidth, isFullWidthModeEnabled) {
|
|
24
21
|
if (!pos) {
|
|
25
22
|
return;
|
|
26
23
|
}
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
* prosemirror-markdown cannot conform to the schema
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
// Ignored via go/ees005
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
11
9
|
function handleHeadingOpen(state, token, acc, index) {
|
|
12
10
|
var _state$tokens;
|
|
13
11
|
var isInListItem = ((_state$tokens = state.tokens[index - 1]) === null || _state$tokens === void 0 ? void 0 : _state$tokens.type) === 'list_item_open';
|
|
@@ -17,9 +15,6 @@ function handleHeadingOpen(state, token, acc, index) {
|
|
|
17
15
|
acc.push(token);
|
|
18
16
|
}
|
|
19
17
|
}
|
|
20
|
-
|
|
21
|
-
// Ignored via go/ees005
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
23
18
|
function handleHeadingClose(state, token, acc, index) {
|
|
24
19
|
var _state$tokens2;
|
|
25
20
|
var isInListItem = ((_state$tokens2 = state.tokens[index + 1]) === null || _state$tokens2 === void 0 ? void 0 : _state$tokens2.type) === 'list_item_close';
|
|
@@ -38,8 +38,7 @@ function createThrottleSchedule(callback) {
|
|
|
38
38
|
}
|
|
39
39
|
export var scheduleDocumentRequest = createThrottleSchedule(returnDocumentRequest);
|
|
40
40
|
|
|
41
|
-
//
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/max-params
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
42
|
function returnDocumentRequest(editorView, callback, transformer, fireAnalyticsEvent) {
|
|
44
43
|
var _editorView$state;
|
|
45
44
|
var _ref = (_editorView$state = editorView === null || editorView === void 0 ? void 0 : editorView.state) !== null && _editorView$state !== void 0 ? _editorView$state : {},
|
|
@@ -14,8 +14,6 @@ import { analyticsEventKey } from '../utils/analytics';
|
|
|
14
14
|
import { generateUniqueNodeKey } from './generateUniqueNodeKey';
|
|
15
15
|
export { getInlineNodeViewProducer, inlineNodeViewClassname } from './getInlineNodeViewProducer';
|
|
16
16
|
var ReactNodeView = /*#__PURE__*/function () {
|
|
17
|
-
// Ignored via go/ees005
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
19
17
|
function ReactNodeView(_node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps,
|
|
20
18
|
// Ignored via go/ees005
|
|
21
19
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -204,9 +202,6 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
204
202
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
205
203
|
}, props)) : null;
|
|
206
204
|
}
|
|
207
|
-
|
|
208
|
-
// Ignored via go/ees005
|
|
209
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
210
205
|
}, {
|
|
211
206
|
key: "update",
|
|
212
207
|
value: function update(node, decorations, _innerDecorations) {
|
|
@@ -276,10 +271,7 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
276
271
|
}
|
|
277
272
|
}], [{
|
|
278
273
|
key: "fromComponent",
|
|
279
|
-
value:
|
|
280
|
-
// Ignored via go/ees005
|
|
281
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
282
|
-
function fromComponent(
|
|
274
|
+
value: function fromComponent(
|
|
283
275
|
// Ignored via go/ees005
|
|
284
276
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
285
277
|
component, portalProviderAPI, eventDispatcher, props, viewShouldUpdate) {
|
|
@@ -68,10 +68,7 @@ var ResizerNext = function ResizerNext(props, ref) {
|
|
|
68
68
|
setIsResizing(true);
|
|
69
69
|
handleResizeStart();
|
|
70
70
|
}, [handleResizeStart]);
|
|
71
|
-
var onResize = useCallback(function (_event, _direction, _elementRef, delta
|
|
72
|
-
// Ignored via go/ees005
|
|
73
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
74
|
-
) {
|
|
71
|
+
var onResize = useCallback(function (_event, _direction, _elementRef, delta) {
|
|
75
72
|
if (!handleResize) {
|
|
76
73
|
return;
|
|
77
74
|
}
|
|
@@ -87,10 +84,7 @@ var ResizerNext = function ResizerNext(props, ref) {
|
|
|
87
84
|
};
|
|
88
85
|
handleResize(originalState, delta);
|
|
89
86
|
}, [handleResize]);
|
|
90
|
-
var onResizeStop = useCallback(function (_event, _direction, _elementRef, delta
|
|
91
|
-
// Ignored via go/ees005
|
|
92
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
93
|
-
) {
|
|
87
|
+
var onResizeStop = useCallback(function (_event, _direction, _elementRef, delta) {
|
|
94
88
|
var resizableCurrent = resizable.current;
|
|
95
89
|
if (!resizableCurrent || !resizableCurrent.state.original) {
|
|
96
90
|
return;
|
|
@@ -4,10 +4,7 @@ import { isValidTargetNode } from './utils/is-valid-target-node';
|
|
|
4
4
|
|
|
5
5
|
// This function captures clicks outside of the ProseMirror contentEditable area
|
|
6
6
|
// see also description of "handleClick" in gap-cursor pm-plugin
|
|
7
|
-
var captureCursorCoords = function captureCursorCoords(event, editorRef, posAtCoords, tr
|
|
8
|
-
// Ignored via go/ees005
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
10
|
-
) {
|
|
7
|
+
var captureCursorCoords = function captureCursorCoords(event, editorRef, posAtCoords, tr) {
|
|
11
8
|
var rect = editorRef.getBoundingClientRect();
|
|
12
9
|
|
|
13
10
|
// capture clicks before the first block element
|
|
@@ -44,10 +41,7 @@ var captureCursorCoords = function captureCursorCoords(event, editorRef, posAtCo
|
|
|
44
41
|
}
|
|
45
42
|
return null;
|
|
46
43
|
};
|
|
47
|
-
export var setSelectionTopLevelBlocks = function setSelectionTopLevelBlocks(tr, event, editorRef, posAtCoords, editorFocused
|
|
48
|
-
// Ignored via go/ees005
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
50
|
-
) {
|
|
44
|
+
export var setSelectionTopLevelBlocks = function setSelectionTopLevelBlocks(tr, event, editorRef, posAtCoords, editorFocused) {
|
|
51
45
|
var cursorCoords = captureCursorCoords(event, editorRef, posAtCoords, tr);
|
|
52
46
|
if (!cursorCoords) {
|
|
53
47
|
return;
|
|
@@ -101,8 +101,6 @@ export var selectNode = function selectNode(pos) {
|
|
|
101
101
|
};
|
|
102
102
|
};
|
|
103
103
|
export function createSelectionClickHandler(nodes, isValidTarget, options) {
|
|
104
|
-
// Ignored via go/ees005
|
|
105
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
106
104
|
return function handleClickOn(view, pos, node, nodePos, event, direct) {
|
|
107
105
|
if (options.useLongPressSelection) {
|
|
108
106
|
return false;
|
|
@@ -33,8 +33,6 @@ import ReactNodeView from '../react-node-view';
|
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
export var SelectionBasedNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
36
|
-
// Ignored via go/ees005
|
|
37
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
38
36
|
function SelectionBasedNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps,
|
|
39
37
|
// Ignored via go/ees005
|
|
40
38
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -43,8 +41,6 @@ export var SelectionBasedNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
43
41
|
_classCallCheck(this, SelectionBasedNodeView);
|
|
44
42
|
_this = _callSuper(this, SelectionBasedNodeView, [node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent, viewShouldUpdate]);
|
|
45
43
|
_defineProperty(_this, "isSelectedNode", false);
|
|
46
|
-
// Ignored via go/ees005
|
|
47
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
48
44
|
_defineProperty(_this, "isNodeInsideSelection", function (from, to, pos, posEnd) {
|
|
49
45
|
var _this$getPositionsWit = _this.getPositionsWithDefault(pos, posEnd);
|
|
50
46
|
pos = _this$getPositionsWit.pos;
|
|
@@ -54,8 +50,6 @@ export var SelectionBasedNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
54
50
|
}
|
|
55
51
|
return from <= pos && to >= posEnd;
|
|
56
52
|
});
|
|
57
|
-
// Ignored via go/ees005
|
|
58
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
59
53
|
_defineProperty(_this, "isSelectionInsideNode", function (from, to, pos, posEnd) {
|
|
60
54
|
var _this$getPositionsWit2 = _this.getPositionsWithDefault(pos, posEnd);
|
|
61
55
|
pos = _this$getPositionsWit2.pos;
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "99.5.
|
|
23
|
+
var packageVersion = "99.5.2";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -104,8 +104,6 @@ var Layer = /*#__PURE__*/function (_Component) {
|
|
|
104
104
|
* the bottom of the popper not being viewable.
|
|
105
105
|
* Only works if the popper uses viewport as the boundary and has a fixed position ancestor.
|
|
106
106
|
*/
|
|
107
|
-
// Ignored via go/ees005
|
|
108
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
109
107
|
}, {
|
|
110
108
|
key: "calculateMaxHeight",
|
|
111
109
|
value: function calculateMaxHeight(originalHeight, currentHeight, positionTop, cssPosition) {
|
|
@@ -21,10 +21,7 @@ export function calcPctFromPx(width, lineLength) {
|
|
|
21
21
|
return (width + MEDIA_SINGLE_GUTTER_SIZE) / maxWidth;
|
|
22
22
|
}
|
|
23
23
|
export var wrappedLayouts = ['wrap-left', 'wrap-right', 'align-end', 'align-start'];
|
|
24
|
-
export var calcPctWidth = function calcPctWidth(containerWidth, pctWidth, origWidth, origHeight
|
|
25
|
-
// Ignored via go/ees005
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
27
|
-
) {
|
|
24
|
+
export var calcPctWidth = function calcPctWidth(containerWidth, pctWidth, origWidth, origHeight) {
|
|
28
25
|
return pctWidth && origWidth && origHeight && Math.ceil(calcPxFromPct(pctWidth / 100, containerWidth.lineLength || containerWidth.width));
|
|
29
26
|
};
|
|
30
27
|
export var calcMediaPxWidth = function calcMediaPxWidth(opts) {
|
|
@@ -74,10 +71,7 @@ export var calcMediaPxWidth = function calcMediaPxWidth(opts) {
|
|
|
74
71
|
}
|
|
75
72
|
return origWidth;
|
|
76
73
|
};
|
|
77
|
-
export var snapToGrid = function snapToGrid(gridWidth, width, height, lineLength, gridSize
|
|
78
|
-
// Ignored via go/ees005
|
|
79
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
80
|
-
) {
|
|
74
|
+
export var snapToGrid = function snapToGrid(gridWidth, width, height, lineLength, gridSize) {
|
|
81
75
|
var pxWidth = calcPxFromPct(gridWidth / 100, lineLength);
|
|
82
76
|
var columnSpan = Math.round(calcColumnsFromPx(pxWidth, lineLength, gridSize));
|
|
83
77
|
var alignedWidth = calcPxFromColumns(columnSpan, lineLength, gridSize);
|
|
@@ -44,8 +44,6 @@ function getWidthIfDefaultMode(originalWidth, containerWidth, isInsideOfInlineEx
|
|
|
44
44
|
* then an image in wide or full-width can not be wider than the image's
|
|
45
45
|
* original width.
|
|
46
46
|
*/
|
|
47
|
-
// Ignored via go/ees005
|
|
48
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
49
47
|
export function calcLegacyWidth(layout, width) {
|
|
50
48
|
var containerWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
51
49
|
var fullWidthMode = arguments.length > 3 ? arguments[3] : undefined;
|
|
@@ -73,8 +71,6 @@ export function calcLegacyWidth(layout, width) {
|
|
|
73
71
|
* then an image in wide or full-width can not be wider than the image's
|
|
74
72
|
* original width.
|
|
75
73
|
*/
|
|
76
|
-
// Ignored via go/ees005
|
|
77
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
78
74
|
export function calcLegacyWidthForInline(layout, width) {
|
|
79
75
|
var containerWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
80
76
|
var fullWidthMode = arguments.length > 3 ? arguments[3] : undefined;
|
|
@@ -12,8 +12,6 @@ export function isTextNode(elem) {
|
|
|
12
12
|
/**
|
|
13
13
|
* Decides if given fitHeight fits below or above the target taking boundaries into account.
|
|
14
14
|
*/
|
|
15
|
-
// Ignored via go/ees005
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
17
15
|
export function getVerticalPlacement(target, boundariesElement, fitHeight, alignY, forcePlacement, preventOverflow) {
|
|
18
16
|
if (forcePlacement && alignY) {
|
|
19
17
|
return alignY;
|
|
@@ -50,8 +48,6 @@ export function getVerticalPlacement(target, boundariesElement, fitHeight, align
|
|
|
50
48
|
/**
|
|
51
49
|
* Decides if given fitWidth fits to the left or to the right of the target taking boundaries into account.
|
|
52
50
|
*/
|
|
53
|
-
// Ignored via go/ees005
|
|
54
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
55
51
|
export function getHorizontalPlacement(target, boundariesElement, fitWidth, alignX, forcePlacement, preventOverflow) {
|
|
56
52
|
// force placement unless preventOverflow is enabled
|
|
57
53
|
if (forcePlacement && alignX && !preventOverflow) {
|
|
@@ -80,9 +76,6 @@ export function getHorizontalPlacement(target, boundariesElement, fitWidth, alig
|
|
|
80
76
|
}
|
|
81
77
|
return 'right';
|
|
82
78
|
}
|
|
83
|
-
|
|
84
|
-
// Ignored via go/ees005
|
|
85
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
86
79
|
export function calculatePlacement(target, boundariesElement, fitWidth, fitHeight, alignX, alignY, forcePlacement, preventOverflow) {
|
|
87
80
|
return [getVerticalPlacement(target, boundariesElement, fitHeight, alignY, forcePlacement, preventOverflow), getHorizontalPlacement(target, boundariesElement, fitWidth, alignX, forcePlacement, preventOverflow)];
|
|
88
81
|
}
|
|
@@ -68,8 +68,6 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
68
68
|
displayGrid === null || displayGrid === void 0 || displayGrid(newHighlights.length > 0, gridTypeForLayout(layout), newHighlights);
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
|
-
// Ignored via go/ees005
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
73
71
|
_defineProperty(_this, "handleResize", function (_event, _direction, _elementRef, delta) {
|
|
74
72
|
var _this$props2 = _this.props,
|
|
75
73
|
highlights = _this$props2.highlights,
|
|
@@ -101,8 +99,6 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
|
|
|
101
99
|
isResizing: true
|
|
102
100
|
});
|
|
103
101
|
});
|
|
104
|
-
// Ignored via go/ees005
|
|
105
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
106
102
|
_defineProperty(_this, "handleResizeStop", function (_event, _direction, _elementRef, delta) {
|
|
107
103
|
var _this$props3 = _this.props,
|
|
108
104
|
highlights = _this$props3.highlights,
|
|
@@ -52,8 +52,6 @@ var breakoutConsts = {
|
|
|
52
52
|
calcLineLength: function calcLineLength() {
|
|
53
53
|
return breakoutConsts.defaultLayoutWidth;
|
|
54
54
|
},
|
|
55
|
-
// Ignored via go/ees005
|
|
56
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
57
55
|
calcWideWidth: function calcWideWidth() {
|
|
58
56
|
var containerWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : breakoutConsts.defaultLayoutWidth;
|
|
59
57
|
var maxWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity;
|
|
@@ -241,10 +241,7 @@ export var deleteEmptyParagraphAndMoveBlockUp = function deleteEmptyParagraphAnd
|
|
|
241
241
|
return false;
|
|
242
242
|
};
|
|
243
243
|
};
|
|
244
|
-
export var insertContentDeleteRange = function insertContentDeleteRange(tr, getSelectionResolvedPos, insertions, deletions
|
|
245
|
-
// Ignored via go/ees005
|
|
246
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
247
|
-
) {
|
|
244
|
+
export var insertContentDeleteRange = function insertContentDeleteRange(tr, getSelectionResolvedPos, insertions, deletions) {
|
|
248
245
|
insertions.forEach(function (contentInsert) {
|
|
249
246
|
var _contentInsert = _slicedToArray(contentInsert, 2),
|
|
250
247
|
content = _contentInsert[0],
|
|
@@ -98,9 +98,6 @@ export var isValidPosition = function isValidPosition(pos, state) {
|
|
|
98
98
|
export var isInLayoutColumn = function isInLayoutColumn(state) {
|
|
99
99
|
return hasParentNodeOfType(state.schema.nodes.layoutSection)(state.selection);
|
|
100
100
|
};
|
|
101
|
-
|
|
102
|
-
// Ignored via go/ees005
|
|
103
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
104
101
|
export function filterChildrenBetween(doc, from, to, predicate) {
|
|
105
102
|
var results = [];
|
|
106
103
|
doc.nodesBetween(from, to, function (node, pos, parent) {
|
|
@@ -27,10 +27,7 @@ export var createWrappingJoinRule = function createWrappingJoinRule(_ref) {
|
|
|
27
27
|
nodeType = _ref.nodeType,
|
|
28
28
|
getAttrs = _ref.getAttrs,
|
|
29
29
|
joinPredicate = _ref.joinPredicate;
|
|
30
|
-
var handler = function handler(state, match, start, end
|
|
31
|
-
// Ignored via go/ees005
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
33
|
-
) {
|
|
30
|
+
var handler = function handler(state, match, start, end) {
|
|
34
31
|
var attrs = (getAttrs instanceof Function ? getAttrs(match) : getAttrs) || {};
|
|
35
32
|
var tr = state.tr;
|
|
36
33
|
var fixedStart = Math.max(start, 1);
|
package/dist/esm/utils/nodes.js
CHANGED
|
@@ -9,8 +9,6 @@ export var findChangedNodesFromTransaction = function findChangedNodesFromTransa
|
|
|
9
9
|
var nodes = [];
|
|
10
10
|
var steps = tr.steps || [];
|
|
11
11
|
steps.forEach(function (step) {
|
|
12
|
-
// Ignored via go/ees005
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
14
12
|
step.getMap().forEach(function (oldStart, oldEnd, newStart, newEnd) {
|
|
15
13
|
tr.doc.nodesBetween(newStart, Math.min(newEnd, tr.doc.content.size), function (node) {
|
|
16
14
|
if (!nodes.find(function (n) {
|
|
@@ -61,10 +59,7 @@ export var SelectedState = /*#__PURE__*/function (SelectedState) {
|
|
|
61
59
|
* If the node is selected then an enum is returned that describes weather the node
|
|
62
60
|
* is fully selected by a range or if the "inside" of the node has been selected or clicked.
|
|
63
61
|
*/
|
|
64
|
-
export var isNodeSelectedOrInRange = function isNodeSelectedOrInRange(anchorPosition, headPosition, nodePosition, nodeSize
|
|
65
|
-
// Ignored via go/ees005
|
|
66
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
67
|
-
) {
|
|
62
|
+
export var isNodeSelectedOrInRange = function isNodeSelectedOrInRange(anchorPosition, headPosition, nodePosition, nodeSize) {
|
|
68
63
|
if (typeof nodePosition !== 'number') {
|
|
69
64
|
return null;
|
|
70
65
|
}
|
|
@@ -69,11 +69,18 @@ var getHasNestedTable = function getHasNestedTable(node) {
|
|
|
69
69
|
return hasNestedTable;
|
|
70
70
|
}
|
|
71
71
|
if (node.type === 'table') {
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
// The first node that we pass into the reduce function is a table node, and we need to ignore it
|
|
73
|
+
var foundFirstTable = false;
|
|
74
|
+
return reduce(node, function (hasNestedTable, node) {
|
|
75
|
+
if (hasNestedTable) {
|
|
76
|
+
return hasNestedTable;
|
|
77
|
+
}
|
|
78
|
+
if (node.type === 'table' && foundFirstTable) {
|
|
74
79
|
return true;
|
|
80
|
+
} else if (node.type === 'table') {
|
|
81
|
+
foundFirstTable = true;
|
|
75
82
|
}
|
|
76
|
-
return
|
|
83
|
+
return hasNestedTable;
|
|
77
84
|
}, false);
|
|
78
85
|
}
|
|
79
86
|
return hasNestedTable;
|