@atlaskit/editor-core 190.1.9 → 190.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 190.1.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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
8
+ - [#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.
9
+ - Updated dependencies
10
+
3
11
  ## 190.1.9
4
12
 
5
13
  ### Patch Changes
@@ -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
- return _constants.ALLOWED_LOGGED_MACRO_PARAMS[macroKey].includes(paramKey);
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(props) {
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)(props), _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))");
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; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
16
- var EXPAND_SELECTED_BACKGROUND = (0, _components.themed)({
17
- light: "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))",
18
- dark: "var(--ds-background-neutral-subtle, rgba(9, 10, 11, 0.29))"
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 ACTIVE_STATE_BACKGROUND_COLOR = (0, _components.themed)({
29
- dark: "var(--ds-blanket-selected, ".concat("#0C294F4B", ")")
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(props) {
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\n ::after {\n // Custom background color and borders (for dark theme).\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n }\n }\n\n &.danger {\n background: ", ";\n border: ", ";\n border-color: ", ";\n border-radius: ", ";\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({
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
- })(props), _styles.expandClassNames.iconContainer, EXPAND_ICON_COLOR(props), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.Border]), ACTIVE_STATE_BACKGROUND_COLOR(props), ACTIVE_STATE_BORDER(props), ACTIVE_STATE_BORDER_RADIUS(props), DANGER_STATE_BACKGROUND_COLOR(props), DANGER_STATE_BORDER(props), DANGER_STATE_BORDER_COLOR(props), DANGER_STATE_BORDER_RADIUS(props), _styles.expandClassNames.type('expand'), _styles.BreakoutCssClassName.BREAKOUT_MARK_DOM, _styles.expandClassNames.type('expand'), _editorSharedStyles.akLayoutGutterOffset, _editorSharedStyles.akLayoutGutterOffset, _styles.expandClassNames.content, _ui.sharedExpandStyles.contentStyles({
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
- })(props), _styles.expandClassNames.titleInput, _ui.sharedExpandStyles.titleInputStyles(props), _styles.expandClassNames.titleContainer, _ui.sharedExpandStyles.titleContainerStyles(props), _styles.expandClassNames.expanded, EXPAND_SELECTED_BACKGROUND(props), (0, _components.themed)({
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(props) {
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)(props), "var(--ds-space-050, 4px)", _editorSharedStyles.akEditorLineHeight, _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(_editorSharedStyles.akEditorSelectedBorderColor, ")"));
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)(props), (0, _styles3.blocktypeStyles)(), (0, _styles.codeMarkSharedStyles)(props), _styles.textColorStyles, listsStyles, ruleStyles(props), _media.mediaStyles, (0, _layout.layoutStyles)(props), _styles2.telepointerStyle, _selection.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _panel.panelStyles)(props), mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(props), _styles6.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, _status.statusStyles, (0, _styles.annotationSharedStyles)(props), _styles.smartCardStyles, _styles.smartCardSharedStyles, _date.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
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(props) {
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)(props), _panel.PanelSharedCssClassName.prefix, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]));
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
  };
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "190.1.9";
8
+ var version = exports.version = "190.1.11";
@@ -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 => ALLOWED_LOGGED_MACRO_PARAMS[macroKey].includes(paramKey)).reduce((obj, param) => {
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 = props => css`
16
+ export const codeBlockStyles = () => css`
17
17
  .ProseMirror {
18
- ${codeBlockSharedStyles(props)}
18
+ ${codeBlockSharedStyles()}
19
19
  }
20
20
 
21
21
  .ProseMirror li {
@@ -1,48 +1,18 @@
1
1
  import { css } from '@emotion/react';
2
- import { DN50, N40A, N50A, N80A, R200, R300, R50 } from '@atlaskit/theme/colors';
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 = themed({
10
- light: "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))",
11
- dark: "var(--ds-background-neutral-subtle, rgba(9, 10, 11, 0.29))"
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 ACTIVE_STATE_BACKGROUND_COLOR = themed({
22
- dark: `var(--ds-blanket-selected, ${`#0C294F4B`})`
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 = props => css`
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
- })(props)}
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(props)};
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(props)};
81
- border: ${DANGER_STATE_BORDER(props)};
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
- })(props)}
60
+ })()}
100
61
  cursor: text;
101
62
  padding-top: 0px;
102
63
  }
103
64
 
104
65
  .${expandClassNames.titleInput} {
105
- ${sharedExpandStyles.titleInputStyles(props)}
66
+ ${sharedExpandStyles.titleInputStyles()}
106
67
  }
107
68
 
108
69
  .${expandClassNames.titleContainer} {
109
- ${sharedExpandStyles.titleContainerStyles(props)};
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(props)};
116
- border-color: ${themed({
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(props)};
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: ${themed({
159
- light: `var(--ds-border, ${N50A})`,
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 = props => css`
34
+ const ruleStyles = () => css`
35
35
  .ProseMirror {
36
- ${ruleSharedStyles(props)};
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(props)}
174
+ ${codeBlockStyles()}
175
175
 
176
176
  ${blocktypeStyles()}
177
- ${codeMarkSharedStyles(props)}
177
+ ${codeMarkSharedStyles()}
178
178
  ${textColorStyles}
179
179
  ${listsStyles}
180
- ${ruleStyles(props)}
180
+ ${ruleStyles()}
181
181
  ${mediaStyles}
182
182
  ${layoutStyles(props)}
183
183
  ${telepointerStyle}
184
184
  ${gapCursorStyles};
185
185
  ${tableStyles(props)}
186
- ${panelStyles(props)}
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(props)}
195
+ ${expandStyles()}
196
196
  ${findReplaceStyles}
197
197
  ${textHighlightStyle}
198
198
  ${taskDecisionStyles}
199
199
  ${statusStyles}
200
- ${annotationSharedStyles(props)}
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 = props => css`
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(props)};
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.9";
2
+ export const version = "190.1.11";
@@ -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
- return ALLOWED_LOGGED_MACRO_PARAMS[macroKey].includes(paramKey);
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(props) {
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(props), 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))");
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
  };
@@ -1,61 +1,25 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject, _templateObject2;
3
3
  import { css } from '@emotion/react';
4
- import { DN50, N40A, N50A, N80A, R200, R300, R50 } from '@atlaskit/theme/colors';
5
- // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
6
- import { themed } from '@atlaskit/theme/components';
4
+ import { N40A, N50A, N80A, R300, R50 } from '@atlaskit/theme/colors';
7
5
  import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
8
6
  import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
9
7
  import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
10
8
  import { expandClassNames } from '@atlaskit/editor-common/styles';
11
- var EXPAND_SELECTED_BACKGROUND = themed({
12
- light: "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))",
13
- dark: "var(--ds-background-neutral-subtle, rgba(9, 10, 11, 0.29))"
14
- });
15
-
16
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
17
- var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR(props) {
18
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
19
- light: "var(--ds-icon-subtle, ".concat(N80A, ")"),
20
- dark: "var(--ds-icon-subtle, #d9dde3)"
21
- })(props));
9
+ var EXPAND_SELECTED_BACKGROUND = "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))";
10
+ var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR() {
11
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), "var(--ds-icon-subtle, ".concat(N80A, ")"));
22
12
  };
