@atlaskit/editor-core 190.1.9 → 190.1.12
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 +15 -0
- package/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/presets/universal.js +2 -1
- package/dist/cjs/ui/ConfigPanel/utils.js +4 -3
- package/dist/cjs/ui/ContentStyles/code-block.js +2 -2
- package/dist/cjs/ui/ContentStyles/expand.js +10 -45
- package/dist/cjs/ui/ContentStyles/index.js +3 -3
- package/dist/cjs/ui/ContentStyles/panel.js +2 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/presets/universal.js +2 -1
- package/dist/es2019/ui/ConfigPanel/utils.js +5 -2
- package/dist/es2019/ui/ContentStyles/code-block.js +2 -2
- package/dist/es2019/ui/ContentStyles/expand.js +19 -64
- package/dist/es2019/ui/ContentStyles/index.js +8 -8
- package/dist/es2019/ui/ContentStyles/panel.js +2 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/presets/universal.js +2 -1
- package/dist/esm/ui/ConfigPanel/utils.js +3 -2
- package/dist/esm/ui/ContentStyles/code-block.js +2 -2
- package/dist/esm/ui/ContentStyles/expand.js +10 -46
- package/dist/esm/ui/ContentStyles/index.js +3 -3
- package/dist/esm/ui/ContentStyles/panel.js +2 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/ui/ConfigPanel/utils.d.ts +1 -0
- package/dist/types/ui/ContentStyles/code-block.d.ts +1 -2
- package/dist/types/ui/ContentStyles/expand.d.ts +1 -2
- package/dist/types/ui/ContentStyles/panel.d.ts +1 -2
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/ConfigPanel/utils.d.ts +1 -0
- package/dist/types-ts4.5/ui/ContentStyles/code-block.d.ts +1 -2
- package/dist/types-ts4.5/ui/ContentStyles/expand.d.ts +1 -2
- package/dist/types-ts4.5/ui/ContentStyles/panel.d.ts +1 -2
- package/package.json +3 -2
- package/dist/cjs/plugins/custom-autoformat/doc.js +0 -91
- package/dist/cjs/plugins/custom-autoformat/index.js +0 -131
- package/dist/cjs/plugins/custom-autoformat/input-rules.js +0 -35
- package/dist/cjs/plugins/custom-autoformat/reducers.js +0 -56
- package/dist/cjs/plugins/custom-autoformat/types.js +0 -5
- package/dist/cjs/plugins/custom-autoformat/utils.js +0 -14
- package/dist/es2019/plugins/custom-autoformat/doc.js +0 -71
- package/dist/es2019/plugins/custom-autoformat/index.js +0 -101
- package/dist/es2019/plugins/custom-autoformat/input-rules.js +0 -31
- package/dist/es2019/plugins/custom-autoformat/reducers.js +0 -40
- package/dist/es2019/plugins/custom-autoformat/types.js +0 -1
- package/dist/es2019/plugins/custom-autoformat/utils.js +0 -6
- package/dist/esm/plugins/custom-autoformat/doc.js +0 -84
- package/dist/esm/plugins/custom-autoformat/index.js +0 -124
- package/dist/esm/plugins/custom-autoformat/input-rules.js +0 -29
- package/dist/esm/plugins/custom-autoformat/reducers.js +0 -49
- package/dist/esm/plugins/custom-autoformat/types.js +0 -1
- package/dist/esm/plugins/custom-autoformat/utils.js +0 -8
- package/dist/types/plugins/custom-autoformat/doc.d.ts +0 -6
- package/dist/types/plugins/custom-autoformat/index.d.ts +0 -6
- package/dist/types/plugins/custom-autoformat/input-rules.d.ts +0 -9
- package/dist/types/plugins/custom-autoformat/reducers.d.ts +0 -4
- package/dist/types/plugins/custom-autoformat/types.d.ts +0 -31
- package/dist/types/plugins/custom-autoformat/utils.d.ts +0 -6
- package/dist/types-ts4.5/plugins/custom-autoformat/doc.d.ts +0 -6
- package/dist/types-ts4.5/plugins/custom-autoformat/index.d.ts +0 -6
- package/dist/types-ts4.5/plugins/custom-autoformat/input-rules.d.ts +0 -9
- package/dist/types-ts4.5/plugins/custom-autoformat/reducers.d.ts +0 -4
- package/dist/types-ts4.5/plugins/custom-autoformat/types.d.ts +0 -31
- package/dist/types-ts4.5/plugins/custom-autoformat/utils.d.ts +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 190.1.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#62650](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/62650) [`225557f65dcd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/225557f65dcd) - Extract custom autoformat plugin from editor-core as @atlaskit/editor-plugin-custom-autoformat
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 190.1.11
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#62670](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/62670) [`f0126343fa55`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f0126343fa55) - Adds unit tests for configuration panel utils
|
|
15
|
+
- [#62545](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/62545) [`85392e5f9be9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/85392e5f9be9) - Remove legacy theming logic from the @atlaskit/editor-common package. Theming is still available via @atlaskit/tokens.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 190.1.9
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -34,12 +34,6 @@ Object.defineProperty(exports, "collabEditPlugin", {
|
|
|
34
34
|
return _collabEdit.default;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
Object.defineProperty(exports, "customAutoformatPlugin", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function get() {
|
|
40
|
-
return _customAutoformat.default;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
37
|
Object.defineProperty(exports, "extensionPlugin", {
|
|
44
38
|
enumerable: true,
|
|
45
39
|
get: function get() {
|
|
@@ -82,7 +76,6 @@ var _jiraIssue = _interopRequireDefault(require("./jira-issue"));
|
|
|
82
76
|
var _paste = _interopRequireDefault(require("./paste"));
|
|
83
77
|
var _breakout = _interopRequireDefault(require("./breakout"));
|
|
84
78
|
var _annotation = _interopRequireDefault(require("./annotation"));
|
|
85
|
-
var _customAutoformat = _interopRequireDefault(require("./custom-autoformat"));
|
|
86
79
|
var _feedbackDialog = _interopRequireDefault(require("./feedback-dialog"));
|
|
87
80
|
var _findReplace = _interopRequireDefault(require("./find-replace"));
|
|
88
81
|
var _undoRedo = _interopRequireDefault(require("./undo-redo"));
|
|
@@ -42,6 +42,7 @@ var _editorPluginTable = require("@atlaskit/editor-plugin-table");
|
|
|
42
42
|
var _editorPluginTasksAndDecisions = require("@atlaskit/editor-plugin-tasks-and-decisions");
|
|
43
43
|
var _editorPluginTextColor = require("@atlaskit/editor-plugin-text-color");
|
|
44
44
|
var _editorPluginToolbarListsIndentation = require("@atlaskit/editor-plugin-toolbar-lists-indentation");
|
|
45
|
+
var _editorPluginCustomAutoformat = require("@atlaskit/editor-plugin-custom-autoformat");
|
|
45
46
|
var _editorPluginAlignment = require("@atlaskit/editor-plugin-alignment");
|
|
46
47
|
var _editorPluginDataConsumer = require("@atlaskit/editor-plugin-data-consumer");
|
|
47
48
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -322,7 +323,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
|
|
|
322
323
|
})]);
|
|
323
324
|
}
|
|
324
325
|
return builder;
|
|
325
|
-
}).maybeAdd(
|
|
326
|
+
}).maybeAdd(_editorPluginCustomAutoformat.customAutoformatPlugin, function (plugin, builder) {
|
|
326
327
|
if (props.autoformattingProvider) {
|
|
327
328
|
return builder.add(plugin);
|
|
328
329
|
}
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.validateRequired = exports.validate = exports.isDuplicateField = exports.getSafeParentedName = exports.getOptionFromValue = exports.getNameFromDuplicateField = exports.getLoggedParameters = void 0;
|
|
7
|
+
exports.validateRequired = exports.validate = exports.parseParamType = exports.isDuplicateField = exports.getSafeParentedName = exports.getOptionFromValue = exports.getNameFromDuplicateField = exports.getLoggedParameters = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _select = require("@atlaskit/select");
|
|
10
10
|
var _types = require("./types");
|
|
@@ -77,7 +77,7 @@ var getNameFromDuplicateField = exports.getNameFromDuplicateField = function get
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
// An overly cautious parser for sanitizing configuration parameters of UGC
|
|
80
|
-
var parseParamType = function parseParamType(paramValue, paramField) {
|
|
80
|
+
var parseParamType = exports.parseParamType = function parseParamType(paramValue, paramField) {
|
|
81
81
|
if (paramValue && paramField) {
|
|
82
82
|
if (paramField.type === 'string') {
|
|
83
83
|
if (paramField.name === 'types') {
|
|
@@ -106,7 +106,8 @@ var parseParamType = function parseParamType(paramValue, paramField) {
|
|
|
106
106
|
var getLoggedParameters = exports.getLoggedParameters = function getLoggedParameters(macroKey, currentParams, macroFields) {
|
|
107
107
|
// Get the parameters only defined in the allowlist of logged macro/parameter keys
|
|
108
108
|
return Object.keys(currentParams).filter(function (paramKey) {
|
|
109
|
-
|
|
109
|
+
var _ALLOWED_LOGGED_MACRO;
|
|
110
|
+
return (_ALLOWED_LOGGED_MACRO = _constants.ALLOWED_LOGGED_MACRO_PARAMS[macroKey]) === null || _ALLOWED_LOGGED_MACRO === void 0 ? void 0 : _ALLOWED_LOGGED_MACRO.includes(paramKey);
|
|
110
111
|
}).reduce(function (obj, param) {
|
|
111
112
|
return _objectSpread(_objectSpread({}, obj), {}, (0, _defineProperty2.default)({}, param, parseParamType(currentParams[param], macroFields === null || macroFields === void 0 ? void 0 : macroFields.find(function (field) {
|
|
112
113
|
return field.name === param;
|
|
@@ -14,6 +14,6 @@ var _templateObject, _templateObject2;
|
|
|
14
14
|
var GutterDangerOverlay = function GutterDangerOverlay() {
|
|
15
15
|
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &::after {\n height: 100%;\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 24px;\n background-color: ", ";\n }\n"])), "var(--ds-blanket-danger, none)");
|
|
16
16
|
};
|
|
17
|
-
var codeBlockStyles = exports.codeBlockStyles = function codeBlockStyles(
|
|
18
|
-
return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", "\n }\n\n .ProseMirror li {\n /* if same list item has multiple code blocks we need top margin for all but first */\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n"])), (0, _styles.codeBlockSharedStyles)(
|
|
17
|
+
var codeBlockStyles = exports.codeBlockStyles = function codeBlockStyles() {
|
|
18
|
+
return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", "\n }\n\n .ProseMirror li {\n /* if same list item has multiple code blocks we need top margin for all but first */\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n"])), (0, _styles.codeBlockSharedStyles)(), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, ".concat(_colors.R75, ")"), "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, rgba(255, 143, 115, 0.5))", "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, rgba(255, 189, 173, 0.5))");
|
|
19
19
|
};
|
|
@@ -8,59 +8,24 @@ exports.expandStyles = void 0;
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
-
var _components = require("@atlaskit/theme/components");
|
|
12
11
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
13
12
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
14
13
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
|
-
var _templateObject, _templateObject2;
|
|
16
|
-
var EXPAND_SELECTED_BACKGROUND = (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
22
|
-
var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR(props) {
|
|
23
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), (0, _components.themed)({
|
|
24
|
-
light: "var(--ds-icon-subtle, ".concat(_colors.N80A, ")"),
|
|
25
|
-
dark: "var(--ds-icon-subtle, #d9dde3)"
|
|
26
|
-
})(props));
|
|
14
|
+
var _templateObject, _templateObject2;
|
|
15
|
+
var EXPAND_SELECTED_BACKGROUND = "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))";
|
|
16
|
+
var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR() {
|
|
17
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), "var(--ds-icon-subtle, ".concat(_colors.N80A, ")"));
|
|
27
18
|
};
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
});
|
|
31
|
-
var ACTIVE_STATE_BORDER = (0, _components.themed)({
|
|
32
|
-
dark: "1px solid ".concat("var(--ds-border-selected, ".concat("#4794ff4B", ")"))
|
|
33
|
-
});
|
|
34
|
-
var ACTIVE_STATE_BORDER_RADIUS = (0, _components.themed)({
|
|
35
|
-
dark: '3px'
|
|
36
|
-
});
|
|
37
|
-
var DANGER_STATE_BACKGROUND_COLOR = (0, _components.themed)({
|
|
38
|
-
light: "var(--ds-background-danger, ".concat(_colors.R50, ")"),
|
|
39
|
-
dark: "var(--ds-background-danger, #441C13)"
|
|
40
|
-
});
|
|
41
|
-
var DANGER_STATE_BORDER = (0, _components.themed)({
|
|
42
|
-
dark: "1px solid ".concat("var(--ds-border-danger, ".concat(_colors.R200, ")"))
|
|
43
|
-
});
|
|
44
|
-
var DANGER_STATE_BORDER_COLOR = (0, _components.themed)({
|
|
45
|
-
light: "var(--ds-border-danger, ".concat(_colors.R300, ")")
|
|
46
|
-
});
|
|
47
|
-
var DANGER_STATE_BORDER_RADIUS = (0, _components.themed)({
|
|
48
|
-
dark: '3px'
|
|
49
|
-
});
|
|
19
|
+
var DANGER_STATE_BACKGROUND_COLOR = "var(--ds-background-danger, ".concat(_colors.R50, ")");
|
|
20
|
+
var DANGER_STATE_BORDER_COLOR = "var(--ds-border-danger, ".concat(_colors.R300, ")");
|
|
50
21
|
|
|
51
22
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
52
|
-
var expandStyles = exports.expandStyles = function expandStyles(
|
|
53
|
-
return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .", " > div {\n display: flex;\n }\n\n .", " {\n ", "\n overflow: hidden;\n cursor: pointer;\n box-sizing: border-box;\n\n td > & {\n margin-top: 0;\n }\n\n .", " svg {\n ", ";\n transform: rotate(90deg);\n }\n\n &.", ":not(.danger) {\n ", "\n
|
|
23
|
+
var expandStyles = exports.expandStyles = function expandStyles() {
|
|
24
|
+
return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .", " > div {\n display: flex;\n }\n\n .", " {\n ", "\n overflow: hidden;\n cursor: pointer;\n box-sizing: border-box;\n\n td > & {\n margin-top: 0;\n }\n\n .", " svg {\n ", ";\n transform: rotate(90deg);\n }\n\n &.", ":not(.danger) {\n ", "\n }\n\n &.danger {\n background: ", ";\n border-color: ", ";\n }\n }\n\n .ProseMirror\n > .", ",\n .", "\n > .", " {\n margin-left: -", "px;\n margin-right: -", "px;\n }\n\n .", " {\n ", "\n cursor: text;\n padding-top: 0px;\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", ";\n align-items: center;\n overflow: visible;\n }\n\n .", " {\n background: ", ";\n border-color: ", ";\n\n .", " {\n padding-top: ", ";\n }\n }\n\n .", " {\n width: 100%;\n }\n\n /* stylelint-disable property-no-unknown, value-keyword-case */\n .", ":(.", ") {\n .expand-content-wrapper {\n height: auto;\n }\n }\n /* stylelint-enable property-no-unknown, value-keyword-case */\n\n .", ":not(.", ") {\n .ak-editor-expand__content {\n position: absolute;\n height: 1px;\n width: 1px;\n overflow: hidden;\n clip: rect(1px, 1px, 1px, 1px);\n white-space: nowrap;\n }\n\n .", " svg {\n ", ";\n transform: rotate(0deg);\n }\n\n &:not(.", "):not(.danger) {\n background: transparent;\n border-color: transparent;\n\n &:hover {\n border-color: ", ";\n background: ", ";\n }\n }\n }\n"])), _styles.expandClassNames.icon, _styles.expandClassNames.prefix, _ui.sharedExpandStyles.containerStyles({
|
|
54
25
|
expanded: false,
|
|
55
26
|
focused: false
|
|
56
|
-
})(
|
|
27
|
+
})(), _styles.expandClassNames.iconContainer, EXPAND_ICON_COLOR(), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.Border]), DANGER_STATE_BACKGROUND_COLOR, DANGER_STATE_BORDER_COLOR, _styles.expandClassNames.type('expand'), _styles.BreakoutCssClassName.BREAKOUT_MARK_DOM, _styles.expandClassNames.type('expand'), _editorSharedStyles.akLayoutGutterOffset, _editorSharedStyles.akLayoutGutterOffset, _styles.expandClassNames.content, _ui.sharedExpandStyles.contentStyles({
|
|
57
28
|
expanded: false,
|
|
58
29
|
focused: false
|
|
59
|
-
})(
|
|
60
|
-
light: "var(--ds-border, ".concat(_colors.N40A, ")"),
|
|
61
|
-
dark: "var(--ds-border, ".concat(_colors.DN50, ")")
|
|
62
|
-
})(props), _styles.expandClassNames.content, "var(--ds-space-100, 8px)", _styles.expandClassNames.inputContainer, _styles.expandClassNames.prefix, _styles.expandClassNames.expanded, _styles.expandClassNames.prefix, _styles.expandClassNames.expanded, _styles.expandClassNames.iconContainer, EXPAND_ICON_COLOR(props), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _components.themed)({
|
|
63
|
-
light: "var(--ds-border, ".concat(_colors.N50A, ")"),
|
|
64
|
-
dark: "var(--ds-border, ".concat(_colors.DN50, ")")
|
|
65
|
-
})(props), EXPAND_SELECTED_BACKGROUND(props));
|
|
30
|
+
})(), _styles.expandClassNames.titleInput, _ui.sharedExpandStyles.titleInputStyles(), _styles.expandClassNames.titleContainer, _ui.sharedExpandStyles.titleContainerStyles(), _styles.expandClassNames.expanded, EXPAND_SELECTED_BACKGROUND, "var(--ds-border, ".concat(_colors.N40A, ")"), _styles.expandClassNames.content, "var(--ds-space-100, 8px)", _styles.expandClassNames.inputContainer, _styles.expandClassNames.prefix, _styles.expandClassNames.expanded, _styles.expandClassNames.prefix, _styles.expandClassNames.expanded, _styles.expandClassNames.iconContainer, EXPAND_ICON_COLOR(), _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border, ".concat(_colors.N50A, ")"), EXPAND_SELECTED_BACKGROUND);
|
|
66
31
|
};
|
|
@@ -37,8 +37,8 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
37
37
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
38
38
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
39
39
|
var linkStyles = exports.linkStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", "\n }\n"])), _styles.linkSharedStyle);
|
|
40
|
-
var ruleStyles = function ruleStyles(
|
|
41
|
-
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", ";\n\n hr {\n cursor: pointer;\n padding: ", " 0;\n margin: calc(", "em - 4px) 0;\n background-clip: content-box;\n\n &.", " {\n outline: none;\n background-color: ", ";\n }\n }\n }\n"])), (0, _styles.ruleSharedStyles)(
|
|
40
|
+
var ruleStyles = function ruleStyles() {
|
|
41
|
+
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", ";\n\n hr {\n cursor: pointer;\n padding: ", " 0;\n margin: calc(", "em - 4px) 0;\n background-clip: content-box;\n\n &.", " {\n outline: none;\n background-color: ", ";\n }\n }\n }\n"])), (0, _styles.ruleSharedStyles)(), "var(--ds-space-050, 4px)", _editorSharedStyles.akEditorLineHeight, _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(_editorSharedStyles.akEditorSelectedBorderColor, ")"));
|
|
42
42
|
};
|
|
43
43
|
var mentionsStyles = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n &.", " [data-mention-id] > span {\n ", "\n\n /* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n }\n }\n\n .danger {\n .", ".", "\n > span\n > span\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n background-color: ", ";\n }\n .", " > span > span > span {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, ".concat(_colors.N500, ")"), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _mention.MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, ".concat(_colors.N30A, ")"), "var(--ds-text-subtle, ".concat(_colors.N500, ")"));
|
|
44
44
|
var listsStyles = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n li {\n position: relative;\n\n > p:not(:first-child) {\n margin: ", " 0 0 0;\n }\n\n // In SSR the above rule will apply to all p tags because first-child would be a style tag.\n // The following rule resets the first p tag back to its original margin\n // defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n > style:first-child + p {\n margin-top: ", ";\n }\n }\n\n &:not([data-node-type='decisionList']) > li,\n // This prevents https://product-fabric.atlassian.net/browse/ED-20924\n &:not(.", ") > li {\n ", "\n }\n }\n"])), "var(--ds-space-050, 4px)", _editorSharedStyles.blockNodesVerticalMargin, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _utils.browser.safari ? _styles.codeBlockInListSafariFix : '');
|
|
@@ -47,7 +47,7 @@ var placeholderStyles = exports.placeholderStyles = (0, _react2.css)(_templateOb
|
|
|
47
47
|
var contentStyles = function contentStyles(props) {
|
|
48
48
|
return (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), (0, _editorSharedStyles.editorFontSize)({
|
|
49
49
|
theme: props.theme
|
|
50
|
-
}), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _codeBlock.codeBlockStyles)(
|
|
50
|
+
}), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _codeBlock.codeBlockStyles)(), (0, _styles3.blocktypeStyles)(), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, listsStyles, ruleStyles(), _media.mediaStyles, (0, _layout.layoutStyles)(props), _styles2.telepointerStyle, _selection.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _panel.panelStyles)(), mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), _styles6.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, _status.statusStyles, (0, _styles.annotationSharedStyles)(), _styles.smartCardStyles, _styles.smartCardSharedStyles, _date.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
51
51
|
};
|
|
52
52
|
var createEditorContentStyle = exports.createEditorContentStyle = function createEditorContentStyle(styles) {
|
|
53
53
|
return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
@@ -10,6 +10,6 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _panel = require("@atlaskit/editor-common/panel");
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
12
|
var _templateObject;
|
|
13
|
-
var panelStyles = exports.panelStyles = function panelStyles(
|
|
14
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .", " {\n cursor: pointer;\n\n /* Danger when top level node */\n &.danger {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", " !important;\n\n .", " {\n color: ", " !important;\n }\n }\n }\n\n .", " {\n cursor: text;\n }\n\n /* Danger when nested node */\n .danger .", " {\n &[data-panel-type] {\n background-color: ", ";\n\n .", " {\n color: ", ";\n }\n }\n }\n\n ", ";\n }\n\n .", ".", ":not(.danger) {\n ", "\n }\n"])), _panel.PanelSharedCssClassName.prefix, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _panel.PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _panel.PanelSharedCssClassName.content, _panel.PanelSharedCssClassName.prefix, "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _panel.PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), (0, _panel.panelSharedStyles)(
|
|
13
|
+
var panelStyles = exports.panelStyles = function panelStyles() {
|
|
14
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .", " {\n cursor: pointer;\n\n /* Danger when top level node */\n &.danger {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", " !important;\n\n .", " {\n color: ", " !important;\n }\n }\n }\n\n .", " {\n cursor: text;\n }\n\n /* Danger when nested node */\n .danger .", " {\n &[data-panel-type] {\n background-color: ", ";\n\n .", " {\n color: ", ";\n }\n }\n }\n\n ", ";\n }\n\n .", ".", ":not(.danger) {\n ", "\n }\n"])), _panel.PanelSharedCssClassName.prefix, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _panel.PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _panel.PanelSharedCssClassName.content, _panel.PanelSharedCssClassName.prefix, "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _panel.PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), (0, _panel.panelSharedStyles)(), _panel.PanelSharedCssClassName.prefix, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]));
|
|
15
15
|
};
|
|
@@ -4,7 +4,6 @@ export { default as jiraIssuePlugin } from './jira-issue';
|
|
|
4
4
|
export { default as pastePlugin } from './paste';
|
|
5
5
|
export { default as breakoutPlugin } from './breakout';
|
|
6
6
|
export { default as annotationPlugin } from './annotation';
|
|
7
|
-
export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
8
7
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
9
8
|
export { default as findReplacePlugin } from './find-replace';
|
|
10
9
|
export { default as undoRedoPlugin } from './undo-redo';
|
|
@@ -32,10 +32,11 @@ import { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
|
32
32
|
import { tasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
|
|
33
33
|
import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
|
|
34
34
|
import { toolbarListsIndentationPlugin } from '@atlaskit/editor-plugin-toolbar-lists-indentation';
|
|
35
|
+
import { customAutoformatPlugin } from '@atlaskit/editor-plugin-custom-autoformat';
|
|
35
36
|
import { alignmentPlugin } from '@atlaskit/editor-plugin-alignment';
|
|
36
37
|
import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
37
38
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
38
|
-
import { annotationPlugin, avatarGroupPlugin, beforePrimaryToolbarPlugin, breakoutPlugin, collabEditPlugin,
|
|
39
|
+
import { annotationPlugin, avatarGroupPlugin, beforePrimaryToolbarPlugin, breakoutPlugin, collabEditPlugin, extensionPlugin, feedbackDialogPlugin, findReplacePlugin, jiraIssuePlugin } from '../plugins';
|
|
39
40
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
40
41
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
41
42
|
import { createDefaultPreset } from './default';
|
|
@@ -50,7 +50,7 @@ export const isDuplicateField = key => duplicateFieldRegex.test(key);
|
|
|
50
50
|
export const getNameFromDuplicateField = key => key.replace(duplicateFieldRegex, '');
|
|
51
51
|
|
|
52
52
|
// An overly cautious parser for sanitizing configuration parameters of UGC
|
|
53
|
-
const parseParamType = (paramValue, paramField) => {
|
|
53
|
+
export const parseParamType = (paramValue, paramField) => {
|
|
54
54
|
if (paramValue && paramField) {
|
|
55
55
|
if (paramField.type === 'string') {
|
|
56
56
|
if (paramField.name === 'types') {
|
|
@@ -74,7 +74,10 @@ const parseParamType = (paramValue, paramField) => {
|
|
|
74
74
|
};
|
|
75
75
|
export const getLoggedParameters = (macroKey, currentParams, macroFields) => {
|
|
76
76
|
// Get the parameters only defined in the allowlist of logged macro/parameter keys
|
|
77
|
-
return Object.keys(currentParams).filter(paramKey =>
|
|
77
|
+
return Object.keys(currentParams).filter(paramKey => {
|
|
78
|
+
var _ALLOWED_LOGGED_MACRO;
|
|
79
|
+
return (_ALLOWED_LOGGED_MACRO = ALLOWED_LOGGED_MACRO_PARAMS[macroKey]) === null || _ALLOWED_LOGGED_MACRO === void 0 ? void 0 : _ALLOWED_LOGGED_MACRO.includes(paramKey);
|
|
80
|
+
}).reduce((obj, param) => {
|
|
78
81
|
return {
|
|
79
82
|
...obj,
|
|
80
83
|
[param]: parseParamType(currentParams[param], macroFields === null || macroFields === void 0 ? void 0 : macroFields.find(field => field.name === param))
|
|
@@ -13,9 +13,9 @@ const GutterDangerOverlay = () => css`
|
|
|
13
13
|
background-color: ${"var(--ds-blanket-danger, none)"};
|
|
14
14
|
}
|
|
15
15
|
`;
|
|
16
|
-
export const codeBlockStyles =
|
|
16
|
+
export const codeBlockStyles = () => css`
|
|
17
17
|
.ProseMirror {
|
|
18
|
-
${codeBlockSharedStyles(
|
|
18
|
+
${codeBlockSharedStyles()}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.ProseMirror li {
|
|
@@ -1,48 +1,18 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import {
|
|
3
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
4
|
-
import { themed } from '@atlaskit/theme/components';
|
|
2
|
+
import { N40A, N50A, N80A, R300, R50 } from '@atlaskit/theme/colors';
|
|
5
3
|
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
6
4
|
import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
|
|
7
5
|
import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
8
6
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
9
|
-
const EXPAND_SELECTED_BACKGROUND =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
15
|
-
const EXPAND_ICON_COLOR = props => css`
|
|
16
|
-
color: ${themed({
|
|
17
|
-
light: `var(--ds-icon-subtle, ${N80A})`,
|
|
18
|
-
dark: "var(--ds-icon-subtle, #d9dde3)"
|
|
19
|
-
})(props)};
|
|
7
|
+
const EXPAND_SELECTED_BACKGROUND = "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))";
|
|
8
|
+
const EXPAND_ICON_COLOR = () => css`
|
|
9
|
+
color: ${`var(--ds-icon-subtle, ${N80A})`};
|
|
20
10
|
`;
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
const ACTIVE_STATE_BORDER = themed({
|
|
25
|
-
dark: `1px solid ${`var(--ds-border-selected, ${`#4794ff4B`})`}`
|
|
26
|
-
});
|
|
27
|
-
const ACTIVE_STATE_BORDER_RADIUS = themed({
|
|
28
|
-
dark: '3px'
|
|
29
|
-
});
|
|
30
|
-
const DANGER_STATE_BACKGROUND_COLOR = themed({
|
|
31
|
-
light: `var(--ds-background-danger, ${R50})`,
|
|
32
|
-
dark: "var(--ds-background-danger, #441C13)"
|
|
33
|
-
});
|
|
34
|
-
const DANGER_STATE_BORDER = themed({
|
|
35
|
-
dark: `1px solid ${`var(--ds-border-danger, ${R200})`}`
|
|
36
|
-
});
|
|
37
|
-
const DANGER_STATE_BORDER_COLOR = themed({
|
|
38
|
-
light: `var(--ds-border-danger, ${R300})`
|
|
39
|
-
});
|
|
40
|
-
const DANGER_STATE_BORDER_RADIUS = themed({
|
|
41
|
-
dark: '3px'
|
|
42
|
-
});
|
|
11
|
+
const DANGER_STATE_BACKGROUND_COLOR = `var(--ds-background-danger, ${R50})`;
|
|
12
|
+
const DANGER_STATE_BORDER_COLOR = `var(--ds-border-danger, ${R300})`;
|
|
43
13
|
|
|
44
14
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
45
|
-
export const expandStyles =
|
|
15
|
+
export const expandStyles = () => css`
|
|
46
16
|
.${expandClassNames.icon} > div {
|
|
47
17
|
display: flex;
|
|
48
18
|
}
|
|
@@ -51,7 +21,7 @@ export const expandStyles = props => css`
|
|
|
51
21
|
${sharedExpandStyles.containerStyles({
|
|
52
22
|
expanded: false,
|
|
53
23
|
focused: false
|
|
54
|
-
})(
|
|
24
|
+
})()}
|
|
55
25
|
overflow: hidden;
|
|
56
26
|
cursor: pointer;
|
|
57
27
|
box-sizing: border-box;
|
|
@@ -61,26 +31,17 @@ export const expandStyles = props => css`
|
|
|
61
31
|
}
|
|
62
32
|
|
|
63
33
|
.${expandClassNames.iconContainer} svg {
|
|
64
|
-
${EXPAND_ICON_COLOR(
|
|
34
|
+
${EXPAND_ICON_COLOR()};
|
|
65
35
|
transform: rotate(90deg);
|
|
66
36
|
}
|
|
67
37
|
|
|
68
38
|
&.${akEditorSelectedNodeClassName}:not(.danger) {
|
|
69
39
|
${getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.Border])}
|
|
70
|
-
|
|
71
|
-
::after {
|
|
72
|
-
// Custom background color and borders (for dark theme).
|
|
73
|
-
background-color: ${ACTIVE_STATE_BACKGROUND_COLOR(props)};
|
|
74
|
-
border: ${ACTIVE_STATE_BORDER(props)};
|
|
75
|
-
border-radius: ${ACTIVE_STATE_BORDER_RADIUS(props)};
|
|
76
|
-
}
|
|
77
40
|
}
|
|
78
41
|
|
|
79
42
|
&.danger {
|
|
80
|
-
background: ${DANGER_STATE_BACKGROUND_COLOR
|
|
81
|
-
border: ${
|
|
82
|
-
border-color: ${DANGER_STATE_BORDER_COLOR(props)};
|
|
83
|
-
border-radius: ${DANGER_STATE_BORDER_RADIUS(props)};
|
|
43
|
+
background: ${DANGER_STATE_BACKGROUND_COLOR};
|
|
44
|
+
border-color: ${DANGER_STATE_BORDER_COLOR};
|
|
84
45
|
}
|
|
85
46
|
}
|
|
86
47
|
|
|
@@ -96,27 +57,24 @@ export const expandStyles = props => css`
|
|
|
96
57
|
${sharedExpandStyles.contentStyles({
|
|
97
58
|
expanded: false,
|
|
98
59
|
focused: false
|
|
99
|
-
})(
|
|
60
|
+
})()}
|
|
100
61
|
cursor: text;
|
|
101
62
|
padding-top: 0px;
|
|
102
63
|
}
|
|
103
64
|
|
|
104
65
|
.${expandClassNames.titleInput} {
|
|
105
|
-
${sharedExpandStyles.titleInputStyles(
|
|
66
|
+
${sharedExpandStyles.titleInputStyles()}
|
|
106
67
|
}
|
|
107
68
|
|
|
108
69
|
.${expandClassNames.titleContainer} {
|
|
109
|
-
${sharedExpandStyles.titleContainerStyles(
|
|
70
|
+
${sharedExpandStyles.titleContainerStyles()};
|
|
110
71
|
align-items: center;
|
|
111
72
|
overflow: visible;
|
|
112
73
|
}
|
|
113
74
|
|
|
114
75
|
.${expandClassNames.expanded} {
|
|
115
|
-
background: ${EXPAND_SELECTED_BACKGROUND
|
|
116
|
-
border-color: ${
|
|
117
|
-
light: `var(--ds-border, ${N40A})`,
|
|
118
|
-
dark: `var(--ds-border, ${DN50})`
|
|
119
|
-
})(props)};
|
|
76
|
+
background: ${EXPAND_SELECTED_BACKGROUND};
|
|
77
|
+
border-color: ${`var(--ds-border, ${N40A})`};
|
|
120
78
|
|
|
121
79
|
.${expandClassNames.content} {
|
|
122
80
|
padding-top: ${"var(--ds-space-100, 8px)"};
|
|
@@ -146,7 +104,7 @@ export const expandStyles = props => css`
|
|
|
146
104
|
}
|
|
147
105
|
|
|
148
106
|
.${expandClassNames.iconContainer} svg {
|
|
149
|
-
${EXPAND_ICON_COLOR(
|
|
107
|
+
${EXPAND_ICON_COLOR()};
|
|
150
108
|
transform: rotate(0deg);
|
|
151
109
|
}
|
|
152
110
|
|
|
@@ -155,11 +113,8 @@ export const expandStyles = props => css`
|
|
|
155
113
|
border-color: transparent;
|
|
156
114
|
|
|
157
115
|
&:hover {
|
|
158
|
-
border-color: ${
|
|
159
|
-
|
|
160
|
-
dark: `var(--ds-border, ${DN50})`
|
|
161
|
-
})(props)};
|
|
162
|
-
background: ${EXPAND_SELECTED_BACKGROUND(props)};
|
|
116
|
+
border-color: ${`var(--ds-border, ${N50A})`};
|
|
117
|
+
background: ${EXPAND_SELECTED_BACKGROUND};
|
|
163
118
|
}
|
|
164
119
|
}
|
|
165
120
|
}
|
|
@@ -31,9 +31,9 @@ export const linkStyles = css`
|
|
|
31
31
|
${linkSharedStyle}
|
|
32
32
|
}
|
|
33
33
|
`;
|
|
34
|
-
const ruleStyles =
|
|
34
|
+
const ruleStyles = () => css`
|
|
35
35
|
.ProseMirror {
|
|
36
|
-
${ruleSharedStyles(
|
|
36
|
+
${ruleSharedStyles()};
|
|
37
37
|
|
|
38
38
|
hr {
|
|
39
39
|
cursor: pointer;
|
|
@@ -171,19 +171,19 @@ const contentStyles = props => css`
|
|
|
171
171
|
|
|
172
172
|
${placeholderTextStyles}
|
|
173
173
|
${placeholderStyles}
|
|
174
|
-
${codeBlockStyles(
|
|
174
|
+
${codeBlockStyles()}
|
|
175
175
|
|
|
176
176
|
${blocktypeStyles()}
|
|
177
|
-
${codeMarkSharedStyles(
|
|
177
|
+
${codeMarkSharedStyles()}
|
|
178
178
|
${textColorStyles}
|
|
179
179
|
${listsStyles}
|
|
180
|
-
${ruleStyles(
|
|
180
|
+
${ruleStyles()}
|
|
181
181
|
${mediaStyles}
|
|
182
182
|
${layoutStyles(props)}
|
|
183
183
|
${telepointerStyle}
|
|
184
184
|
${gapCursorStyles};
|
|
185
185
|
${tableStyles(props)}
|
|
186
|
-
${panelStyles(
|
|
186
|
+
${panelStyles()}
|
|
187
187
|
${mentionsStyles}
|
|
188
188
|
${emojiStyles}
|
|
189
189
|
${tasksAndDecisionsStyles}
|
|
@@ -192,12 +192,12 @@ const contentStyles = props => css`
|
|
|
192
192
|
${blockMarksSharedStyles}
|
|
193
193
|
${dateSharedStyle}
|
|
194
194
|
${extensionStyles}
|
|
195
|
-
${expandStyles(
|
|
195
|
+
${expandStyles()}
|
|
196
196
|
${findReplaceStyles}
|
|
197
197
|
${textHighlightStyle}
|
|
198
198
|
${taskDecisionStyles}
|
|
199
199
|
${statusStyles}
|
|
200
|
-
${annotationSharedStyles(
|
|
200
|
+
${annotationSharedStyles()}
|
|
201
201
|
${smartCardStyles}
|
|
202
202
|
${smartCardSharedStyles}
|
|
203
203
|
${dateStyles}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { panelSharedStyles, PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
3
3
|
import { SelectionStyle, getSelectionStyles, akEditorDeleteBackground, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorDeleteIconColor, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
export const panelStyles =
|
|
4
|
+
export const panelStyles = () => css`
|
|
5
5
|
.ProseMirror {
|
|
6
6
|
.${PanelSharedCssClassName.prefix} {
|
|
7
7
|
cursor: pointer;
|
|
@@ -33,7 +33,7 @@ export const panelStyles = props => css`
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
${panelSharedStyles(
|
|
36
|
+
${panelSharedStyles()};
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.${PanelSharedCssClassName.prefix}.${akEditorSelectedNodeClassName}:not(.danger) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "190.1.
|
|
2
|
+
export const version = "190.1.12";
|
|
@@ -4,7 +4,6 @@ export { default as jiraIssuePlugin } from './jira-issue';
|
|
|
4
4
|
export { default as pastePlugin } from './paste';
|
|
5
5
|
export { default as breakoutPlugin } from './breakout';
|
|
6
6
|
export { default as annotationPlugin } from './annotation';
|
|
7
|
-
export { default as customAutoformatPlugin } from './custom-autoformat';
|
|
8
7
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
9
8
|
export { default as findReplacePlugin } from './find-replace';
|
|
10
9
|
export { default as undoRedoPlugin } from './undo-redo';
|
|
@@ -36,10 +36,11 @@ import { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
|
36
36
|
import { tasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
|
|
37
37
|
import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
|
|
38
38
|
import { toolbarListsIndentationPlugin } from '@atlaskit/editor-plugin-toolbar-lists-indentation';
|
|
39
|
+
import { customAutoformatPlugin } from '@atlaskit/editor-plugin-custom-autoformat';
|
|
39
40
|
import { alignmentPlugin } from '@atlaskit/editor-plugin-alignment';
|
|
40
41
|
import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
41
42
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
42
|
-
import { annotationPlugin, avatarGroupPlugin, beforePrimaryToolbarPlugin, breakoutPlugin, collabEditPlugin,
|
|
43
|
+
import { annotationPlugin, avatarGroupPlugin, beforePrimaryToolbarPlugin, breakoutPlugin, collabEditPlugin, extensionPlugin, feedbackDialogPlugin, findReplacePlugin, jiraIssuePlugin } from '../plugins';
|
|
43
44
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
44
45
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
45
46
|
import { createDefaultPreset } from './default';
|
|
@@ -70,7 +70,7 @@ export var getNameFromDuplicateField = function getNameFromDuplicateField(key) {
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
// An overly cautious parser for sanitizing configuration parameters of UGC
|
|
73
|
-
var parseParamType = function parseParamType(paramValue, paramField) {
|
|
73
|
+
export var parseParamType = function parseParamType(paramValue, paramField) {
|
|
74
74
|
if (paramValue && paramField) {
|
|
75
75
|
if (paramField.type === 'string') {
|
|
76
76
|
if (paramField.name === 'types') {
|
|
@@ -99,7 +99,8 @@ var parseParamType = function parseParamType(paramValue, paramField) {
|
|
|
99
99
|
export var getLoggedParameters = function getLoggedParameters(macroKey, currentParams, macroFields) {
|
|
100
100
|
// Get the parameters only defined in the allowlist of logged macro/parameter keys
|
|
101
101
|
return Object.keys(currentParams).filter(function (paramKey) {
|
|
102
|
-
|
|
102
|
+
var _ALLOWED_LOGGED_MACRO;
|
|
103
|
+
return (_ALLOWED_LOGGED_MACRO = ALLOWED_LOGGED_MACRO_PARAMS[macroKey]) === null || _ALLOWED_LOGGED_MACRO === void 0 ? void 0 : _ALLOWED_LOGGED_MACRO.includes(paramKey);
|
|
103
104
|
}).reduce(function (obj, param) {
|
|
104
105
|
return _objectSpread(_objectSpread({}, obj), {}, _defineProperty({}, param, parseParamType(currentParams[param], macroFields === null || macroFields === void 0 ? void 0 : macroFields.find(function (field) {
|
|
105
106
|
return field.name === param;
|
|
@@ -7,6 +7,6 @@ import { codeBlockSharedStyles, CodeBlockSharedCssClassName } from '@atlaskit/ed
|
|
|
7
7
|
var GutterDangerOverlay = function GutterDangerOverlay() {
|
|
8
8
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &::after {\n height: 100%;\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 24px;\n background-color: ", ";\n }\n"])), "var(--ds-blanket-danger, none)");
|
|
9
9
|
};
|
|
10
|
-
export var codeBlockStyles = function codeBlockStyles(
|
|
11
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror {\n ", "\n }\n\n .ProseMirror li {\n /* if same list item has multiple code blocks we need top margin for all but first */\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n"])), codeBlockSharedStyles(
|
|
10
|
+
export var codeBlockStyles = function codeBlockStyles() {
|
|
11
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror {\n ", "\n }\n\n .ProseMirror li {\n /* if same list item has multiple code blocks we need top margin for all but first */\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n"])), codeBlockSharedStyles(), blockNodesVerticalMargin, blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, ".concat(R75, ")"), "var(--ds-text-danger, ".concat(akEditorDeleteIconColor, ")"), GutterDangerOverlay(), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, ".concat(akEditorDeleteBackground, ")"), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, rgba(255, 143, 115, 0.5))", "var(--ds-text-danger, ".concat(akEditorDeleteIconColor, ")"), GutterDangerOverlay(), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, rgba(255, 189, 173, 0.5))");
|
|
12
12
|
};
|