23
- var ACTIVE_STATE_BACKGROUND_COLOR = themed({
24
- dark: "var(--ds-blanket-selected, ".concat("#0C294F4B", ")")
25
- });
26
- var ACTIVE_STATE_BORDER = themed({
27
- dark: "1px solid ".concat("var(--ds-border-selected, ".concat("#4794ff4B", ")"))
28
- });
29
- var ACTIVE_STATE_BORDER_RADIUS = themed({
30
- dark: '3px'
31
- });
32
- var DANGER_STATE_BACKGROUND_COLOR = themed({
33
- light: "var(--ds-background-danger, ".concat(R50, ")"),
34
- dark: "var(--ds-background-danger, #441C13)"
35
- });
36
- var DANGER_STATE_BORDER = themed({
37
- dark: "1px solid ".concat("var(--ds-border-danger, ".concat(R200, ")"))
38
- });
39
- var DANGER_STATE_BORDER_COLOR = themed({
40
- light: "var(--ds-border-danger, ".concat(R300, ")")
41
- });
42
- var DANGER_STATE_BORDER_RADIUS = themed({
43
- dark: '3px'
44
- });
13
+ var DANGER_STATE_BACKGROUND_COLOR = "var(--ds-background-danger, ".concat(R50, ")");
14
+ var DANGER_STATE_BORDER_COLOR = "var(--ds-border-danger, ".concat(R300, ")");
45
15
 
46
16
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
47
- export var expandStyles = function expandStyles(props) {
48
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\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 ::after {\n // Custom background color and borders (for dark theme).\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n }\n }\n\n &.danger {\n background: ", ";\n border: ", ";\n border-color: ", ";\n border-radius: ", ";\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"])), expandClassNames.icon, expandClassNames.prefix, sharedExpandStyles.containerStyles({
17
+ export var expandStyles = function expandStyles() {
18
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\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"])), expandClassNames.icon, expandClassNames.prefix, sharedExpandStyles.containerStyles({
49
19
  expanded: false,
50
20
  focused: false
51
- })(props), expandClassNames.iconContainer, EXPAND_ICON_COLOR(props), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.Border]), ACTIVE_STATE_BACKGROUND_COLOR(props), ACTIVE_STATE_BORDER(props), ACTIVE_STATE_BORDER_RADIUS(props), DANGER_STATE_BACKGROUND_COLOR(props), DANGER_STATE_BORDER(props), DANGER_STATE_BORDER_COLOR(props), DANGER_STATE_BORDER_RADIUS(props), expandClassNames.type('expand'), BreakoutCssClassName.BREAKOUT_MARK_DOM, expandClassNames.type('expand'), akLayoutGutterOffset, akLayoutGutterOffset, expandClassNames.content, sharedExpandStyles.contentStyles({
21
+ })(), expandClassNames.iconContainer, EXPAND_ICON_COLOR(), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.Border]), DANGER_STATE_BACKGROUND_COLOR, DANGER_STATE_BORDER_COLOR, expandClassNames.type('expand'), BreakoutCssClassName.BREAKOUT_MARK_DOM, expandClassNames.type('expand'), akLayoutGutterOffset, akLayoutGutterOffset, expandClassNames.content, sharedExpandStyles.contentStyles({
52
22
  expanded: false,
53
23
  focused: false
54
- })(props), expandClassNames.titleInput, sharedExpandStyles.titleInputStyles(props), expandClassNames.titleContainer, sharedExpandStyles.titleContainerStyles(props), expandClassNames.expanded, EXPAND_SELECTED_BACKGROUND(props), themed({
55
- light: "var(--ds-border, ".concat(N40A, ")"),
56
- dark: "var(--ds-border, ".concat(DN50, ")")
57
- })(props), expandClassNames.content, "var(--ds-space-100, 8px)", expandClassNames.inputContainer, expandClassNames.prefix, expandClassNames.expanded, expandClassNames.prefix, expandClassNames.expanded, expandClassNames.iconContainer, EXPAND_ICON_COLOR(props), akEditorSelectedNodeClassName, themed({
58
- light: "var(--ds-border, ".concat(N50A, ")"),
59
- dark: "var(--ds-border, ".concat(DN50, ")")
60
- })(props), EXPAND_SELECTED_BACKGROUND(props));
24
+ })(), expandClassNames.titleInput, sharedExpandStyles.titleInputStyles(), expandClassNames.titleContainer, sharedExpandStyles.titleContainerStyles(), expandClassNames.expanded, EXPAND_SELECTED_BACKGROUND, "var(--ds-border, ".concat(N40A, ")"), expandClassNames.content, "var(--ds-space-100, 8px)", expandClassNames.inputContainer, expandClassNames.prefix, expandClassNames.expanded, expandClassNames.prefix, expandClassNames.expanded, expandClassNames.iconContainer, EXPAND_ICON_COLOR(), akEditorSelectedNodeClassName, "var(--ds-border, ".concat(N50A, ")"), EXPAND_SELECTED_BACKGROUND);
61
25
  };
@@ -29,8 +29,8 @@ import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
29
29
  import { N500, N30A, N200 } from '@atlaskit/theme/colors';
30
30
  import { gapCursorStyles } from '@atlaskit/editor-common/selection';
31
31
  export var linkStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", "\n }\n"])), linkSharedStyle);
32
- var ruleStyles = function ruleStyles(props) {
33
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\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"])), ruleSharedStyles(props), "var(--ds-space-050, 4px)", akEditorLineHeight, akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(akEditorSelectedBorderColor, ")"));
32
+ var ruleStyles = function ruleStyles() {
33
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\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"])), ruleSharedStyles(), "var(--ds-space-050, 4px)", akEditorLineHeight, akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(akEditorSelectedBorderColor, ")"));
34
34
  };
35
35
  var mentionsStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\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"])), MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Background]), "var(--ds-text-subtle, ".concat(N500, ")"), MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, akEditorSelectedBorderSize, akEditorDeleteBorder, "var(--ds-background-danger, ".concat(akEditorDeleteBackgroundWithOpacity, ")"), MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, ".concat(N30A, ")"), "var(--ds-text-subtle, ".concat(N500, ")"));
36
36
  var listsStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\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)", blockNodesVerticalMargin, SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, browser.safari ? codeBlockInListSafariFix : '');
@@ -39,7 +39,7 @@ export var placeholderStyles = css(_templateObject6 || (_templateObject6 = _tagg
39
39
  var contentStyles = function contentStyles(props) {
40
40
  return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\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"])), editorFontSize({
41
41
  theme: props.theme
42
- }), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, codeBlockStyles(props), blocktypeStyles(), codeMarkSharedStyles(props), textColorStyles, listsStyles, ruleStyles(props), mediaStyles, layoutStyles(props), telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(props), mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(props), findReplaceStyles, textHighlightStyle, taskDecisionStyles, statusStyles, annotationSharedStyles(props), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
42
+ }), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, codeBlockStyles(), blocktypeStyles(), codeMarkSharedStyles(), textColorStyles, listsStyles, ruleStyles(), mediaStyles, layoutStyles(props), telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(), mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(), findReplaceStyles, textHighlightStyle, taskDecisionStyles, statusStyles, annotationSharedStyles(), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
43
43
  };
44
44
  export var createEditorContentStyle = function createEditorContentStyle(styles) {
45
45
  return /*#__PURE__*/React.forwardRef(function (props, ref) {
@@ -3,6 +3,6 @@ var _templateObject;
3
3
  import { css } from '@emotion/react';
4
4
  import { panelSharedStyles, PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
5
5
  import { SelectionStyle, getSelectionStyles, akEditorDeleteBackground, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorDeleteIconColor, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
6
- export var panelStyles = function panelStyles(props) {
7
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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"])), PanelSharedCssClassName.prefix, akEditorSelectedBorderSize, akEditorDeleteBorder, "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), PanelSharedCssClassName.content, PanelSharedCssClassName.prefix, "var(--ds-blanket-danger, ".concat(akEditorDeleteBackgroundWithOpacity, ")"), PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), panelSharedStyles(props), PanelSharedCssClassName.prefix, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]));
6
+ export var panelStyles = function panelStyles() {
7
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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"])), PanelSharedCssClassName.prefix, akEditorSelectedBorderSize, akEditorDeleteBorder, "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), PanelSharedCssClassName.content, PanelSharedCssClassName.prefix, "var(--ds-blanket-danger, ".concat(akEditorDeleteBackgroundWithOpacity, ")"), PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), panelSharedStyles(), PanelSharedCssClassName.prefix, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]));
8
8
  };
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "190.1.9";
2
+ export var version = "190.1.11";
@@ -11,5 +11,6 @@ export declare const getOptionFromValue: (options: Option[] | GroupBase<Option>[
11
11
  export declare const getSafeParentedName: (name: string, parentName?: string) => string;
12
12
  export declare const isDuplicateField: (key: string) => boolean;
13
13
  export declare const getNameFromDuplicateField: (key: string) => string;
14
+ export declare const parseParamType: (paramValue: any, paramField?: FieldDefinition) => any;
14
15
  export declare const getLoggedParameters: (macroKey: string, currentParams: Parameters, macroFields?: FieldDefinition[]) => {};
15
16
  export {};
@@ -1,2 +1 @@
1
- import type { ThemeProps } from '@atlaskit/theme/types';
2
- export declare const codeBlockStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
1
+ export declare const codeBlockStyles: () => import("@emotion/react").SerializedStyles;
@@ -1,2 +1 @@
1
- import type { ThemeProps } from '@atlaskit/theme/types';
2
- export declare const expandStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
1
+ export declare const expandStyles: () => import("@emotion/react").SerializedStyles;
@@ -1,2 +1 @@
1
- import type { ThemeProps } from '@atlaskit/theme/types';
2
- export declare const panelStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
1
+ export declare const panelStyles: () => import("@emotion/react").SerializedStyles;
@@ -11,5 +11,6 @@ export declare const getOptionFromValue: (options: Option[] | GroupBase<Option>[
11
11
  export declare const getSafeParentedName: (name: string, parentName?: string) => string;
12
12
  export declare const isDuplicateField: (key: string) => boolean;
13
13
  export declare const getNameFromDuplicateField: (key: string) => string;
14
+ export declare const parseParamType: (paramValue: any, paramField?: FieldDefinition) => any;
14
15
  export declare const getLoggedParameters: (macroKey: string, currentParams: Parameters, macroFields?: FieldDefinition[]) => {};
15
16
  export {};
@@ -1,2 +1 @@
1
- import type { ThemeProps } from '@atlaskit/theme/types';
2
- export declare const codeBlockStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
1
+ export declare const codeBlockStyles: () => import("@emotion/react").SerializedStyles;
@@ -1,2 +1 @@
1
- import type { ThemeProps } from '@atlaskit/theme/types';
2
- export declare const expandStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
1
+ export declare const expandStyles: () => import("@emotion/react").SerializedStyles;
@@ -1,2 +1 @@
1
- import type { ThemeProps } from '@atlaskit/theme/types';
2
- export declare const panelStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
1
+ export declare const panelStyles: () => import("@emotion/react").SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "190.1.9",
3
+ "version": "190.1.11",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -142,7 +142,7 @@
142
142
  "@atlaskit/textfield": "^6.0.0",
143
143
  "@atlaskit/theme": "^12.6.0",
144
144
  "@atlaskit/toggle": "^13.0.0",
145
- "@atlaskit/tokens": "^1.30.0",
145
+ "@atlaskit/tokens": "^1.31.0",
146
146
  "@atlaskit/tooltip": "^18.1.0",
147
147
  "@atlaskit/ufo": "^0.2.0",
148
148
  "@atlaskit/width-detector": "^4.1.0",